(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["vendors~application"],{
/***/ "../../node_modules/@babel/polyfill/lib/index.js":
/*!******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@babel/polyfill/lib/index.js ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(/*! ./noConflict */ "../../node_modules/@babel/polyfill/lib/noConflict.js");
var _global = _interopRequireDefault(__webpack_require__(/*! core-js/library/fn/global */ "../../node_modules/core-js/library/fn/global.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
if (_global["default"]._babelPolyfill && typeof console !== "undefined" && console.warn) {
console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended " + "and may have consequences if different versions of the polyfills are applied sequentially. " + "If you do need to load the polyfill more than once, use @babel/polyfill/noConflict " + "instead to bypass the warning.");
}
_global["default"]._babelPolyfill = true;
/***/ }),
/***/ "../../node_modules/@babel/polyfill/lib/noConflict.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@babel/polyfill/lib/noConflict.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(/*! core-js/es6 */ "../../node_modules/core-js/es6/index.js");
__webpack_require__(/*! core-js/fn/array/includes */ "../../node_modules/core-js/fn/array/includes.js");
__webpack_require__(/*! core-js/fn/array/flat-map */ "../../node_modules/core-js/fn/array/flat-map.js");
__webpack_require__(/*! core-js/fn/string/pad-start */ "../../node_modules/core-js/fn/string/pad-start.js");
__webpack_require__(/*! core-js/fn/string/pad-end */ "../../node_modules/core-js/fn/string/pad-end.js");
__webpack_require__(/*! core-js/fn/string/trim-start */ "../../node_modules/core-js/fn/string/trim-start.js");
__webpack_require__(/*! core-js/fn/string/trim-end */ "../../node_modules/core-js/fn/string/trim-end.js");
__webpack_require__(/*! core-js/fn/symbol/async-iterator */ "../../node_modules/core-js/fn/symbol/async-iterator.js");
__webpack_require__(/*! core-js/fn/object/get-own-property-descriptors */ "../../node_modules/core-js/fn/object/get-own-property-descriptors.js");
__webpack_require__(/*! core-js/fn/object/values */ "../../node_modules/core-js/fn/object/values.js");
__webpack_require__(/*! core-js/fn/object/entries */ "../../node_modules/core-js/fn/object/entries.js");
__webpack_require__(/*! core-js/fn/promise/finally */ "../../node_modules/core-js/fn/promise/finally.js");
__webpack_require__(/*! core-js/web */ "../../node_modules/core-js/web/index.js");
__webpack_require__(/*! regenerator-runtime/runtime */ "../../node_modules/regenerator-runtime/runtime.js");
/***/ }),
/***/ "../../node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js":
/*!*********************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js ***!
\*********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
/*
Unobtrusive JavaScript
https://github.com/rails/rails/blob/master/actionview/app/assets/javascripts
Released under the MIT license
*/
;
(function () {
var context = this;
(function () {
(function () {
this.Rails = {
linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]',
buttonClickSelector: {
selector: 'button[data-remote]:not([form]), button[data-confirm]:not([form])',
exclude: 'form button'
},
inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',
formSubmitSelector: 'form',
formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',
formDisableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled',
formEnableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled',
fileInputSelector: 'input[name][type=file]:not([disabled])',
linkDisableSelector: 'a[data-disable-with], a[data-disable]',
buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]'
};
}).call(this);
}).call(context);
var Rails = context.Rails;
(function () {
(function () {
var nonce;
nonce = null;
Rails.loadCSPNonce = function () {
var ref;
return nonce = (ref = document.querySelector("meta[name=csp-nonce]")) != null ? ref.content : void 0;
};
Rails.cspNonce = function () {
return nonce != null ? nonce : Rails.loadCSPNonce();
};
}).call(this);
(function () {
var expando, m;
m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;
Rails.matches = function (element, selector) {
if (selector.exclude != null) {
return m.call(element, selector.selector) && !m.call(element, selector.exclude);
} else {
return m.call(element, selector);
}
};
expando = '_ujsData';
Rails.getData = function (element, key) {
var ref;
return (ref = element[expando]) != null ? ref[key] : void 0;
};
Rails.setData = function (element, key, value) {
if (element[expando] == null) {
element[expando] = {};
}
return element[expando][key] = value;
};
Rails.$ = function (selector) {
return Array.prototype.slice.call(document.querySelectorAll(selector));
};
}).call(this);
(function () {
var $, csrfParam, csrfToken;
$ = Rails.$;
csrfToken = Rails.csrfToken = function () {
var meta;
meta = document.querySelector('meta[name=csrf-token]');
return meta && meta.content;
};
csrfParam = Rails.csrfParam = function () {
var meta;
meta = document.querySelector('meta[name=csrf-param]');
return meta && meta.content;
};
Rails.CSRFProtection = function (xhr) {
var token;
token = csrfToken();
if (token != null) {
return xhr.setRequestHeader('X-CSRF-Token', token);
}
};
Rails.refreshCSRFTokens = function () {
var param, token;
token = csrfToken();
param = csrfParam();
if (token != null && param != null) {
return $('form input[name="' + param + '"]').forEach(function (input) {
return input.value = token;
});
}
};
}).call(this);
(function () {
var CustomEvent, fire, matches, preventDefault;
matches = Rails.matches;
CustomEvent = window.CustomEvent;
if (typeof CustomEvent !== 'function') {
CustomEvent = function CustomEvent(event, params) {
var evt;
evt = document.createEvent('CustomEvent');
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
return evt;
};
CustomEvent.prototype = window.Event.prototype;
preventDefault = CustomEvent.prototype.preventDefault;
CustomEvent.prototype.preventDefault = function () {
var result;
result = preventDefault.call(this);
if (this.cancelable && !this.defaultPrevented) {
Object.defineProperty(this, 'defaultPrevented', {
get: function get() {
return true;
}
});
}
return result;
};
}
fire = Rails.fire = function (obj, name, data) {
var event;
event = new CustomEvent(name, {
bubbles: true,
cancelable: true,
detail: data
});
obj.dispatchEvent(event);
return !event.defaultPrevented;
};
Rails.stopEverything = function (e) {
fire(e.target, 'ujs:everythingStopped');
e.preventDefault();
e.stopPropagation();
return e.stopImmediatePropagation();
};
Rails.delegate = function (element, selector, eventType, handler) {
return element.addEventListener(eventType, function (e) {
var target;
target = e.target;
while (!(!(target instanceof Element) || matches(target, selector))) {
target = target.parentNode;
}
if (target instanceof Element && handler.call(target, e) === false) {
e.preventDefault();
return e.stopPropagation();
}
});
};
}).call(this);
(function () {
var AcceptHeaders, CSRFProtection, createXHR, cspNonce, fire, prepareOptions, processResponse;
cspNonce = Rails.cspNonce, CSRFProtection = Rails.CSRFProtection, fire = Rails.fire;
AcceptHeaders = {
'*': '*/*',
text: 'text/plain',
html: 'text/html',
xml: 'application/xml, text/xml',
json: 'application/json, text/javascript',
script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript'
};
Rails.ajax = function (options) {
var xhr;
options = prepareOptions(options);
xhr = createXHR(options, function () {
var ref, response;
response = processResponse((ref = xhr.response) != null ? ref : xhr.responseText, xhr.getResponseHeader('Content-Type'));
if (Math.floor(xhr.status / 100) === 2) {
if (typeof options.success === "function") {
options.success(response, xhr.statusText, xhr);
}
} else {
if (typeof options.error === "function") {
options.error(response, xhr.statusText, xhr);
}
}
return typeof options.complete === "function" ? options.complete(xhr, xhr.statusText) : void 0;
});
if (options.beforeSend != null && !options.beforeSend(xhr, options)) {
return false;
}
if (xhr.readyState === XMLHttpRequest.OPENED) {
return xhr.send(options.data);
}
};
prepareOptions = function prepareOptions(options) {
options.url = options.url || location.href;
options.type = options.type.toUpperCase();
if (options.type === 'GET' && options.data) {
if (options.url.indexOf('?') < 0) {
options.url += '?' + options.data;
} else {
options.url += '&' + options.data;
}
}
if (AcceptHeaders[options.dataType] == null) {
options.dataType = '*';
}
options.accept = AcceptHeaders[options.dataType];
if (options.dataType !== '*') {
options.accept += ', */*; q=0.01';
}
return options;
};
createXHR = function createXHR(options, done) {
var xhr;
xhr = new XMLHttpRequest();
xhr.open(options.type, options.url, true);
xhr.setRequestHeader('Accept', options.accept);
if (typeof options.data === 'string') {
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
}
if (!options.crossDomain) {
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
CSRFProtection(xhr);
}
xhr.withCredentials = !!options.withCredentials;
xhr.onreadystatechange = function () {
if (xhr.readyState === XMLHttpRequest.DONE) {
return done(xhr);
}
};
return xhr;
};
processResponse = function processResponse(response, type) {
var parser, script;
if (typeof response === 'string' && typeof type === 'string') {
if (type.match(/\bjson\b/)) {
try {
response = JSON.parse(response);
} catch (error) {}
} else if (type.match(/\b(?:java|ecma)script\b/)) {
script = document.createElement('script');
script.setAttribute('nonce', cspNonce());
script.text = response;
document.head.appendChild(script).parentNode.removeChild(script);
} else if (type.match(/\b(xml|html|svg)\b/)) {
parser = new DOMParser();
type = type.replace(/;.+/, '');
try {
response = parser.parseFromString(response, type);
} catch (error) {}
}
}
return response;
};
Rails.href = function (element) {
return element.href;
};
Rails.isCrossDomain = function (url) {
var e, originAnchor, urlAnchor;
originAnchor = document.createElement('a');
originAnchor.href = location.href;
urlAnchor = document.createElement('a');
try {
urlAnchor.href = url;
return !((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host || originAnchor.protocol + '//' + originAnchor.host === urlAnchor.protocol + '//' + urlAnchor.host);
} catch (error) {
e = error;
return true;
}
};
}).call(this);
(function () {
var matches, toArray;
matches = Rails.matches;
toArray = function toArray(e) {
return Array.prototype.slice.call(e);
};
Rails.serializeElement = function (element, additionalParam) {
var inputs, params;
inputs = [element];
if (matches(element, 'form')) {
inputs = toArray(element.elements);
}
params = [];
inputs.forEach(function (input) {
if (!input.name || input.disabled) {
return;
}
if (matches(input, 'fieldset[disabled] *')) {
return;
}
if (matches(input, 'select')) {
return toArray(input.options).forEach(function (option) {
if (option.selected) {
return params.push({
name: input.name,
value: option.value
});
}
});
} else if (input.checked || ['radio', 'checkbox', 'submit'].indexOf(input.type) === -1) {
return params.push({
name: input.name,
value: input.value
});
}
});
if (additionalParam) {
params.push(additionalParam);
}
return params.map(function (param) {
if (param.name != null) {
return encodeURIComponent(param.name) + "=" + encodeURIComponent(param.value);
} else {
return param;
}
}).join('&');
};
Rails.formElements = function (form, selector) {
if (matches(form, 'form')) {
return toArray(form.elements).filter(function (el) {
return matches(el, selector);
});
} else {
return toArray(form.querySelectorAll(selector));
}
};
}).call(this);
(function () {
var allowAction, fire, stopEverything;
fire = Rails.fire, stopEverything = Rails.stopEverything;
Rails.handleConfirm = function (e) {
if (!allowAction(this)) {
return stopEverything(e);
}
};
Rails.confirm = function (message, element) {
return confirm(message);
};
allowAction = function allowAction(element) {
var answer, callback, message;
message = element.getAttribute('data-confirm');
if (!message) {
return true;
}
answer = false;
if (fire(element, 'confirm')) {
try {
answer = Rails.confirm(message, element);
} catch (error) {}
callback = fire(element, 'confirm:complete', [answer]);
}
return answer && callback;
};
}).call(this);
(function () {
var disableFormElement, disableFormElements, disableLinkElement, enableFormElement, enableFormElements, enableLinkElement, formElements, getData, isXhrRedirect, matches, setData, stopEverything;
matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, stopEverything = Rails.stopEverything, formElements = Rails.formElements;
Rails.handleDisabledElement = function (e) {
var element;
element = this;
if (element.disabled) {
return stopEverything(e);
}
};
Rails.enableElement = function (e) {
var element;
if (e instanceof Event) {
if (isXhrRedirect(e)) {
return;
}
element = e.target;
} else {
element = e;
}
if (matches(element, Rails.linkDisableSelector)) {
return enableLinkElement(element);
} else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formEnableSelector)) {
return enableFormElement(element);
} else if (matches(element, Rails.formSubmitSelector)) {
return enableFormElements(element);
}
};
Rails.disableElement = function (e) {
var element;
element = e instanceof Event ? e.target : e;
if (matches(element, Rails.linkDisableSelector)) {
return disableLinkElement(element);
} else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formDisableSelector)) {
return disableFormElement(element);
} else if (matches(element, Rails.formSubmitSelector)) {
return disableFormElements(element);
}
};
disableLinkElement = function disableLinkElement(element) {
var replacement;
if (getData(element, 'ujs:disabled')) {
return;
}
replacement = element.getAttribute('data-disable-with');
if (replacement != null) {
setData(element, 'ujs:enable-with', element.innerHTML);
element.innerHTML = replacement;
}
element.addEventListener('click', stopEverything);
return setData(element, 'ujs:disabled', true);
};
enableLinkElement = function enableLinkElement(element) {
var originalText;
originalText = getData(element, 'ujs:enable-with');
if (originalText != null) {
element.innerHTML = originalText;
setData(element, 'ujs:enable-with', null);
}
element.removeEventListener('click', stopEverything);
return setData(element, 'ujs:disabled', null);
};
disableFormElements = function disableFormElements(form) {
return formElements(form, Rails.formDisableSelector).forEach(disableFormElement);
};
disableFormElement = function disableFormElement(element) {
var replacement;
if (getData(element, 'ujs:disabled')) {
return;
}
replacement = element.getAttribute('data-disable-with');
if (replacement != null) {
if (matches(element, 'button')) {
setData(element, 'ujs:enable-with', element.innerHTML);
element.innerHTML = replacement;
} else {
setData(element, 'ujs:enable-with', element.value);
element.value = replacement;
}
}
element.disabled = true;
return setData(element, 'ujs:disabled', true);
};
enableFormElements = function enableFormElements(form) {
return formElements(form, Rails.formEnableSelector).forEach(enableFormElement);
};
enableFormElement = function enableFormElement(element) {
var originalText;
originalText = getData(element, 'ujs:enable-with');
if (originalText != null) {
if (matches(element, 'button')) {
element.innerHTML = originalText;
} else {
element.value = originalText;
}
setData(element, 'ujs:enable-with', null);
}
element.disabled = false;
return setData(element, 'ujs:disabled', null);
};
isXhrRedirect = function isXhrRedirect(event) {
var ref, xhr;
xhr = (ref = event.detail) != null ? ref[0] : void 0;
return (xhr != null ? xhr.getResponseHeader("X-Xhr-Redirect") : void 0) != null;
};
}).call(this);
(function () {
var stopEverything;
stopEverything = Rails.stopEverything;
Rails.handleMethod = function (e) {
var csrfParam, csrfToken, form, formContent, href, link, method;
link = this;
method = link.getAttribute('data-method');
if (!method) {
return;
}
href = Rails.href(link);
csrfToken = Rails.csrfToken();
csrfParam = Rails.csrfParam();
form = document.createElement('form');
formContent = "";
if (csrfParam != null && csrfToken != null && !Rails.isCrossDomain(href)) {
formContent += "";
}
formContent += '';
form.method = 'post';
form.action = href;
form.target = link.target;
form.innerHTML = formContent;
form.style.display = 'none';
document.body.appendChild(form);
form.querySelector('[type="submit"]').click();
return stopEverything(e);
};
}).call(this);
(function () {
var ajax,
fire,
getData,
isCrossDomain,
isRemote,
matches,
serializeElement,
setData,
stopEverything,
slice = [].slice;
matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, fire = Rails.fire, stopEverything = Rails.stopEverything, ajax = Rails.ajax, isCrossDomain = Rails.isCrossDomain, serializeElement = Rails.serializeElement;
isRemote = function isRemote(element) {
var value;
value = element.getAttribute('data-remote');
return value != null && value !== 'false';
};
Rails.handleRemote = function (e) {
var button, data, dataType, element, method, url, withCredentials;
element = this;
if (!isRemote(element)) {
return true;
}
if (!fire(element, 'ajax:before')) {
fire(element, 'ajax:stopped');
return false;
}
withCredentials = element.getAttribute('data-with-credentials');
dataType = element.getAttribute('data-type') || 'script';
if (matches(element, Rails.formSubmitSelector)) {
button = getData(element, 'ujs:submit-button');
method = getData(element, 'ujs:submit-button-formmethod') || element.method;
url = getData(element, 'ujs:submit-button-formaction') || element.getAttribute('action') || location.href;
if (method.toUpperCase() === 'GET') {
url = url.replace(/\?.*$/, '');
}
if (element.enctype === 'multipart/form-data') {
data = new FormData(element);
if (button != null) {
data.append(button.name, button.value);
}
} else {
data = serializeElement(element, button);
}
setData(element, 'ujs:submit-button', null);
setData(element, 'ujs:submit-button-formmethod', null);
setData(element, 'ujs:submit-button-formaction', null);
} else if (matches(element, Rails.buttonClickSelector) || matches(element, Rails.inputChangeSelector)) {
method = element.getAttribute('data-method');
url = element.getAttribute('data-url');
data = serializeElement(element, element.getAttribute('data-params'));
} else {
method = element.getAttribute('data-method');
url = Rails.href(element);
data = element.getAttribute('data-params');
}
ajax({
type: method || 'GET',
url: url,
data: data,
dataType: dataType,
beforeSend: function beforeSend(xhr, options) {
if (fire(element, 'ajax:beforeSend', [xhr, options])) {
return fire(element, 'ajax:send', [xhr]);
} else {
fire(element, 'ajax:stopped');
return false;
}
},
success: function success() {
var args;
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
return fire(element, 'ajax:success', args);
},
error: function error() {
var args;
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
return fire(element, 'ajax:error', args);
},
complete: function complete() {
var args;
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
return fire(element, 'ajax:complete', args);
},
crossDomain: isCrossDomain(url),
withCredentials: withCredentials != null && withCredentials !== 'false'
});
return stopEverything(e);
};
Rails.formSubmitButtonClick = function (e) {
var button, form;
button = this;
form = button.form;
if (!form) {
return;
}
if (button.name) {
setData(form, 'ujs:submit-button', {
name: button.name,
value: button.value
});
}
setData(form, 'ujs:formnovalidate-button', button.formNoValidate);
setData(form, 'ujs:submit-button-formaction', button.getAttribute('formaction'));
return setData(form, 'ujs:submit-button-formmethod', button.getAttribute('formmethod'));
};
Rails.preventInsignificantClick = function (e) {
var data, insignificantMetaClick, link, metaClick, method, nonPrimaryMouseClick;
link = this;
method = (link.getAttribute('data-method') || 'GET').toUpperCase();
data = link.getAttribute('data-params');
metaClick = e.metaKey || e.ctrlKey;
insignificantMetaClick = metaClick && method === 'GET' && !data;
nonPrimaryMouseClick = e.button != null && e.button !== 0;
if (nonPrimaryMouseClick || insignificantMetaClick) {
return e.stopImmediatePropagation();
}
};
}).call(this);
(function () {
var $, CSRFProtection, delegate, disableElement, enableElement, fire, formSubmitButtonClick, getData, handleConfirm, handleDisabledElement, handleMethod, handleRemote, loadCSPNonce, preventInsignificantClick, refreshCSRFTokens;
fire = Rails.fire, delegate = Rails.delegate, getData = Rails.getData, $ = Rails.$, refreshCSRFTokens = Rails.refreshCSRFTokens, CSRFProtection = Rails.CSRFProtection, loadCSPNonce = Rails.loadCSPNonce, enableElement = Rails.enableElement, disableElement = Rails.disableElement, handleDisabledElement = Rails.handleDisabledElement, handleConfirm = Rails.handleConfirm, preventInsignificantClick = Rails.preventInsignificantClick, handleRemote = Rails.handleRemote, formSubmitButtonClick = Rails.formSubmitButtonClick, handleMethod = Rails.handleMethod;
if (typeof jQuery !== "undefined" && jQuery !== null && jQuery.ajax != null) {
if (jQuery.rails) {
throw new Error('If you load both jquery_ujs and rails-ujs, use rails-ujs only.');
}
jQuery.rails = Rails;
jQuery.ajaxPrefilter(function (options, originalOptions, xhr) {
if (!options.crossDomain) {
return CSRFProtection(xhr);
}
});
}
Rails.start = function () {
if (window._rails_loaded) {
throw new Error('rails-ujs has already been loaded!');
}
window.addEventListener('pageshow', function () {
$(Rails.formEnableSelector).forEach(function (el) {
if (getData(el, 'ujs:disabled')) {
return enableElement(el);
}
});
return $(Rails.linkDisableSelector).forEach(function (el) {
if (getData(el, 'ujs:disabled')) {
return enableElement(el);
}
});
});
delegate(document, Rails.linkDisableSelector, 'ajax:complete', enableElement);
delegate(document, Rails.linkDisableSelector, 'ajax:stopped', enableElement);
delegate(document, Rails.buttonDisableSelector, 'ajax:complete', enableElement);
delegate(document, Rails.buttonDisableSelector, 'ajax:stopped', enableElement);
delegate(document, Rails.linkClickSelector, 'click', preventInsignificantClick);
delegate(document, Rails.linkClickSelector, 'click', handleDisabledElement);
delegate(document, Rails.linkClickSelector, 'click', handleConfirm);
delegate(document, Rails.linkClickSelector, 'click', disableElement);
delegate(document, Rails.linkClickSelector, 'click', handleRemote);
delegate(document, Rails.linkClickSelector, 'click', handleMethod);
delegate(document, Rails.buttonClickSelector, 'click', preventInsignificantClick);
delegate(document, Rails.buttonClickSelector, 'click', handleDisabledElement);
delegate(document, Rails.buttonClickSelector, 'click', handleConfirm);
delegate(document, Rails.buttonClickSelector, 'click', disableElement);
delegate(document, Rails.buttonClickSelector, 'click', handleRemote);
delegate(document, Rails.inputChangeSelector, 'change', handleDisabledElement);
delegate(document, Rails.inputChangeSelector, 'change', handleConfirm);
delegate(document, Rails.inputChangeSelector, 'change', handleRemote);
delegate(document, Rails.formSubmitSelector, 'submit', handleDisabledElement);
delegate(document, Rails.formSubmitSelector, 'submit', handleConfirm);
delegate(document, Rails.formSubmitSelector, 'submit', handleRemote);
delegate(document, Rails.formSubmitSelector, 'submit', function (e) {
return setTimeout(function () {
return disableElement(e);
}, 13);
});
delegate(document, Rails.formSubmitSelector, 'ajax:send', disableElement);
delegate(document, Rails.formSubmitSelector, 'ajax:complete', enableElement);
delegate(document, Rails.formInputClickSelector, 'click', preventInsignificantClick);
delegate(document, Rails.formInputClickSelector, 'click', handleDisabledElement);
delegate(document, Rails.formInputClickSelector, 'click', handleConfirm);
delegate(document, Rails.formInputClickSelector, 'click', formSubmitButtonClick);
document.addEventListener('DOMContentLoaded', refreshCSRFTokens);
document.addEventListener('DOMContentLoaded', loadCSPNonce);
return window._rails_loaded = true;
};
if (window.Rails === Rails && fire(document, 'rails:attachBindings')) {
Rails.start();
}
}).call(this);
}).call(this);
if (( false ? undefined : _typeof(module)) === "object" && module.exports) {
module.exports = Rails;
} else if (true) {
!(__WEBPACK_AMD_DEFINE_FACTORY__ = (Rails),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
__WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
}
}).call(this);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/module.js */ "../../node_modules/webpack/buildin/module.js")(module)))
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/dist/symbol/volta-brand-icons.svg":
/*!*******************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/dist/symbol/volta-brand-icons.svg ***!
\*******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/symbol/volta-brand-icons-b0758c05.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/dist/symbol/volta-flag-icons.svg":
/*!******************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/dist/symbol/volta-flag-icons.svg ***!
\******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/symbol/volta-flag-icons-49881052.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/dist/symbol/volta-icons.svg":
/*!*************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/dist/symbol/volta-icons.svg ***!
\*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/symbol/volta-icons-f9923579.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-api--white.svg":
/*!********************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-api--white.svg ***!
\********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-api--white-faaff4ce.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-api-changelog--white.svg":
/*!******************************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-api-changelog--white.svg ***!
\******************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-api-changelog--white-1bd97f04.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-api-changelog.svg":
/*!***********************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-api-changelog.svg ***!
\***********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-api-changelog-d65d1f06.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-api-dashboard-vert--white.svg":
/*!***********************************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-api-dashboard-vert--white.svg ***!
\***********************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-api-dashboard-vert--white-1dfad70d.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-api-dashboard-vert.svg":
/*!****************************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-api-dashboard-vert.svg ***!
\****************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-api-dashboard-vert-8af86a96.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-api-developer--white.svg":
/*!******************************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-api-developer--white.svg ***!
\******************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-api-developer--white-e98b9c90.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-api-developer.svg":
/*!***********************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-api-developer.svg ***!
\***********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-api-developer-5f94c73a.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-api-support--white.svg":
/*!****************************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-api-support--white.svg ***!
\****************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-api-support--white-020f27bd.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-api-support.svg":
/*!*********************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-api-support.svg ***!
\*********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-api-support-9a09970e.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-api.svg":
/*!*************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-api.svg ***!
\*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-api-f5f267d7.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-apis--white.svg":
/*!*********************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-apis--white.svg ***!
\*********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-apis--white-274df3a4.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-apis.svg":
/*!**************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-apis.svg ***!
\**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-apis-1a690a13.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-developer--white.svg":
/*!**************************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-developer--white.svg ***!
\**************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-developer--white-fa61f085.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-developer.svg":
/*!*******************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-developer.svg ***!
\*******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-developer-aaf580fc.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-lettermark--white.svg":
/*!***************************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-lettermark--white.svg ***!
\***************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-lettermark--white-26cdf2d2.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-lettermark.svg":
/*!********************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-lettermark.svg ***!
\********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-lettermark-c5f4c571.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-logo-collapsed.svg":
/*!************************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-logo-collapsed.svg ***!
\************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-logo-collapsed-b51e5cfd.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-nexmo--white.svg":
/*!**********************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-nexmo--white.svg ***!
\**********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-nexmo--white-df3a0984.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-nexmo-vert--white.svg":
/*!***************************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-nexmo-vert--white.svg ***!
\***************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-nexmo-vert--white-53f43ae1.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-nexmo-vert.svg":
/*!********************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-nexmo-vert.svg ***!
\********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-nexmo-vert-7b2e755e.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-nexmo.svg":
/*!***************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-nexmo.svg ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-nexmo-b55cd326.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-tokbox--white.svg":
/*!***********************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-tokbox--white.svg ***!
\***********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-tokbox--white-588eecf3.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-tokbox-vert--white.svg":
/*!****************************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-tokbox-vert--white.svg ***!
\****************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-tokbox-vert--white-3f7376b2.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-tokbox-vert.svg":
/*!*********************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-tokbox-vert.svg ***!
\*********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-tokbox-vert-24f66958.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-tokbox.svg":
/*!****************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-tokbox.svg ***!
\****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-tokbox-374d0b2b.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-video-api--white.svg":
/*!**************************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-video-api--white.svg ***!
\**************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-video-api--white-ccd1c34e.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-video-api-stacked--white.svg":
/*!**********************************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-video-api-stacked--white.svg ***!
\**********************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-video-api-stacked--white-c9449041.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-video-api-stacked.svg":
/*!***************************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-video-api-stacked.svg ***!
\***************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-video-api-stacked-2239c1e1.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-video-api.svg":
/*!*******************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-video-api.svg ***!
\*******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-video-api-6547ac01.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-wordmark--white.svg":
/*!*************************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-wordmark--white.svg ***!
\*************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-wordmark--white-95eac2b4.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/Vonage-wordmark.svg":
/*!******************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/Vonage-wordmark.svg ***!
\******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/Vonage-wordmark-a50689e2.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/favicon.ico":
/*!**********************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/favicon.ico ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/favicon-ac1a15a7.ico";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/volta-logo.svg":
/*!*************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/volta-logo.svg ***!
\*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/volta-logo-7e38d941.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/vonage-logo--white.svg":
/*!*********************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/vonage-logo--white.svg ***!
\*********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/vonage-logo--white-2a89ec1d.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/vonage-logo-collapsed--white.svg":
/*!*******************************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/vonage-logo-collapsed--white.svg ***!
\*******************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/vonage-logo-collapsed--white-6cd2aa45.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/images/logos/vonage-logo.svg":
/*!**************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/images/logos/vonage-logo.svg ***!
\**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__.p + "media/logos/vonage-logo-4843dbd0.svg";
/***/ }),
/***/ "../../node_modules/@vonagevolta/volta2/js/addons/prism.js":
/*!****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/@vonagevolta/volta2/js/addons/prism.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {/* PrismJS 1.20.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+c+csharp+git+groovy+java+json+kotlin+markup-templating+objectivec+php+python+ruby+swift&plugins=line-highlight+line-numbers+keep-markup+command-line+toolbar+copy-to-clipboard */
var _self = "undefined" != typeof window ? window : "undefined" != typeof WorkerGlobalScope && self instanceof WorkerGlobalScope ? self : {},
Prism = function (u) {
var c = /\blang(?:uage)?-([\w-]+)\b/i,
n = 0,
C = {
manual: u.Prism && u.Prism.manual,
disableWorkerMessageHandler: u.Prism && u.Prism.disableWorkerMessageHandler,
util: {
encode: function e(n) {
return n instanceof _ ? new _(n.type, e(n.content), n.alias) : Array.isArray(n) ? n.map(e) : n.replace(/&/g, "&").replace(/ n.length) return;
if (!(b instanceof _)) {
var x = 1;
if (d && y != t.tail.prev) {
g.lastIndex = k;
var w = g.exec(n);
if (!w) break;
var A = w.index + (h && w[1] ? w[1].length : 0),
P = w.index + w[0].length,
S = k;
for (S += y.value.length; S <= A;) {
y = y.next, S += y.value.length;
}
if (S -= y.value.length, k = S, y.value instanceof _) continue;
for (var O = y; O !== t.tail && (S < P || "string" == typeof O.value && !O.prev.value.greedy); O = O.next) {
x++, S += O.value.length;
}
x--, b = n.slice(k, S), w.index -= k;
} else {
g.lastIndex = 0;
var w = g.exec(b);
}
if (w) {
h && (v = w[1] ? w[1].length : 0);
var A = w.index + v,
w = w[0].slice(v),
P = A + w.length,
E = b.slice(0, A),
N = b.slice(P),
j = y.prev;
E && (j = M(t, j, E), k += E.length), W(t, j, x);
var L = new _(s, f ? C.tokenize(w, f) : w, p, w, d);
if (y = M(t, j, L), N && M(t, y, N), 1 < x && e(n, t, r, y.prev, k, !0, s + "," + c), i) break;
} else if (i) break;
}
}
}
}
}
}(e, a, n, a.head, 0), function (e) {
var n = [],
t = e.head.next;
for (; t !== e.tail;) {
n.push(t.value), t = t.next;
}
return n;
}(a);
},
hooks: {
all: {},
add: function add(e, n) {
var t = C.hooks.all;
t[e] = t[e] || [], t[e].push(n);
},
run: function run(e, n) {
var t = C.hooks.all[e];
if (t && t.length) for (var r, a = 0; r = t[a++];) {
r(n);
}
}
},
Token: _
};
function _(e, n, t, r, a) {
this.type = e, this.content = n, this.alias = t, this.length = 0 | (r || "").length, this.greedy = !!a;
}
function l() {
var e = {
value: null,
prev: null,
next: null
},
n = {
value: null,
prev: e,
next: null
};
e.next = n, this.head = e, this.tail = n, this.length = 0;
}
function M(e, n, t) {
var r = n.next,
a = {
value: t,
prev: n,
next: r
};
return n.next = a, r.prev = a, e.length++, a;
}
function W(e, n, t) {
for (var r = n.next, a = 0; a < t && r !== e.tail; a++) {
r = r.next;
}
(n.next = r).prev = n, e.length -= a;
}
if (u.Prism = C, _.stringify = function n(e, t) {
if ("string" == typeof e) return e;
if (Array.isArray(e)) {
var r = "";
return e.forEach(function (e) {
r += n(e, t);
}), r;
}
var a = {
type: e.type,
content: n(e.content, t),
tag: "span",
classes: ["token", e.type],
attributes: {},
language: t
},
l = e.alias;
l && (Array.isArray(l) ? Array.prototype.push.apply(a.classes, l) : a.classes.push(l)), C.hooks.run("wrap", a);
var i = "";
for (var o in a.attributes) {
i += " " + o + '="' + (a.attributes[o] || "").replace(/"/g, """) + '"';
}
return "<" + a.tag + ' class="' + a.classes.join(" ") + '"' + i + ">" + a.content + "" + a.tag + ">";
}, !u.document) return u.addEventListener && (C.disableWorkerMessageHandler || u.addEventListener("message", function (e) {
var n = JSON.parse(e.data),
t = n.language,
r = n.code,
a = n.immediateClose;
u.postMessage(C.highlight(r, C.languages[t], t)), a && u.close();
}, !1)), C;
var e = C.util.currentScript();
function t() {
C.manual || C.highlightAll();
}
if (e && (C.filename = e.src, e.hasAttribute("data-manual") && (C.manual = !0)), !C.manual) {
var r = document.readyState;
"loading" === r || "interactive" === r && e && e.defer ? document.addEventListener("DOMContentLoaded", t) : window.requestAnimationFrame ? window.requestAnimationFrame(t) : window.setTimeout(t, 16);
}
return C;
}(_self);
true && module.exports && (module.exports = Prism), "undefined" != typeof global && (global.Prism = Prism);
Prism.languages.markup = {
comment: //,
prolog: /<\?[\s\S]+?\?>/,
doctype: {
pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:(?!)*\]\s*)?>/i,
greedy: !0
},
cdata: //i,
tag: {
pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,
greedy: !0,
inside: {
tag: {
pattern: /^<\/?[^\s>\/]+/i,
inside: {
punctuation: /^<\/?/,
namespace: /^[^\s>\/:]+:/
}
},
"attr-value": {
pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,
inside: {
punctuation: [/^=/, {
pattern: /^(\s*)["']|["']$/,
lookbehind: !0
}]
}
},
punctuation: /\/?>/,
"attr-name": {
pattern: /[^\s>\/]+/,
inside: {
namespace: /^[^\s>\/:]+:/
}
}
}
},
entity: /?[\da-z]{1,8};/i
}, Prism.languages.markup.tag.inside["attr-value"].inside.entity = Prism.languages.markup.entity, Prism.hooks.add("wrap", function (a) {
"entity" === a.type && (a.attributes.title = a.content.replace(/&/, "&"));
}), Object.defineProperty(Prism.languages.markup.tag, "addInlined", {
value: function value(a, e) {
var s = {};
s["language-" + e] = {
pattern: /(^$)/i,
lookbehind: !0,
inside: Prism.languages[e]
}, s.cdata = /^$/i;
var n = {
"included-cdata": {
pattern: //i,
inside: s
}
};
n["language-" + e] = {
pattern: /[\s\S]+/,
inside: Prism.languages[e]
};
var t = {};
t[a] = {
pattern: RegExp("(<__[\\s\\S]*?>)(?:\\s*|[\\s\\S])*?(?=<\\/__>)".replace(/__/g, function () {
return a;
}), "i"),
lookbehind: !0,
greedy: !0,
inside: n
}, Prism.languages.insertBefore("markup", "cdata", t);
}
}), Prism.languages.xml = Prism.languages.extend("markup", {}), Prism.languages.html = Prism.languages.markup, Prism.languages.mathml = Prism.languages.markup, Prism.languages.svg = Prism.languages.markup;
!function (s) {
var e = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;
s.languages.css = {
comment: /\/\*[\s\S]*?\*\//,
atrule: {
pattern: /@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,
inside: {
rule: /^@[\w-]+/,
"selector-function-argument": {
pattern: /(\bselector\s*\((?!\s*\))\s*)(?:[^()]|\((?:[^()]|\([^()]*\))*\))+?(?=\s*\))/,
lookbehind: !0,
alias: "selector"
}
}
},
url: {
pattern: RegExp("url\\((?:" + e.source + "|[^\n\r()]*)\\)", "i"),
greedy: !0,
inside: {
"function": /^url/i,
punctuation: /^\(|\)$/
}
},
selector: RegExp("[^{}\\s](?:[^{};\"']|" + e.source + ")*?(?=\\s*\\{)"),
string: {
pattern: e,
greedy: !0
},
property: /[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,
important: /!important\b/i,
"function": /[-a-z0-9]+(?=\()/i,
punctuation: /[(){};:,]/
}, s.languages.css.atrule.inside.rest = s.languages.css;
var t = s.languages.markup;
t && (t.tag.addInlined("style", "css"), s.languages.insertBefore("inside", "attr-value", {
"style-attr": {
pattern: /\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,
inside: {
"attr-name": {
pattern: /^\s*style/i,
inside: t.tag.inside
},
punctuation: /^\s*=\s*['"]|['"]\s*$/,
"attr-value": {
pattern: /.+/i,
inside: s.languages.css
}
},
alias: "language-css"
}
}, t.tag));
}(Prism);
Prism.languages.clike = {
comment: [{
pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
lookbehind: !0
}, {
pattern: /(^|[^\\:])\/\/.*/,
lookbehind: !0,
greedy: !0
}],
string: {
pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
greedy: !0
},
"class-name": {
pattern: /(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,
lookbehind: !0,
inside: {
punctuation: /[.\\]/
}
},
keyword: /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,
"boolean": /\b(?:true|false)\b/,
"function": /\w+(?=\()/,
number: /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,
operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
punctuation: /[{}[\];(),.:]/
};
Prism.languages.javascript = Prism.languages.extend("clike", {
"class-name": [Prism.languages.clike["class-name"], {
pattern: /(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,
lookbehind: !0
}],
keyword: [{
pattern: /((?:^|})\s*)(?:catch|finally)\b/,
lookbehind: !0
}, {
pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
lookbehind: !0
}],
number: /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,
"function": /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
operator: /--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/
}), Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/, Prism.languages.insertBefore("javascript", "keyword", {
regex: {
pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*[\s\S]*?\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,
lookbehind: !0,
greedy: !0
},
"function-variable": {
pattern: /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,
alias: "function"
},
parameter: [{
pattern: /(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,
lookbehind: !0,
inside: Prism.languages.javascript
}, {
pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,
inside: Prism.languages.javascript
}, {
pattern: /(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,
lookbehind: !0,
inside: Prism.languages.javascript
}, {
pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,
lookbehind: !0,
inside: Prism.languages.javascript
}],
constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
}), Prism.languages.insertBefore("javascript", "string", {
"template-string": {
pattern: /`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,
greedy: !0,
inside: {
"template-punctuation": {
pattern: /^`|`$/,
alias: "string"
},
interpolation: {
pattern: /((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,
lookbehind: !0,
inside: {
"interpolation-punctuation": {
pattern: /^\${|}$/,
alias: "punctuation"
},
rest: Prism.languages.javascript
}
},
string: /[\s\S]+/
}
}
}), Prism.languages.markup && Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.js = Prism.languages.javascript;
!function (e) {
var t = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",
n = {
environment: {
pattern: RegExp("\\$" + t),
alias: "constant"
},
variable: [{
pattern: /\$?\(\([\s\S]+?\)\)/,
greedy: !0,
inside: {
variable: [{
pattern: /(^\$\(\([\s\S]+)\)\)/,
lookbehind: !0
}, /^\$\(\(/],
number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,
operator: /--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,
punctuation: /\(\(?|\)\)?|,|;/
}
}, {
pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,
greedy: !0,
inside: {
variable: /^\$\(|^`|\)$|`$/
}
}, {
pattern: /\$\{[^}]+\}/,
greedy: !0,
inside: {
operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,
punctuation: /[\[\]]/,
environment: {
pattern: RegExp("(\\{)" + t),
lookbehind: !0,
alias: "constant"
}
}
}, /\$(?:\w+|[#?*!@$])/],
entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/
};
e.languages.bash = {
shebang: {
pattern: /^#!\s*\/.*/,
alias: "important"
},
comment: {
pattern: /(^|[^"{\\$])#.*/,
lookbehind: !0
},
"function-name": [{
pattern: /(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,
lookbehind: !0,
alias: "function"
}, {
pattern: /\b\w+(?=\s*\(\s*\)\s*\{)/,
alias: "function"
}],
"for-or-select": {
pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/,
alias: "variable",
lookbehind: !0
},
"assign-left": {
pattern: /(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,
inside: {
environment: {
pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + t),
lookbehind: !0,
alias: "constant"
}
},
alias: "variable",
lookbehind: !0
},
string: [{
pattern: /((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\2/,
lookbehind: !0,
greedy: !0,
inside: n
}, {
pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\3/,
lookbehind: !0,
greedy: !0
}, {
pattern: /(^|[^\\](?:\\\\)*)(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\2)[^\\])*\2/,
lookbehind: !0,
greedy: !0,
inside: n
}],
environment: {
pattern: RegExp("\\$?" + t),
alias: "constant"
},
variable: n.variable,
"function": {
pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,
lookbehind: !0
},
keyword: {
pattern: /(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,
lookbehind: !0
},
builtin: {
pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,
lookbehind: !0,
alias: "class-name"
},
"boolean": {
pattern: /(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,
lookbehind: !0
},
"file-descriptor": {
pattern: /\B&\d\b/,
alias: "important"
},
operator: {
pattern: /\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,
inside: {
"file-descriptor": {
pattern: /^\d/,
alias: "important"
}
}
},
punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,
number: {
pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,
lookbehind: !0
}
};
for (var a = ["comment", "function-name", "for-or-select", "assign-left", "string", "environment", "function", "keyword", "builtin", "boolean", "file-descriptor", "operator", "punctuation", "number"], r = n.variable[1].inside, s = 0; s < a.length; s++) {
r[a[s]] = e.languages.bash[a[s]];
}
e.languages.shell = e.languages.bash;
}(Prism);
Prism.languages.c = Prism.languages.extend("clike", {
comment: {
pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,
greedy: !0
},
"class-name": {
pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+/,
lookbehind: !0
},
keyword: /\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,
"function": /[a-z_]\w*(?=\s*\()/i,
operator: />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,
number: /(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i
}), Prism.languages.insertBefore("c", "string", {
macro: {
pattern: /(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,
lookbehind: !0,
alias: "property",
inside: {
string: {
pattern: /(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,
lookbehind: !0
},
directive: {
pattern: /(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,
lookbehind: !0,
alias: "keyword"
}
}
},
constant: /\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/
}), delete Prism.languages.c["boolean"];
!function (s) {
function a(e, s) {
return e.replace(/<<(\d+)>>/g, function (e, n) {
return "(?:" + s[+n] + ")";
});
}
function t(e, n, s) {
return RegExp(a(e, n), s || "");
}
function e(e, n) {
for (var s = 0; s < n; s++) {
e = e.replace(/<>/g, function () {
return "(?:" + e + ")";
});
}
return e.replace(/<>/g, "[^\\s\\S]");
}
var n = "bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",
i = "class enum interface struct",
r = "add alias ascending async await by descending from get global group into join let nameof notnull on orderby partial remove select set unmanaged value when where where",
o = "abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";
function l(e) {
return "\\b(?:" + e.trim().replace(/ /g, "|") + ")\\b";
}
var d = l(i),
p = RegExp(l(n + " " + i + " " + r + " " + o)),
c = l(i + " " + r + " " + o),
u = l(n + " " + i + " " + o),
g = e("<(?:[^<>;=+\\-*/%&|^]|<>)*>", 2),
b = e("\\((?:[^()]|<>)*\\)", 2),
h = "@?\\b[A-Za-z_]\\w*\\b",
f = a("<<0>>(?:\\s*<<1>>)?", [h, g]),
m = a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*", [c, f]),
k = "\\[\\s*(?:,\\s*)*\\]",
y = a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?", [a("\\(<<0>>+(?:,<<0>>+)+\\)", [a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>", [g, b, k])]), m, k]),
w = {
keyword: p,
punctuation: /[<>()?,.:[\]]/
},
v = "'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",
x = '"(?:\\\\.|[^\\\\"\r\n])*"';
s.languages.csharp = s.languages.extend("clike", {
string: [{
pattern: t("(^|[^$\\\\])<<0>>", ['@"(?:""|\\\\[\\s\\S]|[^\\\\"])*"(?!")']),
lookbehind: !0,
greedy: !0
}, {
pattern: t("(^|[^@$\\\\])<<0>>", [x]),
lookbehind: !0,
greedy: !0
}, {
pattern: RegExp(v),
greedy: !0,
alias: "character"
}],
"class-name": [{
pattern: t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)", [m]),
lookbehind: !0,
inside: w
}, {
pattern: t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)", [h, y]),
lookbehind: !0,
inside: w
}, {
pattern: t("(\\busing\\s+)<<0>>(?=\\s*=)", [h]),
lookbehind: !0
}, {
pattern: t("(\\b<<0>>\\s+)<<1>>", [d, f]),
lookbehind: !0,
inside: w
}, {
pattern: t("(\\bcatch\\s*\\(\\s*)<<0>>", [m]),
lookbehind: !0,
inside: w
}, {
pattern: t("(\\bwhere\\s+)<<0>>", [h]),
lookbehind: !0
}, {
pattern: t("(\\b(?:is|as)\\s+)<<0>>", [y]),
lookbehind: !0,
inside: w
}, {
pattern: t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+in))", [y, u, h]),
inside: w
}],
keyword: p,
number: /(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,
operator: />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,
punctuation: /\?\.?|::|[{}[\];(),.:]/
}), s.languages.insertBefore("csharp", "number", {
range: {
pattern: /\.\./,
alias: "operator"
}
}), s.languages.insertBefore("csharp", "punctuation", {
"named-parameter": {
pattern: t("([(,]\\s*)<<0>>(?=\\s*:)", [h]),
lookbehind: !0,
alias: "punctuation"
}
}), s.languages.insertBefore("csharp", "class-name", {
namespace: {
pattern: t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])", [h]),
lookbehind: !0,
inside: {
punctuation: /\./
}
},
"type-expression": {
pattern: t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*)(?:[^()\\s]|\\s(?!\\s*\\))|<<0>>)*(?=\\s*\\))", [b]),
lookbehind: !0,
alias: "class-name",
inside: w
},
"return-type": {
pattern: t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))", [y, m]),
inside: w,
alias: "class-name"
},
"constructor-invocation": {
pattern: t("(\\bnew\\s+)<<0>>(?=\\s*[[({])", [y]),
lookbehind: !0,
inside: w,
alias: "class-name"
},
"generic-method": {
pattern: t("<<0>>\\s*<<1>>(?=\\s*\\()", [h, g]),
inside: {
"function": t("^<<0>>", [h]),
generic: {
pattern: RegExp(g),
alias: "class-name",
inside: w
}
}
},
"type-list": {
pattern: t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))", [d, f, h, y, p.source]),
lookbehind: !0,
inside: {
keyword: p,
"class-name": {
pattern: RegExp(y),
greedy: !0,
inside: w
},
punctuation: /,/
}
},
preprocessor: {
pattern: /(^\s*)#.*/m,
lookbehind: !0,
alias: "property",
inside: {
directive: {
pattern: /(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,
lookbehind: !0,
alias: "keyword"
}
}
}
});
var $ = x + "|" + v,
_ = a("\\/(?![*/])|\\/\\/[^\r\n]*[\r\n]|\\/\\*[\\s\\S]*?\\*\\/|<<0>>", [$]),
B = e(a("[^\"'/()]|<<0>>|\\(<>*\\)", [_]), 2),
E = "\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",
R = a("<<0>>(?:\\s*\\(<<1>>*\\))?", [m, B]);
s.languages.insertBefore("csharp", "class-name", {
attribute: {
pattern: t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])", [E, R]),
lookbehind: !0,
greedy: !0,
inside: {
target: {
pattern: t("^<<0>>(?=\\s*:)", [E]),
alias: "keyword"
},
"attribute-arguments": {
pattern: t("\\(<<0>>*\\)", [B]),
inside: s.languages.csharp
},
"class-name": {
pattern: RegExp(m),
inside: {
punctuation: /\./
}
},
punctuation: /[:,]/
}
}
});
var S = ":[^}\r\n]+",
P = e(a("[^\"'/()]|<<0>>|\\(<>*\\)", [_]), 2),
z = a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}", [P, S]),
j = e(a("[^\"'/()]|\\/(?!\\*)|\\/\\*.*?\\*\\/|<<0>>|\\(<>*\\)", [$]), 2),
A = a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}", [j, S]);
function F(e, n) {
return {
interpolation: {
pattern: t("([^{](?:\\{\\{)*)<<0>>", [e]),
lookbehind: !0,
inside: {
"format-string": {
pattern: t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)", [n, S]),
lookbehind: !0,
inside: {
punctuation: /^:/
}
},
punctuation: /^\{|\}$/,
expression: {
pattern: /[\s\S]+/,
alias: "language-csharp",
inside: s.languages.csharp
}
}
},
string: /[\s\S]+/
};
}
s.languages.insertBefore("csharp", "string", {
"interpolation-string": [{
pattern: t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[\\s\\S]|\\{\\{|<<0>>|[^\\\\{"])*"', [z]),
lookbehind: !0,
greedy: !0,
inside: F(z, P)
}, {
pattern: t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"', [A]),
lookbehind: !0,
greedy: !0,
inside: F(A, j)
}]
});
}(Prism), Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp;
Prism.languages.git = {
comment: /^#.*/m,
deleted: /^[-–].*/m,
inserted: /^\+.*/m,
string: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/m,
command: {
pattern: /^.*\$ git .*$/m,
inside: {
parameter: /\s--?\w+/m
}
},
coord: /^@@.*@@$/m,
commit_sha1: /^commit \w{40}$/m
};
Prism.languages.groovy = Prism.languages.extend("clike", {
string: [{
pattern: /("""|''')(?:[^\\]|\\[\s\S])*?\1|\$\/(?:\$\/\$|[\s\S])*?\/\$/,
greedy: !0
}, {
pattern: /(["'/])(?:\\.|(?!\1)[^\\\r\n])*\1/,
greedy: !0
}],
keyword: /\b(?:as|def|in|abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,
number: /\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?[\d]+)?)[glidf]?\b/i,
operator: {
pattern: /(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,
lookbehind: !0
},
punctuation: /\.+|[{}[\];(),.:$]/
}), Prism.languages.insertBefore("groovy", "string", {
shebang: {
pattern: /#!.+/,
alias: "comment"
}
}), Prism.languages.insertBefore("groovy", "punctuation", {
"spock-block": /\b(?:setup|given|when|then|and|cleanup|expect|where):/
}), Prism.languages.insertBefore("groovy", "function", {
annotation: {
pattern: /(^|[^.])@\w+/,
lookbehind: !0,
alias: "punctuation"
}
}), Prism.hooks.add("wrap", function (e) {
if ("groovy" === e.language && "string" === e.type) {
var t = e.content[0];
if ("'" != t) {
var n = /([^\\])(?:\$(?:\{.*?\}|[\w.]+))/;
"$" === t && (n = /([^\$])(?:\$(?:\{.*?\}|[\w.]+))/), e.content = e.content.replace(/</g, "<").replace(/&/g, "&"), e.content = Prism.highlight(e.content, {
expression: {
pattern: n,
lookbehind: !0,
inside: Prism.languages.groovy
}
}), e.classes.push("/" === t ? "regex" : "gstring");
}
}
});
!function (e) {
var t = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|null|open|opens|package|private|protected|provides|public|record|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,
a = /\b[A-Z](?:\w*[a-z]\w*)?\b/;
e.languages.java = e.languages.extend("clike", {
"class-name": [a, /\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/],
keyword: t,
"function": [e.languages.clike["function"], {
pattern: /(\:\:)[a-z_]\w*/,
lookbehind: !0
}],
number: /\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,
operator: {
pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,
lookbehind: !0
}
}), e.languages.insertBefore("java", "string", {
"triple-quoted-string": {
pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,
greedy: !0,
alias: "string"
}
}), e.languages.insertBefore("java", "class-name", {
annotation: {
alias: "punctuation",
pattern: /(^|[^.])@\w+/,
lookbehind: !0
},
namespace: {
pattern: /(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)[a-z]\w*(?:\.[a-z]\w*)+/,
lookbehind: !0,
inside: {
punctuation: /\./
}
},
generics: {
pattern: /<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,
inside: {
"class-name": a,
keyword: t,
punctuation: /[<>(),.:]/,
operator: /[?&|]/
}
}
});
}(Prism);
Prism.languages.json = {
property: {
pattern: /"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
greedy: !0
},
string: {
pattern: /"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
greedy: !0
},
comment: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
number: /-?\d+\.?\d*(?:e[+-]?\d+)?/i,
punctuation: /[{}[\],]/,
operator: /:/,
"boolean": /\b(?:true|false)\b/,
"null": {
pattern: /\bnull\b/,
alias: "keyword"
}
};
!function (e) {
e.languages.kotlin = e.languages.extend("clike", {
keyword: {
pattern: /(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,
lookbehind: !0
},
"function": [/\w+(?=\s*\()/, {
pattern: /(\.)\w+(?=\s*\{)/,
lookbehind: !0
}],
number: /\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,
operator: /\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/
}), delete e.languages.kotlin["class-name"], e.languages.insertBefore("kotlin", "string", {
"raw-string": {
pattern: /("""|''')[\s\S]*?\1/,
alias: "string"
}
}), e.languages.insertBefore("kotlin", "keyword", {
annotation: {
pattern: /\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,
alias: "builtin"
}
}), e.languages.insertBefore("kotlin", "function", {
label: {
pattern: /\w+@|@\w+/,
alias: "symbol"
}
});
var n = [{
pattern: /\$\{[^}]+\}/,
inside: {
delimiter: {
pattern: /^\$\{|\}$/,
alias: "variable"
},
rest: e.languages.kotlin
}
}, {
pattern: /\$\w+/,
alias: "variable"
}];
e.languages.kotlin.string.inside = e.languages.kotlin["raw-string"].inside = {
interpolation: n
};
}(Prism);
!function (h) {
function v(e, n) {
return "___" + e.toUpperCase() + n + "___";
}
Object.defineProperties(h.languages["markup-templating"] = {}, {
buildPlaceholders: {
value: function value(a, r, e, o) {
if (a.language === r) {
var c = a.tokenStack = [];
a.code = a.code.replace(e, function (e) {
if ("function" == typeof o && !o(e)) return e;
for (var n, t = c.length; -1 !== a.code.indexOf(n = v(r, t));) {
++t;
}
return c[t] = e, n;
}), a.grammar = h.languages.markup;
}
}
},
tokenizePlaceholders: {
value: function value(p, k) {
if (p.language === k && p.tokenStack) {
p.grammar = h.languages[k];
var m = 0,
d = Object.keys(p.tokenStack);
!function e(n) {
for (var t = 0; t < n.length && !(m >= d.length); t++) {
var a = n[t];
if ("string" == typeof a || a.content && "string" == typeof a.content) {
var r = d[m],
o = p.tokenStack[r],
c = "string" == typeof a ? a : a.content,
i = v(k, r),
u = c.indexOf(i);
if (-1 < u) {
++m;
var g = c.substring(0, u),
l = new h.Token(k, h.tokenize(o, p.grammar), "language-" + k, o),
s = c.substring(u + i.length),
f = [];
g && f.push.apply(f, e([g])), f.push(l), s && f.push.apply(f, e([s])), "string" == typeof a ? n.splice.apply(n, [t, 1].concat(f)) : a.content = f;
}
} else a.content && e(a.content);
}
return n;
}(p.tokens);
}
}
}
});
}(Prism);
Prism.languages.objectivec = Prism.languages.extend("c", {
keyword: /\b(?:asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while|in|self|super)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,
string: /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|@"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
operator: /-[->]?|\+\+?|!=?|<=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/
}), delete Prism.languages.objectivec["class-name"];
!function (n) {
n.languages.php = n.languages.extend("clike", {
keyword: /\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,
"boolean": {
pattern: /\b(?:false|true)\b/i,
alias: "constant"
},
constant: [/\b[A-Z_][A-Z0-9_]*\b/, /\b(?:null)\b/i],
comment: {
pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,
lookbehind: !0
}
}), n.languages.insertBefore("php", "string", {
"shell-comment": {
pattern: /(^|[^\\])#.*/,
lookbehind: !0,
alias: "comment"
}
}), n.languages.insertBefore("php", "comment", {
delimiter: {
pattern: /\?>$|^<\?(?:php(?=\s)|=)?/i,
alias: "important"
}
}), n.languages.insertBefore("php", "keyword", {
variable: /\$+(?:\w+\b|(?={))/i,
"package": {
pattern: /(\\|namespace\s+|use\s+)[\w\\]+/,
lookbehind: !0,
inside: {
punctuation: /\\/
}
}
}), n.languages.insertBefore("php", "operator", {
property: {
pattern: /(->)[\w]+/,
lookbehind: !0
}
});
var e = {
pattern: /{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,
lookbehind: !0,
inside: n.languages.php
};
n.languages.insertBefore("php", "string", {
"nowdoc-string": {
pattern: /<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,
greedy: !0,
alias: "string",
inside: {
delimiter: {
pattern: /^<<<'[^']+'|[a-z_]\w*;$/i,
alias: "symbol",
inside: {
punctuation: /^<<<'?|[';]$/
}
}
}
},
"heredoc-string": {
pattern: /<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,
greedy: !0,
alias: "string",
inside: {
delimiter: {
pattern: /^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,
alias: "symbol",
inside: {
punctuation: /^<<<"?|[";]$/
}
},
interpolation: e
}
},
"single-quoted-string": {
pattern: /'(?:\\[\s\S]|[^\\'])*'/,
greedy: !0,
alias: "string"
},
"double-quoted-string": {
pattern: /"(?:\\[\s\S]|[^\\"])*"/,
greedy: !0,
alias: "string",
inside: {
interpolation: e
}
}
}), delete n.languages.php.string, n.hooks.add("before-tokenize", function (e) {
if (/<\?/.test(e.code)) {
n.languages["markup-templating"].buildPlaceholders(e, "php", /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi);
}
}), n.hooks.add("after-tokenize", function (e) {
n.languages["markup-templating"].tokenizePlaceholders(e, "php");
});
}(Prism);
Prism.languages.python = {
comment: {
pattern: /(^|[^\\])#.*/,
lookbehind: !0
},
"string-interpolation": {
pattern: /(?:f|rf|fr)(?:("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,
greedy: !0,
inside: {
interpolation: {
pattern: /((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,
lookbehind: !0,
inside: {
"format-spec": {
pattern: /(:)[^:(){}]+(?=}$)/,
lookbehind: !0
},
"conversion-option": {
pattern: //,
alias: "punctuation"
},
rest: null
}
},
string: /[\s\S]+/
}
},
"triple-quoted-string": {
pattern: /(?:[rub]|rb|br)?("""|''')[\s\S]+?\1/i,
greedy: !0,
alias: "string"
},
string: {
pattern: /(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,
greedy: !0
},
"function": {
pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,
lookbehind: !0
},
"class-name": {
pattern: /(\bclass\s+)\w+/i,
lookbehind: !0
},
decorator: {
pattern: /(^\s*)@\w+(?:\.\w+)*/im,
lookbehind: !0,
alias: ["annotation", "punctuation"],
inside: {
punctuation: /\./
}
},
keyword: /\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
"boolean": /\b(?:True|False|None)\b/,
number: /(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,
operator: /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
punctuation: /[{}[\];(),.:]/
}, Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest = Prism.languages.python, Prism.languages.py = Prism.languages.python;
!function (e) {
e.languages.ruby = e.languages.extend("clike", {
comment: [/#.*/, {
pattern: /^=begin\s[\s\S]*?^=end/m,
greedy: !0
}],
"class-name": {
pattern: /(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,
lookbehind: !0,
inside: {
punctuation: /[.\\]/
}
},
keyword: /\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/
});
var n = {
pattern: /#\{[^}]+\}/,
inside: {
delimiter: {
pattern: /^#\{|\}$/,
alias: "tag"
},
rest: e.languages.ruby
}
};
delete e.languages.ruby["function"], e.languages.insertBefore("ruby", "keyword", {
regex: [{
pattern: /%r([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/,
greedy: !0,
inside: {
interpolation: n
}
}, {
pattern: /%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,
greedy: !0,
inside: {
interpolation: n
}
}, {
pattern: /%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,
greedy: !0,
inside: {
interpolation: n
}
}, {
pattern: /%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,
greedy: !0,
inside: {
interpolation: n
}
}, {
pattern: /%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,
greedy: !0,
inside: {
interpolation: n
}
}, {
pattern: /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})]))/,
lookbehind: !0,
greedy: !0
}],
variable: /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,
symbol: {
pattern: /(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,
lookbehind: !0
},
"method-definition": {
pattern: /(\bdef\s+)[\w.]+/,
lookbehind: !0,
inside: {
"function": /\w+$/,
rest: e.languages.ruby
}
}
}), e.languages.insertBefore("ruby", "number", {
builtin: /\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,
constant: /\b[A-Z]\w*(?:[?!]|\b)/
}), e.languages.ruby.string = [{
pattern: /%[qQiIwWxs]?([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,
greedy: !0,
inside: {
interpolation: n
}
}, {
pattern: /%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,
greedy: !0,
inside: {
interpolation: n
}
}, {
pattern: /%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,
greedy: !0,
inside: {
interpolation: n
}
}, {
pattern: /%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,
greedy: !0,
inside: {
interpolation: n
}
}, {
pattern: /%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,
greedy: !0,
inside: {
interpolation: n
}
}, {
pattern: /("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
greedy: !0,
inside: {
interpolation: n
}
}], e.languages.rb = e.languages.ruby;
}(Prism);
Prism.languages.swift = Prism.languages.extend("clike", {
string: {
pattern: /("|')(?:\\(?:\((?:[^()]|\([^)]+\))+\)|\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
greedy: !0,
inside: {
interpolation: {
pattern: /\\\((?:[^()]|\([^)]+\))+\)/,
inside: {
delimiter: {
pattern: /^\\\(|\)$/,
alias: "variable"
}
}
}
}
},
keyword: /\b(?:as|associativity|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic(?:Type)?|else|enum|extension|fallthrough|final|for|func|get|guard|if|import|in|infix|init|inout|internal|is|lazy|left|let|mutating|new|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|Self|set|static|struct|subscript|super|switch|throws?|try|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|__(?:COLUMN__|FILE__|FUNCTION__|LINE__))\b/,
number: /\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,
constant: /\b(?:nil|[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,
atrule: /@\b(?:IB(?:Outlet|Designable|Action|Inspectable)|class_protocol|exported|noreturn|NS(?:Copying|Managed)|objc|UIApplicationMain|auto_closure)\b/,
builtin: /\b(?:[A-Z]\S+|abs|advance|alignof(?:Value)?|assert|contains|count(?:Elements)?|debugPrint(?:ln)?|distance|drop(?:First|Last)|dump|enumerate|equal|filter|find|first|getVaList|indices|isEmpty|join|last|lexicographicalCompare|map|max(?:Element)?|min(?:Element)?|numericCast|overlaps|partition|print(?:ln)?|reduce|reflect|reverse|sizeof(?:Value)?|sort(?:ed)?|split|startsWith|stride(?:of(?:Value)?)?|suffix|swap|toDebugString|toString|transcode|underestimateCount|unsafeBitCast|with(?:ExtendedLifetime|Unsafe(?:MutablePointers?|Pointers?)|VaList))\b/
}), Prism.languages.swift.string.inside.interpolation.inside.rest = Prism.languages.swift;
!function () {
if ("undefined" != typeof self && self.Prism && self.document && document.querySelector) {
var t,
n = function n() {
if (void 0 === t) {
var e = document.createElement("div");
e.style.fontSize = "13px", e.style.lineHeight = "1.5", e.style.padding = 0, e.style.border = 0, e.innerHTML = "
", document.body.appendChild(e), t = 38 === e.offsetHeight, document.body.removeChild(e);
}
return t;
},
a = 0;
Prism.hooks.add("before-sanity-check", function (e) {
var t = e.element.parentNode,
n = t && t.getAttribute("data-line");
if (t && n && /pre/i.test(t.nodeName)) {
var i = 0;
r(".line-highlight", t).forEach(function (e) {
i += e.textContent.length, e.parentNode.removeChild(e);
}), i && /^( \n)+$/.test(e.code.slice(-i)) && (e.code = e.code.slice(0, -i));
}
}), Prism.hooks.add("complete", function e(t) {
var n = t.element.parentNode,
i = n && n.getAttribute("data-line");
if (n && i && /pre/i.test(n.nodeName)) {
clearTimeout(a);
var r = Prism.plugins.lineNumbers,
o = t.plugins && t.plugins.lineNumbers;
if (l(n, "line-numbers") && r && !o) Prism.hooks.add("line-numbers", e);else s(n, i)(), a = setTimeout(u, 1);
}
}), window.addEventListener("hashchange", u), window.addEventListener("resize", function () {
var t = [];
r("pre[data-line]").forEach(function (e) {
t.push(s(e));
}), t.forEach(i);
});
}
function r(e, t) {
return Array.prototype.slice.call((t || document).querySelectorAll(e));
}
function l(e, t) {
return t = " " + t + " ", -1 < (" " + e.className + " ").replace(/[\n\t]/g, " ").indexOf(t);
}
function i(e) {
e();
}
function s(u, e, d) {
var t = (e = "string" == typeof e ? e : u.getAttribute("data-line")).replace(/\s+/g, "").split(","),
c = +u.getAttribute("data-line-offset") || 0,
f = (n() ? parseInt : parseFloat)(getComputedStyle(u).lineHeight),
h = l(u, "line-numbers"),
p = h ? u : u.querySelector("code") || u,
m = [];
return t.forEach(function (e) {
var t = e.split("-"),
n = +t[0],
i = +t[1] || n,
r = u.querySelector('.line-highlight[data-range="' + e + '"]') || document.createElement("div");
if (m.push(function () {
r.setAttribute("aria-hidden", "true"), r.setAttribute("data-range", e), r.className = (d || "") + " line-highlight";
}), h && Prism.plugins.lineNumbers) {
var o = Prism.plugins.lineNumbers.getLine(u, n),
a = Prism.plugins.lineNumbers.getLine(u, i);
if (o) {
var l = o.offsetTop + "px";
m.push(function () {
r.style.top = l;
});
}
if (a) {
var s = a.offsetTop - o.offsetTop + a.offsetHeight + "px";
m.push(function () {
r.style.height = s;
});
}
} else m.push(function () {
r.setAttribute("data-start", n), n < i && r.setAttribute("data-end", i), r.style.top = (n - c - 1) * f + "px", r.textContent = new Array(i - n + 2).join(" \n");
});
m.push(function () {
p.appendChild(r);
});
}), function () {
m.forEach(i);
};
}
function u() {
var e = location.hash.slice(1);
r(".temporary.line-highlight").forEach(function (e) {
e.parentNode.removeChild(e);
});
var t = (e.match(/\.([\d,-]+)$/) || [, ""])[1];
if (t && !document.getElementById(e)) {
var n = e.slice(0, e.lastIndexOf(".")),
i = document.getElementById(n);
if (i) i.hasAttribute("data-line") || i.setAttribute("data-line", ""), s(i, t, "temporary ")(), document.querySelector(".temporary.line-highlight").scrollIntoView();
}
}
}();
!function () {
if ("undefined" != typeof self && self.Prism && self.document) {
var l = "line-numbers",
c = /\n(?!$)/g,
m = function m(e) {
var t = a(e)["white-space"];
if ("pre-wrap" === t || "pre-line" === t) {
var n = e.querySelector("code"),
r = e.querySelector(".line-numbers-rows"),
s = e.querySelector(".line-numbers-sizer"),
i = n.textContent.split(c);
s || ((s = document.createElement("span")).className = "line-numbers-sizer", n.appendChild(s)), s.style.display = "block", i.forEach(function (e, t) {
s.textContent = e || "\n";
var n = s.getBoundingClientRect().height;
r.children[t].style.height = n + "px";
}), s.textContent = "", s.style.display = "none";
}
},
a = function a(e) {
return e ? window.getComputedStyle ? getComputedStyle(e) : e.currentStyle || null : null;
};
window.addEventListener("resize", function () {
Array.prototype.forEach.call(document.querySelectorAll("pre." + l), m);
}), Prism.hooks.add("complete", function (e) {
if (e.code) {
var t = e.element,
n = t.parentNode;
if (n && /pre/i.test(n.nodeName) && !t.querySelector(".line-numbers-rows")) {
for (var r = !1, s = /(?:^|\s)line-numbers(?:\s|$)/, i = t; i; i = i.parentNode) {
if (s.test(i.className)) {
r = !0;
break;
}
}
if (r) {
t.className = t.className.replace(s, " "), s.test(n.className) || (n.className += " line-numbers");
var l,
a = e.code.match(c),
o = a ? a.length + 1 : 1,
u = new Array(o + 1).join("");
(l = document.createElement("span")).setAttribute("aria-hidden", "true"), l.className = "line-numbers-rows", l.innerHTML = u, n.hasAttribute("data-start") && (n.style.counterReset = "linenumber " + (parseInt(n.getAttribute("data-start"), 10) - 1)), e.element.appendChild(l), m(n), Prism.hooks.run("line-numbers", e);
}
}
}
}), Prism.hooks.add("line-numbers", function (e) {
e.plugins = e.plugins || {}, e.plugins.lineNumbers = !0;
}), Prism.plugins.lineNumbers = {
getLine: function getLine(e, t) {
if ("PRE" === e.tagName && e.classList.contains(l)) {
var n = e.querySelector(".line-numbers-rows"),
r = parseInt(e.getAttribute("data-start"), 10) || 1,
s = r + (n.children.length - 1);
t < r && (t = r), s < t && (t = s);
var i = t - r;
return n.children[i];
}
},
resize: function resize(e) {
m(e);
}
};
}
}();
"undefined" != typeof self && self.Prism && self.document && document.createRange && (Prism.plugins.KeepMarkup = !0, Prism.hooks.add("before-highlight", function (e) {
if (e.element.children.length) {
var a = 0,
s = [],
l = function l(e, n) {
var o = {};
n || (o.clone = e.cloneNode(!1), o.posOpen = a, s.push(o));
for (var t = 0, d = e.childNodes.length; t < d; t++) {
var r = e.childNodes[t];
1 === r.nodeType ? l(r) : 3 === r.nodeType && (a += r.data.length);
}
n || (o.posClose = a);
};
l(e.element, !0), s && s.length && (e.keepMarkup = s);
}
}), Prism.hooks.add("after-highlight", function (n) {
if (n.keepMarkup && n.keepMarkup.length) {
var a = function a(e, n) {
for (var o = 0, t = e.childNodes.length; o < t; o++) {
var d = e.childNodes[o];
if (1 === d.nodeType) {
if (!a(d, n)) return !1;
} else 3 === d.nodeType && (!n.nodeStart && n.pos + d.data.length > n.node.posOpen && (n.nodeStart = d, n.nodeStartPos = n.node.posOpen - n.pos), n.nodeStart && n.pos + d.data.length >= n.node.posClose && (n.nodeEnd = d, n.nodeEndPos = n.node.posClose - n.pos), n.pos += d.data.length);
if (n.nodeStart && n.nodeEnd) {
var r = document.createRange();
return r.setStart(n.nodeStart, n.nodeStartPos), r.setEnd(n.nodeEnd, n.nodeEndPos), n.node.clone.appendChild(r.extractContents()), r.insertNode(n.node.clone), r.detach(), !1;
}
}
return !0;
};
n.keepMarkup.forEach(function (e) {
a(n.element, {
node: e,
pos: 0
});
}), n.highlightedCode = n.element.innerHTML;
}
}));
!function () {
if ("undefined" != typeof self && self.Prism && self.document) {
var f = /(?:^|\s)command-line(?:\s|$)/;
Prism.hooks.add("before-highlight", function (e) {
var t = e.vars = e.vars || {},
a = t["command-line"] = t["command-line"] || {};
if (!a.complete && e.code) {
var n = e.element.parentNode;
if (n && /pre/i.test(n.nodeName) && (f.test(n.className) || f.test(e.element.className))) {
var r = e.element.querySelector(".command-line-prompt");
r && r.remove();
var s = e.code.split("\n");
a.numberOfLines = s.length;
var o = a.outputLines = [],
i = n.getAttribute("data-output"),
l = n.getAttribute("data-filter-output");
if (i || "" === i) {
i = i.split(",");
for (var m = 0; m < i.length; m++) {
var d = i[m].split("-"),
p = parseInt(d[0], 10),
c = 2 === d.length ? parseInt(d[1], 10) : p;
if (!isNaN(p) && !isNaN(c)) {
p < 1 && (p = 1), c > s.length && (c = s.length), c--;
for (var u = --p; u <= c; u++) {
o[u] = s[u], s[u] = "";
}
}
}
} else if (l) for (m = 0; m < s.length; m++) {
0 === s[m].indexOf(l) && (o[m] = s[m].slice(l.length), s[m] = "");
}
e.code = s.join("\n");
} else a.complete = !0;
} else a.complete = !0;
}), Prism.hooks.add("before-insert", function (e) {
var t = e.vars = e.vars || {},
a = t["command-line"] = t["command-line"] || {};
if (!a.complete) {
for (var n = e.highlightedCode.split("\n"), r = 0, s = (a.outputLines || []).length; r < s; r++) {
a.outputLines.hasOwnProperty(r) && (n[r] = a.outputLines[r]);
}
e.highlightedCode = n.join("\n");
}
}), Prism.hooks.add("complete", function (e) {
var t = e.vars = e.vars || {},
a = t["command-line"] = t["command-line"] || {};
if (!a.complete) {
var n = e.element.parentNode;
f.test(e.element.className) && (e.element.className = e.element.className.replace(f, " ")), f.test(n.className) || (n.className += " command-line");
var r = function r(e, t) {
return (n.getAttribute(e) || t).replace(/"/g, """);
},
s = new Array((a.numberOfLines || 0) + 1),
o = r("data-prompt", "");
if ("" !== o) s = s.join('');else {
var i = r("data-user", "user"),
l = r("data-host", "localhost");
s = s.join('');
}
var m = document.createElement("span");
m.className = "command-line-prompt", m.innerHTML = s;
for (var d = 0, p = (a.outputLines || []).length; d < p; d++) {
if (a.outputLines.hasOwnProperty(d)) {
var c = m.children[d];
c.removeAttribute("data-user"), c.removeAttribute("data-host"), c.removeAttribute("data-prompt");
}
}
e.element.insertBefore(m, e.element.firstChild), a.complete = !0;
}
});
}
}();
!function () {
if ("undefined" != typeof self && self.Prism && self.document) {
var i = [],
l = {},
c = function c() {};
Prism.plugins.toolbar = {};
var e = Prism.plugins.toolbar.registerButton = function (e, n) {
var t;
t = "function" == typeof n ? n : function (e) {
var t;
return "function" == typeof n.onClick ? ((t = document.createElement("button")).type = "button", t.addEventListener("click", function () {
n.onClick.call(this, e);
})) : "string" == typeof n.url ? (t = document.createElement("a")).href = n.url : t = document.createElement("span"), n.className && t.classList.add(n.className), t.textContent = n.text, t;
}, e in l ? console.warn('There is a button with the key "' + e + '" registered already.') : i.push(l[e] = t);
},
t = Prism.plugins.toolbar.hook = function (a) {
var e = a.element.parentNode;
if (e && /pre/i.test(e.nodeName) && !e.parentNode.classList.contains("code-toolbar")) {
var t = document.createElement("div");
t.classList.add("code-toolbar"), e.parentNode.insertBefore(t, e), t.appendChild(e);
var r = document.createElement("div");
r.classList.add("toolbar");
var n = i,
o = function (e) {
for (; e;) {
var t = e.getAttribute("data-toolbar-order");
if (null != t) return (t = t.trim()).length ? t.split(/\s*,\s*/g) : [];
e = e.parentElement;
}
}(a.element);
o && (n = o.map(function (e) {
return l[e] || c;
})), n.forEach(function (e) {
var t = e(a);
if (t) {
var n = document.createElement("div");
n.classList.add("toolbar-item"), n.appendChild(t), r.appendChild(n);
}
}), t.appendChild(r);
}
};
e("label", function (e) {
var t = e.element.parentNode;
if (t && /pre/i.test(t.nodeName) && t.hasAttribute("data-label")) {
var n,
a,
r = t.getAttribute("data-label");
try {
a = document.querySelector("template#" + r);
} catch (e) {}
return a ? n = a.content : (t.hasAttribute("data-url") ? (n = document.createElement("a")).href = t.getAttribute("data-url") : n = document.createElement("span"), n.textContent = r), n;
}
}), Prism.hooks.add("complete", t);
}
}();
!function () {
if ("undefined" != typeof self && self.Prism && self.document) if (Prism.plugins.toolbar) {
var r = window.ClipboardJS || void 0;
r || "function" != "function" || (r = __webpack_require__(/*! clipboard */ "../../node_modules/clipboard/dist/clipboard.js"));
var i = [];
if (!r) {
var o = document.createElement("script"),
e = document.querySelector("head");
o.onload = function () {
if (r = window.ClipboardJS) for (; i.length;) {
i.pop()();
}
}, o.src = "https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js", e.appendChild(o);
}
Prism.plugins.toolbar.registerButton("copy-to-clipboard", function (e) {
var t = document.createElement("button");
return t.textContent = "Copy", r ? o() : i.push(o), t;
function o() {
var o = new r(t, {
text: function text() {
return e.code;
}
});
o.on("success", function () {
t.textContent = "Copied!", n();
}), o.on("error", function () {
t.textContent = "Press Ctrl+C to copy", n();
});
}
function n() {
setTimeout(function () {
t.textContent = "Copy";
}, 5e3);
}
});
} else console.warn("Copy to Clipboard plugin loaded before Toolbar plugin.");
}();
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ "../../node_modules/webpack/buildin/global.js")))
/***/ }),
/***/ "../../node_modules/algoliasearch/dist/algoliasearch.umd.js":
/*!*****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/algoliasearch/dist/algoliasearch.umd.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
/*! algoliasearch.umd.js | 4.5.1 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
!function (e, t) {
"object" == ( false ? undefined : _typeof(exports)) && "undefined" != typeof module ? module.exports = t() : true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (t),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
__WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
}(this, function () {
"use strict";
function e(e, t, r) {
return t in e ? Object.defineProperty(e, t, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = r, e;
}
function t(e, t) {
var r = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var n = Object.getOwnPropertySymbols(e);
t && (n = n.filter(function (t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable;
})), r.push.apply(r, n);
}
return r;
}
function r(r) {
for (var n = 1; n < arguments.length; n++) {
var a = null != arguments[n] ? arguments[n] : {};
n % 2 ? t(Object(a), !0).forEach(function (t) {
e(r, t, a[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(a)) : t(Object(a)).forEach(function (e) {
Object.defineProperty(r, e, Object.getOwnPropertyDescriptor(a, e));
});
}
return r;
}
function n(e, t) {
if (null == e) return {};
var r,
n,
a = function (e, t) {
if (null == e) return {};
var r,
n,
a = {},
o = Object.keys(e);
for (n = 0; n < o.length; n++) {
r = o[n], t.indexOf(r) >= 0 || (a[r] = e[r]);
}
return a;
}(e, t);
if (Object.getOwnPropertySymbols) {
var o = Object.getOwnPropertySymbols(e);
for (n = 0; n < o.length; n++) {
r = o[n], t.indexOf(r) >= 0 || Object.prototype.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);
}
}
return a;
}
function a(e, t) {
return function (e) {
if (Array.isArray(e)) return e;
}(e) || function (e, t) {
if (!(Symbol.iterator in Object(e) || "[object Arguments]" === Object.prototype.toString.call(e))) return;
var r = [],
n = !0,
a = !1,
o = void 0;
try {
for (var u, i = e[Symbol.iterator](); !(n = (u = i.next()).done) && (r.push(u.value), !t || r.length !== t); n = !0) {
;
}
} catch (e) {
a = !0, o = e;
} finally {
try {
n || null == i["return"] || i["return"]();
} finally {
if (a) throw o;
}
}
return r;
}(e, t) || function () {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}();
}
function o(e) {
return function (e) {
if (Array.isArray(e)) {
for (var t = 0, r = new Array(e.length); t < e.length; t++) {
r[t] = e[t];
}
return r;
}
}(e) || function (e) {
if (Symbol.iterator in Object(e) || "[object Arguments]" === Object.prototype.toString.call(e)) return Array.from(e);
}(e) || function () {
throw new TypeError("Invalid attempt to spread non-iterable instance");
}();
}
function u(e) {
var t,
r = "algoliasearch-client-js-".concat(e.key),
n = function n() {
return void 0 === t && (t = e.localStorage || window.localStorage), t;
},
o = function o() {
return JSON.parse(n().getItem(r) || "{}");
};
return {
get: function get(e, t) {
var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {
miss: function miss() {
return Promise.resolve();
}
};
return Promise.resolve().then(function () {
var r = JSON.stringify(e),
n = o()[r];
return Promise.all([n || t(), void 0 !== n]);
}).then(function (e) {
var t = a(e, 2),
n = t[0],
o = t[1];
return Promise.all([n, o || r.miss(n)]);
}).then(function (e) {
return a(e, 1)[0];
});
},
set: function set(e, t) {
return Promise.resolve().then(function () {
var a = o();
return a[JSON.stringify(e)] = t, n().setItem(r, JSON.stringify(a)), t;
});
},
"delete": function _delete(e) {
return Promise.resolve().then(function () {
var t = o();
delete t[JSON.stringify(e)], n().setItem(r, JSON.stringify(t));
});
},
clear: function clear() {
return Promise.resolve().then(function () {
n().removeItem(r);
});
}
};
}
function i(e) {
var t = o(e.caches),
r = t.shift();
return void 0 === r ? {
get: function get(e, t) {
var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {
miss: function miss() {
return Promise.resolve();
}
},
n = t();
return n.then(function (e) {
return Promise.all([e, r.miss(e)]);
}).then(function (e) {
return a(e, 1)[0];
});
},
set: function set(e, t) {
return Promise.resolve(t);
},
"delete": function _delete(e) {
return Promise.resolve();
},
clear: function clear() {
return Promise.resolve();
}
} : {
get: function get(e, n) {
var a = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {
miss: function miss() {
return Promise.resolve();
}
};
return r.get(e, n, a)["catch"](function () {
return i({
caches: t
}).get(e, n, a);
});
},
set: function set(e, n) {
return r.set(e, n)["catch"](function () {
return i({
caches: t
}).set(e, n);
});
},
"delete": function _delete(e) {
return r["delete"](e)["catch"](function () {
return i({
caches: t
})["delete"](e);
});
},
clear: function clear() {
return r.clear()["catch"](function () {
return i({
caches: t
}).clear();
});
}
};
}
function s() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {
serializable: !0
},
t = {};
return {
get: function get(r, n) {
var a = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {
miss: function miss() {
return Promise.resolve();
}
},
o = JSON.stringify(r);
if (o in t) return Promise.resolve(e.serializable ? JSON.parse(t[o]) : t[o]);
var u = n(),
i = a && a.miss || function () {
return Promise.resolve();
};
return u.then(function (e) {
return i(e);
}).then(function () {
return u;
});
},
set: function set(r, n) {
return t[JSON.stringify(r)] = e.serializable ? JSON.stringify(n) : n, Promise.resolve(n);
},
"delete": function _delete(e) {
return delete t[JSON.stringify(e)], Promise.resolve();
},
clear: function clear() {
return t = {}, Promise.resolve();
}
};
}
function c(e, t, r) {
var n = {
"x-algolia-api-key": r,
"x-algolia-application-id": t
};
return {
headers: function headers() {
return e === m.WithinHeaders ? n : {};
},
queryParameters: function queryParameters() {
return e === m.WithinQueryParameters ? n : {};
}
};
}
function f(e) {
var t = 0;
return e(function r() {
return t++, new Promise(function (n) {
setTimeout(function () {
n(e(r));
}, Math.min(100 * t, 1e3));
});
});
}
function d(e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : function (e, t) {
return Promise.resolve();
};
return Object.assign(e, {
wait: function wait(r) {
return d(e.then(function (e) {
return Promise.all([t(e, r), e]);
}).then(function (e) {
return e[1];
}));
}
});
}
function l(e) {
for (var t = e.length - 1; t > 0; t--) {
var r = Math.floor(Math.random() * (t + 1)),
n = e[t];
e[t] = e[r], e[r] = n;
}
return e;
}
function p(e, t) {
return Object.keys(void 0 !== t ? t : {}).forEach(function (r) {
e[r] = t[r](e);
}), e;
}
function h(e) {
for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++) {
r[n - 1] = arguments[n];
}
var a = 0;
return e.replace(/%s/g, function () {
return encodeURIComponent(r[a++]);
});
}
var m = {
WithinQueryParameters: 0,
WithinHeaders: 1
};
function y(e, t) {
var r = e || {},
n = r.data || {};
return Object.keys(r).forEach(function (e) {
-1 === ["timeout", "headers", "queryParameters", "data", "cacheable"].indexOf(e) && (n[e] = r[e]);
}), {
data: Object.entries(n).length > 0 ? n : void 0,
timeout: r.timeout || t,
headers: r.headers || {},
queryParameters: r.queryParameters || {},
cacheable: r.cacheable
};
}
var g = {
Read: 1,
Write: 2,
Any: 3
},
v = 1,
b = 2,
P = 3;
function O(e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : v;
return r(r({}, e), {}, {
status: t,
lastUpdate: Date.now()
});
}
function j(e) {
return "string" == typeof e ? {
protocol: "https",
url: e,
accept: g.Any
} : {
protocol: e.protocol || "https",
url: e.url,
accept: e.accept || g.Any
};
}
var w = "DELETE",
I = "GET",
x = "POST",
q = "PUT";
function D(e, t) {
return Promise.all(t.map(function (t) {
return e.get(t, function () {
return Promise.resolve(O(t));
});
})).then(function (e) {
var r = e.filter(function (e) {
return function (e) {
return e.status === v || Date.now() - e.lastUpdate > 12e4;
}(e);
}),
n = e.filter(function (e) {
return function (e) {
return e.status === P && Date.now() - e.lastUpdate <= 12e4;
}(e);
}),
a = [].concat(o(r), o(n));
return {
getTimeout: function getTimeout(e, t) {
return (0 === n.length && 0 === e ? 1 : n.length + 3 + e) * t;
},
statelessHosts: a.length > 0 ? a.map(function (e) {
return j(e);
}) : t
};
});
}
function S(e, t, n, a) {
var u = [],
i = function (e, t) {
if (e.method === I || void 0 === e.data && void 0 === t.data) return;
var n = Array.isArray(e.data) ? e.data : r(r({}, e.data), t.data);
return JSON.stringify(n);
}(n, a),
s = function (e, t) {
var n = r(r({}, e.headers), t.headers),
a = {};
return Object.keys(n).forEach(function (e) {
var t = n[e];
a[e.toLowerCase()] = t;
}), a;
}(e, a),
c = n.method,
f = n.method !== I ? {} : r(r({}, n.data), a.data),
d = r(r(r({
"x-algolia-agent": e.userAgent.value
}, e.queryParameters), f), a.queryParameters),
l = 0,
p = function t(r, o) {
var f = r.pop();
if (void 0 === f) throw {
name: "RetryError",
message: "Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",
transporterStackTrace: A(u)
};
var p = {
data: i,
headers: s,
method: c,
url: N(f, n.path, d),
connectTimeout: o(l, e.timeouts.connect),
responseTimeout: o(l, a.timeout)
},
h = function h(e) {
var t = {
request: p,
response: e,
host: f,
triesLeft: r.length
};
return u.push(t), t;
},
m = {
onSucess: function onSucess(e) {
return function (e) {
try {
return JSON.parse(e.content);
} catch (t) {
throw function (e, t) {
return {
name: "DeserializationError",
message: e,
response: t
};
}(t.message, e);
}
}(e);
},
onRetry: function onRetry(n) {
var a = h(n);
return n.isTimedOut && l++, Promise.all([e.logger.info("Retryable failure", E(a)), e.hostsCache.set(f, O(f, n.isTimedOut ? P : b))]).then(function () {
return t(r, o);
});
},
onFail: function onFail(e) {
throw h(e), function (e, t) {
var r = e.content,
n = e.status,
a = r;
try {
a = JSON.parse(r).message;
} catch (e) {}
return function (e, t, r) {
return {
name: "ApiError",
message: e,
status: t,
transporterStackTrace: r
};
}(a, n, t);
}(e, A(u));
}
};
return e.requester.send(p).then(function (e) {
return function (e, t) {
return function (e) {
var t = e.status;
return e.isTimedOut || function (e) {
var t = e.isTimedOut,
r = e.status;
return !t && 0 == ~~r;
}(e) || 2 != ~~(t / 100) && 4 != ~~(t / 100);
}(e) ? t.onRetry(e) : 2 == ~~(e.status / 100) ? t.onSucess(e) : t.onFail(e);
}(e, m);
});
};
return D(e.hostsCache, t).then(function (e) {
return p(o(e.statelessHosts).reverse(), e.getTimeout);
});
}
function k(e) {
var t = e.hostsCache,
r = e.logger,
n = e.requester,
o = e.requestsCache,
u = e.responsesCache,
i = e.timeouts,
s = e.userAgent,
c = e.hosts,
f = e.queryParameters,
d = {
hostsCache: t,
logger: r,
requester: n,
requestsCache: o,
responsesCache: u,
timeouts: i,
userAgent: s,
headers: e.headers,
queryParameters: f,
hosts: c.map(function (e) {
return j(e);
}),
read: function read(e, t) {
var r = y(t, d.timeouts.read),
n = function n() {
return S(d, d.hosts.filter(function (e) {
return 0 != (e.accept & g.Read);
}), e, r);
};
if (!0 !== (void 0 !== r.cacheable ? r.cacheable : e.cacheable)) return n();
var o = {
request: e,
mappedRequestOptions: r,
transporter: {
queryParameters: d.queryParameters,
headers: d.headers
}
};
return d.responsesCache.get(o, function () {
return d.requestsCache.get(o, function () {
return d.requestsCache.set(o, n()).then(function (e) {
return Promise.all([d.requestsCache["delete"](o), e]);
}, function (e) {
return Promise.all([d.requestsCache["delete"](o), Promise.reject(e)]);
}).then(function (e) {
var t = a(e, 2);
t[0];
return t[1];
});
});
}, {
miss: function miss(e) {
return d.responsesCache.set(o, e);
}
});
},
write: function write(e, t) {
return S(d, d.hosts.filter(function (e) {
return 0 != (e.accept & g.Write);
}), e, y(t, d.timeouts.write));
}
};
return d;
}
function T(e) {
var t = {
value: "Algolia for JavaScript (".concat(e, ")"),
add: function add(e) {
var r = "; ".concat(e.segment).concat(void 0 !== e.version ? " (".concat(e.version, ")") : "");
return -1 === t.value.indexOf(r) && (t.value = "".concat(t.value).concat(r)), t;
}
};
return t;
}
function N(e, t, r) {
var n = R(r),
a = "".concat(e.protocol, "://").concat(e.url, "/").concat("/" === t.charAt(0) ? t.substr(1) : t);
return n.length && (a += "?".concat(n)), a;
}
function R(e) {
return Object.keys(e).map(function (t) {
return h("%s=%s", t, (r = e[t], "[object Object]" === Object.prototype.toString.call(r) || "[object Array]" === Object.prototype.toString.call(r) ? JSON.stringify(e[t]) : e[t]));
var r;
}).join("&");
}
function A(e) {
return e.map(function (e) {
return E(e);
});
}
function E(e) {
var t = e.request.headers["x-algolia-api-key"] ? {
"x-algolia-api-key": "*****"
} : {};
return r(r({}, e), {}, {
request: r(r({}, e.request), {}, {
headers: r(r({}, e.request.headers), t)
})
});
}
var C = function C(e) {
return function (t, r) {
return e.transporter.write({
method: x,
path: "2/abtests",
data: t
}, r);
};
},
U = function U(e) {
return function (t, r) {
return e.transporter.write({
method: w,
path: h("2/abtests/%s", t)
}, r);
};
},
J = function J(e) {
return function (t, r) {
return e.transporter.read({
method: I,
path: h("2/abtests/%s", t)
}, r);
};
},
z = function z(e) {
return function (t) {
return e.transporter.read({
method: I,
path: "2/abtests"
}, t);
};
},
F = function F(e) {
return function (t, r) {
return e.transporter.write({
method: x,
path: h("2/abtests/%s/stop", t)
}, r);
};
},
H = function H(e) {
return function (t) {
return e.transporter.read({
method: I,
path: "1/strategies/personalization"
}, t);
};
},
M = function M(e) {
return function (t, r) {
return e.transporter.write({
method: x,
path: "1/strategies/personalization",
data: t
}, r);
};
};
function K(e) {
return function t(r) {
return e.request(r).then(function (n) {
if (void 0 !== e.batch && e.batch(n.hits), !e.shouldStop(n)) return n.cursor ? t({
cursor: n.cursor
}) : t({
page: (r.page || 0) + 1
});
});
}({});
}
var W = function W(e) {
return function (t, a) {
var o = a || {},
u = o.queryParameters,
i = n(o, ["queryParameters"]),
s = r({
acl: t
}, void 0 !== u ? {
queryParameters: u
} : {});
return d(e.transporter.write({
method: x,
path: "1/keys",
data: s
}, i), function (t, r) {
return f(function (n) {
return Y(e)(t.key, r)["catch"](function (e) {
if (404 !== e.status) throw e;
return n();
});
});
});
};
},
B = function B(e) {
return function (t, r, n) {
var a = y(n);
return a.queryParameters["X-Algolia-User-ID"] = t, e.transporter.write({
method: x,
path: "1/clusters/mapping",
data: {
cluster: r
}
}, a);
};
},
Q = function Q(e) {
return function (t, r, n) {
return e.transporter.write({
method: x,
path: "1/clusters/mapping/batch",
data: {
users: t,
cluster: r
}
}, n);
};
},
G = function G(e) {
return function (t, r, n) {
return d(e.transporter.write({
method: x,
path: h("1/indexes/%s/operation", t),
data: {
operation: "copy",
destination: r
}
}, n), function (r, n) {
return re(e)(t, {
methods: {
waitTask: et
}
}).waitTask(r.taskID, n);
});
};
},
V = function V(e) {
return function (t, n, a) {
return G(e)(t, n, r(r({}, a), {}, {
scope: [rt.Rules]
}));
};
},
L = function L(e) {
return function (t, n, a) {
return G(e)(t, n, r(r({}, a), {}, {
scope: [rt.Settings]
}));
};
},
_ = function _(e) {
return function (t, n, a) {
return G(e)(t, n, r(r({}, a), {}, {
scope: [rt.Synonyms]
}));
};
},
X = function X(e) {
return function (t, r) {
return d(e.transporter.write({
method: w,
path: h("1/keys/%s", t)
}, r), function (r, n) {
return f(function (r) {
return Y(e)(t, n).then(r)["catch"](function (e) {
if (404 !== e.status) throw e;
});
});
});
};
},
Y = function Y(e) {
return function (t, r) {
return e.transporter.read({
method: I,
path: h("1/keys/%s", t)
}, r);
};
},
Z = function Z(e) {
return function (t) {
return e.transporter.read({
method: I,
path: "1/logs"
}, t);
};
},
$ = function $(e) {
return function (t) {
return e.transporter.read({
method: I,
path: "1/clusters/mapping/top"
}, t);
};
},
ee = function ee(e) {
return function (t, r) {
return e.transporter.read({
method: I,
path: h("1/clusters/mapping/%s", t)
}, r);
};
},
te = function te(e) {
return function (t) {
var r = t || {},
a = r.retrieveMappings,
o = n(r, ["retrieveMappings"]);
return !0 === a && (o.getClusters = !0), e.transporter.read({
method: I,
path: "1/clusters/mapping/pending"
}, o);
};
},
re = function re(e) {
return function (t) {
var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
n = {
transporter: e.transporter,
appId: e.appId,
indexName: t
};
return p(n, r.methods);
};
},
ne = function ne(e) {
return function (t) {
return e.transporter.read({
method: I,
path: "1/keys"
}, t);
};
},
ae = function ae(e) {
return function (t) {
return e.transporter.read({
method: I,
path: "1/clusters"
}, t);
};
},
oe = function oe(e) {
return function (t) {
return e.transporter.read({
method: I,
path: "1/indexes"
}, t);
};
},
ue = function ue(e) {
return function (t) {
return e.transporter.read({
method: I,
path: "1/clusters/mapping"
}, t);
};
},
ie = function ie(e) {
return function (t, r, n) {
return d(e.transporter.write({
method: x,
path: h("1/indexes/%s/operation", t),
data: {
operation: "move",
destination: r
}
}, n), function (r, n) {
return re(e)(t, {
methods: {
waitTask: et
}
}).waitTask(r.taskID, n);
});
};
},
se = function se(e) {
return function (t, r) {
return d(e.transporter.write({
method: x,
path: "1/indexes/*/batch",
data: {
requests: t
}
}, r), function (t, r) {
return Promise.all(Object.keys(t.taskID).map(function (n) {
return re(e)(n, {
methods: {
waitTask: et
}
}).waitTask(t.taskID[n], r);
}));
});
};
},
ce = function ce(e) {
return function (t, r) {
return e.transporter.read({
method: x,
path: "1/indexes/*/objects",
data: {
requests: t
}
}, r);
};
},
fe = function fe(e) {
return function (t, n) {
var a = t.map(function (e) {
return r(r({}, e), {}, {
params: R(e.params || {})
});
});
return e.transporter.read({
method: x,
path: "1/indexes/*/queries",
data: {
requests: a
},
cacheable: !0
}, n);
};
},
de = function de(e) {
return function (t, a) {
return Promise.all(t.map(function (t) {
var o = t.params,
u = o.facetName,
i = o.facetQuery,
s = n(o, ["facetName", "facetQuery"]);
return re(e)(t.indexName, {
methods: {
searchForFacetValues: Xe
}
}).searchForFacetValues(u, i, r(r({}, a), s));
}));
};
},
le = function le(e) {
return function (t, r) {
var n = y(r);
return n.queryParameters["X-Algolia-User-ID"] = t, e.transporter.write({
method: w,
path: "1/clusters/mapping"
}, n);
};
},
pe = function pe(e) {
return function (t, r) {
return d(e.transporter.write({
method: x,
path: h("1/keys/%s/restore", t)
}, r), function (r, n) {
return f(function (r) {
return Y(e)(t, n)["catch"](function (e) {
if (404 !== e.status) throw e;
return r();
});
});
});
};
},
he = function he(e) {
return function (t, r) {
return e.transporter.read({
method: x,
path: "1/clusters/mapping/search",
data: {
query: t
}
}, r);
};
},
me = function me(e) {
return function (t, r) {
var a = Object.assign({}, r),
o = r || {},
u = o.queryParameters,
i = n(o, ["queryParameters"]),
s = u ? {
queryParameters: u
} : {},
c = ["acl", "indexes", "referers", "restrictSources", "queryParameters", "description", "maxQueriesPerIPPerHour", "maxHitsPerQuery"];
return d(e.transporter.write({
method: q,
path: h("1/keys/%s", t),
data: s
}, i), function (r, n) {
return f(function (r) {
return Y(e)(t, n).then(function (e) {
return function (e) {
return Object.keys(a).filter(function (e) {
return -1 !== c.indexOf(e);
}).every(function (t) {
return e[t] === a[t];
});
}(e) ? Promise.resolve() : r();
});
});
});
};
},
ye = function ye(e) {
return function (t, r) {
return d(e.transporter.write({
method: x,
path: h("1/indexes/%s/batch", e.indexName),
data: {
requests: t
}
}, r), function (t, r) {
return et(e)(t.taskID, r);
});
};
},
ge = function ge(e) {
return function (t) {
return K(r(r({
shouldStop: function shouldStop(e) {
return void 0 === e.cursor;
}
}, t), {}, {
request: function request(r) {
return e.transporter.read({
method: x,
path: h("1/indexes/%s/browse", e.indexName),
data: r
}, t);
}
}));
};
},
ve = function ve(e) {
return function (t) {
var n = r({
hitsPerPage: 1e3
}, t);
return K(r(r({
shouldStop: function shouldStop(e) {
return e.hits.length < n.hitsPerPage;
}
}, n), {}, {
request: function request(t) {
return Ye(e)("", r(r({}, n), t)).then(function (e) {
return r(r({}, e), {}, {
hits: e.hits.map(function (e) {
return delete e._highlightResult, e;
})
});
});
}
}));
};
},
be = function be(e) {
return function (t) {
var n = r({
hitsPerPage: 1e3
}, t);
return K(r(r({
shouldStop: function shouldStop(e) {
return e.hits.length < n.hitsPerPage;
}
}, n), {}, {
request: function request(t) {
return Ze(e)("", r(r({}, n), t)).then(function (e) {
return r(r({}, e), {}, {
hits: e.hits.map(function (e) {
return delete e._highlightResult, e;
})
});
});
}
}));
};
},
Pe = function Pe(e) {
return function (t, r, a) {
var o = a || {},
u = o.batchSize,
i = n(o, ["batchSize"]),
s = {
taskIDs: [],
objectIDs: []
};
return d(function n() {
var a,
o = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,
c = [];
for (a = o; a < t.length && (c.push(t[a]), c.length !== (u || 1e3)); a++) {
;
}
return 0 === c.length ? Promise.resolve(s) : ye(e)(c.map(function (e) {
return {
action: r,
body: e
};
}), i).then(function (e) {
return s.objectIDs = s.objectIDs.concat(e.objectIDs), s.taskIDs.push(e.taskID), a++, n(a);
});
}(), function (t, r) {
return Promise.all(t.taskIDs.map(function (t) {
return et(e)(t, r);
}));
});
};
},
Oe = function Oe(e) {
return function (t) {
return d(e.transporter.write({
method: x,
path: h("1/indexes/%s/clear", e.indexName)
}, t), function (t, r) {
return et(e)(t.taskID, r);
});
};
},
je = function je(e) {
return function (t) {
var r = t || {},
a = r.forwardToReplicas,
o = y(n(r, ["forwardToReplicas"]));
return a && (o.queryParameters.forwardToReplicas = 1), d(e.transporter.write({
method: x,
path: h("1/indexes/%s/rules/clear", e.indexName)
}, o), function (t, r) {
return et(e)(t.taskID, r);
});
};
},
we = function we(e) {
return function (t) {
var r = t || {},
a = r.forwardToReplicas,
o = y(n(r, ["forwardToReplicas"]));
return a && (o.queryParameters.forwardToReplicas = 1), d(e.transporter.write({
method: x,
path: h("1/indexes/%s/synonyms/clear", e.indexName)
}, o), function (t, r) {
return et(e)(t.taskID, r);
});
};
},
Ie = function Ie(e) {
return function (t, r) {
return d(e.transporter.write({
method: x,
path: h("1/indexes/%s/deleteByQuery", e.indexName),
data: t
}, r), function (t, r) {
return et(e)(t.taskID, r);
});
};
},
xe = function xe(e) {
return function (t) {
return d(e.transporter.write({
method: w,
path: h("1/indexes/%s", e.indexName)
}, t), function (t, r) {
return et(e)(t.taskID, r);
});
};
},
qe = function qe(e) {
return function (t, r) {
return d(De(e)([t], r).then(function (e) {
return {
taskID: e.taskIDs[0]
};
}), function (t, r) {
return et(e)(t.taskID, r);
});
};
},
De = function De(e) {
return function (t, r) {
var n = t.map(function (e) {
return {
objectID: e
};
});
return Pe(e)(n, tt.DeleteObject, r);
};
},
Se = function Se(e) {
return function (t, r) {
var a = r || {},
o = a.forwardToReplicas,
u = y(n(a, ["forwardToReplicas"]));
return o && (u.queryParameters.forwardToReplicas = 1), d(e.transporter.write({
method: w,
path: h("1/indexes/%s/rules/%s", e.indexName, t)
}, u), function (t, r) {
return et(e)(t.taskID, r);
});
};
},
ke = function ke(e) {
return function (t, r) {
var a = r || {},
o = a.forwardToReplicas,
u = y(n(a, ["forwardToReplicas"]));
return o && (u.queryParameters.forwardToReplicas = 1), d(e.transporter.write({
method: w,
path: h("1/indexes/%s/synonyms/%s", e.indexName, t)
}, u), function (t, r) {
return et(e)(t.taskID, r);
});
};
},
Te = function Te(e) {
return function (t) {
return Ue(e)(t).then(function () {
return !0;
})["catch"](function (e) {
if (404 !== e.status) throw e;
return !1;
});
};
},
Ne = function Ne(e) {
return function (t, o) {
var u = o || {},
i = u.query,
s = u.paginate,
c = n(u, ["query", "paginate"]),
f = 0;
return function n() {
return _e(e)(i || "", r(r({}, c), {}, {
page: f
})).then(function (e) {
for (var r = 0, o = Object.entries(e.hits); r < o.length; r++) {
var u = a(o[r], 2),
i = u[0],
c = u[1];
if (t(c)) return {
object: c,
position: parseInt(i, 10),
page: f
};
}
if (f++, !1 === s || f >= e.nbPages) throw {
name: "ObjectNotFoundError",
message: "Object not found."
};
return n();
});
}();
};
},
Re = function Re(e) {
return function (t, r) {
return e.transporter.read({
method: I,
path: h("1/indexes/%s/%s", e.indexName, t)
}, r);
};
},
Ae = function Ae() {
return function (e, t) {
for (var r = 0, n = Object.entries(e.hits); r < n.length; r++) {
var o = a(n[r], 2),
u = o[0];
if (o[1].objectID === t) return parseInt(u, 10);
}
return -1;
};
},
Ee = function Ee(e) {
return function (t, a) {
var o = a || {},
u = o.attributesToRetrieve,
i = n(o, ["attributesToRetrieve"]),
s = t.map(function (t) {
return r({
indexName: e.indexName,
objectID: t
}, u ? {
attributesToRetrieve: u
} : {});
});
return e.transporter.read({
method: x,
path: "1/indexes/*/objects",
data: {
requests: s
}
}, i);
};
},
Ce = function Ce(e) {
return function (t, r) {
return e.transporter.read({
method: I,
path: h("1/indexes/%s/rules/%s", e.indexName, t)
}, r);
};
},
Ue = function Ue(e) {
return function (t) {
return e.transporter.read({
method: I,
path: h("1/indexes/%s/settings", e.indexName),
data: {
getVersion: 2
}
}, t);
};
},
Je = function Je(e) {
return function (t, r) {
return e.transporter.read({
method: I,
path: h("1/indexes/%s/synonyms/%s", e.indexName, t)
}, r);
};
},
ze = function ze(e) {
return function (t, r) {
return d(Fe(e)([t], r).then(function (e) {
return {
objectID: e.objectIDs[0],
taskID: e.taskIDs[0]
};
}), function (t, r) {
return et(e)(t.taskID, r);
});
};
},
Fe = function Fe(e) {
return function (t, r) {
var a = r || {},
o = a.createIfNotExists,
u = n(a, ["createIfNotExists"]),
i = o ? tt.PartialUpdateObject : tt.PartialUpdateObjectNoCreate;
return Pe(e)(t, i, u);
};
},
He = function He(e) {
return function (t, u) {
var i = u || {},
s = i.safe,
c = i.autoGenerateObjectIDIfNotExist,
f = i.batchSize,
l = n(i, ["safe", "autoGenerateObjectIDIfNotExist", "batchSize"]),
p = function p(t, r, n, a) {
return d(e.transporter.write({
method: x,
path: h("1/indexes/%s/operation", t),
data: {
operation: n,
destination: r
}
}, a), function (t, r) {
return et(e)(t.taskID, r);
});
},
m = Math.random().toString(36).substring(7),
y = "".concat(e.indexName, "_tmp_").concat(m),
g = Be({
appId: e.appId,
transporter: e.transporter,
indexName: y
}),
v = [],
b = p(e.indexName, y, "copy", r(r({}, l), {}, {
scope: ["settings", "synonyms", "rules"]
}));
return v.push(b), d((s ? b.wait(l) : b).then(function () {
var e = g(t, r(r({}, l), {}, {
autoGenerateObjectIDIfNotExist: c,
batchSize: f
}));
return v.push(e), s ? e.wait(l) : e;
}).then(function () {
var t = p(y, e.indexName, "move", l);
return v.push(t), s ? t.wait(l) : t;
}).then(function () {
return Promise.all(v);
}).then(function (e) {
var t = a(e, 3),
r = t[0],
n = t[1],
u = t[2];
return {
objectIDs: n.objectIDs,
taskIDs: [r.taskID].concat(o(n.taskIDs), [u.taskID])
};
}), function (e, t) {
return Promise.all(v.map(function (e) {
return e.wait(t);
}));
});
};
},
Me = function Me(e) {
return function (t, n) {
return Ge(e)(t, r(r({}, n), {}, {
clearExistingRules: !0
}));
};
},
Ke = function Ke(e) {
return function (t, n) {
return Le(e)(t, r(r({}, n), {}, {
replaceExistingSynonyms: !0
}));
};
},
We = function We(e) {
return function (t, r) {
return d(Be(e)([t], r).then(function (e) {
return {
objectID: e.objectIDs[0],
taskID: e.taskIDs[0]
};
}), function (t, r) {
return et(e)(t.taskID, r);
});
};
},
Be = function Be(e) {
return function (t, r) {
var a = r || {},
o = a.autoGenerateObjectIDIfNotExist,
u = n(a, ["autoGenerateObjectIDIfNotExist"]),
i = o ? tt.AddObject : tt.UpdateObject;
if (i === tt.UpdateObject) {
var s = !0,
c = !1,
f = void 0;
try {
for (var l, p = t[Symbol.iterator](); !(s = (l = p.next()).done); s = !0) {
if (void 0 === l.value.objectID) return d(Promise.reject({
name: "MissingObjectIDError",
message: "All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."
}));
}
} catch (e) {
c = !0, f = e;
} finally {
try {
s || null == p["return"] || p["return"]();
} finally {
if (c) throw f;
}
}
}
return Pe(e)(t, i, u);
};
},
Qe = function Qe(e) {
return function (t, r) {
return Ge(e)([t], r);
};
},
Ge = function Ge(e) {
return function (t, r) {
var a = r || {},
o = a.forwardToReplicas,
u = a.clearExistingRules,
i = y(n(a, ["forwardToReplicas", "clearExistingRules"]));
return o && (i.queryParameters.forwardToReplicas = 1), u && (i.queryParameters.clearExistingRules = 1), d(e.transporter.write({
method: x,
path: h("1/indexes/%s/rules/batch", e.indexName),
data: t
}, i), function (t, r) {
return et(e)(t.taskID, r);
});
};
},
Ve = function Ve(e) {
return function (t, r) {
return Le(e)([t], r);
};
},
Le = function Le(e) {
return function (t, r) {
var a = r || {},
o = a.forwardToReplicas,
u = a.replaceExistingSynonyms,
i = y(n(a, ["forwardToReplicas", "replaceExistingSynonyms"]));
return o && (i.queryParameters.forwardToReplicas = 1), u && (i.queryParameters.replaceExistingSynonyms = 1), d(e.transporter.write({
method: x,
path: h("1/indexes/%s/synonyms/batch", e.indexName),
data: t
}, i), function (t, r) {
return et(e)(t.taskID, r);
});
};
},
_e = function _e(e) {
return function (t, r) {
return e.transporter.read({
method: x,
path: h("1/indexes/%s/query", e.indexName),
data: {
query: t
},
cacheable: !0
}, r);
};
},
Xe = function Xe(e) {
return function (t, r, n) {
return e.transporter.read({
method: x,
path: h("1/indexes/%s/facets/%s/query", e.indexName, t),
data: {
facetQuery: r
},
cacheable: !0
}, n);
};
},
Ye = function Ye(e) {
return function (t, r) {
return e.transporter.read({
method: x,
path: h("1/indexes/%s/rules/search", e.indexName),
data: {
query: t
}
}, r);
};
},
Ze = function Ze(e) {
return function (t, r) {
return e.transporter.read({
method: x,
path: h("1/indexes/%s/synonyms/search", e.indexName),
data: {
query: t
}
}, r);
};
},
$e = function $e(e) {
return function (t, r) {
var a = r || {},
o = a.forwardToReplicas,
u = y(n(a, ["forwardToReplicas"]));
return o && (u.queryParameters.forwardToReplicas = 1), d(e.transporter.write({
method: q,
path: h("1/indexes/%s/settings", e.indexName),
data: t
}, u), function (t, r) {
return et(e)(t.taskID, r);
});
};
},
et = function et(e) {
return function (t, r) {
return f(function (n) {
return function (e) {
return function (t, r) {
return e.transporter.read({
method: I,
path: h("1/indexes/%s/task/%s", e.indexName, t.toString())
}, r);
};
}(e)(t, r).then(function (e) {
return "published" !== e.status ? n() : void 0;
});
});
};
},
tt = {
AddObject: "addObject",
UpdateObject: "updateObject",
PartialUpdateObject: "partialUpdateObject",
PartialUpdateObjectNoCreate: "partialUpdateObjectNoCreate",
DeleteObject: "deleteObject",
DeleteIndex: "delete",
ClearIndex: "clear"
},
rt = {
Settings: "settings",
Synonyms: "synonyms",
Rules: "rules"
},
nt = 1,
at = 2,
ot = 3;
function ut(e, t, n) {
var a,
o = {
appId: e,
apiKey: t,
timeouts: {
connect: 1,
read: 2,
write: 30
},
requester: {
send: function send(e) {
return new Promise(function (t) {
var r = new XMLHttpRequest();
r.open(e.method, e.url, !0), Object.keys(e.headers).forEach(function (t) {
return r.setRequestHeader(t, e.headers[t]);
});
var n,
a = function a(e, n) {
return setTimeout(function () {
r.abort(), t({
status: 0,
content: n,
isTimedOut: !0
});
}, 1e3 * e);
},
o = a(e.connectTimeout, "Connection timeout");
r.onreadystatechange = function () {
r.readyState > r.OPENED && void 0 === n && (clearTimeout(o), n = a(e.responseTimeout, "Socket timeout"));
}, r.onerror = function () {
0 === r.status && (clearTimeout(o), clearTimeout(n), t({
content: r.responseText || "Network request failed",
status: r.status,
isTimedOut: !1
}));
}, r.onload = function () {
clearTimeout(o), clearTimeout(n), t({
content: r.responseText,
status: r.status,
isTimedOut: !1
});
}, r.send(e.data);
});
}
},
logger: (a = ot, {
debug: function debug(e, t) {
return nt >= a && console.debug(e, t), Promise.resolve();
},
info: function info(e, t) {
return at >= a && console.info(e, t), Promise.resolve();
},
error: function error(e, t) {
return console.error(e, t), Promise.resolve();
}
}),
responsesCache: s(),
requestsCache: s({
serializable: !1
}),
hostsCache: i({
caches: [u({
key: "".concat("4.5.1", "-").concat(e)
}), s()]
}),
userAgent: T("4.5.1").add({
segment: "Browser"
})
};
return function (e) {
var t = e.appId,
n = c(void 0 !== e.authMode ? e.authMode : m.WithinHeaders, t, e.apiKey),
a = k(r(r({
hosts: [{
url: "".concat(t, "-dsn.algolia.net"),
accept: g.Read
}, {
url: "".concat(t, ".algolia.net"),
accept: g.Write
}].concat(l([{
url: "".concat(t, "-1.algolianet.com")
}, {
url: "".concat(t, "-2.algolianet.com")
}, {
url: "".concat(t, "-3.algolianet.com")
}]))
}, e), {}, {
headers: r(r(r({}, n.headers()), {
"content-type": "application/x-www-form-urlencoded"
}), e.headers),
queryParameters: r(r({}, n.queryParameters()), e.queryParameters)
}));
return p({
transporter: a,
appId: t,
addAlgoliaAgent: function addAlgoliaAgent(e, t) {
a.userAgent.add({
segment: e,
version: t
});
},
clearCache: function clearCache() {
return Promise.all([a.requestsCache.clear(), a.responsesCache.clear()]).then(function () {});
}
}, e.methods);
}(r(r(r({}, o), n), {}, {
methods: {
search: fe,
searchForFacetValues: de,
multipleBatch: se,
multipleGetObjects: ce,
multipleQueries: fe,
copyIndex: G,
copySettings: L,
copySynonyms: _,
copyRules: V,
moveIndex: ie,
listIndices: oe,
getLogs: Z,
listClusters: ae,
multipleSearchForFacetValues: de,
getApiKey: Y,
addApiKey: W,
listApiKeys: ne,
updateApiKey: me,
deleteApiKey: X,
restoreApiKey: pe,
assignUserID: B,
assignUserIDs: Q,
getUserID: ee,
searchUserIDs: he,
listUserIDs: ue,
getTopUserIDs: $,
removeUserID: le,
hasPendingMappings: te,
initIndex: function initIndex(e) {
return function (t) {
return re(e)(t, {
methods: {
batch: ye,
"delete": xe,
getObject: Re,
getObjects: Ee,
saveObject: We,
saveObjects: Be,
search: _e,
searchForFacetValues: Xe,
waitTask: et,
setSettings: $e,
getSettings: Ue,
partialUpdateObject: ze,
partialUpdateObjects: Fe,
deleteObject: qe,
deleteObjects: De,
deleteBy: Ie,
clearObjects: Oe,
browseObjects: ge,
getObjectPosition: Ae,
findObject: Ne,
exists: Te,
saveSynonym: Ve,
saveSynonyms: Le,
getSynonym: Je,
searchSynonyms: Ze,
browseSynonyms: be,
deleteSynonym: ke,
clearSynonyms: we,
replaceAllObjects: He,
replaceAllSynonyms: Ke,
searchRules: Ye,
getRule: Ce,
deleteRule: Se,
saveRule: Qe,
saveRules: Ge,
replaceAllRules: Me,
browseRules: ve,
clearRules: je
}
});
};
},
initAnalytics: function initAnalytics() {
return function (e) {
return function (e) {
var t = e.region || "us",
n = c(m.WithinHeaders, e.appId, e.apiKey),
a = k(r(r({
hosts: [{
url: "analytics.".concat(t, ".algolia.com")
}]
}, e), {}, {
headers: r(r(r({}, n.headers()), {
"content-type": "application/json"
}), e.headers),
queryParameters: r(r({}, n.queryParameters()), e.queryParameters)
}));
return p({
appId: e.appId,
transporter: a
}, e.methods);
}(r(r(r({}, o), e), {}, {
methods: {
addABTest: C,
getABTest: J,
getABTests: z,
stopABTest: F,
deleteABTest: U
}
}));
};
},
initRecommendation: function initRecommendation() {
return function (e) {
return function (e) {
var t = e.region || "us",
n = c(m.WithinHeaders, e.appId, e.apiKey),
a = k(r(r({
hosts: [{
url: "recommendation.".concat(t, ".algolia.com")
}]
}, e), {}, {
headers: r(r(r({}, n.headers()), {
"content-type": "application/json"
}), e.headers),
queryParameters: r(r({}, n.queryParameters()), e.queryParameters)
}));
return p({
appId: e.appId,
transporter: a
}, e.methods);
}(r(r(r({}, o), e), {}, {
methods: {
getPersonalizationStrategy: H,
setPersonalizationStrategy: M
}
}));
};
}
}
}));
}
return ut.version = "4.5.1", ut;
});
/***/ }),
/***/ "../../node_modules/base64-js/index.js":
/*!********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/base64-js/index.js ***!
\********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.byteLength = byteLength;
exports.toByteArray = toByteArray;
exports.fromByteArray = fromByteArray;
var lookup = [];
var revLookup = [];
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
for (var i = 0, len = code.length; i < len; ++i) {
lookup[i] = code[i];
revLookup[code.charCodeAt(i)] = i;
} // Support decoding URL-safe base64 strings, as Node.js does.
// See: https://en.wikipedia.org/wiki/Base64#URL_applications
revLookup['-'.charCodeAt(0)] = 62;
revLookup['_'.charCodeAt(0)] = 63;
function getLens(b64) {
var len = b64.length;
if (len % 4 > 0) {
throw new Error('Invalid string. Length must be a multiple of 4');
} // Trim off extra bytes after placeholder bytes are found
// See: https://github.com/beatgammit/base64-js/issues/42
var validLen = b64.indexOf('=');
if (validLen === -1) validLen = len;
var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;
return [validLen, placeHoldersLen];
} // base64 is 4/3 + up to two characters of the original data
function byteLength(b64) {
var lens = getLens(b64);
var validLen = lens[0];
var placeHoldersLen = lens[1];
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
}
function _byteLength(b64, validLen, placeHoldersLen) {
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
}
function toByteArray(b64) {
var tmp;
var lens = getLens(b64);
var validLen = lens[0];
var placeHoldersLen = lens[1];
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
var curByte = 0; // if there are placeholders, only get up to the last complete 4 chars
var len = placeHoldersLen > 0 ? validLen - 4 : validLen;
var i;
for (i = 0; i < len; i += 4) {
tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
arr[curByte++] = tmp >> 16 & 0xFF;
arr[curByte++] = tmp >> 8 & 0xFF;
arr[curByte++] = tmp & 0xFF;
}
if (placeHoldersLen === 2) {
tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
arr[curByte++] = tmp & 0xFF;
}
if (placeHoldersLen === 1) {
tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
arr[curByte++] = tmp >> 8 & 0xFF;
arr[curByte++] = tmp & 0xFF;
}
return arr;
}
function tripletToBase64(num) {
return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];
}
function encodeChunk(uint8, start, end) {
var tmp;
var output = [];
for (var i = start; i < end; i += 3) {
tmp = (uint8[i] << 16 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (uint8[i + 2] & 0xFF);
output.push(tripletToBase64(tmp));
}
return output.join('');
}
function fromByteArray(uint8) {
var tmp;
var len = uint8.length;
var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
var parts = [];
var maxChunkLength = 16383; // must be multiple of 3
// go through the array every three bytes, we'll deal with trailing stuff later
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
} // pad the end with zeros, but make sure to not forget the extra bytes
if (extraBytes === 1) {
tmp = uint8[len - 1];
parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 0x3F] + '==');
} else if (extraBytes === 2) {
tmp = (uint8[len - 2] << 8) + uint8[len - 1];
parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 0x3F] + lookup[tmp << 2 & 0x3F] + '=');
}
return parts.join('');
}
/***/ }),
/***/ "../../node_modules/clipboard/dist/clipboard.js":
/*!*****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/clipboard/dist/clipboard.js ***!
\*****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
/*!
* clipboard.js v2.0.6
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/
(function webpackUniversalModuleDefinition(root, factory) {
if (( false ? undefined : _typeof2(exports)) === 'object' && ( false ? undefined : _typeof2(module)) === 'object') module.exports = factory();else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
})(this, function () {
return (
/******/
function (modules) {
// webpackBootstrap
/******/
// The module cache
/******/
var installedModules = {};
/******/
/******/
// The require function
/******/
function __webpack_require__(moduleId) {
/******/
/******/
// Check if module is in cache
/******/
if (installedModules[moduleId]) {
/******/
return installedModules[moduleId].exports;
/******/
}
/******/
// Create a new module (and put it into the cache)
/******/
var module = installedModules[moduleId] = {
/******/
i: moduleId,
/******/
l: false,
/******/
exports: {}
/******/
};
/******/
/******/
// Execute the module function
/******/
modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/
// Flag the module as loaded
/******/
module.l = true;
/******/
/******/
// Return the exports of the module
/******/
return module.exports;
/******/
}
/******/
/******/
/******/
// expose the modules object (__webpack_modules__)
/******/
__webpack_require__.m = modules;
/******/
/******/
// expose the module cache
/******/
__webpack_require__.c = installedModules;
/******/
/******/
// define getter function for harmony exports
/******/
__webpack_require__.d = function (exports, name, getter) {
/******/
if (!__webpack_require__.o(exports, name)) {
/******/
Object.defineProperty(exports, name, {
enumerable: true,
get: getter
});
/******/
}
/******/
};
/******/
/******/
// define __esModule on exports
/******/
__webpack_require__.r = function (exports) {
/******/
if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/
Object.defineProperty(exports, Symbol.toStringTag, {
value: 'Module'
});
/******/
}
/******/
Object.defineProperty(exports, '__esModule', {
value: true
});
/******/
};
/******/
/******/
// create a fake namespace object
/******/
// mode & 1: value is a module id, require it
/******/
// mode & 2: merge all properties of value into the ns
/******/
// mode & 4: return value when already ns object
/******/
// mode & 8|1: behave like require
/******/
__webpack_require__.t = function (value, mode) {
/******/
if (mode & 1) value = __webpack_require__(value);
/******/
if (mode & 8) return value;
/******/
if (mode & 4 && _typeof2(value) === 'object' && value && value.__esModule) return value;
/******/
var ns = Object.create(null);
/******/
__webpack_require__.r(ns);
/******/
Object.defineProperty(ns, 'default', {
enumerable: true,
value: value
});
/******/
if (mode & 2 && typeof value != 'string') for (var key in value) {
__webpack_require__.d(ns, key, function (key) {
return value[key];
}.bind(null, key));
}
/******/
return ns;
/******/
};
/******/
/******/
// getDefaultExport function for compatibility with non-harmony modules
/******/
__webpack_require__.n = function (module) {
/******/
var getter = module && module.__esModule ?
/******/
function getDefault() {
return module['default'];
} :
/******/
function getModuleExports() {
return module;
};
/******/
__webpack_require__.d(getter, 'a', getter);
/******/
return getter;
/******/
};
/******/
/******/
// Object.prototype.hasOwnProperty.call
/******/
__webpack_require__.o = function (object, property) {
return Object.prototype.hasOwnProperty.call(object, property);
};
/******/
/******/
// __webpack_public_path__
/******/
__webpack_require__.p = "";
/******/
/******/
/******/
// Load entry module and return exports
/******/
return __webpack_require__(__webpack_require__.s = 6);
/******/
}(
/************************************************************************/
/******/
[
/* 0 */
/***/
function (module, exports) {
function select(element) {
var selectedText;
if (element.nodeName === 'SELECT') {
element.focus();
selectedText = element.value;
} else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
var isReadOnly = element.hasAttribute('readonly');
if (!isReadOnly) {
element.setAttribute('readonly', '');
}
element.select();
element.setSelectionRange(0, element.value.length);
if (!isReadOnly) {
element.removeAttribute('readonly');
}
selectedText = element.value;
} else {
if (element.hasAttribute('contenteditable')) {
element.focus();
}
var selection = window.getSelection();
var range = document.createRange();
range.selectNodeContents(element);
selection.removeAllRanges();
selection.addRange(range);
selectedText = selection.toString();
}
return selectedText;
}
module.exports = select;
/***/
},
/* 1 */
/***/
function (module, exports) {
function E() {// Keep this empty so it's easier to inherit from
// (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
}
E.prototype = {
on: function on(name, callback, ctx) {
var e = this.e || (this.e = {});
(e[name] || (e[name] = [])).push({
fn: callback,
ctx: ctx
});
return this;
},
once: function once(name, callback, ctx) {
var self = this;
function listener() {
self.off(name, listener);
callback.apply(ctx, arguments);
}
;
listener._ = callback;
return this.on(name, listener, ctx);
},
emit: function emit(name) {
var data = [].slice.call(arguments, 1);
var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
var i = 0;
var len = evtArr.length;
for (i; i < len; i++) {
evtArr[i].fn.apply(evtArr[i].ctx, data);
}
return this;
},
off: function off(name, callback) {
var e = this.e || (this.e = {});
var evts = e[name];
var liveEvents = [];
if (evts && callback) {
for (var i = 0, len = evts.length; i < len; i++) {
if (evts[i].fn !== callback && evts[i].fn._ !== callback) liveEvents.push(evts[i]);
}
} // Remove event from queue to prevent memory leak
// Suggested by https://github.com/lazd
// Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
liveEvents.length ? e[name] = liveEvents : delete e[name];
return this;
}
};
module.exports = E;
module.exports.TinyEmitter = E;
/***/
},
/* 2 */
/***/
function (module, exports, __webpack_require__) {
var is = __webpack_require__(3);
var delegate = __webpack_require__(4);
/**
* Validates all params and calls the right
* listener function based on its target type.
*
* @param {String|HTMLElement|HTMLCollection|NodeList} target
* @param {String} type
* @param {Function} callback
* @return {Object}
*/
function listen(target, type, callback) {
if (!target && !type && !callback) {
throw new Error('Missing required arguments');
}
if (!is.string(type)) {
throw new TypeError('Second argument must be a String');
}
if (!is.fn(callback)) {
throw new TypeError('Third argument must be a Function');
}
if (is.node(target)) {
return listenNode(target, type, callback);
} else if (is.nodeList(target)) {
return listenNodeList(target, type, callback);
} else if (is.string(target)) {
return listenSelector(target, type, callback);
} else {
throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');
}
}
/**
* Adds an event listener to a HTML element
* and returns a remove listener function.
*
* @param {HTMLElement} node
* @param {String} type
* @param {Function} callback
* @return {Object}
*/
function listenNode(node, type, callback) {
node.addEventListener(type, callback);
return {
destroy: function destroy() {
node.removeEventListener(type, callback);
}
};
}
/**
* Add an event listener to a list of HTML elements
* and returns a remove listener function.
*
* @param {NodeList|HTMLCollection} nodeList
* @param {String} type
* @param {Function} callback
* @return {Object}
*/
function listenNodeList(nodeList, type, callback) {
Array.prototype.forEach.call(nodeList, function (node) {
node.addEventListener(type, callback);
});
return {
destroy: function destroy() {
Array.prototype.forEach.call(nodeList, function (node) {
node.removeEventListener(type, callback);
});
}
};
}
/**
* Add an event listener to a selector
* and returns a remove listener function.
*
* @param {String} selector
* @param {String} type
* @param {Function} callback
* @return {Object}
*/
function listenSelector(selector, type, callback) {
return delegate(document.body, selector, type, callback);
}
module.exports = listen;
/***/
},
/* 3 */
/***/
function (module, exports) {
/**
* Check if argument is a HTML element.
*
* @param {Object} value
* @return {Boolean}
*/
exports.node = function (value) {
return value !== undefined && value instanceof HTMLElement && value.nodeType === 1;
};
/**
* Check if argument is a list of HTML elements.
*
* @param {Object} value
* @return {Boolean}
*/
exports.nodeList = function (value) {
var type = Object.prototype.toString.call(value);
return value !== undefined && (type === '[object NodeList]' || type === '[object HTMLCollection]') && 'length' in value && (value.length === 0 || exports.node(value[0]));
};
/**
* Check if argument is a string.
*
* @param {Object} value
* @return {Boolean}
*/
exports.string = function (value) {
return typeof value === 'string' || value instanceof String;
};
/**
* Check if argument is a function.
*
* @param {Object} value
* @return {Boolean}
*/
exports.fn = function (value) {
var type = Object.prototype.toString.call(value);
return type === '[object Function]';
};
/***/
},
/* 4 */
/***/
function (module, exports, __webpack_require__) {
var closest = __webpack_require__(5);
/**
* Delegates event to a selector.
*
* @param {Element} element
* @param {String} selector
* @param {String} type
* @param {Function} callback
* @param {Boolean} useCapture
* @return {Object}
*/
function _delegate(element, selector, type, callback, useCapture) {
var listenerFn = listener.apply(this, arguments);
element.addEventListener(type, listenerFn, useCapture);
return {
destroy: function destroy() {
element.removeEventListener(type, listenerFn, useCapture);
}
};
}
/**
* Delegates event to a selector.
*
* @param {Element|String|Array} [elements]
* @param {String} selector
* @param {String} type
* @param {Function} callback
* @param {Boolean} useCapture
* @return {Object}
*/
function delegate(elements, selector, type, callback, useCapture) {
// Handle the regular Element usage
if (typeof elements.addEventListener === 'function') {
return _delegate.apply(null, arguments);
} // Handle Element-less usage, it defaults to global delegation
if (typeof type === 'function') {
// Use `document` as the first parameter, then apply arguments
// This is a short way to .unshift `arguments` without running into deoptimizations
return _delegate.bind(null, document).apply(null, arguments);
} // Handle Selector-based usage
if (typeof elements === 'string') {
elements = document.querySelectorAll(elements);
} // Handle Array-like based usage
return Array.prototype.map.call(elements, function (element) {
return _delegate(element, selector, type, callback, useCapture);
});
}
/**
* Finds closest match and invokes callback.
*
* @param {Element} element
* @param {String} selector
* @param {String} type
* @param {Function} callback
* @return {Function}
*/
function listener(element, selector, type, callback) {
return function (e) {
e.delegateTarget = closest(e.target, selector);
if (e.delegateTarget) {
callback.call(element, e);
}
};
}
module.exports = delegate;
/***/
},
/* 5 */
/***/
function (module, exports) {
var DOCUMENT_NODE_TYPE = 9;
/**
* A polyfill for Element.matches()
*/
if (typeof Element !== 'undefined' && !Element.prototype.matches) {
var proto = Element.prototype;
proto.matches = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector || proto.webkitMatchesSelector;
}
/**
* Finds the closest parent that matches a selector.
*
* @param {Element} element
* @param {String} selector
* @return {Function}
*/
function closest(element, selector) {
while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {
if (typeof element.matches === 'function' && element.matches(selector)) {
return element;
}
element = element.parentNode;
}
}
module.exports = closest;
/***/
},
/* 6 */
/***/
function (module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__); // EXTERNAL MODULE: ./node_modules/select/src/select.js
var src_select = __webpack_require__(0);
var select_default = /*#__PURE__*/__webpack_require__.n(src_select); // CONCATENATED MODULE: ./src/clipboard-action.js
var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) {
return _typeof2(obj);
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
};
var _createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
/**
* Inner class which performs selection from either `text` or `target`
* properties and then executes copy or cut operations.
*/
var clipboard_action_ClipboardAction = function () {
/**
* @param {Object} options
*/
function ClipboardAction(options) {
_classCallCheck(this, ClipboardAction);
this.resolveOptions(options);
this.initSelection();
}
/**
* Defines base properties passed from constructor.
* @param {Object} options
*/
_createClass(ClipboardAction, [{
key: 'resolveOptions',
value: function resolveOptions() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
this.action = options.action;
this.container = options.container;
this.emitter = options.emitter;
this.target = options.target;
this.text = options.text;
this.trigger = options.trigger;
this.selectedText = '';
}
/**
* Decides which selection strategy is going to be applied based
* on the existence of `text` and `target` properties.
*/
}, {
key: 'initSelection',
value: function initSelection() {
if (this.text) {
this.selectFake();
} else if (this.target) {
this.selectTarget();
}
}
/**
* Creates a fake textarea element, sets its value from `text` property,
* and makes a selection on it.
*/
}, {
key: 'selectFake',
value: function selectFake() {
var _this = this;
var isRTL = document.documentElement.getAttribute('dir') == 'rtl';
this.removeFake();
this.fakeHandlerCallback = function () {
return _this.removeFake();
};
this.fakeHandler = this.container.addEventListener('click', this.fakeHandlerCallback) || true;
this.fakeElem = document.createElement('textarea'); // Prevent zooming on iOS
this.fakeElem.style.fontSize = '12pt'; // Reset box model
this.fakeElem.style.border = '0';
this.fakeElem.style.padding = '0';
this.fakeElem.style.margin = '0'; // Move element out of screen horizontally
this.fakeElem.style.position = 'absolute';
this.fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px'; // Move element to the same position vertically
var yPosition = window.pageYOffset || document.documentElement.scrollTop;
this.fakeElem.style.top = yPosition + 'px';
this.fakeElem.setAttribute('readonly', '');
this.fakeElem.value = this.text;
this.container.appendChild(this.fakeElem);
this.selectedText = select_default()(this.fakeElem);
this.copyText();
}
/**
* Only removes the fake element after another click event, that way
* a user can hit `Ctrl+C` to copy because selection still exists.
*/
}, {
key: 'removeFake',
value: function removeFake() {
if (this.fakeHandler) {
this.container.removeEventListener('click', this.fakeHandlerCallback);
this.fakeHandler = null;
this.fakeHandlerCallback = null;
}
if (this.fakeElem) {
this.container.removeChild(this.fakeElem);
this.fakeElem = null;
}
}
/**
* Selects the content from element passed on `target` property.
*/
}, {
key: 'selectTarget',
value: function selectTarget() {
this.selectedText = select_default()(this.target);
this.copyText();
}
/**
* Executes the copy operation based on the current selection.
*/
}, {
key: 'copyText',
value: function copyText() {
var succeeded = void 0;
try {
succeeded = document.execCommand(this.action);
} catch (err) {
succeeded = false;
}
this.handleResult(succeeded);
}
/**
* Fires an event based on the copy operation result.
* @param {Boolean} succeeded
*/
}, {
key: 'handleResult',
value: function handleResult(succeeded) {
this.emitter.emit(succeeded ? 'success' : 'error', {
action: this.action,
text: this.selectedText,
trigger: this.trigger,
clearSelection: this.clearSelection.bind(this)
});
}
/**
* Moves focus away from `target` and back to the trigger, removes current selection.
*/
}, {
key: 'clearSelection',
value: function clearSelection() {
if (this.trigger) {
this.trigger.focus();
}
document.activeElement.blur();
window.getSelection().removeAllRanges();
}
/**
* Sets the `action` to be performed which can be either 'copy' or 'cut'.
* @param {String} action
*/
}, {
key: 'destroy',
/**
* Destroy lifecycle.
*/
value: function destroy() {
this.removeFake();
}
}, {
key: 'action',
set: function set() {
var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'copy';
this._action = action;
if (this._action !== 'copy' && this._action !== 'cut') {
throw new Error('Invalid "action" value, use either "copy" or "cut"');
}
}
/**
* Gets the `action` property.
* @return {String}
*/
,
get: function get() {
return this._action;
}
/**
* Sets the `target` property using an element
* that will be have its content copied.
* @param {Element} target
*/
}, {
key: 'target',
set: function set(target) {
if (target !== undefined) {
if (target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && target.nodeType === 1) {
if (this.action === 'copy' && target.hasAttribute('disabled')) {
throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
}
if (this.action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {
throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');
}
this._target = target;
} else {
throw new Error('Invalid "target" value, use a valid Element');
}
}
}
/**
* Gets the `target` property.
* @return {String|HTMLElement}
*/
,
get: function get() {
return this._target;
}
}]);
return ClipboardAction;
}();
/* harmony default export */
var clipboard_action = clipboard_action_ClipboardAction; // EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js
var tiny_emitter = __webpack_require__(1);
var tiny_emitter_default = /*#__PURE__*/__webpack_require__.n(tiny_emitter); // EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js
var listen = __webpack_require__(2);
var listen_default = /*#__PURE__*/__webpack_require__.n(listen); // CONCATENATED MODULE: ./src/clipboard.js
var clipboard_typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) {
return _typeof2(obj);
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
};
var clipboard_createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
function clipboard_classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _possibleConstructorReturn(self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (_typeof2(call) === "object" || typeof call === "function") ? call : self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + _typeof2(superClass));
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}
/**
* Base class which takes one or more elements, adds event listeners to them,
* and instantiates a new `ClipboardAction` on each click.
*/
var clipboard_Clipboard = function (_Emitter) {
_inherits(Clipboard, _Emitter);
/**
* @param {String|HTMLElement|HTMLCollection|NodeList} trigger
* @param {Object} options
*/
function Clipboard(trigger, options) {
clipboard_classCallCheck(this, Clipboard);
var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this));
_this.resolveOptions(options);
_this.listenClick(trigger);
return _this;
}
/**
* Defines if attributes would be resolved using internal setter functions
* or custom functions that were passed in the constructor.
* @param {Object} options
*/
clipboard_createClass(Clipboard, [{
key: 'resolveOptions',
value: function resolveOptions() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
this.action = typeof options.action === 'function' ? options.action : this.defaultAction;
this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;
this.text = typeof options.text === 'function' ? options.text : this.defaultText;
this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body;
}
/**
* Adds a click event listener to the passed trigger.
* @param {String|HTMLElement|HTMLCollection|NodeList} trigger
*/
}, {
key: 'listenClick',
value: function listenClick(trigger) {
var _this2 = this;
this.listener = listen_default()(trigger, 'click', function (e) {
return _this2.onClick(e);
});
}
/**
* Defines a new `ClipboardAction` on each click event.
* @param {Event} e
*/
}, {
key: 'onClick',
value: function onClick(e) {
var trigger = e.delegateTarget || e.currentTarget;
if (this.clipboardAction) {
this.clipboardAction = null;
}
this.clipboardAction = new clipboard_action({
action: this.action(trigger),
target: this.target(trigger),
text: this.text(trigger),
container: this.container,
trigger: trigger,
emitter: this
});
}
/**
* Default `action` lookup function.
* @param {Element} trigger
*/
}, {
key: 'defaultAction',
value: function defaultAction(trigger) {
return getAttributeValue('action', trigger);
}
/**
* Default `target` lookup function.
* @param {Element} trigger
*/
}, {
key: 'defaultTarget',
value: function defaultTarget(trigger) {
var selector = getAttributeValue('target', trigger);
if (selector) {
return document.querySelector(selector);
}
}
/**
* Returns the support of the given action, or all actions if no action is
* given.
* @param {String} [action]
*/
}, {
key: 'defaultText',
/**
* Default `text` lookup function.
* @param {Element} trigger
*/
value: function defaultText(trigger) {
return getAttributeValue('text', trigger);
}
/**
* Destroy lifecycle.
*/
}, {
key: 'destroy',
value: function destroy() {
this.listener.destroy();
if (this.clipboardAction) {
this.clipboardAction.destroy();
this.clipboardAction = null;
}
}
}], [{
key: 'isSupported',
value: function isSupported() {
var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];
var actions = typeof action === 'string' ? [action] : action;
var support = !!document.queryCommandSupported;
actions.forEach(function (action) {
support = support && !!document.queryCommandSupported(action);
});
return support;
}
}]);
return Clipboard;
}(tiny_emitter_default.a);
/**
* Helper function to retrieve attribute value.
* @param {String} suffix
* @param {Element} element
*/
function getAttributeValue(suffix, element) {
var attribute = 'data-clipboard-' + suffix;
if (!element.hasAttribute(attribute)) {
return;
}
return element.getAttribute(attribute);
}
/* harmony default export */
var clipboard = __webpack_exports__["default"] = clipboard_Clipboard;
/***/
}
/******/
])["default"]
);
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/module.js */ "../../node_modules/webpack/buildin/module.js")(module)))
/***/ }),
/***/ "../../node_modules/core-js/es6/index.js":
/*!**********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/es6/index.js ***!
\**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ../modules/es6.symbol */ "../../node_modules/core-js/modules/es6.symbol.js");
__webpack_require__(/*! ../modules/es6.object.create */ "../../node_modules/core-js/modules/es6.object.create.js");
__webpack_require__(/*! ../modules/es6.object.define-property */ "../../node_modules/core-js/modules/es6.object.define-property.js");
__webpack_require__(/*! ../modules/es6.object.define-properties */ "../../node_modules/core-js/modules/es6.object.define-properties.js");
__webpack_require__(/*! ../modules/es6.object.get-own-property-descriptor */ "../../node_modules/core-js/modules/es6.object.get-own-property-descriptor.js");
__webpack_require__(/*! ../modules/es6.object.get-prototype-of */ "../../node_modules/core-js/modules/es6.object.get-prototype-of.js");
__webpack_require__(/*! ../modules/es6.object.keys */ "../../node_modules/core-js/modules/es6.object.keys.js");
__webpack_require__(/*! ../modules/es6.object.get-own-property-names */ "../../node_modules/core-js/modules/es6.object.get-own-property-names.js");
__webpack_require__(/*! ../modules/es6.object.freeze */ "../../node_modules/core-js/modules/es6.object.freeze.js");
__webpack_require__(/*! ../modules/es6.object.seal */ "../../node_modules/core-js/modules/es6.object.seal.js");
__webpack_require__(/*! ../modules/es6.object.prevent-extensions */ "../../node_modules/core-js/modules/es6.object.prevent-extensions.js");
__webpack_require__(/*! ../modules/es6.object.is-frozen */ "../../node_modules/core-js/modules/es6.object.is-frozen.js");
__webpack_require__(/*! ../modules/es6.object.is-sealed */ "../../node_modules/core-js/modules/es6.object.is-sealed.js");
__webpack_require__(/*! ../modules/es6.object.is-extensible */ "../../node_modules/core-js/modules/es6.object.is-extensible.js");
__webpack_require__(/*! ../modules/es6.object.assign */ "../../node_modules/core-js/modules/es6.object.assign.js");
__webpack_require__(/*! ../modules/es6.object.is */ "../../node_modules/core-js/modules/es6.object.is.js");
__webpack_require__(/*! ../modules/es6.object.set-prototype-of */ "../../node_modules/core-js/modules/es6.object.set-prototype-of.js");
__webpack_require__(/*! ../modules/es6.object.to-string */ "../../node_modules/core-js/modules/es6.object.to-string.js");
__webpack_require__(/*! ../modules/es6.function.bind */ "../../node_modules/core-js/modules/es6.function.bind.js");
__webpack_require__(/*! ../modules/es6.function.name */ "../../node_modules/core-js/modules/es6.function.name.js");
__webpack_require__(/*! ../modules/es6.function.has-instance */ "../../node_modules/core-js/modules/es6.function.has-instance.js");
__webpack_require__(/*! ../modules/es6.parse-int */ "../../node_modules/core-js/modules/es6.parse-int.js");
__webpack_require__(/*! ../modules/es6.parse-float */ "../../node_modules/core-js/modules/es6.parse-float.js");
__webpack_require__(/*! ../modules/es6.number.constructor */ "../../node_modules/core-js/modules/es6.number.constructor.js");
__webpack_require__(/*! ../modules/es6.number.to-fixed */ "../../node_modules/core-js/modules/es6.number.to-fixed.js");
__webpack_require__(/*! ../modules/es6.number.to-precision */ "../../node_modules/core-js/modules/es6.number.to-precision.js");
__webpack_require__(/*! ../modules/es6.number.epsilon */ "../../node_modules/core-js/modules/es6.number.epsilon.js");
__webpack_require__(/*! ../modules/es6.number.is-finite */ "../../node_modules/core-js/modules/es6.number.is-finite.js");
__webpack_require__(/*! ../modules/es6.number.is-integer */ "../../node_modules/core-js/modules/es6.number.is-integer.js");
__webpack_require__(/*! ../modules/es6.number.is-nan */ "../../node_modules/core-js/modules/es6.number.is-nan.js");
__webpack_require__(/*! ../modules/es6.number.is-safe-integer */ "../../node_modules/core-js/modules/es6.number.is-safe-integer.js");
__webpack_require__(/*! ../modules/es6.number.max-safe-integer */ "../../node_modules/core-js/modules/es6.number.max-safe-integer.js");
__webpack_require__(/*! ../modules/es6.number.min-safe-integer */ "../../node_modules/core-js/modules/es6.number.min-safe-integer.js");
__webpack_require__(/*! ../modules/es6.number.parse-float */ "../../node_modules/core-js/modules/es6.number.parse-float.js");
__webpack_require__(/*! ../modules/es6.number.parse-int */ "../../node_modules/core-js/modules/es6.number.parse-int.js");
__webpack_require__(/*! ../modules/es6.math.acosh */ "../../node_modules/core-js/modules/es6.math.acosh.js");
__webpack_require__(/*! ../modules/es6.math.asinh */ "../../node_modules/core-js/modules/es6.math.asinh.js");
__webpack_require__(/*! ../modules/es6.math.atanh */ "../../node_modules/core-js/modules/es6.math.atanh.js");
__webpack_require__(/*! ../modules/es6.math.cbrt */ "../../node_modules/core-js/modules/es6.math.cbrt.js");
__webpack_require__(/*! ../modules/es6.math.clz32 */ "../../node_modules/core-js/modules/es6.math.clz32.js");
__webpack_require__(/*! ../modules/es6.math.cosh */ "../../node_modules/core-js/modules/es6.math.cosh.js");
__webpack_require__(/*! ../modules/es6.math.expm1 */ "../../node_modules/core-js/modules/es6.math.expm1.js");
__webpack_require__(/*! ../modules/es6.math.fround */ "../../node_modules/core-js/modules/es6.math.fround.js");
__webpack_require__(/*! ../modules/es6.math.hypot */ "../../node_modules/core-js/modules/es6.math.hypot.js");
__webpack_require__(/*! ../modules/es6.math.imul */ "../../node_modules/core-js/modules/es6.math.imul.js");
__webpack_require__(/*! ../modules/es6.math.log10 */ "../../node_modules/core-js/modules/es6.math.log10.js");
__webpack_require__(/*! ../modules/es6.math.log1p */ "../../node_modules/core-js/modules/es6.math.log1p.js");
__webpack_require__(/*! ../modules/es6.math.log2 */ "../../node_modules/core-js/modules/es6.math.log2.js");
__webpack_require__(/*! ../modules/es6.math.sign */ "../../node_modules/core-js/modules/es6.math.sign.js");
__webpack_require__(/*! ../modules/es6.math.sinh */ "../../node_modules/core-js/modules/es6.math.sinh.js");
__webpack_require__(/*! ../modules/es6.math.tanh */ "../../node_modules/core-js/modules/es6.math.tanh.js");
__webpack_require__(/*! ../modules/es6.math.trunc */ "../../node_modules/core-js/modules/es6.math.trunc.js");
__webpack_require__(/*! ../modules/es6.string.from-code-point */ "../../node_modules/core-js/modules/es6.string.from-code-point.js");
__webpack_require__(/*! ../modules/es6.string.raw */ "../../node_modules/core-js/modules/es6.string.raw.js");
__webpack_require__(/*! ../modules/es6.string.trim */ "../../node_modules/core-js/modules/es6.string.trim.js");
__webpack_require__(/*! ../modules/es6.string.iterator */ "../../node_modules/core-js/modules/es6.string.iterator.js");
__webpack_require__(/*! ../modules/es6.string.code-point-at */ "../../node_modules/core-js/modules/es6.string.code-point-at.js");
__webpack_require__(/*! ../modules/es6.string.ends-with */ "../../node_modules/core-js/modules/es6.string.ends-with.js");
__webpack_require__(/*! ../modules/es6.string.includes */ "../../node_modules/core-js/modules/es6.string.includes.js");
__webpack_require__(/*! ../modules/es6.string.repeat */ "../../node_modules/core-js/modules/es6.string.repeat.js");
__webpack_require__(/*! ../modules/es6.string.starts-with */ "../../node_modules/core-js/modules/es6.string.starts-with.js");
__webpack_require__(/*! ../modules/es6.string.anchor */ "../../node_modules/core-js/modules/es6.string.anchor.js");
__webpack_require__(/*! ../modules/es6.string.big */ "../../node_modules/core-js/modules/es6.string.big.js");
__webpack_require__(/*! ../modules/es6.string.blink */ "../../node_modules/core-js/modules/es6.string.blink.js");
__webpack_require__(/*! ../modules/es6.string.bold */ "../../node_modules/core-js/modules/es6.string.bold.js");
__webpack_require__(/*! ../modules/es6.string.fixed */ "../../node_modules/core-js/modules/es6.string.fixed.js");
__webpack_require__(/*! ../modules/es6.string.fontcolor */ "../../node_modules/core-js/modules/es6.string.fontcolor.js");
__webpack_require__(/*! ../modules/es6.string.fontsize */ "../../node_modules/core-js/modules/es6.string.fontsize.js");
__webpack_require__(/*! ../modules/es6.string.italics */ "../../node_modules/core-js/modules/es6.string.italics.js");
__webpack_require__(/*! ../modules/es6.string.link */ "../../node_modules/core-js/modules/es6.string.link.js");
__webpack_require__(/*! ../modules/es6.string.small */ "../../node_modules/core-js/modules/es6.string.small.js");
__webpack_require__(/*! ../modules/es6.string.strike */ "../../node_modules/core-js/modules/es6.string.strike.js");
__webpack_require__(/*! ../modules/es6.string.sub */ "../../node_modules/core-js/modules/es6.string.sub.js");
__webpack_require__(/*! ../modules/es6.string.sup */ "../../node_modules/core-js/modules/es6.string.sup.js");
__webpack_require__(/*! ../modules/es6.date.now */ "../../node_modules/core-js/modules/es6.date.now.js");
__webpack_require__(/*! ../modules/es6.date.to-json */ "../../node_modules/core-js/modules/es6.date.to-json.js");
__webpack_require__(/*! ../modules/es6.date.to-iso-string */ "../../node_modules/core-js/modules/es6.date.to-iso-string.js");
__webpack_require__(/*! ../modules/es6.date.to-string */ "../../node_modules/core-js/modules/es6.date.to-string.js");
__webpack_require__(/*! ../modules/es6.date.to-primitive */ "../../node_modules/core-js/modules/es6.date.to-primitive.js");
__webpack_require__(/*! ../modules/es6.array.is-array */ "../../node_modules/core-js/modules/es6.array.is-array.js");
__webpack_require__(/*! ../modules/es6.array.from */ "../../node_modules/core-js/modules/es6.array.from.js");
__webpack_require__(/*! ../modules/es6.array.of */ "../../node_modules/core-js/modules/es6.array.of.js");
__webpack_require__(/*! ../modules/es6.array.join */ "../../node_modules/core-js/modules/es6.array.join.js");
__webpack_require__(/*! ../modules/es6.array.slice */ "../../node_modules/core-js/modules/es6.array.slice.js");
__webpack_require__(/*! ../modules/es6.array.sort */ "../../node_modules/core-js/modules/es6.array.sort.js");
__webpack_require__(/*! ../modules/es6.array.for-each */ "../../node_modules/core-js/modules/es6.array.for-each.js");
__webpack_require__(/*! ../modules/es6.array.map */ "../../node_modules/core-js/modules/es6.array.map.js");
__webpack_require__(/*! ../modules/es6.array.filter */ "../../node_modules/core-js/modules/es6.array.filter.js");
__webpack_require__(/*! ../modules/es6.array.some */ "../../node_modules/core-js/modules/es6.array.some.js");
__webpack_require__(/*! ../modules/es6.array.every */ "../../node_modules/core-js/modules/es6.array.every.js");
__webpack_require__(/*! ../modules/es6.array.reduce */ "../../node_modules/core-js/modules/es6.array.reduce.js");
__webpack_require__(/*! ../modules/es6.array.reduce-right */ "../../node_modules/core-js/modules/es6.array.reduce-right.js");
__webpack_require__(/*! ../modules/es6.array.index-of */ "../../node_modules/core-js/modules/es6.array.index-of.js");
__webpack_require__(/*! ../modules/es6.array.last-index-of */ "../../node_modules/core-js/modules/es6.array.last-index-of.js");
__webpack_require__(/*! ../modules/es6.array.copy-within */ "../../node_modules/core-js/modules/es6.array.copy-within.js");
__webpack_require__(/*! ../modules/es6.array.fill */ "../../node_modules/core-js/modules/es6.array.fill.js");
__webpack_require__(/*! ../modules/es6.array.find */ "../../node_modules/core-js/modules/es6.array.find.js");
__webpack_require__(/*! ../modules/es6.array.find-index */ "../../node_modules/core-js/modules/es6.array.find-index.js");
__webpack_require__(/*! ../modules/es6.array.species */ "../../node_modules/core-js/modules/es6.array.species.js");
__webpack_require__(/*! ../modules/es6.array.iterator */ "../../node_modules/core-js/modules/es6.array.iterator.js");
__webpack_require__(/*! ../modules/es6.regexp.constructor */ "../../node_modules/core-js/modules/es6.regexp.constructor.js");
__webpack_require__(/*! ../modules/es6.regexp.exec */ "../../node_modules/core-js/modules/es6.regexp.exec.js");
__webpack_require__(/*! ../modules/es6.regexp.to-string */ "../../node_modules/core-js/modules/es6.regexp.to-string.js");
__webpack_require__(/*! ../modules/es6.regexp.flags */ "../../node_modules/core-js/modules/es6.regexp.flags.js");
__webpack_require__(/*! ../modules/es6.regexp.match */ "../../node_modules/core-js/modules/es6.regexp.match.js");
__webpack_require__(/*! ../modules/es6.regexp.replace */ "../../node_modules/core-js/modules/es6.regexp.replace.js");
__webpack_require__(/*! ../modules/es6.regexp.search */ "../../node_modules/core-js/modules/es6.regexp.search.js");
__webpack_require__(/*! ../modules/es6.regexp.split */ "../../node_modules/core-js/modules/es6.regexp.split.js");
__webpack_require__(/*! ../modules/es6.promise */ "../../node_modules/core-js/modules/es6.promise.js");
__webpack_require__(/*! ../modules/es6.map */ "../../node_modules/core-js/modules/es6.map.js");
__webpack_require__(/*! ../modules/es6.set */ "../../node_modules/core-js/modules/es6.set.js");
__webpack_require__(/*! ../modules/es6.weak-map */ "../../node_modules/core-js/modules/es6.weak-map.js");
__webpack_require__(/*! ../modules/es6.weak-set */ "../../node_modules/core-js/modules/es6.weak-set.js");
__webpack_require__(/*! ../modules/es6.typed.array-buffer */ "../../node_modules/core-js/modules/es6.typed.array-buffer.js");
__webpack_require__(/*! ../modules/es6.typed.data-view */ "../../node_modules/core-js/modules/es6.typed.data-view.js");
__webpack_require__(/*! ../modules/es6.typed.int8-array */ "../../node_modules/core-js/modules/es6.typed.int8-array.js");
__webpack_require__(/*! ../modules/es6.typed.uint8-array */ "../../node_modules/core-js/modules/es6.typed.uint8-array.js");
__webpack_require__(/*! ../modules/es6.typed.uint8-clamped-array */ "../../node_modules/core-js/modules/es6.typed.uint8-clamped-array.js");
__webpack_require__(/*! ../modules/es6.typed.int16-array */ "../../node_modules/core-js/modules/es6.typed.int16-array.js");
__webpack_require__(/*! ../modules/es6.typed.uint16-array */ "../../node_modules/core-js/modules/es6.typed.uint16-array.js");
__webpack_require__(/*! ../modules/es6.typed.int32-array */ "../../node_modules/core-js/modules/es6.typed.int32-array.js");
__webpack_require__(/*! ../modules/es6.typed.uint32-array */ "../../node_modules/core-js/modules/es6.typed.uint32-array.js");
__webpack_require__(/*! ../modules/es6.typed.float32-array */ "../../node_modules/core-js/modules/es6.typed.float32-array.js");
__webpack_require__(/*! ../modules/es6.typed.float64-array */ "../../node_modules/core-js/modules/es6.typed.float64-array.js");
__webpack_require__(/*! ../modules/es6.reflect.apply */ "../../node_modules/core-js/modules/es6.reflect.apply.js");
__webpack_require__(/*! ../modules/es6.reflect.construct */ "../../node_modules/core-js/modules/es6.reflect.construct.js");
__webpack_require__(/*! ../modules/es6.reflect.define-property */ "../../node_modules/core-js/modules/es6.reflect.define-property.js");
__webpack_require__(/*! ../modules/es6.reflect.delete-property */ "../../node_modules/core-js/modules/es6.reflect.delete-property.js");
__webpack_require__(/*! ../modules/es6.reflect.enumerate */ "../../node_modules/core-js/modules/es6.reflect.enumerate.js");
__webpack_require__(/*! ../modules/es6.reflect.get */ "../../node_modules/core-js/modules/es6.reflect.get.js");
__webpack_require__(/*! ../modules/es6.reflect.get-own-property-descriptor */ "../../node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js");
__webpack_require__(/*! ../modules/es6.reflect.get-prototype-of */ "../../node_modules/core-js/modules/es6.reflect.get-prototype-of.js");
__webpack_require__(/*! ../modules/es6.reflect.has */ "../../node_modules/core-js/modules/es6.reflect.has.js");
__webpack_require__(/*! ../modules/es6.reflect.is-extensible */ "../../node_modules/core-js/modules/es6.reflect.is-extensible.js");
__webpack_require__(/*! ../modules/es6.reflect.own-keys */ "../../node_modules/core-js/modules/es6.reflect.own-keys.js");
__webpack_require__(/*! ../modules/es6.reflect.prevent-extensions */ "../../node_modules/core-js/modules/es6.reflect.prevent-extensions.js");
__webpack_require__(/*! ../modules/es6.reflect.set */ "../../node_modules/core-js/modules/es6.reflect.set.js");
__webpack_require__(/*! ../modules/es6.reflect.set-prototype-of */ "../../node_modules/core-js/modules/es6.reflect.set-prototype-of.js");
module.exports = __webpack_require__(/*! ../modules/_core */ "../../node_modules/core-js/modules/_core.js");
/***/ }),
/***/ "../../node_modules/core-js/fn/array/flat-map.js":
/*!******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/fn/array/flat-map.js ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ../../modules/es7.array.flat-map */ "../../node_modules/core-js/modules/es7.array.flat-map.js");
module.exports = __webpack_require__(/*! ../../modules/_core */ "../../node_modules/core-js/modules/_core.js").Array.flatMap;
/***/ }),
/***/ "../../node_modules/core-js/fn/array/includes.js":
/*!******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/fn/array/includes.js ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ../../modules/es7.array.includes */ "../../node_modules/core-js/modules/es7.array.includes.js");
module.exports = __webpack_require__(/*! ../../modules/_core */ "../../node_modules/core-js/modules/_core.js").Array.includes;
/***/ }),
/***/ "../../node_modules/core-js/fn/object/entries.js":
/*!******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/fn/object/entries.js ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ../../modules/es7.object.entries */ "../../node_modules/core-js/modules/es7.object.entries.js");
module.exports = __webpack_require__(/*! ../../modules/_core */ "../../node_modules/core-js/modules/_core.js").Object.entries;
/***/ }),
/***/ "../../node_modules/core-js/fn/object/get-own-property-descriptors.js":
/*!***************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/fn/object/get-own-property-descriptors.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ../../modules/es7.object.get-own-property-descriptors */ "../../node_modules/core-js/modules/es7.object.get-own-property-descriptors.js");
module.exports = __webpack_require__(/*! ../../modules/_core */ "../../node_modules/core-js/modules/_core.js").Object.getOwnPropertyDescriptors;
/***/ }),
/***/ "../../node_modules/core-js/fn/object/values.js":
/*!*****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/fn/object/values.js ***!
\*****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ../../modules/es7.object.values */ "../../node_modules/core-js/modules/es7.object.values.js");
module.exports = __webpack_require__(/*! ../../modules/_core */ "../../node_modules/core-js/modules/_core.js").Object.values;
/***/ }),
/***/ "../../node_modules/core-js/fn/promise/finally.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/fn/promise/finally.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(/*! ../../modules/es6.promise */ "../../node_modules/core-js/modules/es6.promise.js");
__webpack_require__(/*! ../../modules/es7.promise.finally */ "../../node_modules/core-js/modules/es7.promise.finally.js");
module.exports = __webpack_require__(/*! ../../modules/_core */ "../../node_modules/core-js/modules/_core.js").Promise['finally'];
/***/ }),
/***/ "../../node_modules/core-js/fn/string/pad-end.js":
/*!******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/fn/string/pad-end.js ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ../../modules/es7.string.pad-end */ "../../node_modules/core-js/modules/es7.string.pad-end.js");
module.exports = __webpack_require__(/*! ../../modules/_core */ "../../node_modules/core-js/modules/_core.js").String.padEnd;
/***/ }),
/***/ "../../node_modules/core-js/fn/string/pad-start.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/fn/string/pad-start.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ../../modules/es7.string.pad-start */ "../../node_modules/core-js/modules/es7.string.pad-start.js");
module.exports = __webpack_require__(/*! ../../modules/_core */ "../../node_modules/core-js/modules/_core.js").String.padStart;
/***/ }),
/***/ "../../node_modules/core-js/fn/string/trim-end.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/fn/string/trim-end.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ../../modules/es7.string.trim-right */ "../../node_modules/core-js/modules/es7.string.trim-right.js");
module.exports = __webpack_require__(/*! ../../modules/_core */ "../../node_modules/core-js/modules/_core.js").String.trimRight;
/***/ }),
/***/ "../../node_modules/core-js/fn/string/trim-start.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/fn/string/trim-start.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ../../modules/es7.string.trim-left */ "../../node_modules/core-js/modules/es7.string.trim-left.js");
module.exports = __webpack_require__(/*! ../../modules/_core */ "../../node_modules/core-js/modules/_core.js").String.trimLeft;
/***/ }),
/***/ "../../node_modules/core-js/fn/symbol/async-iterator.js":
/*!*************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/fn/symbol/async-iterator.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ../../modules/es7.symbol.async-iterator */ "../../node_modules/core-js/modules/es7.symbol.async-iterator.js");
module.exports = __webpack_require__(/*! ../../modules/_wks-ext */ "../../node_modules/core-js/modules/_wks-ext.js").f('asyncIterator');
/***/ }),
/***/ "../../node_modules/core-js/library/fn/global.js":
/*!******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/library/fn/global.js ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ../modules/es7.global */ "../../node_modules/core-js/library/modules/es7.global.js");
module.exports = __webpack_require__(/*! ../modules/_core */ "../../node_modules/core-js/library/modules/_core.js").global;
/***/ }),
/***/ "../../node_modules/core-js/library/modules/_a-function.js":
/*!****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/library/modules/_a-function.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (it) {
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
return it;
};
/***/ }),
/***/ "../../node_modules/core-js/library/modules/_an-object.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/library/modules/_an-object.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/library/modules/_is-object.js");
module.exports = function (it) {
if (!isObject(it)) throw TypeError(it + ' is not an object!');
return it;
};
/***/ }),
/***/ "../../node_modules/core-js/library/modules/_core.js":
/*!**********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/library/modules/_core.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
var core = module.exports = { version: '2.6.11' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
/***/ }),
/***/ "../../node_modules/core-js/library/modules/_ctx.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/library/modules/_ctx.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// optional / simple context binding
var aFunction = __webpack_require__(/*! ./_a-function */ "../../node_modules/core-js/library/modules/_a-function.js");
module.exports = function (fn, that, length) {
aFunction(fn);
if (that === undefined) return fn;
switch (length) {
case 1: return function (a) {
return fn.call(that, a);
};
case 2: return function (a, b) {
return fn.call(that, a, b);
};
case 3: return function (a, b, c) {
return fn.call(that, a, b, c);
};
}
return function (/* ...args */) {
return fn.apply(that, arguments);
};
};
/***/ }),
/***/ "../../node_modules/core-js/library/modules/_descriptors.js":
/*!*****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/library/modules/_descriptors.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(/*! ./_fails */ "../../node_modules/core-js/library/modules/_fails.js")(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/***/ "../../node_modules/core-js/library/modules/_dom-create.js":
/*!****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/library/modules/_dom-create.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/library/modules/_is-object.js");
var document = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/library/modules/_global.js").document;
// typeof document.createElement is 'object' in old IE
var is = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
return is ? document.createElement(it) : {};
};
/***/ }),
/***/ "../../node_modules/core-js/library/modules/_export.js":
/*!************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/library/modules/_export.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/library/modules/_global.js");
var core = __webpack_require__(/*! ./_core */ "../../node_modules/core-js/library/modules/_core.js");
var ctx = __webpack_require__(/*! ./_ctx */ "../../node_modules/core-js/library/modules/_ctx.js");
var hide = __webpack_require__(/*! ./_hide */ "../../node_modules/core-js/library/modules/_hide.js");
var has = __webpack_require__(/*! ./_has */ "../../node_modules/core-js/library/modules/_has.js");
var PROTOTYPE = 'prototype';
var $export = function (type, name, source) {
var IS_FORCED = type & $export.F;
var IS_GLOBAL = type & $export.G;
var IS_STATIC = type & $export.S;
var IS_PROTO = type & $export.P;
var IS_BIND = type & $export.B;
var IS_WRAP = type & $export.W;
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
var expProto = exports[PROTOTYPE];
var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
var key, own, out;
if (IS_GLOBAL) source = name;
for (key in source) {
// contains in native
own = !IS_FORCED && target && target[key] !== undefined;
if (own && has(exports, key)) continue;
// export native or passed
out = own ? target[key] : source[key];
// prevent global pollution for namespaces
exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
// bind timers to global for call from export context
: IS_BIND && own ? ctx(out, global)
// wrap global constructors for prevent change them in library
: IS_WRAP && target[key] == out ? (function (C) {
var F = function (a, b, c) {
if (this instanceof C) {
switch (arguments.length) {
case 0: return new C();
case 1: return new C(a);
case 2: return new C(a, b);
} return new C(a, b, c);
} return C.apply(this, arguments);
};
F[PROTOTYPE] = C[PROTOTYPE];
return F;
// make static versions for prototype methods
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
// export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
if (IS_PROTO) {
(exports.virtual || (exports.virtual = {}))[key] = out;
// export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
}
}
};
// type bitmap
$export.F = 1; // forced
$export.G = 2; // global
$export.S = 4; // static
$export.P = 8; // proto
$export.B = 16; // bind
$export.W = 32; // wrap
$export.U = 64; // safe
$export.R = 128; // real proto method for `library`
module.exports = $export;
/***/ }),
/***/ "../../node_modules/core-js/library/modules/_fails.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/library/modules/_fails.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return !!exec();
} catch (e) {
return true;
}
};
/***/ }),
/***/ "../../node_modules/core-js/library/modules/_global.js":
/*!************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/library/modules/_global.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
? window : typeof self != 'undefined' && self.Math == Math ? self
// eslint-disable-next-line no-new-func
: Function('return this')();
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
/***/ }),
/***/ "../../node_modules/core-js/library/modules/_has.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/library/modules/_has.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/***/ "../../node_modules/core-js/library/modules/_hide.js":
/*!**********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/library/modules/_hide.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/library/modules/_object-dp.js");
var createDesc = __webpack_require__(/*! ./_property-desc */ "../../node_modules/core-js/library/modules/_property-desc.js");
module.exports = __webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/library/modules/_descriptors.js") ? function (object, key, value) {
return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/***/ "../../node_modules/core-js/library/modules/_ie8-dom-define.js":
/*!********************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/library/modules/_ie8-dom-define.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = !__webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/library/modules/_descriptors.js") && !__webpack_require__(/*! ./_fails */ "../../node_modules/core-js/library/modules/_fails.js")(function () {
return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ "../../node_modules/core-js/library/modules/_dom-create.js")('div'), 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/***/ "../../node_modules/core-js/library/modules/_is-object.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/library/modules/_is-object.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/***/ "../../node_modules/core-js/library/modules/_object-dp.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/library/modules/_object-dp.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/library/modules/_an-object.js");
var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "../../node_modules/core-js/library/modules/_ie8-dom-define.js");
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "../../node_modules/core-js/library/modules/_to-primitive.js");
var dP = Object.defineProperty;
exports.f = __webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/library/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
if (IE8_DOM_DEFINE) try {
return dP(O, P, Attributes);
} catch (e) { /* empty */ }
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
if ('value' in Attributes) O[P] = Attributes.value;
return O;
};
/***/ }),
/***/ "../../node_modules/core-js/library/modules/_property-desc.js":
/*!*******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/library/modules/_property-desc.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/***/ "../../node_modules/core-js/library/modules/_to-primitive.js":
/*!******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/library/modules/_to-primitive.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/library/modules/_is-object.js");
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (it, S) {
if (!isObject(it)) return it;
var fn, val;
if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
throw TypeError("Can't convert object to primitive value");
};
/***/ }),
/***/ "../../node_modules/core-js/library/modules/es7.global.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/library/modules/es7.global.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/tc39/proposal-global
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/library/modules/_export.js");
$export($export.G, { global: __webpack_require__(/*! ./_global */ "../../node_modules/core-js/library/modules/_global.js") });
/***/ }),
/***/ "../../node_modules/core-js/modules/_a-function.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_a-function.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (it) {
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
return it;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_a-number-value.js":
/*!************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_a-number-value.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var cof = __webpack_require__(/*! ./_cof */ "../../node_modules/core-js/modules/_cof.js");
module.exports = function (it, msg) {
if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg);
return +it;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_add-to-unscopables.js":
/*!****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_add-to-unscopables.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 22.1.3.31 Array.prototype[@@unscopables]
var UNSCOPABLES = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js")('unscopables');
var ArrayProto = Array.prototype;
if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(/*! ./_hide */ "../../node_modules/core-js/modules/_hide.js")(ArrayProto, UNSCOPABLES, {});
module.exports = function (key) {
ArrayProto[UNSCOPABLES][key] = true;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_advance-string-index.js":
/*!******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_advance-string-index.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var at = __webpack_require__(/*! ./_string-at */ "../../node_modules/core-js/modules/_string-at.js")(true);
// `AdvanceStringIndex` abstract operation
// https://tc39.github.io/ecma262/#sec-advancestringindex
module.exports = function (S, index, unicode) {
return index + (unicode ? at(S, index).length : 1);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_an-instance.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_an-instance.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (it, Constructor, name, forbiddenField) {
if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
throw TypeError(name + ': incorrect invocation!');
} return it;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_an-object.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_an-object.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
module.exports = function (it) {
if (!isObject(it)) throw TypeError(it + ' is not an object!');
return it;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_array-copy-within.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_array-copy-within.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
var toObject = __webpack_require__(/*! ./_to-object */ "../../node_modules/core-js/modules/_to-object.js");
var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "../../node_modules/core-js/modules/_to-absolute-index.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
var O = toObject(this);
var len = toLength(O.length);
var to = toAbsoluteIndex(target, len);
var from = toAbsoluteIndex(start, len);
var end = arguments.length > 2 ? arguments[2] : undefined;
var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
var inc = 1;
if (from < to && to < from + count) {
inc = -1;
from += count - 1;
to += count - 1;
}
while (count-- > 0) {
if (from in O) O[to] = O[from];
else delete O[to];
to += inc;
from += inc;
} return O;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_array-fill.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_array-fill.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
var toObject = __webpack_require__(/*! ./_to-object */ "../../node_modules/core-js/modules/_to-object.js");
var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "../../node_modules/core-js/modules/_to-absolute-index.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
module.exports = function fill(value /* , start = 0, end = @length */) {
var O = toObject(this);
var length = toLength(O.length);
var aLen = arguments.length;
var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);
var end = aLen > 2 ? arguments[2] : undefined;
var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
while (endPos > index) O[index++] = value;
return O;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_array-includes.js":
/*!************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_array-includes.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// false -> Array#indexOf
// true -> Array#includes
var toIObject = __webpack_require__(/*! ./_to-iobject */ "../../node_modules/core-js/modules/_to-iobject.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "../../node_modules/core-js/modules/_to-absolute-index.js");
module.exports = function (IS_INCLUDES) {
return function ($this, el, fromIndex) {
var O = toIObject($this);
var length = toLength(O.length);
var index = toAbsoluteIndex(fromIndex, length);
var value;
// Array#includes uses SameValueZero equality algorithm
// eslint-disable-next-line no-self-compare
if (IS_INCLUDES && el != el) while (length > index) {
value = O[index++];
// eslint-disable-next-line no-self-compare
if (value != value) return true;
// Array#indexOf ignores holes, Array#includes - not
} else for (;length > index; index++) if (IS_INCLUDES || index in O) {
if (O[index] === el) return IS_INCLUDES || index || 0;
} return !IS_INCLUDES && -1;
};
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_array-methods.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_array-methods.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 0 -> Array#forEach
// 1 -> Array#map
// 2 -> Array#filter
// 3 -> Array#some
// 4 -> Array#every
// 5 -> Array#find
// 6 -> Array#findIndex
var ctx = __webpack_require__(/*! ./_ctx */ "../../node_modules/core-js/modules/_ctx.js");
var IObject = __webpack_require__(/*! ./_iobject */ "../../node_modules/core-js/modules/_iobject.js");
var toObject = __webpack_require__(/*! ./_to-object */ "../../node_modules/core-js/modules/_to-object.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
var asc = __webpack_require__(/*! ./_array-species-create */ "../../node_modules/core-js/modules/_array-species-create.js");
module.exports = function (TYPE, $create) {
var IS_MAP = TYPE == 1;
var IS_FILTER = TYPE == 2;
var IS_SOME = TYPE == 3;
var IS_EVERY = TYPE == 4;
var IS_FIND_INDEX = TYPE == 6;
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
var create = $create || asc;
return function ($this, callbackfn, that) {
var O = toObject($this);
var self = IObject(O);
var f = ctx(callbackfn, that, 3);
var length = toLength(self.length);
var index = 0;
var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
var val, res;
for (;length > index; index++) if (NO_HOLES || index in self) {
val = self[index];
res = f(val, index, O);
if (TYPE) {
if (IS_MAP) result[index] = res; // map
else if (res) switch (TYPE) {
case 3: return true; // some
case 5: return val; // find
case 6: return index; // findIndex
case 2: result.push(val); // filter
} else if (IS_EVERY) return false; // every
}
}
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
};
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_array-reduce.js":
/*!**********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_array-reduce.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var aFunction = __webpack_require__(/*! ./_a-function */ "../../node_modules/core-js/modules/_a-function.js");
var toObject = __webpack_require__(/*! ./_to-object */ "../../node_modules/core-js/modules/_to-object.js");
var IObject = __webpack_require__(/*! ./_iobject */ "../../node_modules/core-js/modules/_iobject.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
module.exports = function (that, callbackfn, aLen, memo, isRight) {
aFunction(callbackfn);
var O = toObject(that);
var self = IObject(O);
var length = toLength(O.length);
var index = isRight ? length - 1 : 0;
var i = isRight ? -1 : 1;
if (aLen < 2) for (;;) {
if (index in self) {
memo = self[index];
index += i;
break;
}
index += i;
if (isRight ? index < 0 : length <= index) {
throw TypeError('Reduce of empty array with no initial value');
}
}
for (;isRight ? index >= 0 : length > index; index += i) if (index in self) {
memo = callbackfn(memo, self[index], index, O);
}
return memo;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_array-species-constructor.js":
/*!***********************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_array-species-constructor.js ***!
\***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var isArray = __webpack_require__(/*! ./_is-array */ "../../node_modules/core-js/modules/_is-array.js");
var SPECIES = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js")('species');
module.exports = function (original) {
var C;
if (isArray(original)) {
C = original.constructor;
// cross-realm fallback
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
if (isObject(C)) {
C = C[SPECIES];
if (C === null) C = undefined;
}
} return C === undefined ? Array : C;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_array-species-create.js":
/*!******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_array-species-create.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
var speciesConstructor = __webpack_require__(/*! ./_array-species-constructor */ "../../node_modules/core-js/modules/_array-species-constructor.js");
module.exports = function (original, length) {
return new (speciesConstructor(original))(length);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_bind.js":
/*!**************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_bind.js ***!
\**************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aFunction = __webpack_require__(/*! ./_a-function */ "../../node_modules/core-js/modules/_a-function.js");
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var invoke = __webpack_require__(/*! ./_invoke */ "../../node_modules/core-js/modules/_invoke.js");
var arraySlice = [].slice;
var factories = {};
var construct = function (F, len, args) {
if (!(len in factories)) {
for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']';
// eslint-disable-next-line no-new-func
factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
} return factories[len](F, args);
};
module.exports = Function.bind || function bind(that /* , ...args */) {
var fn = aFunction(this);
var partArgs = arraySlice.call(arguments, 1);
var bound = function (/* args... */) {
var args = partArgs.concat(arraySlice.call(arguments));
return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
};
if (isObject(fn.prototype)) bound.prototype = fn.prototype;
return bound;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_classof.js":
/*!*****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_classof.js ***!
\*****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// getting tag from 19.1.3.6 Object.prototype.toString()
var cof = __webpack_require__(/*! ./_cof */ "../../node_modules/core-js/modules/_cof.js");
var TAG = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js")('toStringTag');
// ES3 wrong here
var ARG = cof(function () { return arguments; }()) == 'Arguments';
// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
try {
return it[key];
} catch (e) { /* empty */ }
};
module.exports = function (it) {
var O, T, B;
return it === undefined ? 'Undefined' : it === null ? 'Null'
// @@toStringTag case
: typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
// builtinTag case
: ARG ? cof(O)
// ES3 arguments fallback
: (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_cof.js":
/*!*************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_cof.js ***!
\*************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = function (it) {
return toString.call(it).slice(8, -1);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_collection-strong.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_collection-strong.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var dP = __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/modules/_object-dp.js").f;
var create = __webpack_require__(/*! ./_object-create */ "../../node_modules/core-js/modules/_object-create.js");
var redefineAll = __webpack_require__(/*! ./_redefine-all */ "../../node_modules/core-js/modules/_redefine-all.js");
var ctx = __webpack_require__(/*! ./_ctx */ "../../node_modules/core-js/modules/_ctx.js");
var anInstance = __webpack_require__(/*! ./_an-instance */ "../../node_modules/core-js/modules/_an-instance.js");
var forOf = __webpack_require__(/*! ./_for-of */ "../../node_modules/core-js/modules/_for-of.js");
var $iterDefine = __webpack_require__(/*! ./_iter-define */ "../../node_modules/core-js/modules/_iter-define.js");
var step = __webpack_require__(/*! ./_iter-step */ "../../node_modules/core-js/modules/_iter-step.js");
var setSpecies = __webpack_require__(/*! ./_set-species */ "../../node_modules/core-js/modules/_set-species.js");
var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/modules/_descriptors.js");
var fastKey = __webpack_require__(/*! ./_meta */ "../../node_modules/core-js/modules/_meta.js").fastKey;
var validate = __webpack_require__(/*! ./_validate-collection */ "../../node_modules/core-js/modules/_validate-collection.js");
var SIZE = DESCRIPTORS ? '_s' : 'size';
var getEntry = function (that, key) {
// fast case
var index = fastKey(key);
var entry;
if (index !== 'F') return that._i[index];
// frozen object case
for (entry = that._f; entry; entry = entry.n) {
if (entry.k == key) return entry;
}
};
module.exports = {
getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
var C = wrapper(function (that, iterable) {
anInstance(that, C, NAME, '_i');
that._t = NAME; // collection type
that._i = create(null); // index
that._f = undefined; // first entry
that._l = undefined; // last entry
that[SIZE] = 0; // size
if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
});
redefineAll(C.prototype, {
// 23.1.3.1 Map.prototype.clear()
// 23.2.3.2 Set.prototype.clear()
clear: function clear() {
for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
entry.r = true;
if (entry.p) entry.p = entry.p.n = undefined;
delete data[entry.i];
}
that._f = that._l = undefined;
that[SIZE] = 0;
},
// 23.1.3.3 Map.prototype.delete(key)
// 23.2.3.4 Set.prototype.delete(value)
'delete': function (key) {
var that = validate(this, NAME);
var entry = getEntry(that, key);
if (entry) {
var next = entry.n;
var prev = entry.p;
delete that._i[entry.i];
entry.r = true;
if (prev) prev.n = next;
if (next) next.p = prev;
if (that._f == entry) that._f = next;
if (that._l == entry) that._l = prev;
that[SIZE]--;
} return !!entry;
},
// 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
// 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
forEach: function forEach(callbackfn /* , that = undefined */) {
validate(this, NAME);
var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
var entry;
while (entry = entry ? entry.n : this._f) {
f(entry.v, entry.k, this);
// revert to the last existing entry
while (entry && entry.r) entry = entry.p;
}
},
// 23.1.3.7 Map.prototype.has(key)
// 23.2.3.7 Set.prototype.has(value)
has: function has(key) {
return !!getEntry(validate(this, NAME), key);
}
});
if (DESCRIPTORS) dP(C.prototype, 'size', {
get: function () {
return validate(this, NAME)[SIZE];
}
});
return C;
},
def: function (that, key, value) {
var entry = getEntry(that, key);
var prev, index;
// change existing entry
if (entry) {
entry.v = value;
// create new entry
} else {
that._l = entry = {
i: index = fastKey(key, true), // <- index
k: key, // <- key
v: value, // <- value
p: prev = that._l, // <- previous entry
n: undefined, // <- next entry
r: false // <- removed
};
if (!that._f) that._f = entry;
if (prev) prev.n = entry;
that[SIZE]++;
// add to index
if (index !== 'F') that._i[index] = entry;
} return that;
},
getEntry: getEntry,
setStrong: function (C, NAME, IS_MAP) {
// add .keys, .values, .entries, [@@iterator]
// 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
$iterDefine(C, NAME, function (iterated, kind) {
this._t = validate(iterated, NAME); // target
this._k = kind; // kind
this._l = undefined; // previous
}, function () {
var that = this;
var kind = that._k;
var entry = that._l;
// revert to the last existing entry
while (entry && entry.r) entry = entry.p;
// get next entry
if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
// or finish the iteration
that._t = undefined;
return step(1);
}
// return step by kind
if (kind == 'keys') return step(0, entry.k);
if (kind == 'values') return step(0, entry.v);
return step(0, [entry.k, entry.v]);
}, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
// add [@@species], 23.1.2.2, 23.2.2.2
setSpecies(NAME);
}
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_collection-weak.js":
/*!*************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_collection-weak.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var redefineAll = __webpack_require__(/*! ./_redefine-all */ "../../node_modules/core-js/modules/_redefine-all.js");
var getWeak = __webpack_require__(/*! ./_meta */ "../../node_modules/core-js/modules/_meta.js").getWeak;
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var anInstance = __webpack_require__(/*! ./_an-instance */ "../../node_modules/core-js/modules/_an-instance.js");
var forOf = __webpack_require__(/*! ./_for-of */ "../../node_modules/core-js/modules/_for-of.js");
var createArrayMethod = __webpack_require__(/*! ./_array-methods */ "../../node_modules/core-js/modules/_array-methods.js");
var $has = __webpack_require__(/*! ./_has */ "../../node_modules/core-js/modules/_has.js");
var validate = __webpack_require__(/*! ./_validate-collection */ "../../node_modules/core-js/modules/_validate-collection.js");
var arrayFind = createArrayMethod(5);
var arrayFindIndex = createArrayMethod(6);
var id = 0;
// fallback for uncaught frozen keys
var uncaughtFrozenStore = function (that) {
return that._l || (that._l = new UncaughtFrozenStore());
};
var UncaughtFrozenStore = function () {
this.a = [];
};
var findUncaughtFrozen = function (store, key) {
return arrayFind(store.a, function (it) {
return it[0] === key;
});
};
UncaughtFrozenStore.prototype = {
get: function (key) {
var entry = findUncaughtFrozen(this, key);
if (entry) return entry[1];
},
has: function (key) {
return !!findUncaughtFrozen(this, key);
},
set: function (key, value) {
var entry = findUncaughtFrozen(this, key);
if (entry) entry[1] = value;
else this.a.push([key, value]);
},
'delete': function (key) {
var index = arrayFindIndex(this.a, function (it) {
return it[0] === key;
});
if (~index) this.a.splice(index, 1);
return !!~index;
}
};
module.exports = {
getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
var C = wrapper(function (that, iterable) {
anInstance(that, C, NAME, '_i');
that._t = NAME; // collection type
that._i = id++; // collection id
that._l = undefined; // leak store for uncaught frozen objects
if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
});
redefineAll(C.prototype, {
// 23.3.3.2 WeakMap.prototype.delete(key)
// 23.4.3.3 WeakSet.prototype.delete(value)
'delete': function (key) {
if (!isObject(key)) return false;
var data = getWeak(key);
if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);
return data && $has(data, this._i) && delete data[this._i];
},
// 23.3.3.4 WeakMap.prototype.has(key)
// 23.4.3.4 WeakSet.prototype.has(value)
has: function has(key) {
if (!isObject(key)) return false;
var data = getWeak(key);
if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);
return data && $has(data, this._i);
}
});
return C;
},
def: function (that, key, value) {
var data = getWeak(anObject(key), true);
if (data === true) uncaughtFrozenStore(that).set(key, value);
else data[that._i] = value;
return that;
},
ufstore: uncaughtFrozenStore
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_collection.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_collection.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var redefine = __webpack_require__(/*! ./_redefine */ "../../node_modules/core-js/modules/_redefine.js");
var redefineAll = __webpack_require__(/*! ./_redefine-all */ "../../node_modules/core-js/modules/_redefine-all.js");
var meta = __webpack_require__(/*! ./_meta */ "../../node_modules/core-js/modules/_meta.js");
var forOf = __webpack_require__(/*! ./_for-of */ "../../node_modules/core-js/modules/_for-of.js");
var anInstance = __webpack_require__(/*! ./_an-instance */ "../../node_modules/core-js/modules/_an-instance.js");
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var fails = __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js");
var $iterDetect = __webpack_require__(/*! ./_iter-detect */ "../../node_modules/core-js/modules/_iter-detect.js");
var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "../../node_modules/core-js/modules/_set-to-string-tag.js");
var inheritIfRequired = __webpack_require__(/*! ./_inherit-if-required */ "../../node_modules/core-js/modules/_inherit-if-required.js");
module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
var Base = global[NAME];
var C = Base;
var ADDER = IS_MAP ? 'set' : 'add';
var proto = C && C.prototype;
var O = {};
var fixMethod = function (KEY) {
var fn = proto[KEY];
redefine(proto, KEY,
KEY == 'delete' ? function (a) {
return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
} : KEY == 'has' ? function has(a) {
return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
} : KEY == 'get' ? function get(a) {
return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
} : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }
: function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }
);
};
if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {
new C().entries().next();
}))) {
// create collection constructor
C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
redefineAll(C.prototype, methods);
meta.NEED = true;
} else {
var instance = new C();
// early implementations not supports chaining
var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
// V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
// most early implementations doesn't supports iterables, most modern - not close it correctly
var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new
// for early implementations -0 and +0 not the same
var BUGGY_ZERO = !IS_WEAK && fails(function () {
// V8 ~ Chromium 42- fails only with 5+ elements
var $instance = new C();
var index = 5;
while (index--) $instance[ADDER](index, index);
return !$instance.has(-0);
});
if (!ACCEPT_ITERABLES) {
C = wrapper(function (target, iterable) {
anInstance(target, C, NAME);
var that = inheritIfRequired(new Base(), target, C);
if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
return that;
});
C.prototype = proto;
proto.constructor = C;
}
if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
fixMethod('delete');
fixMethod('has');
IS_MAP && fixMethod('get');
}
if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
// weak collections should not contains .clear method
if (IS_WEAK && proto.clear) delete proto.clear;
}
setToStringTag(C, NAME);
O[NAME] = C;
$export($export.G + $export.W + $export.F * (C != Base), O);
if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);
return C;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_core.js":
/*!**************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_core.js ***!
\**************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
var core = module.exports = { version: '2.6.11' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
/***/ }),
/***/ "../../node_modules/core-js/modules/_create-property.js":
/*!*************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_create-property.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $defineProperty = __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/modules/_object-dp.js");
var createDesc = __webpack_require__(/*! ./_property-desc */ "../../node_modules/core-js/modules/_property-desc.js");
module.exports = function (object, index, value) {
if (index in object) $defineProperty.f(object, index, createDesc(0, value));
else object[index] = value;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_ctx.js":
/*!*************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_ctx.js ***!
\*************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// optional / simple context binding
var aFunction = __webpack_require__(/*! ./_a-function */ "../../node_modules/core-js/modules/_a-function.js");
module.exports = function (fn, that, length) {
aFunction(fn);
if (that === undefined) return fn;
switch (length) {
case 1: return function (a) {
return fn.call(that, a);
};
case 2: return function (a, b) {
return fn.call(that, a, b);
};
case 3: return function (a, b, c) {
return fn.call(that, a, b, c);
};
}
return function (/* ...args */) {
return fn.apply(that, arguments);
};
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_date-to-iso-string.js":
/*!****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_date-to-iso-string.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
var fails = __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js");
var getTime = Date.prototype.getTime;
var $toISOString = Date.prototype.toISOString;
var lz = function (num) {
return num > 9 ? num : '0' + num;
};
// PhantomJS / old WebKit has a broken implementations
module.exports = (fails(function () {
return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';
}) || !fails(function () {
$toISOString.call(new Date(NaN));
})) ? function toISOString() {
if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value');
var d = this;
var y = d.getUTCFullYear();
var m = d.getUTCMilliseconds();
var s = y < 0 ? '-' : y > 9999 ? '+' : '';
return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
'-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
} : $toISOString;
/***/ }),
/***/ "../../node_modules/core-js/modules/_date-to-primitive.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_date-to-primitive.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "../../node_modules/core-js/modules/_to-primitive.js");
var NUMBER = 'number';
module.exports = function (hint) {
if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint');
return toPrimitive(anObject(this), hint != NUMBER);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_defined.js":
/*!*****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_defined.js ***!
\*****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// 7.2.1 RequireObjectCoercible(argument)
module.exports = function (it) {
if (it == undefined) throw TypeError("Can't call method on " + it);
return it;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_descriptors.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_descriptors.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js")(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/***/ "../../node_modules/core-js/modules/_dom-create.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_dom-create.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var document = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js").document;
// typeof document.createElement is 'object' in old IE
var is = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
return is ? document.createElement(it) : {};
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_enum-bug-keys.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_enum-bug-keys.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// IE 8- don't enum bug keys
module.exports = (
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');
/***/ }),
/***/ "../../node_modules/core-js/modules/_enum-keys.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_enum-keys.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// all enumerable object keys, includes symbols
var getKeys = __webpack_require__(/*! ./_object-keys */ "../../node_modules/core-js/modules/_object-keys.js");
var gOPS = __webpack_require__(/*! ./_object-gops */ "../../node_modules/core-js/modules/_object-gops.js");
var pIE = __webpack_require__(/*! ./_object-pie */ "../../node_modules/core-js/modules/_object-pie.js");
module.exports = function (it) {
var result = getKeys(it);
var getSymbols = gOPS.f;
if (getSymbols) {
var symbols = getSymbols(it);
var isEnum = pIE.f;
var i = 0;
var key;
while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
} return result;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_export.js":
/*!****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_export.js ***!
\****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var core = __webpack_require__(/*! ./_core */ "../../node_modules/core-js/modules/_core.js");
var hide = __webpack_require__(/*! ./_hide */ "../../node_modules/core-js/modules/_hide.js");
var redefine = __webpack_require__(/*! ./_redefine */ "../../node_modules/core-js/modules/_redefine.js");
var ctx = __webpack_require__(/*! ./_ctx */ "../../node_modules/core-js/modules/_ctx.js");
var PROTOTYPE = 'prototype';
var $export = function (type, name, source) {
var IS_FORCED = type & $export.F;
var IS_GLOBAL = type & $export.G;
var IS_STATIC = type & $export.S;
var IS_PROTO = type & $export.P;
var IS_BIND = type & $export.B;
var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
var key, own, out, exp;
if (IS_GLOBAL) source = name;
for (key in source) {
// contains in native
own = !IS_FORCED && target && target[key] !== undefined;
// export native or passed
out = (own ? target : source)[key];
// bind timers to global for call from export context
exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
// extend global
if (target) redefine(target, key, out, type & $export.U);
// export
if (exports[key] != out) hide(exports, key, exp);
if (IS_PROTO && expProto[key] != out) expProto[key] = out;
}
};
global.core = core;
// type bitmap
$export.F = 1; // forced
$export.G = 2; // global
$export.S = 4; // static
$export.P = 8; // proto
$export.B = 16; // bind
$export.W = 32; // wrap
$export.U = 64; // safe
$export.R = 128; // real proto method for `library`
module.exports = $export;
/***/ }),
/***/ "../../node_modules/core-js/modules/_fails-is-regexp.js":
/*!*************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_fails-is-regexp.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var MATCH = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js")('match');
module.exports = function (KEY) {
var re = /./;
try {
'/./'[KEY](re);
} catch (e) {
try {
re[MATCH] = false;
return !'/./'[KEY](re);
} catch (f) { /* empty */ }
} return true;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_fails.js":
/*!***************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_fails.js ***!
\***************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return !!exec();
} catch (e) {
return true;
}
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_fix-re-wks.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_fix-re-wks.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(/*! ./es6.regexp.exec */ "../../node_modules/core-js/modules/es6.regexp.exec.js");
var redefine = __webpack_require__(/*! ./_redefine */ "../../node_modules/core-js/modules/_redefine.js");
var hide = __webpack_require__(/*! ./_hide */ "../../node_modules/core-js/modules/_hide.js");
var fails = __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js");
var defined = __webpack_require__(/*! ./_defined */ "../../node_modules/core-js/modules/_defined.js");
var wks = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js");
var regexpExec = __webpack_require__(/*! ./_regexp-exec */ "../../node_modules/core-js/modules/_regexp-exec.js");
var SPECIES = wks('species');
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
// #replace needs built-in support for named groups.
// #match works fine because it just return the exec results, even if it has
// a "grops" property.
var re = /./;
re.exec = function () {
var result = [];
result.groups = { a: '7' };
return result;
};
return ''.replace(re, '$') !== '7';
});
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () {
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
var re = /(?:)/;
var originalExec = re.exec;
re.exec = function () { return originalExec.apply(this, arguments); };
var result = 'ab'.split(re);
return result.length === 2 && result[0] === 'a' && result[1] === 'b';
})();
module.exports = function (KEY, length, exec) {
var SYMBOL = wks(KEY);
var DELEGATES_TO_SYMBOL = !fails(function () {
// String methods call symbol-named RegEp methods
var O = {};
O[SYMBOL] = function () { return 7; };
return ''[KEY](O) != 7;
});
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () {
// Symbol-named RegExp methods call .exec
var execCalled = false;
var re = /a/;
re.exec = function () { execCalled = true; return null; };
if (KEY === 'split') {
// RegExp[@@split] doesn't call the regex's exec method, but first creates
// a new one. We need to return the patched regex when creating the new one.
re.constructor = {};
re.constructor[SPECIES] = function () { return re; };
}
re[SYMBOL]('');
return !execCalled;
}) : undefined;
if (
!DELEGATES_TO_SYMBOL ||
!DELEGATES_TO_EXEC ||
(KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
) {
var nativeRegExpMethod = /./[SYMBOL];
var fns = exec(
defined,
SYMBOL,
''[KEY],
function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {
if (regexp.exec === regexpExec) {
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
// The native String method already delegates to @@method (this
// polyfilled function), leasing to infinite recursion.
// We avoid it by directly calling the native @@method method.
return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
}
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
}
return { done: false };
}
);
var strfn = fns[0];
var rxfn = fns[1];
redefine(String.prototype, KEY, strfn);
hide(RegExp.prototype, SYMBOL, length == 2
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
? function (string, arg) { return rxfn.call(string, this, arg); }
// 21.2.5.6 RegExp.prototype[@@match](string)
// 21.2.5.9 RegExp.prototype[@@search](string)
: function (string) { return rxfn.call(string, this); }
);
}
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_flags.js":
/*!***************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_flags.js ***!
\***************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.2.5.3 get RegExp.prototype.flags
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
module.exports = function () {
var that = anObject(this);
var result = '';
if (that.global) result += 'g';
if (that.ignoreCase) result += 'i';
if (that.multiline) result += 'm';
if (that.unicode) result += 'u';
if (that.sticky) result += 'y';
return result;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_flatten-into-array.js":
/*!****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_flatten-into-array.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
var isArray = __webpack_require__(/*! ./_is-array */ "../../node_modules/core-js/modules/_is-array.js");
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
var ctx = __webpack_require__(/*! ./_ctx */ "../../node_modules/core-js/modules/_ctx.js");
var IS_CONCAT_SPREADABLE = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js")('isConcatSpreadable');
function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) {
var targetIndex = start;
var sourceIndex = 0;
var mapFn = mapper ? ctx(mapper, thisArg, 3) : false;
var element, spreadable;
while (sourceIndex < sourceLen) {
if (sourceIndex in source) {
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
spreadable = false;
if (isObject(element)) {
spreadable = element[IS_CONCAT_SPREADABLE];
spreadable = spreadable !== undefined ? !!spreadable : isArray(element);
}
if (spreadable && depth > 0) {
targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;
} else {
if (targetIndex >= 0x1fffffffffffff) throw TypeError();
target[targetIndex] = element;
}
targetIndex++;
}
sourceIndex++;
}
return targetIndex;
}
module.exports = flattenIntoArray;
/***/ }),
/***/ "../../node_modules/core-js/modules/_for-of.js":
/*!****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_for-of.js ***!
\****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var ctx = __webpack_require__(/*! ./_ctx */ "../../node_modules/core-js/modules/_ctx.js");
var call = __webpack_require__(/*! ./_iter-call */ "../../node_modules/core-js/modules/_iter-call.js");
var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ "../../node_modules/core-js/modules/_is-array-iter.js");
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ "../../node_modules/core-js/modules/core.get-iterator-method.js");
var BREAK = {};
var RETURN = {};
var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);
var f = ctx(fn, that, entries ? 2 : 1);
var index = 0;
var length, step, iterator, result;
if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
// fast case for arrays with default iterator
if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
if (result === BREAK || result === RETURN) return result;
} else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
result = call(iterator, f, step.value, entries);
if (result === BREAK || result === RETURN) return result;
}
};
exports.BREAK = BREAK;
exports.RETURN = RETURN;
/***/ }),
/***/ "../../node_modules/core-js/modules/_function-to-string.js":
/*!****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_function-to-string.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(/*! ./_shared */ "../../node_modules/core-js/modules/_shared.js")('native-function-to-string', Function.toString);
/***/ }),
/***/ "../../node_modules/core-js/modules/_global.js":
/*!****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_global.js ***!
\****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
? window : typeof self != 'undefined' && self.Math == Math ? self
// eslint-disable-next-line no-new-func
: Function('return this')();
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
/***/ }),
/***/ "../../node_modules/core-js/modules/_has.js":
/*!*************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_has.js ***!
\*************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_hide.js":
/*!**************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_hide.js ***!
\**************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/modules/_object-dp.js");
var createDesc = __webpack_require__(/*! ./_property-desc */ "../../node_modules/core-js/modules/_property-desc.js");
module.exports = __webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/modules/_descriptors.js") ? function (object, key, value) {
return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_html.js":
/*!**************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_html.js ***!
\**************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var document = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js").document;
module.exports = document && document.documentElement;
/***/ }),
/***/ "../../node_modules/core-js/modules/_ie8-dom-define.js":
/*!************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_ie8-dom-define.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = !__webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/modules/_descriptors.js") && !__webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js")(function () {
return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ "../../node_modules/core-js/modules/_dom-create.js")('div'), 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/***/ "../../node_modules/core-js/modules/_inherit-if-required.js":
/*!*****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_inherit-if-required.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var setPrototypeOf = __webpack_require__(/*! ./_set-proto */ "../../node_modules/core-js/modules/_set-proto.js").set;
module.exports = function (that, target, C) {
var S = target.constructor;
var P;
if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
setPrototypeOf(that, P);
} return that;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_invoke.js":
/*!****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_invoke.js ***!
\****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// fast apply, http://jsperf.lnkit.com/fast-apply/5
module.exports = function (fn, args, that) {
var un = that === undefined;
switch (args.length) {
case 0: return un ? fn()
: fn.call(that);
case 1: return un ? fn(args[0])
: fn.call(that, args[0]);
case 2: return un ? fn(args[0], args[1])
: fn.call(that, args[0], args[1]);
case 3: return un ? fn(args[0], args[1], args[2])
: fn.call(that, args[0], args[1], args[2]);
case 4: return un ? fn(args[0], args[1], args[2], args[3])
: fn.call(that, args[0], args[1], args[2], args[3]);
} return fn.apply(that, args);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_iobject.js":
/*!*****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_iobject.js ***!
\*****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(/*! ./_cof */ "../../node_modules/core-js/modules/_cof.js");
// eslint-disable-next-line no-prototype-builtins
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
return cof(it) == 'String' ? it.split('') : Object(it);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_is-array-iter.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_is-array-iter.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// check on default Array iterator
var Iterators = __webpack_require__(/*! ./_iterators */ "../../node_modules/core-js/modules/_iterators.js");
var ITERATOR = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js")('iterator');
var ArrayProto = Array.prototype;
module.exports = function (it) {
return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_is-array.js":
/*!******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_is-array.js ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 7.2.2 IsArray(argument)
var cof = __webpack_require__(/*! ./_cof */ "../../node_modules/core-js/modules/_cof.js");
module.exports = Array.isArray || function isArray(arg) {
return cof(arg) == 'Array';
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_is-integer.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_is-integer.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.3 Number.isInteger(number)
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var floor = Math.floor;
module.exports = function isInteger(it) {
return !isObject(it) && isFinite(it) && floor(it) === it;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_is-object.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_is-object.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_is-regexp.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_is-regexp.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 7.2.8 IsRegExp(argument)
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var cof = __webpack_require__(/*! ./_cof */ "../../node_modules/core-js/modules/_cof.js");
var MATCH = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js")('match');
module.exports = function (it) {
var isRegExp;
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_iter-call.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_iter-call.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// call something on iterator step with safe closing on error
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
module.exports = function (iterator, fn, value, entries) {
try {
return entries ? fn(anObject(value)[0], value[1]) : fn(value);
// 7.4.6 IteratorClose(iterator, completion)
} catch (e) {
var ret = iterator['return'];
if (ret !== undefined) anObject(ret.call(iterator));
throw e;
}
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_iter-create.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_iter-create.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var create = __webpack_require__(/*! ./_object-create */ "../../node_modules/core-js/modules/_object-create.js");
var descriptor = __webpack_require__(/*! ./_property-desc */ "../../node_modules/core-js/modules/_property-desc.js");
var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "../../node_modules/core-js/modules/_set-to-string-tag.js");
var IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
__webpack_require__(/*! ./_hide */ "../../node_modules/core-js/modules/_hide.js")(IteratorPrototype, __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js")('iterator'), function () { return this; });
module.exports = function (Constructor, NAME, next) {
Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
setToStringTag(Constructor, NAME + ' Iterator');
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_iter-define.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_iter-define.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var LIBRARY = __webpack_require__(/*! ./_library */ "../../node_modules/core-js/modules/_library.js");
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var redefine = __webpack_require__(/*! ./_redefine */ "../../node_modules/core-js/modules/_redefine.js");
var hide = __webpack_require__(/*! ./_hide */ "../../node_modules/core-js/modules/_hide.js");
var Iterators = __webpack_require__(/*! ./_iterators */ "../../node_modules/core-js/modules/_iterators.js");
var $iterCreate = __webpack_require__(/*! ./_iter-create */ "../../node_modules/core-js/modules/_iter-create.js");
var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "../../node_modules/core-js/modules/_set-to-string-tag.js");
var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "../../node_modules/core-js/modules/_object-gpo.js");
var ITERATOR = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js")('iterator');
var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
var FF_ITERATOR = '@@iterator';
var KEYS = 'keys';
var VALUES = 'values';
var returnThis = function () { return this; };
module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
$iterCreate(Constructor, NAME, next);
var getMethod = function (kind) {
if (!BUGGY && kind in proto) return proto[kind];
switch (kind) {
case KEYS: return function keys() { return new Constructor(this, kind); };
case VALUES: return function values() { return new Constructor(this, kind); };
} return function entries() { return new Constructor(this, kind); };
};
var TAG = NAME + ' Iterator';
var DEF_VALUES = DEFAULT == VALUES;
var VALUES_BUG = false;
var proto = Base.prototype;
var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
var $default = $native || getMethod(DEFAULT);
var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
var methods, key, IteratorPrototype;
// Fix native
if ($anyNative) {
IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
// Set @@toStringTag to native iterators
setToStringTag(IteratorPrototype, TAG, true);
// fix for some old engines
if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
}
}
// fix Array#{values, @@iterator}.name in V8 / FF
if (DEF_VALUES && $native && $native.name !== VALUES) {
VALUES_BUG = true;
$default = function values() { return $native.call(this); };
}
// Define iterator
if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
hide(proto, ITERATOR, $default);
}
// Plug for library
Iterators[NAME] = $default;
Iterators[TAG] = returnThis;
if (DEFAULT) {
methods = {
values: DEF_VALUES ? $default : getMethod(VALUES),
keys: IS_SET ? $default : getMethod(KEYS),
entries: $entries
};
if (FORCED) for (key in methods) {
if (!(key in proto)) redefine(proto, key, methods[key]);
} else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
}
return methods;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_iter-detect.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_iter-detect.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var ITERATOR = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js")('iterator');
var SAFE_CLOSING = false;
try {
var riter = [7][ITERATOR]();
riter['return'] = function () { SAFE_CLOSING = true; };
// eslint-disable-next-line no-throw-literal
Array.from(riter, function () { throw 2; });
} catch (e) { /* empty */ }
module.exports = function (exec, skipClosing) {
if (!skipClosing && !SAFE_CLOSING) return false;
var safe = false;
try {
var arr = [7];
var iter = arr[ITERATOR]();
iter.next = function () { return { done: safe = true }; };
arr[ITERATOR] = function () { return iter; };
exec(arr);
} catch (e) { /* empty */ }
return safe;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_iter-step.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_iter-step.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (done, value) {
return { value: value, done: !!done };
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_iterators.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_iterators.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = {};
/***/ }),
/***/ "../../node_modules/core-js/modules/_library.js":
/*!*****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_library.js ***!
\*****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = false;
/***/ }),
/***/ "../../node_modules/core-js/modules/_math-expm1.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_math-expm1.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// 20.2.2.14 Math.expm1(x)
var $expm1 = Math.expm1;
module.exports = (!$expm1
// Old FF bug
|| $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
// Tor Browser bug
|| $expm1(-2e-17) != -2e-17
) ? function expm1(x) {
return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
} : $expm1;
/***/ }),
/***/ "../../node_modules/core-js/modules/_math-fround.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_math-fround.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.16 Math.fround(x)
var sign = __webpack_require__(/*! ./_math-sign */ "../../node_modules/core-js/modules/_math-sign.js");
var pow = Math.pow;
var EPSILON = pow(2, -52);
var EPSILON32 = pow(2, -23);
var MAX32 = pow(2, 127) * (2 - EPSILON32);
var MIN32 = pow(2, -126);
var roundTiesToEven = function (n) {
return n + 1 / EPSILON - 1 / EPSILON;
};
module.exports = Math.fround || function fround(x) {
var $abs = Math.abs(x);
var $sign = sign(x);
var a, result;
if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
a = (1 + EPSILON32 / EPSILON) * $abs;
result = a - (a - $abs);
// eslint-disable-next-line no-self-compare
if (result > MAX32 || result != result) return $sign * Infinity;
return $sign * result;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_math-log1p.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_math-log1p.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// 20.2.2.20 Math.log1p(x)
module.exports = Math.log1p || function log1p(x) {
return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_math-sign.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_math-sign.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// 20.2.2.28 Math.sign(x)
module.exports = Math.sign || function sign(x) {
// eslint-disable-next-line no-self-compare
return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_meta.js":
/*!**************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_meta.js ***!
\**************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var META = __webpack_require__(/*! ./_uid */ "../../node_modules/core-js/modules/_uid.js")('meta');
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var has = __webpack_require__(/*! ./_has */ "../../node_modules/core-js/modules/_has.js");
var setDesc = __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/modules/_object-dp.js").f;
var id = 0;
var isExtensible = Object.isExtensible || function () {
return true;
};
var FREEZE = !__webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js")(function () {
return isExtensible(Object.preventExtensions({}));
});
var setMeta = function (it) {
setDesc(it, META, { value: {
i: 'O' + ++id, // object ID
w: {} // weak collections IDs
} });
};
var fastKey = function (it, create) {
// return primitive with prefix
if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
if (!has(it, META)) {
// can't set metadata to uncaught frozen object
if (!isExtensible(it)) return 'F';
// not necessary to add metadata
if (!create) return 'E';
// add missing metadata
setMeta(it);
// return object ID
} return it[META].i;
};
var getWeak = function (it, create) {
if (!has(it, META)) {
// can't set metadata to uncaught frozen object
if (!isExtensible(it)) return true;
// not necessary to add metadata
if (!create) return false;
// add missing metadata
setMeta(it);
// return hash weak collections IDs
} return it[META].w;
};
// add metadata on freeze-family methods calling
var onFreeze = function (it) {
if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
return it;
};
var meta = module.exports = {
KEY: META,
NEED: false,
fastKey: fastKey,
getWeak: getWeak,
onFreeze: onFreeze
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_microtask.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_microtask.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var macrotask = __webpack_require__(/*! ./_task */ "../../node_modules/core-js/modules/_task.js").set;
var Observer = global.MutationObserver || global.WebKitMutationObserver;
var process = global.process;
var Promise = global.Promise;
var isNode = __webpack_require__(/*! ./_cof */ "../../node_modules/core-js/modules/_cof.js")(process) == 'process';
module.exports = function () {
var head, last, notify;
var flush = function () {
var parent, fn;
if (isNode && (parent = process.domain)) parent.exit();
while (head) {
fn = head.fn;
head = head.next;
try {
fn();
} catch (e) {
if (head) notify();
else last = undefined;
throw e;
}
} last = undefined;
if (parent) parent.enter();
};
// Node.js
if (isNode) {
notify = function () {
process.nextTick(flush);
};
// browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339
} else if (Observer && !(global.navigator && global.navigator.standalone)) {
var toggle = true;
var node = document.createTextNode('');
new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
notify = function () {
node.data = toggle = !toggle;
};
// environments with maybe non-completely correct, but existent Promise
} else if (Promise && Promise.resolve) {
// Promise.resolve without an argument throws an error in LG WebOS 2
var promise = Promise.resolve(undefined);
notify = function () {
promise.then(flush);
};
// for other environments - macrotask based on:
// - setImmediate
// - MessageChannel
// - window.postMessag
// - onreadystatechange
// - setTimeout
} else {
notify = function () {
// strange IE + webpack dev server bug - use .call(global)
macrotask.call(global, flush);
};
}
return function (fn) {
var task = { fn: fn, next: undefined };
if (last) last.next = task;
if (!head) {
head = task;
notify();
} last = task;
};
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_new-promise-capability.js":
/*!********************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_new-promise-capability.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 25.4.1.5 NewPromiseCapability(C)
var aFunction = __webpack_require__(/*! ./_a-function */ "../../node_modules/core-js/modules/_a-function.js");
function PromiseCapability(C) {
var resolve, reject;
this.promise = new C(function ($$resolve, $$reject) {
if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
resolve = $$resolve;
reject = $$reject;
});
this.resolve = aFunction(resolve);
this.reject = aFunction(reject);
}
module.exports.f = function (C) {
return new PromiseCapability(C);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_object-assign.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_object-assign.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 19.1.2.1 Object.assign(target, source, ...)
var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/modules/_descriptors.js");
var getKeys = __webpack_require__(/*! ./_object-keys */ "../../node_modules/core-js/modules/_object-keys.js");
var gOPS = __webpack_require__(/*! ./_object-gops */ "../../node_modules/core-js/modules/_object-gops.js");
var pIE = __webpack_require__(/*! ./_object-pie */ "../../node_modules/core-js/modules/_object-pie.js");
var toObject = __webpack_require__(/*! ./_to-object */ "../../node_modules/core-js/modules/_to-object.js");
var IObject = __webpack_require__(/*! ./_iobject */ "../../node_modules/core-js/modules/_iobject.js");
var $assign = Object.assign;
// should work with symbols and should have deterministic property order (V8 bug)
module.exports = !$assign || __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js")(function () {
var A = {};
var B = {};
// eslint-disable-next-line no-undef
var S = Symbol();
var K = 'abcdefghijklmnopqrst';
A[S] = 7;
K.split('').forEach(function (k) { B[k] = k; });
return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
var T = toObject(target);
var aLen = arguments.length;
var index = 1;
var getSymbols = gOPS.f;
var isEnum = pIE.f;
while (aLen > index) {
var S = IObject(arguments[index++]);
var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
var length = keys.length;
var j = 0;
var key;
while (length > j) {
key = keys[j++];
if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
}
} return T;
} : $assign;
/***/ }),
/***/ "../../node_modules/core-js/modules/_object-create.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_object-create.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var dPs = __webpack_require__(/*! ./_object-dps */ "../../node_modules/core-js/modules/_object-dps.js");
var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "../../node_modules/core-js/modules/_enum-bug-keys.js");
var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "../../node_modules/core-js/modules/_shared-key.js")('IE_PROTO');
var Empty = function () { /* empty */ };
var PROTOTYPE = 'prototype';
// Create object with fake `null` prototype: use iframe Object with cleared prototype
var createDict = function () {
// Thrash, waste and sodomy: IE GC bug
var iframe = __webpack_require__(/*! ./_dom-create */ "../../node_modules/core-js/modules/_dom-create.js")('iframe');
var i = enumBugKeys.length;
var lt = '<';
var gt = '>';
var iframeDocument;
iframe.style.display = 'none';
__webpack_require__(/*! ./_html */ "../../node_modules/core-js/modules/_html.js").appendChild(iframe);
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
// createDict = iframe.contentWindow.Object;
// html.removeChild(iframe);
iframeDocument = iframe.contentWindow.document;
iframeDocument.open();
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
iframeDocument.close();
createDict = iframeDocument.F;
while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
return createDict();
};
module.exports = Object.create || function create(O, Properties) {
var result;
if (O !== null) {
Empty[PROTOTYPE] = anObject(O);
result = new Empty();
Empty[PROTOTYPE] = null;
// add "__proto__" for Object.getPrototypeOf polyfill
result[IE_PROTO] = O;
} else result = createDict();
return Properties === undefined ? result : dPs(result, Properties);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_object-dp.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_object-dp.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "../../node_modules/core-js/modules/_ie8-dom-define.js");
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "../../node_modules/core-js/modules/_to-primitive.js");
var dP = Object.defineProperty;
exports.f = __webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
if (IE8_DOM_DEFINE) try {
return dP(O, P, Attributes);
} catch (e) { /* empty */ }
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
if ('value' in Attributes) O[P] = Attributes.value;
return O;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_object-dps.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_object-dps.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/modules/_object-dp.js");
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var getKeys = __webpack_require__(/*! ./_object-keys */ "../../node_modules/core-js/modules/_object-keys.js");
module.exports = __webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/modules/_descriptors.js") ? Object.defineProperties : function defineProperties(O, Properties) {
anObject(O);
var keys = getKeys(Properties);
var length = keys.length;
var i = 0;
var P;
while (length > i) dP.f(O, P = keys[i++], Properties[P]);
return O;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_object-gopd.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_object-gopd.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var pIE = __webpack_require__(/*! ./_object-pie */ "../../node_modules/core-js/modules/_object-pie.js");
var createDesc = __webpack_require__(/*! ./_property-desc */ "../../node_modules/core-js/modules/_property-desc.js");
var toIObject = __webpack_require__(/*! ./_to-iobject */ "../../node_modules/core-js/modules/_to-iobject.js");
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "../../node_modules/core-js/modules/_to-primitive.js");
var has = __webpack_require__(/*! ./_has */ "../../node_modules/core-js/modules/_has.js");
var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "../../node_modules/core-js/modules/_ie8-dom-define.js");
var gOPD = Object.getOwnPropertyDescriptor;
exports.f = __webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/modules/_descriptors.js") ? gOPD : function getOwnPropertyDescriptor(O, P) {
O = toIObject(O);
P = toPrimitive(P, true);
if (IE8_DOM_DEFINE) try {
return gOPD(O, P);
} catch (e) { /* empty */ }
if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_object-gopn-ext.js":
/*!*************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_object-gopn-ext.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
var toIObject = __webpack_require__(/*! ./_to-iobject */ "../../node_modules/core-js/modules/_to-iobject.js");
var gOPN = __webpack_require__(/*! ./_object-gopn */ "../../node_modules/core-js/modules/_object-gopn.js").f;
var toString = {}.toString;
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
? Object.getOwnPropertyNames(window) : [];
var getWindowNames = function (it) {
try {
return gOPN(it);
} catch (e) {
return windowNames.slice();
}
};
module.exports.f = function getOwnPropertyNames(it) {
return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_object-gopn.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_object-gopn.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
var $keys = __webpack_require__(/*! ./_object-keys-internal */ "../../node_modules/core-js/modules/_object-keys-internal.js");
var hiddenKeys = __webpack_require__(/*! ./_enum-bug-keys */ "../../node_modules/core-js/modules/_enum-bug-keys.js").concat('length', 'prototype');
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return $keys(O, hiddenKeys);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_object-gops.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_object-gops.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
exports.f = Object.getOwnPropertySymbols;
/***/ }),
/***/ "../../node_modules/core-js/modules/_object-gpo.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_object-gpo.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
var has = __webpack_require__(/*! ./_has */ "../../node_modules/core-js/modules/_has.js");
var toObject = __webpack_require__(/*! ./_to-object */ "../../node_modules/core-js/modules/_to-object.js");
var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "../../node_modules/core-js/modules/_shared-key.js")('IE_PROTO');
var ObjectProto = Object.prototype;
module.exports = Object.getPrototypeOf || function (O) {
O = toObject(O);
if (has(O, IE_PROTO)) return O[IE_PROTO];
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
return O.constructor.prototype;
} return O instanceof Object ? ObjectProto : null;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_object-keys-internal.js":
/*!******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_object-keys-internal.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__(/*! ./_has */ "../../node_modules/core-js/modules/_has.js");
var toIObject = __webpack_require__(/*! ./_to-iobject */ "../../node_modules/core-js/modules/_to-iobject.js");
var arrayIndexOf = __webpack_require__(/*! ./_array-includes */ "../../node_modules/core-js/modules/_array-includes.js")(false);
var IE_PROTO = __webpack_require__(/*! ./_shared-key */ "../../node_modules/core-js/modules/_shared-key.js")('IE_PROTO');
module.exports = function (object, names) {
var O = toIObject(object);
var i = 0;
var result = [];
var key;
for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
// Don't enum bug & hidden keys
while (names.length > i) if (has(O, key = names[i++])) {
~arrayIndexOf(result, key) || result.push(key);
}
return result;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_object-keys.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_object-keys.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__(/*! ./_object-keys-internal */ "../../node_modules/core-js/modules/_object-keys-internal.js");
var enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ "../../node_modules/core-js/modules/_enum-bug-keys.js");
module.exports = Object.keys || function keys(O) {
return $keys(O, enumBugKeys);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_object-pie.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_object-pie.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
exports.f = {}.propertyIsEnumerable;
/***/ }),
/***/ "../../node_modules/core-js/modules/_object-sap.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_object-sap.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// most Object methods by ES6 should accept primitives
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var core = __webpack_require__(/*! ./_core */ "../../node_modules/core-js/modules/_core.js");
var fails = __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js");
module.exports = function (KEY, exec) {
var fn = (core.Object || {})[KEY] || Object[KEY];
var exp = {};
exp[KEY] = exec(fn);
$export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_object-to-array.js":
/*!*************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_object-to-array.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/modules/_descriptors.js");
var getKeys = __webpack_require__(/*! ./_object-keys */ "../../node_modules/core-js/modules/_object-keys.js");
var toIObject = __webpack_require__(/*! ./_to-iobject */ "../../node_modules/core-js/modules/_to-iobject.js");
var isEnum = __webpack_require__(/*! ./_object-pie */ "../../node_modules/core-js/modules/_object-pie.js").f;
module.exports = function (isEntries) {
return function (it) {
var O = toIObject(it);
var keys = getKeys(O);
var length = keys.length;
var i = 0;
var result = [];
var key;
while (length > i) {
key = keys[i++];
if (!DESCRIPTORS || isEnum.call(O, key)) {
result.push(isEntries ? [key, O[key]] : O[key]);
}
}
return result;
};
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_own-keys.js":
/*!******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_own-keys.js ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// all object keys, includes non-enumerable and symbols
var gOPN = __webpack_require__(/*! ./_object-gopn */ "../../node_modules/core-js/modules/_object-gopn.js");
var gOPS = __webpack_require__(/*! ./_object-gops */ "../../node_modules/core-js/modules/_object-gops.js");
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var Reflect = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js").Reflect;
module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
var keys = gOPN.f(anObject(it));
var getSymbols = gOPS.f;
return getSymbols ? keys.concat(getSymbols(it)) : keys;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_parse-float.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_parse-float.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $parseFloat = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js").parseFloat;
var $trim = __webpack_require__(/*! ./_string-trim */ "../../node_modules/core-js/modules/_string-trim.js").trim;
module.exports = 1 / $parseFloat(__webpack_require__(/*! ./_string-ws */ "../../node_modules/core-js/modules/_string-ws.js") + '-0') !== -Infinity ? function parseFloat(str) {
var string = $trim(String(str), 3);
var result = $parseFloat(string);
return result === 0 && string.charAt(0) == '-' ? -0 : result;
} : $parseFloat;
/***/ }),
/***/ "../../node_modules/core-js/modules/_parse-int.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_parse-int.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $parseInt = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js").parseInt;
var $trim = __webpack_require__(/*! ./_string-trim */ "../../node_modules/core-js/modules/_string-trim.js").trim;
var ws = __webpack_require__(/*! ./_string-ws */ "../../node_modules/core-js/modules/_string-ws.js");
var hex = /^[-+]?0[xX]/;
module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) {
var string = $trim(String(str), 3);
return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
} : $parseInt;
/***/ }),
/***/ "../../node_modules/core-js/modules/_perform.js":
/*!*****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_perform.js ***!
\*****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return { e: false, v: exec() };
} catch (e) {
return { e: true, v: e };
}
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_promise-resolve.js":
/*!*************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_promise-resolve.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var newPromiseCapability = __webpack_require__(/*! ./_new-promise-capability */ "../../node_modules/core-js/modules/_new-promise-capability.js");
module.exports = function (C, x) {
anObject(C);
if (isObject(x) && x.constructor === C) return x;
var promiseCapability = newPromiseCapability.f(C);
var resolve = promiseCapability.resolve;
resolve(x);
return promiseCapability.promise;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_property-desc.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_property-desc.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_redefine-all.js":
/*!**********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_redefine-all.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var redefine = __webpack_require__(/*! ./_redefine */ "../../node_modules/core-js/modules/_redefine.js");
module.exports = function (target, src, safe) {
for (var key in src) redefine(target, key, src[key], safe);
return target;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_redefine.js":
/*!******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_redefine.js ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var hide = __webpack_require__(/*! ./_hide */ "../../node_modules/core-js/modules/_hide.js");
var has = __webpack_require__(/*! ./_has */ "../../node_modules/core-js/modules/_has.js");
var SRC = __webpack_require__(/*! ./_uid */ "../../node_modules/core-js/modules/_uid.js")('src');
var $toString = __webpack_require__(/*! ./_function-to-string */ "../../node_modules/core-js/modules/_function-to-string.js");
var TO_STRING = 'toString';
var TPL = ('' + $toString).split(TO_STRING);
__webpack_require__(/*! ./_core */ "../../node_modules/core-js/modules/_core.js").inspectSource = function (it) {
return $toString.call(it);
};
(module.exports = function (O, key, val, safe) {
var isFunction = typeof val == 'function';
if (isFunction) has(val, 'name') || hide(val, 'name', key);
if (O[key] === val) return;
if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
if (O === global) {
O[key] = val;
} else if (!safe) {
delete O[key];
hide(O, key, val);
} else if (O[key]) {
O[key] = val;
} else {
hide(O, key, val);
}
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, TO_STRING, function toString() {
return typeof this == 'function' && this[SRC] || $toString.call(this);
});
/***/ }),
/***/ "../../node_modules/core-js/modules/_regexp-exec-abstract.js":
/*!******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_regexp-exec-abstract.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var classof = __webpack_require__(/*! ./_classof */ "../../node_modules/core-js/modules/_classof.js");
var builtinExec = RegExp.prototype.exec;
// `RegExpExec` abstract operation
// https://tc39.github.io/ecma262/#sec-regexpexec
module.exports = function (R, S) {
var exec = R.exec;
if (typeof exec === 'function') {
var result = exec.call(R, S);
if (typeof result !== 'object') {
throw new TypeError('RegExp exec method returned something other than an Object or null');
}
return result;
}
if (classof(R) !== 'RegExp') {
throw new TypeError('RegExp#exec called on incompatible receiver');
}
return builtinExec.call(R, S);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_regexp-exec.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_regexp-exec.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var regexpFlags = __webpack_require__(/*! ./_flags */ "../../node_modules/core-js/modules/_flags.js");
var nativeExec = RegExp.prototype.exec;
// This always refers to the native implementation, because the
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
// which loads this file before patching the method.
var nativeReplace = String.prototype.replace;
var patchedExec = nativeExec;
var LAST_INDEX = 'lastIndex';
var UPDATES_LAST_INDEX_WRONG = (function () {
var re1 = /a/,
re2 = /b*/g;
nativeExec.call(re1, 'a');
nativeExec.call(re2, 'a');
return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;
})();
// nonparticipating capturing group, copied from es5-shim's String#split patch.
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
if (PATCH) {
patchedExec = function exec(str) {
var re = this;
var lastIndex, reCopy, match, i;
if (NPCG_INCLUDED) {
reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
}
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];
match = nativeExec.call(re, str);
if (UPDATES_LAST_INDEX_WRONG && match) {
re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;
}
if (NPCG_INCLUDED && match && match.length > 1) {
// Fix browsers whose `exec` methods don't consistently return `undefined`
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
// eslint-disable-next-line no-loop-func
nativeReplace.call(match[0], reCopy, function () {
for (i = 1; i < arguments.length - 2; i++) {
if (arguments[i] === undefined) match[i] = undefined;
}
});
}
return match;
};
}
module.exports = patchedExec;
/***/ }),
/***/ "../../node_modules/core-js/modules/_same-value.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_same-value.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// 7.2.9 SameValue(x, y)
module.exports = Object.is || function is(x, y) {
// eslint-disable-next-line no-self-compare
return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_set-proto.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_set-proto.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var check = function (O, proto) {
anObject(O);
if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
};
module.exports = {
set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
function (test, buggy, set) {
try {
set = __webpack_require__(/*! ./_ctx */ "../../node_modules/core-js/modules/_ctx.js")(Function.call, __webpack_require__(/*! ./_object-gopd */ "../../node_modules/core-js/modules/_object-gopd.js").f(Object.prototype, '__proto__').set, 2);
set(test, []);
buggy = !(test instanceof Array);
} catch (e) { buggy = true; }
return function setPrototypeOf(O, proto) {
check(O, proto);
if (buggy) O.__proto__ = proto;
else set(O, proto);
return O;
};
}({}, false) : undefined),
check: check
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_set-species.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_set-species.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var dP = __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/modules/_object-dp.js");
var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/modules/_descriptors.js");
var SPECIES = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js")('species');
module.exports = function (KEY) {
var C = global[KEY];
if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
configurable: true,
get: function () { return this; }
});
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_set-to-string-tag.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_set-to-string-tag.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var def = __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/modules/_object-dp.js").f;
var has = __webpack_require__(/*! ./_has */ "../../node_modules/core-js/modules/_has.js");
var TAG = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js")('toStringTag');
module.exports = function (it, tag, stat) {
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_shared-key.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_shared-key.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var shared = __webpack_require__(/*! ./_shared */ "../../node_modules/core-js/modules/_shared.js")('keys');
var uid = __webpack_require__(/*! ./_uid */ "../../node_modules/core-js/modules/_uid.js");
module.exports = function (key) {
return shared[key] || (shared[key] = uid(key));
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_shared.js":
/*!****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_shared.js ***!
\****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var core = __webpack_require__(/*! ./_core */ "../../node_modules/core-js/modules/_core.js");
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var SHARED = '__core-js_shared__';
var store = global[SHARED] || (global[SHARED] = {});
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: core.version,
mode: __webpack_require__(/*! ./_library */ "../../node_modules/core-js/modules/_library.js") ? 'pure' : 'global',
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
});
/***/ }),
/***/ "../../node_modules/core-js/modules/_species-constructor.js":
/*!*****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_species-constructor.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 7.3.20 SpeciesConstructor(O, defaultConstructor)
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var aFunction = __webpack_require__(/*! ./_a-function */ "../../node_modules/core-js/modules/_a-function.js");
var SPECIES = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js")('species');
module.exports = function (O, D) {
var C = anObject(O).constructor;
var S;
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_strict-method.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_strict-method.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js");
module.exports = function (method, arg) {
return !!method && fails(function () {
// eslint-disable-next-line no-useless-call
arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);
});
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_string-at.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_string-at.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(/*! ./_to-integer */ "../../node_modules/core-js/modules/_to-integer.js");
var defined = __webpack_require__(/*! ./_defined */ "../../node_modules/core-js/modules/_defined.js");
// true -> String#at
// false -> String#codePointAt
module.exports = function (TO_STRING) {
return function (that, pos) {
var s = String(defined(that));
var i = toInteger(pos);
var l = s.length;
var a, b;
if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
a = s.charCodeAt(i);
return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
? TO_STRING ? s.charAt(i) : a
: TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
};
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_string-context.js":
/*!************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_string-context.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// helper for String#{startsWith, endsWith, includes}
var isRegExp = __webpack_require__(/*! ./_is-regexp */ "../../node_modules/core-js/modules/_is-regexp.js");
var defined = __webpack_require__(/*! ./_defined */ "../../node_modules/core-js/modules/_defined.js");
module.exports = function (that, searchString, NAME) {
if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
return String(defined(that));
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_string-html.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_string-html.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var fails = __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js");
var defined = __webpack_require__(/*! ./_defined */ "../../node_modules/core-js/modules/_defined.js");
var quot = /"/g;
// B.2.3.2.1 CreateHTML(string, tag, attribute, value)
var createHTML = function (string, tag, attribute, value) {
var S = String(defined(string));
var p1 = '<' + tag;
if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"';
return p1 + '>' + S + '' + tag + '>';
};
module.exports = function (NAME, exec) {
var O = {};
O[NAME] = exec(createHTML);
$export($export.P + $export.F * fails(function () {
var test = ''[NAME]('"');
return test !== test.toLowerCase() || test.split('"').length > 3;
}), 'String', O);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_string-pad.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_string-pad.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/tc39/proposal-string-pad-start-end
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
var repeat = __webpack_require__(/*! ./_string-repeat */ "../../node_modules/core-js/modules/_string-repeat.js");
var defined = __webpack_require__(/*! ./_defined */ "../../node_modules/core-js/modules/_defined.js");
module.exports = function (that, maxLength, fillString, left) {
var S = String(defined(that));
var stringLength = S.length;
var fillStr = fillString === undefined ? ' ' : String(fillString);
var intMaxLength = toLength(maxLength);
if (intMaxLength <= stringLength || fillStr == '') return S;
var fillLen = intMaxLength - stringLength;
var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);
return left ? stringFiller + S : S + stringFiller;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_string-repeat.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_string-repeat.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toInteger = __webpack_require__(/*! ./_to-integer */ "../../node_modules/core-js/modules/_to-integer.js");
var defined = __webpack_require__(/*! ./_defined */ "../../node_modules/core-js/modules/_defined.js");
module.exports = function repeat(count) {
var str = String(defined(this));
var res = '';
var n = toInteger(count);
if (n < 0 || n == Infinity) throw RangeError("Count can't be negative");
for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str;
return res;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_string-trim.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_string-trim.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var defined = __webpack_require__(/*! ./_defined */ "../../node_modules/core-js/modules/_defined.js");
var fails = __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js");
var spaces = __webpack_require__(/*! ./_string-ws */ "../../node_modules/core-js/modules/_string-ws.js");
var space = '[' + spaces + ']';
var non = '\u200b\u0085';
var ltrim = RegExp('^' + space + space + '*');
var rtrim = RegExp(space + space + '*$');
var exporter = function (KEY, exec, ALIAS) {
var exp = {};
var FORCE = fails(function () {
return !!spaces[KEY]() || non[KEY]() != non;
});
var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
if (ALIAS) exp[ALIAS] = fn;
$export($export.P + $export.F * FORCE, 'String', exp);
};
// 1 -> String#trimLeft
// 2 -> String#trimRight
// 3 -> String#trim
var trim = exporter.trim = function (string, TYPE) {
string = String(defined(string));
if (TYPE & 1) string = string.replace(ltrim, '');
if (TYPE & 2) string = string.replace(rtrim, '');
return string;
};
module.exports = exporter;
/***/ }),
/***/ "../../node_modules/core-js/modules/_string-ws.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_string-ws.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
'\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
/***/ }),
/***/ "../../node_modules/core-js/modules/_task.js":
/*!**************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_task.js ***!
\**************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var ctx = __webpack_require__(/*! ./_ctx */ "../../node_modules/core-js/modules/_ctx.js");
var invoke = __webpack_require__(/*! ./_invoke */ "../../node_modules/core-js/modules/_invoke.js");
var html = __webpack_require__(/*! ./_html */ "../../node_modules/core-js/modules/_html.js");
var cel = __webpack_require__(/*! ./_dom-create */ "../../node_modules/core-js/modules/_dom-create.js");
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var process = global.process;
var setTask = global.setImmediate;
var clearTask = global.clearImmediate;
var MessageChannel = global.MessageChannel;
var Dispatch = global.Dispatch;
var counter = 0;
var queue = {};
var ONREADYSTATECHANGE = 'onreadystatechange';
var defer, channel, port;
var run = function () {
var id = +this;
// eslint-disable-next-line no-prototype-builtins
if (queue.hasOwnProperty(id)) {
var fn = queue[id];
delete queue[id];
fn();
}
};
var listener = function (event) {
run.call(event.data);
};
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
if (!setTask || !clearTask) {
setTask = function setImmediate(fn) {
var args = [];
var i = 1;
while (arguments.length > i) args.push(arguments[i++]);
queue[++counter] = function () {
// eslint-disable-next-line no-new-func
invoke(typeof fn == 'function' ? fn : Function(fn), args);
};
defer(counter);
return counter;
};
clearTask = function clearImmediate(id) {
delete queue[id];
};
// Node.js 0.8-
if (__webpack_require__(/*! ./_cof */ "../../node_modules/core-js/modules/_cof.js")(process) == 'process') {
defer = function (id) {
process.nextTick(ctx(run, id, 1));
};
// Sphere (JS game engine) Dispatch API
} else if (Dispatch && Dispatch.now) {
defer = function (id) {
Dispatch.now(ctx(run, id, 1));
};
// Browsers with MessageChannel, includes WebWorkers
} else if (MessageChannel) {
channel = new MessageChannel();
port = channel.port2;
channel.port1.onmessage = listener;
defer = ctx(port.postMessage, port, 1);
// Browsers with postMessage, skip WebWorkers
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
} else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {
defer = function (id) {
global.postMessage(id + '', '*');
};
global.addEventListener('message', listener, false);
// IE8-
} else if (ONREADYSTATECHANGE in cel('script')) {
defer = function (id) {
html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {
html.removeChild(this);
run.call(id);
};
};
// Rest old browsers
} else {
defer = function (id) {
setTimeout(ctx(run, id, 1), 0);
};
}
}
module.exports = {
set: setTask,
clear: clearTask
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_to-absolute-index.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_to-absolute-index.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(/*! ./_to-integer */ "../../node_modules/core-js/modules/_to-integer.js");
var max = Math.max;
var min = Math.min;
module.exports = function (index, length) {
index = toInteger(index);
return index < 0 ? max(index + length, 0) : min(index, length);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_to-index.js":
/*!******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_to-index.js ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// https://tc39.github.io/ecma262/#sec-toindex
var toInteger = __webpack_require__(/*! ./_to-integer */ "../../node_modules/core-js/modules/_to-integer.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
module.exports = function (it) {
if (it === undefined) return 0;
var number = toInteger(it);
var length = toLength(number);
if (number !== length) throw RangeError('Wrong length!');
return length;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_to-integer.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_to-integer.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// 7.1.4 ToInteger
var ceil = Math.ceil;
var floor = Math.floor;
module.exports = function (it) {
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_to-iobject.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_to-iobject.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__(/*! ./_iobject */ "../../node_modules/core-js/modules/_iobject.js");
var defined = __webpack_require__(/*! ./_defined */ "../../node_modules/core-js/modules/_defined.js");
module.exports = function (it) {
return IObject(defined(it));
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_to-length.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_to-length.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.15 ToLength
var toInteger = __webpack_require__(/*! ./_to-integer */ "../../node_modules/core-js/modules/_to-integer.js");
var min = Math.min;
module.exports = function (it) {
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_to-object.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_to-object.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.13 ToObject(argument)
var defined = __webpack_require__(/*! ./_defined */ "../../node_modules/core-js/modules/_defined.js");
module.exports = function (it) {
return Object(defined(it));
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_to-primitive.js":
/*!**********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_to-primitive.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (it, S) {
if (!isObject(it)) return it;
var fn, val;
if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
throw TypeError("Can't convert object to primitive value");
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_typed-array.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_typed-array.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
if (__webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/modules/_descriptors.js")) {
var LIBRARY = __webpack_require__(/*! ./_library */ "../../node_modules/core-js/modules/_library.js");
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var fails = __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js");
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $typed = __webpack_require__(/*! ./_typed */ "../../node_modules/core-js/modules/_typed.js");
var $buffer = __webpack_require__(/*! ./_typed-buffer */ "../../node_modules/core-js/modules/_typed-buffer.js");
var ctx = __webpack_require__(/*! ./_ctx */ "../../node_modules/core-js/modules/_ctx.js");
var anInstance = __webpack_require__(/*! ./_an-instance */ "../../node_modules/core-js/modules/_an-instance.js");
var propertyDesc = __webpack_require__(/*! ./_property-desc */ "../../node_modules/core-js/modules/_property-desc.js");
var hide = __webpack_require__(/*! ./_hide */ "../../node_modules/core-js/modules/_hide.js");
var redefineAll = __webpack_require__(/*! ./_redefine-all */ "../../node_modules/core-js/modules/_redefine-all.js");
var toInteger = __webpack_require__(/*! ./_to-integer */ "../../node_modules/core-js/modules/_to-integer.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
var toIndex = __webpack_require__(/*! ./_to-index */ "../../node_modules/core-js/modules/_to-index.js");
var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "../../node_modules/core-js/modules/_to-absolute-index.js");
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "../../node_modules/core-js/modules/_to-primitive.js");
var has = __webpack_require__(/*! ./_has */ "../../node_modules/core-js/modules/_has.js");
var classof = __webpack_require__(/*! ./_classof */ "../../node_modules/core-js/modules/_classof.js");
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var toObject = __webpack_require__(/*! ./_to-object */ "../../node_modules/core-js/modules/_to-object.js");
var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ "../../node_modules/core-js/modules/_is-array-iter.js");
var create = __webpack_require__(/*! ./_object-create */ "../../node_modules/core-js/modules/_object-create.js");
var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "../../node_modules/core-js/modules/_object-gpo.js");
var gOPN = __webpack_require__(/*! ./_object-gopn */ "../../node_modules/core-js/modules/_object-gopn.js").f;
var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ "../../node_modules/core-js/modules/core.get-iterator-method.js");
var uid = __webpack_require__(/*! ./_uid */ "../../node_modules/core-js/modules/_uid.js");
var wks = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js");
var createArrayMethod = __webpack_require__(/*! ./_array-methods */ "../../node_modules/core-js/modules/_array-methods.js");
var createArrayIncludes = __webpack_require__(/*! ./_array-includes */ "../../node_modules/core-js/modules/_array-includes.js");
var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "../../node_modules/core-js/modules/_species-constructor.js");
var ArrayIterators = __webpack_require__(/*! ./es6.array.iterator */ "../../node_modules/core-js/modules/es6.array.iterator.js");
var Iterators = __webpack_require__(/*! ./_iterators */ "../../node_modules/core-js/modules/_iterators.js");
var $iterDetect = __webpack_require__(/*! ./_iter-detect */ "../../node_modules/core-js/modules/_iter-detect.js");
var setSpecies = __webpack_require__(/*! ./_set-species */ "../../node_modules/core-js/modules/_set-species.js");
var arrayFill = __webpack_require__(/*! ./_array-fill */ "../../node_modules/core-js/modules/_array-fill.js");
var arrayCopyWithin = __webpack_require__(/*! ./_array-copy-within */ "../../node_modules/core-js/modules/_array-copy-within.js");
var $DP = __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/modules/_object-dp.js");
var $GOPD = __webpack_require__(/*! ./_object-gopd */ "../../node_modules/core-js/modules/_object-gopd.js");
var dP = $DP.f;
var gOPD = $GOPD.f;
var RangeError = global.RangeError;
var TypeError = global.TypeError;
var Uint8Array = global.Uint8Array;
var ARRAY_BUFFER = 'ArrayBuffer';
var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER;
var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
var PROTOTYPE = 'prototype';
var ArrayProto = Array[PROTOTYPE];
var $ArrayBuffer = $buffer.ArrayBuffer;
var $DataView = $buffer.DataView;
var arrayForEach = createArrayMethod(0);
var arrayFilter = createArrayMethod(2);
var arraySome = createArrayMethod(3);
var arrayEvery = createArrayMethod(4);
var arrayFind = createArrayMethod(5);
var arrayFindIndex = createArrayMethod(6);
var arrayIncludes = createArrayIncludes(true);
var arrayIndexOf = createArrayIncludes(false);
var arrayValues = ArrayIterators.values;
var arrayKeys = ArrayIterators.keys;
var arrayEntries = ArrayIterators.entries;
var arrayLastIndexOf = ArrayProto.lastIndexOf;
var arrayReduce = ArrayProto.reduce;
var arrayReduceRight = ArrayProto.reduceRight;
var arrayJoin = ArrayProto.join;
var arraySort = ArrayProto.sort;
var arraySlice = ArrayProto.slice;
var arrayToString = ArrayProto.toString;
var arrayToLocaleString = ArrayProto.toLocaleString;
var ITERATOR = wks('iterator');
var TAG = wks('toStringTag');
var TYPED_CONSTRUCTOR = uid('typed_constructor');
var DEF_CONSTRUCTOR = uid('def_constructor');
var ALL_CONSTRUCTORS = $typed.CONSTR;
var TYPED_ARRAY = $typed.TYPED;
var VIEW = $typed.VIEW;
var WRONG_LENGTH = 'Wrong length!';
var $map = createArrayMethod(1, function (O, length) {
return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);
});
var LITTLE_ENDIAN = fails(function () {
// eslint-disable-next-line no-undef
return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
});
var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () {
new Uint8Array(1).set({});
});
var toOffset = function (it, BYTES) {
var offset = toInteger(it);
if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!');
return offset;
};
var validate = function (it) {
if (isObject(it) && TYPED_ARRAY in it) return it;
throw TypeError(it + ' is not a typed array!');
};
var allocate = function (C, length) {
if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) {
throw TypeError('It is not a typed array constructor!');
} return new C(length);
};
var speciesFromList = function (O, list) {
return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);
};
var fromList = function (C, list) {
var index = 0;
var length = list.length;
var result = allocate(C, length);
while (length > index) result[index] = list[index++];
return result;
};
var addGetter = function (it, key, internal) {
dP(it, key, { get: function () { return this._d[internal]; } });
};
var $from = function from(source /* , mapfn, thisArg */) {
var O = toObject(source);
var aLen = arguments.length;
var mapfn = aLen > 1 ? arguments[1] : undefined;
var mapping = mapfn !== undefined;
var iterFn = getIterFn(O);
var i, length, values, result, step, iterator;
if (iterFn != undefined && !isArrayIter(iterFn)) {
for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) {
values.push(step.value);
} O = values;
}
if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2);
for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) {
result[i] = mapping ? mapfn(O[i], i) : O[i];
}
return result;
};
var $of = function of(/* ...items */) {
var index = 0;
var length = arguments.length;
var result = allocate(this, length);
while (length > index) result[index] = arguments[index++];
return result;
};
// iOS Safari 6.x fails here
var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); });
var $toLocaleString = function toLocaleString() {
return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);
};
var proto = {
copyWithin: function copyWithin(target, start /* , end */) {
return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
},
every: function every(callbackfn /* , thisArg */) {
return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
},
fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars
return arrayFill.apply(validate(this), arguments);
},
filter: function filter(callbackfn /* , thisArg */) {
return speciesFromList(this, arrayFilter(validate(this), callbackfn,
arguments.length > 1 ? arguments[1] : undefined));
},
find: function find(predicate /* , thisArg */) {
return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
},
findIndex: function findIndex(predicate /* , thisArg */) {
return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
},
forEach: function forEach(callbackfn /* , thisArg */) {
arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
},
indexOf: function indexOf(searchElement /* , fromIndex */) {
return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
},
includes: function includes(searchElement /* , fromIndex */) {
return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
},
join: function join(separator) { // eslint-disable-line no-unused-vars
return arrayJoin.apply(validate(this), arguments);
},
lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars
return arrayLastIndexOf.apply(validate(this), arguments);
},
map: function map(mapfn /* , thisArg */) {
return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);
},
reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
return arrayReduce.apply(validate(this), arguments);
},
reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
return arrayReduceRight.apply(validate(this), arguments);
},
reverse: function reverse() {
var that = this;
var length = validate(that).length;
var middle = Math.floor(length / 2);
var index = 0;
var value;
while (index < middle) {
value = that[index];
that[index++] = that[--length];
that[length] = value;
} return that;
},
some: function some(callbackfn /* , thisArg */) {
return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
},
sort: function sort(comparefn) {
return arraySort.call(validate(this), comparefn);
},
subarray: function subarray(begin, end) {
var O = validate(this);
var length = O.length;
var $begin = toAbsoluteIndex(begin, length);
return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(
O.buffer,
O.byteOffset + $begin * O.BYTES_PER_ELEMENT,
toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin)
);
}
};
var $slice = function slice(start, end) {
return speciesFromList(this, arraySlice.call(validate(this), start, end));
};
var $set = function set(arrayLike /* , offset */) {
validate(this);
var offset = toOffset(arguments[1], 1);
var length = this.length;
var src = toObject(arrayLike);
var len = toLength(src.length);
var index = 0;
if (len + offset > length) throw RangeError(WRONG_LENGTH);
while (index < len) this[offset + index] = src[index++];
};
var $iterators = {
entries: function entries() {
return arrayEntries.call(validate(this));
},
keys: function keys() {
return arrayKeys.call(validate(this));
},
values: function values() {
return arrayValues.call(validate(this));
}
};
var isTAIndex = function (target, key) {
return isObject(target)
&& target[TYPED_ARRAY]
&& typeof key != 'symbol'
&& key in target
&& String(+key) == String(key);
};
var $getDesc = function getOwnPropertyDescriptor(target, key) {
return isTAIndex(target, key = toPrimitive(key, true))
? propertyDesc(2, target[key])
: gOPD(target, key);
};
var $setDesc = function defineProperty(target, key, desc) {
if (isTAIndex(target, key = toPrimitive(key, true))
&& isObject(desc)
&& has(desc, 'value')
&& !has(desc, 'get')
&& !has(desc, 'set')
// TODO: add validation descriptor w/o calling accessors
&& !desc.configurable
&& (!has(desc, 'writable') || desc.writable)
&& (!has(desc, 'enumerable') || desc.enumerable)
) {
target[key] = desc.value;
return target;
} return dP(target, key, desc);
};
if (!ALL_CONSTRUCTORS) {
$GOPD.f = $getDesc;
$DP.f = $setDesc;
}
$export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {
getOwnPropertyDescriptor: $getDesc,
defineProperty: $setDesc
});
if (fails(function () { arrayToString.call({}); })) {
arrayToString = arrayToLocaleString = function toString() {
return arrayJoin.call(this);
};
}
var $TypedArrayPrototype$ = redefineAll({}, proto);
redefineAll($TypedArrayPrototype$, $iterators);
hide($TypedArrayPrototype$, ITERATOR, $iterators.values);
redefineAll($TypedArrayPrototype$, {
slice: $slice,
set: $set,
constructor: function () { /* noop */ },
toString: arrayToString,
toLocaleString: $toLocaleString
});
addGetter($TypedArrayPrototype$, 'buffer', 'b');
addGetter($TypedArrayPrototype$, 'byteOffset', 'o');
addGetter($TypedArrayPrototype$, 'byteLength', 'l');
addGetter($TypedArrayPrototype$, 'length', 'e');
dP($TypedArrayPrototype$, TAG, {
get: function () { return this[TYPED_ARRAY]; }
});
// eslint-disable-next-line max-statements
module.exports = function (KEY, BYTES, wrapper, CLAMPED) {
CLAMPED = !!CLAMPED;
var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array';
var GETTER = 'get' + KEY;
var SETTER = 'set' + KEY;
var TypedArray = global[NAME];
var Base = TypedArray || {};
var TAC = TypedArray && getPrototypeOf(TypedArray);
var FORCED = !TypedArray || !$typed.ABV;
var O = {};
var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];
var getter = function (that, index) {
var data = that._d;
return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);
};
var setter = function (that, index, value) {
var data = that._d;
if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;
data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);
};
var addElement = function (that, index) {
dP(that, index, {
get: function () {
return getter(this, index);
},
set: function (value) {
return setter(this, index, value);
},
enumerable: true
});
};
if (FORCED) {
TypedArray = wrapper(function (that, data, $offset, $length) {
anInstance(that, TypedArray, NAME, '_d');
var index = 0;
var offset = 0;
var buffer, byteLength, length, klass;
if (!isObject(data)) {
length = toIndex(data);
byteLength = length * BYTES;
buffer = new $ArrayBuffer(byteLength);
} else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
buffer = data;
offset = toOffset($offset, BYTES);
var $len = data.byteLength;
if ($length === undefined) {
if ($len % BYTES) throw RangeError(WRONG_LENGTH);
byteLength = $len - offset;
if (byteLength < 0) throw RangeError(WRONG_LENGTH);
} else {
byteLength = toLength($length) * BYTES;
if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH);
}
length = byteLength / BYTES;
} else if (TYPED_ARRAY in data) {
return fromList(TypedArray, data);
} else {
return $from.call(TypedArray, data);
}
hide(that, '_d', {
b: buffer,
o: offset,
l: byteLength,
e: length,
v: new $DataView(buffer)
});
while (index < length) addElement(that, index++);
});
TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);
hide(TypedArrayPrototype, 'constructor', TypedArray);
} else if (!fails(function () {
TypedArray(1);
}) || !fails(function () {
new TypedArray(-1); // eslint-disable-line no-new
}) || !$iterDetect(function (iter) {
new TypedArray(); // eslint-disable-line no-new
new TypedArray(null); // eslint-disable-line no-new
new TypedArray(1.5); // eslint-disable-line no-new
new TypedArray(iter); // eslint-disable-line no-new
}, true)) {
TypedArray = wrapper(function (that, data, $offset, $length) {
anInstance(that, TypedArray, NAME);
var klass;
// `ws` module bug, temporarily remove validation length for Uint8Array
// https://github.com/websockets/ws/pull/645
if (!isObject(data)) return new Base(toIndex(data));
if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
return $length !== undefined
? new Base(data, toOffset($offset, BYTES), $length)
: $offset !== undefined
? new Base(data, toOffset($offset, BYTES))
: new Base(data);
}
if (TYPED_ARRAY in data) return fromList(TypedArray, data);
return $from.call(TypedArray, data);
});
arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) {
if (!(key in TypedArray)) hide(TypedArray, key, Base[key]);
});
TypedArray[PROTOTYPE] = TypedArrayPrototype;
if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray;
}
var $nativeIterator = TypedArrayPrototype[ITERATOR];
var CORRECT_ITER_NAME = !!$nativeIterator
&& ($nativeIterator.name == 'values' || $nativeIterator.name == undefined);
var $iterator = $iterators.values;
hide(TypedArray, TYPED_CONSTRUCTOR, true);
hide(TypedArrayPrototype, TYPED_ARRAY, NAME);
hide(TypedArrayPrototype, VIEW, true);
hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);
if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) {
dP(TypedArrayPrototype, TAG, {
get: function () { return NAME; }
});
}
O[NAME] = TypedArray;
$export($export.G + $export.W + $export.F * (TypedArray != Base), O);
$export($export.S, NAME, {
BYTES_PER_ELEMENT: BYTES
});
$export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, {
from: $from,
of: $of
});
if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);
$export($export.P, NAME, proto);
setSpecies(NAME);
$export($export.P + $export.F * FORCED_SET, NAME, { set: $set });
$export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);
if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;
$export($export.P + $export.F * fails(function () {
new TypedArray(1).slice();
}), NAME, { slice: $slice });
$export($export.P + $export.F * (fails(function () {
return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString();
}) || !fails(function () {
TypedArrayPrototype.toLocaleString.call([1, 2]);
})), NAME, { toLocaleString: $toLocaleString });
Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;
if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator);
};
} else module.exports = function () { /* empty */ };
/***/ }),
/***/ "../../node_modules/core-js/modules/_typed-buffer.js":
/*!**********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_typed-buffer.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/modules/_descriptors.js");
var LIBRARY = __webpack_require__(/*! ./_library */ "../../node_modules/core-js/modules/_library.js");
var $typed = __webpack_require__(/*! ./_typed */ "../../node_modules/core-js/modules/_typed.js");
var hide = __webpack_require__(/*! ./_hide */ "../../node_modules/core-js/modules/_hide.js");
var redefineAll = __webpack_require__(/*! ./_redefine-all */ "../../node_modules/core-js/modules/_redefine-all.js");
var fails = __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js");
var anInstance = __webpack_require__(/*! ./_an-instance */ "../../node_modules/core-js/modules/_an-instance.js");
var toInteger = __webpack_require__(/*! ./_to-integer */ "../../node_modules/core-js/modules/_to-integer.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
var toIndex = __webpack_require__(/*! ./_to-index */ "../../node_modules/core-js/modules/_to-index.js");
var gOPN = __webpack_require__(/*! ./_object-gopn */ "../../node_modules/core-js/modules/_object-gopn.js").f;
var dP = __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/modules/_object-dp.js").f;
var arrayFill = __webpack_require__(/*! ./_array-fill */ "../../node_modules/core-js/modules/_array-fill.js");
var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "../../node_modules/core-js/modules/_set-to-string-tag.js");
var ARRAY_BUFFER = 'ArrayBuffer';
var DATA_VIEW = 'DataView';
var PROTOTYPE = 'prototype';
var WRONG_LENGTH = 'Wrong length!';
var WRONG_INDEX = 'Wrong index!';
var $ArrayBuffer = global[ARRAY_BUFFER];
var $DataView = global[DATA_VIEW];
var Math = global.Math;
var RangeError = global.RangeError;
// eslint-disable-next-line no-shadow-restricted-names
var Infinity = global.Infinity;
var BaseBuffer = $ArrayBuffer;
var abs = Math.abs;
var pow = Math.pow;
var floor = Math.floor;
var log = Math.log;
var LN2 = Math.LN2;
var BUFFER = 'buffer';
var BYTE_LENGTH = 'byteLength';
var BYTE_OFFSET = 'byteOffset';
var $BUFFER = DESCRIPTORS ? '_b' : BUFFER;
var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH;
var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
// IEEE754 conversions based on https://github.com/feross/ieee754
function packIEEE754(value, mLen, nBytes) {
var buffer = new Array(nBytes);
var eLen = nBytes * 8 - mLen - 1;
var eMax = (1 << eLen) - 1;
var eBias = eMax >> 1;
var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0;
var i = 0;
var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
var e, m, c;
value = abs(value);
// eslint-disable-next-line no-self-compare
if (value != value || value === Infinity) {
// eslint-disable-next-line no-self-compare
m = value != value ? 1 : 0;
e = eMax;
} else {
e = floor(log(value) / LN2);
if (value * (c = pow(2, -e)) < 1) {
e--;
c *= 2;
}
if (e + eBias >= 1) {
value += rt / c;
} else {
value += rt * pow(2, 1 - eBias);
}
if (value * c >= 2) {
e++;
c /= 2;
}
if (e + eBias >= eMax) {
m = 0;
e = eMax;
} else if (e + eBias >= 1) {
m = (value * c - 1) * pow(2, mLen);
e = e + eBias;
} else {
m = value * pow(2, eBias - 1) * pow(2, mLen);
e = 0;
}
}
for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
e = e << mLen | m;
eLen += mLen;
for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
buffer[--i] |= s * 128;
return buffer;
}
function unpackIEEE754(buffer, mLen, nBytes) {
var eLen = nBytes * 8 - mLen - 1;
var eMax = (1 << eLen) - 1;
var eBias = eMax >> 1;
var nBits = eLen - 7;
var i = nBytes - 1;
var s = buffer[i--];
var e = s & 127;
var m;
s >>= 7;
for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
m = e & (1 << -nBits) - 1;
e >>= -nBits;
nBits += mLen;
for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
if (e === 0) {
e = 1 - eBias;
} else if (e === eMax) {
return m ? NaN : s ? -Infinity : Infinity;
} else {
m = m + pow(2, mLen);
e = e - eBias;
} return (s ? -1 : 1) * m * pow(2, e - mLen);
}
function unpackI32(bytes) {
return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
}
function packI8(it) {
return [it & 0xff];
}
function packI16(it) {
return [it & 0xff, it >> 8 & 0xff];
}
function packI32(it) {
return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
}
function packF64(it) {
return packIEEE754(it, 52, 8);
}
function packF32(it) {
return packIEEE754(it, 23, 4);
}
function addGetter(C, key, internal) {
dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } });
}
function get(view, bytes, index, isLittleEndian) {
var numIndex = +index;
var intIndex = toIndex(numIndex);
if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
var store = view[$BUFFER]._b;
var start = intIndex + view[$OFFSET];
var pack = store.slice(start, start + bytes);
return isLittleEndian ? pack : pack.reverse();
}
function set(view, bytes, index, conversion, value, isLittleEndian) {
var numIndex = +index;
var intIndex = toIndex(numIndex);
if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
var store = view[$BUFFER]._b;
var start = intIndex + view[$OFFSET];
var pack = conversion(+value);
for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
}
if (!$typed.ABV) {
$ArrayBuffer = function ArrayBuffer(length) {
anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
var byteLength = toIndex(length);
this._b = arrayFill.call(new Array(byteLength), 0);
this[$LENGTH] = byteLength;
};
$DataView = function DataView(buffer, byteOffset, byteLength) {
anInstance(this, $DataView, DATA_VIEW);
anInstance(buffer, $ArrayBuffer, DATA_VIEW);
var bufferLength = buffer[$LENGTH];
var offset = toInteger(byteOffset);
if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!');
byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
this[$BUFFER] = buffer;
this[$OFFSET] = offset;
this[$LENGTH] = byteLength;
};
if (DESCRIPTORS) {
addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
addGetter($DataView, BUFFER, '_b');
addGetter($DataView, BYTE_LENGTH, '_l');
addGetter($DataView, BYTE_OFFSET, '_o');
}
redefineAll($DataView[PROTOTYPE], {
getInt8: function getInt8(byteOffset) {
return get(this, 1, byteOffset)[0] << 24 >> 24;
},
getUint8: function getUint8(byteOffset) {
return get(this, 1, byteOffset)[0];
},
getInt16: function getInt16(byteOffset /* , littleEndian */) {
var bytes = get(this, 2, byteOffset, arguments[1]);
return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
},
getUint16: function getUint16(byteOffset /* , littleEndian */) {
var bytes = get(this, 2, byteOffset, arguments[1]);
return bytes[1] << 8 | bytes[0];
},
getInt32: function getInt32(byteOffset /* , littleEndian */) {
return unpackI32(get(this, 4, byteOffset, arguments[1]));
},
getUint32: function getUint32(byteOffset /* , littleEndian */) {
return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
},
getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
},
getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
},
setInt8: function setInt8(byteOffset, value) {
set(this, 1, byteOffset, packI8, value);
},
setUint8: function setUint8(byteOffset, value) {
set(this, 1, byteOffset, packI8, value);
},
setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
set(this, 2, byteOffset, packI16, value, arguments[2]);
},
setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
set(this, 2, byteOffset, packI16, value, arguments[2]);
},
setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
set(this, 4, byteOffset, packI32, value, arguments[2]);
},
setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
set(this, 4, byteOffset, packI32, value, arguments[2]);
},
setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
set(this, 4, byteOffset, packF32, value, arguments[2]);
},
setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
set(this, 8, byteOffset, packF64, value, arguments[2]);
}
});
} else {
if (!fails(function () {
$ArrayBuffer(1);
}) || !fails(function () {
new $ArrayBuffer(-1); // eslint-disable-line no-new
}) || fails(function () {
new $ArrayBuffer(); // eslint-disable-line no-new
new $ArrayBuffer(1.5); // eslint-disable-line no-new
new $ArrayBuffer(NaN); // eslint-disable-line no-new
return $ArrayBuffer.name != ARRAY_BUFFER;
})) {
$ArrayBuffer = function ArrayBuffer(length) {
anInstance(this, $ArrayBuffer);
return new BaseBuffer(toIndex(length));
};
var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) {
if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]);
}
if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer;
}
// iOS Safari 7.x bug
var view = new $DataView(new $ArrayBuffer(2));
var $setInt8 = $DataView[PROTOTYPE].setInt8;
view.setInt8(0, 2147483648);
view.setInt8(1, 2147483649);
if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], {
setInt8: function setInt8(byteOffset, value) {
$setInt8.call(this, byteOffset, value << 24 >> 24);
},
setUint8: function setUint8(byteOffset, value) {
$setInt8.call(this, byteOffset, value << 24 >> 24);
}
}, true);
}
setToStringTag($ArrayBuffer, ARRAY_BUFFER);
setToStringTag($DataView, DATA_VIEW);
hide($DataView[PROTOTYPE], $typed.VIEW, true);
exports[ARRAY_BUFFER] = $ArrayBuffer;
exports[DATA_VIEW] = $DataView;
/***/ }),
/***/ "../../node_modules/core-js/modules/_typed.js":
/*!***************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_typed.js ***!
\***************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var hide = __webpack_require__(/*! ./_hide */ "../../node_modules/core-js/modules/_hide.js");
var uid = __webpack_require__(/*! ./_uid */ "../../node_modules/core-js/modules/_uid.js");
var TYPED = uid('typed_array');
var VIEW = uid('view');
var ABV = !!(global.ArrayBuffer && global.DataView);
var CONSTR = ABV;
var i = 0;
var l = 9;
var Typed;
var TypedArrayConstructors = (
'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'
).split(',');
while (i < l) {
if (Typed = global[TypedArrayConstructors[i++]]) {
hide(Typed.prototype, TYPED, true);
hide(Typed.prototype, VIEW, true);
} else CONSTR = false;
}
module.exports = {
ABV: ABV,
CONSTR: CONSTR,
TYPED: TYPED,
VIEW: VIEW
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_uid.js":
/*!*************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_uid.js ***!
\*************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
var id = 0;
var px = Math.random();
module.exports = function (key) {
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_user-agent.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_user-agent.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var navigator = global.navigator;
module.exports = navigator && navigator.userAgent || '';
/***/ }),
/***/ "../../node_modules/core-js/modules/_validate-collection.js":
/*!*****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_validate-collection.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
module.exports = function (it, TYPE) {
if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
return it;
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_wks-define.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_wks-define.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var core = __webpack_require__(/*! ./_core */ "../../node_modules/core-js/modules/_core.js");
var LIBRARY = __webpack_require__(/*! ./_library */ "../../node_modules/core-js/modules/_library.js");
var wksExt = __webpack_require__(/*! ./_wks-ext */ "../../node_modules/core-js/modules/_wks-ext.js");
var defineProperty = __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/modules/_object-dp.js").f;
module.exports = function (name) {
var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
};
/***/ }),
/***/ "../../node_modules/core-js/modules/_wks-ext.js":
/*!*****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_wks-ext.js ***!
\*****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
exports.f = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js");
/***/ }),
/***/ "../../node_modules/core-js/modules/_wks.js":
/*!*************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/_wks.js ***!
\*************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var store = __webpack_require__(/*! ./_shared */ "../../node_modules/core-js/modules/_shared.js")('wks');
var uid = __webpack_require__(/*! ./_uid */ "../../node_modules/core-js/modules/_uid.js");
var Symbol = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js").Symbol;
var USE_SYMBOL = typeof Symbol == 'function';
var $exports = module.exports = function (name) {
return store[name] || (store[name] =
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};
$exports.store = store;
/***/ }),
/***/ "../../node_modules/core-js/modules/core.get-iterator-method.js":
/*!*********************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/core.get-iterator-method.js ***!
\*********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var classof = __webpack_require__(/*! ./_classof */ "../../node_modules/core-js/modules/_classof.js");
var ITERATOR = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js")('iterator');
var Iterators = __webpack_require__(/*! ./_iterators */ "../../node_modules/core-js/modules/_iterators.js");
module.exports = __webpack_require__(/*! ./_core */ "../../node_modules/core-js/modules/_core.js").getIteratorMethod = function (it) {
if (it != undefined) return it[ITERATOR]
|| it['@@iterator']
|| Iterators[classof(it)];
};
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.copy-within.js":
/*!******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.copy-within.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.P, 'Array', { copyWithin: __webpack_require__(/*! ./_array-copy-within */ "../../node_modules/core-js/modules/_array-copy-within.js") });
__webpack_require__(/*! ./_add-to-unscopables */ "../../node_modules/core-js/modules/_add-to-unscopables.js")('copyWithin');
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.every.js":
/*!************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.every.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $every = __webpack_require__(/*! ./_array-methods */ "../../node_modules/core-js/modules/_array-methods.js")(4);
$export($export.P + $export.F * !__webpack_require__(/*! ./_strict-method */ "../../node_modules/core-js/modules/_strict-method.js")([].every, true), 'Array', {
// 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
every: function every(callbackfn /* , thisArg */) {
return $every(this, callbackfn, arguments[1]);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.fill.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.fill.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.P, 'Array', { fill: __webpack_require__(/*! ./_array-fill */ "../../node_modules/core-js/modules/_array-fill.js") });
__webpack_require__(/*! ./_add-to-unscopables */ "../../node_modules/core-js/modules/_add-to-unscopables.js")('fill');
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.filter.js":
/*!*************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.filter.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $filter = __webpack_require__(/*! ./_array-methods */ "../../node_modules/core-js/modules/_array-methods.js")(2);
$export($export.P + $export.F * !__webpack_require__(/*! ./_strict-method */ "../../node_modules/core-js/modules/_strict-method.js")([].filter, true), 'Array', {
// 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
filter: function filter(callbackfn /* , thisArg */) {
return $filter(this, callbackfn, arguments[1]);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.find-index.js":
/*!*****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.find-index.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $find = __webpack_require__(/*! ./_array-methods */ "../../node_modules/core-js/modules/_array-methods.js")(6);
var KEY = 'findIndex';
var forced = true;
// Shouldn't skip holes
if (KEY in []) Array(1)[KEY](function () { forced = false; });
$export($export.P + $export.F * forced, 'Array', {
findIndex: function findIndex(callbackfn /* , that = undefined */) {
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
__webpack_require__(/*! ./_add-to-unscopables */ "../../node_modules/core-js/modules/_add-to-unscopables.js")(KEY);
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.find.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.find.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $find = __webpack_require__(/*! ./_array-methods */ "../../node_modules/core-js/modules/_array-methods.js")(5);
var KEY = 'find';
var forced = true;
// Shouldn't skip holes
if (KEY in []) Array(1)[KEY](function () { forced = false; });
$export($export.P + $export.F * forced, 'Array', {
find: function find(callbackfn /* , that = undefined */) {
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
__webpack_require__(/*! ./_add-to-unscopables */ "../../node_modules/core-js/modules/_add-to-unscopables.js")(KEY);
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.for-each.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.for-each.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $forEach = __webpack_require__(/*! ./_array-methods */ "../../node_modules/core-js/modules/_array-methods.js")(0);
var STRICT = __webpack_require__(/*! ./_strict-method */ "../../node_modules/core-js/modules/_strict-method.js")([].forEach, true);
$export($export.P + $export.F * !STRICT, 'Array', {
// 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
forEach: function forEach(callbackfn /* , thisArg */) {
return $forEach(this, callbackfn, arguments[1]);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.from.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.from.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ctx = __webpack_require__(/*! ./_ctx */ "../../node_modules/core-js/modules/_ctx.js");
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var toObject = __webpack_require__(/*! ./_to-object */ "../../node_modules/core-js/modules/_to-object.js");
var call = __webpack_require__(/*! ./_iter-call */ "../../node_modules/core-js/modules/_iter-call.js");
var isArrayIter = __webpack_require__(/*! ./_is-array-iter */ "../../node_modules/core-js/modules/_is-array-iter.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
var createProperty = __webpack_require__(/*! ./_create-property */ "../../node_modules/core-js/modules/_create-property.js");
var getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ "../../node_modules/core-js/modules/core.get-iterator-method.js");
$export($export.S + $export.F * !__webpack_require__(/*! ./_iter-detect */ "../../node_modules/core-js/modules/_iter-detect.js")(function (iter) { Array.from(iter); }), 'Array', {
// 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
var O = toObject(arrayLike);
var C = typeof this == 'function' ? this : Array;
var aLen = arguments.length;
var mapfn = aLen > 1 ? arguments[1] : undefined;
var mapping = mapfn !== undefined;
var index = 0;
var iterFn = getIterFn(O);
var length, result, step, iterator;
if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
// if object isn't iterable or it's array with default iterator - use simple case
if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
}
} else {
length = toLength(O.length);
for (result = new C(length); length > index; index++) {
createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
}
}
result.length = index;
return result;
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.index-of.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.index-of.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $indexOf = __webpack_require__(/*! ./_array-includes */ "../../node_modules/core-js/modules/_array-includes.js")(false);
var $native = [].indexOf;
var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;
$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(/*! ./_strict-method */ "../../node_modules/core-js/modules/_strict-method.js")($native)), 'Array', {
// 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
return NEGATIVE_ZERO
// convert -0 to +0
? $native.apply(this, arguments) || 0
: $indexOf(this, searchElement, arguments[1]);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.is-array.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.is-array.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.S, 'Array', { isArray: __webpack_require__(/*! ./_is-array */ "../../node_modules/core-js/modules/_is-array.js") });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.iterator.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.iterator.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var addToUnscopables = __webpack_require__(/*! ./_add-to-unscopables */ "../../node_modules/core-js/modules/_add-to-unscopables.js");
var step = __webpack_require__(/*! ./_iter-step */ "../../node_modules/core-js/modules/_iter-step.js");
var Iterators = __webpack_require__(/*! ./_iterators */ "../../node_modules/core-js/modules/_iterators.js");
var toIObject = __webpack_require__(/*! ./_to-iobject */ "../../node_modules/core-js/modules/_to-iobject.js");
// 22.1.3.4 Array.prototype.entries()
// 22.1.3.13 Array.prototype.keys()
// 22.1.3.29 Array.prototype.values()
// 22.1.3.30 Array.prototype[@@iterator]()
module.exports = __webpack_require__(/*! ./_iter-define */ "../../node_modules/core-js/modules/_iter-define.js")(Array, 'Array', function (iterated, kind) {
this._t = toIObject(iterated); // target
this._i = 0; // next index
this._k = kind; // kind
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
}, function () {
var O = this._t;
var kind = this._k;
var index = this._i++;
if (!O || index >= O.length) {
this._t = undefined;
return step(1);
}
if (kind == 'keys') return step(0, index);
if (kind == 'values') return step(0, O[index]);
return step(0, [index, O[index]]);
}, 'values');
// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
Iterators.Arguments = Iterators.Array;
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.join.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.join.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 22.1.3.13 Array.prototype.join(separator)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var toIObject = __webpack_require__(/*! ./_to-iobject */ "../../node_modules/core-js/modules/_to-iobject.js");
var arrayJoin = [].join;
// fallback for not array-like strings
$export($export.P + $export.F * (__webpack_require__(/*! ./_iobject */ "../../node_modules/core-js/modules/_iobject.js") != Object || !__webpack_require__(/*! ./_strict-method */ "../../node_modules/core-js/modules/_strict-method.js")(arrayJoin)), 'Array', {
join: function join(separator) {
return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.last-index-of.js":
/*!********************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.last-index-of.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var toIObject = __webpack_require__(/*! ./_to-iobject */ "../../node_modules/core-js/modules/_to-iobject.js");
var toInteger = __webpack_require__(/*! ./_to-integer */ "../../node_modules/core-js/modules/_to-integer.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
var $native = [].lastIndexOf;
var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;
$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(/*! ./_strict-method */ "../../node_modules/core-js/modules/_strict-method.js")($native)), 'Array', {
// 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
// convert -0 to +0
if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0;
var O = toIObject(this);
var length = toLength(O.length);
var index = length - 1;
if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1]));
if (index < 0) index = length + index;
for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0;
return -1;
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.map.js":
/*!**********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.map.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $map = __webpack_require__(/*! ./_array-methods */ "../../node_modules/core-js/modules/_array-methods.js")(1);
$export($export.P + $export.F * !__webpack_require__(/*! ./_strict-method */ "../../node_modules/core-js/modules/_strict-method.js")([].map, true), 'Array', {
// 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
map: function map(callbackfn /* , thisArg */) {
return $map(this, callbackfn, arguments[1]);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.of.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.of.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var createProperty = __webpack_require__(/*! ./_create-property */ "../../node_modules/core-js/modules/_create-property.js");
// WebKit Array.of isn't generic
$export($export.S + $export.F * __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js")(function () {
function F() { /* empty */ }
return !(Array.of.call(F) instanceof F);
}), 'Array', {
// 22.1.2.3 Array.of( ...items)
of: function of(/* ...args */) {
var index = 0;
var aLen = arguments.length;
var result = new (typeof this == 'function' ? this : Array)(aLen);
while (aLen > index) createProperty(result, index, arguments[index++]);
result.length = aLen;
return result;
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.reduce-right.js":
/*!*******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.reduce-right.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $reduce = __webpack_require__(/*! ./_array-reduce */ "../../node_modules/core-js/modules/_array-reduce.js");
$export($export.P + $export.F * !__webpack_require__(/*! ./_strict-method */ "../../node_modules/core-js/modules/_strict-method.js")([].reduceRight, true), 'Array', {
// 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
reduceRight: function reduceRight(callbackfn /* , initialValue */) {
return $reduce(this, callbackfn, arguments.length, arguments[1], true);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.reduce.js":
/*!*************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.reduce.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $reduce = __webpack_require__(/*! ./_array-reduce */ "../../node_modules/core-js/modules/_array-reduce.js");
$export($export.P + $export.F * !__webpack_require__(/*! ./_strict-method */ "../../node_modules/core-js/modules/_strict-method.js")([].reduce, true), 'Array', {
// 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
reduce: function reduce(callbackfn /* , initialValue */) {
return $reduce(this, callbackfn, arguments.length, arguments[1], false);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.slice.js":
/*!************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.slice.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var html = __webpack_require__(/*! ./_html */ "../../node_modules/core-js/modules/_html.js");
var cof = __webpack_require__(/*! ./_cof */ "../../node_modules/core-js/modules/_cof.js");
var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "../../node_modules/core-js/modules/_to-absolute-index.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
var arraySlice = [].slice;
// fallback for not array-like ES3 strings and DOM objects
$export($export.P + $export.F * __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js")(function () {
if (html) arraySlice.call(html);
}), 'Array', {
slice: function slice(begin, end) {
var len = toLength(this.length);
var klass = cof(this);
end = end === undefined ? len : end;
if (klass == 'Array') return arraySlice.call(this, begin, end);
var start = toAbsoluteIndex(begin, len);
var upTo = toAbsoluteIndex(end, len);
var size = toLength(upTo - start);
var cloned = new Array(size);
var i = 0;
for (; i < size; i++) cloned[i] = klass == 'String'
? this.charAt(start + i)
: this[start + i];
return cloned;
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.some.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.some.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $some = __webpack_require__(/*! ./_array-methods */ "../../node_modules/core-js/modules/_array-methods.js")(3);
$export($export.P + $export.F * !__webpack_require__(/*! ./_strict-method */ "../../node_modules/core-js/modules/_strict-method.js")([].some, true), 'Array', {
// 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
some: function some(callbackfn /* , thisArg */) {
return $some(this, callbackfn, arguments[1]);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.sort.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.sort.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var aFunction = __webpack_require__(/*! ./_a-function */ "../../node_modules/core-js/modules/_a-function.js");
var toObject = __webpack_require__(/*! ./_to-object */ "../../node_modules/core-js/modules/_to-object.js");
var fails = __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js");
var $sort = [].sort;
var test = [1, 2, 3];
$export($export.P + $export.F * (fails(function () {
// IE8-
test.sort(undefined);
}) || !fails(function () {
// V8 bug
test.sort(null);
// Old WebKit
}) || !__webpack_require__(/*! ./_strict-method */ "../../node_modules/core-js/modules/_strict-method.js")($sort)), 'Array', {
// 22.1.3.25 Array.prototype.sort(comparefn)
sort: function sort(comparefn) {
return comparefn === undefined
? $sort.call(toObject(this))
: $sort.call(toObject(this), aFunction(comparefn));
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.array.species.js":
/*!**************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.array.species.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ./_set-species */ "../../node_modules/core-js/modules/_set-species.js")('Array');
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.date.now.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.date.now.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.3.3.1 / 15.9.4.4 Date.now()
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.S, 'Date', { now: function () { return new Date().getTime(); } });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.date.to-iso-string.js":
/*!*******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.date.to-iso-string.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var toISOString = __webpack_require__(/*! ./_date-to-iso-string */ "../../node_modules/core-js/modules/_date-to-iso-string.js");
// PhantomJS / old WebKit has a broken implementations
$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', {
toISOString: toISOString
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.date.to-json.js":
/*!*************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.date.to-json.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var toObject = __webpack_require__(/*! ./_to-object */ "../../node_modules/core-js/modules/_to-object.js");
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "../../node_modules/core-js/modules/_to-primitive.js");
$export($export.P + $export.F * __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js")(function () {
return new Date(NaN).toJSON() !== null
|| Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;
}), 'Date', {
// eslint-disable-next-line no-unused-vars
toJSON: function toJSON(key) {
var O = toObject(this);
var pv = toPrimitive(O);
return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.date.to-primitive.js":
/*!******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.date.to-primitive.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var TO_PRIMITIVE = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js")('toPrimitive');
var proto = Date.prototype;
if (!(TO_PRIMITIVE in proto)) __webpack_require__(/*! ./_hide */ "../../node_modules/core-js/modules/_hide.js")(proto, TO_PRIMITIVE, __webpack_require__(/*! ./_date-to-primitive */ "../../node_modules/core-js/modules/_date-to-primitive.js"));
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.date.to-string.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.date.to-string.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var DateProto = Date.prototype;
var INVALID_DATE = 'Invalid Date';
var TO_STRING = 'toString';
var $toString = DateProto[TO_STRING];
var getTime = DateProto.getTime;
if (new Date(NaN) + '' != INVALID_DATE) {
__webpack_require__(/*! ./_redefine */ "../../node_modules/core-js/modules/_redefine.js")(DateProto, TO_STRING, function toString() {
var value = getTime.call(this);
// eslint-disable-next-line no-self-compare
return value === value ? $toString.call(this) : INVALID_DATE;
});
}
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.function.bind.js":
/*!**************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.function.bind.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.P, 'Function', { bind: __webpack_require__(/*! ./_bind */ "../../node_modules/core-js/modules/_bind.js") });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.function.has-instance.js":
/*!**********************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.function.has-instance.js ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "../../node_modules/core-js/modules/_object-gpo.js");
var HAS_INSTANCE = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js")('hasInstance');
var FunctionProto = Function.prototype;
// 19.2.3.6 Function.prototype[@@hasInstance](V)
if (!(HAS_INSTANCE in FunctionProto)) __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/modules/_object-dp.js").f(FunctionProto, HAS_INSTANCE, { value: function (O) {
if (typeof this != 'function' || !isObject(O)) return false;
if (!isObject(this.prototype)) return O instanceof this;
// for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
while (O = getPrototypeOf(O)) if (this.prototype === O) return true;
return false;
} });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.function.name.js":
/*!**************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.function.name.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/modules/_object-dp.js").f;
var FProto = Function.prototype;
var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';
// 19.2.4.2 name
NAME in FProto || __webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/modules/_descriptors.js") && dP(FProto, NAME, {
configurable: true,
get: function () {
try {
return ('' + this).match(nameRE)[1];
} catch (e) {
return '';
}
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.map.js":
/*!****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.map.js ***!
\****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var strong = __webpack_require__(/*! ./_collection-strong */ "../../node_modules/core-js/modules/_collection-strong.js");
var validate = __webpack_require__(/*! ./_validate-collection */ "../../node_modules/core-js/modules/_validate-collection.js");
var MAP = 'Map';
// 23.1 Map Objects
module.exports = __webpack_require__(/*! ./_collection */ "../../node_modules/core-js/modules/_collection.js")(MAP, function (get) {
return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.1.3.6 Map.prototype.get(key)
get: function get(key) {
var entry = strong.getEntry(validate(this, MAP), key);
return entry && entry.v;
},
// 23.1.3.9 Map.prototype.set(key, value)
set: function set(key, value) {
return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);
}
}, strong, true);
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.math.acosh.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.math.acosh.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.3 Math.acosh(x)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var log1p = __webpack_require__(/*! ./_math-log1p */ "../../node_modules/core-js/modules/_math-log1p.js");
var sqrt = Math.sqrt;
var $acosh = Math.acosh;
$export($export.S + $export.F * !($acosh
// V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
&& Math.floor($acosh(Number.MAX_VALUE)) == 710
// Tor Browser bug: Math.acosh(Infinity) -> NaN
&& $acosh(Infinity) == Infinity
), 'Math', {
acosh: function acosh(x) {
return (x = +x) < 1 ? NaN : x > 94906265.62425156
? Math.log(x) + Math.LN2
: log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.math.asinh.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.math.asinh.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.5 Math.asinh(x)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $asinh = Math.asinh;
function asinh(x) {
return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
}
// Tor Browser bug: Math.asinh(0) -> -0
$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.math.atanh.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.math.atanh.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.7 Math.atanh(x)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $atanh = Math.atanh;
// Tor Browser bug: Math.atanh(-0) -> 0
$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
atanh: function atanh(x) {
return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.math.cbrt.js":
/*!**********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.math.cbrt.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.9 Math.cbrt(x)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var sign = __webpack_require__(/*! ./_math-sign */ "../../node_modules/core-js/modules/_math-sign.js");
$export($export.S, 'Math', {
cbrt: function cbrt(x) {
return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.math.clz32.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.math.clz32.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.11 Math.clz32(x)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.S, 'Math', {
clz32: function clz32(x) {
return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.math.cosh.js":
/*!**********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.math.cosh.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.12 Math.cosh(x)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var exp = Math.exp;
$export($export.S, 'Math', {
cosh: function cosh(x) {
return (exp(x = +x) + exp(-x)) / 2;
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.math.expm1.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.math.expm1.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.14 Math.expm1(x)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $expm1 = __webpack_require__(/*! ./_math-expm1 */ "../../node_modules/core-js/modules/_math-expm1.js");
$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.math.fround.js":
/*!************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.math.fround.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.16 Math.fround(x)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.S, 'Math', { fround: __webpack_require__(/*! ./_math-fround */ "../../node_modules/core-js/modules/_math-fround.js") });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.math.hypot.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.math.hypot.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var abs = Math.abs;
$export($export.S, 'Math', {
hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars
var sum = 0;
var i = 0;
var aLen = arguments.length;
var larg = 0;
var arg, div;
while (i < aLen) {
arg = abs(arguments[i++]);
if (larg < arg) {
div = larg / arg;
sum = sum * div * div + 1;
larg = arg;
} else if (arg > 0) {
div = arg / larg;
sum += div * div;
} else sum += arg;
}
return larg === Infinity ? Infinity : larg * Math.sqrt(sum);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.math.imul.js":
/*!**********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.math.imul.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.18 Math.imul(x, y)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $imul = Math.imul;
// some WebKit versions fails with big numbers, some has wrong arity
$export($export.S + $export.F * __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js")(function () {
return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
}), 'Math', {
imul: function imul(x, y) {
var UINT16 = 0xffff;
var xn = +x;
var yn = +y;
var xl = UINT16 & xn;
var yl = UINT16 & yn;
return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.math.log10.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.math.log10.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.21 Math.log10(x)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.S, 'Math', {
log10: function log10(x) {
return Math.log(x) * Math.LOG10E;
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.math.log1p.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.math.log1p.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.20 Math.log1p(x)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.S, 'Math', { log1p: __webpack_require__(/*! ./_math-log1p */ "../../node_modules/core-js/modules/_math-log1p.js") });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.math.log2.js":
/*!**********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.math.log2.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.22 Math.log2(x)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.S, 'Math', {
log2: function log2(x) {
return Math.log(x) / Math.LN2;
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.math.sign.js":
/*!**********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.math.sign.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.28 Math.sign(x)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.S, 'Math', { sign: __webpack_require__(/*! ./_math-sign */ "../../node_modules/core-js/modules/_math-sign.js") });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.math.sinh.js":
/*!**********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.math.sinh.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.30 Math.sinh(x)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var expm1 = __webpack_require__(/*! ./_math-expm1 */ "../../node_modules/core-js/modules/_math-expm1.js");
var exp = Math.exp;
// V8 near Chromium 38 has a problem with very small numbers
$export($export.S + $export.F * __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js")(function () {
return !Math.sinh(-2e-17) != -2e-17;
}), 'Math', {
sinh: function sinh(x) {
return Math.abs(x = +x) < 1
? (expm1(x) - expm1(-x)) / 2
: (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.math.tanh.js":
/*!**********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.math.tanh.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.33 Math.tanh(x)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var expm1 = __webpack_require__(/*! ./_math-expm1 */ "../../node_modules/core-js/modules/_math-expm1.js");
var exp = Math.exp;
$export($export.S, 'Math', {
tanh: function tanh(x) {
var a = expm1(x = +x);
var b = expm1(-x);
return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.math.trunc.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.math.trunc.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.34 Math.trunc(x)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.S, 'Math', {
trunc: function trunc(it) {
return (it > 0 ? Math.floor : Math.ceil)(it);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.number.constructor.js":
/*!*******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.number.constructor.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var has = __webpack_require__(/*! ./_has */ "../../node_modules/core-js/modules/_has.js");
var cof = __webpack_require__(/*! ./_cof */ "../../node_modules/core-js/modules/_cof.js");
var inheritIfRequired = __webpack_require__(/*! ./_inherit-if-required */ "../../node_modules/core-js/modules/_inherit-if-required.js");
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "../../node_modules/core-js/modules/_to-primitive.js");
var fails = __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js");
var gOPN = __webpack_require__(/*! ./_object-gopn */ "../../node_modules/core-js/modules/_object-gopn.js").f;
var gOPD = __webpack_require__(/*! ./_object-gopd */ "../../node_modules/core-js/modules/_object-gopd.js").f;
var dP = __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/modules/_object-dp.js").f;
var $trim = __webpack_require__(/*! ./_string-trim */ "../../node_modules/core-js/modules/_string-trim.js").trim;
var NUMBER = 'Number';
var $Number = global[NUMBER];
var Base = $Number;
var proto = $Number.prototype;
// Opera ~12 has broken Object#toString
var BROKEN_COF = cof(__webpack_require__(/*! ./_object-create */ "../../node_modules/core-js/modules/_object-create.js")(proto)) == NUMBER;
var TRIM = 'trim' in String.prototype;
// 7.1.3 ToNumber(argument)
var toNumber = function (argument) {
var it = toPrimitive(argument, false);
if (typeof it == 'string' && it.length > 2) {
it = TRIM ? it.trim() : $trim(it, 3);
var first = it.charCodeAt(0);
var third, radix, maxCode;
if (first === 43 || first === 45) {
third = it.charCodeAt(2);
if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
} else if (first === 48) {
switch (it.charCodeAt(1)) {
case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
default: return +it;
}
for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {
code = digits.charCodeAt(i);
// parseInt parses a string to a first unavailable symbol
// but ToNumber should return NaN if a string contains unavailable symbols
if (code < 48 || code > maxCode) return NaN;
} return parseInt(digits, radix);
}
} return +it;
};
if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {
$Number = function Number(value) {
var it = arguments.length < 1 ? 0 : value;
var that = this;
return that instanceof $Number
// check on 1..constructor(foo) case
&& (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)
? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
};
for (var keys = __webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/modules/_descriptors.js") ? gOPN(Base) : (
// ES3:
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
// ES6 (in case, if modules with ES6 Number statics required before):
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
).split(','), j = 0, key; keys.length > j; j++) {
if (has(Base, key = keys[j]) && !has($Number, key)) {
dP($Number, key, gOPD(Base, key));
}
}
$Number.prototype = proto;
proto.constructor = $Number;
__webpack_require__(/*! ./_redefine */ "../../node_modules/core-js/modules/_redefine.js")(global, NUMBER, $Number);
}
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.number.epsilon.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.number.epsilon.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.1 Number.EPSILON
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.number.is-finite.js":
/*!*****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.number.is-finite.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.2 Number.isFinite(number)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var _isFinite = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js").isFinite;
$export($export.S, 'Number', {
isFinite: function isFinite(it) {
return typeof it == 'number' && _isFinite(it);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.number.is-integer.js":
/*!******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.number.is-integer.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.3 Number.isInteger(number)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.S, 'Number', { isInteger: __webpack_require__(/*! ./_is-integer */ "../../node_modules/core-js/modules/_is-integer.js") });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.number.is-nan.js":
/*!**************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.number.is-nan.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.4 Number.isNaN(number)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.S, 'Number', {
isNaN: function isNaN(number) {
// eslint-disable-next-line no-self-compare
return number != number;
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.number.is-safe-integer.js":
/*!***********************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.number.is-safe-integer.js ***!
\***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.5 Number.isSafeInteger(number)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var isInteger = __webpack_require__(/*! ./_is-integer */ "../../node_modules/core-js/modules/_is-integer.js");
var abs = Math.abs;
$export($export.S, 'Number', {
isSafeInteger: function isSafeInteger(number) {
return isInteger(number) && abs(number) <= 0x1fffffffffffff;
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.number.max-safe-integer.js":
/*!************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.number.max-safe-integer.js ***!
\************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.6 Number.MAX_SAFE_INTEGER
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.number.min-safe-integer.js":
/*!************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.number.min-safe-integer.js ***!
\************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.10 Number.MIN_SAFE_INTEGER
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.number.parse-float.js":
/*!*******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.number.parse-float.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $parseFloat = __webpack_require__(/*! ./_parse-float */ "../../node_modules/core-js/modules/_parse-float.js");
// 20.1.2.12 Number.parseFloat(string)
$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.number.parse-int.js":
/*!*****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.number.parse-int.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $parseInt = __webpack_require__(/*! ./_parse-int */ "../../node_modules/core-js/modules/_parse-int.js");
// 20.1.2.13 Number.parseInt(string, radix)
$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.number.to-fixed.js":
/*!****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.number.to-fixed.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var toInteger = __webpack_require__(/*! ./_to-integer */ "../../node_modules/core-js/modules/_to-integer.js");
var aNumberValue = __webpack_require__(/*! ./_a-number-value */ "../../node_modules/core-js/modules/_a-number-value.js");
var repeat = __webpack_require__(/*! ./_string-repeat */ "../../node_modules/core-js/modules/_string-repeat.js");
var $toFixed = 1.0.toFixed;
var floor = Math.floor;
var data = [0, 0, 0, 0, 0, 0];
var ERROR = 'Number.toFixed: incorrect invocation!';
var ZERO = '0';
var multiply = function (n, c) {
var i = -1;
var c2 = c;
while (++i < 6) {
c2 += n * data[i];
data[i] = c2 % 1e7;
c2 = floor(c2 / 1e7);
}
};
var divide = function (n) {
var i = 6;
var c = 0;
while (--i >= 0) {
c += data[i];
data[i] = floor(c / n);
c = (c % n) * 1e7;
}
};
var numToString = function () {
var i = 6;
var s = '';
while (--i >= 0) {
if (s !== '' || i === 0 || data[i] !== 0) {
var t = String(data[i]);
s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;
}
} return s;
};
var pow = function (x, n, acc) {
return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
};
var log = function (x) {
var n = 0;
var x2 = x;
while (x2 >= 4096) {
n += 12;
x2 /= 4096;
}
while (x2 >= 2) {
n += 1;
x2 /= 2;
} return n;
};
$export($export.P + $export.F * (!!$toFixed && (
0.00008.toFixed(3) !== '0.000' ||
0.9.toFixed(0) !== '1' ||
1.255.toFixed(2) !== '1.25' ||
1000000000000000128.0.toFixed(0) !== '1000000000000000128'
) || !__webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js")(function () {
// V8 ~ Android 4.3-
$toFixed.call({});
})), 'Number', {
toFixed: function toFixed(fractionDigits) {
var x = aNumberValue(this, ERROR);
var f = toInteger(fractionDigits);
var s = '';
var m = ZERO;
var e, z, j, k;
if (f < 0 || f > 20) throw RangeError(ERROR);
// eslint-disable-next-line no-self-compare
if (x != x) return 'NaN';
if (x <= -1e21 || x >= 1e21) return String(x);
if (x < 0) {
s = '-';
x = -x;
}
if (x > 1e-21) {
e = log(x * pow(2, 69, 1)) - 69;
z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);
z *= 0x10000000000000;
e = 52 - e;
if (e > 0) {
multiply(0, z);
j = f;
while (j >= 7) {
multiply(1e7, 0);
j -= 7;
}
multiply(pow(10, j, 1), 0);
j = e - 1;
while (j >= 23) {
divide(1 << 23);
j -= 23;
}
divide(1 << j);
multiply(1, 1);
divide(2);
m = numToString();
} else {
multiply(0, z);
multiply(1 << -e, 0);
m = numToString() + repeat.call(ZERO, f);
}
}
if (f > 0) {
k = m.length;
m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));
} else {
m = s + m;
} return m;
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.number.to-precision.js":
/*!********************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.number.to-precision.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $fails = __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js");
var aNumberValue = __webpack_require__(/*! ./_a-number-value */ "../../node_modules/core-js/modules/_a-number-value.js");
var $toPrecision = 1.0.toPrecision;
$export($export.P + $export.F * ($fails(function () {
// IE7-
return $toPrecision.call(1, undefined) !== '1';
}) || !$fails(function () {
// V8 ~ Android 4.3-
$toPrecision.call({});
})), 'Number', {
toPrecision: function toPrecision(precision) {
var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.object.assign.js":
/*!**************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.object.assign.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.3.1 Object.assign(target, source)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.S + $export.F, 'Object', { assign: __webpack_require__(/*! ./_object-assign */ "../../node_modules/core-js/modules/_object-assign.js") });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.object.create.js":
/*!**************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.object.create.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
$export($export.S, 'Object', { create: __webpack_require__(/*! ./_object-create */ "../../node_modules/core-js/modules/_object-create.js") });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.object.define-properties.js":
/*!*************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.object.define-properties.js ***!
\*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
$export($export.S + $export.F * !__webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/modules/_descriptors.js"), 'Object', { defineProperties: __webpack_require__(/*! ./_object-dps */ "../../node_modules/core-js/modules/_object-dps.js") });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.object.define-property.js":
/*!***********************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.object.define-property.js ***!
\***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
$export($export.S + $export.F * !__webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/modules/_descriptors.js"), 'Object', { defineProperty: __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/modules/_object-dp.js").f });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.object.freeze.js":
/*!**************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.object.freeze.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.5 Object.freeze(O)
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var meta = __webpack_require__(/*! ./_meta */ "../../node_modules/core-js/modules/_meta.js").onFreeze;
__webpack_require__(/*! ./_object-sap */ "../../node_modules/core-js/modules/_object-sap.js")('freeze', function ($freeze) {
return function freeze(it) {
return $freeze && isObject(it) ? $freeze(meta(it)) : it;
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.object.get-own-property-descriptor.js":
/*!***********************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.object.get-own-property-descriptor.js ***!
\***********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
var toIObject = __webpack_require__(/*! ./_to-iobject */ "../../node_modules/core-js/modules/_to-iobject.js");
var $getOwnPropertyDescriptor = __webpack_require__(/*! ./_object-gopd */ "../../node_modules/core-js/modules/_object-gopd.js").f;
__webpack_require__(/*! ./_object-sap */ "../../node_modules/core-js/modules/_object-sap.js")('getOwnPropertyDescriptor', function () {
return function getOwnPropertyDescriptor(it, key) {
return $getOwnPropertyDescriptor(toIObject(it), key);
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.object.get-own-property-names.js":
/*!******************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.object.get-own-property-names.js ***!
\******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.7 Object.getOwnPropertyNames(O)
__webpack_require__(/*! ./_object-sap */ "../../node_modules/core-js/modules/_object-sap.js")('getOwnPropertyNames', function () {
return __webpack_require__(/*! ./_object-gopn-ext */ "../../node_modules/core-js/modules/_object-gopn-ext.js").f;
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.object.get-prototype-of.js":
/*!************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.object.get-prototype-of.js ***!
\************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.9 Object.getPrototypeOf(O)
var toObject = __webpack_require__(/*! ./_to-object */ "../../node_modules/core-js/modules/_to-object.js");
var $getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "../../node_modules/core-js/modules/_object-gpo.js");
__webpack_require__(/*! ./_object-sap */ "../../node_modules/core-js/modules/_object-sap.js")('getPrototypeOf', function () {
return function getPrototypeOf(it) {
return $getPrototypeOf(toObject(it));
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.object.is-extensible.js":
/*!*********************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.object.is-extensible.js ***!
\*********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.11 Object.isExtensible(O)
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
__webpack_require__(/*! ./_object-sap */ "../../node_modules/core-js/modules/_object-sap.js")('isExtensible', function ($isExtensible) {
return function isExtensible(it) {
return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.object.is-frozen.js":
/*!*****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.object.is-frozen.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.12 Object.isFrozen(O)
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
__webpack_require__(/*! ./_object-sap */ "../../node_modules/core-js/modules/_object-sap.js")('isFrozen', function ($isFrozen) {
return function isFrozen(it) {
return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.object.is-sealed.js":
/*!*****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.object.is-sealed.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.13 Object.isSealed(O)
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
__webpack_require__(/*! ./_object-sap */ "../../node_modules/core-js/modules/_object-sap.js")('isSealed', function ($isSealed) {
return function isSealed(it) {
return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.object.is.js":
/*!**********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.object.is.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.3.10 Object.is(value1, value2)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.S, 'Object', { is: __webpack_require__(/*! ./_same-value */ "../../node_modules/core-js/modules/_same-value.js") });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.object.keys.js":
/*!************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.object.keys.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 Object.keys(O)
var toObject = __webpack_require__(/*! ./_to-object */ "../../node_modules/core-js/modules/_to-object.js");
var $keys = __webpack_require__(/*! ./_object-keys */ "../../node_modules/core-js/modules/_object-keys.js");
__webpack_require__(/*! ./_object-sap */ "../../node_modules/core-js/modules/_object-sap.js")('keys', function () {
return function keys(it) {
return $keys(toObject(it));
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.object.prevent-extensions.js":
/*!**************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.object.prevent-extensions.js ***!
\**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.15 Object.preventExtensions(O)
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var meta = __webpack_require__(/*! ./_meta */ "../../node_modules/core-js/modules/_meta.js").onFreeze;
__webpack_require__(/*! ./_object-sap */ "../../node_modules/core-js/modules/_object-sap.js")('preventExtensions', function ($preventExtensions) {
return function preventExtensions(it) {
return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.object.seal.js":
/*!************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.object.seal.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.17 Object.seal(O)
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var meta = __webpack_require__(/*! ./_meta */ "../../node_modules/core-js/modules/_meta.js").onFreeze;
__webpack_require__(/*! ./_object-sap */ "../../node_modules/core-js/modules/_object-sap.js")('seal', function ($seal) {
return function seal(it) {
return $seal && isObject(it) ? $seal(meta(it)) : it;
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.object.set-prototype-of.js":
/*!************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.object.set-prototype-of.js ***!
\************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.3.19 Object.setPrototypeOf(O, proto)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(/*! ./_set-proto */ "../../node_modules/core-js/modules/_set-proto.js").set });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.object.to-string.js":
/*!*****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.object.to-string.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 19.1.3.6 Object.prototype.toString()
var classof = __webpack_require__(/*! ./_classof */ "../../node_modules/core-js/modules/_classof.js");
var test = {};
test[__webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js")('toStringTag')] = 'z';
if (test + '' != '[object z]') {
__webpack_require__(/*! ./_redefine */ "../../node_modules/core-js/modules/_redefine.js")(Object.prototype, 'toString', function toString() {
return '[object ' + classof(this) + ']';
}, true);
}
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.parse-float.js":
/*!************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.parse-float.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $parseFloat = __webpack_require__(/*! ./_parse-float */ "../../node_modules/core-js/modules/_parse-float.js");
// 18.2.4 parseFloat(string)
$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.parse-int.js":
/*!**********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.parse-int.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $parseInt = __webpack_require__(/*! ./_parse-int */ "../../node_modules/core-js/modules/_parse-int.js");
// 18.2.5 parseInt(string, radix)
$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.promise.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.promise.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var LIBRARY = __webpack_require__(/*! ./_library */ "../../node_modules/core-js/modules/_library.js");
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var ctx = __webpack_require__(/*! ./_ctx */ "../../node_modules/core-js/modules/_ctx.js");
var classof = __webpack_require__(/*! ./_classof */ "../../node_modules/core-js/modules/_classof.js");
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var aFunction = __webpack_require__(/*! ./_a-function */ "../../node_modules/core-js/modules/_a-function.js");
var anInstance = __webpack_require__(/*! ./_an-instance */ "../../node_modules/core-js/modules/_an-instance.js");
var forOf = __webpack_require__(/*! ./_for-of */ "../../node_modules/core-js/modules/_for-of.js");
var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "../../node_modules/core-js/modules/_species-constructor.js");
var task = __webpack_require__(/*! ./_task */ "../../node_modules/core-js/modules/_task.js").set;
var microtask = __webpack_require__(/*! ./_microtask */ "../../node_modules/core-js/modules/_microtask.js")();
var newPromiseCapabilityModule = __webpack_require__(/*! ./_new-promise-capability */ "../../node_modules/core-js/modules/_new-promise-capability.js");
var perform = __webpack_require__(/*! ./_perform */ "../../node_modules/core-js/modules/_perform.js");
var userAgent = __webpack_require__(/*! ./_user-agent */ "../../node_modules/core-js/modules/_user-agent.js");
var promiseResolve = __webpack_require__(/*! ./_promise-resolve */ "../../node_modules/core-js/modules/_promise-resolve.js");
var PROMISE = 'Promise';
var TypeError = global.TypeError;
var process = global.process;
var versions = process && process.versions;
var v8 = versions && versions.v8 || '';
var $Promise = global[PROMISE];
var isNode = classof(process) == 'process';
var empty = function () { /* empty */ };
var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;
var USE_NATIVE = !!function () {
try {
// correct subclassing with @@species support
var promise = $Promise.resolve(1);
var FakePromise = (promise.constructor = {})[__webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js")('species')] = function (exec) {
exec(empty, empty);
};
// unhandled rejections tracking support, NodeJS Promise without it fails @@species test
return (isNode || typeof PromiseRejectionEvent == 'function')
&& promise.then(empty) instanceof FakePromise
// v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
// we can't detect it synchronously, so just check versions
&& v8.indexOf('6.6') !== 0
&& userAgent.indexOf('Chrome/66') === -1;
} catch (e) { /* empty */ }
}();
// helpers
var isThenable = function (it) {
var then;
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};
var notify = function (promise, isReject) {
if (promise._n) return;
promise._n = true;
var chain = promise._c;
microtask(function () {
var value = promise._v;
var ok = promise._s == 1;
var i = 0;
var run = function (reaction) {
var handler = ok ? reaction.ok : reaction.fail;
var resolve = reaction.resolve;
var reject = reaction.reject;
var domain = reaction.domain;
var result, then, exited;
try {
if (handler) {
if (!ok) {
if (promise._h == 2) onHandleUnhandled(promise);
promise._h = 1;
}
if (handler === true) result = value;
else {
if (domain) domain.enter();
result = handler(value); // may throw
if (domain) {
domain.exit();
exited = true;
}
}
if (result === reaction.promise) {
reject(TypeError('Promise-chain cycle'));
} else if (then = isThenable(result)) {
then.call(result, resolve, reject);
} else resolve(result);
} else reject(value);
} catch (e) {
if (domain && !exited) domain.exit();
reject(e);
}
};
while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
promise._c = [];
promise._n = false;
if (isReject && !promise._h) onUnhandled(promise);
});
};
var onUnhandled = function (promise) {
task.call(global, function () {
var value = promise._v;
var unhandled = isUnhandled(promise);
var result, handler, console;
if (unhandled) {
result = perform(function () {
if (isNode) {
process.emit('unhandledRejection', value, promise);
} else if (handler = global.onunhandledrejection) {
handler({ promise: promise, reason: value });
} else if ((console = global.console) && console.error) {
console.error('Unhandled promise rejection', value);
}
});
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
promise._h = isNode || isUnhandled(promise) ? 2 : 1;
} promise._a = undefined;
if (unhandled && result.e) throw result.v;
});
};
var isUnhandled = function (promise) {
return promise._h !== 1 && (promise._a || promise._c).length === 0;
};
var onHandleUnhandled = function (promise) {
task.call(global, function () {
var handler;
if (isNode) {
process.emit('rejectionHandled', promise);
} else if (handler = global.onrejectionhandled) {
handler({ promise: promise, reason: promise._v });
}
});
};
var $reject = function (value) {
var promise = this;
if (promise._d) return;
promise._d = true;
promise = promise._w || promise; // unwrap
promise._v = value;
promise._s = 2;
if (!promise._a) promise._a = promise._c.slice();
notify(promise, true);
};
var $resolve = function (value) {
var promise = this;
var then;
if (promise._d) return;
promise._d = true;
promise = promise._w || promise; // unwrap
try {
if (promise === value) throw TypeError("Promise can't be resolved itself");
if (then = isThenable(value)) {
microtask(function () {
var wrapper = { _w: promise, _d: false }; // wrap
try {
then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
} catch (e) {
$reject.call(wrapper, e);
}
});
} else {
promise._v = value;
promise._s = 1;
notify(promise, false);
}
} catch (e) {
$reject.call({ _w: promise, _d: false }, e); // wrap
}
};
// constructor polyfill
if (!USE_NATIVE) {
// 25.4.3.1 Promise(executor)
$Promise = function Promise(executor) {
anInstance(this, $Promise, PROMISE, '_h');
aFunction(executor);
Internal.call(this);
try {
executor(ctx($resolve, this, 1), ctx($reject, this, 1));
} catch (err) {
$reject.call(this, err);
}
};
// eslint-disable-next-line no-unused-vars
Internal = function Promise(executor) {
this._c = []; // <- awaiting reactions
this._a = undefined; // <- checked in isUnhandled reactions
this._s = 0; // <- state
this._d = false; // <- done
this._v = undefined; // <- value
this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
this._n = false; // <- notify
};
Internal.prototype = __webpack_require__(/*! ./_redefine-all */ "../../node_modules/core-js/modules/_redefine-all.js")($Promise.prototype, {
// 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
then: function then(onFulfilled, onRejected) {
var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
reaction.fail = typeof onRejected == 'function' && onRejected;
reaction.domain = isNode ? process.domain : undefined;
this._c.push(reaction);
if (this._a) this._a.push(reaction);
if (this._s) notify(this, false);
return reaction.promise;
},
// 25.4.5.1 Promise.prototype.catch(onRejected)
'catch': function (onRejected) {
return this.then(undefined, onRejected);
}
});
OwnPromiseCapability = function () {
var promise = new Internal();
this.promise = promise;
this.resolve = ctx($resolve, promise, 1);
this.reject = ctx($reject, promise, 1);
};
newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
return C === $Promise || C === Wrapper
? new OwnPromiseCapability(C)
: newGenericPromiseCapability(C);
};
}
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });
__webpack_require__(/*! ./_set-to-string-tag */ "../../node_modules/core-js/modules/_set-to-string-tag.js")($Promise, PROMISE);
__webpack_require__(/*! ./_set-species */ "../../node_modules/core-js/modules/_set-species.js")(PROMISE);
Wrapper = __webpack_require__(/*! ./_core */ "../../node_modules/core-js/modules/_core.js")[PROMISE];
// statics
$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
// 25.4.4.5 Promise.reject(r)
reject: function reject(r) {
var capability = newPromiseCapability(this);
var $$reject = capability.reject;
$$reject(r);
return capability.promise;
}
});
$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
// 25.4.4.6 Promise.resolve(x)
resolve: function resolve(x) {
return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);
}
});
$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(/*! ./_iter-detect */ "../../node_modules/core-js/modules/_iter-detect.js")(function (iter) {
$Promise.all(iter)['catch'](empty);
})), PROMISE, {
// 25.4.4.1 Promise.all(iterable)
all: function all(iterable) {
var C = this;
var capability = newPromiseCapability(C);
var resolve = capability.resolve;
var reject = capability.reject;
var result = perform(function () {
var values = [];
var index = 0;
var remaining = 1;
forOf(iterable, false, function (promise) {
var $index = index++;
var alreadyCalled = false;
values.push(undefined);
remaining++;
C.resolve(promise).then(function (value) {
if (alreadyCalled) return;
alreadyCalled = true;
values[$index] = value;
--remaining || resolve(values);
}, reject);
});
--remaining || resolve(values);
});
if (result.e) reject(result.v);
return capability.promise;
},
// 25.4.4.4 Promise.race(iterable)
race: function race(iterable) {
var C = this;
var capability = newPromiseCapability(C);
var reject = capability.reject;
var result = perform(function () {
forOf(iterable, false, function (promise) {
C.resolve(promise).then(capability.resolve, reject);
});
});
if (result.e) reject(result.v);
return capability.promise;
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.reflect.apply.js":
/*!**************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.reflect.apply.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var aFunction = __webpack_require__(/*! ./_a-function */ "../../node_modules/core-js/modules/_a-function.js");
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var rApply = (__webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js").Reflect || {}).apply;
var fApply = Function.apply;
// MS Edge argumentsList argument is optional
$export($export.S + $export.F * !__webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js")(function () {
rApply(function () { /* empty */ });
}), 'Reflect', {
apply: function apply(target, thisArgument, argumentsList) {
var T = aFunction(target);
var L = anObject(argumentsList);
return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.reflect.construct.js":
/*!******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.reflect.construct.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var create = __webpack_require__(/*! ./_object-create */ "../../node_modules/core-js/modules/_object-create.js");
var aFunction = __webpack_require__(/*! ./_a-function */ "../../node_modules/core-js/modules/_a-function.js");
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var fails = __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js");
var bind = __webpack_require__(/*! ./_bind */ "../../node_modules/core-js/modules/_bind.js");
var rConstruct = (__webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js").Reflect || {}).construct;
// MS Edge supports only 2 arguments and argumentsList argument is optional
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
var NEW_TARGET_BUG = fails(function () {
function F() { /* empty */ }
return !(rConstruct(function () { /* empty */ }, [], F) instanceof F);
});
var ARGS_BUG = !fails(function () {
rConstruct(function () { /* empty */ });
});
$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
construct: function construct(Target, args /* , newTarget */) {
aFunction(Target);
anObject(args);
var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget);
if (Target == newTarget) {
// w/o altered newTarget, optimization for 0-4 arguments
switch (args.length) {
case 0: return new Target();
case 1: return new Target(args[0]);
case 2: return new Target(args[0], args[1]);
case 3: return new Target(args[0], args[1], args[2]);
case 4: return new Target(args[0], args[1], args[2], args[3]);
}
// w/o altered newTarget, lot of arguments case
var $args = [null];
$args.push.apply($args, args);
return new (bind.apply(Target, $args))();
}
// with altered newTarget, not support built-in constructors
var proto = newTarget.prototype;
var instance = create(isObject(proto) ? proto : Object.prototype);
var result = Function.apply.call(Target, instance, args);
return isObject(result) ? result : instance;
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.reflect.define-property.js":
/*!************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.reflect.define-property.js ***!
\************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
var dP = __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/modules/_object-dp.js");
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "../../node_modules/core-js/modules/_to-primitive.js");
// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
$export($export.S + $export.F * __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js")(function () {
// eslint-disable-next-line no-undef
Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 });
}), 'Reflect', {
defineProperty: function defineProperty(target, propertyKey, attributes) {
anObject(target);
propertyKey = toPrimitive(propertyKey, true);
anObject(attributes);
try {
dP.f(target, propertyKey, attributes);
return true;
} catch (e) {
return false;
}
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.reflect.delete-property.js":
/*!************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.reflect.delete-property.js ***!
\************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.4 Reflect.deleteProperty(target, propertyKey)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var gOPD = __webpack_require__(/*! ./_object-gopd */ "../../node_modules/core-js/modules/_object-gopd.js").f;
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
$export($export.S, 'Reflect', {
deleteProperty: function deleteProperty(target, propertyKey) {
var desc = gOPD(anObject(target), propertyKey);
return desc && !desc.configurable ? false : delete target[propertyKey];
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.reflect.enumerate.js":
/*!******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.reflect.enumerate.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 26.1.5 Reflect.enumerate(target)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var Enumerate = function (iterated) {
this._t = anObject(iterated); // target
this._i = 0; // next index
var keys = this._k = []; // keys
var key;
for (key in iterated) keys.push(key);
};
__webpack_require__(/*! ./_iter-create */ "../../node_modules/core-js/modules/_iter-create.js")(Enumerate, 'Object', function () {
var that = this;
var keys = that._k;
var key;
do {
if (that._i >= keys.length) return { value: undefined, done: true };
} while (!((key = keys[that._i++]) in that._t));
return { value: key, done: false };
});
$export($export.S, 'Reflect', {
enumerate: function enumerate(target) {
return new Enumerate(target);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js":
/*!************************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js ***!
\************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
var gOPD = __webpack_require__(/*! ./_object-gopd */ "../../node_modules/core-js/modules/_object-gopd.js");
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
$export($export.S, 'Reflect', {
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
return gOPD.f(anObject(target), propertyKey);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.reflect.get-prototype-of.js":
/*!*************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.reflect.get-prototype-of.js ***!
\*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.8 Reflect.getPrototypeOf(target)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var getProto = __webpack_require__(/*! ./_object-gpo */ "../../node_modules/core-js/modules/_object-gpo.js");
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
$export($export.S, 'Reflect', {
getPrototypeOf: function getPrototypeOf(target) {
return getProto(anObject(target));
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.reflect.get.js":
/*!************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.reflect.get.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.6 Reflect.get(target, propertyKey [, receiver])
var gOPD = __webpack_require__(/*! ./_object-gopd */ "../../node_modules/core-js/modules/_object-gopd.js");
var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "../../node_modules/core-js/modules/_object-gpo.js");
var has = __webpack_require__(/*! ./_has */ "../../node_modules/core-js/modules/_has.js");
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
function get(target, propertyKey /* , receiver */) {
var receiver = arguments.length < 3 ? target : arguments[2];
var desc, proto;
if (anObject(target) === receiver) return target[propertyKey];
if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value')
? desc.value
: desc.get !== undefined
? desc.get.call(receiver)
: undefined;
if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver);
}
$export($export.S, 'Reflect', { get: get });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.reflect.has.js":
/*!************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.reflect.has.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.9 Reflect.has(target, propertyKey)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.S, 'Reflect', {
has: function has(target, propertyKey) {
return propertyKey in target;
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.reflect.is-extensible.js":
/*!**********************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.reflect.is-extensible.js ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.10 Reflect.isExtensible(target)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var $isExtensible = Object.isExtensible;
$export($export.S, 'Reflect', {
isExtensible: function isExtensible(target) {
anObject(target);
return $isExtensible ? $isExtensible(target) : true;
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.reflect.own-keys.js":
/*!*****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.reflect.own-keys.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.11 Reflect.ownKeys(target)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.S, 'Reflect', { ownKeys: __webpack_require__(/*! ./_own-keys */ "../../node_modules/core-js/modules/_own-keys.js") });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.reflect.prevent-extensions.js":
/*!***************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.reflect.prevent-extensions.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.12 Reflect.preventExtensions(target)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var $preventExtensions = Object.preventExtensions;
$export($export.S, 'Reflect', {
preventExtensions: function preventExtensions(target) {
anObject(target);
try {
if ($preventExtensions) $preventExtensions(target);
return true;
} catch (e) {
return false;
}
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.reflect.set-prototype-of.js":
/*!*************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.reflect.set-prototype-of.js ***!
\*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.14 Reflect.setPrototypeOf(target, proto)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var setProto = __webpack_require__(/*! ./_set-proto */ "../../node_modules/core-js/modules/_set-proto.js");
if (setProto) $export($export.S, 'Reflect', {
setPrototypeOf: function setPrototypeOf(target, proto) {
setProto.check(target, proto);
try {
setProto.set(target, proto);
return true;
} catch (e) {
return false;
}
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.reflect.set.js":
/*!************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.reflect.set.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
var dP = __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/modules/_object-dp.js");
var gOPD = __webpack_require__(/*! ./_object-gopd */ "../../node_modules/core-js/modules/_object-gopd.js");
var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "../../node_modules/core-js/modules/_object-gpo.js");
var has = __webpack_require__(/*! ./_has */ "../../node_modules/core-js/modules/_has.js");
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var createDesc = __webpack_require__(/*! ./_property-desc */ "../../node_modules/core-js/modules/_property-desc.js");
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
function set(target, propertyKey, V /* , receiver */) {
var receiver = arguments.length < 4 ? target : arguments[3];
var ownDesc = gOPD.f(anObject(target), propertyKey);
var existingDescriptor, proto;
if (!ownDesc) {
if (isObject(proto = getPrototypeOf(target))) {
return set(proto, propertyKey, V, receiver);
}
ownDesc = createDesc(0);
}
if (has(ownDesc, 'value')) {
if (ownDesc.writable === false || !isObject(receiver)) return false;
if (existingDescriptor = gOPD.f(receiver, propertyKey)) {
if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;
existingDescriptor.value = V;
dP.f(receiver, propertyKey, existingDescriptor);
} else dP.f(receiver, propertyKey, createDesc(0, V));
return true;
}
return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
}
$export($export.S, 'Reflect', { set: set });
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.regexp.constructor.js":
/*!*******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.regexp.constructor.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var inheritIfRequired = __webpack_require__(/*! ./_inherit-if-required */ "../../node_modules/core-js/modules/_inherit-if-required.js");
var dP = __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/modules/_object-dp.js").f;
var gOPN = __webpack_require__(/*! ./_object-gopn */ "../../node_modules/core-js/modules/_object-gopn.js").f;
var isRegExp = __webpack_require__(/*! ./_is-regexp */ "../../node_modules/core-js/modules/_is-regexp.js");
var $flags = __webpack_require__(/*! ./_flags */ "../../node_modules/core-js/modules/_flags.js");
var $RegExp = global.RegExp;
var Base = $RegExp;
var proto = $RegExp.prototype;
var re1 = /a/g;
var re2 = /a/g;
// "new" creates a new object, old webkit buggy here
var CORRECT_NEW = new $RegExp(re1) !== re1;
if (__webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/modules/_descriptors.js") && (!CORRECT_NEW || __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js")(function () {
re2[__webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js")('match')] = false;
// RegExp constructor can alter flags and IsRegExp works correct with @@match
return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
}))) {
$RegExp = function RegExp(p, f) {
var tiRE = this instanceof $RegExp;
var piRE = isRegExp(p);
var fiU = f === undefined;
return !tiRE && piRE && p.constructor === $RegExp && fiU ? p
: inheritIfRequired(CORRECT_NEW
? new Base(piRE && !fiU ? p.source : p, f)
: Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)
, tiRE ? this : proto, $RegExp);
};
var proxy = function (key) {
key in $RegExp || dP($RegExp, key, {
configurable: true,
get: function () { return Base[key]; },
set: function (it) { Base[key] = it; }
});
};
for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]);
proto.constructor = $RegExp;
$RegExp.prototype = proto;
__webpack_require__(/*! ./_redefine */ "../../node_modules/core-js/modules/_redefine.js")(global, 'RegExp', $RegExp);
}
__webpack_require__(/*! ./_set-species */ "../../node_modules/core-js/modules/_set-species.js")('RegExp');
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.regexp.exec.js":
/*!************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.regexp.exec.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var regexpExec = __webpack_require__(/*! ./_regexp-exec */ "../../node_modules/core-js/modules/_regexp-exec.js");
__webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js")({
target: 'RegExp',
proto: true,
forced: regexpExec !== /./.exec
}, {
exec: regexpExec
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.regexp.flags.js":
/*!*************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.regexp.flags.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// 21.2.5.3 get RegExp.prototype.flags()
if (__webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/modules/_descriptors.js") && /./g.flags != 'g') __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/modules/_object-dp.js").f(RegExp.prototype, 'flags', {
configurable: true,
get: __webpack_require__(/*! ./_flags */ "../../node_modules/core-js/modules/_flags.js")
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.regexp.match.js":
/*!*************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.regexp.match.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
var advanceStringIndex = __webpack_require__(/*! ./_advance-string-index */ "../../node_modules/core-js/modules/_advance-string-index.js");
var regExpExec = __webpack_require__(/*! ./_regexp-exec-abstract */ "../../node_modules/core-js/modules/_regexp-exec-abstract.js");
// @@match logic
__webpack_require__(/*! ./_fix-re-wks */ "../../node_modules/core-js/modules/_fix-re-wks.js")('match', 1, function (defined, MATCH, $match, maybeCallNative) {
return [
// `String.prototype.match` method
// https://tc39.github.io/ecma262/#sec-string.prototype.match
function match(regexp) {
var O = defined(this);
var fn = regexp == undefined ? undefined : regexp[MATCH];
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
},
// `RegExp.prototype[@@match]` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
function (regexp) {
var res = maybeCallNative($match, regexp, this);
if (res.done) return res.value;
var rx = anObject(regexp);
var S = String(this);
if (!rx.global) return regExpExec(rx, S);
var fullUnicode = rx.unicode;
rx.lastIndex = 0;
var A = [];
var n = 0;
var result;
while ((result = regExpExec(rx, S)) !== null) {
var matchStr = String(result[0]);
A[n] = matchStr;
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
n++;
}
return n === 0 ? null : A;
}
];
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.regexp.replace.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.regexp.replace.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var toObject = __webpack_require__(/*! ./_to-object */ "../../node_modules/core-js/modules/_to-object.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
var toInteger = __webpack_require__(/*! ./_to-integer */ "../../node_modules/core-js/modules/_to-integer.js");
var advanceStringIndex = __webpack_require__(/*! ./_advance-string-index */ "../../node_modules/core-js/modules/_advance-string-index.js");
var regExpExec = __webpack_require__(/*! ./_regexp-exec-abstract */ "../../node_modules/core-js/modules/_regexp-exec-abstract.js");
var max = Math.max;
var min = Math.min;
var floor = Math.floor;
var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g;
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g;
var maybeToString = function (it) {
return it === undefined ? it : String(it);
};
// @@replace logic
__webpack_require__(/*! ./_fix-re-wks */ "../../node_modules/core-js/modules/_fix-re-wks.js")('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {
return [
// `String.prototype.replace` method
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
function replace(searchValue, replaceValue) {
var O = defined(this);
var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
return fn !== undefined
? fn.call(searchValue, O, replaceValue)
: $replace.call(String(O), searchValue, replaceValue);
},
// `RegExp.prototype[@@replace]` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
function (regexp, replaceValue) {
var res = maybeCallNative($replace, regexp, this, replaceValue);
if (res.done) return res.value;
var rx = anObject(regexp);
var S = String(this);
var functionalReplace = typeof replaceValue === 'function';
if (!functionalReplace) replaceValue = String(replaceValue);
var global = rx.global;
if (global) {
var fullUnicode = rx.unicode;
rx.lastIndex = 0;
}
var results = [];
while (true) {
var result = regExpExec(rx, S);
if (result === null) break;
results.push(result);
if (!global) break;
var matchStr = String(result[0]);
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
}
var accumulatedResult = '';
var nextSourcePosition = 0;
for (var i = 0; i < results.length; i++) {
result = results[i];
var matched = String(result[0]);
var position = max(min(toInteger(result.index), S.length), 0);
var captures = [];
// NOTE: This is equivalent to
// captures = result.slice(1).map(maybeToString)
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
var namedCaptures = result.groups;
if (functionalReplace) {
var replacerArgs = [matched].concat(captures, position, S);
if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
var replacement = String(replaceValue.apply(undefined, replacerArgs));
} else {
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
}
if (position >= nextSourcePosition) {
accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
nextSourcePosition = position + matched.length;
}
}
return accumulatedResult + S.slice(nextSourcePosition);
}
];
// https://tc39.github.io/ecma262/#sec-getsubstitution
function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
var tailPos = position + matched.length;
var m = captures.length;
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
if (namedCaptures !== undefined) {
namedCaptures = toObject(namedCaptures);
symbols = SUBSTITUTION_SYMBOLS;
}
return $replace.call(replacement, symbols, function (match, ch) {
var capture;
switch (ch.charAt(0)) {
case '$': return '$';
case '&': return matched;
case '`': return str.slice(0, position);
case "'": return str.slice(tailPos);
case '<':
capture = namedCaptures[ch.slice(1, -1)];
break;
default: // \d\d?
var n = +ch;
if (n === 0) return match;
if (n > m) {
var f = floor(n / 10);
if (f === 0) return match;
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
return match;
}
capture = captures[n - 1];
}
return capture === undefined ? '' : capture;
});
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.regexp.search.js":
/*!**************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.regexp.search.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var sameValue = __webpack_require__(/*! ./_same-value */ "../../node_modules/core-js/modules/_same-value.js");
var regExpExec = __webpack_require__(/*! ./_regexp-exec-abstract */ "../../node_modules/core-js/modules/_regexp-exec-abstract.js");
// @@search logic
__webpack_require__(/*! ./_fix-re-wks */ "../../node_modules/core-js/modules/_fix-re-wks.js")('search', 1, function (defined, SEARCH, $search, maybeCallNative) {
return [
// `String.prototype.search` method
// https://tc39.github.io/ecma262/#sec-string.prototype.search
function search(regexp) {
var O = defined(this);
var fn = regexp == undefined ? undefined : regexp[SEARCH];
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
},
// `RegExp.prototype[@@search]` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
function (regexp) {
var res = maybeCallNative($search, regexp, this);
if (res.done) return res.value;
var rx = anObject(regexp);
var S = String(this);
var previousLastIndex = rx.lastIndex;
if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
var result = regExpExec(rx, S);
if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
return result === null ? -1 : result.index;
}
];
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.regexp.split.js":
/*!*************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.regexp.split.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isRegExp = __webpack_require__(/*! ./_is-regexp */ "../../node_modules/core-js/modules/_is-regexp.js");
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "../../node_modules/core-js/modules/_species-constructor.js");
var advanceStringIndex = __webpack_require__(/*! ./_advance-string-index */ "../../node_modules/core-js/modules/_advance-string-index.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
var callRegExpExec = __webpack_require__(/*! ./_regexp-exec-abstract */ "../../node_modules/core-js/modules/_regexp-exec-abstract.js");
var regexpExec = __webpack_require__(/*! ./_regexp-exec */ "../../node_modules/core-js/modules/_regexp-exec.js");
var fails = __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js");
var $min = Math.min;
var $push = [].push;
var $SPLIT = 'split';
var LENGTH = 'length';
var LAST_INDEX = 'lastIndex';
var MAX_UINT32 = 0xffffffff;
// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); });
// @@split logic
__webpack_require__(/*! ./_fix-re-wks */ "../../node_modules/core-js/modules/_fix-re-wks.js")('split', 2, function (defined, SPLIT, $split, maybeCallNative) {
var internalSplit;
if (
'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
'.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
'.'[$SPLIT](/()()/)[LENGTH] > 1 ||
''[$SPLIT](/.?/)[LENGTH]
) {
// based on es5-shim implementation, need to rework it
internalSplit = function (separator, limit) {
var string = String(this);
if (separator === undefined && limit === 0) return [];
// If `separator` is not a regex, use native split
if (!isRegExp(separator)) return $split.call(string, separator, limit);
var output = [];
var flags = (separator.ignoreCase ? 'i' : '') +
(separator.multiline ? 'm' : '') +
(separator.unicode ? 'u' : '') +
(separator.sticky ? 'y' : '');
var lastLastIndex = 0;
var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0;
// Make `global` and avoid `lastIndex` issues by working with a copy
var separatorCopy = new RegExp(separator.source, flags + 'g');
var match, lastIndex, lastLength;
while (match = regexpExec.call(separatorCopy, string)) {
lastIndex = separatorCopy[LAST_INDEX];
if (lastIndex > lastLastIndex) {
output.push(string.slice(lastLastIndex, match.index));
if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));
lastLength = match[0][LENGTH];
lastLastIndex = lastIndex;
if (output[LENGTH] >= splitLimit) break;
}
if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
}
if (lastLastIndex === string[LENGTH]) {
if (lastLength || !separatorCopy.test('')) output.push('');
} else output.push(string.slice(lastLastIndex));
return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
};
// Chakra, V8
} else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {
internalSplit = function (separator, limit) {
return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit);
};
} else {
internalSplit = $split;
}
return [
// `String.prototype.split` method
// https://tc39.github.io/ecma262/#sec-string.prototype.split
function split(separator, limit) {
var O = defined(this);
var splitter = separator == undefined ? undefined : separator[SPLIT];
return splitter !== undefined
? splitter.call(separator, O, limit)
: internalSplit.call(String(O), separator, limit);
},
// `RegExp.prototype[@@split]` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
//
// NOTE: This cannot be properly polyfilled in engines that don't support
// the 'y' flag.
function (regexp, limit) {
var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split);
if (res.done) return res.value;
var rx = anObject(regexp);
var S = String(this);
var C = speciesConstructor(rx, RegExp);
var unicodeMatching = rx.unicode;
var flags = (rx.ignoreCase ? 'i' : '') +
(rx.multiline ? 'm' : '') +
(rx.unicode ? 'u' : '') +
(SUPPORTS_Y ? 'y' : 'g');
// ^(? + rx + ) is needed, in combination with some S slicing, to
// simulate the 'y' flag.
var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
if (lim === 0) return [];
if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
var p = 0;
var q = 0;
var A = [];
while (q < S.length) {
splitter.lastIndex = SUPPORTS_Y ? q : 0;
var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
var e;
if (
z === null ||
(e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
) {
q = advanceStringIndex(S, q, unicodeMatching);
} else {
A.push(S.slice(p, q));
if (A.length === lim) return A;
for (var i = 1; i <= z.length - 1; i++) {
A.push(z[i]);
if (A.length === lim) return A;
}
q = p = e;
}
}
A.push(S.slice(p));
return A;
}
];
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.regexp.to-string.js":
/*!*****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.regexp.to-string.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(/*! ./es6.regexp.flags */ "../../node_modules/core-js/modules/es6.regexp.flags.js");
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var $flags = __webpack_require__(/*! ./_flags */ "../../node_modules/core-js/modules/_flags.js");
var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/modules/_descriptors.js");
var TO_STRING = 'toString';
var $toString = /./[TO_STRING];
var define = function (fn) {
__webpack_require__(/*! ./_redefine */ "../../node_modules/core-js/modules/_redefine.js")(RegExp.prototype, TO_STRING, fn, true);
};
// 21.2.5.14 RegExp.prototype.toString()
if (__webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js")(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {
define(function toString() {
var R = anObject(this);
return '/'.concat(R.source, '/',
'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
});
// FF44- RegExp#toString has a wrong name
} else if ($toString.name != TO_STRING) {
define(function toString() {
return $toString.call(this);
});
}
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.set.js":
/*!****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.set.js ***!
\****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var strong = __webpack_require__(/*! ./_collection-strong */ "../../node_modules/core-js/modules/_collection-strong.js");
var validate = __webpack_require__(/*! ./_validate-collection */ "../../node_modules/core-js/modules/_validate-collection.js");
var SET = 'Set';
// 23.2 Set Objects
module.exports = __webpack_require__(/*! ./_collection */ "../../node_modules/core-js/modules/_collection.js")(SET, function (get) {
return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.2.3.1 Set.prototype.add(value)
add: function add(value) {
return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);
}
}, strong);
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.anchor.js":
/*!**************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.anchor.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.2 String.prototype.anchor(name)
__webpack_require__(/*! ./_string-html */ "../../node_modules/core-js/modules/_string-html.js")('anchor', function (createHTML) {
return function anchor(name) {
return createHTML(this, 'a', 'name', name);
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.big.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.big.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.3 String.prototype.big()
__webpack_require__(/*! ./_string-html */ "../../node_modules/core-js/modules/_string-html.js")('big', function (createHTML) {
return function big() {
return createHTML(this, 'big', '', '');
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.blink.js":
/*!*************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.blink.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.4 String.prototype.blink()
__webpack_require__(/*! ./_string-html */ "../../node_modules/core-js/modules/_string-html.js")('blink', function (createHTML) {
return function blink() {
return createHTML(this, 'blink', '', '');
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.bold.js":
/*!************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.bold.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.5 String.prototype.bold()
__webpack_require__(/*! ./_string-html */ "../../node_modules/core-js/modules/_string-html.js")('bold', function (createHTML) {
return function bold() {
return createHTML(this, 'b', '', '');
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.code-point-at.js":
/*!*********************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.code-point-at.js ***!
\*********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $at = __webpack_require__(/*! ./_string-at */ "../../node_modules/core-js/modules/_string-at.js")(false);
$export($export.P, 'String', {
// 21.1.3.3 String.prototype.codePointAt(pos)
codePointAt: function codePointAt(pos) {
return $at(this, pos);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.ends-with.js":
/*!*****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.ends-with.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
var context = __webpack_require__(/*! ./_string-context */ "../../node_modules/core-js/modules/_string-context.js");
var ENDS_WITH = 'endsWith';
var $endsWith = ''[ENDS_WITH];
$export($export.P + $export.F * __webpack_require__(/*! ./_fails-is-regexp */ "../../node_modules/core-js/modules/_fails-is-regexp.js")(ENDS_WITH), 'String', {
endsWith: function endsWith(searchString /* , endPosition = @length */) {
var that = context(this, searchString, ENDS_WITH);
var endPosition = arguments.length > 1 ? arguments[1] : undefined;
var len = toLength(that.length);
var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len);
var search = String(searchString);
return $endsWith
? $endsWith.call(that, search, end)
: that.slice(end - search.length, end) === search;
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.fixed.js":
/*!*************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.fixed.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.6 String.prototype.fixed()
__webpack_require__(/*! ./_string-html */ "../../node_modules/core-js/modules/_string-html.js")('fixed', function (createHTML) {
return function fixed() {
return createHTML(this, 'tt', '', '');
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.fontcolor.js":
/*!*****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.fontcolor.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.7 String.prototype.fontcolor(color)
__webpack_require__(/*! ./_string-html */ "../../node_modules/core-js/modules/_string-html.js")('fontcolor', function (createHTML) {
return function fontcolor(color) {
return createHTML(this, 'font', 'color', color);
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.fontsize.js":
/*!****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.fontsize.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.8 String.prototype.fontsize(size)
__webpack_require__(/*! ./_string-html */ "../../node_modules/core-js/modules/_string-html.js")('fontsize', function (createHTML) {
return function fontsize(size) {
return createHTML(this, 'font', 'size', size);
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.from-code-point.js":
/*!***********************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.from-code-point.js ***!
\***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "../../node_modules/core-js/modules/_to-absolute-index.js");
var fromCharCode = String.fromCharCode;
var $fromCodePoint = String.fromCodePoint;
// length should be 1, old FF problem
$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
// 21.1.2.2 String.fromCodePoint(...codePoints)
fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars
var res = [];
var aLen = arguments.length;
var i = 0;
var code;
while (aLen > i) {
code = +arguments[i++];
if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point');
res.push(code < 0x10000
? fromCharCode(code)
: fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
);
} return res.join('');
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.includes.js":
/*!****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.includes.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.1.3.7 String.prototype.includes(searchString, position = 0)
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var context = __webpack_require__(/*! ./_string-context */ "../../node_modules/core-js/modules/_string-context.js");
var INCLUDES = 'includes';
$export($export.P + $export.F * __webpack_require__(/*! ./_fails-is-regexp */ "../../node_modules/core-js/modules/_fails-is-regexp.js")(INCLUDES), 'String', {
includes: function includes(searchString /* , position = 0 */) {
return !!~context(this, searchString, INCLUDES)
.indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.italics.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.italics.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.9 String.prototype.italics()
__webpack_require__(/*! ./_string-html */ "../../node_modules/core-js/modules/_string-html.js")('italics', function (createHTML) {
return function italics() {
return createHTML(this, 'i', '', '');
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.iterator.js":
/*!****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.iterator.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $at = __webpack_require__(/*! ./_string-at */ "../../node_modules/core-js/modules/_string-at.js")(true);
// 21.1.3.27 String.prototype[@@iterator]()
__webpack_require__(/*! ./_iter-define */ "../../node_modules/core-js/modules/_iter-define.js")(String, 'String', function (iterated) {
this._t = String(iterated); // target
this._i = 0; // next index
// 21.1.5.2.1 %StringIteratorPrototype%.next()
}, function () {
var O = this._t;
var index = this._i;
var point;
if (index >= O.length) return { value: undefined, done: true };
point = $at(O, index);
this._i += point.length;
return { value: point, done: false };
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.link.js":
/*!************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.link.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.10 String.prototype.link(url)
__webpack_require__(/*! ./_string-html */ "../../node_modules/core-js/modules/_string-html.js")('link', function (createHTML) {
return function link(url) {
return createHTML(this, 'a', 'href', url);
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.raw.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.raw.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var toIObject = __webpack_require__(/*! ./_to-iobject */ "../../node_modules/core-js/modules/_to-iobject.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
$export($export.S, 'String', {
// 21.1.2.4 String.raw(callSite, ...substitutions)
raw: function raw(callSite) {
var tpl = toIObject(callSite.raw);
var len = toLength(tpl.length);
var aLen = arguments.length;
var res = [];
var i = 0;
while (len > i) {
res.push(String(tpl[i++]));
if (i < aLen) res.push(String(arguments[i]));
} return res.join('');
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.repeat.js":
/*!**************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.repeat.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.P, 'String', {
// 21.1.3.13 String.prototype.repeat(count)
repeat: __webpack_require__(/*! ./_string-repeat */ "../../node_modules/core-js/modules/_string-repeat.js")
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.small.js":
/*!*************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.small.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.11 String.prototype.small()
__webpack_require__(/*! ./_string-html */ "../../node_modules/core-js/modules/_string-html.js")('small', function (createHTML) {
return function small() {
return createHTML(this, 'small', '', '');
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.starts-with.js":
/*!*******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.starts-with.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
var context = __webpack_require__(/*! ./_string-context */ "../../node_modules/core-js/modules/_string-context.js");
var STARTS_WITH = 'startsWith';
var $startsWith = ''[STARTS_WITH];
$export($export.P + $export.F * __webpack_require__(/*! ./_fails-is-regexp */ "../../node_modules/core-js/modules/_fails-is-regexp.js")(STARTS_WITH), 'String', {
startsWith: function startsWith(searchString /* , position = 0 */) {
var that = context(this, searchString, STARTS_WITH);
var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));
var search = String(searchString);
return $startsWith
? $startsWith.call(that, search, index)
: that.slice(index, index + search.length) === search;
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.strike.js":
/*!**************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.strike.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.12 String.prototype.strike()
__webpack_require__(/*! ./_string-html */ "../../node_modules/core-js/modules/_string-html.js")('strike', function (createHTML) {
return function strike() {
return createHTML(this, 'strike', '', '');
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.sub.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.sub.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.13 String.prototype.sub()
__webpack_require__(/*! ./_string-html */ "../../node_modules/core-js/modules/_string-html.js")('sub', function (createHTML) {
return function sub() {
return createHTML(this, 'sub', '', '');
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.sup.js":
/*!***********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.sup.js ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// B.2.3.14 String.prototype.sup()
__webpack_require__(/*! ./_string-html */ "../../node_modules/core-js/modules/_string-html.js")('sup', function (createHTML) {
return function sup() {
return createHTML(this, 'sup', '', '');
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.string.trim.js":
/*!************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.string.trim.js ***!
\************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.1.3.25 String.prototype.trim()
__webpack_require__(/*! ./_string-trim */ "../../node_modules/core-js/modules/_string-trim.js")('trim', function ($trim) {
return function trim() {
return $trim(this, 3);
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.symbol.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.symbol.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// ECMAScript 6 symbols shim
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var has = __webpack_require__(/*! ./_has */ "../../node_modules/core-js/modules/_has.js");
var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "../../node_modules/core-js/modules/_descriptors.js");
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var redefine = __webpack_require__(/*! ./_redefine */ "../../node_modules/core-js/modules/_redefine.js");
var META = __webpack_require__(/*! ./_meta */ "../../node_modules/core-js/modules/_meta.js").KEY;
var $fails = __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js");
var shared = __webpack_require__(/*! ./_shared */ "../../node_modules/core-js/modules/_shared.js");
var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "../../node_modules/core-js/modules/_set-to-string-tag.js");
var uid = __webpack_require__(/*! ./_uid */ "../../node_modules/core-js/modules/_uid.js");
var wks = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js");
var wksExt = __webpack_require__(/*! ./_wks-ext */ "../../node_modules/core-js/modules/_wks-ext.js");
var wksDefine = __webpack_require__(/*! ./_wks-define */ "../../node_modules/core-js/modules/_wks-define.js");
var enumKeys = __webpack_require__(/*! ./_enum-keys */ "../../node_modules/core-js/modules/_enum-keys.js");
var isArray = __webpack_require__(/*! ./_is-array */ "../../node_modules/core-js/modules/_is-array.js");
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var toObject = __webpack_require__(/*! ./_to-object */ "../../node_modules/core-js/modules/_to-object.js");
var toIObject = __webpack_require__(/*! ./_to-iobject */ "../../node_modules/core-js/modules/_to-iobject.js");
var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "../../node_modules/core-js/modules/_to-primitive.js");
var createDesc = __webpack_require__(/*! ./_property-desc */ "../../node_modules/core-js/modules/_property-desc.js");
var _create = __webpack_require__(/*! ./_object-create */ "../../node_modules/core-js/modules/_object-create.js");
var gOPNExt = __webpack_require__(/*! ./_object-gopn-ext */ "../../node_modules/core-js/modules/_object-gopn-ext.js");
var $GOPD = __webpack_require__(/*! ./_object-gopd */ "../../node_modules/core-js/modules/_object-gopd.js");
var $GOPS = __webpack_require__(/*! ./_object-gops */ "../../node_modules/core-js/modules/_object-gops.js");
var $DP = __webpack_require__(/*! ./_object-dp */ "../../node_modules/core-js/modules/_object-dp.js");
var $keys = __webpack_require__(/*! ./_object-keys */ "../../node_modules/core-js/modules/_object-keys.js");
var gOPD = $GOPD.f;
var dP = $DP.f;
var gOPN = gOPNExt.f;
var $Symbol = global.Symbol;
var $JSON = global.JSON;
var _stringify = $JSON && $JSON.stringify;
var PROTOTYPE = 'prototype';
var HIDDEN = wks('_hidden');
var TO_PRIMITIVE = wks('toPrimitive');
var isEnum = {}.propertyIsEnumerable;
var SymbolRegistry = shared('symbol-registry');
var AllSymbols = shared('symbols');
var OPSymbols = shared('op-symbols');
var ObjectProto = Object[PROTOTYPE];
var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;
var QObject = global.QObject;
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
var setSymbolDesc = DESCRIPTORS && $fails(function () {
return _create(dP({}, 'a', {
get: function () { return dP(this, 'a', { value: 7 }).a; }
})).a != 7;
}) ? function (it, key, D) {
var protoDesc = gOPD(ObjectProto, key);
if (protoDesc) delete ObjectProto[key];
dP(it, key, D);
if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
} : dP;
var wrap = function (tag) {
var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
sym._k = tag;
return sym;
};
var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
return typeof it == 'symbol';
} : function (it) {
return it instanceof $Symbol;
};
var $defineProperty = function defineProperty(it, key, D) {
if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
anObject(it);
key = toPrimitive(key, true);
anObject(D);
if (has(AllSymbols, key)) {
if (!D.enumerable) {
if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
it[HIDDEN][key] = true;
} else {
if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
D = _create(D, { enumerable: createDesc(0, false) });
} return setSymbolDesc(it, key, D);
} return dP(it, key, D);
};
var $defineProperties = function defineProperties(it, P) {
anObject(it);
var keys = enumKeys(P = toIObject(P));
var i = 0;
var l = keys.length;
var key;
while (l > i) $defineProperty(it, key = keys[i++], P[key]);
return it;
};
var $create = function create(it, P) {
return P === undefined ? _create(it) : $defineProperties(_create(it), P);
};
var $propertyIsEnumerable = function propertyIsEnumerable(key) {
var E = isEnum.call(this, key = toPrimitive(key, true));
if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
};
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
it = toIObject(it);
key = toPrimitive(key, true);
if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
var D = gOPD(it, key);
if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
return D;
};
var $getOwnPropertyNames = function getOwnPropertyNames(it) {
var names = gOPN(toIObject(it));
var result = [];
var i = 0;
var key;
while (names.length > i) {
if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
} return result;
};
var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
var IS_OP = it === ObjectProto;
var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
var result = [];
var i = 0;
var key;
while (names.length > i) {
if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
} return result;
};
// 19.4.1.1 Symbol([description])
if (!USE_NATIVE) {
$Symbol = function Symbol() {
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
var $set = function (value) {
if (this === ObjectProto) $set.call(OPSymbols, value);
if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
setSymbolDesc(this, tag, createDesc(1, value));
};
if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
return wrap(tag);
};
redefine($Symbol[PROTOTYPE], 'toString', function toString() {
return this._k;
});
$GOPD.f = $getOwnPropertyDescriptor;
$DP.f = $defineProperty;
__webpack_require__(/*! ./_object-gopn */ "../../node_modules/core-js/modules/_object-gopn.js").f = gOPNExt.f = $getOwnPropertyNames;
__webpack_require__(/*! ./_object-pie */ "../../node_modules/core-js/modules/_object-pie.js").f = $propertyIsEnumerable;
$GOPS.f = $getOwnPropertySymbols;
if (DESCRIPTORS && !__webpack_require__(/*! ./_library */ "../../node_modules/core-js/modules/_library.js")) {
redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
}
wksExt.f = function (name) {
return wrap(wks(name));
};
}
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
for (var es6Symbols = (
// 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
// 19.4.2.1 Symbol.for(key)
'for': function (key) {
return has(SymbolRegistry, key += '')
? SymbolRegistry[key]
: SymbolRegistry[key] = $Symbol(key);
},
// 19.4.2.5 Symbol.keyFor(sym)
keyFor: function keyFor(sym) {
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
},
useSetter: function () { setter = true; },
useSimple: function () { setter = false; }
});
$export($export.S + $export.F * !USE_NATIVE, 'Object', {
// 19.1.2.2 Object.create(O [, Properties])
create: $create,
// 19.1.2.4 Object.defineProperty(O, P, Attributes)
defineProperty: $defineProperty,
// 19.1.2.3 Object.defineProperties(O, Properties)
defineProperties: $defineProperties,
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
// 19.1.2.7 Object.getOwnPropertyNames(O)
getOwnPropertyNames: $getOwnPropertyNames,
// 19.1.2.8 Object.getOwnPropertySymbols(O)
getOwnPropertySymbols: $getOwnPropertySymbols
});
// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
// https://bugs.chromium.org/p/v8/issues/detail?id=3443
var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });
$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {
getOwnPropertySymbols: function getOwnPropertySymbols(it) {
return $GOPS.f(toObject(it));
}
});
// 24.3.2 JSON.stringify(value [, replacer [, space]])
$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
var S = $Symbol();
// MS Edge converts symbol values to JSON as {}
// WebKit converts symbol values to JSON as null
// V8 throws on boxed symbols
return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
})), 'JSON', {
stringify: function stringify(it) {
var args = [it];
var i = 1;
var replacer, $replacer;
while (arguments.length > i) args.push(arguments[i++]);
$replacer = replacer = args[1];
if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
if (!isArray(replacer)) replacer = function (key, value) {
if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
if (!isSymbol(value)) return value;
};
args[1] = replacer;
return _stringify.apply($JSON, args);
}
});
// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(/*! ./_hide */ "../../node_modules/core-js/modules/_hide.js")($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
// 19.4.3.5 Symbol.prototype[@@toStringTag]
setToStringTag($Symbol, 'Symbol');
// 20.2.1.9 Math[@@toStringTag]
setToStringTag(Math, 'Math', true);
// 24.3.3 JSON[@@toStringTag]
setToStringTag(global.JSON, 'JSON', true);
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.typed.array-buffer.js":
/*!*******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.typed.array-buffer.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $typed = __webpack_require__(/*! ./_typed */ "../../node_modules/core-js/modules/_typed.js");
var buffer = __webpack_require__(/*! ./_typed-buffer */ "../../node_modules/core-js/modules/_typed-buffer.js");
var anObject = __webpack_require__(/*! ./_an-object */ "../../node_modules/core-js/modules/_an-object.js");
var toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ "../../node_modules/core-js/modules/_to-absolute-index.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var ArrayBuffer = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js").ArrayBuffer;
var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "../../node_modules/core-js/modules/_species-constructor.js");
var $ArrayBuffer = buffer.ArrayBuffer;
var $DataView = buffer.DataView;
var $isView = $typed.ABV && ArrayBuffer.isView;
var $slice = $ArrayBuffer.prototype.slice;
var VIEW = $typed.VIEW;
var ARRAY_BUFFER = 'ArrayBuffer';
$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer });
$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
// 24.1.3.1 ArrayBuffer.isView(arg)
isView: function isView(it) {
return $isView && $isView(it) || isObject(it) && VIEW in it;
}
});
$export($export.P + $export.U + $export.F * __webpack_require__(/*! ./_fails */ "../../node_modules/core-js/modules/_fails.js")(function () {
return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
}), ARRAY_BUFFER, {
// 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
slice: function slice(start, end) {
if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix
var len = anObject(this).byteLength;
var first = toAbsoluteIndex(start, len);
var fin = toAbsoluteIndex(end === undefined ? len : end, len);
var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first));
var viewS = new $DataView(this);
var viewT = new $DataView(result);
var index = 0;
while (first < fin) {
viewT.setUint8(index++, viewS.getUint8(first++));
} return result;
}
});
__webpack_require__(/*! ./_set-species */ "../../node_modules/core-js/modules/_set-species.js")(ARRAY_BUFFER);
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.typed.data-view.js":
/*!****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.typed.data-view.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
$export($export.G + $export.W + $export.F * !__webpack_require__(/*! ./_typed */ "../../node_modules/core-js/modules/_typed.js").ABV, {
DataView: __webpack_require__(/*! ./_typed-buffer */ "../../node_modules/core-js/modules/_typed-buffer.js").DataView
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.typed.float32-array.js":
/*!********************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.typed.float32-array.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ./_typed-array */ "../../node_modules/core-js/modules/_typed-array.js")('Float32', 4, function (init) {
return function Float32Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.typed.float64-array.js":
/*!********************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.typed.float64-array.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ./_typed-array */ "../../node_modules/core-js/modules/_typed-array.js")('Float64', 8, function (init) {
return function Float64Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.typed.int16-array.js":
/*!******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.typed.int16-array.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ./_typed-array */ "../../node_modules/core-js/modules/_typed-array.js")('Int16', 2, function (init) {
return function Int16Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.typed.int32-array.js":
/*!******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.typed.int32-array.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ./_typed-array */ "../../node_modules/core-js/modules/_typed-array.js")('Int32', 4, function (init) {
return function Int32Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.typed.int8-array.js":
/*!*****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.typed.int8-array.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ./_typed-array */ "../../node_modules/core-js/modules/_typed-array.js")('Int8', 1, function (init) {
return function Int8Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.typed.uint16-array.js":
/*!*******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.typed.uint16-array.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ./_typed-array */ "../../node_modules/core-js/modules/_typed-array.js")('Uint16', 2, function (init) {
return function Uint16Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.typed.uint32-array.js":
/*!*******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.typed.uint32-array.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ./_typed-array */ "../../node_modules/core-js/modules/_typed-array.js")('Uint32', 4, function (init) {
return function Uint32Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.typed.uint8-array.js":
/*!******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.typed.uint8-array.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ./_typed-array */ "../../node_modules/core-js/modules/_typed-array.js")('Uint8', 1, function (init) {
return function Uint8Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.typed.uint8-clamped-array.js":
/*!**************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.typed.uint8-clamped-array.js ***!
\**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ./_typed-array */ "../../node_modules/core-js/modules/_typed-array.js")('Uint8', 1, function (init) {
return function Uint8ClampedArray(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
}, true);
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.weak-map.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.weak-map.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var each = __webpack_require__(/*! ./_array-methods */ "../../node_modules/core-js/modules/_array-methods.js")(0);
var redefine = __webpack_require__(/*! ./_redefine */ "../../node_modules/core-js/modules/_redefine.js");
var meta = __webpack_require__(/*! ./_meta */ "../../node_modules/core-js/modules/_meta.js");
var assign = __webpack_require__(/*! ./_object-assign */ "../../node_modules/core-js/modules/_object-assign.js");
var weak = __webpack_require__(/*! ./_collection-weak */ "../../node_modules/core-js/modules/_collection-weak.js");
var isObject = __webpack_require__(/*! ./_is-object */ "../../node_modules/core-js/modules/_is-object.js");
var validate = __webpack_require__(/*! ./_validate-collection */ "../../node_modules/core-js/modules/_validate-collection.js");
var NATIVE_WEAK_MAP = __webpack_require__(/*! ./_validate-collection */ "../../node_modules/core-js/modules/_validate-collection.js");
var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;
var WEAK_MAP = 'WeakMap';
var getWeak = meta.getWeak;
var isExtensible = Object.isExtensible;
var uncaughtFrozenStore = weak.ufstore;
var InternalMap;
var wrapper = function (get) {
return function WeakMap() {
return get(this, arguments.length > 0 ? arguments[0] : undefined);
};
};
var methods = {
// 23.3.3.3 WeakMap.prototype.get(key)
get: function get(key) {
if (isObject(key)) {
var data = getWeak(key);
if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);
return data ? data[this._i] : undefined;
}
},
// 23.3.3.5 WeakMap.prototype.set(key, value)
set: function set(key, value) {
return weak.def(validate(this, WEAK_MAP), key, value);
}
};
// 23.3 WeakMap Objects
var $WeakMap = module.exports = __webpack_require__(/*! ./_collection */ "../../node_modules/core-js/modules/_collection.js")(WEAK_MAP, wrapper, methods, weak, true, true);
// IE11 WeakMap frozen keys fix
if (NATIVE_WEAK_MAP && IS_IE11) {
InternalMap = weak.getConstructor(wrapper, WEAK_MAP);
assign(InternalMap.prototype, methods);
meta.NEED = true;
each(['delete', 'has', 'get', 'set'], function (key) {
var proto = $WeakMap.prototype;
var method = proto[key];
redefine(proto, key, function (a, b) {
// store frozen objects on internal weakmap shim
if (isObject(a) && !isExtensible(a)) {
if (!this._f) this._f = new InternalMap();
var result = this._f[key](a, b);
return key == 'set' ? this : result;
// store all the rest on native weakmap
} return method.call(this, a, b);
});
});
}
/***/ }),
/***/ "../../node_modules/core-js/modules/es6.weak-set.js":
/*!*********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es6.weak-set.js ***!
\*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var weak = __webpack_require__(/*! ./_collection-weak */ "../../node_modules/core-js/modules/_collection-weak.js");
var validate = __webpack_require__(/*! ./_validate-collection */ "../../node_modules/core-js/modules/_validate-collection.js");
var WEAK_SET = 'WeakSet';
// 23.4 WeakSet Objects
__webpack_require__(/*! ./_collection */ "../../node_modules/core-js/modules/_collection.js")(WEAK_SET, function (get) {
return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.4.3.1 WeakSet.prototype.add(value)
add: function add(value) {
return weak.def(validate(this, WEAK_SET), value, true);
}
}, weak, false, true);
/***/ }),
/***/ "../../node_modules/core-js/modules/es7.array.flat-map.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es7.array.flat-map.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var flattenIntoArray = __webpack_require__(/*! ./_flatten-into-array */ "../../node_modules/core-js/modules/_flatten-into-array.js");
var toObject = __webpack_require__(/*! ./_to-object */ "../../node_modules/core-js/modules/_to-object.js");
var toLength = __webpack_require__(/*! ./_to-length */ "../../node_modules/core-js/modules/_to-length.js");
var aFunction = __webpack_require__(/*! ./_a-function */ "../../node_modules/core-js/modules/_a-function.js");
var arraySpeciesCreate = __webpack_require__(/*! ./_array-species-create */ "../../node_modules/core-js/modules/_array-species-create.js");
$export($export.P, 'Array', {
flatMap: function flatMap(callbackfn /* , thisArg */) {
var O = toObject(this);
var sourceLen, A;
aFunction(callbackfn);
sourceLen = toLength(O.length);
A = arraySpeciesCreate(O, 0);
flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]);
return A;
}
});
__webpack_require__(/*! ./_add-to-unscopables */ "../../node_modules/core-js/modules/_add-to-unscopables.js")('flatMap');
/***/ }),
/***/ "../../node_modules/core-js/modules/es7.array.includes.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es7.array.includes.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/Array.prototype.includes
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $includes = __webpack_require__(/*! ./_array-includes */ "../../node_modules/core-js/modules/_array-includes.js")(true);
$export($export.P, 'Array', {
includes: function includes(el /* , fromIndex = 0 */) {
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
}
});
__webpack_require__(/*! ./_add-to-unscopables */ "../../node_modules/core-js/modules/_add-to-unscopables.js")('includes');
/***/ }),
/***/ "../../node_modules/core-js/modules/es7.object.entries.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es7.object.entries.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/tc39/proposal-object-values-entries
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $entries = __webpack_require__(/*! ./_object-to-array */ "../../node_modules/core-js/modules/_object-to-array.js")(true);
$export($export.S, 'Object', {
entries: function entries(it) {
return $entries(it);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es7.object.get-own-property-descriptors.js":
/*!************************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es7.object.get-own-property-descriptors.js ***!
\************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/tc39/proposal-object-getownpropertydescriptors
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var ownKeys = __webpack_require__(/*! ./_own-keys */ "../../node_modules/core-js/modules/_own-keys.js");
var toIObject = __webpack_require__(/*! ./_to-iobject */ "../../node_modules/core-js/modules/_to-iobject.js");
var gOPD = __webpack_require__(/*! ./_object-gopd */ "../../node_modules/core-js/modules/_object-gopd.js");
var createProperty = __webpack_require__(/*! ./_create-property */ "../../node_modules/core-js/modules/_create-property.js");
$export($export.S, 'Object', {
getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
var O = toIObject(object);
var getDesc = gOPD.f;
var keys = ownKeys(O);
var result = {};
var i = 0;
var key, desc;
while (keys.length > i) {
desc = getDesc(O, key = keys[i++]);
if (desc !== undefined) createProperty(result, key, desc);
}
return result;
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es7.object.values.js":
/*!**************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es7.object.values.js ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/tc39/proposal-object-values-entries
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $values = __webpack_require__(/*! ./_object-to-array */ "../../node_modules/core-js/modules/_object-to-array.js")(false);
$export($export.S, 'Object', {
values: function values(it) {
return $values(it);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es7.promise.finally.js":
/*!****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es7.promise.finally.js ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/proposal-promise-finally
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var core = __webpack_require__(/*! ./_core */ "../../node_modules/core-js/modules/_core.js");
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var speciesConstructor = __webpack_require__(/*! ./_species-constructor */ "../../node_modules/core-js/modules/_species-constructor.js");
var promiseResolve = __webpack_require__(/*! ./_promise-resolve */ "../../node_modules/core-js/modules/_promise-resolve.js");
$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {
var C = speciesConstructor(this, core.Promise || global.Promise);
var isFunction = typeof onFinally == 'function';
return this.then(
isFunction ? function (x) {
return promiseResolve(C, onFinally()).then(function () { return x; });
} : onFinally,
isFunction ? function (e) {
return promiseResolve(C, onFinally()).then(function () { throw e; });
} : onFinally
);
} });
/***/ }),
/***/ "../../node_modules/core-js/modules/es7.string.pad-end.js":
/*!***************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es7.string.pad-end.js ***!
\***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/proposal-string-pad-start-end
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $pad = __webpack_require__(/*! ./_string-pad */ "../../node_modules/core-js/modules/_string-pad.js");
var userAgent = __webpack_require__(/*! ./_user-agent */ "../../node_modules/core-js/modules/_user-agent.js");
// https://github.com/zloirock/core-js/issues/280
var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent);
$export($export.P + $export.F * WEBKIT_BUG, 'String', {
padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es7.string.pad-start.js":
/*!*****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es7.string.pad-start.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/proposal-string-pad-start-end
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $pad = __webpack_require__(/*! ./_string-pad */ "../../node_modules/core-js/modules/_string-pad.js");
var userAgent = __webpack_require__(/*! ./_user-agent */ "../../node_modules/core-js/modules/_user-agent.js");
// https://github.com/zloirock/core-js/issues/280
var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent);
$export($export.P + $export.F * WEBKIT_BUG, 'String', {
padStart: function padStart(maxLength /* , fillString = ' ' */) {
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
}
});
/***/ }),
/***/ "../../node_modules/core-js/modules/es7.string.trim-left.js":
/*!*****************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es7.string.trim-left.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
__webpack_require__(/*! ./_string-trim */ "../../node_modules/core-js/modules/_string-trim.js")('trimLeft', function ($trim) {
return function trimLeft() {
return $trim(this, 1);
};
}, 'trimStart');
/***/ }),
/***/ "../../node_modules/core-js/modules/es7.string.trim-right.js":
/*!******************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es7.string.trim-right.js ***!
\******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
__webpack_require__(/*! ./_string-trim */ "../../node_modules/core-js/modules/_string-trim.js")('trimRight', function ($trim) {
return function trimRight() {
return $trim(this, 2);
};
}, 'trimEnd');
/***/ }),
/***/ "../../node_modules/core-js/modules/es7.symbol.async-iterator.js":
/*!**********************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/es7.symbol.async-iterator.js ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ./_wks-define */ "../../node_modules/core-js/modules/_wks-define.js")('asyncIterator');
/***/ }),
/***/ "../../node_modules/core-js/modules/web.dom.iterable.js":
/*!*************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/web.dom.iterable.js ***!
\*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $iterators = __webpack_require__(/*! ./es6.array.iterator */ "../../node_modules/core-js/modules/es6.array.iterator.js");
var getKeys = __webpack_require__(/*! ./_object-keys */ "../../node_modules/core-js/modules/_object-keys.js");
var redefine = __webpack_require__(/*! ./_redefine */ "../../node_modules/core-js/modules/_redefine.js");
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var hide = __webpack_require__(/*! ./_hide */ "../../node_modules/core-js/modules/_hide.js");
var Iterators = __webpack_require__(/*! ./_iterators */ "../../node_modules/core-js/modules/_iterators.js");
var wks = __webpack_require__(/*! ./_wks */ "../../node_modules/core-js/modules/_wks.js");
var ITERATOR = wks('iterator');
var TO_STRING_TAG = wks('toStringTag');
var ArrayValues = Iterators.Array;
var DOMIterables = {
CSSRuleList: true, // TODO: Not spec compliant, should be false.
CSSStyleDeclaration: false,
CSSValueList: false,
ClientRectList: false,
DOMRectList: false,
DOMStringList: false,
DOMTokenList: true,
DataTransferItemList: false,
FileList: false,
HTMLAllCollection: false,
HTMLCollection: false,
HTMLFormElement: false,
HTMLSelectElement: false,
MediaList: true, // TODO: Not spec compliant, should be false.
MimeTypeArray: false,
NamedNodeMap: false,
NodeList: true,
PaintRequestList: false,
Plugin: false,
PluginArray: false,
SVGLengthList: false,
SVGNumberList: false,
SVGPathSegList: false,
SVGPointList: false,
SVGStringList: false,
SVGTransformList: false,
SourceBufferList: false,
StyleSheetList: true, // TODO: Not spec compliant, should be false.
TextTrackCueList: false,
TextTrackList: false,
TouchList: false
};
for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
var NAME = collections[i];
var explicit = DOMIterables[NAME];
var Collection = global[NAME];
var proto = Collection && Collection.prototype;
var key;
if (proto) {
if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
Iterators[NAME] = ArrayValues;
if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
}
}
/***/ }),
/***/ "../../node_modules/core-js/modules/web.immediate.js":
/*!**********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/web.immediate.js ***!
\**********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var $task = __webpack_require__(/*! ./_task */ "../../node_modules/core-js/modules/_task.js");
$export($export.G + $export.B, {
setImmediate: $task.set,
clearImmediate: $task.clear
});
/***/ }),
/***/ "../../node_modules/core-js/modules/web.timers.js":
/*!*******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/modules/web.timers.js ***!
\*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
// ie9- setTimeout & setInterval additional parameters fix
var global = __webpack_require__(/*! ./_global */ "../../node_modules/core-js/modules/_global.js");
var $export = __webpack_require__(/*! ./_export */ "../../node_modules/core-js/modules/_export.js");
var userAgent = __webpack_require__(/*! ./_user-agent */ "../../node_modules/core-js/modules/_user-agent.js");
var slice = [].slice;
var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check
var wrap = function (set) {
return function (fn, time /* , ...args */) {
var boundArgs = arguments.length > 2;
var args = boundArgs ? slice.call(arguments, 2) : false;
return set(boundArgs ? function () {
// eslint-disable-next-line no-new-func
(typeof fn == 'function' ? fn : Function(fn)).apply(this, args);
} : fn, time);
};
};
$export($export.G + $export.B + $export.F * MSIE, {
setTimeout: wrap(global.setTimeout),
setInterval: wrap(global.setInterval)
});
/***/ }),
/***/ "../../node_modules/core-js/web/index.js":
/*!**********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/core-js/web/index.js ***!
\**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! ../modules/web.timers */ "../../node_modules/core-js/modules/web.timers.js");
__webpack_require__(/*! ../modules/web.immediate */ "../../node_modules/core-js/modules/web.immediate.js");
__webpack_require__(/*! ../modules/web.dom.iterable */ "../../node_modules/core-js/modules/web.dom.iterable.js");
module.exports = __webpack_require__(/*! ../modules/_core */ "../../node_modules/core-js/modules/_core.js");
/***/ }),
/***/ "../../node_modules/gsap/CSSPlugin.js":
/*!*******************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/gsap/CSSPlugin.js ***!
\*******************************************************************************/
/*! exports provided: CSSPlugin, default, _getBBox, _createElement, checkPrefix */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSPlugin", function() { return CSSPlugin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return CSSPlugin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getBBox", function() { return _getBBox; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_createElement", function() { return _createElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkPrefix", function() { return _checkPropPrefix; });
/* harmony import */ var _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./gsap-core.js */ "../../node_modules/gsap/gsap-core.js");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
/*!
* CSSPlugin 3.5.1
* https://greensock.com
*
* Copyright 2008-2020, GreenSock. All rights reserved.
* Subject to the terms at https://greensock.com/standard-license or for
* Club GreenSock members, the agreement issued with that membership.
* @author: Jack Doyle, jack@greensock.com
*/
/* eslint-disable */
var _win,
_doc,
_docElement,
_pluginInitted,
_tempDiv,
_tempDivStyler,
_recentSetterPlugin,
_windowExists = function _windowExists() {
return typeof window !== "undefined";
},
_transformProps = {},
_RAD2DEG = 180 / Math.PI,
_DEG2RAD = Math.PI / 180,
_atan2 = Math.atan2,
_bigNum = 1e8,
_capsExp = /([A-Z])/g,
_horizontalExp = /(?:left|right|width|margin|padding|x)/i,
_complexExp = /[\s,\(]\S/,
_propertyAliases = {
autoAlpha: "opacity,visibility",
scale: "scaleX,scaleY",
alpha: "opacity"
},
_renderCSSProp = function _renderCSSProp(ratio, data) {
return data.set(data.t, data.p, Math.round((data.s + data.c * ratio) * 10000) / 10000 + data.u, data);
},
_renderPropWithEnd = function _renderPropWithEnd(ratio, data) {
return data.set(data.t, data.p, ratio === 1 ? data.e : Math.round((data.s + data.c * ratio) * 10000) / 10000 + data.u, data);
},
_renderCSSPropWithBeginning = function _renderCSSPropWithBeginning(ratio, data) {
return data.set(data.t, data.p, ratio ? Math.round((data.s + data.c * ratio) * 10000) / 10000 + data.u : data.b, data);
},
//if units change, we need a way to render the original unit/value when the tween goes all the way back to the beginning (ratio:0)
_renderRoundedCSSProp = function _renderRoundedCSSProp(ratio, data) {
var value = data.s + data.c * ratio;
data.set(data.t, data.p, ~~(value + (value < 0 ? -.5 : .5)) + data.u, data);
},
_renderNonTweeningValue = function _renderNonTweeningValue(ratio, data) {
return data.set(data.t, data.p, ratio ? data.e : data.b, data);
},
_renderNonTweeningValueOnlyAtEnd = function _renderNonTweeningValueOnlyAtEnd(ratio, data) {
return data.set(data.t, data.p, ratio !== 1 ? data.b : data.e, data);
},
_setterCSSStyle = function _setterCSSStyle(target, property, value) {
return target.style[property] = value;
},
_setterCSSProp = function _setterCSSProp(target, property, value) {
return target.style.setProperty(property, value);
},
_setterTransform = function _setterTransform(target, property, value) {
return target._gsap[property] = value;
},
_setterScale = function _setterScale(target, property, value) {
return target._gsap.scaleX = target._gsap.scaleY = value;
},
_setterScaleWithRender = function _setterScaleWithRender(target, property, value, data, ratio) {
var cache = target._gsap;
cache.scaleX = cache.scaleY = value;
cache.renderTransform(ratio, cache);
},
_setterTransformWithRender = function _setterTransformWithRender(target, property, value, data, ratio) {
var cache = target._gsap;
cache[property] = value;
cache.renderTransform(ratio, cache);
},
_transformProp = "transform",
_transformOriginProp = _transformProp + "Origin",
_supports3D,
_createElement = function _createElement(type, ns) {
var e = _doc.createElementNS ? _doc.createElementNS((ns || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"), type) : _doc.createElement(type); //some servers swap in https for http in the namespace which can break things, making "style" inaccessible.
return e.style ? e : _doc.createElement(type); //some environments won't allow access to the element's style when created with a namespace in which case we default to the standard createElement() to work around the issue. Also note that when GSAP is embedded directly inside an SVG file, createElement() won't allow access to the style object in Firefox (see https://greensock.com/forums/topic/20215-problem-using-tweenmax-in-standalone-self-containing-svg-file-err-cannot-set-property-csstext-of-undefined/).
},
_getComputedProperty = function _getComputedProperty(target, property, skipPrefixFallback) {
var cs = getComputedStyle(target);
return cs[property] || cs.getPropertyValue(property.replace(_capsExp, "-$1").toLowerCase()) || cs.getPropertyValue(property) || !skipPrefixFallback && _getComputedProperty(target, _checkPropPrefix(property) || property, 1) || ""; //css variables may not need caps swapped out for dashes and lowercase.
},
_prefixes = "O,Moz,ms,Ms,Webkit".split(","),
_checkPropPrefix = function _checkPropPrefix(property, element, preferPrefix) {
var e = element || _tempDiv,
s = e.style,
i = 5;
if (property in s && !preferPrefix) {
return property;
}
property = property.charAt(0).toUpperCase() + property.substr(1);
while (i-- && !(_prefixes[i] + property in s)) {}
return i < 0 ? null : (i === 3 ? "ms" : i >= 0 ? _prefixes[i] : "") + property;
},
_initCore = function _initCore() {
if (_windowExists() && window.document) {
_win = window;
_doc = _win.document;
_docElement = _doc.documentElement;
_tempDiv = _createElement("div") || {
style: {}
};
_tempDivStyler = _createElement("div");
_transformProp = _checkPropPrefix(_transformProp);
_transformOriginProp = _transformProp + "Origin";
_tempDiv.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0"; //make sure to override certain properties that may contaminate measurements, in case the user has overreaching style sheets.
_supports3D = !!_checkPropPrefix("perspective");
_pluginInitted = 1;
}
},
_getBBoxHack = function _getBBoxHack(swapIfPossible) {
//works around issues in some browsers (like Firefox) that don't correctly report getBBox() on SVG elements inside a element and/or . We try creating an SVG, adding it to the documentElement and toss the element in there so that it's definitely part of the rendering tree, then grab the bbox and if it works, we actually swap out the original getBBox() method for our own that does these extra steps whenever getBBox is needed. This helps ensure that performance is optimal (only do all these extra steps when absolutely necessary...most elements don't need it).
var svg = _createElement("svg", this.ownerSVGElement && this.ownerSVGElement.getAttribute("xmlns") || "http://www.w3.org/2000/svg"),
oldParent = this.parentNode,
oldSibling = this.nextSibling,
oldCSS = this.style.cssText,
bbox;
_docElement.appendChild(svg);
svg.appendChild(this);
this.style.display = "block";
if (swapIfPossible) {
try {
bbox = this.getBBox();
this._gsapBBox = this.getBBox; //store the original
this.getBBox = _getBBoxHack;
} catch (e) {}
} else if (this._gsapBBox) {
bbox = this._gsapBBox();
}
if (oldParent) {
if (oldSibling) {
oldParent.insertBefore(this, oldSibling);
} else {
oldParent.appendChild(this);
}
}
_docElement.removeChild(svg);
this.style.cssText = oldCSS;
return bbox;
},
_getAttributeFallbacks = function _getAttributeFallbacks(target, attributesArray) {
var i = attributesArray.length;
while (i--) {
if (target.hasAttribute(attributesArray[i])) {
return target.getAttribute(attributesArray[i]);
}
}
},
_getBBox = function _getBBox(target) {
var bounds;
try {
bounds = target.getBBox(); //Firefox throws errors if you try calling getBBox() on an SVG element that's not rendered (like in a or ). https://bugzilla.mozilla.org/show_bug.cgi?id=612118
} catch (error) {
bounds = _getBBoxHack.call(target, true);
}
bounds && (bounds.width || bounds.height) || target.getBBox === _getBBoxHack || (bounds = _getBBoxHack.call(target, true)); //some browsers (like Firefox) misreport the bounds if the element has zero width and height (it just assumes it's at x:0, y:0), thus we need to manually grab the position in that case.
return bounds && !bounds.width && !bounds.x && !bounds.y ? {
x: +_getAttributeFallbacks(target, ["x", "cx", "x1"]) || 0,
y: +_getAttributeFallbacks(target, ["y", "cy", "y1"]) || 0,
width: 0,
height: 0
} : bounds;
},
_isSVG = function _isSVG(e) {
return !!(e.getCTM && (!e.parentNode || e.ownerSVGElement) && _getBBox(e));
},
//reports if the element is an SVG on which getBBox() actually works
_removeProperty = function _removeProperty(target, property) {
if (property) {
var style = target.style;
if (property in _transformProps && property !== _transformOriginProp) {
property = _transformProp;
}
if (style.removeProperty) {
if (property.substr(0, 2) === "ms" || property.substr(0, 6) === "webkit") {
//Microsoft and some Webkit browsers don't conform to the standard of capitalizing the first prefix character, so we adjust so that when we prefix the caps with a dash, it's correct (otherwise it'd be "ms-transform" instead of "-ms-transform" for IE9, for example)
property = "-" + property;
}
style.removeProperty(property.replace(_capsExp, "-$1").toLowerCase());
} else {
//note: old versions of IE use "removeAttribute()" instead of "removeProperty()"
style.removeAttribute(property);
}
}
},
_addNonTweeningPT = function _addNonTweeningPT(plugin, target, property, beginning, end, onlySetAtEnd) {
var pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](plugin._pt, target, property, 0, 1, onlySetAtEnd ? _renderNonTweeningValueOnlyAtEnd : _renderNonTweeningValue);
plugin._pt = pt;
pt.b = beginning;
pt.e = end;
plugin._props.push(property);
return pt;
},
_nonConvertibleUnits = {
deg: 1,
rad: 1,
turn: 1
},
//takes a single value like 20px and converts it to the unit specified, like "%", returning only the numeric amount.
_convertToUnit = function _convertToUnit(target, property, value, unit) {
var curValue = parseFloat(value) || 0,
curUnit = (value + "").trim().substr((curValue + "").length) || "px",
// some browsers leave extra whitespace at the beginning of CSS variables, hence the need to trim()
style = _tempDiv.style,
horizontal = _horizontalExp.test(property),
isRootSVG = target.tagName.toLowerCase() === "svg",
measureProperty = (isRootSVG ? "client" : "offset") + (horizontal ? "Width" : "Height"),
amount = 100,
toPixels = unit === "px",
toPercent = unit === "%",
px,
parent,
cache,
isSVG;
if (unit === curUnit || !curValue || _nonConvertibleUnits[unit] || _nonConvertibleUnits[curUnit]) {
return curValue;
}
curUnit !== "px" && !toPixels && (curValue = _convertToUnit(target, property, value, "px"));
isSVG = target.getCTM && _isSVG(target);
if (toPercent && (_transformProps[property] || ~property.indexOf("adius"))) {
//transforms and borderRadius are relative to the size of the element itself!
return Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(curValue / (isSVG ? target.getBBox()[horizontal ? "width" : "height"] : target[measureProperty]) * amount);
}
style[horizontal ? "width" : "height"] = amount + (toPixels ? curUnit : unit);
parent = ~property.indexOf("adius") || unit === "em" && target.appendChild && !isRootSVG ? target : target.parentNode;
if (isSVG) {
parent = (target.ownerSVGElement || {}).parentNode;
}
if (!parent || parent === _doc || !parent.appendChild) {
parent = _doc.body;
}
cache = parent._gsap;
if (cache && toPercent && cache.width && horizontal && cache.time === _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_ticker"].time) {
return Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(curValue / cache.width * amount);
} else {
(toPercent || curUnit === "%") && (style.position = _getComputedProperty(target, "position"));
parent === target && (style.position = "static"); // like for borderRadius, if it's a % we must have it relative to the target itself but that may not have position: relative or position: absolute in which case it'd go up the chain until it finds its offsetParent (bad). position: static protects against that.
parent.appendChild(_tempDiv);
px = _tempDiv[measureProperty];
parent.removeChild(_tempDiv);
style.position = "absolute";
if (horizontal && toPercent) {
cache = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_getCache"])(parent);
cache.time = _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_ticker"].time;
cache.width = parent[measureProperty];
}
}
return Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(toPixels ? px * curValue / amount : px && curValue ? amount / px * curValue : 0);
},
_get = function _get(target, property, unit, uncache) {
var value;
_pluginInitted || _initCore();
if (property in _propertyAliases && property !== "transform") {
property = _propertyAliases[property];
if (~property.indexOf(",")) {
property = property.split(",")[0];
}
}
if (_transformProps[property] && property !== "transform") {
value = _parseTransform(target, uncache);
value = property !== "transformOrigin" ? value[property] : _firstTwoOnly(_getComputedProperty(target, _transformOriginProp)) + " " + value.zOrigin + "px";
} else {
value = target.style[property];
if (!value || value === "auto" || uncache || ~(value + "").indexOf("calc(")) {
value = _specialProps[property] && _specialProps[property](target, property, unit) || _getComputedProperty(target, property) || Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_getProperty"])(target, property) || (property === "opacity" ? 1 : 0); // note: some browsers, like Firefox, don't report borderRadius correctly! Instead, it only reports every corner like borderTopLeftRadius
}
}
return unit && !~(value + "").indexOf(" ") ? _convertToUnit(target, property, value, unit) + unit : value;
},
_tweenComplexCSSString = function _tweenComplexCSSString(target, prop, start, end) {
//note: we call _tweenComplexCSSString.call(pluginInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus "this" would refer to the plugin.
if (!start || start === "none") {
// some browsers like Safari actually PREFER the prefixed property and mis-report the unprefixed value like clipPath (BUG). In other words, even though clipPath exists in the style ("clipPath" in target.style) and it's set in the CSS properly (along with -webkit-clip-path), Safari reports clipPath as "none" whereas WebkitClipPath reports accurately like "ellipse(100% 0% at 50% 0%)", so in this case we must SWITCH to using the prefixed property instead. See https://greensock.com/forums/topic/18310-clippath-doesnt-work-on-ios/
var p = _checkPropPrefix(prop, target, 1),
s = p && _getComputedProperty(target, p, 1);
if (s && s !== start) {
prop = p;
start = s;
} else if (prop === "borderColor") {
start = _getComputedProperty(target, "borderTopColor"); // Firefox bug: always reports "borderColor" as "", so we must fall back to borderTopColor. See https://greensock.com/forums/topic/24583-how-to-return-colors-that-i-had-after-reverse/
}
}
var pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](this._pt, target.style, prop, 0, 1, _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_renderComplexString"]),
index = 0,
matchIndex = 0,
a,
result,
startValues,
startNum,
color,
startValue,
endValue,
endNum,
chunk,
endUnit,
startUnit,
relative,
endValues;
pt.b = start;
pt.e = end;
start += ""; //ensure values are strings
end += "";
if (end === "auto") {
target.style[prop] = end;
end = _getComputedProperty(target, prop) || end;
target.style[prop] = start;
}
a = [start, end];
Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_colorStringFilter"])(a); //pass an array with the starting and ending values and let the filter do whatever it needs to the values. If colors are found, it returns true and then we must match where the color shows up order-wise because for things like boxShadow, sometimes the browser provides the computed values with the color FIRST, but the user provides it with the color LAST, so flip them if necessary. Same for drop-shadow().
start = a[0];
end = a[1];
startValues = start.match(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_numWithUnitExp"]) || [];
endValues = end.match(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_numWithUnitExp"]) || [];
if (endValues.length) {
while (result = _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_numWithUnitExp"].exec(end)) {
endValue = result[0];
chunk = end.substring(index, result.index);
if (color) {
color = (color + 1) % 5;
} else if (chunk.substr(-5) === "rgba(" || chunk.substr(-5) === "hsla(") {
color = 1;
}
if (endValue !== (startValue = startValues[matchIndex++] || "")) {
startNum = parseFloat(startValue) || 0;
startUnit = startValue.substr((startNum + "").length);
relative = endValue.charAt(1) === "=" ? +(endValue.charAt(0) + "1") : 0;
if (relative) {
endValue = endValue.substr(2);
}
endNum = parseFloat(endValue);
endUnit = endValue.substr((endNum + "").length);
index = _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_numWithUnitExp"].lastIndex - endUnit.length;
if (!endUnit) {
//if something like "perspective:300" is passed in and we must add a unit to the end
endUnit = endUnit || _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_config"].units[prop] || startUnit;
if (index === end.length) {
end += endUnit;
pt.e += endUnit;
}
}
if (startUnit !== endUnit) {
startNum = _convertToUnit(target, prop, startValue, endUnit) || 0;
} //these nested PropTweens are handled in a special way - we'll never actually call a render or setter method on them. We'll just loop through them in the parent complex string PropTween's render method.
pt._pt = {
_next: pt._pt,
p: chunk || matchIndex === 1 ? chunk : ",",
//note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.
s: startNum,
c: relative ? relative * endNum : endNum - startNum,
m: color && color < 4 ? Math.round : 0
};
}
}
pt.c = index < end.length ? end.substring(index, end.length) : ""; //we use the "c" of the PropTween to store the final part of the string (after the last number)
} else {
pt.r = prop === "display" && end === "none" ? _renderNonTweeningValueOnlyAtEnd : _renderNonTweeningValue;
}
if (_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_relExp"].test(end)) {
pt.e = 0; //if the end string contains relative values or dynamic random(...) values, delete the end it so that on the final render we don't actually set it to the string with += or -= characters (forces it to use the calculated value).
}
this._pt = pt; //start the linked list with this new PropTween. Remember, we call _tweenComplexCSSString.call(pluginInstance...) to ensure that it's scoped properly. We may call it from within another plugin too, thus "this" would refer to the plugin.
return pt;
},
_keywordToPercent = {
top: "0%",
bottom: "100%",
left: "0%",
right: "100%",
center: "50%"
},
_convertKeywordsToPercentages = function _convertKeywordsToPercentages(value) {
var split = value.split(" "),
x = split[0],
y = split[1] || "50%";
if (x === "top" || x === "bottom" || y === "left" || y === "right") {
//the user provided them in the wrong order, so flip them
value = x;
x = y;
y = value;
}
split[0] = _keywordToPercent[x] || x;
split[1] = _keywordToPercent[y] || y;
return split.join(" ");
},
_renderClearProps = function _renderClearProps(ratio, data) {
if (data.tween && data.tween._time === data.tween._dur) {
var target = data.t,
style = target.style,
props = data.u,
cache = target._gsap,
prop,
clearTransforms,
i;
if (props === "all" || props === true) {
style.cssText = "";
clearTransforms = 1;
} else {
props = props.split(",");
i = props.length;
while (--i > -1) {
prop = props[i];
if (_transformProps[prop]) {
clearTransforms = 1;
prop = prop === "transformOrigin" ? _transformOriginProp : _transformProp;
}
_removeProperty(target, prop);
}
}
if (clearTransforms) {
_removeProperty(target, _transformProp);
if (cache) {
cache.svg && target.removeAttribute("transform");
_parseTransform(target, 1); // force all the cached values back to "normal"/identity, otherwise if there's another tween that's already set to render transforms on this element, it could display the wrong values.
cache.uncache = 1;
}
}
}
},
// note: specialProps should return 1 if (and only if) they have a non-zero priority. It indicates we need to sort the linked list.
_specialProps = {
clearProps: function clearProps(plugin, target, property, endValue, tween) {
if (tween.data !== "isFromStart") {
var pt = plugin._pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](plugin._pt, target, property, 0, 0, _renderClearProps);
pt.u = endValue;
pt.pr = -10;
pt.tween = tween;
plugin._props.push(property);
return 1;
}
}
/* className feature (about 0.4kb gzipped).
, className(plugin, target, property, endValue, tween) {
let _renderClassName = (ratio, data) => {
data.css.render(ratio, data.css);
if (!ratio || ratio === 1) {
let inline = data.rmv,
target = data.t,
p;
target.setAttribute("class", ratio ? data.e : data.b);
for (p in inline) {
_removeProperty(target, p);
}
}
},
_getAllStyles = (target) => {
let styles = {},
computed = getComputedStyle(target),
p;
for (p in computed) {
if (isNaN(p) && p !== "cssText" && p !== "length") {
styles[p] = computed[p];
}
}
_setDefaults(styles, _parseTransform(target, 1));
return styles;
},
startClassList = target.getAttribute("class"),
style = target.style,
cssText = style.cssText,
cache = target._gsap,
classPT = cache.classPT,
inlineToRemoveAtEnd = {},
data = {t:target, plugin:plugin, rmv:inlineToRemoveAtEnd, b:startClassList, e:(endValue.charAt(1) !== "=") ? endValue : startClassList.replace(new RegExp("(?:\\s|^)" + endValue.substr(2) + "(?![\\w-])"), "") + ((endValue.charAt(0) === "+") ? " " + endValue.substr(2) : "")},
changingVars = {},
startVars = _getAllStyles(target),
transformRelated = /(transform|perspective)/i,
endVars, p;
if (classPT) {
classPT.r(1, classPT.d);
_removeLinkedListItem(classPT.d.plugin, classPT, "_pt");
}
target.setAttribute("class", data.e);
endVars = _getAllStyles(target, true);
target.setAttribute("class", startClassList);
for (p in endVars) {
if (endVars[p] !== startVars[p] && !transformRelated.test(p)) {
changingVars[p] = endVars[p];
if (!style[p] && style[p] !== "0") {
inlineToRemoveAtEnd[p] = 1;
}
}
}
cache.classPT = plugin._pt = new PropTween(plugin._pt, target, "className", 0, 0, _renderClassName, data, 0, -11);
if (style.cssText !== cssText) { //only apply if things change. Otherwise, in cases like a background-image that's pulled dynamically, it could cause a refresh. See https://greensock.com/forums/topic/20368-possible-gsap-bug-switching-classnames-in-chrome/.
style.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity).
}
_parseTransform(target, true); //to clear the caching of transforms
data.css = new gsap.plugins.css();
data.css.init(target, changingVars, tween);
plugin._props.push(...data.css._props);
return 1;
}
*/
},
/*
* --------------------------------------------------------------------------------------
* TRANSFORMS
* --------------------------------------------------------------------------------------
*/
_identity2DMatrix = [1, 0, 0, 1, 0, 0],
_rotationalProperties = {},
_isNullTransform = function _isNullTransform(value) {
return value === "matrix(1, 0, 0, 1, 0, 0)" || value === "none" || !value;
},
_getComputedTransformMatrixAsArray = function _getComputedTransformMatrixAsArray(target) {
var matrixString = _getComputedProperty(target, _transformProp);
return _isNullTransform(matrixString) ? _identity2DMatrix : matrixString.substr(7).match(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_numExp"]).map(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"]);
},
_getMatrix = function _getMatrix(target, force2D) {
var cache = target._gsap || Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_getCache"])(target),
style = target.style,
matrix = _getComputedTransformMatrixAsArray(target),
parent,
nextSibling,
temp,
addedToDOM;
if (cache.svg && target.getAttribute("transform")) {
temp = target.transform.baseVal.consolidate().matrix; //ensures that even complex values like "translate(50,60) rotate(135,0,0)" are parsed because it mashes it into a matrix.
matrix = [temp.a, temp.b, temp.c, temp.d, temp.e, temp.f];
return matrix.join(",") === "1,0,0,1,0,0" ? _identity2DMatrix : matrix;
} else if (matrix === _identity2DMatrix && !target.offsetParent && target !== _docElement && !cache.svg) {
//note: if offsetParent is null, that means the element isn't in the normal document flow, like if it has display:none or one of its ancestors has display:none). Firefox returns null for getComputedStyle() if the element is in an iframe that has display:none. https://bugzilla.mozilla.org/show_bug.cgi?id=548397
//browsers don't report transforms accurately unless the element is in the DOM and has a display value that's not "none". Firefox and Microsoft browsers have a partial bug where they'll report transforms even if display:none BUT not any percentage-based values like translate(-50%, 8px) will be reported as if it's translate(0, 8px).
temp = style.display;
style.display = "block";
parent = target.parentNode;
if (!parent || !target.offsetParent) {
// note: in 3.3.0 we switched target.offsetParent to _doc.body.contains(target) to avoid [sometimes unnecessary] MutationObserver calls but that wasn't adequate because there are edge cases where nested position: fixed elements need to get reparented to accurately sense transforms. See https://github.com/greensock/GSAP/issues/388 and https://github.com/greensock/GSAP/issues/375
addedToDOM = 1; //flag
nextSibling = target.nextSibling;
_docElement.appendChild(target); //we must add it to the DOM in order to get values properly
}
matrix = _getComputedTransformMatrixAsArray(target);
temp ? style.display = temp : _removeProperty(target, "display");
if (addedToDOM) {
nextSibling ? parent.insertBefore(target, nextSibling) : parent ? parent.appendChild(target) : _docElement.removeChild(target);
}
}
return force2D && matrix.length > 6 ? [matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]] : matrix;
},
_applySVGOrigin = function _applySVGOrigin(target, origin, originIsAbsolute, smooth, matrixArray, pluginToAddPropTweensTo) {
var cache = target._gsap,
matrix = matrixArray || _getMatrix(target, true),
xOriginOld = cache.xOrigin || 0,
yOriginOld = cache.yOrigin || 0,
xOffsetOld = cache.xOffset || 0,
yOffsetOld = cache.yOffset || 0,
a = matrix[0],
b = matrix[1],
c = matrix[2],
d = matrix[3],
tx = matrix[4],
ty = matrix[5],
originSplit = origin.split(" "),
xOrigin = parseFloat(originSplit[0]) || 0,
yOrigin = parseFloat(originSplit[1]) || 0,
bounds,
determinant,
x,
y;
if (!originIsAbsolute) {
bounds = _getBBox(target);
xOrigin = bounds.x + (~originSplit[0].indexOf("%") ? xOrigin / 100 * bounds.width : xOrigin);
yOrigin = bounds.y + (~(originSplit[1] || originSplit[0]).indexOf("%") ? yOrigin / 100 * bounds.height : yOrigin);
} else if (matrix !== _identity2DMatrix && (determinant = a * d - b * c)) {
//if it's zero (like if scaleX and scaleY are zero), skip it to avoid errors with dividing by zero.
x = xOrigin * (d / determinant) + yOrigin * (-c / determinant) + (c * ty - d * tx) / determinant;
y = xOrigin * (-b / determinant) + yOrigin * (a / determinant) - (a * ty - b * tx) / determinant;
xOrigin = x;
yOrigin = y;
}
if (smooth || smooth !== false && cache.smooth) {
tx = xOrigin - xOriginOld;
ty = yOrigin - yOriginOld;
cache.xOffset = xOffsetOld + (tx * a + ty * c) - tx;
cache.yOffset = yOffsetOld + (tx * b + ty * d) - ty;
} else {
cache.xOffset = cache.yOffset = 0;
}
cache.xOrigin = xOrigin;
cache.yOrigin = yOrigin;
cache.smooth = !!smooth;
cache.origin = origin;
cache.originIsAbsolute = !!originIsAbsolute;
target.style[_transformOriginProp] = "0px 0px"; //otherwise, if someone sets an origin via CSS, it will likely interfere with the SVG transform attribute ones (because remember, we're baking the origin into the matrix() value).
if (pluginToAddPropTweensTo) {
_addNonTweeningPT(pluginToAddPropTweensTo, cache, "xOrigin", xOriginOld, xOrigin);
_addNonTweeningPT(pluginToAddPropTweensTo, cache, "yOrigin", yOriginOld, yOrigin);
_addNonTweeningPT(pluginToAddPropTweensTo, cache, "xOffset", xOffsetOld, cache.xOffset);
_addNonTweeningPT(pluginToAddPropTweensTo, cache, "yOffset", yOffsetOld, cache.yOffset);
}
target.setAttribute("data-svg-origin", xOrigin + " " + yOrigin);
},
_parseTransform = function _parseTransform(target, uncache) {
var cache = target._gsap || new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["GSCache"](target);
if ("x" in cache && !uncache && !cache.uncache) {
return cache;
}
var style = target.style,
invertedScaleX = cache.scaleX < 0,
px = "px",
deg = "deg",
origin = _getComputedProperty(target, _transformOriginProp) || "0",
x,
y,
z,
scaleX,
scaleY,
rotation,
rotationX,
rotationY,
skewX,
skewY,
perspective,
xOrigin,
yOrigin,
matrix,
angle,
cos,
sin,
a,
b,
c,
d,
a12,
a22,
t1,
t2,
t3,
a13,
a23,
a33,
a42,
a43,
a32;
x = y = z = rotation = rotationX = rotationY = skewX = skewY = perspective = 0;
scaleX = scaleY = 1;
cache.svg = !!(target.getCTM && _isSVG(target));
matrix = _getMatrix(target, cache.svg);
if (cache.svg) {
t1 = !cache.uncache && target.getAttribute("data-svg-origin");
_applySVGOrigin(target, t1 || origin, !!t1 || cache.originIsAbsolute, cache.smooth !== false, matrix);
}
xOrigin = cache.xOrigin || 0;
yOrigin = cache.yOrigin || 0;
if (matrix !== _identity2DMatrix) {
a = matrix[0]; //a11
b = matrix[1]; //a21
c = matrix[2]; //a31
d = matrix[3]; //a41
x = a12 = matrix[4];
y = a22 = matrix[5]; //2D matrix
if (matrix.length === 6) {
scaleX = Math.sqrt(a * a + b * b);
scaleY = Math.sqrt(d * d + c * c);
rotation = a || b ? _atan2(b, a) * _RAD2DEG : 0; //note: if scaleX is 0, we cannot accurately measure rotation. Same for skewX with a scaleY of 0. Therefore, we default to the previously recorded value (or zero if that doesn't exist).
skewX = c || d ? _atan2(c, d) * _RAD2DEG + rotation : 0;
skewX && (scaleY *= Math.cos(skewX * _DEG2RAD));
if (cache.svg) {
x -= xOrigin - (xOrigin * a + yOrigin * c);
y -= yOrigin - (xOrigin * b + yOrigin * d);
} //3D matrix
} else {
a32 = matrix[6];
a42 = matrix[7];
a13 = matrix[8];
a23 = matrix[9];
a33 = matrix[10];
a43 = matrix[11];
x = matrix[12];
y = matrix[13];
z = matrix[14];
angle = _atan2(a32, a33);
rotationX = angle * _RAD2DEG; //rotationX
if (angle) {
cos = Math.cos(-angle);
sin = Math.sin(-angle);
t1 = a12 * cos + a13 * sin;
t2 = a22 * cos + a23 * sin;
t3 = a32 * cos + a33 * sin;
a13 = a12 * -sin + a13 * cos;
a23 = a22 * -sin + a23 * cos;
a33 = a32 * -sin + a33 * cos;
a43 = a42 * -sin + a43 * cos;
a12 = t1;
a22 = t2;
a32 = t3;
} //rotationY
angle = _atan2(-c, a33);
rotationY = angle * _RAD2DEG;
if (angle) {
cos = Math.cos(-angle);
sin = Math.sin(-angle);
t1 = a * cos - a13 * sin;
t2 = b * cos - a23 * sin;
t3 = c * cos - a33 * sin;
a43 = d * sin + a43 * cos;
a = t1;
b = t2;
c = t3;
} //rotationZ
angle = _atan2(b, a);
rotation = angle * _RAD2DEG;
if (angle) {
cos = Math.cos(angle);
sin = Math.sin(angle);
t1 = a * cos + b * sin;
t2 = a12 * cos + a22 * sin;
b = b * cos - a * sin;
a22 = a22 * cos - a12 * sin;
a = t1;
a12 = t2;
}
if (rotationX && Math.abs(rotationX) + Math.abs(rotation) > 359.9) {
//when rotationY is set, it will often be parsed as 180 degrees different than it should be, and rotationX and rotation both being 180 (it looks the same), so we adjust for that here.
rotationX = rotation = 0;
rotationY = 180 - rotationY;
}
scaleX = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(Math.sqrt(a * a + b * b + c * c));
scaleY = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(Math.sqrt(a22 * a22 + a32 * a32));
angle = _atan2(a12, a22);
skewX = Math.abs(angle) > 0.0002 ? angle * _RAD2DEG : 0;
perspective = a43 ? 1 / (a43 < 0 ? -a43 : a43) : 0;
}
if (cache.svg) {
//sense if there are CSS transforms applied on an SVG element in which case we must overwrite them when rendering. The transform attribute is more reliable cross-browser, but we can't just remove the CSS ones because they may be applied in a CSS rule somewhere (not just inline).
t1 = target.getAttribute("transform");
cache.forceCSS = target.setAttribute("transform", "") || !_isNullTransform(_getComputedProperty(target, _transformProp));
t1 && target.setAttribute("transform", t1);
}
}
if (Math.abs(skewX) > 90 && Math.abs(skewX) < 270) {
if (invertedScaleX) {
scaleX *= -1;
skewX += rotation <= 0 ? 180 : -180;
rotation += rotation <= 0 ? 180 : -180;
} else {
scaleY *= -1;
skewX += skewX <= 0 ? 180 : -180;
}
}
cache.x = ((cache.xPercent = x && Math.round(target.offsetWidth / 2) === Math.round(-x) ? -50 : 0) ? 0 : x) + px;
cache.y = ((cache.yPercent = y && Math.round(target.offsetHeight / 2) === Math.round(-y) ? -50 : 0) ? 0 : y) + px;
cache.z = z + px;
cache.scaleX = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(scaleX);
cache.scaleY = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(scaleY);
cache.rotation = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(rotation) + deg;
cache.rotationX = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(rotationX) + deg;
cache.rotationY = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(rotationY) + deg;
cache.skewX = skewX + deg;
cache.skewY = skewY + deg;
cache.transformPerspective = perspective + px;
if (cache.zOrigin = parseFloat(origin.split(" ")[2]) || 0) {
style[_transformOriginProp] = _firstTwoOnly(origin);
}
cache.xOffset = cache.yOffset = 0;
cache.force3D = _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_config"].force3D;
cache.renderTransform = cache.svg ? _renderSVGTransforms : _supports3D ? _renderCSSTransforms : _renderNon3DTransforms;
cache.uncache = 0;
return cache;
},
_firstTwoOnly = function _firstTwoOnly(value) {
return (value = value.split(" "))[0] + " " + value[1];
},
//for handling transformOrigin values, stripping out the 3rd dimension
_addPxTranslate = function _addPxTranslate(target, start, value) {
var unit = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["getUnit"])(start);
return Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(parseFloat(start) + parseFloat(_convertToUnit(target, "x", value + "px", unit))) + unit;
},
_renderNon3DTransforms = function _renderNon3DTransforms(ratio, cache) {
cache.z = "0px";
cache.rotationY = cache.rotationX = "0deg";
cache.force3D = 0;
_renderCSSTransforms(ratio, cache);
},
_zeroDeg = "0deg",
_zeroPx = "0px",
_endParenthesis = ") ",
_renderCSSTransforms = function _renderCSSTransforms(ratio, cache) {
var _ref = cache || this,
xPercent = _ref.xPercent,
yPercent = _ref.yPercent,
x = _ref.x,
y = _ref.y,
z = _ref.z,
rotation = _ref.rotation,
rotationY = _ref.rotationY,
rotationX = _ref.rotationX,
skewX = _ref.skewX,
skewY = _ref.skewY,
scaleX = _ref.scaleX,
scaleY = _ref.scaleY,
transformPerspective = _ref.transformPerspective,
force3D = _ref.force3D,
target = _ref.target,
zOrigin = _ref.zOrigin,
transforms = "",
use3D = force3D === "auto" && ratio && ratio !== 1 || force3D === true; // Safari has a bug that causes it not to render 3D transform-origin values properly, so we force the z origin to 0, record it in the cache, and then do the math here to offset the translate values accordingly (basically do the 3D transform-origin part manually)
if (zOrigin && (rotationX !== _zeroDeg || rotationY !== _zeroDeg)) {
var angle = parseFloat(rotationY) * _DEG2RAD,
a13 = Math.sin(angle),
a33 = Math.cos(angle),
cos;
angle = parseFloat(rotationX) * _DEG2RAD;
cos = Math.cos(angle);
x = _addPxTranslate(target, x, a13 * cos * -zOrigin);
y = _addPxTranslate(target, y, -Math.sin(angle) * -zOrigin);
z = _addPxTranslate(target, z, a33 * cos * -zOrigin + zOrigin);
}
if (transformPerspective !== _zeroPx) {
transforms += "perspective(" + transformPerspective + _endParenthesis;
}
if (xPercent || yPercent) {
transforms += "translate(" + xPercent + "%, " + yPercent + "%) ";
}
if (use3D || x !== _zeroPx || y !== _zeroPx || z !== _zeroPx) {
transforms += z !== _zeroPx || use3D ? "translate3d(" + x + ", " + y + ", " + z + ") " : "translate(" + x + ", " + y + _endParenthesis;
}
if (rotation !== _zeroDeg) {
transforms += "rotate(" + rotation + _endParenthesis;
}
if (rotationY !== _zeroDeg) {
transforms += "rotateY(" + rotationY + _endParenthesis;
}
if (rotationX !== _zeroDeg) {
transforms += "rotateX(" + rotationX + _endParenthesis;
}
if (skewX !== _zeroDeg || skewY !== _zeroDeg) {
transforms += "skew(" + skewX + ", " + skewY + _endParenthesis;
}
if (scaleX !== 1 || scaleY !== 1) {
transforms += "scale(" + scaleX + ", " + scaleY + _endParenthesis;
}
target.style[_transformProp] = transforms || "translate(0, 0)";
},
_renderSVGTransforms = function _renderSVGTransforms(ratio, cache) {
var _ref2 = cache || this,
xPercent = _ref2.xPercent,
yPercent = _ref2.yPercent,
x = _ref2.x,
y = _ref2.y,
rotation = _ref2.rotation,
skewX = _ref2.skewX,
skewY = _ref2.skewY,
scaleX = _ref2.scaleX,
scaleY = _ref2.scaleY,
target = _ref2.target,
xOrigin = _ref2.xOrigin,
yOrigin = _ref2.yOrigin,
xOffset = _ref2.xOffset,
yOffset = _ref2.yOffset,
forceCSS = _ref2.forceCSS,
tx = parseFloat(x),
ty = parseFloat(y),
a11,
a21,
a12,
a22,
temp;
rotation = parseFloat(rotation);
skewX = parseFloat(skewX);
skewY = parseFloat(skewY);
if (skewY) {
//for performance reasons, we combine all skewing into the skewX and rotation values. Remember, a skewY of 10 degrees looks the same as a rotation of 10 degrees plus a skewX of 10 degrees.
skewY = parseFloat(skewY);
skewX += skewY;
rotation += skewY;
}
if (rotation || skewX) {
rotation *= _DEG2RAD;
skewX *= _DEG2RAD;
a11 = Math.cos(rotation) * scaleX;
a21 = Math.sin(rotation) * scaleX;
a12 = Math.sin(rotation - skewX) * -scaleY;
a22 = Math.cos(rotation - skewX) * scaleY;
if (skewX) {
skewY *= _DEG2RAD;
temp = Math.tan(skewX - skewY);
temp = Math.sqrt(1 + temp * temp);
a12 *= temp;
a22 *= temp;
if (skewY) {
temp = Math.tan(skewY);
temp = Math.sqrt(1 + temp * temp);
a11 *= temp;
a21 *= temp;
}
}
a11 = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(a11);
a21 = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(a21);
a12 = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(a12);
a22 = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(a22);
} else {
a11 = scaleX;
a22 = scaleY;
a21 = a12 = 0;
}
if (tx && !~(x + "").indexOf("px") || ty && !~(y + "").indexOf("px")) {
tx = _convertToUnit(target, "x", x, "px");
ty = _convertToUnit(target, "y", y, "px");
}
if (xOrigin || yOrigin || xOffset || yOffset) {
tx = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(tx + xOrigin - (xOrigin * a11 + yOrigin * a12) + xOffset);
ty = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(ty + yOrigin - (xOrigin * a21 + yOrigin * a22) + yOffset);
}
if (xPercent || yPercent) {
//The SVG spec doesn't support percentage-based translation in the "transform" attribute, so we merge it into the translation to simulate it.
temp = target.getBBox();
tx = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(tx + xPercent / 100 * temp.width);
ty = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(ty + yPercent / 100 * temp.height);
}
temp = "matrix(" + a11 + "," + a21 + "," + a12 + "," + a22 + "," + tx + "," + ty + ")";
target.setAttribute("transform", temp);
if (forceCSS) {
//some browsers prioritize CSS transforms over the transform attribute. When we sense that the user has CSS transforms applied, we must overwrite them this way (otherwise some browser simply won't render the transform attribute changes!)
target.style[_transformProp] = temp;
}
},
_addRotationalPropTween = function _addRotationalPropTween(plugin, target, property, startNum, endValue, relative) {
var cap = 360,
isString = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_isString"])(endValue),
endNum = parseFloat(endValue) * (isString && ~endValue.indexOf("rad") ? _RAD2DEG : 1),
change = relative ? endNum * relative : endNum - startNum,
finalValue = startNum + change + "deg",
direction,
pt;
if (isString) {
direction = endValue.split("_")[1];
if (direction === "short") {
change %= cap;
if (change !== change % (cap / 2)) {
change += change < 0 ? cap : -cap;
}
}
if (direction === "cw" && change < 0) {
change = (change + cap * _bigNum) % cap - ~~(change / cap) * cap;
} else if (direction === "ccw" && change > 0) {
change = (change - cap * _bigNum) % cap - ~~(change / cap) * cap;
}
}
plugin._pt = pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](plugin._pt, target, property, startNum, change, _renderPropWithEnd);
pt.e = finalValue;
pt.u = "deg";
plugin._props.push(property);
return pt;
},
_addRawTransformPTs = function _addRawTransformPTs(plugin, transforms, target) {
//for handling cases where someone passes in a whole transform string, like transform: "scale(2, 3) rotate(20deg) translateY(30em)"
var style = _tempDivStyler.style,
startCache = target._gsap,
exclude = "perspective,force3D,transformOrigin,svgOrigin",
endCache,
p,
startValue,
endValue,
startNum,
endNum,
startUnit,
endUnit;
style.cssText = getComputedStyle(target).cssText + ";position:absolute;display:block;"; //%-based translations will fail unless we set the width/height to match the original target (and padding/borders can affect it)
style[_transformProp] = transforms;
_doc.body.appendChild(_tempDivStyler);
endCache = _parseTransform(_tempDivStyler, 1);
for (p in _transformProps) {
startValue = startCache[p];
endValue = endCache[p];
if (startValue !== endValue && exclude.indexOf(p) < 0) {
//tweening to no perspective gives very unintuitive results - just keep the same perspective in that case.
startUnit = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["getUnit"])(startValue);
endUnit = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["getUnit"])(endValue);
startNum = startUnit !== endUnit ? _convertToUnit(target, p, startValue, endUnit) : parseFloat(startValue);
endNum = parseFloat(endValue);
plugin._pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](plugin._pt, startCache, p, startNum, endNum - startNum, _renderCSSProp);
plugin._pt.u = endUnit || 0;
plugin._props.push(p);
}
}
_doc.body.removeChild(_tempDivStyler);
}; // handle splitting apart padding, margin, borderWidth, and borderRadius into their 4 components. Firefox, for example, won't report borderRadius correctly - it will only do borderTopLeftRadius and the other corners. We also want to handle paddingTop, marginLeft, borderRightWidth, etc.
Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_forEachName"])("padding,margin,Width,Radius", function (name, index) {
var t = "Top",
r = "Right",
b = "Bottom",
l = "Left",
props = (index < 3 ? [t, r, b, l] : [t + l, t + r, b + r, b + l]).map(function (side) {
return index < 2 ? name + side : "border" + side + name;
});
_specialProps[index > 1 ? "border" + name : name] = function (plugin, target, property, endValue, tween) {
var a, vars;
if (arguments.length < 4) {
// getter, passed target, property, and unit (from _get())
a = props.map(function (prop) {
return _get(plugin, prop, property);
});
vars = a.join(" ");
return vars.split(a[0]).length === 5 ? a[0] : vars;
}
a = (endValue + "").split(" ");
vars = {};
props.forEach(function (prop, i) {
return vars[prop] = a[i] = a[i] || a[(i - 1) / 2 | 0];
});
plugin.init(target, vars, tween);
};
});
var CSSPlugin = {
name: "css",
register: _initCore,
targetTest: function targetTest(target) {
return target.style && target.nodeType;
},
init: function init(target, vars, tween, index, targets) {
var props = this._props,
style = target.style,
startValue,
endValue,
endNum,
startNum,
type,
specialProp,
p,
startUnit,
endUnit,
relative,
isTransformRelated,
transformPropTween,
cache,
smooth,
hasPriority;
_pluginInitted || _initCore();
for (p in vars) {
if (p === "autoRound") {
continue;
}
endValue = vars[p];
if (_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_plugins"][p] && Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_checkPlugin"])(p, vars, tween, index, target, targets)) {
//plugins
continue;
}
type = _typeof(endValue);
specialProp = _specialProps[p];
if (type === "function") {
endValue = endValue.call(tween, index, target, targets);
type = _typeof(endValue);
}
if (type === "string" && ~endValue.indexOf("random(")) {
endValue = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_replaceRandom"])(endValue);
}
if (specialProp) {
if (specialProp(this, target, p, endValue, tween)) {
hasPriority = 1;
}
} else if (p.substr(0, 2) === "--") {
//CSS variable
this.add(style, "setProperty", getComputedStyle(target).getPropertyValue(p) + "", endValue + "", index, targets, 0, 0, p);
} else if (type !== "undefined") {
startValue = _get(target, p);
startNum = parseFloat(startValue);
relative = type === "string" && endValue.charAt(1) === "=" ? +(endValue.charAt(0) + "1") : 0;
if (relative) {
endValue = endValue.substr(2);
}
endNum = parseFloat(endValue);
if (p in _propertyAliases) {
if (p === "autoAlpha") {
//special case where we control the visibility along with opacity. We still allow the opacity value to pass through and get tweened.
if (startNum === 1 && _get(target, "visibility") === "hidden" && endNum) {
//if visibility is initially set to "hidden", we should interpret that as intent to make opacity 0 (a convenience)
startNum = 0;
}
_addNonTweeningPT(this, style, "visibility", startNum ? "inherit" : "hidden", endNum ? "inherit" : "hidden", !endNum);
}
if (p !== "scale" && p !== "transform") {
p = _propertyAliases[p];
~p.indexOf(",") && (p = p.split(",")[0]);
}
}
isTransformRelated = p in _transformProps; //--- TRANSFORM-RELATED ---
if (isTransformRelated) {
if (!transformPropTween) {
cache = target._gsap;
cache.renderTransform || _parseTransform(target); // if, for example, gsap.set(... {transform:"translateX(50vw)"}), the _get() call doesn't parse the transform, thus cache.renderTransform won't be set yet so force the parsing of the transform here.
smooth = vars.smoothOrigin !== false && cache.smooth;
transformPropTween = this._pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](this._pt, style, _transformProp, 0, 1, cache.renderTransform, cache, 0, -1); //the first time through, create the rendering PropTween so that it runs LAST (in the linked list, we keep adding to the beginning)
transformPropTween.dep = 1; //flag it as dependent so that if things get killed/overwritten and this is the only PropTween left, we can safely kill the whole tween.
}
if (p === "scale") {
this._pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](this._pt, cache, "scaleY", cache.scaleY, relative ? relative * endNum : endNum - cache.scaleY);
props.push("scaleY", p);
p += "X";
} else if (p === "transformOrigin") {
endValue = _convertKeywordsToPercentages(endValue); //in case something like "left top" or "bottom right" is passed in. Convert to percentages.
if (cache.svg) {
_applySVGOrigin(target, endValue, 0, smooth, 0, this);
} else {
endUnit = parseFloat(endValue.split(" ")[2]) || 0; //handle the zOrigin separately!
endUnit !== cache.zOrigin && _addNonTweeningPT(this, cache, "zOrigin", cache.zOrigin, endUnit);
_addNonTweeningPT(this, style, p, _firstTwoOnly(startValue), _firstTwoOnly(endValue));
}
continue;
} else if (p === "svgOrigin") {
_applySVGOrigin(target, endValue, 1, smooth, 0, this);
continue;
} else if (p in _rotationalProperties) {
_addRotationalPropTween(this, cache, p, startNum, endValue, relative);
continue;
} else if (p === "smoothOrigin") {
_addNonTweeningPT(this, cache, "smooth", cache.smooth, endValue);
continue;
} else if (p === "force3D") {
cache[p] = endValue;
continue;
} else if (p === "transform") {
_addRawTransformPTs(this, endValue, target);
continue;
}
} else if (!(p in style)) {
p = _checkPropPrefix(p) || p;
}
if (isTransformRelated || (endNum || endNum === 0) && (startNum || startNum === 0) && !_complexExp.test(endValue) && p in style) {
startUnit = (startValue + "").substr((startNum + "").length);
endNum || (endNum = 0); // protect against NaN
endUnit = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["getUnit"])(endValue) || (p in _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_config"].units ? _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_config"].units[p] : startUnit);
startUnit !== endUnit && (startNum = _convertToUnit(target, p, startValue, endUnit));
this._pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](this._pt, isTransformRelated ? cache : style, p, startNum, relative ? relative * endNum : endNum - startNum, endUnit === "px" && vars.autoRound !== false && !isTransformRelated ? _renderRoundedCSSProp : _renderCSSProp);
this._pt.u = endUnit || 0;
if (startUnit !== endUnit) {
//when the tween goes all the way back to the beginning, we need to revert it to the OLD/ORIGINAL value (with those units). We record that as a "b" (beginning) property and point to a render method that handles that. (performance optimization)
this._pt.b = startValue;
this._pt.r = _renderCSSPropWithBeginning;
}
} else if (!(p in style)) {
if (p in target) {
//maybe it's not a style - it could be a property added directly to an element in which case we'll try to animate that.
this.add(target, p, target[p], endValue, index, targets);
} else {
Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_missingPlugin"])(p, endValue);
continue;
}
} else {
_tweenComplexCSSString.call(this, target, p, startValue, endValue);
}
props.push(p);
}
}
hasPriority && Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_sortPropTweensByPriority"])(this);
},
get: _get,
aliases: _propertyAliases,
getSetter: function getSetter(target, property, plugin) {
//returns a setter function that accepts target, property, value and applies it accordingly. Remember, properties like "x" aren't as simple as target.style.property = value because they've got to be applied to a proxy object and then merged into a transform string in a renderer.
var p = _propertyAliases[property];
p && p.indexOf(",") < 0 && (property = p);
return property in _transformProps && property !== _transformOriginProp && (target._gsap.x || _get(target, "x")) ? plugin && _recentSetterPlugin === plugin ? property === "scale" ? _setterScale : _setterTransform : (_recentSetterPlugin = plugin || {}) && (property === "scale" ? _setterScaleWithRender : _setterTransformWithRender) : target.style && !Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_isUndefined"])(target.style[property]) ? _setterCSSStyle : ~property.indexOf("-") ? _setterCSSProp : Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_getSetter"])(target, property);
},
core: {
_removeProperty: _removeProperty,
_getMatrix: _getMatrix
}
};
_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["gsap"].utils.checkPrefix = _checkPropPrefix;
(function (positionAndScale, rotation, others, aliases) {
var all = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_forEachName"])(positionAndScale + "," + rotation + "," + others, function (name) {
_transformProps[name] = 1;
});
Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_forEachName"])(rotation, function (name) {
_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_config"].units[name] = "deg";
_rotationalProperties[name] = 1;
});
_propertyAliases[all[13]] = positionAndScale + "," + rotation;
Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_forEachName"])(aliases, function (name) {
var split = name.split(":");
_propertyAliases[split[1]] = all[split[0]];
});
})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent", "rotation,rotationX,rotationY,skewX,skewY", "transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective", "0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");
Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_forEachName"])("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective", function (name) {
_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_config"].units[name] = "px";
});
_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["gsap"].registerPlugin(CSSPlugin);
/***/ }),
/***/ "../../node_modules/gsap/gsap-core.js":
/*!*******************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/gsap/gsap-core.js ***!
\*******************************************************************************/
/*! exports provided: GSCache, Animation, Timeline, Tween, PropTween, gsap, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ, TweenMax, TweenLite, TimelineMax, TimelineLite, default, wrap, wrapYoyo, distribute, random, snap, normalize, getUnit, clamp, splitColor, toArray, mapRange, pipe, unitize, interpolate, shuffle, _getProperty, _numExp, _numWithUnitExp, _isString, _isUndefined, _renderComplexString, _relExp, _setDefaults, _removeLinkedListItem, _forEachName, _sortPropTweensByPriority, _colorStringFilter, _replaceRandom, _checkPlugin, _plugins, _ticker, _config, _roundModifier, _round, _missingPlugin, _getSetter, _getCache */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GSCache", function() { return GSCache; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Animation", function() { return Animation; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timeline", function() { return Timeline; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Tween", function() { return Tween; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropTween", function() { return PropTween; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gsap", function() { return gsap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power0", function() { return Power0; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power1", function() { return Power1; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power2", function() { return Power2; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power3", function() { return Power3; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power4", function() { return Power4; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Linear", function() { return Linear; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Quad", function() { return Quad; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cubic", function() { return Cubic; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Quart", function() { return Quart; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Quint", function() { return Quint; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Strong", function() { return Strong; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Elastic", function() { return Elastic; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Back", function() { return Back; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SteppedEase", function() { return SteppedEase; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bounce", function() { return Bounce; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sine", function() { return Sine; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Expo", function() { return Expo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Circ", function() { return Circ; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TweenMax", function() { return Tween; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TweenLite", function() { return Tween; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimelineMax", function() { return Timeline; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimelineLite", function() { return Timeline; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return gsap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrap", function() { return wrap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapYoyo", function() { return wrapYoyo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distribute", function() { return distribute; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "random", function() { return random; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "snap", function() { return snap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalize", function() { return normalize; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUnit", function() { return getUnit; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clamp", function() { return clamp; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "splitColor", function() { return splitColor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapRange", function() { return mapRange; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return pipe; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unitize", function() { return unitize; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolate", function() { return interpolate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return shuffle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getProperty", function() { return _getProperty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_numExp", function() { return _numExp; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_numWithUnitExp", function() { return _numWithUnitExp; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_isString", function() { return _isString; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_isUndefined", function() { return _isUndefined; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_renderComplexString", function() { return _renderComplexString; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_relExp", function() { return _relExp; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_setDefaults", function() { return _setDefaults; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_removeLinkedListItem", function() { return _removeLinkedListItem; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_forEachName", function() { return _forEachName; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_sortPropTweensByPriority", function() { return _sortPropTweensByPriority; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_colorStringFilter", function() { return _colorStringFilter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_replaceRandom", function() { return _replaceRandom; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_checkPlugin", function() { return _checkPlugin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_plugins", function() { return _plugins; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_ticker", function() { return _ticker; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_config", function() { return _config; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_roundModifier", function() { return _roundModifier; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_round", function() { return _round; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_missingPlugin", function() { return _missingPlugin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getSetter", function() { return _getSetter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getCache", function() { return _getCache; });
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
subClass.__proto__ = superClass;
}
/*!
* GSAP 3.5.1
* https://greensock.com
*
* @license Copyright 2008-2020, GreenSock. All rights reserved.
* Subject to the terms at https://greensock.com/standard-license or for
* Club GreenSock members, the agreement issued with that membership.
* @author: Jack Doyle, jack@greensock.com
*/
/* eslint-disable */
var _config = {
autoSleep: 120,
force3D: "auto",
nullTargetWarn: 1,
units: {
lineHeight: ""
}
},
_defaults = {
duration: .5,
overwrite: false,
delay: 0
},
_bigNum = 1e8,
_tinyNum = 1 / _bigNum,
_2PI = Math.PI * 2,
_HALF_PI = _2PI / 4,
_gsID = 0,
_sqrt = Math.sqrt,
_cos = Math.cos,
_sin = Math.sin,
_isString = function _isString(value) {
return typeof value === "string";
},
_isFunction = function _isFunction(value) {
return typeof value === "function";
},
_isNumber = function _isNumber(value) {
return typeof value === "number";
},
_isUndefined = function _isUndefined(value) {
return typeof value === "undefined";
},
_isObject = function _isObject(value) {
return _typeof(value) === "object";
},
_isNotFalse = function _isNotFalse(value) {
return value !== false;
},
_windowExists = function _windowExists() {
return typeof window !== "undefined";
},
_isFuncOrString = function _isFuncOrString(value) {
return _isFunction(value) || _isString(value);
},
_isTypedArray = typeof ArrayBuffer === "function" && ArrayBuffer.isView || function () {},
// note: IE10 has ArrayBuffer, but NOT ArrayBuffer.isView().
_isArray = Array.isArray,
_strictNumExp = /(?:-?\.?\d|\.)+/gi,
//only numbers (including negatives and decimals) but NOT relative values.
_numExp = /[-+=.]*\d+[.e\-+]*\d*[e\-\+]*\d*/g,
//finds any numbers, including ones that start with += or -=, negative numbers, and ones in scientific notation like 1e-8.
_numWithUnitExp = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g,
_complexStringNumExp = /[-+=.]*\d+(?:\.|e-|e)*\d*/gi,
//duplicate so that while we're looping through matches from exec(), it doesn't contaminate the lastIndex of _numExp which we use to search for colors too.
_relExp = /[+-]=-?[\.\d]+/,
_delimitedValueExp = /[#\-+.]*\b[a-z\d-=+%.]+/gi,
_globalTimeline,
_win,
_coreInitted,
_doc,
_globals = {},
_installScope = {},
_coreReady,
_install = function _install(scope) {
return (_installScope = _merge(scope, _globals)) && gsap;
},
_missingPlugin = function _missingPlugin(property, value) {
return console.warn("Invalid property", property, "set to", value, "Missing plugin? gsap.registerPlugin()");
},
_warn = function _warn(message, suppress) {
return !suppress && console.warn(message);
},
_addGlobal = function _addGlobal(name, obj) {
return name && (_globals[name] = obj) && _installScope && (_installScope[name] = obj) || _globals;
},
_emptyFunc = function _emptyFunc() {
return 0;
},
_reservedProps = {},
_lazyTweens = [],
_lazyLookup = {},
_lastRenderedFrame,
_plugins = {},
_effects = {},
_nextGCFrame = 30,
_harnessPlugins = [],
_callbackNames = "",
_harness = function _harness(targets) {
var target = targets[0],
harnessPlugin,
i;
_isObject(target) || _isFunction(target) || (targets = [targets]);
if (!(harnessPlugin = (target._gsap || {}).harness)) {
i = _harnessPlugins.length;
while (i-- && !_harnessPlugins[i].targetTest(target)) {}
harnessPlugin = _harnessPlugins[i];
}
i = targets.length;
while (i--) {
targets[i] && (targets[i]._gsap || (targets[i]._gsap = new GSCache(targets[i], harnessPlugin))) || targets.splice(i, 1);
}
return targets;
},
_getCache = function _getCache(target) {
return target._gsap || _harness(toArray(target))[0]._gsap;
},
_getProperty = function _getProperty(target, property, v) {
return (v = target[property]) && _isFunction(v) ? target[property]() : _isUndefined(v) && target.getAttribute && target.getAttribute(property) || v;
},
_forEachName = function _forEachName(names, func) {
return (names = names.split(",")).forEach(func) || names;
},
//split a comma-delimited list of names into an array, then run a forEach() function and return the split array (this is just a way to consolidate/shorten some code).
_round = function _round(value) {
return Math.round(value * 100000) / 100000 || 0;
},
_arrayContainsAny = function _arrayContainsAny(toSearch, toFind) {
//searches one array to find matches for any of the items in the toFind array. As soon as one is found, it returns true. It does NOT return all the matches; it's simply a boolean search.
var l = toFind.length,
i = 0;
for (; toSearch.indexOf(toFind[i]) < 0 && ++i < l;) {}
return i < l;
},
_parseVars = function _parseVars(params, type, parent) {
//reads the arguments passed to one of the key methods and figures out if the user is defining things with the OLD/legacy syntax where the duration is the 2nd parameter, and then it adjusts things accordingly and spits back the corrected vars object (with the duration added if necessary, as well as runBackwards or startAt or immediateRender). type 0 = to()/staggerTo(), 1 = from()/staggerFrom(), 2 = fromTo()/staggerFromTo()
var isLegacy = _isNumber(params[1]),
varsIndex = (isLegacy ? 2 : 1) + (type < 2 ? 0 : 1),
vars = params[varsIndex],
irVars;
isLegacy && (vars.duration = params[1]);
vars.parent = parent;
if (type) {
irVars = vars;
while (parent && !("immediateRender" in irVars)) {
// inheritance hasn't happened yet, but someone may have set a default in an ancestor timeline. We could do vars.immediateRender = _isNotFalse(_inheritDefaults(vars).immediateRender) but that'd exact a slight performance penalty because _inheritDefaults() also runs in the Tween constructor. We're paying a small kb price here to gain speed.
irVars = parent.vars.defaults || {};
parent = _isNotFalse(parent.vars.inherit) && parent.parent;
}
vars.immediateRender = _isNotFalse(irVars.immediateRender);
type < 2 ? vars.runBackwards = 1 : vars.startAt = params[varsIndex - 1]; // "from" vars
}
return vars;
},
_lazyRender = function _lazyRender() {
var l = _lazyTweens.length,
a = _lazyTweens.slice(0),
i,
tween;
_lazyLookup = {};
_lazyTweens.length = 0;
for (i = 0; i < l; i++) {
tween = a[i];
tween && tween._lazy && (tween.render(tween._lazy[0], tween._lazy[1], true)._lazy = 0);
}
},
_lazySafeRender = function _lazySafeRender(animation, time, suppressEvents, force) {
_lazyTweens.length && _lazyRender();
animation.render(time, suppressEvents, force);
_lazyTweens.length && _lazyRender(); //in case rendering caused any tweens to lazy-init, we should render them because typically when someone calls seek() or time() or progress(), they expect an immediate render.
},
_numericIfPossible = function _numericIfPossible(value) {
var n = parseFloat(value);
return (n || n === 0) && (value + "").match(_delimitedValueExp).length < 2 ? n : _isString(value) ? value.trim() : value;
},
_passThrough = function _passThrough(p) {
return p;
},
_setDefaults = function _setDefaults(obj, defaults) {
for (var p in defaults) {
p in obj || (obj[p] = defaults[p]);
}
return obj;
},
_setKeyframeDefaults = function _setKeyframeDefaults(obj, defaults) {
for (var p in defaults) {
p in obj || p === "duration" || p === "ease" || (obj[p] = defaults[p]);
}
},
_merge = function _merge(base, toMerge) {
for (var p in toMerge) {
base[p] = toMerge[p];
}
return base;
},
_mergeDeep = function _mergeDeep(base, toMerge) {
for (var p in toMerge) {
base[p] = _isObject(toMerge[p]) ? _mergeDeep(base[p] || (base[p] = {}), toMerge[p]) : toMerge[p];
}
return base;
},
_copyExcluding = function _copyExcluding(obj, excluding) {
var copy = {},
p;
for (p in obj) {
p in excluding || (copy[p] = obj[p]);
}
return copy;
},
_inheritDefaults = function _inheritDefaults(vars) {
var parent = vars.parent || _globalTimeline,
func = vars.keyframes ? _setKeyframeDefaults : _setDefaults;
if (_isNotFalse(vars.inherit)) {
while (parent) {
func(vars, parent.vars.defaults);
parent = parent.parent || parent._dp;
}
}
return vars;
},
_arraysMatch = function _arraysMatch(a1, a2) {
var i = a1.length,
match = i === a2.length;
while (match && i-- && a1[i] === a2[i]) {}
return i < 0;
},
_addLinkedListItem = function _addLinkedListItem(parent, child, firstProp, lastProp, sortBy) {
if (firstProp === void 0) {
firstProp = "_first";
}
if (lastProp === void 0) {
lastProp = "_last";
}
var prev = parent[lastProp],
t;
if (sortBy) {
t = child[sortBy];
while (prev && prev[sortBy] > t) {
prev = prev._prev;
}
}
if (prev) {
child._next = prev._next;
prev._next = child;
} else {
child._next = parent[firstProp];
parent[firstProp] = child;
}
if (child._next) {
child._next._prev = child;
} else {
parent[lastProp] = child;
}
child._prev = prev;
child.parent = child._dp = parent;
return child;
},
_removeLinkedListItem = function _removeLinkedListItem(parent, child, firstProp, lastProp) {
if (firstProp === void 0) {
firstProp = "_first";
}
if (lastProp === void 0) {
lastProp = "_last";
}
var prev = child._prev,
next = child._next;
if (prev) {
prev._next = next;
} else if (parent[firstProp] === child) {
parent[firstProp] = next;
}
if (next) {
next._prev = prev;
} else if (parent[lastProp] === child) {
parent[lastProp] = prev;
}
child._next = child._prev = child.parent = null; // don't delete the _dp just so we can revert if necessary. But parent should be null to indicate the item isn't in a linked list.
},
_removeFromParent = function _removeFromParent(child, onlyIfParentHasAutoRemove) {
child.parent && (!onlyIfParentHasAutoRemove || child.parent.autoRemoveChildren) && child.parent.remove(child);
child._act = 0;
},
_uncache = function _uncache(animation, child) {
if (animation && (!child || child._end > animation._dur || child._start < 0)) {
// performance optimization: if a child animation is passed in we should only uncache if that child EXTENDS the animation (its end time is beyond the end)
var a = animation;
while (a) {
a._dirty = 1;
a = a.parent;
}
}
return animation;
},
_recacheAncestors = function _recacheAncestors(animation) {
var parent = animation.parent;
while (parent && parent.parent) {
//sometimes we must force a re-sort of all children and update the duration/totalDuration of all ancestor timelines immediately in case, for example, in the middle of a render loop, one tween alters another tween's timeScale which shoves its startTime before 0, forcing the parent timeline to shift around and shiftChildren() which could affect that next tween's render (startTime). Doesn't matter for the root timeline though.
parent._dirty = 1;
parent.totalDuration();
parent = parent.parent;
}
return animation;
},
_hasNoPausedAncestors = function _hasNoPausedAncestors(animation) {
return !animation || animation._ts && _hasNoPausedAncestors(animation.parent);
},
_elapsedCycleDuration = function _elapsedCycleDuration(animation) {
return animation._repeat ? _animationCycle(animation._tTime, animation = animation.duration() + animation._rDelay) * animation : 0;
},
// feed in the totalTime and cycleDuration and it'll return the cycle (iteration minus 1) and if the playhead is exactly at the very END, it will NOT bump up to the next cycle.
_animationCycle = function _animationCycle(tTime, cycleDuration) {
return (tTime /= cycleDuration) && ~~tTime === tTime ? ~~tTime - 1 : ~~tTime;
},
_parentToChildTotalTime = function _parentToChildTotalTime(parentTime, child) {
return (parentTime - child._start) * child._ts + (child._ts >= 0 ? 0 : child._dirty ? child.totalDuration() : child._tDur);
},
_setEnd = function _setEnd(animation) {
return animation._end = _round(animation._start + (animation._tDur / Math.abs(animation._ts || animation._rts || _tinyNum) || 0));
},
_alignPlayhead = function _alignPlayhead(animation, totalTime) {
// adjusts the animation's _start and _end according to the provided totalTime (only if the parent's smoothChildTiming is true and the animation isn't paused). It doesn't do any rendering or forcing things back into parent timelines, etc. - that's what totalTime() is for.
var parent = animation._dp;
if (parent && parent.smoothChildTiming && animation._ts) {
animation._start = _round(animation._dp._time - (animation._ts > 0 ? totalTime / animation._ts : ((animation._dirty ? animation.totalDuration() : animation._tDur) - totalTime) / -animation._ts));
_setEnd(animation);
parent._dirty || _uncache(parent, animation); //for performance improvement. If the parent's cache is already dirty, it already took care of marking the ancestors as dirty too, so skip the function call here.
}
return animation;
},
/*
_totalTimeToTime = (clampedTotalTime, duration, repeat, repeatDelay, yoyo) => {
let cycleDuration = duration + repeatDelay,
time = _round(clampedTotalTime % cycleDuration);
if (time > duration) {
time = duration;
}
return (yoyo && (~~(clampedTotalTime / cycleDuration) & 1)) ? duration - time : time;
},
*/
_postAddChecks = function _postAddChecks(timeline, child) {
var t;
if (child._time || child._initted && !child._dur) {
//in case, for example, the _start is moved on a tween that has already rendered. Imagine it's at its end state, then the startTime is moved WAY later (after the end of this timeline), it should render at its beginning.
t = _parentToChildTotalTime(timeline.rawTime(), child);
if (!child._dur || _clamp(0, child.totalDuration(), t) - child._tTime > _tinyNum) {
child.render(t, true);
}
} //if the timeline has already ended but the inserted tween/timeline extends the duration, we should enable this timeline again so that it renders properly. We should also align the playhead with the parent timeline's when appropriate.
if (_uncache(timeline, child)._dp && timeline._initted && timeline._time >= timeline._dur && timeline._ts) {
//in case any of the ancestors had completed but should now be enabled...
if (timeline._dur < timeline.duration()) {
t = timeline;
while (t._dp) {
t.rawTime() >= 0 && t.totalTime(t._tTime); //moves the timeline (shifts its startTime) if necessary, and also enables it. If it's currently zero, though, it may not be scheduled to render until later so there's no need to force it to align with the current playhead position. Only move to catch up with the playhead.
t = t._dp;
}
}
timeline._zTime = -_tinyNum; // helps ensure that the next render() will be forced (crossingStart = true in render()), even if the duration hasn't changed (we're adding a child which would need to get rendered). Definitely an edge case. Note: we MUST do this AFTER the loop above where the totalTime() might trigger a render() because this _addToTimeline() method gets called from the Animation constructor, BEFORE tweens even record their targets, etc. so we wouldn't want things to get triggered in the wrong order.
}
},
_addToTimeline = function _addToTimeline(timeline, child, position, skipChecks) {
child.parent && _removeFromParent(child);
child._start = _round(position + child._delay);
child._end = _round(child._start + (child.totalDuration() / Math.abs(child.timeScale()) || 0));
_addLinkedListItem(timeline, child, "_first", "_last", timeline._sort ? "_start" : 0);
timeline._recent = child;
skipChecks || _postAddChecks(timeline, child);
return timeline;
},
_scrollTrigger = function _scrollTrigger(animation, trigger) {
return (_globals.ScrollTrigger || _missingPlugin("scrollTrigger", trigger)) && _globals.ScrollTrigger.create(trigger, animation);
},
_attemptInitTween = function _attemptInitTween(tween, totalTime, force, suppressEvents) {
_initTween(tween, totalTime);
if (!tween._initted) {
return 1;
}
if (!force && tween._pt && (tween._dur && tween.vars.lazy !== false || !tween._dur && tween.vars.lazy) && _lastRenderedFrame !== _ticker.frame) {
_lazyTweens.push(tween);
tween._lazy = [totalTime, suppressEvents];
return 1;
}
},
_renderZeroDurationTween = function _renderZeroDurationTween(tween, totalTime, suppressEvents, force) {
var prevRatio = tween.ratio,
ratio = totalTime < 0 || !totalTime && prevRatio && !tween._start && tween._zTime > _tinyNum && !tween._dp._lock || (tween._ts < 0 || tween._dp._ts < 0) && tween.data !== "isFromStart" && tween.data !== "isStart" ? 0 : 1,
// check parent's _lock because when a timeline repeats/yoyos and does its artificial wrapping, we shouldn't force the ratio back to 0. Also, if the tween or its parent is reversed and the totalTime is 0, we should go to a ratio of 0.
repeatDelay = tween._rDelay,
tTime = 0,
pt,
iteration,
prevIteration;
if (repeatDelay && tween._repeat) {
// in case there's a zero-duration tween that has a repeat with a repeatDelay
tTime = _clamp(0, tween._tDur, totalTime);
iteration = _animationCycle(tTime, repeatDelay);
prevIteration = _animationCycle(tween._tTime, repeatDelay);
if (iteration !== prevIteration) {
prevRatio = 1 - ratio;
tween.vars.repeatRefresh && tween._initted && tween.invalidate();
}
}
if (ratio !== prevRatio || force || tween._zTime === _tinyNum || !totalTime && tween._zTime) {
if (!tween._initted && _attemptInitTween(tween, totalTime, force, suppressEvents)) {
// if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately.
return;
}
prevIteration = tween._zTime;
tween._zTime = totalTime || (suppressEvents ? _tinyNum : 0); // when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect.
suppressEvents || (suppressEvents = totalTime && !prevIteration); // if it was rendered previously at exactly 0 (_zTime) and now the playhead is moving away, DON'T fire callbacks otherwise they'll seem like duplicates.
tween.ratio = ratio;
tween._from && (ratio = 1 - ratio);
tween._time = 0;
tween._tTime = tTime;
suppressEvents || _callback(tween, "onStart");
pt = tween._pt;
while (pt) {
pt.r(ratio, pt.d);
pt = pt._next;
}
tween._startAt && totalTime < 0 && tween._startAt.render(totalTime, true, true);
tween._onUpdate && !suppressEvents && _callback(tween, "onUpdate");
tTime && tween._repeat && !suppressEvents && tween.parent && _callback(tween, "onRepeat");
if ((totalTime >= tween._tDur || totalTime < 0) && tween.ratio === ratio) {
ratio && _removeFromParent(tween, 1);
if (!suppressEvents) {
_callback(tween, ratio ? "onComplete" : "onReverseComplete", true);
tween._prom && tween._prom();
}
}
} else if (!tween._zTime) {
tween._zTime = totalTime;
}
},
_findNextPauseTween = function _findNextPauseTween(animation, prevTime, time) {
var child;
if (time > prevTime) {
child = animation._first;
while (child && child._start <= time) {
if (!child._dur && child.data === "isPause" && child._start > prevTime) {
return child;
}
child = child._next;
}
} else {
child = animation._last;
while (child && child._start >= time) {
if (!child._dur && child.data === "isPause" && child._start < prevTime) {
return child;
}
child = child._prev;
}
}
},
_setDuration = function _setDuration(animation, duration, skipUncache, leavePlayhead) {
var repeat = animation._repeat,
dur = _round(duration) || 0,
totalProgress = animation._tTime / animation._tDur;
totalProgress && !leavePlayhead && (animation._time *= dur / animation._dur);
animation._dur = dur;
animation._tDur = !repeat ? dur : repeat < 0 ? 1e10 : _round(dur * (repeat + 1) + animation._rDelay * repeat);
totalProgress && !leavePlayhead ? _alignPlayhead(animation, animation._tTime = animation._tDur * totalProgress) : animation.parent && _setEnd(animation);
skipUncache || _uncache(animation.parent, animation);
return animation;
},
_onUpdateTotalDuration = function _onUpdateTotalDuration(animation) {
return animation instanceof Timeline ? _uncache(animation) : _setDuration(animation, animation._dur);
},
_zeroPosition = {
_start: 0,
endTime: _emptyFunc
},
_parsePosition = function _parsePosition(animation, position) {
var labels = animation.labels,
recent = animation._recent || _zeroPosition,
clippedDuration = animation.duration() >= _bigNum ? recent.endTime(false) : animation._dur,
//in case there's a child that infinitely repeats, users almost never intend for the insertion point of a new child to be based on a SUPER long value like that so we clip it and assume the most recently-added child's endTime should be used instead.
i,
offset;
if (_isString(position) && (isNaN(position) || position in labels)) {
//if the string is a number like "1", check to see if there's a label with that name, otherwise interpret it as a number (absolute value).
i = position.charAt(0);
if (i === "<" || i === ">") {
return (i === "<" ? recent._start : recent.endTime(recent._repeat >= 0)) + (parseFloat(position.substr(1)) || 0);
}
i = position.indexOf("=");
if (i < 0) {
position in labels || (labels[position] = clippedDuration);
return labels[position];
}
offset = +(position.charAt(i - 1) + position.substr(i + 1));
return i > 1 ? _parsePosition(animation, position.substr(0, i - 1)) + offset : clippedDuration + offset;
}
return position == null ? clippedDuration : +position;
},
_conditionalReturn = function _conditionalReturn(value, func) {
return value || value === 0 ? func(value) : func;
},
_clamp = function _clamp(min, max, value) {
return value < min ? min : value > max ? max : value;
},
getUnit = function getUnit(value) {
return (value = (value + "").substr((parseFloat(value) + "").length)) && isNaN(value) ? value : "";
},
// note: protect against padded numbers as strings, like "100.100". That shouldn't return "00" as the unit. If it's numeric, return no unit.
clamp = function clamp(min, max, value) {
return _conditionalReturn(value, function (v) {
return _clamp(min, max, v);
});
},
_slice = [].slice,
_isArrayLike = function _isArrayLike(value, nonEmpty) {
return value && _isObject(value) && "length" in value && (!nonEmpty && !value.length || value.length - 1 in value && _isObject(value[0])) && !value.nodeType && value !== _win;
},
_flatten = function _flatten(ar, leaveStrings, accumulator) {
if (accumulator === void 0) {
accumulator = [];
}
return ar.forEach(function (value) {
var _accumulator;
return _isString(value) && !leaveStrings || _isArrayLike(value, 1) ? (_accumulator = accumulator).push.apply(_accumulator, toArray(value)) : accumulator.push(value);
}) || accumulator;
},
//takes any value and returns an array. If it's a string (and leaveStrings isn't true), it'll use document.querySelectorAll() and convert that to an array. It'll also accept iterables like jQuery objects.
toArray = function toArray(value, leaveStrings) {
return _isString(value) && !leaveStrings && (_coreInitted || !_wake()) ? _slice.call(_doc.querySelectorAll(value), 0) : _isArray(value) ? _flatten(value, leaveStrings) : _isArrayLike(value) ? _slice.call(value, 0) : value ? [value] : [];
},
shuffle = function shuffle(a) {
return a.sort(function () {
return .5 - Math.random();
});
},
// alternative that's a bit faster and more reliably diverse but bigger: for (let j, v, i = a.length; i; j = Math.floor(Math.random() * i), v = a[--i], a[i] = a[j], a[j] = v); return a;
//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length, each}. Returns a function that expects the following parameters: index, target, array. Recognizes the following
distribute = function distribute(v) {
if (_isFunction(v)) {
return v;
}
var vars = _isObject(v) ? v : {
each: v
},
//n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all.
ease = _parseEase(vars.ease),
from = vars.from || 0,
base = parseFloat(vars.base) || 0,
cache = {},
isDecimal = from > 0 && from < 1,
ratios = isNaN(from) || isDecimal,
axis = vars.axis,
ratioX = from,
ratioY = from;
if (_isString(from)) {
ratioX = ratioY = {
center: .5,
edges: .5,
end: 1
}[from] || 0;
} else if (!isDecimal && ratios) {
ratioX = from[0];
ratioY = from[1];
}
return function (i, target, a) {
var l = (a || vars).length,
distances = cache[l],
originX,
originY,
x,
y,
d,
j,
max,
min,
wrapAt;
if (!distances) {
wrapAt = vars.grid === "auto" ? 0 : (vars.grid || [1, _bigNum])[1];
if (!wrapAt) {
max = -_bigNum;
while (max < (max = a[wrapAt++].getBoundingClientRect().left) && wrapAt < l) {}
wrapAt--;
}
distances = cache[l] = [];
originX = ratios ? Math.min(wrapAt, l) * ratioX - .5 : from % wrapAt;
originY = ratios ? l * ratioY / wrapAt - .5 : from / wrapAt | 0;
max = 0;
min = _bigNum;
for (j = 0; j < l; j++) {
x = j % wrapAt - originX;
y = originY - (j / wrapAt | 0);
distances[j] = d = !axis ? _sqrt(x * x + y * y) : Math.abs(axis === "y" ? y : x);
d > max && (max = d);
d < min && (min = d);
}
from === "random" && shuffle(distances);
distances.max = max - min;
distances.min = min;
distances.v = l = (parseFloat(vars.amount) || parseFloat(vars.each) * (wrapAt > l ? l - 1 : !axis ? Math.max(wrapAt, l / wrapAt) : axis === "y" ? l / wrapAt : wrapAt) || 0) * (from === "edges" ? -1 : 1);
distances.b = l < 0 ? base - l : base;
distances.u = getUnit(vars.amount || vars.each) || 0; //unit
ease = ease && l < 0 ? _invertEase(ease) : ease;
}
l = (distances[i] - distances.min) / distances.max || 0;
return _round(distances.b + (ease ? ease(l) : l) * distances.v) + distances.u; //round in order to work around floating point errors
};
},
_roundModifier = function _roundModifier(v) {
//pass in 0.1 get a function that'll round to the nearest tenth, or 5 to round to the closest 5, or 0.001 to the closest 1000th, etc.
var p = v < 1 ? Math.pow(10, (v + "").length - 2) : 1; //to avoid floating point math errors (like 24 * 0.1 == 2.4000000000000004), we chop off at a specific number of decimal places (much faster than toFixed()
return function (raw) {
return Math.floor(Math.round(parseFloat(raw) / v) * v * p) / p + (_isNumber(raw) ? 0 : getUnit(raw));
};
},
snap = function snap(snapTo, value) {
var isArray = _isArray(snapTo),
radius,
is2D;
if (!isArray && _isObject(snapTo)) {
radius = isArray = snapTo.radius || _bigNum;
if (snapTo.values) {
snapTo = toArray(snapTo.values);
if (is2D = !_isNumber(snapTo[0])) {
radius *= radius; //performance optimization so we don't have to Math.sqrt() in the loop.
}
} else {
snapTo = _roundModifier(snapTo.increment);
}
}
return _conditionalReturn(value, !isArray ? _roundModifier(snapTo) : _isFunction(snapTo) ? function (raw) {
is2D = snapTo(raw);
return Math.abs(is2D - raw) <= radius ? is2D : raw;
} : function (raw) {
var x = parseFloat(is2D ? raw.x : raw),
y = parseFloat(is2D ? raw.y : 0),
min = _bigNum,
closest = 0,
i = snapTo.length,
dx,
dy;
while (i--) {
if (is2D) {
dx = snapTo[i].x - x;
dy = snapTo[i].y - y;
dx = dx * dx + dy * dy;
} else {
dx = Math.abs(snapTo[i] - x);
}
if (dx < min) {
min = dx;
closest = i;
}
}
closest = !radius || min <= radius ? snapTo[closest] : raw;
return is2D || closest === raw || _isNumber(raw) ? closest : closest + getUnit(raw);
});
},
random = function random(min, max, roundingIncrement, returnFunction) {
return _conditionalReturn(_isArray(min) ? !max : roundingIncrement === true ? !!(roundingIncrement = 0) : !returnFunction, function () {
return _isArray(min) ? min[~~(Math.random() * min.length)] : (roundingIncrement = roundingIncrement || 1e-5) && (returnFunction = roundingIncrement < 1 ? Math.pow(10, (roundingIncrement + "").length - 2) : 1) && Math.floor(Math.round((min + Math.random() * (max - min)) / roundingIncrement) * roundingIncrement * returnFunction) / returnFunction;
});
},
pipe = function pipe() {
for (var _len = arguments.length, functions = new Array(_len), _key = 0; _key < _len; _key++) {
functions[_key] = arguments[_key];
}
return function (value) {
return functions.reduce(function (v, f) {
return f(v);
}, value);
};
},
unitize = function unitize(func, unit) {
return function (value) {
return func(parseFloat(value)) + (unit || getUnit(value));
};
},
normalize = function normalize(min, max, value) {
return mapRange(min, max, 0, 1, value);
},
_wrapArray = function _wrapArray(a, wrapper, value) {
return _conditionalReturn(value, function (index) {
return a[~~wrapper(index)];
});
},
wrap = function wrap(min, max, value) {
// NOTE: wrap() CANNOT be an arrow function! A very odd compiling bug causes problems (unrelated to GSAP).
var range = max - min;
return _isArray(min) ? _wrapArray(min, wrap(0, min.length), max) : _conditionalReturn(value, function (value) {
return (range + (value - min) % range) % range + min;
});
},
wrapYoyo = function wrapYoyo(min, max, value) {
var range = max - min,
total = range * 2;
return _isArray(min) ? _wrapArray(min, wrapYoyo(0, min.length - 1), max) : _conditionalReturn(value, function (value) {
value = (total + (value - min) % total) % total || 0;
return min + (value > range ? total - value : value);
});
},
_replaceRandom = function _replaceRandom(value) {
//replaces all occurrences of random(...) in a string with the calculated random value. can be a range like random(-100, 100, 5) or an array like random([0, 100, 500])
var prev = 0,
s = "",
i,
nums,
end,
isArray;
while (~(i = value.indexOf("random(", prev))) {
end = value.indexOf(")", i);
isArray = value.charAt(i + 7) === "[";
nums = value.substr(i + 7, end - i - 7).match(isArray ? _delimitedValueExp : _strictNumExp);
s += value.substr(prev, i - prev) + random(isArray ? nums : +nums[0], isArray ? 0 : +nums[1], +nums[2] || 1e-5);
prev = end + 1;
}
return s + value.substr(prev, value.length - prev);
},
mapRange = function mapRange(inMin, inMax, outMin, outMax, value) {
var inRange = inMax - inMin,
outRange = outMax - outMin;
return _conditionalReturn(value, function (value) {
return outMin + ((value - inMin) / inRange * outRange || 0);
});
},
interpolate = function interpolate(start, end, progress, mutate) {
var func = isNaN(start + end) ? 0 : function (p) {
return (1 - p) * start + p * end;
};
if (!func) {
var isString = _isString(start),
master = {},
p,
i,
interpolators,
l,
il;
progress === true && (mutate = 1) && (progress = null);
if (isString) {
start = {
p: start
};
end = {
p: end
};
} else if (_isArray(start) && !_isArray(end)) {
interpolators = [];
l = start.length;
il = l - 2;
for (i = 1; i < l; i++) {
interpolators.push(interpolate(start[i - 1], start[i])); //build the interpolators up front as a performance optimization so that when the function is called many times, it can just reuse them.
}
l--;
func = function func(p) {
p *= l;
var i = Math.min(il, ~~p);
return interpolators[i](p - i);
};
progress = end;
} else if (!mutate) {
start = _merge(_isArray(start) ? [] : {}, start);
}
if (!interpolators) {
for (p in end) {
_addPropTween.call(master, start, p, "get", end[p]);
}
func = function func(p) {
return _renderPropTweens(p, master) || (isString ? start.p : start);
};
}
}
return _conditionalReturn(progress, func);
},
_getLabelInDirection = function _getLabelInDirection(timeline, fromTime, backward) {
//used for nextLabel() and previousLabel()
var labels = timeline.labels,
min = _bigNum,
p,
distance,
label;
for (p in labels) {
distance = labels[p] - fromTime;
if (distance < 0 === !!backward && distance && min > (distance = Math.abs(distance))) {
label = p;
min = distance;
}
}
return label;
},
_callback = function _callback(animation, type, executeLazyFirst) {
var v = animation.vars,
callback = v[type],
params,
scope;
if (!callback) {
return;
}
params = v[type + "Params"];
scope = v.callbackScope || animation;
executeLazyFirst && _lazyTweens.length && _lazyRender(); //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onUpdate on a timeline that reports/checks tweened values.
return params ? callback.apply(scope, params) : callback.call(scope);
},
_interrupt = function _interrupt(animation) {
_removeFromParent(animation);
animation.progress() < 1 && _callback(animation, "onInterrupt");
return animation;
},
_quickTween,
_createPlugin = function _createPlugin(config) {
config = !config.name && config["default"] || config; //UMD packaging wraps things oddly, so for example MotionPathHelper becomes {MotionPathHelper:MotionPathHelper, default:MotionPathHelper}.
var name = config.name,
isFunc = _isFunction(config),
Plugin = name && !isFunc && config.init ? function () {
this._props = [];
} : config,
//in case someone passes in an object that's not a plugin, like CustomEase
instanceDefaults = {
init: _emptyFunc,
render: _renderPropTweens,
add: _addPropTween,
kill: _killPropTweensOf,
modifier: _addPluginModifier,
rawVars: 0
},
statics = {
targetTest: 0,
get: 0,
getSetter: _getSetter,
aliases: {},
register: 0
};
_wake();
if (config !== Plugin) {
if (_plugins[name]) {
return;
}
_setDefaults(Plugin, _setDefaults(_copyExcluding(config, instanceDefaults), statics)); //static methods
_merge(Plugin.prototype, _merge(instanceDefaults, _copyExcluding(config, statics))); //instance methods
_plugins[Plugin.prop = name] = Plugin;
if (config.targetTest) {
_harnessPlugins.push(Plugin);
_reservedProps[name] = 1;
}
name = (name === "css" ? "CSS" : name.charAt(0).toUpperCase() + name.substr(1)) + "Plugin"; //for the global name. "motionPath" should become MotionPathPlugin
}
_addGlobal(name, Plugin);
config.register && config.register(gsap, Plugin, PropTween);
},
/*
* --------------------------------------------------------------------------------------
* COLORS
* --------------------------------------------------------------------------------------
*/
_255 = 255,
_colorLookup = {
aqua: [0, _255, _255],
lime: [0, _255, 0],
silver: [192, 192, 192],
black: [0, 0, 0],
maroon: [128, 0, 0],
teal: [0, 128, 128],
blue: [0, 0, _255],
navy: [0, 0, 128],
white: [_255, _255, _255],
olive: [128, 128, 0],
yellow: [_255, _255, 0],
orange: [_255, 165, 0],
gray: [128, 128, 128],
purple: [128, 0, 128],
green: [0, 128, 0],
red: [_255, 0, 0],
pink: [_255, 192, 203],
cyan: [0, _255, _255],
transparent: [_255, _255, _255, 0]
},
_hue = function _hue(h, m1, m2) {
h = h < 0 ? h + 1 : h > 1 ? h - 1 : h;
return (h * 6 < 1 ? m1 + (m2 - m1) * h * 6 : h < .5 ? m2 : h * 3 < 2 ? m1 + (m2 - m1) * (2 / 3 - h) * 6 : m1) * _255 + .5 | 0;
},
splitColor = function splitColor(v, toHSL, forceAlpha) {
var a = !v ? _colorLookup.black : _isNumber(v) ? [v >> 16, v >> 8 & _255, v & _255] : 0,
r,
g,
b,
h,
s,
l,
max,
min,
d,
wasHSL;
if (!a) {
if (v.substr(-1) === ",") {
//sometimes a trailing comma is included and we should chop it off (typically from a comma-delimited list of values like a textShadow:"2px 2px 2px blue, 5px 5px 5px rgb(255,0,0)" - in this example "blue," has a trailing comma. We could strip it out inside parseComplex() but we'd need to do it to the beginning and ending values plus it wouldn't provide protection from other potential scenarios like if the user passes in a similar value.
v = v.substr(0, v.length - 1);
}
if (_colorLookup[v]) {
a = _colorLookup[v];
} else if (v.charAt(0) === "#") {
if (v.length === 4) {
//for shorthand like #9F0
r = v.charAt(1);
g = v.charAt(2);
b = v.charAt(3);
v = "#" + r + r + g + g + b + b;
}
v = parseInt(v.substr(1), 16);
a = [v >> 16, v >> 8 & _255, v & _255];
} else if (v.substr(0, 3) === "hsl") {
a = wasHSL = v.match(_strictNumExp);
if (!toHSL) {
h = +a[0] % 360 / 360;
s = +a[1] / 100;
l = +a[2] / 100;
g = l <= .5 ? l * (s + 1) : l + s - l * s;
r = l * 2 - g;
a.length > 3 && (a[3] *= 1); //cast as number
a[0] = _hue(h + 1 / 3, r, g);
a[1] = _hue(h, r, g);
a[2] = _hue(h - 1 / 3, r, g);
} else if (~v.indexOf("=")) {
//if relative values are found, just return the raw strings with the relative prefixes in place.
a = v.match(_numExp);
forceAlpha && a.length < 4 && (a[3] = 1);
return a;
}
} else {
a = v.match(_strictNumExp) || _colorLookup.transparent;
}
a = a.map(Number);
}
if (toHSL && !wasHSL) {
r = a[0] / _255;
g = a[1] / _255;
b = a[2] / _255;
max = Math.max(r, g, b);
min = Math.min(r, g, b);
l = (max + min) / 2;
if (max === min) {
h = s = 0;
} else {
d = max - min;
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
h = max === r ? (g - b) / d + (g < b ? 6 : 0) : max === g ? (b - r) / d + 2 : (r - g) / d + 4;
h *= 60;
}
a[0] = ~~(h + .5);
a[1] = ~~(s * 100 + .5);
a[2] = ~~(l * 100 + .5);
}
forceAlpha && a.length < 4 && (a[3] = 1);
return a;
},
_colorOrderData = function _colorOrderData(v) {
// strips out the colors from the string, finds all the numeric slots (with units) and returns an array of those. The Array also has a "c" property which is an Array of the index values where the colors belong. This is to help work around issues where there's a mis-matched order of color/numeric data like drop-shadow(#f00 0px 1px 2px) and drop-shadow(0x 1px 2px #f00). This is basically a helper function used in _formatColors()
var values = [],
c = [],
i = -1;
v.split(_colorExp).forEach(function (v) {
var a = v.match(_numWithUnitExp) || [];
values.push.apply(values, a);
c.push(i += a.length + 1);
});
values.c = c;
return values;
},
_formatColors = function _formatColors(s, toHSL, orderMatchData) {
var result = "",
colors = (s + result).match(_colorExp),
type = toHSL ? "hsla(" : "rgba(",
i = 0,
c,
shell,
d,
l;
if (!colors) {
return s;
}
colors = colors.map(function (color) {
return (color = splitColor(color, toHSL, 1)) && type + (toHSL ? color[0] + "," + color[1] + "%," + color[2] + "%," + color[3] : color.join(",")) + ")";
});
if (orderMatchData) {
d = _colorOrderData(s);
c = orderMatchData.c;
if (c.join(result) !== d.c.join(result)) {
shell = s.replace(_colorExp, "1").split(_numWithUnitExp);
l = shell.length - 1;
for (; i < l; i++) {
result += shell[i] + (~c.indexOf(i) ? colors.shift() || type + "0,0,0,0)" : (d.length ? d : colors.length ? colors : orderMatchData).shift());
}
}
}
if (!shell) {
shell = s.split(_colorExp);
l = shell.length - 1;
for (; i < l; i++) {
result += shell[i] + colors[i];
}
}
return result + shell[l];
},
_colorExp = function () {
var s = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b",
//we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.,
p;
for (p in _colorLookup) {
s += "|" + p + "\\b";
}
return new RegExp(s + ")", "gi");
}(),
_hslExp = /hsl[a]?\(/,
_colorStringFilter = function _colorStringFilter(a) {
var combined = a.join(" "),
toHSL;
_colorExp.lastIndex = 0;
if (_colorExp.test(combined)) {
toHSL = _hslExp.test(combined);
a[1] = _formatColors(a[1], toHSL);
a[0] = _formatColors(a[0], toHSL, _colorOrderData(a[1])); // make sure the order of numbers/colors match with the END value.
return true;
}
},
/*
* --------------------------------------------------------------------------------------
* TICKER
* --------------------------------------------------------------------------------------
*/
_tickerActive,
_ticker = function () {
var _getTime = Date.now,
_lagThreshold = 500,
_adjustedLag = 33,
_startTime = _getTime(),
_lastUpdate = _startTime,
_gap = 1000 / 240,
_nextTime = _gap,
_listeners = [],
_id,
_req,
_raf,
_self,
_delta,
_i,
_tick = function _tick(v) {
var elapsed = _getTime() - _lastUpdate,
manual = v === true,
overlap,
dispatch,
time,
frame;
elapsed > _lagThreshold && (_startTime += elapsed - _adjustedLag);
_lastUpdate += elapsed;
time = _lastUpdate - _startTime;
overlap = time - _nextTime;
if (overlap > 0 || manual) {
frame = ++_self.frame;
_delta = time - _self.time * 1000;
_self.time = time = time / 1000;
_nextTime += overlap + (overlap >= _gap ? 4 : _gap - overlap);
dispatch = 1;
}
manual || (_id = _req(_tick)); //make sure the request is made before we dispatch the "tick" event so that timing is maintained. Otherwise, if processing the "tick" requires a bunch of time (like 15ms) and we're using a setTimeout() that's based on 16.7ms, it'd technically take 31.7ms between frames otherwise.
if (dispatch) {
for (_i = 0; _i < _listeners.length; _i++) {
// use _i and check _listeners.length instead of a variable because a listener could get removed during the loop, and if that happens to an element less than the current index, it'd throw things off in the loop.
_listeners[_i](time, _delta, frame, v);
}
}
};
_self = {
time: 0,
frame: 0,
tick: function tick() {
_tick(true);
},
deltaRatio: function deltaRatio(fps) {
return _delta / (1000 / (fps || 60));
},
wake: function wake() {
if (_coreReady) {
if (!_coreInitted && _windowExists()) {
_win = _coreInitted = window;
_doc = _win.document || {};
_globals.gsap = gsap;
(_win.gsapVersions || (_win.gsapVersions = [])).push(gsap.version);
_install(_installScope || _win.GreenSockGlobals || !_win.gsap && _win || {});
_raf = _win.requestAnimationFrame;
}
_id && _self.sleep();
_req = _raf || function (f) {
return setTimeout(f, _nextTime - _self.time * 1000 + 1 | 0);
};
_tickerActive = 1;
_tick(2);
}
},
sleep: function sleep() {
(_raf ? _win.cancelAnimationFrame : clearTimeout)(_id);
_tickerActive = 0;
_req = _emptyFunc;
},
lagSmoothing: function lagSmoothing(threshold, adjustedLag) {
_lagThreshold = threshold || 1 / _tinyNum; //zero should be interpreted as basically unlimited
_adjustedLag = Math.min(adjustedLag, _lagThreshold, 0);
},
fps: function fps(_fps) {
_gap = 1000 / (_fps || 240);
_nextTime = _self.time * 1000 + _gap;
},
add: function add(callback) {
_listeners.indexOf(callback) < 0 && _listeners.push(callback);
_wake();
},
remove: function remove(callback) {
var i;
~(i = _listeners.indexOf(callback)) && _listeners.splice(i, 1) && _i >= i && _i--;
},
_listeners: _listeners
};
return _self;
}(),
_wake = function _wake() {
return !_tickerActive && _ticker.wake();
},
//also ensures the core classes are initialized.
/*
* -------------------------------------------------
* EASING
* -------------------------------------------------
*/
_easeMap = {},
_customEaseExp = /^[\d.\-M][\d.\-,\s]/,
_quotesExp = /["']/g,
_parseObjectInString = function _parseObjectInString(value) {
//takes a string like "{wiggles:10, type:anticipate})" and turns it into a real object. Notice it ends in ")" and includes the {} wrappers. This is because we only use this function for parsing ease configs and prioritized optimization rather than reusability.
var obj = {},
split = value.substr(1, value.length - 3).split(":"),
key = split[0],
i = 1,
l = split.length,
index,
val,
parsedVal;
for (; i < l; i++) {
val = split[i];
index = i !== l - 1 ? val.lastIndexOf(",") : val.length;
parsedVal = val.substr(0, index);
obj[key] = isNaN(parsedVal) ? parsedVal.replace(_quotesExp, "").trim() : +parsedVal;
key = val.substr(index + 1).trim();
}
return obj;
},
_valueInParentheses = function _valueInParentheses(value) {
var open = value.indexOf("(") + 1,
close = value.indexOf(")"),
nested = value.indexOf("(", open);
return value.substring(open, ~nested && nested < close ? value.indexOf(")", close + 1) : close);
},
_configEaseFromString = function _configEaseFromString(name) {
//name can be a string like "elastic.out(1,0.5)", and pass in _easeMap as obj and it'll parse it out and call the actual function like _easeMap.Elastic.easeOut.config(1,0.5). It will also parse custom ease strings as long as CustomEase is loaded and registered (internally as _easeMap._CE).
var split = (name + "").split("("),
ease = _easeMap[split[0]];
return ease && split.length > 1 && ease.config ? ease.config.apply(null, ~name.indexOf("{") ? [_parseObjectInString(split[1])] : _valueInParentheses(name).split(",").map(_numericIfPossible)) : _easeMap._CE && _customEaseExp.test(name) ? _easeMap._CE("", name) : ease;
},
_invertEase = function _invertEase(ease) {
return function (p) {
return 1 - ease(1 - p);
};
},
// allow yoyoEase to be set in children and have those affected when the parent/ancestor timeline yoyos.
_propagateYoyoEase = function _propagateYoyoEase(timeline, isYoyo) {
var child = timeline._first,
ease;
while (child) {
if (child instanceof Timeline) {
_propagateYoyoEase(child, isYoyo);
} else if (child.vars.yoyoEase && (!child._yoyo || !child._repeat) && child._yoyo !== isYoyo) {
if (child.timeline) {
_propagateYoyoEase(child.timeline, isYoyo);
} else {
ease = child._ease;
child._ease = child._yEase;
child._yEase = ease;
child._yoyo = isYoyo;
}
}
child = child._next;
}
},
_parseEase = function _parseEase(ease, defaultEase) {
return !ease ? defaultEase : (_isFunction(ease) ? ease : _easeMap[ease] || _configEaseFromString(ease)) || defaultEase;
},
_insertEase = function _insertEase(names, easeIn, easeOut, easeInOut) {
if (easeOut === void 0) {
easeOut = function easeOut(p) {
return 1 - easeIn(1 - p);
};
}
if (easeInOut === void 0) {
easeInOut = function easeInOut(p) {
return p < .5 ? easeIn(p * 2) / 2 : 1 - easeIn((1 - p) * 2) / 2;
};
}
var ease = {
easeIn: easeIn,
easeOut: easeOut,
easeInOut: easeInOut
},
lowercaseName;
_forEachName(names, function (name) {
_easeMap[name] = _globals[name] = ease;
_easeMap[lowercaseName = name.toLowerCase()] = easeOut;
for (var p in ease) {
_easeMap[lowercaseName + (p === "easeIn" ? ".in" : p === "easeOut" ? ".out" : ".inOut")] = _easeMap[name + "." + p] = ease[p];
}
});
return ease;
},
_easeInOutFromOut = function _easeInOutFromOut(easeOut) {
return function (p) {
return p < .5 ? (1 - easeOut(1 - p * 2)) / 2 : .5 + easeOut((p - .5) * 2) / 2;
};
},
_configElastic = function _configElastic(type, amplitude, period) {
var p1 = amplitude >= 1 ? amplitude : 1,
//note: if amplitude is < 1, we simply adjust the period for a more natural feel. Otherwise the math doesn't work right and the curve starts at 1.
p2 = (period || (type ? .3 : .45)) / (amplitude < 1 ? amplitude : 1),
p3 = p2 / _2PI * (Math.asin(1 / p1) || 0),
easeOut = function easeOut(p) {
return p === 1 ? 1 : p1 * Math.pow(2, -10 * p) * _sin((p - p3) * p2) + 1;
},
ease = type === "out" ? easeOut : type === "in" ? function (p) {
return 1 - easeOut(1 - p);
} : _easeInOutFromOut(easeOut);
p2 = _2PI / p2; //precalculate to optimize
ease.config = function (amplitude, period) {
return _configElastic(type, amplitude, period);
};
return ease;
},
_configBack = function _configBack(type, overshoot) {
if (overshoot === void 0) {
overshoot = 1.70158;
}
var easeOut = function easeOut(p) {
return p ? --p * p * ((overshoot + 1) * p + overshoot) + 1 : 0;
},
ease = type === "out" ? easeOut : type === "in" ? function (p) {
return 1 - easeOut(1 - p);
} : _easeInOutFromOut(easeOut);
ease.config = function (overshoot) {
return _configBack(type, overshoot);
};
return ease;
}; // a cheaper (kb and cpu) but more mild way to get a parameterized weighted ease by feeding in a value between -1 (easeIn) and 1 (easeOut) where 0 is linear.
// _weightedEase = ratio => {
// let y = 0.5 + ratio / 2;
// return p => (2 * (1 - p) * p * y + p * p);
// },
// a stronger (but more expensive kb/cpu) parameterized weighted ease that lets you feed in a value between -1 (easeIn) and 1 (easeOut) where 0 is linear.
// _weightedEaseStrong = ratio => {
// ratio = .5 + ratio / 2;
// let o = 1 / 3 * (ratio < .5 ? ratio : 1 - ratio),
// b = ratio - o,
// c = ratio + o;
// return p => p === 1 ? p : 3 * b * (1 - p) * (1 - p) * p + 3 * c * (1 - p) * p * p + p * p * p;
// };
_forEachName("Linear,Quad,Cubic,Quart,Quint,Strong", function (name, i) {
var power = i < 5 ? i + 1 : i;
_insertEase(name + ",Power" + (power - 1), i ? function (p) {
return Math.pow(p, power);
} : function (p) {
return p;
}, function (p) {
return 1 - Math.pow(1 - p, power);
}, function (p) {
return p < .5 ? Math.pow(p * 2, power) / 2 : 1 - Math.pow((1 - p) * 2, power) / 2;
});
});
_easeMap.Linear.easeNone = _easeMap.none = _easeMap.Linear.easeIn;
_insertEase("Elastic", _configElastic("in"), _configElastic("out"), _configElastic());
(function (n, c) {
var n1 = 1 / c,
n2 = 2 * n1,
n3 = 2.5 * n1,
easeOut = function easeOut(p) {
return p < n1 ? n * p * p : p < n2 ? n * Math.pow(p - 1.5 / c, 2) + .75 : p < n3 ? n * (p -= 2.25 / c) * p + .9375 : n * Math.pow(p - 2.625 / c, 2) + .984375;
};
_insertEase("Bounce", function (p) {
return 1 - easeOut(1 - p);
}, easeOut);
})(7.5625, 2.75);
_insertEase("Expo", function (p) {
return p ? Math.pow(2, 10 * (p - 1)) : 0;
});
_insertEase("Circ", function (p) {
return -(_sqrt(1 - p * p) - 1);
});
_insertEase("Sine", function (p) {
return p === 1 ? 1 : -_cos(p * _HALF_PI) + 1;
});
_insertEase("Back", _configBack("in"), _configBack("out"), _configBack());
_easeMap.SteppedEase = _easeMap.steps = _globals.SteppedEase = {
config: function config(steps, immediateStart) {
if (steps === void 0) {
steps = 1;
}
var p1 = 1 / steps,
p2 = steps + (immediateStart ? 0 : 1),
p3 = immediateStart ? 1 : 0,
max = 1 - _tinyNum;
return function (p) {
return ((p2 * _clamp(0, max, p) | 0) + p3) * p1;
};
}
};
_defaults.ease = _easeMap["quad.out"];
_forEachName("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", function (name) {
return _callbackNames += name + "," + name + "Params,";
});
/*
* --------------------------------------------------------------------------------------
* CACHE
* --------------------------------------------------------------------------------------
*/
var GSCache = function GSCache(target, harness) {
this.id = _gsID++;
target._gsap = this;
this.target = target;
this.harness = harness;
this.get = harness ? harness.get : _getProperty;
this.set = harness ? harness.getSetter : _getSetter;
};
/*
* --------------------------------------------------------------------------------------
* ANIMATION
* --------------------------------------------------------------------------------------
*/
var Animation = /*#__PURE__*/function () {
function Animation(vars, time) {
var parent = vars.parent || _globalTimeline;
this.vars = vars;
this._delay = +vars.delay || 0;
if (this._repeat = vars.repeat || 0) {
this._rDelay = vars.repeatDelay || 0;
this._yoyo = !!vars.yoyo || !!vars.yoyoEase;
}
this._ts = 1;
_setDuration(this, +vars.duration, 1, 1);
this.data = vars.data;
_tickerActive || _ticker.wake();
parent && _addToTimeline(parent, this, time || time === 0 ? time : parent._time, 1);
vars.reversed && this.reverse();
vars.paused && this.paused(true);
}
var _proto = Animation.prototype;
_proto.delay = function delay(value) {
if (value || value === 0) {
this.parent && this.parent.smoothChildTiming && this.startTime(this._start + value - this._delay);
this._delay = value;
return this;
}
return this._delay;
};
_proto.duration = function duration(value) {
return arguments.length ? this.totalDuration(this._repeat > 0 ? value + (value + this._rDelay) * this._repeat : value) : this.totalDuration() && this._dur;
};
_proto.totalDuration = function totalDuration(value) {
if (!arguments.length) {
return this._tDur;
}
this._dirty = 0;
return _setDuration(this, this._repeat < 0 ? value : (value - this._repeat * this._rDelay) / (this._repeat + 1));
};
_proto.totalTime = function totalTime(_totalTime, suppressEvents) {
_wake();
if (!arguments.length) {
return this._tTime;
}
var parent = this._dp;
if (parent && parent.smoothChildTiming && this._ts) {
_alignPlayhead(this, _totalTime); //in case any of the ancestor timelines had completed but should now be enabled, we should reset their totalTime() which will also ensure that they're lined up properly and enabled. Skip for animations that are on the root (wasteful). Example: a TimelineLite.exportRoot() is performed when there's a paused tween on the root, the export will not complete until that tween is unpaused, but imagine a child gets restarted later, after all [unpaused] tweens have completed. The start of that child would get pushed out, but one of the ancestors may have completed.
while (parent.parent) {
if (parent.parent._time !== parent._start + (parent._ts >= 0 ? parent._tTime / parent._ts : (parent.totalDuration() - parent._tTime) / -parent._ts)) {
parent.totalTime(parent._tTime, true);
}
parent = parent.parent;
}
if (!this.parent && this._dp.autoRemoveChildren && (this._ts > 0 && _totalTime < this._tDur || this._ts < 0 && _totalTime > 0 || !this._tDur && !_totalTime)) {
//if the animation doesn't have a parent, put it back into its last parent (recorded as _dp for exactly cases like this). Limit to parents with autoRemoveChildren (like globalTimeline) so that if the user manually removes an animation from a timeline and then alters its playhead, it doesn't get added back in.
_addToTimeline(this._dp, this, this._start - this._delay);
}
}
if (this._tTime !== _totalTime || !this._dur && !suppressEvents || this._initted && Math.abs(this._zTime) === _tinyNum || !_totalTime && !this._initted && (this.add || this._ptLookup)) {
// check for _ptLookup on a Tween instance to ensure it has actually finished being instantiated, otherwise if this.reverse() gets called in the Animation constructor, it could trigger a render() here even though the _targets weren't populated, thus when _init() is called there won't be any PropTweens (it'll act like the tween is non-functional)
this._ts || (this._pTime = _totalTime); // otherwise, if an animation is paused, then the playhead is moved back to zero, then resumed, it'd revert back to the original time at the pause
_lazySafeRender(this, _totalTime, suppressEvents);
}
return this;
};
_proto.time = function time(value, suppressEvents) {
return arguments.length ? this.totalTime(Math.min(this.totalDuration(), value + _elapsedCycleDuration(this)) % this._dur || (value ? this._dur : 0), suppressEvents) : this._time; // note: if the modulus results in 0, the playhead could be exactly at the end or the beginning, and we always defer to the END with a non-zero value, otherwise if you set the time() to the very end (duration()), it would render at the START!
};
_proto.totalProgress = function totalProgress(value, suppressEvents) {
return arguments.length ? this.totalTime(this.totalDuration() * value, suppressEvents) : this.totalDuration() ? Math.min(1, this._tTime / this._tDur) : this.ratio;
};
_proto.progress = function progress(value, suppressEvents) {
return arguments.length ? this.totalTime(this.duration() * (this._yoyo && !(this.iteration() & 1) ? 1 - value : value) + _elapsedCycleDuration(this), suppressEvents) : this.duration() ? Math.min(1, this._time / this._dur) : this.ratio;
};
_proto.iteration = function iteration(value, suppressEvents) {
var cycleDuration = this.duration() + this._rDelay;
return arguments.length ? this.totalTime(this._time + (value - 1) * cycleDuration, suppressEvents) : this._repeat ? _animationCycle(this._tTime, cycleDuration) + 1 : 1;
} // potential future addition:
// isPlayingBackwards() {
// let animation = this,
// orientation = 1; // 1 = forward, -1 = backward
// while (animation) {
// orientation *= animation.reversed() || (animation.repeat() && !(animation.iteration() & 1)) ? -1 : 1;
// animation = animation.parent;
// }
// return orientation < 0;
// }
;
_proto.timeScale = function timeScale(value) {
if (!arguments.length) {
return this._rts === -_tinyNum ? 0 : this._rts; // recorded timeScale. Special case: if someone calls reverse() on an animation with timeScale of 0, we assign it -_tinyNum to remember it's reversed.
}
if (this._rts === value) {
return this;
}
var tTime = this.parent && this._ts ? _parentToChildTotalTime(this.parent._time, this) : this._tTime; // make sure to do the parentToChildTotalTime() BEFORE setting the new _ts because the old one must be used in that calculation.
// prioritize rendering where the parent's playhead lines up instead of this._tTime because there could be a tween that's animating another tween's timeScale in the same rendering loop (same parent), thus if the timeScale tween renders first, it would alter _start BEFORE _tTime was set on that tick (in the rendering loop), effectively freezing it until the timeScale tween finishes.
this._rts = +value || 0;
this._ts = this._ps || value === -_tinyNum ? 0 : this._rts; // _ts is the functional timeScale which would be 0 if the animation is paused.
return _recacheAncestors(this.totalTime(_clamp(-this._delay, this._tDur, tTime), true));
};
_proto.paused = function paused(value) {
if (!arguments.length) {
return this._ps;
}
if (this._ps !== value) {
this._ps = value;
if (value) {
this._pTime = this._tTime || Math.max(-this._delay, this.rawTime()); // if the pause occurs during the delay phase, make sure that's factored in when resuming.
this._ts = this._act = 0; // _ts is the functional timeScale, so a paused tween would effectively have a timeScale of 0. We record the "real" timeScale as _rts (recorded time scale)
} else {
_wake();
this._ts = this._rts; //only defer to _pTime (pauseTime) if tTime is zero. Remember, someone could pause() an animation, then scrub the playhead and resume(). If the parent doesn't have smoothChildTiming, we render at the rawTime() because the startTime won't get updated.
this.totalTime(this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, this.progress() === 1 && (this._tTime -= _tinyNum) && Math.abs(this._zTime) !== _tinyNum); // edge case: animation.progress(1).pause().play() wouldn't render again because the playhead is already at the end, but the call to totalTime() below will add it back to its parent...and not remove it again (since removing only happens upon rendering at a new time). Offsetting the _tTime slightly is done simply to cause the final render in totalTime() that'll pop it off its timeline (if autoRemoveChildren is true, of course). Check to make sure _zTime isn't -_tinyNum to avoid an edge case where the playhead is pushed to the end but INSIDE a tween/callback, the timeline itself is paused thus halting rendering and leaving a few unrendered. When resuming, it wouldn't render those otherwise.
}
}
return this;
};
_proto.startTime = function startTime(value) {
if (arguments.length) {
this._start = value;
var parent = this.parent || this._dp;
parent && (parent._sort || !this.parent) && _addToTimeline(parent, this, value - this._delay);
return this;
}
return this._start;
};
_proto.endTime = function endTime(includeRepeats) {
return this._start + (_isNotFalse(includeRepeats) ? this.totalDuration() : this.duration()) / Math.abs(this._ts);
};
_proto.rawTime = function rawTime(wrapRepeats) {
var parent = this.parent || this._dp; // _dp = detatched parent
return !parent ? this._tTime : wrapRepeats && (!this._ts || this._repeat && this._time && this.totalProgress() < 1) ? this._tTime % (this._dur + this._rDelay) : !this._ts ? this._tTime : _parentToChildTotalTime(parent.rawTime(wrapRepeats), this);
};
_proto.globalTime = function globalTime(rawTime) {
var animation = this,
time = arguments.length ? rawTime : animation.rawTime();
while (animation) {
time = animation._start + time / (animation._ts || 1);
animation = animation._dp;
}
return time;
};
_proto.repeat = function repeat(value) {
if (arguments.length) {
this._repeat = value;
return _onUpdateTotalDuration(this);
}
return this._repeat;
};
_proto.repeatDelay = function repeatDelay(value) {
if (arguments.length) {
this._rDelay = value;
return _onUpdateTotalDuration(this);
}
return this._rDelay;
};
_proto.yoyo = function yoyo(value) {
if (arguments.length) {
this._yoyo = value;
return this;
}
return this._yoyo;
};
_proto.seek = function seek(position, suppressEvents) {
return this.totalTime(_parsePosition(this, position), _isNotFalse(suppressEvents));
};
_proto.restart = function restart(includeDelay, suppressEvents) {
return this.play().totalTime(includeDelay ? -this._delay : 0, _isNotFalse(suppressEvents));
};
_proto.play = function play(from, suppressEvents) {
from != null && this.seek(from, suppressEvents);
return this.reversed(false).paused(false);
};
_proto.reverse = function reverse(from, suppressEvents) {
from != null && this.seek(from || this.totalDuration(), suppressEvents);
return this.reversed(true).paused(false);
};
_proto.pause = function pause(atTime, suppressEvents) {
atTime != null && this.seek(atTime, suppressEvents);
return this.paused(true);
};
_proto.resume = function resume() {
return this.paused(false);
};
_proto.reversed = function reversed(value) {
if (arguments.length) {
!!value !== this.reversed() && this.timeScale(-this._rts || (value ? -_tinyNum : 0)); // in case timeScale is zero, reversing would have no effect so we use _tinyNum.
return this;
}
return this._rts < 0;
};
_proto.invalidate = function invalidate() {
this._initted = 0;
this._zTime = -_tinyNum;
return this;
};
_proto.isActive = function isActive() {
var parent = this.parent || this._dp,
start = this._start,
rawTime;
return !!(!parent || this._ts && this._initted && parent.isActive() && (rawTime = parent.rawTime(true)) >= start && rawTime < this.endTime(true) - _tinyNum);
};
_proto.eventCallback = function eventCallback(type, callback, params) {
var vars = this.vars;
if (arguments.length > 1) {
if (!callback) {
delete vars[type];
} else {
vars[type] = callback;
params && (vars[type + "Params"] = params);
type === "onUpdate" && (this._onUpdate = callback);
}
return this;
}
return vars[type];
};
_proto.then = function then(onFulfilled) {
var self = this;
return new Promise(function (resolve) {
var f = _isFunction(onFulfilled) ? onFulfilled : _passThrough,
_resolve = function _resolve() {
var _then = self.then;
self.then = null; // temporarily null the then() method to avoid an infinite loop (see https://github.com/greensock/GSAP/issues/322)
_isFunction(f) && (f = f(self)) && (f.then || f === self) && (self.then = _then);
resolve(f);
self.then = _then;
};
if (self._initted && self.totalProgress() === 1 && self._ts >= 0 || !self._tTime && self._ts < 0) {
_resolve();
} else {
self._prom = _resolve;
}
});
};
_proto.kill = function kill() {
_interrupt(this);
};
return Animation;
}();
_setDefaults(Animation.prototype, {
_time: 0,
_start: 0,
_end: 0,
_tTime: 0,
_tDur: 0,
_dirty: 0,
_repeat: 0,
_yoyo: false,
parent: null,
_initted: false,
_rDelay: 0,
_ts: 1,
_dp: 0,
ratio: 0,
_zTime: -_tinyNum,
_prom: 0,
_ps: false,
_rts: 1
});
/*
* -------------------------------------------------
* TIMELINE
* -------------------------------------------------
*/
var Timeline = /*#__PURE__*/function (_Animation) {
_inheritsLoose(Timeline, _Animation);
function Timeline(vars, time) {
var _this;
if (vars === void 0) {
vars = {};
}
_this = _Animation.call(this, vars, time) || this;
_this.labels = {};
_this.smoothChildTiming = !!vars.smoothChildTiming;
_this.autoRemoveChildren = !!vars.autoRemoveChildren;
_this._sort = _isNotFalse(vars.sortChildren);
_this.parent && _postAddChecks(_this.parent, _assertThisInitialized(_this));
vars.scrollTrigger && _scrollTrigger(_assertThisInitialized(_this), vars.scrollTrigger);
return _this;
}
var _proto2 = Timeline.prototype;
_proto2.to = function to(targets, vars, position) {
new Tween(targets, _parseVars(arguments, 0, this), _parsePosition(this, _isNumber(vars) ? arguments[3] : position));
return this;
};
_proto2.from = function from(targets, vars, position) {
new Tween(targets, _parseVars(arguments, 1, this), _parsePosition(this, _isNumber(vars) ? arguments[3] : position));
return this;
};
_proto2.fromTo = function fromTo(targets, fromVars, toVars, position) {
new Tween(targets, _parseVars(arguments, 2, this), _parsePosition(this, _isNumber(fromVars) ? arguments[4] : position));
return this;
};
_proto2.set = function set(targets, vars, position) {
vars.duration = 0;
vars.parent = this;
_inheritDefaults(vars).repeatDelay || (vars.repeat = 0);
vars.immediateRender = !!vars.immediateRender;
new Tween(targets, vars, _parsePosition(this, position), 1);
return this;
};
_proto2.call = function call(callback, params, position) {
return _addToTimeline(this, Tween.delayedCall(0, callback, params), _parsePosition(this, position));
} //ONLY for backward compatibility! Maybe delete?
;
_proto2.staggerTo = function staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams) {
vars.duration = duration;
vars.stagger = vars.stagger || stagger;
vars.onComplete = onCompleteAll;
vars.onCompleteParams = onCompleteAllParams;
vars.parent = this;
new Tween(targets, vars, _parsePosition(this, position));
return this;
};
_proto2.staggerFrom = function staggerFrom(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams) {
vars.runBackwards = 1;
_inheritDefaults(vars).immediateRender = _isNotFalse(vars.immediateRender);
return this.staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams);
};
_proto2.staggerFromTo = function staggerFromTo(targets, duration, fromVars, toVars, stagger, position, onCompleteAll, onCompleteAllParams) {
toVars.startAt = fromVars;
_inheritDefaults(toVars).immediateRender = _isNotFalse(toVars.immediateRender);
return this.staggerTo(targets, duration, toVars, stagger, position, onCompleteAll, onCompleteAllParams);
};
_proto2.render = function render(totalTime, suppressEvents, force) {
var prevTime = this._time,
tDur = this._dirty ? this.totalDuration() : this._tDur,
dur = this._dur,
tTime = this !== _globalTimeline && totalTime > tDur - _tinyNum && totalTime >= 0 ? tDur : totalTime < _tinyNum ? 0 : totalTime,
crossingStart = this._zTime < 0 !== totalTime < 0 && (this._initted || !dur),
time,
child,
next,
iteration,
cycleDuration,
prevPaused,
pauseTween,
timeScale,
prevStart,
prevIteration,
yoyo,
isYoyo;
if (tTime !== this._tTime || force || crossingStart) {
if (prevTime !== this._time && dur) {
//if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump).
tTime += this._time - prevTime;
totalTime += this._time - prevTime;
}
time = tTime;
prevStart = this._start;
timeScale = this._ts;
prevPaused = !timeScale;
if (crossingStart) {
dur || (prevTime = this._zTime); //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect.
(totalTime || !suppressEvents) && (this._zTime = totalTime);
}
if (this._repeat) {
//adjust the time for repeats and yoyos
yoyo = this._yoyo;
cycleDuration = dur + this._rDelay;
time = _round(tTime % cycleDuration); //round to avoid floating point errors. (4 % 0.8 should be 0 but some browsers report it as 0.79999999!)
if (tTime === tDur) {
// the tDur === tTime is for edge cases where there's a lengthy decimal on the duration and it may reach the very end but the time is rendered as not-quite-there (remember, tDur is rounded to 4 decimals whereas dur isn't)
iteration = this._repeat;
time = dur;
} else {
iteration = ~~(tTime / cycleDuration);
if (iteration && iteration === tTime / cycleDuration) {
time = dur;
iteration--;
}
time > dur && (time = dur);
}
prevIteration = _animationCycle(this._tTime, cycleDuration);
!prevTime && this._tTime && prevIteration !== iteration && (prevIteration = iteration); // edge case - if someone does addPause() at the very beginning of a repeating timeline, that pause is technically at the same spot as the end which causes this._time to get set to 0 when the totalTime would normally place the playhead at the end. See https://greensock.com/forums/topic/23823-closing-nav-animation-not-working-on-ie-and-iphone-6-maybe-other-older-browser/?tab=comments#comment-113005
if (yoyo && iteration & 1) {
time = dur - time;
isYoyo = 1;
}
/*
make sure children at the end/beginning of the timeline are rendered properly. If, for example,
a 3-second long timeline rendered at 2.9 seconds previously, and now renders at 3.2 seconds (which
would get translated to 2.8 seconds if the timeline yoyos or 0.2 seconds if it just repeats), there
could be a callback or a short tween that's at 2.95 or 3 seconds in which wouldn't render. So
we need to push the timeline to the end (and/or beginning depending on its yoyo value). Also we must
ensure that zero-duration tweens at the very beginning or end of the Timeline work.
*/
if (iteration !== prevIteration && !this._lock) {
var rewinding = yoyo && prevIteration & 1,
doesWrap = rewinding === (yoyo && iteration & 1);
iteration < prevIteration && (rewinding = !rewinding);
prevTime = rewinding ? 0 : dur;
this._lock = 1;
this.render(prevTime || (isYoyo ? 0 : _round(iteration * cycleDuration)), suppressEvents, !dur)._lock = 0;
!suppressEvents && this.parent && _callback(this, "onRepeat");
this.vars.repeatRefresh && !isYoyo && (this.invalidate()._lock = 1);
if (prevTime !== this._time || prevPaused !== !this._ts) {
return this;
}
dur = this._dur; // in case the duration changed in the onRepeat
tDur = this._tDur;
if (doesWrap) {
this._lock = 2;
prevTime = rewinding ? dur : -0.0001;
this.render(prevTime, true);
this.vars.repeatRefresh && !isYoyo && this.invalidate();
}
this._lock = 0;
if (!this._ts && !prevPaused) {
return this;
} //in order for yoyoEase to work properly when there's a stagger, we must swap out the ease in each sub-tween.
_propagateYoyoEase(this, isYoyo);
}
}
if (this._hasPause && !this._forcing && this._lock < 2) {
pauseTween = _findNextPauseTween(this, _round(prevTime), _round(time));
if (pauseTween) {
tTime -= time - (time = pauseTween._start);
}
}
this._tTime = tTime;
this._time = time;
this._act = !timeScale; //as long as it's not paused, force it to be active so that if the user renders independent of the parent timeline, it'll be forced to re-render on the next tick.
if (!this._initted) {
this._onUpdate = this.vars.onUpdate;
this._initted = 1;
this._zTime = totalTime;
}
!prevTime && time && !suppressEvents && _callback(this, "onStart");
if (time >= prevTime && totalTime >= 0) {
child = this._first;
while (child) {
next = child._next;
if ((child._act || time >= child._start) && child._ts && pauseTween !== child) {
if (child.parent !== this) {
// an extreme edge case - the child's render could do something like kill() the "next" one in the linked list, or reparent it. In that case we must re-initiate the whole render to be safe.
return this.render(totalTime, suppressEvents, force);
}
child.render(child._ts > 0 ? (time - child._start) * child._ts : (child._dirty ? child.totalDuration() : child._tDur) + (time - child._start) * child._ts, suppressEvents, force);
if (time !== this._time || !this._ts && !prevPaused) {
//in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete
pauseTween = 0;
next && (tTime += this._zTime = -_tinyNum); // it didn't finish rendering, so flag zTime as negative so that so that the next time render() is called it'll be forced (to render any remaining children)
break;
}
}
child = next;
}
} else {
child = this._last;
var adjustedTime = totalTime < 0 ? totalTime : time; //when the playhead goes backward beyond the start of this timeline, we must pass that information down to the child animations so that zero-duration tweens know whether to render their starting or ending values.
while (child) {
next = child._prev;
if ((child._act || adjustedTime <= child._end) && child._ts && pauseTween !== child) {
if (child.parent !== this) {
// an extreme edge case - the child's render could do something like kill() the "next" one in the linked list, or reparent it. In that case we must re-initiate the whole render to be safe.
return this.render(totalTime, suppressEvents, force);
}
child.render(child._ts > 0 ? (adjustedTime - child._start) * child._ts : (child._dirty ? child.totalDuration() : child._tDur) + (adjustedTime - child._start) * child._ts, suppressEvents, force);
if (time !== this._time || !this._ts && !prevPaused) {
//in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete
pauseTween = 0;
next && (tTime += this._zTime = adjustedTime ? -_tinyNum : _tinyNum); // it didn't finish rendering, so adjust zTime so that so that the next time render() is called it'll be forced (to render any remaining children)
break;
}
}
child = next;
}
}
if (pauseTween && !suppressEvents) {
this.pause();
pauseTween.render(time >= prevTime ? 0 : -_tinyNum)._zTime = time >= prevTime ? 1 : -1;
if (this._ts) {
//the callback resumed playback! So since we may have held back the playhead due to where the pause is positioned, go ahead and jump to where it's SUPPOSED to be (if no pause happened).
this._start = prevStart; //if the pause was at an earlier time and the user resumed in the callback, it could reposition the timeline (changing its startTime), throwing things off slightly, so we make sure the _start doesn't shift.
_setEnd(this);
return this.render(totalTime, suppressEvents, force);
}
}
this._onUpdate && !suppressEvents && _callback(this, "onUpdate", true);
if (tTime === tDur && tDur >= this.totalDuration() || !tTime && prevTime) if (prevStart === this._start || Math.abs(timeScale) !== Math.abs(this._ts)) if (!this._lock) {
(totalTime || !dur) && (tTime === tDur && this._ts > 0 || !tTime && this._ts < 0) && _removeFromParent(this, 1); // don't remove if the timeline is reversed and the playhead isn't at 0, otherwise tl.progress(1).reverse() won't work. Only remove if the playhead is at the end and timeScale is positive, or if the playhead is at 0 and the timeScale is negative.
if (!suppressEvents && !(totalTime < 0 && !prevTime) && (tTime || prevTime)) {
_callback(this, tTime === tDur ? "onComplete" : "onReverseComplete", true);
this._prom && !(tTime < tDur && this.timeScale() > 0) && this._prom();
}
}
}
return this;
};
_proto2.add = function add(child, position) {
var _this2 = this;
if (!_isNumber(position)) {
position = _parsePosition(this, position);
}
if (!(child instanceof Animation)) {
if (_isArray(child)) {
child.forEach(function (obj) {
return _this2.add(obj, position);
});
return this;
}
if (_isString(child)) {
return this.addLabel(child, position);
}
if (_isFunction(child)) {
child = Tween.delayedCall(0, child);
} else {
return this;
}
}
return this !== child ? _addToTimeline(this, child, position) : this; //don't allow a timeline to be added to itself as a child!
};
_proto2.getChildren = function getChildren(nested, tweens, timelines, ignoreBeforeTime) {
if (nested === void 0) {
nested = true;
}
if (tweens === void 0) {
tweens = true;
}
if (timelines === void 0) {
timelines = true;
}
if (ignoreBeforeTime === void 0) {
ignoreBeforeTime = -_bigNum;
}
var a = [],
child = this._first;
while (child) {
if (child._start >= ignoreBeforeTime) {
if (child instanceof Tween) {
tweens && a.push(child);
} else {
timelines && a.push(child);
nested && a.push.apply(a, child.getChildren(true, tweens, timelines));
}
}
child = child._next;
}
return a;
};
_proto2.getById = function getById(id) {
var animations = this.getChildren(1, 1, 1),
i = animations.length;
while (i--) {
if (animations[i].vars.id === id) {
return animations[i];
}
}
};
_proto2.remove = function remove(child) {
if (_isString(child)) {
return this.removeLabel(child);
}
if (_isFunction(child)) {
return this.killTweensOf(child);
}
_removeLinkedListItem(this, child);
if (child === this._recent) {
this._recent = this._last;
}
return _uncache(this);
};
_proto2.totalTime = function totalTime(_totalTime2, suppressEvents) {
if (!arguments.length) {
return this._tTime;
}
this._forcing = 1;
if (!this._dp && this._ts) {
//special case for the global timeline (or any other that has no parent or detached parent).
this._start = _round(_ticker.time - (this._ts > 0 ? _totalTime2 / this._ts : (this.totalDuration() - _totalTime2) / -this._ts));
}
_Animation.prototype.totalTime.call(this, _totalTime2, suppressEvents);
this._forcing = 0;
return this;
};
_proto2.addLabel = function addLabel(label, position) {
this.labels[label] = _parsePosition(this, position);
return this;
};
_proto2.removeLabel = function removeLabel(label) {
delete this.labels[label];
return this;
};
_proto2.addPause = function addPause(position, callback, params) {
var t = Tween.delayedCall(0, callback || _emptyFunc, params);
t.data = "isPause";
this._hasPause = 1;
return _addToTimeline(this, t, _parsePosition(this, position));
};
_proto2.removePause = function removePause(position) {
var child = this._first;
position = _parsePosition(this, position);
while (child) {
if (child._start === position && child.data === "isPause") {
_removeFromParent(child);
}
child = child._next;
}
};
_proto2.killTweensOf = function killTweensOf(targets, props, onlyActive) {
var tweens = this.getTweensOf(targets, onlyActive),
i = tweens.length;
while (i--) {
_overwritingTween !== tweens[i] && tweens[i].kill(targets, props);
}
return this;
};
_proto2.getTweensOf = function getTweensOf(targets, onlyActive) {
var a = [],
parsedTargets = toArray(targets),
child = this._first,
isGlobalTime = _isNumber(onlyActive),
// a number is interpreted as a global time. If the animation spans
children;
while (child) {
if (child instanceof Tween) {
if (_arrayContainsAny(child._targets, parsedTargets) && (isGlobalTime ? (!_overwritingTween || child._initted && child._ts) && child.globalTime(0) <= onlyActive && child.globalTime(child.totalDuration()) > onlyActive : !onlyActive || child.isActive())) {
// note: if this is for overwriting, it should only be for tweens that aren't paused and are initted.
a.push(child);
}
} else if ((children = child.getTweensOf(parsedTargets, onlyActive)).length) {
a.push.apply(a, children);
}
child = child._next;
}
return a;
};
_proto2.tweenTo = function tweenTo(position, vars) {
vars = vars || {};
var tl = this,
endTime = _parsePosition(tl, position),
_vars = vars,
startAt = _vars.startAt,
_onStart = _vars.onStart,
onStartParams = _vars.onStartParams,
tween = Tween.to(tl, _setDefaults(vars, {
ease: "none",
lazy: false,
time: endTime,
overwrite: "auto",
duration: vars.duration || Math.abs((endTime - (startAt && "time" in startAt ? startAt.time : tl._time)) / tl.timeScale()) || _tinyNum,
onStart: function onStart() {
tl.pause();
var duration = vars.duration || Math.abs((endTime - tl._time) / tl.timeScale());
tween._dur !== duration && _setDuration(tween, duration, 0, 1).render(tween._time, true, true);
_onStart && _onStart.apply(tween, onStartParams || []); //in case the user had an onStart in the vars - we don't want to overwrite it.
}
}));
return tween;
};
_proto2.tweenFromTo = function tweenFromTo(fromPosition, toPosition, vars) {
return this.tweenTo(toPosition, _setDefaults({
startAt: {
time: _parsePosition(this, fromPosition)
}
}, vars));
};
_proto2.recent = function recent() {
return this._recent;
};
_proto2.nextLabel = function nextLabel(afterTime) {
if (afterTime === void 0) {
afterTime = this._time;
}
return _getLabelInDirection(this, _parsePosition(this, afterTime));
};
_proto2.previousLabel = function previousLabel(beforeTime) {
if (beforeTime === void 0) {
beforeTime = this._time;
}
return _getLabelInDirection(this, _parsePosition(this, beforeTime), 1);
};
_proto2.currentLabel = function currentLabel(value) {
return arguments.length ? this.seek(value, true) : this.previousLabel(this._time + _tinyNum);
};
_proto2.shiftChildren = function shiftChildren(amount, adjustLabels, ignoreBeforeTime) {
if (ignoreBeforeTime === void 0) {
ignoreBeforeTime = 0;
}
var child = this._first,
labels = this.labels,
p;
while (child) {
if (child._start >= ignoreBeforeTime) {
child._start += amount;
child._end += amount;
}
child = child._next;
}
if (adjustLabels) {
for (p in labels) {
if (labels[p] >= ignoreBeforeTime) {
labels[p] += amount;
}
}
}
return _uncache(this);
};
_proto2.invalidate = function invalidate() {
var child = this._first;
this._lock = 0;
while (child) {
child.invalidate();
child = child._next;
}
return _Animation.prototype.invalidate.call(this);
};
_proto2.clear = function clear(includeLabels) {
if (includeLabels === void 0) {
includeLabels = true;
}
var child = this._first,
next;
while (child) {
next = child._next;
this.remove(child);
child = next;
}
this._time = this._tTime = this._pTime = 0;
includeLabels && (this.labels = {});
return _uncache(this);
};
_proto2.totalDuration = function totalDuration(value) {
var max = 0,
self = this,
child = self._last,
prevStart = _bigNum,
prev,
start,
parent;
if (arguments.length) {
return self.timeScale((self._repeat < 0 ? self.duration() : self.totalDuration()) / (self.reversed() ? -value : value));
}
if (self._dirty) {
parent = self.parent;
while (child) {
prev = child._prev; //record it here in case the tween changes position in the sequence...
child._dirty && child.totalDuration(); //could change the tween._startTime, so make sure the animation's cache is clean before analyzing it.
start = child._start;
if (start > prevStart && self._sort && child._ts && !self._lock) {
//in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence
self._lock = 1; //prevent endless recursive calls - there are methods that get triggered that check duration/totalDuration when we add().
_addToTimeline(self, child, start - child._delay, 1)._lock = 0;
} else {
prevStart = start;
}
if (start < 0 && child._ts) {
//children aren't allowed to have negative startTimes unless smoothChildTiming is true, so adjust here if one is found.
max -= start;
if (!parent && !self._dp || parent && parent.smoothChildTiming) {
self._start += start / self._ts;
self._time -= start;
self._tTime -= start;
}
self.shiftChildren(-start, false, -1e999);
prevStart = 0;
}
child._end > max && child._ts && (max = child._end);
child = prev;
}
_setDuration(self, self === _globalTimeline && self._time > max ? self._time : max, 1, 1);
self._dirty = 0;
}
return self._tDur;
};
Timeline.updateRoot = function updateRoot(time) {
if (_globalTimeline._ts) {
_lazySafeRender(_globalTimeline, _parentToChildTotalTime(time, _globalTimeline));
_lastRenderedFrame = _ticker.frame;
}
if (_ticker.frame >= _nextGCFrame) {
_nextGCFrame += _config.autoSleep || 120;
var child = _globalTimeline._first;
if (!child || !child._ts) if (_config.autoSleep && _ticker._listeners.length < 2) {
while (child && !child._ts) {
child = child._next;
}
child || _ticker.sleep();
}
}
};
return Timeline;
}(Animation);
_setDefaults(Timeline.prototype, {
_lock: 0,
_hasPause: 0,
_forcing: 0
});
var _addComplexStringPropTween = function _addComplexStringPropTween(target, prop, start, end, setter, stringFilter, funcParam) {
//note: we call _addComplexStringPropTween.call(tweenInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus "this" would refer to the plugin.
var pt = new PropTween(this._pt, target, prop, 0, 1, _renderComplexString, null, setter),
index = 0,
matchIndex = 0,
result,
startNums,
color,
endNum,
chunk,
startNum,
hasRandom,
a;
pt.b = start;
pt.e = end;
start += ""; //ensure values are strings
end += "";
if (hasRandom = ~end.indexOf("random(")) {
end = _replaceRandom(end);
}
if (stringFilter) {
a = [start, end];
stringFilter(a, target, prop); //pass an array with the starting and ending values and let the filter do whatever it needs to the values.
start = a[0];
end = a[1];
}
startNums = start.match(_complexStringNumExp) || [];
while (result = _complexStringNumExp.exec(end)) {
endNum = result[0];
chunk = end.substring(index, result.index);
if (color) {
color = (color + 1) % 5;
} else if (chunk.substr(-5) === "rgba(") {
color = 1;
}
if (endNum !== startNums[matchIndex++]) {
startNum = parseFloat(startNums[matchIndex - 1]) || 0; //these nested PropTweens are handled in a special way - we'll never actually call a render or setter method on them. We'll just loop through them in the parent complex string PropTween's render method.
pt._pt = {
_next: pt._pt,
p: chunk || matchIndex === 1 ? chunk : ",",
//note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case.
s: startNum,
c: endNum.charAt(1) === "=" ? parseFloat(endNum.substr(2)) * (endNum.charAt(0) === "-" ? -1 : 1) : parseFloat(endNum) - startNum,
m: color && color < 4 ? Math.round : 0
};
index = _complexStringNumExp.lastIndex;
}
}
pt.c = index < end.length ? end.substring(index, end.length) : ""; //we use the "c" of the PropTween to store the final part of the string (after the last number)
pt.fp = funcParam;
if (_relExp.test(end) || hasRandom) {
pt.e = 0; //if the end string contains relative values or dynamic random(...) values, delete the end it so that on the final render we don't actually set it to the string with += or -= characters (forces it to use the calculated value).
}
this._pt = pt; //start the linked list with this new PropTween. Remember, we call _addComplexStringPropTween.call(tweenInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus "this" would refer to the plugin.
return pt;
},
_addPropTween = function _addPropTween(target, prop, start, end, index, targets, modifier, stringFilter, funcParam) {
_isFunction(end) && (end = end(index || 0, target, targets));
var currentValue = target[prop],
parsedStart = start !== "get" ? start : !_isFunction(currentValue) ? currentValue : funcParam ? target[prop.indexOf("set") || !_isFunction(target["get" + prop.substr(3)]) ? prop : "get" + prop.substr(3)](funcParam) : target[prop](),
setter = !_isFunction(currentValue) ? _setterPlain : funcParam ? _setterFuncWithParam : _setterFunc,
pt;
if (_isString(end)) {
if (~end.indexOf("random(")) {
end = _replaceRandom(end);
}
if (end.charAt(1) === "=") {
end = parseFloat(parsedStart) + parseFloat(end.substr(2)) * (end.charAt(0) === "-" ? -1 : 1) + (getUnit(parsedStart) || 0);
}
}
if (parsedStart !== end) {
if (!isNaN(parsedStart * end)) {
pt = new PropTween(this._pt, target, prop, +parsedStart || 0, end - (parsedStart || 0), typeof currentValue === "boolean" ? _renderBoolean : _renderPlain, 0, setter);
funcParam && (pt.fp = funcParam);
modifier && pt.modifier(modifier, this, target);
return this._pt = pt;
}
!currentValue && !(prop in target) && _missingPlugin(prop, end);
return _addComplexStringPropTween.call(this, target, prop, parsedStart, end, setter, stringFilter || _config.stringFilter, funcParam);
}
},
//creates a copy of the vars object and processes any function-based values (putting the resulting values directly into the copy) as well as strings with "random()" in them. It does NOT process relative values.
_processVars = function _processVars(vars, index, target, targets, tween) {
_isFunction(vars) && (vars = _parseFuncOrString(vars, tween, index, target, targets));
if (!_isObject(vars) || vars.style && vars.nodeType || _isArray(vars) || _isTypedArray(vars)) {
return _isString(vars) ? _parseFuncOrString(vars, tween, index, target, targets) : vars;
}
var copy = {},
p;
for (p in vars) {
copy[p] = _parseFuncOrString(vars[p], tween, index, target, targets);
}
return copy;
},
_checkPlugin = function _checkPlugin(property, vars, tween, index, target, targets) {
var plugin, pt, ptLookup, i;
if (_plugins[property] && (plugin = new _plugins[property]()).init(target, plugin.rawVars ? vars[property] : _processVars(vars[property], index, target, targets, tween), tween, index, targets) !== false) {
tween._pt = pt = new PropTween(tween._pt, target, property, 0, 1, plugin.render, plugin, 0, plugin.priority);
if (tween !== _quickTween) {
ptLookup = tween._ptLookup[tween._targets.indexOf(target)]; //note: we can't use tween._ptLookup[index] because for staggered tweens, the index from the fullTargets array won't match what it is in each individual tween that spawns from the stagger.
i = plugin._props.length;
while (i--) {
ptLookup[plugin._props[i]] = pt;
}
}
}
return plugin;
},
_overwritingTween,
//store a reference temporarily so we can avoid overwriting itself.
_initTween = function _initTween(tween, time) {
var vars = tween.vars,
ease = vars.ease,
startAt = vars.startAt,
immediateRender = vars.immediateRender,
lazy = vars.lazy,
onUpdate = vars.onUpdate,
onUpdateParams = vars.onUpdateParams,
callbackScope = vars.callbackScope,
runBackwards = vars.runBackwards,
yoyoEase = vars.yoyoEase,
keyframes = vars.keyframes,
autoRevert = vars.autoRevert,
dur = tween._dur,
prevStartAt = tween._startAt,
targets = tween._targets,
parent = tween.parent,
fullTargets = parent && parent.data === "nested" ? parent.parent._targets : targets,
autoOverwrite = tween._overwrite === "auto",
tl = tween.timeline,
cleanVars,
i,
p,
pt,
target,
hasPriority,
gsData,
harness,
plugin,
ptLookup,
index,
harnessVars,
overwritten;
tl && (!keyframes || !ease) && (ease = "none");
tween._ease = _parseEase(ease, _defaults.ease);
tween._yEase = yoyoEase ? _invertEase(_parseEase(yoyoEase === true ? ease : yoyoEase, _defaults.ease)) : 0;
if (yoyoEase && tween._yoyo && !tween._repeat) {
//there must have been a parent timeline with yoyo:true that is currently in its yoyo phase, so flip the eases.
yoyoEase = tween._yEase;
tween._yEase = tween._ease;
tween._ease = yoyoEase;
}
if (!tl) {
//if there's an internal timeline, skip all the parsing because we passed that task down the chain.
harness = targets[0] ? _getCache(targets[0]).harness : 0;
harnessVars = harness && vars[harness.prop]; //someone may need to specify CSS-specific values AND non-CSS values, like if the element has an "x" property plus it's a standard DOM element. We allow people to distinguish by wrapping plugin-specific stuff in a css:{} object for example.
cleanVars = _copyExcluding(vars, _reservedProps);
prevStartAt && prevStartAt.render(-1, true).kill();
if (startAt) {
_removeFromParent(tween._startAt = Tween.set(targets, _setDefaults({
data: "isStart",
overwrite: false,
parent: parent,
immediateRender: true,
lazy: _isNotFalse(lazy),
startAt: null,
delay: 0,
onUpdate: onUpdate,
onUpdateParams: onUpdateParams,
callbackScope: callbackScope,
stagger: 0
}, startAt))); //copy the properties/values into a new object to avoid collisions, like var to = {x:0}, from = {x:500}; timeline.fromTo(e, from, to).fromTo(e, to, from);
if (immediateRender) {
if (time > 0) {
autoRevert || (tween._startAt = 0); //tweens that render immediately (like most from() and fromTo() tweens) shouldn't revert when their parent timeline's playhead goes backward past the startTime because the initial render could have happened anytime and it shouldn't be directly correlated to this tween's startTime. Imagine setting up a complex animation where the beginning states of various objects are rendered immediately but the tween doesn't happen for quite some time - if we revert to the starting values as soon as the playhead goes backward past the tween's startTime, it will throw things off visually. Reversion should only happen in Timeline instances where immediateRender was false or when autoRevert is explicitly set to true.
} else if (dur && !(time < 0 && prevStartAt)) {
time && (tween._zTime = time);
return; //we skip initialization here so that overwriting doesn't occur until the tween actually begins. Otherwise, if you create several immediateRender:true tweens of the same target/properties to drop into a Timeline, the last one created would overwrite the first ones because they didn't get placed into the timeline yet before the first render occurs and kicks in overwriting.
}
}
} else if (runBackwards && dur) {
//from() tweens must be handled uniquely: their beginning values must be rendered but we don't want overwriting to occur yet (when time is still 0). Wait until the tween actually begins before doing all the routines like overwriting. At that time, we should render at the END of the tween to ensure that things initialize correctly (remember, from() tweens go backwards)
if (prevStartAt) {
!autoRevert && (tween._startAt = 0);
} else {
time && (immediateRender = false); //in rare cases (like if a from() tween runs and then is invalidate()-ed), immediateRender could be true but the initial forced-render gets skipped, so there's no need to force the render in this context when the _time is greater than 0
p = _setDefaults({
overwrite: false,
data: "isFromStart",
//we tag the tween with as "isFromStart" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a "from()" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in.
lazy: immediateRender && _isNotFalse(lazy),
immediateRender: immediateRender,
//zero-duration tweens render immediately by default, but if we're not specifically instructed to render this tween immediately, we should skip this and merely _init() to record the starting values (rendering them immediately would push them to completion which is wasteful in that case - we'd have to render(-1) immediately after)
stagger: 0,
parent: parent //ensures that nested tweens that had a stagger are handled properly, like gsap.from(".class", {y:gsap.utils.wrap([-100,100])})
}, cleanVars);
harnessVars && (p[harness.prop] = harnessVars); // in case someone does something like .from(..., {css:{}})
_removeFromParent(tween._startAt = Tween.set(targets, p));
if (!immediateRender) {
_initTween(tween._startAt, _tinyNum); //ensures that the initial values are recorded
} else if (!time) {
return;
}
}
}
tween._pt = 0;
lazy = dur && _isNotFalse(lazy) || lazy && !dur;
for (i = 0; i < targets.length; i++) {
target = targets[i];
gsData = target._gsap || _harness(targets)[i]._gsap;
tween._ptLookup[i] = ptLookup = {};
_lazyLookup[gsData.id] && _lazyTweens.length && _lazyRender(); //if other tweens of the same target have recently initted but haven't rendered yet, we've got to force the render so that the starting values are correct (imagine populating a timeline with a bunch of sequential tweens and then jumping to the end)
index = fullTargets === targets ? i : fullTargets.indexOf(target);
if (harness && (plugin = new harness()).init(target, harnessVars || cleanVars, tween, index, fullTargets) !== false) {
tween._pt = pt = new PropTween(tween._pt, target, plugin.name, 0, 1, plugin.render, plugin, 0, plugin.priority);
plugin._props.forEach(function (name) {
ptLookup[name] = pt;
});
plugin.priority && (hasPriority = 1);
}
if (!harness || harnessVars) {
for (p in cleanVars) {
if (_plugins[p] && (plugin = _checkPlugin(p, cleanVars, tween, index, target, fullTargets))) {
plugin.priority && (hasPriority = 1);
} else {
ptLookup[p] = pt = _addPropTween.call(tween, target, p, "get", cleanVars[p], index, fullTargets, 0, vars.stringFilter);
}
}
}
tween._op && tween._op[i] && tween.kill(target, tween._op[i]);
if (autoOverwrite && tween._pt) {
_overwritingTween = tween;
_globalTimeline.killTweensOf(target, ptLookup, tween.globalTime(0)); //Also make sure the overwriting doesn't overwrite THIS tween!!!
overwritten = !tween.parent;
_overwritingTween = 0;
}
tween._pt && lazy && (_lazyLookup[gsData.id] = 1);
}
hasPriority && _sortPropTweensByPriority(tween);
tween._onInit && tween._onInit(tween); //plugins like RoundProps must wait until ALL of the PropTweens are instantiated. In the plugin's init() function, it sets the _onInit on the tween instance. May not be pretty/intuitive, but it's fast and keeps file size down.
}
tween._from = !tl && !!vars.runBackwards; //nested timelines should never run backwards - the backwards-ness is in the child tweens.
tween._onUpdate = onUpdate;
tween._initted = (!tween._op || tween._pt) && !overwritten; // if overwrittenProps resulted in the entire tween being killed, do NOT flag it as initted or else it may render for one tick.
},
_addAliasesToVars = function _addAliasesToVars(targets, vars) {
var harness = targets[0] ? _getCache(targets[0]).harness : 0,
propertyAliases = harness && harness.aliases,
copy,
p,
i,
aliases;
if (!propertyAliases) {
return vars;
}
copy = _merge({}, vars);
for (p in propertyAliases) {
if (p in copy) {
aliases = propertyAliases[p].split(",");
i = aliases.length;
while (i--) {
copy[aliases[i]] = copy[p];
}
}
}
return copy;
},
_parseFuncOrString = function _parseFuncOrString(value, tween, i, target, targets) {
return _isFunction(value) ? value.call(tween, i, target, targets) : _isString(value) && ~value.indexOf("random(") ? _replaceRandom(value) : value;
},
_staggerTweenProps = _callbackNames + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase",
_staggerPropsToSkip = (_staggerTweenProps + ",id,stagger,delay,duration,paused,scrollTrigger").split(",");
/*
* --------------------------------------------------------------------------------------
* TWEEN
* --------------------------------------------------------------------------------------
*/
var Tween = /*#__PURE__*/function (_Animation2) {
_inheritsLoose(Tween, _Animation2);
function Tween(targets, vars, time, skipInherit) {
var _this3;
if (typeof vars === "number") {
time.duration = vars;
vars = time;
time = null;
}
_this3 = _Animation2.call(this, skipInherit ? vars : _inheritDefaults(vars), time) || this;
var _this3$vars = _this3.vars,
duration = _this3$vars.duration,
delay = _this3$vars.delay,
immediateRender = _this3$vars.immediateRender,
stagger = _this3$vars.stagger,
overwrite = _this3$vars.overwrite,
keyframes = _this3$vars.keyframes,
defaults = _this3$vars.defaults,
scrollTrigger = _this3$vars.scrollTrigger,
yoyoEase = _this3$vars.yoyoEase,
parent = _this3.parent,
parsedTargets = (_isArray(targets) || _isTypedArray(targets) ? _isNumber(targets[0]) : "length" in vars) ? [targets] : toArray(targets),
tl,
i,
copy,
l,
p,
curTarget,
staggerFunc,
staggerVarsToMerge;
_this3._targets = parsedTargets.length ? _harness(parsedTargets) : _warn("GSAP target " + targets + " not found. https://greensock.com", !_config.nullTargetWarn) || [];
_this3._ptLookup = []; //PropTween lookup. An array containing an object for each target, having keys for each tweening property
_this3._overwrite = overwrite;
if (keyframes || stagger || _isFuncOrString(duration) || _isFuncOrString(delay)) {
vars = _this3.vars;
tl = _this3.timeline = new Timeline({
data: "nested",
defaults: defaults || {}
});
tl.kill();
tl.parent = _assertThisInitialized(_this3);
if (keyframes) {
_setDefaults(tl.vars.defaults, {
ease: "none"
});
keyframes.forEach(function (frame) {
return tl.to(parsedTargets, frame, ">");
});
} else {
l = parsedTargets.length;
staggerFunc = stagger ? distribute(stagger) : _emptyFunc;
if (_isObject(stagger)) {
//users can pass in callbacks like onStart/onComplete in the stagger object. These should fire with each individual tween.
for (p in stagger) {
if (~_staggerTweenProps.indexOf(p)) {
staggerVarsToMerge || (staggerVarsToMerge = {});
staggerVarsToMerge[p] = stagger[p];
}
}
}
for (i = 0; i < l; i++) {
copy = {};
for (p in vars) {
if (_staggerPropsToSkip.indexOf(p) < 0) {
copy[p] = vars[p];
}
}
copy.stagger = 0;
yoyoEase && (copy.yoyoEase = yoyoEase);
staggerVarsToMerge && _merge(copy, staggerVarsToMerge);
curTarget = parsedTargets[i]; //don't just copy duration or delay because if they're a string or function, we'd end up in an infinite loop because _isFuncOrString() would evaluate as true in the child tweens, entering this loop, etc. So we parse the value straight from vars and default to 0.
copy.duration = +_parseFuncOrString(duration, _assertThisInitialized(_this3), i, curTarget, parsedTargets);
copy.delay = (+_parseFuncOrString(delay, _assertThisInitialized(_this3), i, curTarget, parsedTargets) || 0) - _this3._delay;
if (!stagger && l === 1 && copy.delay) {
// if someone does delay:"random(1, 5)", repeat:-1, for example, the delay shouldn't be inside the repeat.
_this3._delay = delay = copy.delay;
_this3._start += delay;
copy.delay = 0;
}
tl.to(curTarget, copy, staggerFunc(i, curTarget, parsedTargets));
}
tl.duration() ? duration = delay = 0 : _this3.timeline = 0; // if the timeline's duration is 0, we don't need a timeline internally!
}
duration || _this3.duration(duration = tl.duration());
} else {
_this3.timeline = 0; //speed optimization, faster lookups (no going up the prototype chain)
}
if (overwrite === true) {
_overwritingTween = _assertThisInitialized(_this3);
_globalTimeline.killTweensOf(parsedTargets);
_overwritingTween = 0;
}
parent && _postAddChecks(parent, _assertThisInitialized(_this3));
if (immediateRender || !duration && !keyframes && _this3._start === _round(parent._time) && _isNotFalse(immediateRender) && _hasNoPausedAncestors(_assertThisInitialized(_this3)) && parent.data !== "nested") {
_this3._tTime = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render)
_this3.render(Math.max(0, -delay)); //in case delay is negative
}
scrollTrigger && _scrollTrigger(_assertThisInitialized(_this3), scrollTrigger);
return _this3;
}
var _proto3 = Tween.prototype;
_proto3.render = function render(totalTime, suppressEvents, force) {
var prevTime = this._time,
tDur = this._tDur,
dur = this._dur,
tTime = totalTime > tDur - _tinyNum && totalTime >= 0 ? tDur : totalTime < _tinyNum ? 0 : totalTime,
time,
pt,
iteration,
cycleDuration,
prevIteration,
isYoyo,
ratio,
timeline,
yoyoEase;
if (!dur) {
_renderZeroDurationTween(this, totalTime, suppressEvents, force);
} else if (tTime !== this._tTime || !totalTime || force || this._startAt && this._zTime < 0 !== totalTime < 0) {
//this senses if we're crossing over the start time, in which case we must record _zTime and force the render, but we do it in this lengthy conditional way for performance reasons (usually we can skip the calculations): this._initted && (this._zTime < 0) !== (totalTime < 0)
time = tTime;
timeline = this.timeline;
if (this._repeat) {
//adjust the time for repeats and yoyos
cycleDuration = dur + this._rDelay;
time = _round(tTime % cycleDuration); //round to avoid floating point errors. (4 % 0.8 should be 0 but some browsers report it as 0.79999999!)
if (tTime === tDur) {
// the tDur === tTime is for edge cases where there's a lengthy decimal on the duration and it may reach the very end but the time is rendered as not-quite-there (remember, tDur is rounded to 4 decimals whereas dur isn't)
iteration = this._repeat;
time = dur;
} else {
iteration = ~~(tTime / cycleDuration);
if (iteration && iteration === tTime / cycleDuration) {
time = dur;
iteration--;
}
time > dur && (time = dur);
}
isYoyo = this._yoyo && iteration & 1;
if (isYoyo) {
yoyoEase = this._yEase;
time = dur - time;
}
prevIteration = _animationCycle(this._tTime, cycleDuration);
if (time === prevTime && !force && this._initted) {
//could be during the repeatDelay part. No need to render and fire callbacks.
return this;
}
if (iteration !== prevIteration) {
timeline && this._yEase && _propagateYoyoEase(timeline, isYoyo); //repeatRefresh functionality
if (this.vars.repeatRefresh && !isYoyo && !this._lock) {
this._lock = force = 1; //force, otherwise if lazy is true, the _attemptInitTween() will return and we'll jump out and get caught bouncing on each tick.
this.render(_round(cycleDuration * iteration), true).invalidate()._lock = 0;
}
}
}
if (!this._initted) {
if (_attemptInitTween(this, totalTime < 0 ? totalTime : time, force, suppressEvents)) {
this._tTime = 0; // in constructor if immediateRender is true, we set _tTime to -_tinyNum to have the playhead cross the starting point but we can't leave _tTime as a negative number.
return this;
}
if (dur !== this._dur) {
// while initting, a plugin like InertiaPlugin might alter the duration, so rerun from the start to ensure everything renders as it should.
return this.render(totalTime, suppressEvents, force);
}
}
this._tTime = tTime;
this._time = time;
if (!this._act && this._ts) {
this._act = 1; //as long as it's not paused, force it to be active so that if the user renders independent of the parent timeline, it'll be forced to re-render on the next tick.
this._lazy = 0;
}
this.ratio = ratio = (yoyoEase || this._ease)(time / dur);
if (this._from) {
this.ratio = ratio = 1 - ratio;
}
time && !prevTime && !suppressEvents && _callback(this, "onStart");
pt = this._pt;
while (pt) {
pt.r(ratio, pt.d);
pt = pt._next;
}
timeline && timeline.render(totalTime < 0 ? totalTime : !time && isYoyo ? -_tinyNum : timeline._dur * ratio, suppressEvents, force) || this._startAt && (this._zTime = totalTime);
if (this._onUpdate && !suppressEvents) {
totalTime < 0 && this._startAt && this._startAt.render(totalTime, true, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete.
_callback(this, "onUpdate");
}
this._repeat && iteration !== prevIteration && this.vars.onRepeat && !suppressEvents && this.parent && _callback(this, "onRepeat");
if ((tTime === this._tDur || !tTime) && this._tTime === tTime) {
totalTime < 0 && this._startAt && !this._onUpdate && this._startAt.render(totalTime, true, true);
(totalTime || !dur) && (tTime === this._tDur && this._ts > 0 || !tTime && this._ts < 0) && _removeFromParent(this, 1); // don't remove if we're rendering at exactly a time of 0, as there could be autoRevert values that should get set on the next tick (if the playhead goes backward beyond the startTime, negative totalTime). Don't remove if the timeline is reversed and the playhead isn't at 0, otherwise tl.progress(1).reverse() won't work. Only remove if the playhead is at the end and timeScale is positive, or if the playhead is at 0 and the timeScale is negative.
if (!suppressEvents && !(totalTime < 0 && !prevTime) && (tTime || prevTime)) {
// if prevTime and tTime are zero, we shouldn't fire the onReverseComplete. This could happen if you gsap.to(... {paused:true}).play();
_callback(this, tTime === tDur ? "onComplete" : "onReverseComplete", true);
this._prom && !(tTime < tDur && this.timeScale() > 0) && this._prom();
}
}
}
return this;
};
_proto3.targets = function targets() {
return this._targets;
};
_proto3.invalidate = function invalidate() {
this._pt = this._op = this._startAt = this._onUpdate = this._act = this._lazy = 0;
this._ptLookup = [];
this.timeline && this.timeline.invalidate();
return _Animation2.prototype.invalidate.call(this);
};
_proto3.kill = function kill(targets, vars) {
if (vars === void 0) {
vars = "all";
}
if (!targets && (!vars || vars === "all")) {
this._lazy = 0;
if (this.parent) {
return _interrupt(this);
}
}
if (this.timeline) {
var tDur = this.timeline.totalDuration();
this.timeline.killTweensOf(targets, vars, _overwritingTween && _overwritingTween.vars.overwrite !== true)._first || _interrupt(this); // if nothing is left tweenng, interrupt.
this.parent && tDur !== this.timeline.totalDuration() && _setDuration(this, this._dur * this.timeline._tDur / tDur, 0, 1); // if a nested tween is killed that changes the duration, it should affect this tween's duration. We must use the ratio, though, because sometimes the internal timeline is stretched like for keyframes where they don't all add up to whatever the parent tween's duration was set to.
return this;
}
var parsedTargets = this._targets,
killingTargets = targets ? toArray(targets) : parsedTargets,
propTweenLookup = this._ptLookup,
firstPT = this._pt,
overwrittenProps,
curLookup,
curOverwriteProps,
props,
p,
pt,
i;
if ((!vars || vars === "all") && _arraysMatch(parsedTargets, killingTargets)) {
vars === "all" && (this._pt = 0);
return _interrupt(this);
}
overwrittenProps = this._op = this._op || [];
if (vars !== "all") {
//so people can pass in a comma-delimited list of property names
if (_isString(vars)) {
p = {};
_forEachName(vars, function (name) {
return p[name] = 1;
});
vars = p;
}
vars = _addAliasesToVars(parsedTargets, vars);
}
i = parsedTargets.length;
while (i--) {
if (~killingTargets.indexOf(parsedTargets[i])) {
curLookup = propTweenLookup[i];
if (vars === "all") {
overwrittenProps[i] = vars;
props = curLookup;
curOverwriteProps = {};
} else {
curOverwriteProps = overwrittenProps[i] = overwrittenProps[i] || {};
props = vars;
}
for (p in props) {
pt = curLookup && curLookup[p];
if (pt) {
if (!("kill" in pt.d) || pt.d.kill(p) === true) {
_removeLinkedListItem(this, pt, "_pt");
}
delete curLookup[p];
}
if (curOverwriteProps !== "all") {
curOverwriteProps[p] = 1;
}
}
}
}
this._initted && !this._pt && firstPT && _interrupt(this); //if all tweening properties are killed, kill the tween. Without this line, if there's a tween with multiple targets and then you killTweensOf() each target individually, the tween would technically still remain active and fire its onComplete even though there aren't any more properties tweening.
return this;
};
Tween.to = function to(targets, vars) {
return new Tween(targets, vars, arguments[2]);
};
Tween.from = function from(targets, vars) {
return new Tween(targets, _parseVars(arguments, 1));
};
Tween.delayedCall = function delayedCall(delay, callback, params, scope) {
return new Tween(callback, 0, {
immediateRender: false,
lazy: false,
overwrite: false,
delay: delay,
onComplete: callback,
onReverseComplete: callback,
onCompleteParams: params,
onReverseCompleteParams: params,
callbackScope: scope
});
};
Tween.fromTo = function fromTo(targets, fromVars, toVars) {
return new Tween(targets, _parseVars(arguments, 2));
};
Tween.set = function set(targets, vars) {
vars.duration = 0;
vars.repeatDelay || (vars.repeat = 0);
return new Tween(targets, vars);
};
Tween.killTweensOf = function killTweensOf(targets, props, onlyActive) {
return _globalTimeline.killTweensOf(targets, props, onlyActive);
};
return Tween;
}(Animation);
_setDefaults(Tween.prototype, {
_targets: [],
_lazy: 0,
_startAt: 0,
_op: 0,
_onInit: 0
}); //add the pertinent timeline methods to Tween instances so that users can chain conveniently and create a timeline automatically. (removed due to concerns that it'd ultimately add to more confusion especially for beginners)
// _forEachName("to,from,fromTo,set,call,add,addLabel,addPause", name => {
// Tween.prototype[name] = function() {
// let tl = new Timeline();
// return _addToTimeline(tl, this)[name].apply(tl, toArray(arguments));
// }
// });
//for backward compatibility. Leverage the timeline calls.
_forEachName("staggerTo,staggerFrom,staggerFromTo", function (name) {
Tween[name] = function () {
var tl = new Timeline(),
params = _slice.call(arguments, 0);
params.splice(name === "staggerFromTo" ? 5 : 4, 0, 0);
return tl[name].apply(tl, params);
};
});
/*
* --------------------------------------------------------------------------------------
* PROPTWEEN
* --------------------------------------------------------------------------------------
*/
var _setterPlain = function _setterPlain(target, property, value) {
return target[property] = value;
},
_setterFunc = function _setterFunc(target, property, value) {
return target[property](value);
},
_setterFuncWithParam = function _setterFuncWithParam(target, property, value, data) {
return target[property](data.fp, value);
},
_setterAttribute = function _setterAttribute(target, property, value) {
return target.setAttribute(property, value);
},
_getSetter = function _getSetter(target, property) {
return _isFunction(target[property]) ? _setterFunc : _isUndefined(target[property]) && target.setAttribute ? _setterAttribute : _setterPlain;
},
_renderPlain = function _renderPlain(ratio, data) {
return data.set(data.t, data.p, Math.round((data.s + data.c * ratio) * 10000) / 10000, data);
},
_renderBoolean = function _renderBoolean(ratio, data) {
return data.set(data.t, data.p, !!(data.s + data.c * ratio), data);
},
_renderComplexString = function _renderComplexString(ratio, data) {
var pt = data._pt,
s = "";
if (!ratio && data.b) {
//b = beginning string
s = data.b;
} else if (ratio === 1 && data.e) {
//e = ending string
s = data.e;
} else {
while (pt) {
s = pt.p + (pt.m ? pt.m(pt.s + pt.c * ratio) : Math.round((pt.s + pt.c * ratio) * 10000) / 10000) + s; //we use the "p" property for the text inbetween (like a suffix). And in the context of a complex string, the modifier (m) is typically just Math.round(), like for RGB colors.
pt = pt._next;
}
s += data.c; //we use the "c" of the PropTween to store the final chunk of non-numeric text.
}
data.set(data.t, data.p, s, data);
},
_renderPropTweens = function _renderPropTweens(ratio, data) {
var pt = data._pt;
while (pt) {
pt.r(ratio, pt.d);
pt = pt._next;
}
},
_addPluginModifier = function _addPluginModifier(modifier, tween, target, property) {
var pt = this._pt,
next;
while (pt) {
next = pt._next;
pt.p === property && pt.modifier(modifier, tween, target);
pt = next;
}
},
_killPropTweensOf = function _killPropTweensOf(property) {
var pt = this._pt,
hasNonDependentRemaining,
next;
while (pt) {
next = pt._next;
if (pt.p === property && !pt.op || pt.op === property) {
_removeLinkedListItem(this, pt, "_pt");
} else if (!pt.dep) {
hasNonDependentRemaining = 1;
}
pt = next;
}
return !hasNonDependentRemaining;
},
_setterWithModifier = function _setterWithModifier(target, property, value, data) {
data.mSet(target, property, data.m.call(data.tween, value, data.mt), data);
},
_sortPropTweensByPriority = function _sortPropTweensByPriority(parent) {
var pt = parent._pt,
next,
pt2,
first,
last; //sorts the PropTween linked list in order of priority because some plugins need to do their work after ALL of the PropTweens were created (like RoundPropsPlugin and ModifiersPlugin)
while (pt) {
next = pt._next;
pt2 = first;
while (pt2 && pt2.pr > pt.pr) {
pt2 = pt2._next;
}
if (pt._prev = pt2 ? pt2._prev : last) {
pt._prev._next = pt;
} else {
first = pt;
}
if (pt._next = pt2) {
pt2._prev = pt;
} else {
last = pt;
}
pt = next;
}
parent._pt = first;
}; //PropTween key: t = target, p = prop, r = renderer, d = data, s = start, c = change, op = overwriteProperty (ONLY populated when it's different than p), pr = priority, _next/_prev for the linked list siblings, set = setter, m = modifier, mSet = modifierSetter (the original setter, before a modifier was added)
var PropTween = /*#__PURE__*/function () {
function PropTween(next, target, prop, start, change, renderer, data, setter, priority) {
this.t = target;
this.s = start;
this.c = change;
this.p = prop;
this.r = renderer || _renderPlain;
this.d = data || this;
this.set = setter || _setterPlain;
this.pr = priority || 0;
this._next = next;
if (next) {
next._prev = this;
}
}
var _proto4 = PropTween.prototype;
_proto4.modifier = function modifier(func, tween, target) {
this.mSet = this.mSet || this.set; //in case it was already set (a PropTween can only have one modifier)
this.set = _setterWithModifier;
this.m = func;
this.mt = target; //modifier target
this.tween = tween;
};
return PropTween;
}(); //Initialization tasks
_forEachName(_callbackNames + "parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger", function (name) {
return _reservedProps[name] = 1;
});
_globals.TweenMax = _globals.TweenLite = Tween;
_globals.TimelineLite = _globals.TimelineMax = Timeline;
_globalTimeline = new Timeline({
sortChildren: false,
defaults: _defaults,
autoRemoveChildren: true,
id: "root",
smoothChildTiming: true
});
_config.stringFilter = _colorStringFilter;
/*
* --------------------------------------------------------------------------------------
* GSAP
* --------------------------------------------------------------------------------------
*/
var _gsap = {
registerPlugin: function registerPlugin() {
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
args.forEach(function (config) {
return _createPlugin(config);
});
},
timeline: function timeline(vars) {
return new Timeline(vars);
},
getTweensOf: function getTweensOf(targets, onlyActive) {
return _globalTimeline.getTweensOf(targets, onlyActive);
},
getProperty: function getProperty(target, property, unit, uncache) {
_isString(target) && (target = toArray(target)[0]); //in case selector text or an array is passed in
var getter = _getCache(target || {}).get,
format = unit ? _passThrough : _numericIfPossible;
unit === "native" && (unit = "");
return !target ? target : !property ? function (property, unit, uncache) {
return format((_plugins[property] && _plugins[property].get || getter)(target, property, unit, uncache));
} : format((_plugins[property] && _plugins[property].get || getter)(target, property, unit, uncache));
},
quickSetter: function quickSetter(target, property, unit) {
target = toArray(target);
if (target.length > 1) {
var setters = target.map(function (t) {
return gsap.quickSetter(t, property, unit);
}),
l = setters.length;
return function (value) {
var i = l;
while (i--) {
setters[i](value);
}
};
}
target = target[0] || {};
var Plugin = _plugins[property],
cache = _getCache(target),
p = cache.harness && (cache.harness.aliases || {})[property] || property,
// in case it's an alias, like "rotate" for "rotation".
setter = Plugin ? function (value) {
var p = new Plugin();
_quickTween._pt = 0;
p.init(target, unit ? value + unit : value, _quickTween, 0, [target]);
p.render(1, p);
_quickTween._pt && _renderPropTweens(1, _quickTween);
} : cache.set(target, p);
return Plugin ? setter : function (value) {
return setter(target, p, unit ? value + unit : value, cache, 1);
};
},
isTweening: function isTweening(targets) {
return _globalTimeline.getTweensOf(targets, true).length > 0;
},
defaults: function defaults(value) {
value && value.ease && (value.ease = _parseEase(value.ease, _defaults.ease));
return _mergeDeep(_defaults, value || {});
},
config: function config(value) {
return _mergeDeep(_config, value || {});
},
registerEffect: function registerEffect(_ref) {
var name = _ref.name,
effect = _ref.effect,
plugins = _ref.plugins,
defaults = _ref.defaults,
extendTimeline = _ref.extendTimeline;
(plugins || "").split(",").forEach(function (pluginName) {
return pluginName && !_plugins[pluginName] && !_globals[pluginName] && _warn(name + " effect requires " + pluginName + " plugin.");
});
_effects[name] = function (targets, vars, tl) {
return effect(toArray(targets), _setDefaults(vars || {}, defaults), tl);
};
if (extendTimeline) {
Timeline.prototype[name] = function (targets, vars, position) {
return this.add(_effects[name](targets, _isObject(vars) ? vars : (position = vars) && {}, this), position);
};
}
},
registerEase: function registerEase(name, ease) {
_easeMap[name] = _parseEase(ease);
},
parseEase: function parseEase(ease, defaultEase) {
return arguments.length ? _parseEase(ease, defaultEase) : _easeMap;
},
getById: function getById(id) {
return _globalTimeline.getById(id);
},
exportRoot: function exportRoot(vars, includeDelayedCalls) {
if (vars === void 0) {
vars = {};
}
var tl = new Timeline(vars),
child,
next;
tl.smoothChildTiming = _isNotFalse(vars.smoothChildTiming);
_globalTimeline.remove(tl);
tl._dp = 0; //otherwise it'll get re-activated when adding children and be re-introduced into _globalTimeline's linked list (then added to itself).
tl._time = tl._tTime = _globalTimeline._time;
child = _globalTimeline._first;
while (child) {
next = child._next;
if (includeDelayedCalls || !(!child._dur && child instanceof Tween && child.vars.onComplete === child._targets[0])) {
_addToTimeline(tl, child, child._start - child._delay);
}
child = next;
}
_addToTimeline(_globalTimeline, tl, 0);
return tl;
},
utils: {
wrap: wrap,
wrapYoyo: wrapYoyo,
distribute: distribute,
random: random,
snap: snap,
normalize: normalize,
getUnit: getUnit,
clamp: clamp,
splitColor: splitColor,
toArray: toArray,
mapRange: mapRange,
pipe: pipe,
unitize: unitize,
interpolate: interpolate,
shuffle: shuffle
},
install: _install,
effects: _effects,
ticker: _ticker,
updateRoot: Timeline.updateRoot,
plugins: _plugins,
globalTimeline: _globalTimeline,
core: {
PropTween: PropTween,
globals: _addGlobal,
Tween: Tween,
Timeline: Timeline,
Animation: Animation,
getCache: _getCache,
_removeLinkedListItem: _removeLinkedListItem
}
};
_forEachName("to,from,fromTo,delayedCall,set,killTweensOf", function (name) {
return _gsap[name] = Tween[name];
});
_ticker.add(Timeline.updateRoot);
_quickTween = _gsap.to({}, {
duration: 0
}); // ---- EXTRA PLUGINS --------------------------------------------------------
var _getPluginPropTween = function _getPluginPropTween(plugin, prop) {
var pt = plugin._pt;
while (pt && pt.p !== prop && pt.op !== prop && pt.fp !== prop) {
pt = pt._next;
}
return pt;
},
_addModifiers = function _addModifiers(tween, modifiers) {
var targets = tween._targets,
p,
i,
pt;
for (p in modifiers) {
i = targets.length;
while (i--) {
pt = tween._ptLookup[i][p];
if (pt && (pt = pt.d)) {
if (pt._pt) {
// is a plugin
pt = _getPluginPropTween(pt, p);
}
pt && pt.modifier && pt.modifier(modifiers[p], tween, targets[i], p);
}
}
}
},
_buildModifierPlugin = function _buildModifierPlugin(name, modifier) {
return {
name: name,
rawVars: 1,
//don't pre-process function-based values or "random()" strings.
init: function init(target, vars, tween) {
tween._onInit = function (tween) {
var temp, p;
if (_isString(vars)) {
temp = {};
_forEachName(vars, function (name) {
return temp[name] = 1;
}); //if the user passes in a comma-delimited list of property names to roundProps, like "x,y", we round to whole numbers.
vars = temp;
}
if (modifier) {
temp = {};
for (p in vars) {
temp[p] = modifier(vars[p]);
}
vars = temp;
}
_addModifiers(tween, vars);
};
}
};
}; //register core plugins
var gsap = _gsap.registerPlugin({
name: "attr",
init: function init(target, vars, tween, index, targets) {
var p, pt;
for (p in vars) {
pt = this.add(target, "setAttribute", (target.getAttribute(p) || 0) + "", vars[p], index, targets, 0, 0, p);
pt && (pt.op = p);
this._props.push(p);
}
}
}, {
name: "endArray",
init: function init(target, value) {
var i = value.length;
while (i--) {
this.add(target, i, target[i] || 0, value[i]);
}
}
}, _buildModifierPlugin("roundProps", _roundModifier), _buildModifierPlugin("modifiers"), _buildModifierPlugin("snap", snap)) || _gsap; //to prevent the core plugins from being dropped via aggressive tree shaking, we must include them in the variable declaration in this way.
Tween.version = Timeline.version = gsap.version = "3.5.1";
_coreReady = 1;
if (_windowExists()) {
_wake();
}
var Power0 = _easeMap.Power0,
Power1 = _easeMap.Power1,
Power2 = _easeMap.Power2,
Power3 = _easeMap.Power3,
Power4 = _easeMap.Power4,
Linear = _easeMap.Linear,
Quad = _easeMap.Quad,
Cubic = _easeMap.Cubic,
Quart = _easeMap.Quart,
Quint = _easeMap.Quint,
Strong = _easeMap.Strong,
Elastic = _easeMap.Elastic,
Back = _easeMap.Back,
SteppedEase = _easeMap.SteppedEase,
Bounce = _easeMap.Bounce,
Sine = _easeMap.Sine,
Expo = _easeMap.Expo,
Circ = _easeMap.Circ;
//export some internal methods/orojects for use in CSSPlugin so that we can externalize that file and allow custom builds that exclude it.
/***/ }),
/***/ "../../node_modules/gsap/index.js":
/*!***************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/gsap/index.js ***!
\***************************************************************************/
/*! exports provided: gsap, default, CSSPlugin, TweenMax, TweenLite, TimelineMax, TimelineLite, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gsap", function() { return gsapWithCSS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return gsapWithCSS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TweenMax", function() { return TweenMaxWithCSS; });
/* harmony import */ var _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./gsap-core.js */ "../../node_modules/gsap/gsap-core.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TweenLite", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["TweenLite"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimelineMax", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["TimelineMax"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimelineLite", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["TimelineLite"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power0", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power0"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power1", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power1"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power2", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power2"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power3", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power3"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power4", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power4"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Linear", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Linear"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Quad", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Quad"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Cubic", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Cubic"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Quart", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Quart"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Quint", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Quint"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Strong", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Strong"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Elastic", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Elastic"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Back", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Back"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SteppedEase", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["SteppedEase"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bounce", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Bounce"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Sine", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Sine"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Expo", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Expo"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Circ", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Circ"]; });
/* harmony import */ var _CSSPlugin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CSSPlugin.js */ "../../node_modules/gsap/CSSPlugin.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CSSPlugin", function() { return _CSSPlugin_js__WEBPACK_IMPORTED_MODULE_1__["CSSPlugin"]; });
var gsapWithCSS = _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["gsap"].registerPlugin(_CSSPlugin_js__WEBPACK_IMPORTED_MODULE_1__["CSSPlugin"]) || _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["gsap"],
// to protect from tree shaking
TweenMaxWithCSS = gsapWithCSS.core.Tween;
/***/ }),
/***/ "../../node_modules/ieee754/index.js":
/*!******************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/ieee754/index.js ***!
\******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
var e, m;
var eLen = nBytes * 8 - mLen - 1;
var eMax = (1 << eLen) - 1;
var eBias = eMax >> 1;
var nBits = -7;
var i = isLE ? nBytes - 1 : 0;
var d = isLE ? -1 : 1;
var s = buffer[offset + i];
i += d;
e = s & (1 << -nBits) - 1;
s >>= -nBits;
nBits += eLen;
for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
m = e & (1 << -nBits) - 1;
e >>= -nBits;
nBits += mLen;
for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
if (e === 0) {
e = 1 - eBias;
} else if (e === eMax) {
return m ? NaN : (s ? -1 : 1) * Infinity;
} else {
m = m + Math.pow(2, mLen);
e = e - eBias;
}
return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
};
exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
var e, m, c;
var eLen = nBytes * 8 - mLen - 1;
var eMax = (1 << eLen) - 1;
var eBias = eMax >> 1;
var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
var i = isLE ? 0 : nBytes - 1;
var d = isLE ? 1 : -1;
var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
value = Math.abs(value);
if (isNaN(value) || value === Infinity) {
m = isNaN(value) ? 1 : 0;
e = eMax;
} else {
e = Math.floor(Math.log(value) / Math.LN2);
if (value * (c = Math.pow(2, -e)) < 1) {
e--;
c *= 2;
}
if (e + eBias >= 1) {
value += rt / c;
} else {
value += rt * Math.pow(2, 1 - eBias);
}
if (value * c >= 2) {
e++;
c /= 2;
}
if (e + eBias >= eMax) {
m = 0;
e = eMax;
} else if (e + eBias >= 1) {
m = (value * c - 1) * Math.pow(2, mLen);
e = e + eBias;
} else {
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
e = 0;
}
}
for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
e = e << mLen | m;
eLen += mLen;
for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
buffer[offset + i - d] |= s * 128;
};
/***/ }),
/***/ "../../node_modules/isarray/index.js":
/*!******************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/isarray/index.js ***!
\******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = Array.isArray || function (arr) {
return toString.call(arr) == '[object Array]';
};
/***/ }),
/***/ "../../node_modules/jsrsasign/lib/jsrsasign.js":
/*!****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/jsrsasign/lib/jsrsasign.js ***!
\****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(Buffer) {function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
var navigator = {};
navigator.userAgent = false;
var window = {};
/*
* jsrsasign(all) 10.0.2 (2020-10-14) (c) 2010-2020 Kenji Urushima | kjur.github.com/jsrsasign/license
*/
/*!
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
if (YAHOO === undefined) {
var YAHOO = {};
}
YAHOO.lang = {
extend: function extend(g, h, f) {
if (!h || !g) {
throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");
}
var d = function d() {};
d.prototype = h.prototype;
g.prototype = new d();
g.prototype.constructor = g;
g.superclass = h.prototype;
if (h.prototype.constructor == Object.prototype.constructor) {
h.prototype.constructor = h;
}
if (f) {
var b;
for (b in f) {
g.prototype[b] = f[b];
}
var e = function e() {},
c = ["toString", "valueOf"];
try {
if (/MSIE/.test(navigator.userAgent)) {
e = function e(j, i) {
for (b = 0; b < c.length; b = b + 1) {
var l = c[b],
k = i[l];
if (typeof k === "function" && k != Object.prototype[l]) {
j[l] = k;
}
}
};
}
} catch (a) {}
e(g.prototype, f);
}
}
};
/*! CryptoJS v3.1.2 core-fix.js
* code.google.com/p/crypto-js
* (c) 2009-2013 by Jeff Mott. All rights reserved.
* code.google.com/p/crypto-js/wiki/License
* THIS IS FIX of 'core.js' to fix Hmac issue.
* https://code.google.com/p/crypto-js/issues/detail?id=84
* https://crypto-js.googlecode.com/svn-history/r667/branches/3.x/src/core.js
*/
var CryptoJS = CryptoJS || function (e, g) {
var a = {};
var b = a.lib = {};
var j = b.Base = function () {
function n() {}
return {
extend: function extend(p) {
n.prototype = this;
var o = new n();
if (p) {
o.mixIn(p);
}
if (!o.hasOwnProperty("init")) {
o.init = function () {
o.$super.init.apply(this, arguments);
};
}
o.init.prototype = o;
o.$super = this;
return o;
},
create: function create() {
var o = this.extend();
o.init.apply(o, arguments);
return o;
},
init: function init() {},
mixIn: function mixIn(p) {
for (var o in p) {
if (p.hasOwnProperty(o)) {
this[o] = p[o];
}
}
if (p.hasOwnProperty("toString")) {
this.toString = p.toString;
}
},
clone: function clone() {
return this.init.prototype.extend(this);
}
};
}();
var l = b.WordArray = j.extend({
init: function init(o, n) {
o = this.words = o || [];
if (n != g) {
this.sigBytes = n;
} else {
this.sigBytes = o.length * 4;
}
},
toString: function toString(n) {
return (n || h).stringify(this);
},
concat: function concat(t) {
var q = this.words;
var p = t.words;
var n = this.sigBytes;
var s = t.sigBytes;
this.clamp();
if (n % 4) {
for (var r = 0; r < s; r++) {
var o = p[r >>> 2] >>> 24 - r % 4 * 8 & 255;
q[n + r >>> 2] |= o << 24 - (n + r) % 4 * 8;
}
} else {
for (var r = 0; r < s; r += 4) {
q[n + r >>> 2] = p[r >>> 2];
}
}
this.sigBytes += s;
return this;
},
clamp: function clamp() {
var o = this.words;
var n = this.sigBytes;
o[n >>> 2] &= 4294967295 << 32 - n % 4 * 8;
o.length = e.ceil(n / 4);
},
clone: function clone() {
var n = j.clone.call(this);
n.words = this.words.slice(0);
return n;
},
random: function random(p) {
var o = [];
for (var n = 0; n < p; n += 4) {
o.push(e.random() * 4294967296 | 0);
}
return new l.init(o, p);
}
});
var m = a.enc = {};
var h = m.Hex = {
stringify: function stringify(p) {
var r = p.words;
var o = p.sigBytes;
var q = [];
for (var n = 0; n < o; n++) {
var s = r[n >>> 2] >>> 24 - n % 4 * 8 & 255;
q.push((s >>> 4).toString(16));
q.push((s & 15).toString(16));
}
return q.join("");
},
parse: function parse(p) {
var n = p.length;
var q = [];
for (var o = 0; o < n; o += 2) {
q[o >>> 3] |= parseInt(p.substr(o, 2), 16) << 24 - o % 8 * 4;
}
return new l.init(q, n / 2);
}
};
var d = m.Latin1 = {
stringify: function stringify(q) {
var r = q.words;
var p = q.sigBytes;
var n = [];
for (var o = 0; o < p; o++) {
var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255;
n.push(String.fromCharCode(s));
}
return n.join("");
},
parse: function parse(p) {
var n = p.length;
var q = [];
for (var o = 0; o < n; o++) {
q[o >>> 2] |= (p.charCodeAt(o) & 255) << 24 - o % 4 * 8;
}
return new l.init(q, n);
}
};
var c = m.Utf8 = {
stringify: function stringify(n) {
try {
return decodeURIComponent(escape(d.stringify(n)));
} catch (o) {
throw new Error("Malformed UTF-8 data");
}
},
parse: function parse(n) {
return d.parse(unescape(encodeURIComponent(n)));
}
};
var i = b.BufferedBlockAlgorithm = j.extend({
reset: function reset() {
this._data = new l.init();
this._nDataBytes = 0;
},
_append: function _append(n) {
if (typeof n == "string") {
n = c.parse(n);
}
this._data.concat(n);
this._nDataBytes += n.sigBytes;
},
_process: function _process(w) {
var q = this._data;
var x = q.words;
var n = q.sigBytes;
var t = this.blockSize;
var v = t * 4;
var u = n / v;
if (w) {
u = e.ceil(u);
} else {
u = e.max((u | 0) - this._minBufferSize, 0);
}
var s = u * t;
var r = e.min(s * 4, n);
if (s) {
for (var p = 0; p < s; p += t) {
this._doProcessBlock(x, p);
}
var o = x.splice(0, s);
q.sigBytes -= r;
}
return new l.init(o, r);
},
clone: function clone() {
var n = j.clone.call(this);
n._data = this._data.clone();
return n;
},
_minBufferSize: 0
});
var f = b.Hasher = i.extend({
cfg: j.extend(),
init: function init(n) {
this.cfg = this.cfg.extend(n);
this.reset();
},
reset: function reset() {
i.reset.call(this);
this._doReset();
},
update: function update(n) {
this._append(n);
this._process();
return this;
},
finalize: function finalize(n) {
if (n) {
this._append(n);
}
var o = this._doFinalize();
return o;
},
blockSize: 512 / 32,
_createHelper: function _createHelper(n) {
return function (p, o) {
return new n.init(o).finalize(p);
};
},
_createHmacHelper: function _createHmacHelper(n) {
return function (p, o) {
return new k.HMAC.init(n, o).finalize(p);
};
}
});
var k = a.algo = {};
return a;
}(Math);
/*
CryptoJS v3.1.2 x64-core-min.js
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function (g) {
var a = CryptoJS,
f = a.lib,
e = f.Base,
h = f.WordArray,
a = a.x64 = {};
a.Word = e.extend({
init: function init(b, c) {
this.high = b;
this.low = c;
}
});
a.WordArray = e.extend({
init: function init(b, c) {
b = this.words = b || [];
this.sigBytes = c != g ? c : 8 * b.length;
},
toX32: function toX32() {
for (var b = this.words, c = b.length, a = [], d = 0; d < c; d++) {
var e = b[d];
a.push(e.high);
a.push(e.low);
}
return h.create(a, this.sigBytes);
},
clone: function clone() {
for (var b = e.clone.call(this), c = b.words = this.words.slice(0), a = c.length, d = 0; d < a; d++) {
c[d] = c[d].clone();
}
return b;
}
});
})();
/*
CryptoJS v3.1.2 cipher-core.js
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
CryptoJS.lib.Cipher || function (u) {
var g = CryptoJS,
f = g.lib,
k = f.Base,
l = f.WordArray,
q = f.BufferedBlockAlgorithm,
r = g.enc.Base64,
v = g.algo.EvpKDF,
n = f.Cipher = q.extend({
cfg: k.extend(),
createEncryptor: function createEncryptor(a, b) {
return this.create(this._ENC_XFORM_MODE, a, b);
},
createDecryptor: function createDecryptor(a, b) {
return this.create(this._DEC_XFORM_MODE, a, b);
},
init: function init(a, b, c) {
this.cfg = this.cfg.extend(c);
this._xformMode = a;
this._key = b;
this.reset();
},
reset: function reset() {
q.reset.call(this);
this._doReset();
},
process: function process(a) {
this._append(a);
return this._process();
},
finalize: function finalize(a) {
a && this._append(a);
return this._doFinalize();
},
keySize: 4,
ivSize: 4,
_ENC_XFORM_MODE: 1,
_DEC_XFORM_MODE: 2,
_createHelper: function _createHelper(a) {
return {
encrypt: function encrypt(b, c, d) {
return ("string" == typeof c ? s : j).encrypt(a, b, c, d);
},
decrypt: function decrypt(b, c, d) {
return ("string" == typeof c ? s : j).decrypt(a, b, c, d);
}
};
}
});
f.StreamCipher = n.extend({
_doFinalize: function _doFinalize() {
return this._process(!0);
},
blockSize: 1
});
var m = g.mode = {},
t = function t(a, b, c) {
var d = this._iv;
d ? this._iv = u : d = this._prevBlock;
for (var e = 0; e < c; e++) {
a[b + e] ^= d[e];
}
},
h = (f.BlockCipherMode = k.extend({
createEncryptor: function createEncryptor(a, b) {
return this.Encryptor.create(a, b);
},
createDecryptor: function createDecryptor(a, b) {
return this.Decryptor.create(a, b);
},
init: function init(a, b) {
this._cipher = a;
this._iv = b;
}
})).extend();
h.Encryptor = h.extend({
processBlock: function processBlock(a, b) {
var c = this._cipher,
d = c.blockSize;
t.call(this, a, b, d);
c.encryptBlock(a, b);
this._prevBlock = a.slice(b, b + d);
}
});
h.Decryptor = h.extend({
processBlock: function processBlock(a, b) {
var c = this._cipher,
d = c.blockSize,
e = a.slice(b, b + d);
c.decryptBlock(a, b);
t.call(this, a, b, d);
this._prevBlock = e;
}
});
m = m.CBC = h;
h = (g.pad = {}).Pkcs7 = {
pad: function pad(a, b) {
for (var c = 4 * b, c = c - a.sigBytes % c, d = c << 24 | c << 16 | c << 8 | c, e = [], f = 0; f < c; f += 4) {
e.push(d);
}
c = l.create(e, c);
a.concat(c);
},
unpad: function unpad(a) {
a.sigBytes -= a.words[a.sigBytes - 1 >>> 2] & 255;
}
};
f.BlockCipher = n.extend({
cfg: n.cfg.extend({
mode: m,
padding: h
}),
reset: function reset() {
n.reset.call(this);
var a = this.cfg,
b = a.iv,
a = a.mode;
if (this._xformMode == this._ENC_XFORM_MODE) var c = a.createEncryptor;else c = a.createDecryptor, this._minBufferSize = 1;
this._mode = c.call(a, this, b && b.words);
},
_doProcessBlock: function _doProcessBlock(a, b) {
this._mode.processBlock(a, b);
},
_doFinalize: function _doFinalize() {
var a = this.cfg.padding;
if (this._xformMode == this._ENC_XFORM_MODE) {
a.pad(this._data, this.blockSize);
var b = this._process(!0);
} else b = this._process(!0), a.unpad(b);
return b;
},
blockSize: 4
});
var p = f.CipherParams = k.extend({
init: function init(a) {
this.mixIn(a);
},
toString: function toString(a) {
return (a || this.formatter).stringify(this);
}
}),
m = (g.format = {}).OpenSSL = {
stringify: function stringify(a) {
var b = a.ciphertext;
a = a.salt;
return (a ? l.create([1398893684, 1701076831]).concat(a).concat(b) : b).toString(r);
},
parse: function parse(a) {
a = r.parse(a);
var b = a.words;
if (1398893684 == b[0] && 1701076831 == b[1]) {
var c = l.create(b.slice(2, 4));
b.splice(0, 4);
a.sigBytes -= 16;
}
return p.create({
ciphertext: a,
salt: c
});
}
},
j = f.SerializableCipher = k.extend({
cfg: k.extend({
format: m
}),
encrypt: function encrypt(a, b, c, d) {
d = this.cfg.extend(d);
var e = a.createEncryptor(c, d);
b = e.finalize(b);
e = e.cfg;
return p.create({
ciphertext: b,
key: c,
iv: e.iv,
algorithm: a,
mode: e.mode,
padding: e.padding,
blockSize: a.blockSize,
formatter: d.format
});
},
decrypt: function decrypt(a, b, c, d) {
d = this.cfg.extend(d);
b = this._parse(b, d.format);
return a.createDecryptor(c, d).finalize(b.ciphertext);
},
_parse: function _parse(a, b) {
return "string" == typeof a ? b.parse(a, this) : a;
}
}),
g = (g.kdf = {}).OpenSSL = {
execute: function execute(a, b, c, d) {
d || (d = l.random(8));
a = v.create({
keySize: b + c
}).compute(a, d);
c = l.create(a.words.slice(b), 4 * c);
a.sigBytes = 4 * b;
return p.create({
key: a,
iv: c,
salt: d
});
}
},
s = f.PasswordBasedCipher = j.extend({
cfg: j.cfg.extend({
kdf: g
}),
encrypt: function encrypt(a, b, c, d) {
d = this.cfg.extend(d);
c = d.kdf.execute(c, a.keySize, a.ivSize);
d.iv = c.iv;
a = j.encrypt.call(this, a, b, c.key, d);
a.mixIn(c);
return a;
},
decrypt: function decrypt(a, b, c, d) {
d = this.cfg.extend(d);
b = this._parse(b, d.format);
c = d.kdf.execute(c, a.keySize, a.ivSize, b.salt);
d.iv = c.iv;
return j.decrypt.call(this, a, b, c.key, d);
}
});
}();
/*
CryptoJS v3.1.2 aes.js
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function () {
for (var q = CryptoJS, x = q.lib.BlockCipher, r = q.algo, j = [], y = [], z = [], A = [], B = [], C = [], s = [], u = [], v = [], w = [], g = [], k = 0; 256 > k; k++) {
g[k] = 128 > k ? k << 1 : k << 1 ^ 283;
}
for (var n = 0, l = 0, k = 0; 256 > k; k++) {
var f = l ^ l << 1 ^ l << 2 ^ l << 3 ^ l << 4,
f = f >>> 8 ^ f & 255 ^ 99;
j[n] = f;
y[f] = n;
var t = g[n],
D = g[t],
E = g[D],
b = 257 * g[f] ^ 16843008 * f;
z[n] = b << 24 | b >>> 8;
A[n] = b << 16 | b >>> 16;
B[n] = b << 8 | b >>> 24;
C[n] = b;
b = 16843009 * E ^ 65537 * D ^ 257 * t ^ 16843008 * n;
s[f] = b << 24 | b >>> 8;
u[f] = b << 16 | b >>> 16;
v[f] = b << 8 | b >>> 24;
w[f] = b;
n ? (n = t ^ g[g[g[E ^ t]]], l ^= g[g[l]]) : n = l = 1;
}
var F = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54],
r = r.AES = x.extend({
_doReset: function _doReset() {
for (var c = this._key, e = c.words, a = c.sigBytes / 4, c = 4 * ((this._nRounds = a + 6) + 1), b = this._keySchedule = [], h = 0; h < c; h++) {
if (h < a) b[h] = e[h];else {
var d = b[h - 1];
h % a ? 6 < a && 4 == h % a && (d = j[d >>> 24] << 24 | j[d >>> 16 & 255] << 16 | j[d >>> 8 & 255] << 8 | j[d & 255]) : (d = d << 8 | d >>> 24, d = j[d >>> 24] << 24 | j[d >>> 16 & 255] << 16 | j[d >>> 8 & 255] << 8 | j[d & 255], d ^= F[h / a | 0] << 24);
b[h] = b[h - a] ^ d;
}
}
e = this._invKeySchedule = [];
for (a = 0; a < c; a++) {
h = c - a, d = a % 4 ? b[h] : b[h - 4], e[a] = 4 > a || 4 >= h ? d : s[j[d >>> 24]] ^ u[j[d >>> 16 & 255]] ^ v[j[d >>> 8 & 255]] ^ w[j[d & 255]];
}
},
encryptBlock: function encryptBlock(c, e) {
this._doCryptBlock(c, e, this._keySchedule, z, A, B, C, j);
},
decryptBlock: function decryptBlock(c, e) {
var a = c[e + 1];
c[e + 1] = c[e + 3];
c[e + 3] = a;
this._doCryptBlock(c, e, this._invKeySchedule, s, u, v, w, y);
a = c[e + 1];
c[e + 1] = c[e + 3];
c[e + 3] = a;
},
_doCryptBlock: function _doCryptBlock(c, e, a, b, h, d, j, m) {
for (var n = this._nRounds, f = c[e] ^ a[0], g = c[e + 1] ^ a[1], k = c[e + 2] ^ a[2], p = c[e + 3] ^ a[3], l = 4, t = 1; t < n; t++) {
var q = b[f >>> 24] ^ h[g >>> 16 & 255] ^ d[k >>> 8 & 255] ^ j[p & 255] ^ a[l++],
r = b[g >>> 24] ^ h[k >>> 16 & 255] ^ d[p >>> 8 & 255] ^ j[f & 255] ^ a[l++],
s = b[k >>> 24] ^ h[p >>> 16 & 255] ^ d[f >>> 8 & 255] ^ j[g & 255] ^ a[l++],
p = b[p >>> 24] ^ h[f >>> 16 & 255] ^ d[g >>> 8 & 255] ^ j[k & 255] ^ a[l++],
f = q,
g = r,
k = s;
}
q = (m[f >>> 24] << 24 | m[g >>> 16 & 255] << 16 | m[k >>> 8 & 255] << 8 | m[p & 255]) ^ a[l++];
r = (m[g >>> 24] << 24 | m[k >>> 16 & 255] << 16 | m[p >>> 8 & 255] << 8 | m[f & 255]) ^ a[l++];
s = (m[k >>> 24] << 24 | m[p >>> 16 & 255] << 16 | m[f >>> 8 & 255] << 8 | m[g & 255]) ^ a[l++];
p = (m[p >>> 24] << 24 | m[f >>> 16 & 255] << 16 | m[g >>> 8 & 255] << 8 | m[k & 255]) ^ a[l++];
c[e] = q;
c[e + 1] = r;
c[e + 2] = s;
c[e + 3] = p;
},
keySize: 8
});
q.AES = x._createHelper(r);
})();
/*
CryptoJS v3.1.2 tripledes-min.js
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function () {
function j(b, c) {
var a = (this._lBlock >>> b ^ this._rBlock) & c;
this._rBlock ^= a;
this._lBlock ^= a << b;
}
function l(b, c) {
var a = (this._rBlock >>> b ^ this._lBlock) & c;
this._lBlock ^= a;
this._rBlock ^= a << b;
}
var h = CryptoJS,
e = h.lib,
n = e.WordArray,
e = e.BlockCipher,
g = h.algo,
q = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4],
p = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32],
r = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28],
s = [{
"0": 8421888,
268435456: 32768,
536870912: 8421378,
805306368: 2,
1073741824: 512,
1342177280: 8421890,
1610612736: 8389122,
1879048192: 8388608,
2147483648: 514,
2415919104: 8389120,
2684354560: 33280,
2952790016: 8421376,
3221225472: 32770,
3489660928: 8388610,
3758096384: 0,
4026531840: 33282,
134217728: 0,
402653184: 8421890,
671088640: 33282,
939524096: 32768,
1207959552: 8421888,
1476395008: 512,
1744830464: 8421378,
2013265920: 2,
2281701376: 8389120,
2550136832: 33280,
2818572288: 8421376,
3087007744: 8389122,
3355443200: 8388610,
3623878656: 32770,
3892314112: 514,
4160749568: 8388608,
1: 32768,
268435457: 2,
536870913: 8421888,
805306369: 8388608,
1073741825: 8421378,
1342177281: 33280,
1610612737: 512,
1879048193: 8389122,
2147483649: 8421890,
2415919105: 8421376,
2684354561: 8388610,
2952790017: 33282,
3221225473: 514,
3489660929: 8389120,
3758096385: 32770,
4026531841: 0,
134217729: 8421890,
402653185: 8421376,
671088641: 8388608,
939524097: 512,
1207959553: 32768,
1476395009: 8388610,
1744830465: 2,
2013265921: 33282,
2281701377: 32770,
2550136833: 8389122,
2818572289: 514,
3087007745: 8421888,
3355443201: 8389120,
3623878657: 0,
3892314113: 33280,
4160749569: 8421378
}, {
"0": 1074282512,
16777216: 16384,
33554432: 524288,
50331648: 1074266128,
67108864: 1073741840,
83886080: 1074282496,
100663296: 1073758208,
117440512: 16,
134217728: 540672,
150994944: 1073758224,
167772160: 1073741824,
184549376: 540688,
201326592: 524304,
218103808: 0,
234881024: 16400,
251658240: 1074266112,
8388608: 1073758208,
25165824: 540688,
41943040: 16,
58720256: 1073758224,
75497472: 1074282512,
92274688: 1073741824,
109051904: 524288,
125829120: 1074266128,
142606336: 524304,
159383552: 0,
176160768: 16384,
192937984: 1074266112,
209715200: 1073741840,
226492416: 540672,
243269632: 1074282496,
260046848: 16400,
268435456: 0,
285212672: 1074266128,
301989888: 1073758224,
318767104: 1074282496,
335544320: 1074266112,
352321536: 16,
369098752: 540688,
385875968: 16384,
402653184: 16400,
419430400: 524288,
436207616: 524304,
452984832: 1073741840,
469762048: 540672,
486539264: 1073758208,
503316480: 1073741824,
520093696: 1074282512,
276824064: 540688,
293601280: 524288,
310378496: 1074266112,
327155712: 16384,
343932928: 1073758208,
360710144: 1074282512,
377487360: 16,
394264576: 1073741824,
411041792: 1074282496,
427819008: 1073741840,
444596224: 1073758224,
461373440: 524304,
478150656: 0,
494927872: 16400,
511705088: 1074266128,
528482304: 540672
}, {
"0": 260,
1048576: 0,
2097152: 67109120,
3145728: 65796,
4194304: 65540,
5242880: 67108868,
6291456: 67174660,
7340032: 67174400,
8388608: 67108864,
9437184: 67174656,
10485760: 65792,
11534336: 67174404,
12582912: 67109124,
13631488: 65536,
14680064: 4,
15728640: 256,
524288: 67174656,
1572864: 67174404,
2621440: 0,
3670016: 67109120,
4718592: 67108868,
5767168: 65536,
6815744: 65540,
7864320: 260,
8912896: 4,
9961472: 256,
11010048: 67174400,
12058624: 65796,
13107200: 65792,
14155776: 67109124,
15204352: 67174660,
16252928: 67108864,
16777216: 67174656,
17825792: 65540,
18874368: 65536,
19922944: 67109120,
20971520: 256,
22020096: 67174660,
23068672: 67108868,
24117248: 0,
25165824: 67109124,
26214400: 67108864,
27262976: 4,
28311552: 65792,
29360128: 67174400,
30408704: 260,
31457280: 65796,
32505856: 67174404,
17301504: 67108864,
18350080: 260,
19398656: 67174656,
20447232: 0,
21495808: 65540,
22544384: 67109120,
23592960: 256,
24641536: 67174404,
25690112: 65536,
26738688: 67174660,
27787264: 65796,
28835840: 67108868,
29884416: 67109124,
30932992: 67174400,
31981568: 4,
33030144: 65792
}, {
"0": 2151682048,
65536: 2147487808,
131072: 4198464,
196608: 2151677952,
262144: 0,
327680: 4198400,
393216: 2147483712,
458752: 4194368,
524288: 2147483648,
589824: 4194304,
655360: 64,
720896: 2147487744,
786432: 2151678016,
851968: 4160,
917504: 4096,
983040: 2151682112,
32768: 2147487808,
98304: 64,
163840: 2151678016,
229376: 2147487744,
294912: 4198400,
360448: 2151682112,
425984: 0,
491520: 2151677952,
557056: 4096,
622592: 2151682048,
688128: 4194304,
753664: 4160,
819200: 2147483648,
884736: 4194368,
950272: 4198464,
1015808: 2147483712,
1048576: 4194368,
1114112: 4198400,
1179648: 2147483712,
1245184: 0,
1310720: 4160,
1376256: 2151678016,
1441792: 2151682048,
1507328: 2147487808,
1572864: 2151682112,
1638400: 2147483648,
1703936: 2151677952,
1769472: 4198464,
1835008: 2147487744,
1900544: 4194304,
1966080: 64,
2031616: 4096,
1081344: 2151677952,
1146880: 2151682112,
1212416: 0,
1277952: 4198400,
1343488: 4194368,
1409024: 2147483648,
1474560: 2147487808,
1540096: 64,
1605632: 2147483712,
1671168: 4096,
1736704: 2147487744,
1802240: 2151678016,
1867776: 4160,
1933312: 2151682048,
1998848: 4194304,
2064384: 4198464
}, {
"0": 128,
4096: 17039360,
8192: 262144,
12288: 536870912,
16384: 537133184,
20480: 16777344,
24576: 553648256,
28672: 262272,
32768: 16777216,
36864: 537133056,
40960: 536871040,
45056: 553910400,
49152: 553910272,
53248: 0,
57344: 17039488,
61440: 553648128,
2048: 17039488,
6144: 553648256,
10240: 128,
14336: 17039360,
18432: 262144,
22528: 537133184,
26624: 553910272,
30720: 536870912,
34816: 537133056,
38912: 0,
43008: 553910400,
47104: 16777344,
51200: 536871040,
55296: 553648128,
59392: 16777216,
63488: 262272,
65536: 262144,
69632: 128,
73728: 536870912,
77824: 553648256,
81920: 16777344,
86016: 553910272,
90112: 537133184,
94208: 16777216,
98304: 553910400,
102400: 553648128,
106496: 17039360,
110592: 537133056,
114688: 262272,
118784: 536871040,
122880: 0,
126976: 17039488,
67584: 553648256,
71680: 16777216,
75776: 17039360,
79872: 537133184,
83968: 536870912,
88064: 17039488,
92160: 128,
96256: 553910272,
100352: 262272,
104448: 553910400,
108544: 0,
112640: 553648128,
116736: 16777344,
120832: 262144,
124928: 537133056,
129024: 536871040
}, {
"0": 268435464,
256: 8192,
512: 270532608,
768: 270540808,
1024: 268443648,
1280: 2097152,
1536: 2097160,
1792: 268435456,
2048: 0,
2304: 268443656,
2560: 2105344,
2816: 8,
3072: 270532616,
3328: 2105352,
3584: 8200,
3840: 270540800,
128: 270532608,
384: 270540808,
640: 8,
896: 2097152,
1152: 2105352,
1408: 268435464,
1664: 268443648,
1920: 8200,
2176: 2097160,
2432: 8192,
2688: 268443656,
2944: 270532616,
3200: 0,
3456: 270540800,
3712: 2105344,
3968: 268435456,
4096: 268443648,
4352: 270532616,
4608: 270540808,
4864: 8200,
5120: 2097152,
5376: 268435456,
5632: 268435464,
5888: 2105344,
6144: 2105352,
6400: 0,
6656: 8,
6912: 270532608,
7168: 8192,
7424: 268443656,
7680: 270540800,
7936: 2097160,
4224: 8,
4480: 2105344,
4736: 2097152,
4992: 268435464,
5248: 268443648,
5504: 8200,
5760: 270540808,
6016: 270532608,
6272: 270540800,
6528: 270532616,
6784: 8192,
7040: 2105352,
7296: 2097160,
7552: 0,
7808: 268435456,
8064: 268443656
}, {
"0": 1048576,
16: 33555457,
32: 1024,
48: 1049601,
64: 34604033,
80: 0,
96: 1,
112: 34603009,
128: 33555456,
144: 1048577,
160: 33554433,
176: 34604032,
192: 34603008,
208: 1025,
224: 1049600,
240: 33554432,
8: 34603009,
24: 0,
40: 33555457,
56: 34604032,
72: 1048576,
88: 33554433,
104: 33554432,
120: 1025,
136: 1049601,
152: 33555456,
168: 34603008,
184: 1048577,
200: 1024,
216: 34604033,
232: 1,
248: 1049600,
256: 33554432,
272: 1048576,
288: 33555457,
304: 34603009,
320: 1048577,
336: 33555456,
352: 34604032,
368: 1049601,
384: 1025,
400: 34604033,
416: 1049600,
432: 1,
448: 0,
464: 34603008,
480: 33554433,
496: 1024,
264: 1049600,
280: 33555457,
296: 34603009,
312: 1,
328: 33554432,
344: 1048576,
360: 1025,
376: 34604032,
392: 33554433,
408: 34603008,
424: 0,
440: 34604033,
456: 1049601,
472: 1024,
488: 33555456,
504: 1048577
}, {
"0": 134219808,
1: 131072,
2: 134217728,
3: 32,
4: 131104,
5: 134350880,
6: 134350848,
7: 2048,
8: 134348800,
9: 134219776,
10: 133120,
11: 134348832,
12: 2080,
13: 0,
14: 134217760,
15: 133152,
2147483648: 2048,
2147483649: 134350880,
2147483650: 134219808,
2147483651: 134217728,
2147483652: 134348800,
2147483653: 133120,
2147483654: 133152,
2147483655: 32,
2147483656: 134217760,
2147483657: 2080,
2147483658: 131104,
2147483659: 134350848,
2147483660: 0,
2147483661: 134348832,
2147483662: 134219776,
2147483663: 131072,
16: 133152,
17: 134350848,
18: 32,
19: 2048,
20: 134219776,
21: 134217760,
22: 134348832,
23: 131072,
24: 0,
25: 131104,
26: 134348800,
27: 134219808,
28: 134350880,
29: 133120,
30: 2080,
31: 134217728,
2147483664: 131072,
2147483665: 2048,
2147483666: 134348832,
2147483667: 133152,
2147483668: 32,
2147483669: 134348800,
2147483670: 134217728,
2147483671: 134219808,
2147483672: 134350880,
2147483673: 134217760,
2147483674: 134219776,
2147483675: 0,
2147483676: 133120,
2147483677: 2080,
2147483678: 131104,
2147483679: 134350848
}],
t = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679],
m = g.DES = e.extend({
_doReset: function _doReset() {
for (var b = this._key.words, c = [], a = 0; 56 > a; a++) {
var f = q[a] - 1;
c[a] = b[f >>> 5] >>> 31 - f % 32 & 1;
}
b = this._subKeys = [];
for (f = 0; 16 > f; f++) {
for (var d = b[f] = [], e = r[f], a = 0; 24 > a; a++) {
d[a / 6 | 0] |= c[(p[a] - 1 + e) % 28] << 31 - a % 6, d[4 + (a / 6 | 0)] |= c[28 + (p[a + 24] - 1 + e) % 28] << 31 - a % 6;
}
d[0] = d[0] << 1 | d[0] >>> 31;
for (a = 1; 7 > a; a++) {
d[a] >>>= 4 * (a - 1) + 3;
}
d[7] = d[7] << 5 | d[7] >>> 27;
}
c = this._invSubKeys = [];
for (a = 0; 16 > a; a++) {
c[a] = b[15 - a];
}
},
encryptBlock: function encryptBlock(b, c) {
this._doCryptBlock(b, c, this._subKeys);
},
decryptBlock: function decryptBlock(b, c) {
this._doCryptBlock(b, c, this._invSubKeys);
},
_doCryptBlock: function _doCryptBlock(b, c, a) {
this._lBlock = b[c];
this._rBlock = b[c + 1];
j.call(this, 4, 252645135);
j.call(this, 16, 65535);
l.call(this, 2, 858993459);
l.call(this, 8, 16711935);
j.call(this, 1, 1431655765);
for (var f = 0; 16 > f; f++) {
for (var d = a[f], e = this._lBlock, h = this._rBlock, g = 0, k = 0; 8 > k; k++) {
g |= s[k][((h ^ d[k]) & t[k]) >>> 0];
}
this._lBlock = h;
this._rBlock = e ^ g;
}
a = this._lBlock;
this._lBlock = this._rBlock;
this._rBlock = a;
j.call(this, 1, 1431655765);
l.call(this, 8, 16711935);
l.call(this, 2, 858993459);
j.call(this, 16, 65535);
j.call(this, 4, 252645135);
b[c] = this._lBlock;
b[c + 1] = this._rBlock;
},
keySize: 2,
ivSize: 2,
blockSize: 2
});
h.DES = e._createHelper(m);
g = g.TripleDES = e.extend({
_doReset: function _doReset() {
var b = this._key.words;
this._des1 = m.createEncryptor(n.create(b.slice(0, 2)));
this._des2 = m.createEncryptor(n.create(b.slice(2, 4)));
this._des3 = m.createEncryptor(n.create(b.slice(4, 6)));
},
encryptBlock: function encryptBlock(b, c) {
this._des1.encryptBlock(b, c);
this._des2.decryptBlock(b, c);
this._des3.encryptBlock(b, c);
},
decryptBlock: function decryptBlock(b, c) {
this._des3.decryptBlock(b, c);
this._des2.encryptBlock(b, c);
this._des1.decryptBlock(b, c);
},
keySize: 6,
ivSize: 2,
blockSize: 2
});
h.TripleDES = e._createHelper(g);
})();
/*
CryptoJS v3.1.2 enc-base64.js
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function () {
var h = CryptoJS,
j = h.lib.WordArray;
h.enc.Base64 = {
stringify: function stringify(b) {
var e = b.words,
f = b.sigBytes,
c = this._map;
b.clamp();
b = [];
for (var a = 0; a < f; a += 3) {
for (var d = (e[a >>> 2] >>> 24 - 8 * (a % 4) & 255) << 16 | (e[a + 1 >>> 2] >>> 24 - 8 * ((a + 1) % 4) & 255) << 8 | e[a + 2 >>> 2] >>> 24 - 8 * ((a + 2) % 4) & 255, g = 0; 4 > g && a + 0.75 * g < f; g++) {
b.push(c.charAt(d >>> 6 * (3 - g) & 63));
}
}
if (e = c.charAt(64)) for (; b.length % 4;) {
b.push(e);
}
return b.join("");
},
parse: function parse(b) {
var e = b.length,
f = this._map,
c = f.charAt(64);
c && (c = b.indexOf(c), -1 != c && (e = c));
for (var c = [], a = 0, d = 0; d < e; d++) {
if (d % 4) {
var g = f.indexOf(b.charAt(d - 1)) << 2 * (d % 4),
h = f.indexOf(b.charAt(d)) >>> 6 - 2 * (d % 4);
c[a >>> 2] |= (g | h) << 24 - 8 * (a % 4);
a++;
}
}
return j.create(c, a);
},
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
};
})();
/*
CryptoJS v3.1.2 md5.js
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function (E) {
function h(a, f, g, j, p, h, k) {
a = a + (f & g | ~f & j) + p + k;
return (a << h | a >>> 32 - h) + f;
}
function k(a, f, g, j, p, h, k) {
a = a + (f & j | g & ~j) + p + k;
return (a << h | a >>> 32 - h) + f;
}
function l(a, f, g, j, h, k, l) {
a = a + (f ^ g ^ j) + h + l;
return (a << k | a >>> 32 - k) + f;
}
function n(a, f, g, j, h, k, l) {
a = a + (g ^ (f | ~j)) + h + l;
return (a << k | a >>> 32 - k) + f;
}
for (var r = CryptoJS, q = r.lib, F = q.WordArray, s = q.Hasher, q = r.algo, a = [], t = 0; 64 > t; t++) {
a[t] = 4294967296 * E.abs(E.sin(t + 1)) | 0;
}
q = q.MD5 = s.extend({
_doReset: function _doReset() {
this._hash = new F.init([1732584193, 4023233417, 2562383102, 271733878]);
},
_doProcessBlock: function _doProcessBlock(m, f) {
for (var g = 0; 16 > g; g++) {
var j = f + g,
p = m[j];
m[j] = (p << 8 | p >>> 24) & 16711935 | (p << 24 | p >>> 8) & 4278255360;
}
var g = this._hash.words,
j = m[f + 0],
p = m[f + 1],
q = m[f + 2],
r = m[f + 3],
s = m[f + 4],
t = m[f + 5],
u = m[f + 6],
v = m[f + 7],
w = m[f + 8],
x = m[f + 9],
y = m[f + 10],
z = m[f + 11],
A = m[f + 12],
B = m[f + 13],
C = m[f + 14],
D = m[f + 15],
b = g[0],
c = g[1],
d = g[2],
e = g[3],
b = h(b, c, d, e, j, 7, a[0]),
e = h(e, b, c, d, p, 12, a[1]),
d = h(d, e, b, c, q, 17, a[2]),
c = h(c, d, e, b, r, 22, a[3]),
b = h(b, c, d, e, s, 7, a[4]),
e = h(e, b, c, d, t, 12, a[5]),
d = h(d, e, b, c, u, 17, a[6]),
c = h(c, d, e, b, v, 22, a[7]),
b = h(b, c, d, e, w, 7, a[8]),
e = h(e, b, c, d, x, 12, a[9]),
d = h(d, e, b, c, y, 17, a[10]),
c = h(c, d, e, b, z, 22, a[11]),
b = h(b, c, d, e, A, 7, a[12]),
e = h(e, b, c, d, B, 12, a[13]),
d = h(d, e, b, c, C, 17, a[14]),
c = h(c, d, e, b, D, 22, a[15]),
b = k(b, c, d, e, p, 5, a[16]),
e = k(e, b, c, d, u, 9, a[17]),
d = k(d, e, b, c, z, 14, a[18]),
c = k(c, d, e, b, j, 20, a[19]),
b = k(b, c, d, e, t, 5, a[20]),
e = k(e, b, c, d, y, 9, a[21]),
d = k(d, e, b, c, D, 14, a[22]),
c = k(c, d, e, b, s, 20, a[23]),
b = k(b, c, d, e, x, 5, a[24]),
e = k(e, b, c, d, C, 9, a[25]),
d = k(d, e, b, c, r, 14, a[26]),
c = k(c, d, e, b, w, 20, a[27]),
b = k(b, c, d, e, B, 5, a[28]),
e = k(e, b, c, d, q, 9, a[29]),
d = k(d, e, b, c, v, 14, a[30]),
c = k(c, d, e, b, A, 20, a[31]),
b = l(b, c, d, e, t, 4, a[32]),
e = l(e, b, c, d, w, 11, a[33]),
d = l(d, e, b, c, z, 16, a[34]),
c = l(c, d, e, b, C, 23, a[35]),
b = l(b, c, d, e, p, 4, a[36]),
e = l(e, b, c, d, s, 11, a[37]),
d = l(d, e, b, c, v, 16, a[38]),
c = l(c, d, e, b, y, 23, a[39]),
b = l(b, c, d, e, B, 4, a[40]),
e = l(e, b, c, d, j, 11, a[41]),
d = l(d, e, b, c, r, 16, a[42]),
c = l(c, d, e, b, u, 23, a[43]),
b = l(b, c, d, e, x, 4, a[44]),
e = l(e, b, c, d, A, 11, a[45]),
d = l(d, e, b, c, D, 16, a[46]),
c = l(c, d, e, b, q, 23, a[47]),
b = n(b, c, d, e, j, 6, a[48]),
e = n(e, b, c, d, v, 10, a[49]),
d = n(d, e, b, c, C, 15, a[50]),
c = n(c, d, e, b, t, 21, a[51]),
b = n(b, c, d, e, A, 6, a[52]),
e = n(e, b, c, d, r, 10, a[53]),
d = n(d, e, b, c, y, 15, a[54]),
c = n(c, d, e, b, p, 21, a[55]),
b = n(b, c, d, e, w, 6, a[56]),
e = n(e, b, c, d, D, 10, a[57]),
d = n(d, e, b, c, u, 15, a[58]),
c = n(c, d, e, b, B, 21, a[59]),
b = n(b, c, d, e, s, 6, a[60]),
e = n(e, b, c, d, z, 10, a[61]),
d = n(d, e, b, c, q, 15, a[62]),
c = n(c, d, e, b, x, 21, a[63]);
g[0] = g[0] + b | 0;
g[1] = g[1] + c | 0;
g[2] = g[2] + d | 0;
g[3] = g[3] + e | 0;
},
_doFinalize: function _doFinalize() {
var a = this._data,
f = a.words,
g = 8 * this._nDataBytes,
j = 8 * a.sigBytes;
f[j >>> 5] |= 128 << 24 - j % 32;
var h = E.floor(g / 4294967296);
f[(j + 64 >>> 9 << 4) + 15] = (h << 8 | h >>> 24) & 16711935 | (h << 24 | h >>> 8) & 4278255360;
f[(j + 64 >>> 9 << 4) + 14] = (g << 8 | g >>> 24) & 16711935 | (g << 24 | g >>> 8) & 4278255360;
a.sigBytes = 4 * (f.length + 1);
this._process();
a = this._hash;
f = a.words;
for (g = 0; 4 > g; g++) {
j = f[g], f[g] = (j << 8 | j >>> 24) & 16711935 | (j << 24 | j >>> 8) & 4278255360;
}
return a;
},
clone: function clone() {
var a = s.clone.call(this);
a._hash = this._hash.clone();
return a;
}
});
r.MD5 = s._createHelper(q);
r.HmacMD5 = s._createHmacHelper(q);
})(Math);
/*
CryptoJS v3.1.2 sha1-min.js
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function () {
var k = CryptoJS,
b = k.lib,
m = b.WordArray,
l = b.Hasher,
d = [],
b = k.algo.SHA1 = l.extend({
_doReset: function _doReset() {
this._hash = new m.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
},
_doProcessBlock: function _doProcessBlock(n, p) {
for (var a = this._hash.words, e = a[0], f = a[1], h = a[2], j = a[3], b = a[4], c = 0; 80 > c; c++) {
if (16 > c) d[c] = n[p + c] | 0;else {
var g = d[c - 3] ^ d[c - 8] ^ d[c - 14] ^ d[c - 16];
d[c] = g << 1 | g >>> 31;
}
g = (e << 5 | e >>> 27) + b + d[c];
g = 20 > c ? g + ((f & h | ~f & j) + 1518500249) : 40 > c ? g + ((f ^ h ^ j) + 1859775393) : 60 > c ? g + ((f & h | f & j | h & j) - 1894007588) : g + ((f ^ h ^ j) - 899497514);
b = j;
j = h;
h = f << 30 | f >>> 2;
f = e;
e = g;
}
a[0] = a[0] + e | 0;
a[1] = a[1] + f | 0;
a[2] = a[2] + h | 0;
a[3] = a[3] + j | 0;
a[4] = a[4] + b | 0;
},
_doFinalize: function _doFinalize() {
var b = this._data,
d = b.words,
a = 8 * this._nDataBytes,
e = 8 * b.sigBytes;
d[e >>> 5] |= 128 << 24 - e % 32;
d[(e + 64 >>> 9 << 4) + 14] = Math.floor(a / 4294967296);
d[(e + 64 >>> 9 << 4) + 15] = a;
b.sigBytes = 4 * d.length;
this._process();
return this._hash;
},
clone: function clone() {
var b = l.clone.call(this);
b._hash = this._hash.clone();
return b;
}
});
k.SHA1 = l._createHelper(b);
k.HmacSHA1 = l._createHmacHelper(b);
})();
/*
CryptoJS v3.1.2 sha256-min.js
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function (k) {
for (var g = CryptoJS, h = g.lib, v = h.WordArray, j = h.Hasher, h = g.algo, s = [], t = [], u = function u(q) {
return 4294967296 * (q - (q | 0)) | 0;
}, l = 2, b = 0; 64 > b;) {
var d;
a: {
d = l;
for (var w = k.sqrt(d), r = 2; r <= w; r++) {
if (!(d % r)) {
d = !1;
break a;
}
}
d = !0;
}
d && (8 > b && (s[b] = u(k.pow(l, 0.5))), t[b] = u(k.pow(l, 1 / 3)), b++);
l++;
}
var n = [],
h = h.SHA256 = j.extend({
_doReset: function _doReset() {
this._hash = new v.init(s.slice(0));
},
_doProcessBlock: function _doProcessBlock(q, h) {
for (var a = this._hash.words, c = a[0], d = a[1], b = a[2], k = a[3], f = a[4], g = a[5], j = a[6], l = a[7], e = 0; 64 > e; e++) {
if (16 > e) n[e] = q[h + e] | 0;else {
var m = n[e - 15],
p = n[e - 2];
n[e] = ((m << 25 | m >>> 7) ^ (m << 14 | m >>> 18) ^ m >>> 3) + n[e - 7] + ((p << 15 | p >>> 17) ^ (p << 13 | p >>> 19) ^ p >>> 10) + n[e - 16];
}
m = l + ((f << 26 | f >>> 6) ^ (f << 21 | f >>> 11) ^ (f << 7 | f >>> 25)) + (f & g ^ ~f & j) + t[e] + n[e];
p = ((c << 30 | c >>> 2) ^ (c << 19 | c >>> 13) ^ (c << 10 | c >>> 22)) + (c & d ^ c & b ^ d & b);
l = j;
j = g;
g = f;
f = k + m | 0;
k = b;
b = d;
d = c;
c = m + p | 0;
}
a[0] = a[0] + c | 0;
a[1] = a[1] + d | 0;
a[2] = a[2] + b | 0;
a[3] = a[3] + k | 0;
a[4] = a[4] + f | 0;
a[5] = a[5] + g | 0;
a[6] = a[6] + j | 0;
a[7] = a[7] + l | 0;
},
_doFinalize: function _doFinalize() {
var d = this._data,
b = d.words,
a = 8 * this._nDataBytes,
c = 8 * d.sigBytes;
b[c >>> 5] |= 128 << 24 - c % 32;
b[(c + 64 >>> 9 << 4) + 14] = k.floor(a / 4294967296);
b[(c + 64 >>> 9 << 4) + 15] = a;
d.sigBytes = 4 * b.length;
this._process();
return this._hash;
},
clone: function clone() {
var b = j.clone.call(this);
b._hash = this._hash.clone();
return b;
}
});
g.SHA256 = j._createHelper(h);
g.HmacSHA256 = j._createHmacHelper(h);
})(Math);
/*
CryptoJS v3.1.2 sha224-min.js
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function () {
var b = CryptoJS,
d = b.lib.WordArray,
a = b.algo,
c = a.SHA256,
a = a.SHA224 = c.extend({
_doReset: function _doReset() {
this._hash = new d.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]);
},
_doFinalize: function _doFinalize() {
var a = c._doFinalize.call(this);
a.sigBytes -= 4;
return a;
}
});
b.SHA224 = c._createHelper(a);
b.HmacSHA224 = c._createHmacHelper(a);
})();
/*
CryptoJS v3.1.2 sha512-min.js
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function () {
function a() {
return d.create.apply(d, arguments);
}
for (var n = CryptoJS, r = n.lib.Hasher, e = n.x64, d = e.Word, T = e.WordArray, e = n.algo, ea = [a(1116352408, 3609767458), a(1899447441, 602891725), a(3049323471, 3964484399), a(3921009573, 2173295548), a(961987163, 4081628472), a(1508970993, 3053834265), a(2453635748, 2937671579), a(2870763221, 3664609560), a(3624381080, 2734883394), a(310598401, 1164996542), a(607225278, 1323610764), a(1426881987, 3590304994), a(1925078388, 4068182383), a(2162078206, 991336113), a(2614888103, 633803317), a(3248222580, 3479774868), a(3835390401, 2666613458), a(4022224774, 944711139), a(264347078, 2341262773), a(604807628, 2007800933), a(770255983, 1495990901), a(1249150122, 1856431235), a(1555081692, 3175218132), a(1996064986, 2198950837), a(2554220882, 3999719339), a(2821834349, 766784016), a(2952996808, 2566594879), a(3210313671, 3203337956), a(3336571891, 1034457026), a(3584528711, 2466948901), a(113926993, 3758326383), a(338241895, 168717936), a(666307205, 1188179964), a(773529912, 1546045734), a(1294757372, 1522805485), a(1396182291, 2643833823), a(1695183700, 2343527390), a(1986661051, 1014477480), a(2177026350, 1206759142), a(2456956037, 344077627), a(2730485921, 1290863460), a(2820302411, 3158454273), a(3259730800, 3505952657), a(3345764771, 106217008), a(3516065817, 3606008344), a(3600352804, 1432725776), a(4094571909, 1467031594), a(275423344, 851169720), a(430227734, 3100823752), a(506948616, 1363258195), a(659060556, 3750685593), a(883997877, 3785050280), a(958139571, 3318307427), a(1322822218, 3812723403), a(1537002063, 2003034995), a(1747873779, 3602036899), a(1955562222, 1575990012), a(2024104815, 1125592928), a(2227730452, 2716904306), a(2361852424, 442776044), a(2428436474, 593698344), a(2756734187, 3733110249), a(3204031479, 2999351573), a(3329325298, 3815920427), a(3391569614, 3928383900), a(3515267271, 566280711), a(3940187606, 3454069534), a(4118630271, 4000239992), a(116418474, 1914138554), a(174292421, 2731055270), a(289380356, 3203993006), a(460393269, 320620315), a(685471733, 587496836), a(852142971, 1086792851), a(1017036298, 365543100), a(1126000580, 2618297676), a(1288033470, 3409855158), a(1501505948, 4234509866), a(1607167915, 987167468), a(1816402316, 1246189591)], v = [], w = 0; 80 > w; w++) {
v[w] = a();
}
e = e.SHA512 = r.extend({
_doReset: function _doReset() {
this._hash = new T.init([new d.init(1779033703, 4089235720), new d.init(3144134277, 2227873595), new d.init(1013904242, 4271175723), new d.init(2773480762, 1595750129), new d.init(1359893119, 2917565137), new d.init(2600822924, 725511199), new d.init(528734635, 4215389547), new d.init(1541459225, 327033209)]);
},
_doProcessBlock: function _doProcessBlock(a, d) {
for (var f = this._hash.words, F = f[0], e = f[1], n = f[2], r = f[3], G = f[4], H = f[5], I = f[6], f = f[7], w = F.high, J = F.low, X = e.high, K = e.low, Y = n.high, L = n.low, Z = r.high, M = r.low, $ = G.high, N = G.low, aa = H.high, O = H.low, ba = I.high, P = I.low, ca = f.high, Q = f.low, k = w, g = J, z = X, x = K, A = Y, y = L, U = Z, B = M, l = $, h = N, R = aa, C = O, S = ba, D = P, V = ca, E = Q, m = 0; 80 > m; m++) {
var s = v[m];
if (16 > m) var j = s.high = a[d + 2 * m] | 0,
b = s.low = a[d + 2 * m + 1] | 0;else {
var j = v[m - 15],
b = j.high,
p = j.low,
j = (b >>> 1 | p << 31) ^ (b >>> 8 | p << 24) ^ b >>> 7,
p = (p >>> 1 | b << 31) ^ (p >>> 8 | b << 24) ^ (p >>> 7 | b << 25),
u = v[m - 2],
b = u.high,
c = u.low,
u = (b >>> 19 | c << 13) ^ (b << 3 | c >>> 29) ^ b >>> 6,
c = (c >>> 19 | b << 13) ^ (c << 3 | b >>> 29) ^ (c >>> 6 | b << 26),
b = v[m - 7],
W = b.high,
t = v[m - 16],
q = t.high,
t = t.low,
b = p + b.low,
j = j + W + (b >>> 0 < p >>> 0 ? 1 : 0),
b = b + c,
j = j + u + (b >>> 0 < c >>> 0 ? 1 : 0),
b = b + t,
j = j + q + (b >>> 0 < t >>> 0 ? 1 : 0);
s.high = j;
s.low = b;
}
var W = l & R ^ ~l & S,
t = h & C ^ ~h & D,
s = k & z ^ k & A ^ z & A,
T = g & x ^ g & y ^ x & y,
p = (k >>> 28 | g << 4) ^ (k << 30 | g >>> 2) ^ (k << 25 | g >>> 7),
u = (g >>> 28 | k << 4) ^ (g << 30 | k >>> 2) ^ (g << 25 | k >>> 7),
c = ea[m],
fa = c.high,
da = c.low,
c = E + ((h >>> 14 | l << 18) ^ (h >>> 18 | l << 14) ^ (h << 23 | l >>> 9)),
q = V + ((l >>> 14 | h << 18) ^ (l >>> 18 | h << 14) ^ (l << 23 | h >>> 9)) + (c >>> 0 < E >>> 0 ? 1 : 0),
c = c + t,
q = q + W + (c >>> 0 < t >>> 0 ? 1 : 0),
c = c + da,
q = q + fa + (c >>> 0 < da >>> 0 ? 1 : 0),
c = c + b,
q = q + j + (c >>> 0 < b >>> 0 ? 1 : 0),
b = u + T,
s = p + s + (b >>> 0 < u >>> 0 ? 1 : 0),
V = S,
E = D,
S = R,
D = C,
R = l,
C = h,
h = B + c | 0,
l = U + q + (h >>> 0 < B >>> 0 ? 1 : 0) | 0,
U = A,
B = y,
A = z,
y = x,
z = k,
x = g,
g = c + b | 0,
k = q + s + (g >>> 0 < c >>> 0 ? 1 : 0) | 0;
}
J = F.low = J + g;
F.high = w + k + (J >>> 0 < g >>> 0 ? 1 : 0);
K = e.low = K + x;
e.high = X + z + (K >>> 0 < x >>> 0 ? 1 : 0);
L = n.low = L + y;
n.high = Y + A + (L >>> 0 < y >>> 0 ? 1 : 0);
M = r.low = M + B;
r.high = Z + U + (M >>> 0 < B >>> 0 ? 1 : 0);
N = G.low = N + h;
G.high = $ + l + (N >>> 0 < h >>> 0 ? 1 : 0);
O = H.low = O + C;
H.high = aa + R + (O >>> 0 < C >>> 0 ? 1 : 0);
P = I.low = P + D;
I.high = ba + S + (P >>> 0 < D >>> 0 ? 1 : 0);
Q = f.low = Q + E;
f.high = ca + V + (Q >>> 0 < E >>> 0 ? 1 : 0);
},
_doFinalize: function _doFinalize() {
var a = this._data,
d = a.words,
f = 8 * this._nDataBytes,
e = 8 * a.sigBytes;
d[e >>> 5] |= 128 << 24 - e % 32;
d[(e + 128 >>> 10 << 5) + 30] = Math.floor(f / 4294967296);
d[(e + 128 >>> 10 << 5) + 31] = f;
a.sigBytes = 4 * d.length;
this._process();
return this._hash.toX32();
},
clone: function clone() {
var a = r.clone.call(this);
a._hash = this._hash.clone();
return a;
},
blockSize: 32
});
n.SHA512 = r._createHelper(e);
n.HmacSHA512 = r._createHmacHelper(e);
})();
/*
CryptoJS v3.1.2 sha384-min.js
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function () {
var c = CryptoJS,
a = c.x64,
b = a.Word,
e = a.WordArray,
a = c.algo,
d = a.SHA512,
a = a.SHA384 = d.extend({
_doReset: function _doReset() {
this._hash = new e.init([new b.init(3418070365, 3238371032), new b.init(1654270250, 914150663), new b.init(2438529370, 812702999), new b.init(355462360, 4144912697), new b.init(1731405415, 4290775857), new b.init(2394180231, 1750603025), new b.init(3675008525, 1694076839), new b.init(1203062813, 3204075428)]);
},
_doFinalize: function _doFinalize() {
var a = d._doFinalize.call(this);
a.sigBytes -= 16;
return a;
}
});
c.SHA384 = d._createHelper(a);
c.HmacSHA384 = d._createHmacHelper(a);
})();
/*
CryptoJS v3.1.2 ripemd160-min.js
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
/*
(c) 2012 by Cedric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
(function () {
var q = CryptoJS,
d = q.lib,
n = d.WordArray,
p = d.Hasher,
d = q.algo,
x = n.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]),
y = n.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]),
z = n.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]),
A = n.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]),
B = n.create([0, 1518500249, 1859775393, 2400959708, 2840853838]),
C = n.create([1352829926, 1548603684, 1836072691, 2053994217, 0]),
d = d.RIPEMD160 = p.extend({
_doReset: function _doReset() {
this._hash = n.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
},
_doProcessBlock: function _doProcessBlock(e, v) {
for (var b = 0; 16 > b; b++) {
var c = v + b,
f = e[c];
e[c] = (f << 8 | f >>> 24) & 16711935 | (f << 24 | f >>> 8) & 4278255360;
}
var c = this._hash.words,
f = B.words,
d = C.words,
n = x.words,
q = y.words,
p = z.words,
w = A.words,
t,
g,
h,
j,
r,
u,
k,
l,
m,
s;
u = t = c[0];
k = g = c[1];
l = h = c[2];
m = j = c[3];
s = r = c[4];
for (var a, b = 0; 80 > b; b += 1) {
a = t + e[v + n[b]] | 0, a = 16 > b ? a + ((g ^ h ^ j) + f[0]) : 32 > b ? a + ((g & h | ~g & j) + f[1]) : 48 > b ? a + (((g | ~h) ^ j) + f[2]) : 64 > b ? a + ((g & j | h & ~j) + f[3]) : a + ((g ^ (h | ~j)) + f[4]), a |= 0, a = a << p[b] | a >>> 32 - p[b], a = a + r | 0, t = r, r = j, j = h << 10 | h >>> 22, h = g, g = a, a = u + e[v + q[b]] | 0, a = 16 > b ? a + ((k ^ (l | ~m)) + d[0]) : 32 > b ? a + ((k & m | l & ~m) + d[1]) : 48 > b ? a + (((k | ~l) ^ m) + d[2]) : 64 > b ? a + ((k & l | ~k & m) + d[3]) : a + ((k ^ l ^ m) + d[4]), a |= 0, a = a << w[b] | a >>> 32 - w[b], a = a + s | 0, u = s, s = m, m = l << 10 | l >>> 22, l = k, k = a;
}
a = c[1] + h + m | 0;
c[1] = c[2] + j + s | 0;
c[2] = c[3] + r + u | 0;
c[3] = c[4] + t + k | 0;
c[4] = c[0] + g + l | 0;
c[0] = a;
},
_doFinalize: function _doFinalize() {
var e = this._data,
d = e.words,
b = 8 * this._nDataBytes,
c = 8 * e.sigBytes;
d[c >>> 5] |= 128 << 24 - c % 32;
d[(c + 64 >>> 9 << 4) + 14] = (b << 8 | b >>> 24) & 16711935 | (b << 24 | b >>> 8) & 4278255360;
e.sigBytes = 4 * (d.length + 1);
this._process();
e = this._hash;
d = e.words;
for (b = 0; 5 > b; b++) {
c = d[b], d[b] = (c << 8 | c >>> 24) & 16711935 | (c << 24 | c >>> 8) & 4278255360;
}
return e;
},
clone: function clone() {
var d = p.clone.call(this);
d._hash = this._hash.clone();
return d;
}
});
q.RIPEMD160 = p._createHelper(d);
q.HmacRIPEMD160 = p._createHmacHelper(d);
})(Math);
/*
CryptoJS v3.1.2 hmac.js
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function () {
var c = CryptoJS,
k = c.enc.Utf8;
c.algo.HMAC = c.lib.Base.extend({
init: function init(a, b) {
a = this._hasher = new a.init();
"string" == typeof b && (b = k.parse(b));
var c = a.blockSize,
e = 4 * c;
b.sigBytes > e && (b = a.finalize(b));
b.clamp();
for (var f = this._oKey = b.clone(), g = this._iKey = b.clone(), h = f.words, j = g.words, d = 0; d < c; d++) {
h[d] ^= 1549556828, j[d] ^= 909522486;
}
f.sigBytes = g.sigBytes = e;
this.reset();
},
reset: function reset() {
var a = this._hasher;
a.reset();
a.update(this._iKey);
},
update: function update(a) {
this._hasher.update(a);
return this;
},
finalize: function finalize(a) {
var b = this._hasher;
a = b.finalize(a);
b.reset();
return b.finalize(this._oKey.clone().concat(a));
}
});
})();
/*
CryptoJS v3.1.2 pbkdf2-min.js
code.google.com/p/crypto-js
(c) 2009-2013 by Jeff Mott. All rights reserved.
code.google.com/p/crypto-js/wiki/License
*/
(function () {
var b = CryptoJS,
a = b.lib,
d = a.Base,
m = a.WordArray,
a = b.algo,
q = a.HMAC,
l = a.PBKDF2 = d.extend({
cfg: d.extend({
keySize: 4,
hasher: a.SHA1,
iterations: 1
}),
init: function init(a) {
this.cfg = this.cfg.extend(a);
},
compute: function compute(a, b) {
for (var c = this.cfg, f = q.create(c.hasher, a), g = m.create(), d = m.create([1]), l = g.words, r = d.words, n = c.keySize, c = c.iterations; l.length < n;) {
var h = f.update(b).finalize(d);
f.reset();
for (var j = h.words, s = j.length, k = h, p = 1; p < c; p++) {
k = f.finalize(k);
f.reset();
for (var t = k.words, e = 0; e < s; e++) {
j[e] ^= t[e];
}
}
g.concat(h);
r[0]++;
}
g.sigBytes = 4 * n;
return g;
}
});
b.PBKDF2 = function (a, b, c) {
return l.create(c).compute(a, b);
};
})();
/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
*/
var b64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var b64pad = "=";
function hex2b64(d) {
var b;
var e;
var a = "";
for (b = 0; b + 3 <= d.length; b += 3) {
e = parseInt(d.substring(b, b + 3), 16);
a += b64map.charAt(e >> 6) + b64map.charAt(e & 63);
}
if (b + 1 == d.length) {
e = parseInt(d.substring(b, b + 1), 16);
a += b64map.charAt(e << 2);
} else {
if (b + 2 == d.length) {
e = parseInt(d.substring(b, b + 2), 16);
a += b64map.charAt(e >> 2) + b64map.charAt((e & 3) << 4);
}
}
if (b64pad) {
while ((a.length & 3) > 0) {
a += b64pad;
}
}
return a;
}
function b64tohex(f) {
var d = "";
var e;
var b = 0;
var c;
var a;
for (e = 0; e < f.length; ++e) {
if (f.charAt(e) == b64pad) {
break;
}
a = b64map.indexOf(f.charAt(e));
if (a < 0) {
continue;
}
if (b == 0) {
d += int2char(a >> 2);
c = a & 3;
b = 1;
} else {
if (b == 1) {
d += int2char(c << 2 | a >> 4);
c = a & 15;
b = 2;
} else {
if (b == 2) {
d += int2char(c);
d += int2char(a >> 2);
c = a & 3;
b = 3;
} else {
d += int2char(c << 2 | a >> 4);
d += int2char(a & 15);
b = 0;
}
}
}
}
if (b == 1) {
d += int2char(c << 2);
}
return d;
}
function b64toBA(e) {
var d = b64tohex(e);
var c;
var b = new Array();
for (c = 0; 2 * c < d.length; ++c) {
b[c] = parseInt(d.substring(2 * c, 2 * c + 2), 16);
}
return b;
}
;
/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
*/
var dbits;
var canary = 244837814094590;
var j_lm = (canary & 16777215) == 15715070;
function BigInteger(e, d, f) {
if (e != null) {
if ("number" == typeof e) {
this.fromNumber(e, d, f);
} else {
if (d == null && "string" != typeof e) {
this.fromString(e, 256);
} else {
this.fromString(e, d);
}
}
}
}
function nbi() {
return new BigInteger(null);
}
function am1(f, a, b, e, h, g) {
while (--g >= 0) {
var d = a * this[f++] + b[e] + h;
h = Math.floor(d / 67108864);
b[e++] = d & 67108863;
}
return h;
}
function am2(f, q, r, e, o, a) {
var k = q & 32767,
p = q >> 15;
while (--a >= 0) {
var d = this[f] & 32767;
var g = this[f++] >> 15;
var b = p * d + g * k;
d = k * d + ((b & 32767) << 15) + r[e] + (o & 1073741823);
o = (d >>> 30) + (b >>> 15) + p * g + (o >>> 30);
r[e++] = d & 1073741823;
}
return o;
}
function am3(f, q, r, e, o, a) {
var k = q & 16383,
p = q >> 14;
while (--a >= 0) {
var d = this[f] & 16383;
var g = this[f++] >> 14;
var b = p * d + g * k;
d = k * d + ((b & 16383) << 14) + r[e] + o;
o = (d >> 28) + (b >> 14) + p * g;
r[e++] = d & 268435455;
}
return o;
}
if (j_lm && navigator.appName == "Microsoft Internet Explorer") {
BigInteger.prototype.am = am2;
dbits = 30;
} else {
if (j_lm && navigator.appName != "Netscape") {
BigInteger.prototype.am = am1;
dbits = 26;
} else {
BigInteger.prototype.am = am3;
dbits = 28;
}
}
BigInteger.prototype.DB = dbits;
BigInteger.prototype.DM = (1 << dbits) - 1;
BigInteger.prototype.DV = 1 << dbits;
var BI_FP = 52;
BigInteger.prototype.FV = Math.pow(2, BI_FP);
BigInteger.prototype.F1 = BI_FP - dbits;
BigInteger.prototype.F2 = 2 * dbits - BI_FP;
var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz";
var BI_RC = new Array();
var rr, vv;
rr = "0".charCodeAt(0);
for (vv = 0; vv <= 9; ++vv) {
BI_RC[rr++] = vv;
}
rr = "a".charCodeAt(0);
for (vv = 10; vv < 36; ++vv) {
BI_RC[rr++] = vv;
}
rr = "A".charCodeAt(0);
for (vv = 10; vv < 36; ++vv) {
BI_RC[rr++] = vv;
}
function int2char(a) {
return BI_RM.charAt(a);
}
function intAt(b, a) {
var d = BI_RC[b.charCodeAt(a)];
return d == null ? -1 : d;
}
function bnpCopyTo(b) {
for (var a = this.t - 1; a >= 0; --a) {
b[a] = this[a];
}
b.t = this.t;
b.s = this.s;
}
function bnpFromInt(a) {
this.t = 1;
this.s = a < 0 ? -1 : 0;
if (a > 0) {
this[0] = a;
} else {
if (a < -1) {
this[0] = a + this.DV;
} else {
this.t = 0;
}
}
}
function nbv(a) {
var b = nbi();
b.fromInt(a);
return b;
}
function bnpFromString(h, c) {
var e;
if (c == 16) {
e = 4;
} else {
if (c == 8) {
e = 3;
} else {
if (c == 256) {
e = 8;
} else {
if (c == 2) {
e = 1;
} else {
if (c == 32) {
e = 5;
} else {
if (c == 4) {
e = 2;
} else {
this.fromRadix(h, c);
return;
}
}
}
}
}
}
this.t = 0;
this.s = 0;
var g = h.length,
d = false,
f = 0;
while (--g >= 0) {
var a = e == 8 ? h[g] & 255 : intAt(h, g);
if (a < 0) {
if (h.charAt(g) == "-") {
d = true;
}
continue;
}
d = false;
if (f == 0) {
this[this.t++] = a;
} else {
if (f + e > this.DB) {
this[this.t - 1] |= (a & (1 << this.DB - f) - 1) << f;
this[this.t++] = a >> this.DB - f;
} else {
this[this.t - 1] |= a << f;
}
}
f += e;
if (f >= this.DB) {
f -= this.DB;
}
}
if (e == 8 && (h[0] & 128) != 0) {
this.s = -1;
if (f > 0) {
this[this.t - 1] |= (1 << this.DB - f) - 1 << f;
}
}
this.clamp();
if (d) {
BigInteger.ZERO.subTo(this, this);
}
}
function bnpClamp() {
var a = this.s & this.DM;
while (this.t > 0 && this[this.t - 1] == a) {
--this.t;
}
}
function bnToString(c) {
if (this.s < 0) {
return "-" + this.negate().toString(c);
}
var e;
if (c == 16) {
e = 4;
} else {
if (c == 8) {
e = 3;
} else {
if (c == 2) {
e = 1;
} else {
if (c == 32) {
e = 5;
} else {
if (c == 4) {
e = 2;
} else {
return this.toRadix(c);
}
}
}
}
}
var g = (1 << e) - 1,
l,
a = false,
h = "",
f = this.t;
var j = this.DB - f * this.DB % e;
if (f-- > 0) {
if (j < this.DB && (l = this[f] >> j) > 0) {
a = true;
h = int2char(l);
}
while (f >= 0) {
if (j < e) {
l = (this[f] & (1 << j) - 1) << e - j;
l |= this[--f] >> (j += this.DB - e);
} else {
l = this[f] >> (j -= e) & g;
if (j <= 0) {
j += this.DB;
--f;
}
}
if (l > 0) {
a = true;
}
if (a) {
h += int2char(l);
}
}
}
return a ? h : "0";
}
function bnNegate() {
var a = nbi();
BigInteger.ZERO.subTo(this, a);
return a;
}
function bnAbs() {
return this.s < 0 ? this.negate() : this;
}
function bnCompareTo(b) {
var d = this.s - b.s;
if (d != 0) {
return d;
}
var c = this.t;
d = c - b.t;
if (d != 0) {
return this.s < 0 ? -d : d;
}
while (--c >= 0) {
if ((d = this[c] - b[c]) != 0) {
return d;
}
}
return 0;
}
function nbits(a) {
var c = 1,
b;
if ((b = a >>> 16) != 0) {
a = b;
c += 16;
}
if ((b = a >> 8) != 0) {
a = b;
c += 8;
}
if ((b = a >> 4) != 0) {
a = b;
c += 4;
}
if ((b = a >> 2) != 0) {
a = b;
c += 2;
}
if ((b = a >> 1) != 0) {
a = b;
c += 1;
}
return c;
}
function bnBitLength() {
if (this.t <= 0) {
return 0;
}
return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ this.s & this.DM);
}
function bnpDLShiftTo(c, b) {
var a;
for (a = this.t - 1; a >= 0; --a) {
b[a + c] = this[a];
}
for (a = c - 1; a >= 0; --a) {
b[a] = 0;
}
b.t = this.t + c;
b.s = this.s;
}
function bnpDRShiftTo(c, b) {
for (var a = c; a < this.t; ++a) {
b[a - c] = this[a];
}
b.t = Math.max(this.t - c, 0);
b.s = this.s;
}
function bnpLShiftTo(j, e) {
var b = j % this.DB;
var a = this.DB - b;
var g = (1 << a) - 1;
var f = Math.floor(j / this.DB),
h = this.s << b & this.DM,
d;
for (d = this.t - 1; d >= 0; --d) {
e[d + f + 1] = this[d] >> a | h;
h = (this[d] & g) << b;
}
for (d = f - 1; d >= 0; --d) {
e[d] = 0;
}
e[f] = h;
e.t = this.t + f + 1;
e.s = this.s;
e.clamp();
}
function bnpRShiftTo(g, d) {
d.s = this.s;
var e = Math.floor(g / this.DB);
if (e >= this.t) {
d.t = 0;
return;
}
var b = g % this.DB;
var a = this.DB - b;
var f = (1 << b) - 1;
d[0] = this[e] >> b;
for (var c = e + 1; c < this.t; ++c) {
d[c - e - 1] |= (this[c] & f) << a;
d[c - e] = this[c] >> b;
}
if (b > 0) {
d[this.t - e - 1] |= (this.s & f) << a;
}
d.t = this.t - e;
d.clamp();
}
function bnpSubTo(d, f) {
var e = 0,
g = 0,
b = Math.min(d.t, this.t);
while (e < b) {
g += this[e] - d[e];
f[e++] = g & this.DM;
g >>= this.DB;
}
if (d.t < this.t) {
g -= d.s;
while (e < this.t) {
g += this[e];
f[e++] = g & this.DM;
g >>= this.DB;
}
g += this.s;
} else {
g += this.s;
while (e < d.t) {
g -= d[e];
f[e++] = g & this.DM;
g >>= this.DB;
}
g -= d.s;
}
f.s = g < 0 ? -1 : 0;
if (g < -1) {
f[e++] = this.DV + g;
} else {
if (g > 0) {
f[e++] = g;
}
}
f.t = e;
f.clamp();
}
function bnpMultiplyTo(c, e) {
var b = this.abs(),
f = c.abs();
var d = b.t;
e.t = d + f.t;
while (--d >= 0) {
e[d] = 0;
}
for (d = 0; d < f.t; ++d) {
e[d + b.t] = b.am(0, f[d], e, d, 0, b.t);
}
e.s = 0;
e.clamp();
if (this.s != c.s) {
BigInteger.ZERO.subTo(e, e);
}
}
function bnpSquareTo(d) {
var a = this.abs();
var b = d.t = 2 * a.t;
while (--b >= 0) {
d[b] = 0;
}
for (b = 0; b < a.t - 1; ++b) {
var e = a.am(b, a[b], d, 2 * b, 0, 1);
if ((d[b + a.t] += a.am(b + 1, 2 * a[b], d, 2 * b + 1, e, a.t - b - 1)) >= a.DV) {
d[b + a.t] -= a.DV;
d[b + a.t + 1] = 1;
}
}
if (d.t > 0) {
d[d.t - 1] += a.am(b, a[b], d, 2 * b, 0, 1);
}
d.s = 0;
d.clamp();
}
function bnpDivRemTo(n, h, g) {
var w = n.abs();
if (w.t <= 0) {
return;
}
var k = this.abs();
if (k.t < w.t) {
if (h != null) {
h.fromInt(0);
}
if (g != null) {
this.copyTo(g);
}
return;
}
if (g == null) {
g = nbi();
}
var d = nbi(),
a = this.s,
l = n.s;
var v = this.DB - nbits(w[w.t - 1]);
if (v > 0) {
w.lShiftTo(v, d);
k.lShiftTo(v, g);
} else {
w.copyTo(d);
k.copyTo(g);
}
var p = d.t;
var b = d[p - 1];
if (b == 0) {
return;
}
var o = b * (1 << this.F1) + (p > 1 ? d[p - 2] >> this.F2 : 0);
var A = this.FV / o,
z = (1 << this.F1) / o,
x = 1 << this.F2;
var u = g.t,
s = u - p,
f = h == null ? nbi() : h;
d.dlShiftTo(s, f);
if (g.compareTo(f) >= 0) {
g[g.t++] = 1;
g.subTo(f, g);
}
BigInteger.ONE.dlShiftTo(p, f);
f.subTo(d, d);
while (d.t < p) {
d[d.t++] = 0;
}
while (--s >= 0) {
var c = g[--u] == b ? this.DM : Math.floor(g[u] * A + (g[u - 1] + x) * z);
if ((g[u] += d.am(0, c, g, s, 0, p)) < c) {
d.dlShiftTo(s, f);
g.subTo(f, g);
while (g[u] < --c) {
g.subTo(f, g);
}
}
}
if (h != null) {
g.drShiftTo(p, h);
if (a != l) {
BigInteger.ZERO.subTo(h, h);
}
}
g.t = p;
g.clamp();
if (v > 0) {
g.rShiftTo(v, g);
}
if (a < 0) {
BigInteger.ZERO.subTo(g, g);
}
}
function bnMod(b) {
var c = nbi();
this.abs().divRemTo(b, null, c);
if (this.s < 0 && c.compareTo(BigInteger.ZERO) > 0) {
b.subTo(c, c);
}
return c;
}
function Classic(a) {
this.m = a;
}
function cConvert(a) {
if (a.s < 0 || a.compareTo(this.m) >= 0) {
return a.mod(this.m);
} else {
return a;
}
}
function cRevert(a) {
return a;
}
function cReduce(a) {
a.divRemTo(this.m, null, a);
}
function cMulTo(a, c, b) {
a.multiplyTo(c, b);
this.reduce(b);
}
function cSqrTo(a, b) {
a.squareTo(b);
this.reduce(b);
}
Classic.prototype.convert = cConvert;
Classic.prototype.revert = cRevert;
Classic.prototype.reduce = cReduce;
Classic.prototype.mulTo = cMulTo;
Classic.prototype.sqrTo = cSqrTo;
function bnpInvDigit() {
if (this.t < 1) {
return 0;
}
var a = this[0];
if ((a & 1) == 0) {
return 0;
}
var b = a & 3;
b = b * (2 - (a & 15) * b) & 15;
b = b * (2 - (a & 255) * b) & 255;
b = b * (2 - ((a & 65535) * b & 65535)) & 65535;
b = b * (2 - a * b % this.DV) % this.DV;
return b > 0 ? this.DV - b : -b;
}
function Montgomery(a) {
this.m = a;
this.mp = a.invDigit();
this.mpl = this.mp & 32767;
this.mph = this.mp >> 15;
this.um = (1 << a.DB - 15) - 1;
this.mt2 = 2 * a.t;
}
function montConvert(a) {
var b = nbi();
a.abs().dlShiftTo(this.m.t, b);
b.divRemTo(this.m, null, b);
if (a.s < 0 && b.compareTo(BigInteger.ZERO) > 0) {
this.m.subTo(b, b);
}
return b;
}
function montRevert(a) {
var b = nbi();
a.copyTo(b);
this.reduce(b);
return b;
}
function montReduce(a) {
while (a.t <= this.mt2) {
a[a.t++] = 0;
}
for (var c = 0; c < this.m.t; ++c) {
var b = a[c] & 32767;
var d = b * this.mpl + ((b * this.mph + (a[c] >> 15) * this.mpl & this.um) << 15) & a.DM;
b = c + this.m.t;
a[b] += this.m.am(0, d, a, c, 0, this.m.t);
while (a[b] >= a.DV) {
a[b] -= a.DV;
a[++b]++;
}
}
a.clamp();
a.drShiftTo(this.m.t, a);
if (a.compareTo(this.m) >= 0) {
a.subTo(this.m, a);
}
}
function montSqrTo(a, b) {
a.squareTo(b);
this.reduce(b);
}
function montMulTo(a, c, b) {
a.multiplyTo(c, b);
this.reduce(b);
}
Montgomery.prototype.convert = montConvert;
Montgomery.prototype.revert = montRevert;
Montgomery.prototype.reduce = montReduce;
Montgomery.prototype.mulTo = montMulTo;
Montgomery.prototype.sqrTo = montSqrTo;
function bnpIsEven() {
return (this.t > 0 ? this[0] & 1 : this.s) == 0;
}
function bnpExp(h, j) {
if (h > 4294967295 || h < 1) {
return BigInteger.ONE;
}
var f = nbi(),
a = nbi(),
d = j.convert(this),
c = nbits(h) - 1;
d.copyTo(f);
while (--c >= 0) {
j.sqrTo(f, a);
if ((h & 1 << c) > 0) {
j.mulTo(a, d, f);
} else {
var b = f;
f = a;
a = b;
}
}
return j.revert(f);
}
function bnModPowInt(b, a) {
var c;
if (b < 256 || a.isEven()) {
c = new Classic(a);
} else {
c = new Montgomery(a);
}
return this.exp(b, c);
}
BigInteger.prototype.copyTo = bnpCopyTo;
BigInteger.prototype.fromInt = bnpFromInt;
BigInteger.prototype.fromString = bnpFromString;
BigInteger.prototype.clamp = bnpClamp;
BigInteger.prototype.dlShiftTo = bnpDLShiftTo;
BigInteger.prototype.drShiftTo = bnpDRShiftTo;
BigInteger.prototype.lShiftTo = bnpLShiftTo;
BigInteger.prototype.rShiftTo = bnpRShiftTo;
BigInteger.prototype.subTo = bnpSubTo;
BigInteger.prototype.multiplyTo = bnpMultiplyTo;
BigInteger.prototype.squareTo = bnpSquareTo;
BigInteger.prototype.divRemTo = bnpDivRemTo;
BigInteger.prototype.invDigit = bnpInvDigit;
BigInteger.prototype.isEven = bnpIsEven;
BigInteger.prototype.exp = bnpExp;
BigInteger.prototype.toString = bnToString;
BigInteger.prototype.negate = bnNegate;
BigInteger.prototype.abs = bnAbs;
BigInteger.prototype.compareTo = bnCompareTo;
BigInteger.prototype.bitLength = bnBitLength;
BigInteger.prototype.mod = bnMod;
BigInteger.prototype.modPowInt = bnModPowInt;
BigInteger.ZERO = nbv(0);
BigInteger.ONE = nbv(1);
/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
*/
function bnClone() {
var a = nbi();
this.copyTo(a);
return a;
}
function bnIntValue() {
if (this.s < 0) {
if (this.t == 1) {
return this[0] - this.DV;
} else {
if (this.t == 0) {
return -1;
}
}
} else {
if (this.t == 1) {
return this[0];
} else {
if (this.t == 0) {
return 0;
}
}
}
return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];
}
function bnByteValue() {
return this.t == 0 ? this.s : this[0] << 24 >> 24;
}
function bnShortValue() {
return this.t == 0 ? this.s : this[0] << 16 >> 16;
}
function bnpChunkSize(a) {
return Math.floor(Math.LN2 * this.DB / Math.log(a));
}
function bnSigNum() {
if (this.s < 0) {
return -1;
} else {
if (this.t <= 0 || this.t == 1 && this[0] <= 0) {
return 0;
} else {
return 1;
}
}
}
function bnpToRadix(c) {
if (c == null) {
c = 10;
}
if (this.signum() == 0 || c < 2 || c > 36) {
return "0";
}
var f = this.chunkSize(c);
var e = Math.pow(c, f);
var i = nbv(e),
j = nbi(),
h = nbi(),
g = "";
this.divRemTo(i, j, h);
while (j.signum() > 0) {
g = (e + h.intValue()).toString(c).substr(1) + g;
j.divRemTo(i, j, h);
}
return h.intValue().toString(c) + g;
}
function bnpFromRadix(m, h) {
this.fromInt(0);
if (h == null) {
h = 10;
}
var f = this.chunkSize(h);
var g = Math.pow(h, f),
e = false,
a = 0,
l = 0;
for (var c = 0; c < m.length; ++c) {
var k = intAt(m, c);
if (k < 0) {
if (m.charAt(c) == "-" && this.signum() == 0) {
e = true;
}
continue;
}
l = h * l + k;
if (++a >= f) {
this.dMultiply(g);
this.dAddOffset(l, 0);
a = 0;
l = 0;
}
}
if (a > 0) {
this.dMultiply(Math.pow(h, a));
this.dAddOffset(l, 0);
}
if (e) {
BigInteger.ZERO.subTo(this, this);
}
}
function bnpFromNumber(f, e, h) {
if ("number" == typeof e) {
if (f < 2) {
this.fromInt(1);
} else {
this.fromNumber(f, h);
if (!this.testBit(f - 1)) {
this.bitwiseTo(BigInteger.ONE.shiftLeft(f - 1), op_or, this);
}
if (this.isEven()) {
this.dAddOffset(1, 0);
}
while (!this.isProbablePrime(e)) {
this.dAddOffset(2, 0);
if (this.bitLength() > f) {
this.subTo(BigInteger.ONE.shiftLeft(f - 1), this);
}
}
}
} else {
var d = new Array(),
g = f & 7;
d.length = (f >> 3) + 1;
e.nextBytes(d);
if (g > 0) {
d[0] &= (1 << g) - 1;
} else {
d[0] = 0;
}
this.fromString(d, 256);
}
}
function bnToByteArray() {
var b = this.t,
c = new Array();
c[0] = this.s;
var e = this.DB - b * this.DB % 8,
f,
a = 0;
if (b-- > 0) {
if (e < this.DB && (f = this[b] >> e) != (this.s & this.DM) >> e) {
c[a++] = f | this.s << this.DB - e;
}
while (b >= 0) {
if (e < 8) {
f = (this[b] & (1 << e) - 1) << 8 - e;
f |= this[--b] >> (e += this.DB - 8);
} else {
f = this[b] >> (e -= 8) & 255;
if (e <= 0) {
e += this.DB;
--b;
}
}
if ((f & 128) != 0) {
f |= -256;
}
if (a == 0 && (this.s & 128) != (f & 128)) {
++a;
}
if (a > 0 || f != this.s) {
c[a++] = f;
}
}
}
return c;
}
function bnEquals(b) {
return this.compareTo(b) == 0;
}
function bnMin(b) {
return this.compareTo(b) < 0 ? this : b;
}
function bnMax(b) {
return this.compareTo(b) > 0 ? this : b;
}
function bnpBitwiseTo(c, h, e) {
var d,
g,
b = Math.min(c.t, this.t);
for (d = 0; d < b; ++d) {
e[d] = h(this[d], c[d]);
}
if (c.t < this.t) {
g = c.s & this.DM;
for (d = b; d < this.t; ++d) {
e[d] = h(this[d], g);
}
e.t = this.t;
} else {
g = this.s & this.DM;
for (d = b; d < c.t; ++d) {
e[d] = h(g, c[d]);
}
e.t = c.t;
}
e.s = h(this.s, c.s);
e.clamp();
}
function op_and(a, b) {
return a & b;
}
function bnAnd(b) {
var c = nbi();
this.bitwiseTo(b, op_and, c);
return c;
}
function op_or(a, b) {
return a | b;
}
function bnOr(b) {
var c = nbi();
this.bitwiseTo(b, op_or, c);
return c;
}
function op_xor(a, b) {
return a ^ b;
}
function bnXor(b) {
var c = nbi();
this.bitwiseTo(b, op_xor, c);
return c;
}
function op_andnot(a, b) {
return a & ~b;
}
function bnAndNot(b) {
var c = nbi();
this.bitwiseTo(b, op_andnot, c);
return c;
}
function bnNot() {
var b = nbi();
for (var a = 0; a < this.t; ++a) {
b[a] = this.DM & ~this[a];
}
b.t = this.t;
b.s = ~this.s;
return b;
}
function bnShiftLeft(b) {
var a = nbi();
if (b < 0) {
this.rShiftTo(-b, a);
} else {
this.lShiftTo(b, a);
}
return a;
}
function bnShiftRight(b) {
var a = nbi();
if (b < 0) {
this.lShiftTo(-b, a);
} else {
this.rShiftTo(b, a);
}
return a;
}
function lbit(a) {
if (a == 0) {
return -1;
}
var b = 0;
if ((a & 65535) == 0) {
a >>= 16;
b += 16;
}
if ((a & 255) == 0) {
a >>= 8;
b += 8;
}
if ((a & 15) == 0) {
a >>= 4;
b += 4;
}
if ((a & 3) == 0) {
a >>= 2;
b += 2;
}
if ((a & 1) == 0) {
++b;
}
return b;
}
function bnGetLowestSetBit() {
for (var a = 0; a < this.t; ++a) {
if (this[a] != 0) {
return a * this.DB + lbit(this[a]);
}
}
if (this.s < 0) {
return this.t * this.DB;
}
return -1;
}
function cbit(a) {
var b = 0;
while (a != 0) {
a &= a - 1;
++b;
}
return b;
}
function bnBitCount() {
var c = 0,
a = this.s & this.DM;
for (var b = 0; b < this.t; ++b) {
c += cbit(this[b] ^ a);
}
return c;
}
function bnTestBit(b) {
var a = Math.floor(b / this.DB);
if (a >= this.t) {
return this.s != 0;
}
return (this[a] & 1 << b % this.DB) != 0;
}
function bnpChangeBit(c, b) {
var a = BigInteger.ONE.shiftLeft(c);
this.bitwiseTo(a, b, a);
return a;
}
function bnSetBit(a) {
return this.changeBit(a, op_or);
}
function bnClearBit(a) {
return this.changeBit(a, op_andnot);
}
function bnFlipBit(a) {
return this.changeBit(a, op_xor);
}
function bnpAddTo(d, f) {
var e = 0,
g = 0,
b = Math.min(d.t, this.t);
while (e < b) {
g += this[e] + d[e];
f[e++] = g & this.DM;
g >>= this.DB;
}
if (d.t < this.t) {
g += d.s;
while (e < this.t) {
g += this[e];
f[e++] = g & this.DM;
g >>= this.DB;
}
g += this.s;
} else {
g += this.s;
while (e < d.t) {
g += d[e];
f[e++] = g & this.DM;
g >>= this.DB;
}
g += d.s;
}
f.s = g < 0 ? -1 : 0;
if (g > 0) {
f[e++] = g;
} else {
if (g < -1) {
f[e++] = this.DV + g;
}
}
f.t = e;
f.clamp();
}
function bnAdd(b) {
var c = nbi();
this.addTo(b, c);
return c;
}
function bnSubtract(b) {
var c = nbi();
this.subTo(b, c);
return c;
}
function bnMultiply(b) {
var c = nbi();
this.multiplyTo(b, c);
return c;
}
function bnSquare() {
var a = nbi();
this.squareTo(a);
return a;
}
function bnDivide(b) {
var c = nbi();
this.divRemTo(b, c, null);
return c;
}
function bnRemainder(b) {
var c = nbi();
this.divRemTo(b, null, c);
return c;
}
function bnDivideAndRemainder(b) {
var d = nbi(),
c = nbi();
this.divRemTo(b, d, c);
return new Array(d, c);
}
function bnpDMultiply(a) {
this[this.t] = this.am(0, a - 1, this, 0, 0, this.t);
++this.t;
this.clamp();
}
function bnpDAddOffset(b, a) {
if (b == 0) {
return;
}
while (this.t <= a) {
this[this.t++] = 0;
}
this[a] += b;
while (this[a] >= this.DV) {
this[a] -= this.DV;
if (++a >= this.t) {
this[this.t++] = 0;
}
++this[a];
}
}
function NullExp() {}
function nNop(a) {
return a;
}
function nMulTo(a, c, b) {
a.multiplyTo(c, b);
}
function nSqrTo(a, b) {
a.squareTo(b);
}
NullExp.prototype.convert = nNop;
NullExp.prototype.revert = nNop;
NullExp.prototype.mulTo = nMulTo;
NullExp.prototype.sqrTo = nSqrTo;
function bnPow(a) {
return this.exp(a, new NullExp());
}
function bnpMultiplyLowerTo(b, f, e) {
var d = Math.min(this.t + b.t, f);
e.s = 0;
e.t = d;
while (d > 0) {
e[--d] = 0;
}
var c;
for (c = e.t - this.t; d < c; ++d) {
e[d + this.t] = this.am(0, b[d], e, d, 0, this.t);
}
for (c = Math.min(b.t, f); d < c; ++d) {
this.am(0, b[d], e, d, 0, f - d);
}
e.clamp();
}
function bnpMultiplyUpperTo(b, e, d) {
--e;
var c = d.t = this.t + b.t - e;
d.s = 0;
while (--c >= 0) {
d[c] = 0;
}
for (c = Math.max(e - this.t, 0); c < b.t; ++c) {
d[this.t + c - e] = this.am(e - c, b[c], d, 0, 0, this.t + c - e);
}
d.clamp();
d.drShiftTo(1, d);
}
function Barrett(a) {
this.r2 = nbi();
this.q3 = nbi();
BigInteger.ONE.dlShiftTo(2 * a.t, this.r2);
this.mu = this.r2.divide(a);
this.m = a;
}
function barrettConvert(a) {
if (a.s < 0 || a.t > 2 * this.m.t) {
return a.mod(this.m);
} else {
if (a.compareTo(this.m) < 0) {
return a;
} else {
var b = nbi();
a.copyTo(b);
this.reduce(b);
return b;
}
}
}
function barrettRevert(a) {
return a;
}
function barrettReduce(a) {
a.drShiftTo(this.m.t - 1, this.r2);
if (a.t > this.m.t + 1) {
a.t = this.m.t + 1;
a.clamp();
}
this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3);
this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2);
while (a.compareTo(this.r2) < 0) {
a.dAddOffset(1, this.m.t + 1);
}
a.subTo(this.r2, a);
while (a.compareTo(this.m) >= 0) {
a.subTo(this.m, a);
}
}
function barrettSqrTo(a, b) {
a.squareTo(b);
this.reduce(b);
}
function barrettMulTo(a, c, b) {
a.multiplyTo(c, b);
this.reduce(b);
}
Barrett.prototype.convert = barrettConvert;
Barrett.prototype.revert = barrettRevert;
Barrett.prototype.reduce = barrettReduce;
Barrett.prototype.mulTo = barrettMulTo;
Barrett.prototype.sqrTo = barrettSqrTo;
function bnModPow(q, f) {
var o = q.bitLength(),
h,
b = nbv(1),
v;
if (o <= 0) {
return b;
} else {
if (o < 18) {
h = 1;
} else {
if (o < 48) {
h = 3;
} else {
if (o < 144) {
h = 4;
} else {
if (o < 768) {
h = 5;
} else {
h = 6;
}
}
}
}
}
if (o < 8) {
v = new Classic(f);
} else {
if (f.isEven()) {
v = new Barrett(f);
} else {
v = new Montgomery(f);
}
}
var p = new Array(),
d = 3,
s = h - 1,
a = (1 << h) - 1;
p[1] = v.convert(this);
if (h > 1) {
var A = nbi();
v.sqrTo(p[1], A);
while (d <= a) {
p[d] = nbi();
v.mulTo(A, p[d - 2], p[d]);
d += 2;
}
}
var l = q.t - 1,
x,
u = true,
c = nbi(),
y;
o = nbits(q[l]) - 1;
while (l >= 0) {
if (o >= s) {
x = q[l] >> o - s & a;
} else {
x = (q[l] & (1 << o + 1) - 1) << s - o;
if (l > 0) {
x |= q[l - 1] >> this.DB + o - s;
}
}
d = h;
while ((x & 1) == 0) {
x >>= 1;
--d;
}
if ((o -= d) < 0) {
o += this.DB;
--l;
}
if (u) {
p[x].copyTo(b);
u = false;
} else {
while (d > 1) {
v.sqrTo(b, c);
v.sqrTo(c, b);
d -= 2;
}
if (d > 0) {
v.sqrTo(b, c);
} else {
y = b;
b = c;
c = y;
}
v.mulTo(c, p[x], b);
}
while (l >= 0 && (q[l] & 1 << o) == 0) {
v.sqrTo(b, c);
y = b;
b = c;
c = y;
if (--o < 0) {
o = this.DB - 1;
--l;
}
}
}
return v.revert(b);
}
function bnGCD(c) {
var b = this.s < 0 ? this.negate() : this.clone();
var h = c.s < 0 ? c.negate() : c.clone();
if (b.compareTo(h) < 0) {
var e = b;
b = h;
h = e;
}
var d = b.getLowestSetBit(),
f = h.getLowestSetBit();
if (f < 0) {
return b;
}
if (d < f) {
f = d;
}
if (f > 0) {
b.rShiftTo(f, b);
h.rShiftTo(f, h);
}
while (b.signum() > 0) {
if ((d = b.getLowestSetBit()) > 0) {
b.rShiftTo(d, b);
}
if ((d = h.getLowestSetBit()) > 0) {
h.rShiftTo(d, h);
}
if (b.compareTo(h) >= 0) {
b.subTo(h, b);
b.rShiftTo(1, b);
} else {
h.subTo(b, h);
h.rShiftTo(1, h);
}
}
if (f > 0) {
h.lShiftTo(f, h);
}
return h;
}
function bnpModInt(e) {
if (e <= 0) {
return 0;
}
var c = this.DV % e,
b = this.s < 0 ? e - 1 : 0;
if (this.t > 0) {
if (c == 0) {
b = this[0] % e;
} else {
for (var a = this.t - 1; a >= 0; --a) {
b = (c * b + this[a]) % e;
}
}
}
return b;
}
function bnModInverse(f) {
var j = f.isEven();
if (this.isEven() && j || f.signum() == 0) {
return BigInteger.ZERO;
}
var i = f.clone(),
h = this.clone();
var g = nbv(1),
e = nbv(0),
l = nbv(0),
k = nbv(1);
while (i.signum() != 0) {
while (i.isEven()) {
i.rShiftTo(1, i);
if (j) {
if (!g.isEven() || !e.isEven()) {
g.addTo(this, g);
e.subTo(f, e);
}
g.rShiftTo(1, g);
} else {
if (!e.isEven()) {
e.subTo(f, e);
}
}
e.rShiftTo(1, e);
}
while (h.isEven()) {
h.rShiftTo(1, h);
if (j) {
if (!l.isEven() || !k.isEven()) {
l.addTo(this, l);
k.subTo(f, k);
}
l.rShiftTo(1, l);
} else {
if (!k.isEven()) {
k.subTo(f, k);
}
}
k.rShiftTo(1, k);
}
if (i.compareTo(h) >= 0) {
i.subTo(h, i);
if (j) {
g.subTo(l, g);
}
e.subTo(k, e);
} else {
h.subTo(i, h);
if (j) {
l.subTo(g, l);
}
k.subTo(e, k);
}
}
if (h.compareTo(BigInteger.ONE) != 0) {
return BigInteger.ZERO;
}
if (k.compareTo(f) >= 0) {
return k.subtract(f);
}
if (k.signum() < 0) {
k.addTo(f, k);
} else {
return k;
}
if (k.signum() < 0) {
return k.add(f);
} else {
return k;
}
}
var lowprimes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997];
var lplim = (1 << 26) / lowprimes[lowprimes.length - 1];
function bnIsProbablePrime(e) {
var d,
b = this.abs();
if (b.t == 1 && b[0] <= lowprimes[lowprimes.length - 1]) {
for (d = 0; d < lowprimes.length; ++d) {
if (b[0] == lowprimes[d]) {
return true;
}
}
return false;
}
if (b.isEven()) {
return false;
}
d = 1;
while (d < lowprimes.length) {
var a = lowprimes[d],
c = d + 1;
while (c < lowprimes.length && a < lplim) {
a *= lowprimes[c++];
}
a = b.modInt(a);
while (d < c) {
if (a % lowprimes[d++] == 0) {
return false;
}
}
}
return b.millerRabin(e);
}
function bnpMillerRabin(f) {
var g = this.subtract(BigInteger.ONE);
var c = g.getLowestSetBit();
if (c <= 0) {
return false;
}
var h = g.shiftRight(c);
f = f + 1 >> 1;
if (f > lowprimes.length) {
f = lowprimes.length;
}
var b = nbi();
for (var e = 0; e < f; ++e) {
b.fromInt(lowprimes[Math.floor(Math.random() * lowprimes.length)]);
var l = b.modPow(h, this);
if (l.compareTo(BigInteger.ONE) != 0 && l.compareTo(g) != 0) {
var d = 1;
while (d++ < c && l.compareTo(g) != 0) {
l = l.modPowInt(2, this);
if (l.compareTo(BigInteger.ONE) == 0) {
return false;
}
}
if (l.compareTo(g) != 0) {
return false;
}
}
}
return true;
}
BigInteger.prototype.chunkSize = bnpChunkSize;
BigInteger.prototype.toRadix = bnpToRadix;
BigInteger.prototype.fromRadix = bnpFromRadix;
BigInteger.prototype.fromNumber = bnpFromNumber;
BigInteger.prototype.bitwiseTo = bnpBitwiseTo;
BigInteger.prototype.changeBit = bnpChangeBit;
BigInteger.prototype.addTo = bnpAddTo;
BigInteger.prototype.dMultiply = bnpDMultiply;
BigInteger.prototype.dAddOffset = bnpDAddOffset;
BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;
BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;
BigInteger.prototype.modInt = bnpModInt;
BigInteger.prototype.millerRabin = bnpMillerRabin;
BigInteger.prototype.clone = bnClone;
BigInteger.prototype.intValue = bnIntValue;
BigInteger.prototype.byteValue = bnByteValue;
BigInteger.prototype.shortValue = bnShortValue;
BigInteger.prototype.signum = bnSigNum;
BigInteger.prototype.toByteArray = bnToByteArray;
BigInteger.prototype.equals = bnEquals;
BigInteger.prototype.min = bnMin;
BigInteger.prototype.max = bnMax;
BigInteger.prototype.and = bnAnd;
BigInteger.prototype.or = bnOr;
BigInteger.prototype.xor = bnXor;
BigInteger.prototype.andNot = bnAndNot;
BigInteger.prototype.not = bnNot;
BigInteger.prototype.shiftLeft = bnShiftLeft;
BigInteger.prototype.shiftRight = bnShiftRight;
BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;
BigInteger.prototype.bitCount = bnBitCount;
BigInteger.prototype.testBit = bnTestBit;
BigInteger.prototype.setBit = bnSetBit;
BigInteger.prototype.clearBit = bnClearBit;
BigInteger.prototype.flipBit = bnFlipBit;
BigInteger.prototype.add = bnAdd;
BigInteger.prototype.subtract = bnSubtract;
BigInteger.prototype.multiply = bnMultiply;
BigInteger.prototype.divide = bnDivide;
BigInteger.prototype.remainder = bnRemainder;
BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;
BigInteger.prototype.modPow = bnModPow;
BigInteger.prototype.modInverse = bnModInverse;
BigInteger.prototype.pow = bnPow;
BigInteger.prototype.gcd = bnGCD;
BigInteger.prototype.isProbablePrime = bnIsProbablePrime;
BigInteger.prototype.square = bnSquare;
/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
*/
function Arcfour() {
this.i = 0;
this.j = 0;
this.S = new Array();
}
function ARC4init(d) {
var c, a, b;
for (c = 0; c < 256; ++c) {
this.S[c] = c;
}
a = 0;
for (c = 0; c < 256; ++c) {
a = a + this.S[c] + d[c % d.length] & 255;
b = this.S[c];
this.S[c] = this.S[a];
this.S[a] = b;
}
this.i = 0;
this.j = 0;
}
function ARC4next() {
var a;
this.i = this.i + 1 & 255;
this.j = this.j + this.S[this.i] & 255;
a = this.S[this.i];
this.S[this.i] = this.S[this.j];
this.S[this.j] = a;
return this.S[a + this.S[this.i] & 255];
}
Arcfour.prototype.init = ARC4init;
Arcfour.prototype.next = ARC4next;
function prng_newstate() {
return new Arcfour();
}
var rng_psize = 256;
/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
*/
var rng_state;
var rng_pool;
var rng_pptr;
function rng_seed_int(a) {
rng_pool[rng_pptr++] ^= a & 255;
rng_pool[rng_pptr++] ^= a >> 8 & 255;
rng_pool[rng_pptr++] ^= a >> 16 & 255;
rng_pool[rng_pptr++] ^= a >> 24 & 255;
if (rng_pptr >= rng_psize) {
rng_pptr -= rng_psize;
}
}
function rng_seed_time() {
rng_seed_int(new Date().getTime());
}
if (rng_pool == null) {
rng_pool = new Array();
rng_pptr = 0;
var t;
if (window !== undefined && (window.crypto !== undefined || window.msCrypto !== undefined)) {
var crypto = window.crypto || window.msCrypto;
if (crypto.getRandomValues) {
var ua = new Uint8Array(32);
crypto.getRandomValues(ua);
for (t = 0; t < 32; ++t) {
rng_pool[rng_pptr++] = ua[t];
}
} else {
if (navigator.appName == "Netscape" && navigator.appVersion < "5") {
var z = window.crypto.random(32);
for (t = 0; t < z.length; ++t) {
rng_pool[rng_pptr++] = z.charCodeAt(t) & 255;
}
}
}
}
while (rng_pptr < rng_psize) {
t = Math.floor(65536 * Math.random());
rng_pool[rng_pptr++] = t >>> 8;
rng_pool[rng_pptr++] = t & 255;
}
rng_pptr = 0;
rng_seed_time();
}
function rng_get_byte() {
if (rng_state == null) {
rng_seed_time();
rng_state = prng_newstate();
rng_state.init(rng_pool);
for (rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) {
rng_pool[rng_pptr] = 0;
}
rng_pptr = 0;
}
return rng_state.next();
}
function rng_get_bytes(b) {
var a;
for (a = 0; a < b.length; ++a) {
b[a] = rng_get_byte();
}
}
function SecureRandom() {}
SecureRandom.prototype.nextBytes = rng_get_bytes;
/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
*/
function parseBigInt(b, a) {
return new BigInteger(b, a);
}
function linebrk(c, d) {
var a = "";
var b = 0;
while (b + d < c.length) {
a += c.substring(b, b + d) + "\n";
b += d;
}
return a + c.substring(b, c.length);
}
function byte2Hex(a) {
if (a < 16) {
return "0" + a.toString(16);
} else {
return a.toString(16);
}
}
function pkcs1pad2(e, h) {
if (h < e.length + 11) {
throw "Message too long for RSA";
return null;
}
var g = new Array();
var d = e.length - 1;
while (d >= 0 && h > 0) {
var f = e.charCodeAt(d--);
if (f < 128) {
g[--h] = f;
} else {
if (f > 127 && f < 2048) {
g[--h] = f & 63 | 128;
g[--h] = f >> 6 | 192;
} else {
g[--h] = f & 63 | 128;
g[--h] = f >> 6 & 63 | 128;
g[--h] = f >> 12 | 224;
}
}
}
g[--h] = 0;
var b = new SecureRandom();
var a = new Array();
while (h > 2) {
a[0] = 0;
while (a[0] == 0) {
b.nextBytes(a);
}
g[--h] = a[0];
}
g[--h] = 2;
g[--h] = 0;
return new BigInteger(g);
}
function oaep_mgf1_arr(c, a, e) {
var b = "",
d = 0;
while (b.length < a) {
b += e(String.fromCharCode.apply(String, c.concat([(d & 4278190080) >> 24, (d & 16711680) >> 16, (d & 65280) >> 8, d & 255])));
d += 1;
}
return b;
}
function oaep_pad(q, a, f, l) {
var c = KJUR.crypto.MessageDigest;
var o = KJUR.crypto.Util;
var b = null;
if (!f) {
f = "sha1";
}
if (typeof f === "string") {
b = c.getCanonicalAlgName(f);
l = c.getHashLength(b);
f = function f(i) {
return hextorstr(o.hashHex(rstrtohex(i), b));
};
}
if (q.length + 2 * l + 2 > a) {
throw "Message too long for RSA";
}
var k = "",
e;
for (e = 0; e < a - q.length - 2 * l - 2; e += 1) {
k += "\x00";
}
var h = f("") + k + "\x01" + q;
var g = new Array(l);
new SecureRandom().nextBytes(g);
var j = oaep_mgf1_arr(g, h.length, f);
var p = [];
for (e = 0; e < h.length; e += 1) {
p[e] = h.charCodeAt(e) ^ j.charCodeAt(e);
}
var m = oaep_mgf1_arr(p, g.length, f);
var d = [0];
for (e = 0; e < g.length; e += 1) {
d[e + 1] = g[e] ^ m.charCodeAt(e);
}
return new BigInteger(d.concat(p));
}
function RSAKey() {
this.n = null;
this.e = 0;
this.d = null;
this.p = null;
this.q = null;
this.dmp1 = null;
this.dmq1 = null;
this.coeff = null;
}
function RSASetPublic(b, a) {
this.isPublic = true;
this.isPrivate = false;
if (typeof b !== "string") {
this.n = b;
this.e = a;
} else {
if (b != null && a != null && b.length > 0 && a.length > 0) {
this.n = parseBigInt(b, 16);
this.e = parseInt(a, 16);
} else {
throw "Invalid RSA public key";
}
}
}
function RSADoPublic(a) {
return a.modPowInt(this.e, this.n);
}
function RSAEncrypt(d) {
var a = pkcs1pad2(d, this.n.bitLength() + 7 >> 3);
if (a == null) {
return null;
}
var e = this.doPublic(a);
if (e == null) {
return null;
}
var b = e.toString(16);
if ((b.length & 1) == 0) {
return b;
} else {
return "0" + b;
}
}
function RSAEncryptOAEP(f, e, b) {
var a = oaep_pad(f, this.n.bitLength() + 7 >> 3, e, b);
if (a == null) {
return null;
}
var g = this.doPublic(a);
if (g == null) {
return null;
}
var d = g.toString(16);
if ((d.length & 1) == 0) {
return d;
} else {
return "0" + d;
}
}
RSAKey.prototype.doPublic = RSADoPublic;
RSAKey.prototype.setPublic = RSASetPublic;
RSAKey.prototype.encrypt = RSAEncrypt;
RSAKey.prototype.encryptOAEP = RSAEncryptOAEP;
RSAKey.prototype.type = "RSA";
/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
*/
function pkcs1unpad2(g, j) {
var a = g.toByteArray();
var f = 0;
while (f < a.length && a[f] == 0) {
++f;
}
if (a.length - f != j - 1 || a[f] != 2) {
return null;
}
++f;
while (a[f] != 0) {
if (++f >= a.length) {
return null;
}
}
var e = "";
while (++f < a.length) {
var h = a[f] & 255;
if (h < 128) {
e += String.fromCharCode(h);
} else {
if (h > 191 && h < 224) {
e += String.fromCharCode((h & 31) << 6 | a[f + 1] & 63);
++f;
} else {
e += String.fromCharCode((h & 15) << 12 | (a[f + 1] & 63) << 6 | a[f + 2] & 63);
f += 2;
}
}
}
return e;
}
function oaep_mgf1_str(c, a, e) {
var b = "",
d = 0;
while (b.length < a) {
b += e(c + String.fromCharCode.apply(String, [(d & 4278190080) >> 24, (d & 16711680) >> 16, (d & 65280) >> 8, d & 255]));
d += 1;
}
return b;
}
function oaep_unpad(o, b, g, p) {
var e = KJUR.crypto.MessageDigest;
var r = KJUR.crypto.Util;
var c = null;
if (!g) {
g = "sha1";
}
if (typeof g === "string") {
c = e.getCanonicalAlgName(g);
p = e.getHashLength(c);
g = function g(d) {
return hextorstr(r.hashHex(rstrtohex(d), c));
};
}
o = o.toByteArray();
var h;
for (h = 0; h < o.length; h += 1) {
o[h] &= 255;
}
while (o.length < b) {
o.unshift(0);
}
o = String.fromCharCode.apply(String, o);
if (o.length < 2 * p + 2) {
throw "Cipher too short";
}
var f = o.substr(1, p);
var s = o.substr(p + 1);
var q = oaep_mgf1_str(s, p, g);
var k = [],
h;
for (h = 0; h < f.length; h += 1) {
k[h] = f.charCodeAt(h) ^ q.charCodeAt(h);
}
var l = oaep_mgf1_str(String.fromCharCode.apply(String, k), o.length - p, g);
var j = [];
for (h = 0; h < s.length; h += 1) {
j[h] = s.charCodeAt(h) ^ l.charCodeAt(h);
}
j = String.fromCharCode.apply(String, j);
if (j.substr(0, p) !== g("")) {
throw "Hash mismatch";
}
j = j.substr(p);
var a = j.indexOf("\x01");
var m = a != -1 ? j.substr(0, a).lastIndexOf("\x00") : -1;
if (m + 1 != a) {
throw "Malformed data";
}
return j.substr(a + 1);
}
function RSASetPrivate(c, a, b) {
this.isPrivate = true;
if (typeof c !== "string") {
this.n = c;
this.e = a;
this.d = b;
} else {
if (c != null && a != null && c.length > 0 && a.length > 0) {
this.n = parseBigInt(c, 16);
this.e = parseInt(a, 16);
this.d = parseBigInt(b, 16);
} else {
throw "Invalid RSA private key";
}
}
}
function RSASetPrivateEx(g, d, e, c, b, a, h, f) {
this.isPrivate = true;
this.isPublic = false;
if (g == null) {
throw "RSASetPrivateEx N == null";
}
if (d == null) {
throw "RSASetPrivateEx E == null";
}
if (g.length == 0) {
throw "RSASetPrivateEx N.length == 0";
}
if (d.length == 0) {
throw "RSASetPrivateEx E.length == 0";
}
if (g != null && d != null && g.length > 0 && d.length > 0) {
this.n = parseBigInt(g, 16);
this.e = parseInt(d, 16);
this.d = parseBigInt(e, 16);
this.p = parseBigInt(c, 16);
this.q = parseBigInt(b, 16);
this.dmp1 = parseBigInt(a, 16);
this.dmq1 = parseBigInt(h, 16);
this.coeff = parseBigInt(f, 16);
} else {
throw "Invalid RSA private key in RSASetPrivateEx";
}
}
function RSAGenerate(b, i) {
var a = new SecureRandom();
var f = b >> 1;
this.e = parseInt(i, 16);
var c = new BigInteger(i, 16);
for (;;) {
for (;;) {
this.p = new BigInteger(b - f, 1, a);
if (this.p.subtract(BigInteger.ONE).gcd(c).compareTo(BigInteger.ONE) == 0 && this.p.isProbablePrime(10)) {
break;
}
}
for (;;) {
this.q = new BigInteger(f, 1, a);
if (this.q.subtract(BigInteger.ONE).gcd(c).compareTo(BigInteger.ONE) == 0 && this.q.isProbablePrime(10)) {
break;
}
}
if (this.p.compareTo(this.q) <= 0) {
var h = this.p;
this.p = this.q;
this.q = h;
}
var g = this.p.subtract(BigInteger.ONE);
var d = this.q.subtract(BigInteger.ONE);
var e = g.multiply(d);
if (e.gcd(c).compareTo(BigInteger.ONE) == 0) {
this.n = this.p.multiply(this.q);
if (this.n.bitLength() == b) {
this.d = c.modInverse(e);
this.dmp1 = this.d.mod(g);
this.dmq1 = this.d.mod(d);
this.coeff = this.q.modInverse(this.p);
break;
}
}
}
this.isPrivate = true;
}
function RSADoPrivate(a) {
if (this.p == null || this.q == null) {
return a.modPow(this.d, this.n);
}
var c = a.mod(this.p).modPow(this.dmp1, this.p);
var b = a.mod(this.q).modPow(this.dmq1, this.q);
while (c.compareTo(b) < 0) {
c = c.add(this.p);
}
return c.subtract(b).multiply(this.coeff).mod(this.p).multiply(this.q).add(b);
}
function RSADecrypt(b) {
if (b.length != Math.ceil(this.n.bitLength() / 4)) {
throw new Error("wrong ctext length");
}
var d = parseBigInt(b, 16);
var a = this.doPrivate(d);
if (a == null) {
return null;
}
return pkcs1unpad2(a, this.n.bitLength() + 7 >> 3);
}
function RSADecryptOAEP(e, d, b) {
if (e.length != Math.ceil(this.n.bitLength() / 4)) {
throw new Error("wrong ctext length");
}
var f = parseBigInt(e, 16);
var a = this.doPrivate(f);
if (a == null) {
return null;
}
return oaep_unpad(a, this.n.bitLength() + 7 >> 3, d, b);
}
RSAKey.prototype.doPrivate = RSADoPrivate;
RSAKey.prototype.setPrivate = RSASetPrivate;
RSAKey.prototype.setPrivateEx = RSASetPrivateEx;
RSAKey.prototype.generate = RSAGenerate;
RSAKey.prototype.decrypt = RSADecrypt;
RSAKey.prototype.decryptOAEP = RSADecryptOAEP;
/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
*/
function ECFieldElementFp(b, a) {
this.x = a;
this.q = b;
}
function feFpEquals(a) {
if (a == this) {
return true;
}
return this.q.equals(a.q) && this.x.equals(a.x);
}
function feFpToBigInteger() {
return this.x;
}
function feFpNegate() {
return new ECFieldElementFp(this.q, this.x.negate().mod(this.q));
}
function feFpAdd(a) {
return new ECFieldElementFp(this.q, this.x.add(a.toBigInteger()).mod(this.q));
}
function feFpSubtract(a) {
return new ECFieldElementFp(this.q, this.x.subtract(a.toBigInteger()).mod(this.q));
}
function feFpMultiply(a) {
return new ECFieldElementFp(this.q, this.x.multiply(a.toBigInteger()).mod(this.q));
}
function feFpSquare() {
return new ECFieldElementFp(this.q, this.x.square().mod(this.q));
}
function feFpDivide(a) {
return new ECFieldElementFp(this.q, this.x.multiply(a.toBigInteger().modInverse(this.q)).mod(this.q));
}
ECFieldElementFp.prototype.equals = feFpEquals;
ECFieldElementFp.prototype.toBigInteger = feFpToBigInteger;
ECFieldElementFp.prototype.negate = feFpNegate;
ECFieldElementFp.prototype.add = feFpAdd;
ECFieldElementFp.prototype.subtract = feFpSubtract;
ECFieldElementFp.prototype.multiply = feFpMultiply;
ECFieldElementFp.prototype.square = feFpSquare;
ECFieldElementFp.prototype.divide = feFpDivide;
function ECPointFp(c, a, d, b) {
this.curve = c;
this.x = a;
this.y = d;
if (b == null) {
this.z = BigInteger.ONE;
} else {
this.z = b;
}
this.zinv = null;
}
function pointFpGetX() {
if (this.zinv == null) {
this.zinv = this.z.modInverse(this.curve.q);
}
return this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q));
}
function pointFpGetY() {
if (this.zinv == null) {
this.zinv = this.z.modInverse(this.curve.q);
}
return this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q));
}
function pointFpEquals(a) {
if (a == this) {
return true;
}
if (this.isInfinity()) {
return a.isInfinity();
}
if (a.isInfinity()) {
return this.isInfinity();
}
var c, b;
c = a.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(a.z)).mod(this.curve.q);
if (!c.equals(BigInteger.ZERO)) {
return false;
}
b = a.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(a.z)).mod(this.curve.q);
return b.equals(BigInteger.ZERO);
}
function pointFpIsInfinity() {
if (this.x == null && this.y == null) {
return true;
}
return this.z.equals(BigInteger.ZERO) && !this.y.toBigInteger().equals(BigInteger.ZERO);
}
function pointFpNegate() {
return new ECPointFp(this.curve, this.x, this.y.negate(), this.z);
}
function pointFpAdd(l) {
if (this.isInfinity()) {
return l;
}
if (l.isInfinity()) {
return this;
}
var p = l.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(l.z)).mod(this.curve.q);
var o = l.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(l.z)).mod(this.curve.q);
if (BigInteger.ZERO.equals(o)) {
if (BigInteger.ZERO.equals(p)) {
return this.twice();
}
return this.curve.getInfinity();
}
var j = new BigInteger("3");
var e = this.x.toBigInteger();
var n = this.y.toBigInteger();
var c = l.x.toBigInteger();
var k = l.y.toBigInteger();
var m = o.square();
var i = m.multiply(o);
var d = e.multiply(m);
var g = p.square().multiply(this.z);
var a = g.subtract(d.shiftLeft(1)).multiply(l.z).subtract(i).multiply(o).mod(this.curve.q);
var h = d.multiply(j).multiply(p).subtract(n.multiply(i)).subtract(g.multiply(p)).multiply(l.z).add(p.multiply(i)).mod(this.curve.q);
var f = i.multiply(this.z).multiply(l.z).mod(this.curve.q);
return new ECPointFp(this.curve, this.curve.fromBigInteger(a), this.curve.fromBigInteger(h), f);
}
function pointFpTwice() {
if (this.isInfinity()) {
return this;
}
if (this.y.toBigInteger().signum() == 0) {
return this.curve.getInfinity();
}
var g = new BigInteger("3");
var c = this.x.toBigInteger();
var h = this.y.toBigInteger();
var e = h.multiply(this.z);
var j = e.multiply(h).mod(this.curve.q);
var i = this.curve.a.toBigInteger();
var k = c.square().multiply(g);
if (!BigInteger.ZERO.equals(i)) {
k = k.add(this.z.square().multiply(i));
}
k = k.mod(this.curve.q);
var b = k.square().subtract(c.shiftLeft(3).multiply(j)).shiftLeft(1).multiply(e).mod(this.curve.q);
var f = k.multiply(g).multiply(c).subtract(j.shiftLeft(1)).shiftLeft(2).multiply(j).subtract(k.square().multiply(k)).mod(this.curve.q);
var d = e.square().multiply(e).shiftLeft(3).mod(this.curve.q);
return new ECPointFp(this.curve, this.curve.fromBigInteger(b), this.curve.fromBigInteger(f), d);
}
function pointFpMultiply(d) {
if (this.isInfinity()) {
return this;
}
if (d.signum() == 0) {
return this.curve.getInfinity();
}
var m = d;
var l = m.multiply(new BigInteger("3"));
var b = this.negate();
var j = this;
var q = this.curve.q.subtract(d);
var o = q.multiply(new BigInteger("3"));
var c = new ECPointFp(this.curve, this.x, this.y);
var a = c.negate();
var g;
for (g = l.bitLength() - 2; g > 0; --g) {
j = j.twice();
var n = l.testBit(g);
var f = m.testBit(g);
if (n != f) {
j = j.add(n ? this : b);
}
}
for (g = o.bitLength() - 2; g > 0; --g) {
c = c.twice();
var p = o.testBit(g);
var r = q.testBit(g);
if (p != r) {
c = c.add(p ? c : a);
}
}
return j;
}
function pointFpMultiplyTwo(c, a, b) {
var d;
if (c.bitLength() > b.bitLength()) {
d = c.bitLength() - 1;
} else {
d = b.bitLength() - 1;
}
var f = this.curve.getInfinity();
var e = this.add(a);
while (d >= 0) {
f = f.twice();
if (c.testBit(d)) {
if (b.testBit(d)) {
f = f.add(e);
} else {
f = f.add(this);
}
} else {
if (b.testBit(d)) {
f = f.add(a);
}
}
--d;
}
return f;
}
ECPointFp.prototype.getX = pointFpGetX;
ECPointFp.prototype.getY = pointFpGetY;
ECPointFp.prototype.equals = pointFpEquals;
ECPointFp.prototype.isInfinity = pointFpIsInfinity;
ECPointFp.prototype.negate = pointFpNegate;
ECPointFp.prototype.add = pointFpAdd;
ECPointFp.prototype.twice = pointFpTwice;
ECPointFp.prototype.multiply = pointFpMultiply;
ECPointFp.prototype.multiplyTwo = pointFpMultiplyTwo;
function ECCurveFp(e, d, c) {
this.q = e;
this.a = this.fromBigInteger(d);
this.b = this.fromBigInteger(c);
this.infinity = new ECPointFp(this, null, null);
}
function curveFpGetQ() {
return this.q;
}
function curveFpGetA() {
return this.a;
}
function curveFpGetB() {
return this.b;
}
function curveFpEquals(a) {
if (a == this) {
return true;
}
return this.q.equals(a.q) && this.a.equals(a.a) && this.b.equals(a.b);
}
function curveFpGetInfinity() {
return this.infinity;
}
function curveFpFromBigInteger(a) {
return new ECFieldElementFp(this.q, a);
}
function curveFpDecodePointHex(d) {
switch (parseInt(d.substr(0, 2), 16)) {
case 0:
return this.infinity;
case 2:
case 3:
return null;
case 4:
case 6:
case 7:
var a = (d.length - 2) / 2;
var c = d.substr(2, a);
var b = d.substr(a + 2, a);
return new ECPointFp(this, this.fromBigInteger(new BigInteger(c, 16)), this.fromBigInteger(new BigInteger(b, 16)));
default:
return null;
}
}
ECCurveFp.prototype.getQ = curveFpGetQ;
ECCurveFp.prototype.getA = curveFpGetA;
ECCurveFp.prototype.getB = curveFpGetB;
ECCurveFp.prototype.equals = curveFpEquals;
ECCurveFp.prototype.getInfinity = curveFpGetInfinity;
ECCurveFp.prototype.fromBigInteger = curveFpFromBigInteger;
ECCurveFp.prototype.decodePointHex = curveFpDecodePointHex;
/*! (c) Stefan Thomas | https://github.com/bitcoinjs/bitcoinjs-lib
*/
ECFieldElementFp.prototype.getByteLength = function () {
return Math.floor((this.toBigInteger().bitLength() + 7) / 8);
};
ECPointFp.prototype.getEncoded = function (c) {
var d = function d(h, f) {
var g = h.toByteArrayUnsigned();
if (f < g.length) {
g = g.slice(g.length - f);
} else {
while (f > g.length) {
g.unshift(0);
}
}
return g;
};
var a = this.getX().toBigInteger();
var e = this.getY().toBigInteger();
var b = d(a, 32);
if (c) {
if (e.isEven()) {
b.unshift(2);
} else {
b.unshift(3);
}
} else {
b.unshift(4);
b = b.concat(d(e, 32));
}
return b;
};
ECPointFp.decodeFrom = function (g, c) {
var f = c[0];
var e = c.length - 1;
var d = c.slice(1, 1 + e / 2);
var b = c.slice(1 + e / 2, 1 + e);
d.unshift(0);
b.unshift(0);
var a = new BigInteger(d);
var h = new BigInteger(b);
return new ECPointFp(g, g.fromBigInteger(a), g.fromBigInteger(h));
};
ECPointFp.decodeFromHex = function (g, c) {
var f = c.substr(0, 2);
var e = c.length - 2;
var d = c.substr(2, e / 2);
var b = c.substr(2 + e / 2, e / 2);
var a = new BigInteger(d, 16);
var h = new BigInteger(b, 16);
return new ECPointFp(g, g.fromBigInteger(a), g.fromBigInteger(h));
};
ECPointFp.prototype.add2D = function (c) {
if (this.isInfinity()) {
return c;
}
if (c.isInfinity()) {
return this;
}
if (this.x.equals(c.x)) {
if (this.y.equals(c.y)) {
return this.twice();
}
return this.curve.getInfinity();
}
var g = c.x.subtract(this.x);
var e = c.y.subtract(this.y);
var a = e.divide(g);
var d = a.square().subtract(this.x).subtract(c.x);
var f = a.multiply(this.x.subtract(d)).subtract(this.y);
return new ECPointFp(this.curve, d, f);
};
ECPointFp.prototype.twice2D = function () {
if (this.isInfinity()) {
return this;
}
if (this.y.toBigInteger().signum() == 0) {
return this.curve.getInfinity();
}
var b = this.curve.fromBigInteger(BigInteger.valueOf(2));
var e = this.curve.fromBigInteger(BigInteger.valueOf(3));
var a = this.x.square().multiply(e).add(this.curve.a).divide(this.y.multiply(b));
var c = a.square().subtract(this.x.multiply(b));
var d = a.multiply(this.x.subtract(c)).subtract(this.y);
return new ECPointFp(this.curve, c, d);
};
ECPointFp.prototype.multiply2D = function (b) {
if (this.isInfinity()) {
return this;
}
if (b.signum() == 0) {
return this.curve.getInfinity();
}
var g = b;
var f = g.multiply(new BigInteger("3"));
var l = this.negate();
var d = this;
var c;
for (c = f.bitLength() - 2; c > 0; --c) {
d = d.twice();
var a = f.testBit(c);
var j = g.testBit(c);
if (a != j) {
d = d.add2D(a ? this : l);
}
}
return d;
};
ECPointFp.prototype.isOnCurve = function () {
var d = this.getX().toBigInteger();
var i = this.getY().toBigInteger();
var f = this.curve.getA().toBigInteger();
var c = this.curve.getB().toBigInteger();
var h = this.curve.getQ();
var e = i.multiply(i).mod(h);
var g = d.multiply(d).multiply(d).add(f.multiply(d)).add(c).mod(h);
return e.equals(g);
};
ECPointFp.prototype.toString = function () {
return "(" + this.getX().toBigInteger().toString() + "," + this.getY().toBigInteger().toString() + ")";
};
ECPointFp.prototype.validate = function () {
var c = this.curve.getQ();
if (this.isInfinity()) {
throw new Error("Point is at infinity.");
}
var a = this.getX().toBigInteger();
var b = this.getY().toBigInteger();
if (a.compareTo(BigInteger.ONE) < 0 || a.compareTo(c.subtract(BigInteger.ONE)) > 0) {
throw new Error("x coordinate out of bounds");
}
if (b.compareTo(BigInteger.ONE) < 0 || b.compareTo(c.subtract(BigInteger.ONE)) > 0) {
throw new Error("y coordinate out of bounds");
}
if (!this.isOnCurve()) {
throw new Error("Point is not on the curve.");
}
if (this.multiply(c).isInfinity()) {
throw new Error("Point is not a scalar multiple of G.");
}
return true;
};
/*! Mike Samuel (c) 2009 | code.google.com/p/json-sans-eval
*/
var jsonParse = function () {
var e = "(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)";
var j = '(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))';
var i = '(?:"' + j + '*")';
var d = new RegExp("(?:false|true|null|[\\{\\}\\[\\]]|" + e + "|" + i + ")", "g");
var k = new RegExp("\\\\(?:([^u])|u(.{4}))", "g");
var g = {
'"': '"',
"/": "/",
"\\": "\\",
b: "\b",
f: "\f",
n: "\n",
r: "\r",
t: "\t"
};
function h(l, m, n) {
return m ? g[m] : String.fromCharCode(parseInt(n, 16));
}
var c = new String("");
var a = "\\";
var f = {
"{": Object,
"[": Array
};
var b = Object.hasOwnProperty;
return function (u, q) {
var p = u.match(d);
var x;
var v = p[0];
var l = false;
if ("{" === v) {
x = {};
} else {
if ("[" === v) {
x = [];
} else {
x = [];
l = true;
}
}
var t;
var r = [x];
for (var o = 1 - l, m = p.length; o < m; ++o) {
v = p[o];
var w;
switch (v.charCodeAt(0)) {
default:
w = r[0];
w[t || w.length] = +v;
t = void 0;
break;
case 34:
v = v.substring(1, v.length - 1);
if (v.indexOf(a) !== -1) {
v = v.replace(k, h);
}
w = r[0];
if (!t) {
if (w instanceof Array) {
t = w.length;
} else {
t = v || c;
break;
}
}
w[t] = v;
t = void 0;
break;
case 91:
w = r[0];
r.unshift(w[t || w.length] = []);
t = void 0;
break;
case 93:
r.shift();
break;
case 102:
w = r[0];
w[t || w.length] = false;
t = void 0;
break;
case 110:
w = r[0];
w[t || w.length] = null;
t = void 0;
break;
case 116:
w = r[0];
w[t || w.length] = true;
t = void 0;
break;
case 123:
w = r[0];
r.unshift(w[t || w.length] = {});
t = void 0;
break;
case 125:
r.shift();
break;
}
}
if (l) {
if (r.length !== 1) {
throw new Error();
}
x = x[0];
} else {
if (r.length) {
throw new Error();
}
}
if (q) {
var s = function s(C, B) {
var D = C[B];
if (D && _typeof(D) === "object") {
var n = null;
for (var z in D) {
if (b.call(D, z) && D !== C) {
var y = s(D, z);
if (y !== void 0) {
D[z] = y;
} else {
if (!n) {
n = [];
}
n.push(z);
}
}
}
if (n) {
for (var A = n.length; --A >= 0;) {
delete D[n[A]];
}
}
}
return q.call(C, B, D);
};
x = s({
"": x
}, "");
}
return x;
};
}();
if (typeof KJUR == "undefined" || !KJUR) {
KJUR = {};
}
if (typeof KJUR.asn1 == "undefined" || !KJUR.asn1) {
KJUR.asn1 = {};
}
KJUR.asn1.ASN1Util = new function () {
this.integerToByteHex = function (a) {
var b = a.toString(16);
if (b.length % 2 == 1) {
b = "0" + b;
}
return b;
};
this.bigIntToMinTwosComplementsHex = function (j) {
var f = j.toString(16);
if (f.substr(0, 1) != "-") {
if (f.length % 2 == 1) {
f = "0" + f;
} else {
if (!f.match(/^[0-7]/)) {
f = "00" + f;
}
}
} else {
var a = f.substr(1);
var e = a.length;
if (e % 2 == 1) {
e += 1;
} else {
if (!f.match(/^[0-7]/)) {
e += 2;
}
}
var g = "";
for (var d = 0; d < e; d++) {
g += "f";
}
var c = new BigInteger(g, 16);
var b = c.xor(j).add(BigInteger.ONE);
f = b.toString(16).replace(/^-/, "");
}
return f;
};
this.getPEMStringFromHex = function (a, b) {
return hextopem(a, b);
};
this.newObject = function (k) {
var F = KJUR,
o = F.asn1,
v = o.ASN1Object,
B = o.DERBoolean,
e = o.DERInteger,
t = o.DERBitString,
h = o.DEROctetString,
x = o.DERNull,
y = o.DERObjectIdentifier,
m = o.DEREnumerated,
g = o.DERUTF8String,
f = o.DERNumericString,
A = o.DERPrintableString,
w = o.DERTeletexString,
q = o.DERIA5String,
E = o.DERUTCTime,
j = o.DERGeneralizedTime,
b = o.DERVisibleString,
l = o.DERBMPString,
n = o.DERSequence,
c = o.DERSet,
s = o.DERTaggedObject,
p = o.ASN1Util.newObject;
if (k instanceof o.ASN1Object) {
return k;
}
var u = Object.keys(k);
if (u.length != 1) {
throw new Error("key of param shall be only one.");
}
var H = u[0];
if (":asn1:bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:visstr:bmpstr:seq:set:tag:".indexOf(":" + H + ":") == -1) {
throw new Error("undefined key: " + H);
}
if (H == "bool") {
return new B(k[H]);
}
if (H == "int") {
return new e(k[H]);
}
if (H == "bitstr") {
return new t(k[H]);
}
if (H == "octstr") {
return new h(k[H]);
}
if (H == "null") {
return new x(k[H]);
}
if (H == "oid") {
return new y(k[H]);
}
if (H == "enum") {
return new m(k[H]);
}
if (H == "utf8str") {
return new g(k[H]);
}
if (H == "numstr") {
return new f(k[H]);
}
if (H == "prnstr") {
return new A(k[H]);
}
if (H == "telstr") {
return new w(k[H]);
}
if (H == "ia5str") {
return new q(k[H]);
}
if (H == "utctime") {
return new E(k[H]);
}
if (H == "gentime") {
return new j(k[H]);
}
if (H == "visstr") {
return new b(k[H]);
}
if (H == "bmpstr") {
return new l(k[H]);
}
if (H == "asn1") {
return new v(k[H]);
}
if (H == "seq") {
var d = k[H];
var G = [];
for (var z = 0; z < d.length; z++) {
var D = p(d[z]);
G.push(D);
}
return new n({
array: G
});
}
if (H == "set") {
var d = k[H];
var G = [];
for (var z = 0; z < d.length; z++) {
var D = p(d[z]);
G.push(D);
}
return new c({
array: G
});
}
if (H == "tag") {
var C = k[H];
if (Object.prototype.toString.call(C) === "[object Array]" && C.length == 3) {
var r = p(C[2]);
return new s({
tag: C[0],
explicit: C[1],
obj: r
});
} else {
return new s(C);
}
}
};
this.jsonToASN1HEX = function (b) {
var a = this.newObject(b);
return a.getEncodedHex();
};
}();
KJUR.asn1.ASN1Util.oidHexToInt = function (a) {
var j = "";
var k = parseInt(a.substr(0, 2), 16);
var d = Math.floor(k / 40);
var c = k % 40;
var j = d + "." + c;
var e = "";
for (var f = 2; f < a.length; f += 2) {
var g = parseInt(a.substr(f, 2), 16);
var h = ("00000000" + g.toString(2)).slice(-8);
e = e + h.substr(1, 7);
if (h.substr(0, 1) == "0") {
var b = new BigInteger(e, 2);
j = j + "." + b.toString(10);
e = "";
}
}
return j;
};
KJUR.asn1.ASN1Util.oidIntToHex = function (f) {
var e = function e(a) {
var k = a.toString(16);
if (k.length == 1) {
k = "0" + k;
}
return k;
};
var d = function d(o) {
var n = "";
var k = new BigInteger(o, 10);
var a = k.toString(2);
var l = 7 - a.length % 7;
if (l == 7) {
l = 0;
}
var q = "";
for (var m = 0; m < l; m++) {
q += "0";
}
a = q + a;
for (var m = 0; m < a.length - 1; m += 7) {
var p = a.substr(m, 7);
if (m != a.length - 7) {
p = "1" + p;
}
n += e(parseInt(p, 2));
}
return n;
};
if (!f.match(/^[0-9.]+$/)) {
throw "malformed oid string: " + f;
}
var g = "";
var b = f.split(".");
var j = parseInt(b[0]) * 40 + parseInt(b[1]);
g += e(j);
b.splice(0, 2);
for (var c = 0; c < b.length; c++) {
g += d(b[c]);
}
return g;
};
KJUR.asn1.ASN1Object = function (e) {
var c = true;
var b = null;
var d = "00";
var f = "00";
var a = "";
this.params = null;
this.getLengthHexFromValue = function () {
if (typeof this.hV == "undefined" || this.hV == null) {
throw new Error("this.hV is null or undefined");
}
if (this.hV.length % 2 == 1) {
throw new Error("value hex must be even length: n=" + a.length + ",v=" + this.hV);
}
var j = this.hV.length / 2;
var i = j.toString(16);
if (i.length % 2 == 1) {
i = "0" + i;
}
if (j < 128) {
return i;
} else {
var h = i.length / 2;
if (h > 15) {
throw "ASN.1 length too long to represent by 8x: n = " + j.toString(16);
}
var g = 128 + h;
return g.toString(16) + i;
}
};
this.getEncodedHex = function () {
if (this.hTLV == null || this.isModified) {
this.hV = this.getFreshValueHex();
this.hL = this.getLengthHexFromValue();
this.hTLV = this.hT + this.hL + this.hV;
this.isModified = false;
}
return this.hTLV;
};
this.getValueHex = function () {
this.getEncodedHex();
return this.hV;
};
this.getFreshValueHex = function () {
return "";
};
this.setByParam = function (g) {
this.params = g;
};
if (e != undefined) {
if (e.tlv != undefined) {
this.hTLV = e.tlv;
this.isModified = false;
}
}
};
KJUR.asn1.DERAbstractString = function (c) {
KJUR.asn1.DERAbstractString.superclass.constructor.call(this);
var b = null;
var a = null;
this.getString = function () {
return this.s;
};
this.setString = function (d) {
this.hTLV = null;
this.isModified = true;
this.s = d;
this.hV = utf8tohex(this.s).toLowerCase();
};
this.setStringHex = function (d) {
this.hTLV = null;
this.isModified = true;
this.s = null;
this.hV = d;
};
this.getFreshValueHex = function () {
return this.hV;
};
if (typeof c != "undefined") {
if (typeof c == "string") {
this.setString(c);
} else {
if (typeof c.str != "undefined") {
this.setString(c.str);
} else {
if (typeof c.hex != "undefined") {
this.setStringHex(c.hex);
}
}
}
}
};
YAHOO.lang.extend(KJUR.asn1.DERAbstractString, KJUR.asn1.ASN1Object);
KJUR.asn1.DERAbstractTime = function (c) {
KJUR.asn1.DERAbstractTime.superclass.constructor.call(this);
var b = null;
var a = null;
this.localDateToUTC = function (g) {
var e = g.getTime() + g.getTimezoneOffset() * 60000;
var f = new Date(e);
return f;
};
this.formatDate = function (m, o, e) {
var g = this.zeroPadding;
var n = this.localDateToUTC(m);
var p = String(n.getFullYear());
if (o == "utc") {
p = p.substr(2, 2);
}
var l = g(String(n.getMonth() + 1), 2);
var q = g(String(n.getDate()), 2);
var h = g(String(n.getHours()), 2);
var i = g(String(n.getMinutes()), 2);
var j = g(String(n.getSeconds()), 2);
var r = p + l + q + h + i + j;
if (e === true) {
var f = n.getMilliseconds();
if (f != 0) {
var k = g(String(f), 3);
k = k.replace(/[0]+$/, "");
r = r + "." + k;
}
}
return r + "Z";
};
this.zeroPadding = function (e, d) {
if (e.length >= d) {
return e;
}
return new Array(d - e.length + 1).join("0") + e;
};
this.getString = function () {
return this.s;
};
this.setString = function (d) {
this.hTLV = null;
this.isModified = true;
this.s = d;
this.hV = stohex(d);
};
this.setByDateValue = function (h, j, e, d, f, g) {
var i = new Date(Date.UTC(h, j - 1, e, d, f, g, 0));
this.setByDate(i);
};
this.getFreshValueHex = function () {
return this.hV;
};
};
YAHOO.lang.extend(KJUR.asn1.DERAbstractTime, KJUR.asn1.ASN1Object);
KJUR.asn1.DERAbstractStructured = function (b) {
KJUR.asn1.DERAbstractString.superclass.constructor.call(this);
var a = null;
this.setByASN1ObjectArray = function (c) {
this.hTLV = null;
this.isModified = true;
this.asn1Array = c;
};
this.appendASN1Object = function (c) {
this.hTLV = null;
this.isModified = true;
this.asn1Array.push(c);
};
this.asn1Array = new Array();
if (typeof b != "undefined") {
if (typeof b.array != "undefined") {
this.asn1Array = b.array;
}
}
};
YAHOO.lang.extend(KJUR.asn1.DERAbstractStructured, KJUR.asn1.ASN1Object);
KJUR.asn1.DERBoolean = function (a) {
KJUR.asn1.DERBoolean.superclass.constructor.call(this);
this.hT = "01";
if (a == false) {
this.hTLV = "010100";
} else {
this.hTLV = "0101ff";
}
};
YAHOO.lang.extend(KJUR.asn1.DERBoolean, KJUR.asn1.ASN1Object);
KJUR.asn1.DERInteger = function (a) {
KJUR.asn1.DERInteger.superclass.constructor.call(this);
this.hT = "02";
this.setByBigInteger = function (b) {
this.hTLV = null;
this.isModified = true;
this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(b);
};
this.setByInteger = function (c) {
var b = new BigInteger(String(c), 10);
this.setByBigInteger(b);
};
this.setValueHex = function (b) {
this.hV = b;
};
this.getFreshValueHex = function () {
return this.hV;
};
if (typeof a != "undefined") {
if (typeof a.bigint != "undefined") {
this.setByBigInteger(a.bigint);
} else {
if (typeof a["int"] != "undefined") {
this.setByInteger(a["int"]);
} else {
if (typeof a == "number") {
this.setByInteger(a);
} else {
if (typeof a.hex != "undefined") {
this.setValueHex(a.hex);
}
}
}
}
}
};
YAHOO.lang.extend(KJUR.asn1.DERInteger, KJUR.asn1.ASN1Object);
KJUR.asn1.DERBitString = function (b) {
if (b !== undefined && typeof b.obj !== "undefined") {
var a = KJUR.asn1.ASN1Util.newObject(b.obj);
b.hex = "00" + a.getEncodedHex();
}
KJUR.asn1.DERBitString.superclass.constructor.call(this);
this.hT = "03";
this.setHexValueIncludingUnusedBits = function (c) {
this.hTLV = null;
this.isModified = true;
this.hV = c;
};
this.setUnusedBitsAndHexValue = function (c, e) {
if (c < 0 || 7 < c) {
throw "unused bits shall be from 0 to 7: u = " + c;
}
var d = "0" + c;
this.hTLV = null;
this.isModified = true;
this.hV = d + e;
};
this.setByBinaryString = function (e) {
e = e.replace(/0+$/, "");
var f = 8 - e.length % 8;
if (f == 8) {
f = 0;
}
for (var g = 0; g <= f; g++) {
e += "0";
}
var j = "";
for (var g = 0; g < e.length - 1; g += 8) {
var d = e.substr(g, 8);
var c = parseInt(d, 2).toString(16);
if (c.length == 1) {
c = "0" + c;
}
j += c;
}
this.hTLV = null;
this.isModified = true;
this.hV = "0" + f + j;
};
this.setByBooleanArray = function (e) {
var d = "";
for (var c = 0; c < e.length; c++) {
if (e[c] == true) {
d += "1";
} else {
d += "0";
}
}
this.setByBinaryString(d);
};
this.newFalseArray = function (e) {
var c = new Array(e);
for (var d = 0; d < e; d++) {
c[d] = false;
}
return c;
};
this.getFreshValueHex = function () {
return this.hV;
};
if (typeof b != "undefined") {
if (typeof b == "string" && b.toLowerCase().match(/^[0-9a-f]+$/)) {
this.setHexValueIncludingUnusedBits(b);
} else {
if (typeof b.hex != "undefined") {
this.setHexValueIncludingUnusedBits(b.hex);
} else {
if (typeof b.bin != "undefined") {
this.setByBinaryString(b.bin);
} else {
if (typeof b.array != "undefined") {
this.setByBooleanArray(b.array);
}
}
}
}
}
};
YAHOO.lang.extend(KJUR.asn1.DERBitString, KJUR.asn1.ASN1Object);
KJUR.asn1.DEROctetString = function (b) {
if (b !== undefined && typeof b.obj !== "undefined") {
var a = KJUR.asn1.ASN1Util.newObject(b.obj);
b.hex = a.getEncodedHex();
}
KJUR.asn1.DEROctetString.superclass.constructor.call(this, b);
this.hT = "04";
};
YAHOO.lang.extend(KJUR.asn1.DEROctetString, KJUR.asn1.DERAbstractString);
KJUR.asn1.DERNull = function () {
KJUR.asn1.DERNull.superclass.constructor.call(this);
this.hT = "05";
this.hTLV = "0500";
};
YAHOO.lang.extend(KJUR.asn1.DERNull, KJUR.asn1.ASN1Object);
KJUR.asn1.DERObjectIdentifier = function (c) {
var b = function b(d) {
var e = d.toString(16);
if (e.length == 1) {
e = "0" + e;
}
return e;
};
var a = function a(k) {
var j = "";
var e = new BigInteger(k, 10);
var d = e.toString(2);
var f = 7 - d.length % 7;
if (f == 7) {
f = 0;
}
var m = "";
for (var g = 0; g < f; g++) {
m += "0";
}
d = m + d;
for (var g = 0; g < d.length - 1; g += 7) {
var l = d.substr(g, 7);
if (g != d.length - 7) {
l = "1" + l;
}
j += b(parseInt(l, 2));
}
return j;
};
KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this);
this.hT = "06";
this.setValueHex = function (d) {
this.hTLV = null;
this.isModified = true;
this.s = null;
this.hV = d;
};
this.setValueOidString = function (f) {
if (!f.match(/^[0-9.]+$/)) {
throw new Error("malformed oid string: " + f);
}
var g = "";
var d = f.split(".");
var j = parseInt(d[0]) * 40 + parseInt(d[1]);
g += b(j);
d.splice(0, 2);
for (var e = 0; e < d.length; e++) {
g += a(d[e]);
}
this.hTLV = null;
this.isModified = true;
this.s = null;
this.hV = g;
};
this.setValueName = function (e) {
var d = KJUR.asn1.x509.OID.name2oid(e);
if (d !== "") {
this.setValueOidString(d);
} else {
throw new Error("DERObjectIdentifier oidName undefined: " + e);
}
};
this.setValueNameOrOid = function (d) {
if (d.match(/^[0-2].[0-9.]+$/)) {
this.setValueOidString(d);
} else {
this.setValueName(d);
}
};
this.getFreshValueHex = function () {
return this.hV;
};
this.setByParam = function (d) {
if (typeof d === "string") {
this.setValueNameOrOid(d);
} else {
if (d.oid !== undefined) {
this.setValueNameOrOid(d.oid);
} else {
if (d.name !== undefined) {
this.setValueNameOrOid(d.name);
} else {
if (d.hex !== undefined) {
this.setValueHex(d.hex);
}
}
}
}
};
if (c !== undefined) {
this.setByParam(c);
}
};
YAHOO.lang.extend(KJUR.asn1.DERObjectIdentifier, KJUR.asn1.ASN1Object);
KJUR.asn1.DEREnumerated = function (a) {
KJUR.asn1.DEREnumerated.superclass.constructor.call(this);
this.hT = "0a";
this.setByBigInteger = function (b) {
this.hTLV = null;
this.isModified = true;
this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(b);
};
this.setByInteger = function (c) {
var b = new BigInteger(String(c), 10);
this.setByBigInteger(b);
};
this.setValueHex = function (b) {
this.hV = b;
};
this.getFreshValueHex = function () {
return this.hV;
};
if (typeof a != "undefined") {
if (typeof a["int"] != "undefined") {
this.setByInteger(a["int"]);
} else {
if (typeof a == "number") {
this.setByInteger(a);
} else {
if (typeof a.hex != "undefined") {
this.setValueHex(a.hex);
}
}
}
}
};
YAHOO.lang.extend(KJUR.asn1.DEREnumerated, KJUR.asn1.ASN1Object);
KJUR.asn1.DERUTF8String = function (a) {
KJUR.asn1.DERUTF8String.superclass.constructor.call(this, a);
this.hT = "0c";
};
YAHOO.lang.extend(KJUR.asn1.DERUTF8String, KJUR.asn1.DERAbstractString);
KJUR.asn1.DERNumericString = function (a) {
KJUR.asn1.DERNumericString.superclass.constructor.call(this, a);
this.hT = "12";
};
YAHOO.lang.extend(KJUR.asn1.DERNumericString, KJUR.asn1.DERAbstractString);
KJUR.asn1.DERPrintableString = function (a) {
KJUR.asn1.DERPrintableString.superclass.constructor.call(this, a);
this.hT = "13";
};
YAHOO.lang.extend(KJUR.asn1.DERPrintableString, KJUR.asn1.DERAbstractString);
KJUR.asn1.DERTeletexString = function (a) {
KJUR.asn1.DERTeletexString.superclass.constructor.call(this, a);
this.hT = "14";
};
YAHOO.lang.extend(KJUR.asn1.DERTeletexString, KJUR.asn1.DERAbstractString);
KJUR.asn1.DERIA5String = function (a) {
KJUR.asn1.DERIA5String.superclass.constructor.call(this, a);
this.hT = "16";
};
YAHOO.lang.extend(KJUR.asn1.DERIA5String, KJUR.asn1.DERAbstractString);
KJUR.asn1.DERVisibleString = function (a) {
KJUR.asn1.DERIA5String.superclass.constructor.call(this, a);
this.hT = "1a";
};
YAHOO.lang.extend(KJUR.asn1.DERVisibleString, KJUR.asn1.DERAbstractString);
KJUR.asn1.DERBMPString = function (a) {
KJUR.asn1.DERBMPString.superclass.constructor.call(this, a);
this.hT = "1e";
};
YAHOO.lang.extend(KJUR.asn1.DERBMPString, KJUR.asn1.DERAbstractString);
KJUR.asn1.DERUTCTime = function (a) {
KJUR.asn1.DERUTCTime.superclass.constructor.call(this, a);
this.hT = "17";
this.setByDate = function (b) {
this.hTLV = null;
this.isModified = true;
this.date = b;
this.s = this.formatDate(this.date, "utc");
this.hV = stohex(this.s);
};
this.getFreshValueHex = function () {
if (typeof this.date == "undefined" && typeof this.s == "undefined") {
this.date = new Date();
this.s = this.formatDate(this.date, "utc");
this.hV = stohex(this.s);
}
return this.hV;
};
if (a !== undefined) {
if (a.str !== undefined) {
this.setString(a.str);
} else {
if (typeof a == "string" && a.match(/^[0-9]{12}Z$/)) {
this.setString(a);
} else {
if (a.hex !== undefined) {
this.setStringHex(a.hex);
} else {
if (a.date !== undefined) {
this.setByDate(a.date);
}
}
}
}
}
};
YAHOO.lang.extend(KJUR.asn1.DERUTCTime, KJUR.asn1.DERAbstractTime);
KJUR.asn1.DERGeneralizedTime = function (a) {
KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this, a);
this.hT = "18";
this.withMillis = false;
this.setByDate = function (b) {
this.hTLV = null;
this.isModified = true;
this.date = b;
this.s = this.formatDate(this.date, "gen", this.withMillis);
this.hV = stohex(this.s);
};
this.getFreshValueHex = function () {
if (this.date === undefined && this.s === undefined) {
this.date = new Date();
this.s = this.formatDate(this.date, "gen", this.withMillis);
this.hV = stohex(this.s);
}
return this.hV;
};
if (a !== undefined) {
if (a.str !== undefined) {
this.setString(a.str);
} else {
if (typeof a == "string" && a.match(/^[0-9]{14}Z$/)) {
this.setString(a);
} else {
if (a.hex !== undefined) {
this.setStringHex(a.hex);
} else {
if (a.date !== undefined) {
this.setByDate(a.date);
}
}
}
}
if (a.millis === true) {
this.withMillis = true;
}
}
};
YAHOO.lang.extend(KJUR.asn1.DERGeneralizedTime, KJUR.asn1.DERAbstractTime);
KJUR.asn1.DERSequence = function (a) {
KJUR.asn1.DERSequence.superclass.constructor.call(this, a);
this.hT = "30";
this.getFreshValueHex = function () {
var c = "";
for (var b = 0; b < this.asn1Array.length; b++) {
var d = this.asn1Array[b];
c += d.getEncodedHex();
}
this.hV = c;
return this.hV;
};
};
YAHOO.lang.extend(KJUR.asn1.DERSequence, KJUR.asn1.DERAbstractStructured);
KJUR.asn1.DERSet = function (a) {
KJUR.asn1.DERSet.superclass.constructor.call(this, a);
this.hT = "31";
this.sortFlag = true;
this.getFreshValueHex = function () {
var b = new Array();
for (var c = 0; c < this.asn1Array.length; c++) {
var d = this.asn1Array[c];
b.push(d.getEncodedHex());
}
if (this.sortFlag == true) {
b.sort();
}
this.hV = b.join("");
return this.hV;
};
if (typeof a != "undefined") {
if (typeof a.sortflag != "undefined" && a.sortflag == false) {
this.sortFlag = false;
}
}
};
YAHOO.lang.extend(KJUR.asn1.DERSet, KJUR.asn1.DERAbstractStructured);
KJUR.asn1.DERTaggedObject = function (b) {
KJUR.asn1.DERTaggedObject.superclass.constructor.call(this);
var a = KJUR.asn1;
this.hT = "a0";
this.hV = "";
this.isExplicit = true;
this.asn1Object = null;
this.setASN1Object = function (c, d, e) {
this.hT = d;
this.isExplicit = c;
this.asn1Object = e;
if (this.isExplicit) {
this.hV = this.asn1Object.getEncodedHex();
this.hTLV = null;
this.isModified = true;
} else {
this.hV = null;
this.hTLV = e.getEncodedHex();
this.hTLV = this.hTLV.replace(/^../, d);
this.isModified = false;
}
};
this.getFreshValueHex = function () {
return this.hV;
};
this.setByParam = function (c) {
if (c.tag != undefined) {
this.hT = c.tag;
}
if (c.explicit != undefined) {
this.isExplicit = c.explicit;
}
if (c.tage != undefined) {
this.hT = c.tage;
this.isExplicit = true;
}
if (c.tagi != undefined) {
this.hT = c.tagi;
this.isExplicit = false;
}
if (c.obj != undefined) {
if (c.obj instanceof a.ASN1Object) {
this.asn1Object = c.obj;
this.setASN1Object(this.isExplicit, this.hT, this.asn1Object);
} else {
if (_typeof(c.obj) == "object") {
this.asn1Object = a.ASN1Util.newObject(c.obj);
this.setASN1Object(this.isExplicit, this.hT, this.asn1Object);
}
}
}
};
if (b != undefined) {
this.setByParam(b);
}
};
YAHOO.lang.extend(KJUR.asn1.DERTaggedObject, KJUR.asn1.ASN1Object);
var ASN1HEX = new function () {}();
ASN1HEX.getLblen = function (c, a) {
if (c.substr(a + 2, 1) != "8") {
return 1;
}
var b = parseInt(c.substr(a + 3, 1));
if (b == 0) {
return -1;
}
if (0 < b && b < 10) {
return b + 1;
}
return -2;
};
ASN1HEX.getL = function (c, b) {
var a = ASN1HEX.getLblen(c, b);
if (a < 1) {
return "";
}
return c.substr(b + 2, a * 2);
};
ASN1HEX.getVblen = function (d, a) {
var c, b;
c = ASN1HEX.getL(d, a);
if (c == "") {
return -1;
}
if (c.substr(0, 1) === "8") {
b = new BigInteger(c.substr(2), 16);
} else {
b = new BigInteger(c, 16);
}
return b.intValue();
};
ASN1HEX.getVidx = function (c, b) {
var a = ASN1HEX.getLblen(c, b);
if (a < 0) {
return a;
}
return b + (a + 1) * 2;
};
ASN1HEX.getV = function (d, a) {
var c = ASN1HEX.getVidx(d, a);
var b = ASN1HEX.getVblen(d, a);
return d.substr(c, b * 2);
};
ASN1HEX.getTLV = function (b, a) {
return b.substr(a, 2) + ASN1HEX.getL(b, a) + ASN1HEX.getV(b, a);
};
ASN1HEX.getTLVblen = function (b, a) {
return 2 + ASN1HEX.getLblen(b, a) * 2 + ASN1HEX.getVblen(b, a) * 2;
};
ASN1HEX.getNextSiblingIdx = function (d, a) {
var c = ASN1HEX.getVidx(d, a);
var b = ASN1HEX.getVblen(d, a);
return c + b * 2;
};
ASN1HEX.getChildIdx = function (e, k) {
var l = ASN1HEX;
var j = [];
var c, f, g;
c = l.getVidx(e, k);
f = l.getVblen(e, k) * 2;
if (e.substr(k, 2) == "03") {
c += 2;
f -= 2;
}
g = 0;
var d = c;
while (g <= f) {
var b = l.getTLVblen(e, d);
g += b;
if (g <= f) {
j.push(d);
}
d += b;
if (g >= f) {
break;
}
}
return j;
};
ASN1HEX.getNthChildIdx = function (d, b, e) {
var c = ASN1HEX.getChildIdx(d, b);
return c[e];
};
ASN1HEX.getIdxbyList = function (e, d, c, i) {
var g = ASN1HEX;
var f, b;
if (c.length == 0) {
if (i !== undefined) {
if (e.substr(d, 2) !== i) {
return -1;
}
}
return d;
}
f = c.shift();
b = g.getChildIdx(e, d);
if (f >= b.length) {
return -1;
}
return g.getIdxbyList(e, b[f], c, i);
};
ASN1HEX.getIdxbyListEx = function (f, k, b, g) {
var m = ASN1HEX;
var d, l;
if (b.length == 0) {
if (g !== undefined) {
if (f.substr(k, 2) !== g) {
return -1;
}
}
return k;
}
d = b.shift();
l = m.getChildIdx(f, k);
var j = 0;
for (var e = 0; e < l.length; e++) {
var c = f.substr(l[e], 2);
if (typeof d == "number" && !m.isContextTag(c) && j == d || typeof d == "string" && m.isContextTag(c, d)) {
return m.getIdxbyListEx(f, l[e], b, g);
}
if (!m.isContextTag(c)) {
j++;
}
}
return -1;
};
ASN1HEX.getTLVbyList = function (d, c, b, f) {
var e = ASN1HEX;
var a = e.getIdxbyList(d, c, b, f);
if (a == -1) {
return null;
}
if (a >= d.length) {
return null;
}
return e.getTLV(d, a);
};
ASN1HEX.getTLVbyListEx = function (d, c, b, f) {
var e = ASN1HEX;
var a = e.getIdxbyListEx(d, c, b, f);
if (a == -1) {
return null;
}
return e.getTLV(d, a);
};
ASN1HEX.getVbyList = function (e, c, b, g, i) {
var f = ASN1HEX;
var a, d;
a = f.getIdxbyList(e, c, b, g);
if (a == -1) {
return null;
}
if (a >= e.length) {
return null;
}
d = f.getV(e, a);
if (i === true) {
d = d.substr(2);
}
return d;
};
ASN1HEX.getVbyListEx = function (b, e, a, d, f) {
var j = ASN1HEX;
var g, c, i;
g = j.getIdxbyListEx(b, e, a, d);
if (g == -1) {
return null;
}
i = j.getV(b, g);
if (b.substr(g, 2) == "03" && f !== false) {
i = i.substr(2);
}
return i;
};
ASN1HEX.hextooidstr = function (e) {
var h = function h(b, a) {
if (b.length >= a) {
return b;
}
return new Array(a - b.length + 1).join("0") + b;
};
var l = [];
var o = e.substr(0, 2);
var f = parseInt(o, 16);
l[0] = new String(Math.floor(f / 40));
l[1] = new String(f % 40);
var m = e.substr(2);
var k = [];
for (var g = 0; g < m.length / 2; g++) {
k.push(parseInt(m.substr(g * 2, 2), 16));
}
var j = [];
var d = "";
for (var g = 0; g < k.length; g++) {
if (k[g] & 128) {
d = d + h((k[g] & 127).toString(2), 7);
} else {
d = d + h((k[g] & 127).toString(2), 7);
j.push(new String(parseInt(d, 2)));
d = "";
}
}
var n = l.join(".");
if (j.length > 0) {
n = n + "." + j.join(".");
}
return n;
};
ASN1HEX.dump = function (t, c, l, g) {
var p = ASN1HEX;
var j = p.getV;
var y = p.dump;
var w = p.getChildIdx;
var e = t;
if (t instanceof KJUR.asn1.ASN1Object) {
e = t.getEncodedHex();
}
var q = function q(A, i) {
if (A.length <= i * 2) {
return A;
} else {
var v = A.substr(0, i) + "..(total " + A.length / 2 + "bytes).." + A.substr(A.length - i, i);
return v;
}
};
if (c === undefined) {
c = {
ommit_long_octet: 32
};
}
if (l === undefined) {
l = 0;
}
if (g === undefined) {
g = "";
}
var x = c.ommit_long_octet;
var z = e.substr(l, 2);
if (z == "01") {
var h = j(e, l);
if (h == "00") {
return g + "BOOLEAN FALSE\n";
} else {
return g + "BOOLEAN TRUE\n";
}
}
if (z == "02") {
var h = j(e, l);
return g + "INTEGER " + q(h, x) + "\n";
}
if (z == "03") {
var h = j(e, l);
if (p.isASN1HEX(h.substr(2))) {
var k = g + "BITSTRING, encapsulates\n";
k = k + y(h.substr(2), c, 0, g + " ");
return k;
} else {
return g + "BITSTRING " + q(h, x) + "\n";
}
}
if (z == "04") {
var h = j(e, l);
if (p.isASN1HEX(h)) {
var k = g + "OCTETSTRING, encapsulates\n";
k = k + y(h, c, 0, g + " ");
return k;
} else {
return g + "OCTETSTRING " + q(h, x) + "\n";
}
}
if (z == "05") {
return g + "NULL\n";
}
if (z == "06") {
var m = j(e, l);
var b = KJUR.asn1.ASN1Util.oidHexToInt(m);
var o = KJUR.asn1.x509.OID.oid2name(b);
var a = b.replace(/\./g, " ");
if (o != "") {
return g + "ObjectIdentifier " + o + " (" + a + ")\n";
} else {
return g + "ObjectIdentifier (" + a + ")\n";
}
}
if (z == "0a") {
return g + "ENUMERATED " + parseInt(j(e, l)) + "\n";
}
if (z == "0c") {
return g + "UTF8String '" + hextoutf8(j(e, l)) + "'\n";
}
if (z == "13") {
return g + "PrintableString '" + hextoutf8(j(e, l)) + "'\n";
}
if (z == "14") {
return g + "TeletexString '" + hextoutf8(j(e, l)) + "'\n";
}
if (z == "16") {
return g + "IA5String '" + hextoutf8(j(e, l)) + "'\n";
}
if (z == "17") {
return g + "UTCTime " + hextoutf8(j(e, l)) + "\n";
}
if (z == "18") {
return g + "GeneralizedTime " + hextoutf8(j(e, l)) + "\n";
}
if (z == "1a") {
return g + "VisualString '" + hextoutf8(j(e, l)) + "'\n";
}
if (z == "1e") {
return g + "BMPString '" + hextoutf8(j(e, l)) + "'\n";
}
if (z == "30") {
if (e.substr(l, 4) == "3000") {
return g + "SEQUENCE {}\n";
}
var k = g + "SEQUENCE\n";
var d = w(e, l);
var f = c;
if ((d.length == 2 || d.length == 3) && e.substr(d[0], 2) == "06" && e.substr(d[d.length - 1], 2) == "04") {
var o = p.oidname(j(e, d[0]));
var r = JSON.parse(JSON.stringify(c));
r.x509ExtName = o;
f = r;
}
for (var u = 0; u < d.length; u++) {
k = k + y(e, f, d[u], g + " ");
}
return k;
}
if (z == "31") {
var k = g + "SET\n";
var d = w(e, l);
for (var u = 0; u < d.length; u++) {
k = k + y(e, c, d[u], g + " ");
}
return k;
}
var z = parseInt(z, 16);
if ((z & 128) != 0) {
var n = z & 31;
if ((z & 32) != 0) {
var k = g + "[" + n + "]\n";
var d = w(e, l);
for (var u = 0; u < d.length; u++) {
k = k + y(e, c, d[u], g + " ");
}
return k;
} else {
var h = j(e, l);
if (ASN1HEX.isASN1HEX(h)) {
var k = g + "[" + n + "]\n";
k = k + y(h, c, 0, g + " ");
return k;
} else {
if (h.substr(0, 8) == "68747470") {
h = hextoutf8(h);
} else {
if (c.x509ExtName === "subjectAltName" && n == 2) {
h = hextoutf8(h);
}
}
}
var k = g + "[" + n + "] " + h + "\n";
return k;
}
}
return g + "UNKNOWN(" + z + ") " + j(e, l) + "\n";
};
ASN1HEX.isContextTag = function (c, b) {
c = c.toLowerCase();
var f, e;
try {
f = parseInt(c, 16);
} catch (d) {
return -1;
}
if (b === undefined) {
if ((f & 192) == 128) {
return true;
} else {
return false;
}
}
try {
var a = b.match(/^\[[0-9]+\]$/);
if (a == null) {
return false;
}
e = parseInt(b.substr(1, b.length - 1), 10);
if (e > 31) {
return false;
}
if ((f & 192) == 128 && (f & 31) == e) {
return true;
}
return false;
} catch (d) {
return false;
}
};
ASN1HEX.isASN1HEX = function (e) {
var d = ASN1HEX;
if (e.length % 2 == 1) {
return false;
}
var c = d.getVblen(e, 0);
var b = e.substr(0, 2);
var f = d.getL(e, 0);
var a = e.length - b.length - f.length;
if (a == c * 2) {
return true;
}
return false;
};
ASN1HEX.checkStrictDER = function (g, o, d, c, r) {
var s = ASN1HEX;
if (d === undefined) {
if (typeof g != "string") {
throw new Error("not hex string");
}
g = g.toLowerCase();
if (!KJUR.lang.String.isHex(g)) {
throw new Error("not hex string");
}
d = g.length;
c = g.length / 2;
if (c < 128) {
r = 1;
} else {
r = Math.ceil(c.toString(16)) + 1;
}
}
var k = s.getL(g, o);
if (k.length > r * 2) {
throw new Error("L of TLV too long: idx=" + o);
}
var n = s.getVblen(g, o);
if (n > c) {
throw new Error("value of L too long than hex: idx=" + o);
}
var q = s.getTLV(g, o);
var f = q.length - 2 - s.getL(g, o).length;
if (f !== n * 2) {
throw new Error("V string length and L's value not the same:" + f + "/" + n * 2);
}
if (o === 0) {
if (g.length != q.length) {
throw new Error("total length and TLV length unmatch:" + g.length + "!=" + q.length);
}
}
var b = g.substr(o, 2);
if (b === "02") {
var a = s.getVidx(g, o);
if (g.substr(a, 2) == "00" && g.charCodeAt(a + 2) < 56) {
throw new Error("not least zeros for DER INTEGER");
}
}
if (parseInt(b, 16) & 32) {
var p = s.getVblen(g, o);
var m = 0;
var l = s.getChildIdx(g, o);
for (var e = 0; e < l.length; e++) {
var j = s.getTLV(g, l[e]);
m += j.length;
s.checkStrictDER(g, l[e], d, c, r);
}
if (p * 2 != m) {
throw new Error("sum of children's TLV length and L unmatch: " + p * 2 + "!=" + m);
}
}
};
ASN1HEX.oidname = function (a) {
var c = KJUR.asn1;
if (KJUR.lang.String.isHex(a)) {
a = c.ASN1Util.oidHexToInt(a);
}
var b = c.x509.OID.oid2name(a);
if (b === "") {
b = a;
}
return b;
};
if (typeof KJUR == "undefined" || !KJUR) {
KJUR = {};
}
if (typeof KJUR.asn1 == "undefined" || !KJUR.asn1) {
KJUR.asn1 = {};
}
if (typeof KJUR.asn1.x509 == "undefined" || !KJUR.asn1.x509) {
KJUR.asn1.x509 = {};
}
KJUR.asn1.x509.Certificate = function (h) {
KJUR.asn1.x509.Certificate.superclass.constructor.call(this);
var d = KJUR,
c = d.asn1,
f = c.DERBitString,
b = c.DERSequence,
g = c.x509,
a = g.TBSCertificate,
e = g.AlgorithmIdentifier;
this.params = undefined;
this.setByParam = function (i) {
this.params = i;
};
this.sign = function () {
var k = this.params;
var i = k.tbsobj.getEncodedHex();
var j = new KJUR.crypto.Signature({
alg: k.sigalg
});
j.init(k.cakey);
j.updateHex(i);
k.sighex = j.sign();
};
this.getPEM = function () {
return hextopem(this.getEncodedHex(), "CERTIFICATE");
};
this.getEncodedHex = function () {
var k = this.params;
if (k.tbsobj == undefined || k.tbsobj == null) {
k.tbsobj = new a(k);
}
if (k.sighex == undefined && k.cakey != undefined) {
this.sign();
}
if (k.sighex == undefined) {
throw new Error("sighex or cakey parameter not defined");
}
var i = [];
i.push(k.tbsobj);
i.push(new e({
name: k.sigalg
}));
i.push(new f({
hex: "00" + k.sighex
}));
var j = new b({
array: i
});
return j.getEncodedHex();
};
if (h != undefined) {
this.params = h;
}
};
YAHOO.lang.extend(KJUR.asn1.x509.Certificate, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.TBSCertificate = function (f) {
KJUR.asn1.x509.TBSCertificate.superclass.constructor.call(this);
var b = KJUR,
i = b.asn1,
d = i.x509,
c = i.DERTaggedObject,
h = i.DERInteger,
g = i.DERSequence,
l = d.AlgorithmIdentifier,
e = d.Time,
a = d.X500Name,
j = d.Extensions,
k = d.SubjectPublicKeyInfo;
this.params = null;
this.setByParam = function (m) {
this.params = m;
};
this.getEncodedHex = function () {
var n = [];
var q = this.params;
if (q.version != undefined || q.version != 1) {
var m = 2;
if (q.version != undefined) {
m = q.version - 1;
}
var p = new c({
obj: new h({
"int": m
})
});
n.push(p);
}
n.push(new h(q.serial));
n.push(new l({
name: q.sigalg
}));
n.push(new a(q.issuer));
n.push(new g({
array: [new e({
str: q.notbefore
}), new e({
str: q.notafter
})]
}));
n.push(new a(q.subject));
n.push(new k(KEYUTIL.getKey(q.sbjpubkey)));
if (q.ext !== undefined && q.ext.length > 0) {
n.push(new c({
tag: "a3",
obj: new j(q.ext)
}));
}
var o = new KJUR.asn1.DERSequence({
array: n
});
return o.getEncodedHex();
};
if (f !== undefined) {
this.setByParam(f);
}
};
YAHOO.lang.extend(KJUR.asn1.x509.TBSCertificate, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.Extensions = function (d) {
KJUR.asn1.x509.Extensions.superclass.constructor.call(this);
var c = KJUR,
b = c.asn1,
a = b.DERSequence,
e = b.x509;
this.aParam = [];
this.setByParam = function (f) {
this.aParam = f;
};
this.getEncodedHex = function () {
var f = [];
for (var h = 0; h < this.aParam.length; h++) {
var l = this.aParam[h];
var k = l.extname;
var j = null;
if (l.extn != undefined) {
j = new e.PrivateExtension(l);
} else {
if (k == "subjectKeyIdentifier") {
j = new e.SubjectKeyIdentifier(l);
} else {
if (k == "keyUsage") {
j = new e.KeyUsage(l);
} else {
if (k == "subjectAltName") {
j = new e.SubjectAltName(l);
} else {
if (k == "issuerAltName") {
j = new e.IssuerAltName(l);
} else {
if (k == "basicConstraints") {
j = new e.BasicConstraints(l);
} else {
if (k == "cRLDistributionPoints") {
j = new e.CRLDistributionPoints(l);
} else {
if (k == "certificatePolicies") {
j = new e.CertificatePolicies(l);
} else {
if (k == "authorityKeyIdentifier") {
j = new e.AuthorityKeyIdentifier(l);
} else {
if (k == "extKeyUsage") {
j = new e.ExtKeyUsage(l);
} else {
if (k == "authorityInfoAccess") {
j = new e.AuthorityInfoAccess(l);
} else {
if (k == "cRLNumber") {
j = new e.CRLNumber(l);
} else {
if (k == "cRLReason") {
j = new e.CRLReason(l);
} else {
if (k == "ocspNonce") {
j = new e.OCSPNonce(l);
} else {
if (k == "ocspNoCheck") {
j = new e.OCSPNoCheck(l);
} else {
if (k == "adobeTimeStamp") {
j = new e.AdobeTimeStamp(l);
} else {
throw new Error("extension not supported:" + JSON.stringify(l));
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
if (j != null) {
f.push(j);
}
}
var g = new a({
array: f
});
return g.getEncodedHex();
};
if (d != undefined) {
this.setByParam(d);
}
};
YAHOO.lang.extend(KJUR.asn1.x509.Extensions, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.Extension = function (d) {
KJUR.asn1.x509.Extension.superclass.constructor.call(this);
var f = null,
a = KJUR,
e = a.asn1,
h = e.DERObjectIdentifier,
i = e.DEROctetString,
b = e.DERBitString,
g = e.DERBoolean,
c = e.DERSequence;
this.getEncodedHex = function () {
var m = new h({
oid: this.oid
});
var l = new i({
hex: this.getExtnValueHex()
});
var k = new Array();
k.push(m);
if (this.critical) {
k.push(new g());
}
k.push(l);
var j = new c({
array: k
});
return j.getEncodedHex();
};
this.critical = false;
if (d !== undefined) {
if (d.critical !== undefined) {
this.critical = d.critical;
}
}
};
YAHOO.lang.extend(KJUR.asn1.x509.Extension, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.KeyUsage = function (f) {
KJUR.asn1.x509.KeyUsage.superclass.constructor.call(this, f);
var a = X509.KEYUSAGE_NAME;
this.getExtnValueHex = function () {
return this.asn1ExtnValue.getEncodedHex();
};
this.oid = "2.5.29.15";
if (f !== undefined) {
if (f.bin !== undefined) {
this.asn1ExtnValue = new KJUR.asn1.DERBitString(f);
}
if (f.names !== undefined && f.names.length !== undefined) {
var e = f.names;
var d = "000000000";
for (var c = 0; c < e.length; c++) {
for (var b = 0; b < a.length; b++) {
if (e[c] === a[b]) {
d = d.substring(0, b) + "1" + d.substring(b + 1, d.length);
}
}
}
this.asn1ExtnValue = new KJUR.asn1.DERBitString({
bin: d
});
}
}
};
YAHOO.lang.extend(KJUR.asn1.x509.KeyUsage, KJUR.asn1.x509.Extension);
KJUR.asn1.x509.BasicConstraints = function (g) {
KJUR.asn1.x509.BasicConstraints.superclass.constructor.call(this, g);
var c = KJUR.asn1,
e = c.DERBoolean,
f = c.DERInteger,
b = c.DERSequence;
var a = false;
var d = -1;
this.getExtnValueHex = function () {
var i = new Array();
if (this.cA) {
i.push(new e());
}
if (this.pathLen > -1) {
i.push(new f({
"int": this.pathLen
}));
}
var h = new b({
array: i
});
this.asn1ExtnValue = h;
return this.asn1ExtnValue.getEncodedHex();
};
this.oid = "2.5.29.19";
this.cA = false;
this.pathLen = -1;
if (g !== undefined) {
if (g.cA !== undefined) {
this.cA = g.cA;
}
if (g.pathLen !== undefined) {
this.pathLen = g.pathLen;
}
}
};
YAHOO.lang.extend(KJUR.asn1.x509.BasicConstraints, KJUR.asn1.x509.Extension);
KJUR.asn1.x509.CRLDistributionPoints = function (d) {
KJUR.asn1.x509.CRLDistributionPoints.superclass.constructor.call(this, d);
var b = KJUR,
a = b.asn1,
c = a.x509;
this.getExtnValueHex = function () {
return this.asn1ExtnValue.getEncodedHex();
};
this.setByDPArray = function (e) {
var f = [];
for (var g = 0; g < e.length; g++) {
if (e[g] instanceof KJUR.asn1.ASN1Object) {
f.push(e[g]);
} else {
var h = new c.DistributionPoint(e[g]);
f.push(h);
}
}
this.asn1ExtnValue = new a.DERSequence({
array: f
});
};
this.setByOneURI = function (f) {
var e = new c.DistributionPoint({
fulluri: f
});
this.setByDPArray([e]);
};
this.oid = "2.5.29.31";
if (d !== undefined) {
if (d.array !== undefined) {
this.setByDPArray(d.array);
} else {
if (d.uri !== undefined) {
this.setByOneURI(d.uri);
}
}
}
};
YAHOO.lang.extend(KJUR.asn1.x509.CRLDistributionPoints, KJUR.asn1.x509.Extension);
KJUR.asn1.x509.DistributionPoint = function (e) {
KJUR.asn1.x509.DistributionPoint.superclass.constructor.call(this);
var a = null,
c = KJUR,
b = c.asn1,
d = b.x509.DistributionPointName;
this.getEncodedHex = function () {
var f = new b.DERSequence();
if (this.asn1DP != null) {
var g = new b.DERTaggedObject({
explicit: true,
tag: "a0",
obj: this.asn1DP
});
f.appendASN1Object(g);
}
this.hTLV = f.getEncodedHex();
return this.hTLV;
};
if (e !== undefined) {
if (e.dpobj !== undefined) {
this.asn1DP = e.dpobj;
} else {
if (e.dpname !== undefined) {
this.asn1DP = new d(e.dpname);
} else {
if (e.fulluri !== undefined) {
this.asn1DP = new d({
full: [{
uri: e.fulluri
}]
});
}
}
}
}
};
YAHOO.lang.extend(KJUR.asn1.x509.DistributionPoint, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.DistributionPointName = function (h) {
KJUR.asn1.x509.DistributionPointName.superclass.constructor.call(this);
var g = null,
d = null,
a = null,
f = null,
c = KJUR,
b = c.asn1,
e = b.DERTaggedObject;
this.getEncodedHex = function () {
if (this.type != "full") {
throw new Error("currently type shall be 'full': " + this.type);
}
this.asn1Obj = new e({
explicit: false,
tag: this.tag,
obj: this.asn1V
});
this.hTLV = this.asn1Obj.getEncodedHex();
return this.hTLV;
};
if (h !== undefined) {
if (b.x509.GeneralNames.prototype.isPrototypeOf(h)) {
this.type = "full";
this.tag = "a0";
this.asn1V = h;
} else {
if (h.full !== undefined) {
this.type = "full";
this.tag = "a0";
this.asn1V = new b.x509.GeneralNames(h.full);
} else {
throw new Error("This class supports GeneralNames only as argument");
}
}
}
};
YAHOO.lang.extend(KJUR.asn1.x509.DistributionPointName, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.CertificatePolicies = function (f) {
KJUR.asn1.x509.CertificatePolicies.superclass.constructor.call(this, f);
var c = KJUR,
b = c.asn1,
e = b.x509,
a = b.DERSequence,
d = e.PolicyInformation;
this.params = null;
this.getExtnValueHex = function () {
var j = [];
for (var h = 0; h < this.params.array.length; h++) {
j.push(new d(this.params.array[h]));
}
var g = new a({
array: j
});
this.asn1ExtnValue = g;
return this.asn1ExtnValue.getEncodedHex();
};
this.oid = "2.5.29.32";
if (f !== undefined) {
this.params = f;
}
};
YAHOO.lang.extend(KJUR.asn1.x509.CertificatePolicies, KJUR.asn1.x509.Extension);
KJUR.asn1.x509.PolicyInformation = function (d) {
KJUR.asn1.x509.PolicyInformation.superclass.constructor.call(this, d);
var c = KJUR.asn1,
b = c.DERSequence,
e = c.DERObjectIdentifier,
a = c.x509.PolicyQualifierInfo;
this.params = null;
this.getEncodedHex = function () {
if (this.params.policyoid === undefined && this.params.array === undefined) {
throw new Error("parameter oid and array missing");
}
var f = [new e(this.params.policyoid)];
if (this.params.array !== undefined) {
var j = [];
for (var h = 0; h < this.params.array.length; h++) {
j.push(new a(this.params.array[h]));
}
if (j.length > 0) {
f.push(new b({
array: j
}));
}
}
var g = new b({
array: f
});
return g.getEncodedHex();
};
if (d !== undefined) {
this.params = d;
}
};
YAHOO.lang.extend(KJUR.asn1.x509.PolicyInformation, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.PolicyQualifierInfo = function (e) {
KJUR.asn1.x509.PolicyQualifierInfo.superclass.constructor.call(this, e);
var c = KJUR.asn1,
b = c.DERSequence,
d = c.DERIA5String,
f = c.DERObjectIdentifier,
a = c.x509.UserNotice;
this.params = null;
this.getEncodedHex = function () {
if (this.params.cps !== undefined) {
var g = new b({
array: [new f({
oid: "1.3.6.1.5.5.7.2.1"
}), new d({
str: this.params.cps
})]
});
return g.getEncodedHex();
}
if (this.params.unotice != undefined) {
var g = new b({
array: [new f({
oid: "1.3.6.1.5.5.7.2.2"
}), new a(this.params.unotice)]
});
return g.getEncodedHex();
}
};
if (e !== undefined) {
this.params = e;
}
};
YAHOO.lang.extend(KJUR.asn1.x509.PolicyQualifierInfo, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.UserNotice = function (e) {
KJUR.asn1.x509.UserNotice.superclass.constructor.call(this, e);
var a = KJUR.asn1.DERSequence,
d = KJUR.asn1.DERInteger,
c = KJUR.asn1.x509.DisplayText,
b = KJUR.asn1.x509.NoticeReference;
this.params = null;
this.getEncodedHex = function () {
var f = [];
if (this.params.noticeref !== undefined) {
f.push(new b(this.params.noticeref));
}
if (this.params.exptext !== undefined) {
f.push(new c(this.params.exptext));
}
var g = new a({
array: f
});
return g.getEncodedHex();
};
if (e !== undefined) {
this.params = e;
}
};
YAHOO.lang.extend(KJUR.asn1.x509.UserNotice, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.NoticeReference = function (d) {
KJUR.asn1.x509.NoticeReference.superclass.constructor.call(this, d);
var a = KJUR.asn1.DERSequence,
c = KJUR.asn1.DERInteger,
b = KJUR.asn1.x509.DisplayText;
this.params = null;
this.getEncodedHex = function () {
var f = [];
if (this.params.org !== undefined) {
f.push(new b(this.params.org));
}
if (this.params.noticenum !== undefined) {
var h = [];
var e = this.params.noticenum;
for (var j = 0; j < e.length; j++) {
h.push(new c(e[j]));
}
f.push(new a({
array: h
}));
}
if (f.length == 0) {
throw new Error("parameter is empty");
}
var g = new a({
array: f
});
return g.getEncodedHex();
};
if (d !== undefined) {
this.params = d;
}
};
YAHOO.lang.extend(KJUR.asn1.x509.NoticeReference, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.DisplayText = function (a) {
KJUR.asn1.x509.DisplayText.superclass.constructor.call(this, a);
this.hT = "0c";
if (a !== undefined) {
if (a.type === "ia5") {
this.hT = "16";
} else {
if (a.type === "vis") {
this.hT = "1a";
} else {
if (a.type === "bmp") {
this.hT = "1e";
}
}
}
}
};
YAHOO.lang.extend(KJUR.asn1.x509.DisplayText, KJUR.asn1.DERAbstractString);
KJUR.asn1.x509.ExtKeyUsage = function (c) {
KJUR.asn1.x509.ExtKeyUsage.superclass.constructor.call(this, c);
var b = KJUR,
a = b.asn1;
this.setPurposeArray = function (d) {
this.asn1ExtnValue = new a.DERSequence();
for (var e = 0; e < d.length; e++) {
var f = new a.DERObjectIdentifier(d[e]);
this.asn1ExtnValue.appendASN1Object(f);
}
};
this.getExtnValueHex = function () {
return this.asn1ExtnValue.getEncodedHex();
};
this.oid = "2.5.29.37";
if (c !== undefined) {
if (c.array !== undefined) {
this.setPurposeArray(c.array);
}
}
};
YAHOO.lang.extend(KJUR.asn1.x509.ExtKeyUsage, KJUR.asn1.x509.Extension);
KJUR.asn1.x509.AuthorityKeyIdentifier = function (f) {
KJUR.asn1.x509.AuthorityKeyIdentifier.superclass.constructor.call(this, f);
var b = KJUR,
a = b.asn1,
d = a.DERTaggedObject,
e = a.x509.GeneralNames,
c = b.crypto.Util.isKey;
this.asn1KID = null;
this.asn1CertIssuer = null;
this.asn1CertSN = null;
this.getExtnValueHex = function () {
var h = new Array();
if (this.asn1KID) {
h.push(new d({
explicit: false,
tag: "80",
obj: this.asn1KID
}));
}
if (this.asn1CertIssuer) {
h.push(new d({
explicit: false,
tag: "a1",
obj: new e([{
dn: this.asn1CertIssuer
}])
}));
}
if (this.asn1CertSN) {
h.push(new d({
explicit: false,
tag: "82",
obj: this.asn1CertSN
}));
}
var g = new a.DERSequence({
array: h
});
this.asn1ExtnValue = g;
return this.asn1ExtnValue.getEncodedHex();
};
this.setKIDByParam = function (i) {
if (i.str !== undefined || i.hex !== undefined) {
this.asn1KID = new KJUR.asn1.DEROctetString(i);
} else {
if (_typeof(i) === "object" && KJUR.crypto.Util.isKey(i) || typeof i === "string" && i.indexOf("BEGIN ") != -1) {
var h = i;
if (typeof i === "string") {
h = KEYUTIL.getKey(i);
}
var g = KEYUTIL.getKeyID(h);
this.asn1KID = new KJUR.asn1.DEROctetString({
hex: g
});
}
}
};
this.setCertIssuerByParam = function (g) {
if (g.str !== undefined || g.ldapstr !== undefined || g.hex !== undefined || g.certsubject !== undefined || g.certissuer !== undefined) {
this.asn1CertIssuer = new KJUR.asn1.x509.X500Name(g);
} else {
if (typeof g === "string" && g.indexOf("BEGIN ") != -1 && g.indexOf("CERTIFICATE") != -1) {
this.asn1CertIssuer = new KJUR.asn1.x509.X500Name({
certissuer: g
});
}
}
};
this.setCertSNByParam = function (i) {
if (i.str !== undefined || i.bigint !== undefined || i.hex !== undefined) {
this.asn1CertSN = new KJUR.asn1.DERInteger(i);
} else {
if (typeof i === "string" && i.indexOf("BEGIN ") != -1 && i.indexOf("CERTIFICATE")) {
var g = new X509();
g.readCertPEM(i);
var h = g.getSerialNumberHex();
this.asn1CertSN = new KJUR.asn1.DERInteger({
hex: h
});
}
}
};
this.oid = "2.5.29.35";
if (f !== undefined) {
if (f.kid !== undefined) {
this.setKIDByParam(f.kid);
}
if (f.issuer !== undefined) {
this.setCertIssuerByParam(f.issuer);
}
if (f.sn !== undefined) {
this.setCertSNByParam(f.sn);
}
if (f.issuersn !== undefined && typeof f.issuersn === "string" && f.issuersn.indexOf("BEGIN ") != -1 && f.issuersn.indexOf("CERTIFICATE")) {
this.setCertSNByParam(f.issuersn);
this.setCertIssuerByParam(f.issuersn);
}
}
};
YAHOO.lang.extend(KJUR.asn1.x509.AuthorityKeyIdentifier, KJUR.asn1.x509.Extension);
KJUR.asn1.x509.SubjectKeyIdentifier = function (d) {
KJUR.asn1.x509.SubjectKeyIdentifier.superclass.constructor.call(this, d);
var b = KJUR,
a = b.asn1,
c = a.DEROctetString;
this.asn1KID = null;
this.getExtnValueHex = function () {
this.asn1ExtnValue = this.asn1KID;
return this.asn1ExtnValue.getEncodedHex();
};
this.setKIDByParam = function (g) {
if (g.str !== undefined || g.hex !== undefined) {
this.asn1KID = new c(g);
} else {
if (_typeof(g) === "object" && KJUR.crypto.Util.isKey(g) || typeof g === "string" && g.indexOf("BEGIN") != -1) {
var f = g;
if (typeof g === "string") {
f = KEYUTIL.getKey(g);
}
var e = KEYUTIL.getKeyID(f);
this.asn1KID = new KJUR.asn1.DEROctetString({
hex: e
});
}
}
};
this.oid = "2.5.29.14";
if (d !== undefined) {
if (d.kid !== undefined) {
this.setKIDByParam(d.kid);
}
}
};
YAHOO.lang.extend(KJUR.asn1.x509.SubjectKeyIdentifier, KJUR.asn1.x509.Extension);
KJUR.asn1.x509.AuthorityInfoAccess = function (a) {
KJUR.asn1.x509.AuthorityInfoAccess.superclass.constructor.call(this, a);
this.setAccessDescriptionArray = function (k) {
var d = new Array(),
b = KJUR,
g = b.asn1,
c = g.DERSequence,
j = g.DERObjectIdentifier,
l = g.x509.GeneralName;
for (var f = 0; f < k.length; f++) {
var e;
var h = k[f];
if (h.ocsp !== undefined) {
e = new c({
array: [new j({
oid: "1.3.6.1.5.5.7.48.1"
}), new l({
uri: h.ocsp
})]
});
} else {
if (h.caissuer !== undefined) {
e = new c({
array: [new j({
oid: "1.3.6.1.5.5.7.48.2"
}), new l({
uri: h.caissuer
})]
});
} else {
throw new Error("unknown AccessMethod parameter: " + JSON.stringify(h));
}
}
d.push(e);
}
this.asn1ExtnValue = new c({
array: d
});
};
this.getExtnValueHex = function () {
return this.asn1ExtnValue.getEncodedHex();
};
this.oid = "1.3.6.1.5.5.7.1.1";
if (a !== undefined) {
if (a.array !== undefined) {
this.setAccessDescriptionArray(a.array);
}
}
};
YAHOO.lang.extend(KJUR.asn1.x509.AuthorityInfoAccess, KJUR.asn1.x509.Extension);
KJUR.asn1.x509.SubjectAltName = function (a) {
KJUR.asn1.x509.SubjectAltName.superclass.constructor.call(this, a);
this.setNameArray = function (b) {
this.asn1ExtnValue = new KJUR.asn1.x509.GeneralNames(b);
};
this.getExtnValueHex = function () {
return this.asn1ExtnValue.getEncodedHex();
};
this.oid = "2.5.29.17";
if (a !== undefined) {
if (a.array !== undefined) {
this.setNameArray(a.array);
}
}
};
YAHOO.lang.extend(KJUR.asn1.x509.SubjectAltName, KJUR.asn1.x509.Extension);
KJUR.asn1.x509.IssuerAltName = function (a) {
KJUR.asn1.x509.IssuerAltName.superclass.constructor.call(this, a);
this.setNameArray = function (b) {
this.asn1ExtnValue = new KJUR.asn1.x509.GeneralNames(b);
};
this.getExtnValueHex = function () {
return this.asn1ExtnValue.getEncodedHex();
};
this.oid = "2.5.29.18";
if (a !== undefined) {
if (a.array !== undefined) {
this.setNameArray(a.array);
}
}
};
YAHOO.lang.extend(KJUR.asn1.x509.IssuerAltName, KJUR.asn1.x509.Extension);
KJUR.asn1.x509.PrivateExtension = function (f) {
KJUR.asn1.x509.PrivateExtension.superclass.constructor.call(this, f);
var c = KJUR,
e = c.lang.String.isHex,
b = c.asn1,
d = b.x509.OID.name2oid,
a = b.ASN1Util.newObject;
this.params = null;
this.setByParam = function (g) {
this.oid = d(g.extname);
this.params = g;
};
this.getExtnValueHex = function () {
if (this.params.extname == undefined || this.params.extn == undefined) {
throw new Error("extname or extnhex not specified");
}
var h = this.params.extn;
if (typeof h == "string" && e(h)) {
return h;
} else {
if (_typeof(h) == "object") {
try {
return a(h).getEncodedHex();
} catch (g) {}
}
}
throw new Error("unsupported extn value");
};
if (f != undefined) {
this.setByParam(f);
}
};
YAHOO.lang.extend(KJUR.asn1.x509.PrivateExtension, KJUR.asn1.x509.Extension);
KJUR.asn1.x509.CRL = function (g) {
KJUR.asn1.x509.CRL.superclass.constructor.call(this);
var c = KJUR,
b = c.asn1,
a = b.DERSequence,
e = b.DERBitString,
f = b.x509,
d = f.AlgorithmIdentifier,
h = f.TBSCertList;
this.params = undefined;
this.setByParam = function (i) {
this.params = i;
};
this.sign = function () {
var j = new h(this.params).getEncodedHex();
var k = new KJUR.crypto.Signature({
alg: this.params.sigalg
});
k.init(this.params.cakey);
k.updateHex(j);
var i = k.sign();
this.params.sighex = i;
};
this.getPEM = function () {
return hextopem(this.getEncodedHex(), "X509 CRL");
};
this.getEncodedHex = function () {
var k = this.params;
if (k.tbsobj == undefined) {
k.tbsobj = new h(k);
}
if (k.sighex == undefined && k.cakey != undefined) {
this.sign();
}
if (k.sighex == undefined) {
throw new Error("sighex or cakey parameter not defined");
}
var i = [];
i.push(k.tbsobj);
i.push(new d({
name: k.sigalg
}));
i.push(new e({
hex: "00" + k.sighex
}));
var j = new a({
array: i
});
return j.getEncodedHex();
};
if (g != undefined) {
this.params = g;
}
};
YAHOO.lang.extend(KJUR.asn1.x509.CRL, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.TBSCertList = function (f) {
KJUR.asn1.x509.TBSCertList.superclass.constructor.call(this);
var b = KJUR,
i = b.asn1,
h = i.DERInteger,
g = i.DERSequence,
c = i.DERTaggedObject,
k = i.DERObjectIdentifier,
d = i.x509,
l = d.AlgorithmIdentifier,
e = d.Time,
j = d.Extensions,
a = d.X500Name;
this.params = null;
this.setByParam = function (m) {
this.params = m;
};
this.getRevCertSequence = function () {
var m = [];
var n = this.params.revcert;
for (var o = 0; o < n.length; o++) {
var p = [new h(n[o].sn), new e(n[o].date)];
if (n[o].ext != undefined) {
p.push(new j(n[o].ext));
}
m.push(new g({
array: p
}));
}
return new g({
array: m
});
};
this.getEncodedHex = function () {
var n = [];
var r = this.params;
if (r.version != undefined) {
var m = r.version - 1;
var p = new h({
"int": m
});
n.push(p);
}
n.push(new l({
name: r.sigalg
}));
n.push(new a(r.issuer));
n.push(new e(r.thisupdate));
if (r.nextupdate != undefined) {
n.push(new e(r.nextupdate));
}
if (r.revcert != undefined) {
n.push(this.getRevCertSequence());
}
if (r.ext != undefined) {
var q = new j(r.ext);
n.push(new c({
tag: "a0",
explicit: true,
obj: q
}));
}
var o = new g({
array: n
});
return o.getEncodedHex();
};
if (f !== undefined) {
this.setByParam(f);
}
};
YAHOO.lang.extend(KJUR.asn1.x509.TBSCertList, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.CRLEntry = function (e) {
KJUR.asn1.x509.CRLEntry.superclass.constructor.call(this);
var d = null,
c = null,
b = KJUR,
a = b.asn1;
this.setCertSerial = function (f) {
this.sn = new a.DERInteger(f);
};
this.setRevocationDate = function (f) {
this.time = new a.x509.Time(f);
};
this.getEncodedHex = function () {
var f = new a.DERSequence({
array: [this.sn, this.time]
});
this.TLV = f.getEncodedHex();
return this.TLV;
};
if (e !== undefined) {
if (e.time !== undefined) {
this.setRevocationDate(e.time);
}
if (e.sn !== undefined) {
this.setCertSerial(e.sn);
}
}
};
YAHOO.lang.extend(KJUR.asn1.x509.CRLEntry, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.CRLNumber = function (a) {
KJUR.asn1.x509.CRLNumber.superclass.constructor.call(this, a);
this.params = undefined;
this.getExtnValueHex = function () {
this.asn1ExtnValue = new KJUR.asn1.DERInteger(this.params.num);
return this.asn1ExtnValue.getEncodedHex();
};
this.oid = "2.5.29.20";
if (a != undefined) {
this.params = a;
}
};
YAHOO.lang.extend(KJUR.asn1.x509.CRLNumber, KJUR.asn1.x509.Extension);
KJUR.asn1.x509.CRLReason = function (a) {
KJUR.asn1.x509.CRLReason.superclass.constructor.call(this, a);
this.params = undefined;
this.getExtnValueHex = function () {
this.asn1ExtnValue = new KJUR.asn1.DEREnumerated(this.params.code);
return this.asn1ExtnValue.getEncodedHex();
};
this.oid = "2.5.29.21";
if (a != undefined) {
this.params = a;
}
};
YAHOO.lang.extend(KJUR.asn1.x509.CRLReason, KJUR.asn1.x509.Extension);
KJUR.asn1.x509.OCSPNonce = function (a) {
KJUR.asn1.x509.OCSPNonce.superclass.constructor.call(this, a);
this.params = undefined;
this.getExtnValueHex = function () {
this.asn1ExtnValue = new KJUR.asn1.DEROctetString(this.params);
return this.asn1ExtnValue.getEncodedHex();
};
this.oid = "1.3.6.1.5.5.7.48.1.2";
if (a != undefined) {
this.params = a;
}
};
YAHOO.lang.extend(KJUR.asn1.x509.OCSPNonce, KJUR.asn1.x509.Extension);
KJUR.asn1.x509.OCSPNoCheck = function (a) {
KJUR.asn1.x509.OCSPNoCheck.superclass.constructor.call(this, a);
this.params = undefined;
this.getExtnValueHex = function () {
this.asn1ExtnValue = new KJUR.asn1.DERNull();
return this.asn1ExtnValue.getEncodedHex();
};
this.oid = "1.3.6.1.5.5.7.48.1.5";
if (a != undefined) {
this.params = a;
}
};
YAHOO.lang.extend(KJUR.asn1.x509.OCSPNoCheck, KJUR.asn1.x509.Extension);
KJUR.asn1.x509.AdobeTimeStamp = function (g) {
KJUR.asn1.x509.AdobeTimeStamp.superclass.constructor.call(this, g);
var c = KJUR,
b = c.asn1,
f = b.DERInteger,
d = b.DERBoolean,
a = b.DERSequence,
e = b.x509.GeneralName;
this.params = null;
this.getExtnValueHex = function () {
var i = this.params;
var h = [new f(1)];
h.push(new e({
uri: i.uri
}));
if (i.reqauth != undefined) {
h.push(new d(i.reqauth));
}
this.asn1ExtnValue = new a({
array: h
});
return this.asn1ExtnValue.getEncodedHex();
};
this.oid = "1.2.840.113583.1.1.9.1";
if (g !== undefined) {
this.setByParam(g);
}
};
YAHOO.lang.extend(KJUR.asn1.x509.AdobeTimeStamp, KJUR.asn1.x509.Extension);
KJUR.asn1.x509.X500Name = function (f) {
KJUR.asn1.x509.X500Name.superclass.constructor.call(this);
this.asn1Array = [];
this.paramArray = [];
this.sRule = "utf8";
var c = KJUR,
b = c.asn1,
e = b.x509,
d = e.RDN,
a = pemtohex;
this.setByString = function (g, l) {
if (l !== undefined) {
this.sRule = l;
}
var k = g.split("/");
k.shift();
var j = [];
for (var m = 0; m < k.length; m++) {
if (k[m].match(/^[^=]+=.+$/)) {
j.push(k[m]);
} else {
var h = j.length - 1;
j[h] = j[h] + "/" + k[m];
}
}
for (var m = 0; m < j.length; m++) {
this.asn1Array.push(new d({
str: j[m],
rule: this.sRule
}));
}
};
this.setByLdapString = function (g, h) {
if (h !== undefined) {
this.sRule = h;
}
var i = e.X500Name.ldapToCompat(g);
this.setByString(i, h);
};
this.setByObject = function (j, i) {
if (i !== undefined) {
this.sRule = i;
}
for (var g in j) {
if (j.hasOwnProperty(g)) {
var h = new d({
str: g + "=" + j[g],
rule: this.sRule
});
this.asn1Array ? this.asn1Array.push(h) : this.asn1Array = [h];
}
}
};
this.setByParam = function (h) {
if (h.rule !== undefined) {
this.sRule = h.rule;
}
if (h.array !== undefined) {
this.paramArray = h.array;
} else {
if (h.str !== undefined) {
this.setByString(h.str);
} else {
if (h.ldapstr !== undefined) {
this.setByLdapString(h.ldapstr);
} else {
if (h.hex !== undefined) {
this.hTLV = h.hex;
} else {
if (h.certissuer !== undefined) {
var g = new X509();
g.readCertPEM(h.certissuer);
this.hTLV = g.getIssuerHex();
} else {
if (h.certsubject !== undefined) {
var g = new X509();
g.readCertPEM(h.certsubject);
this.hTLV = g.getSubjectHex();
} else {
if (_typeof(h) === "object" && h.certsubject === undefined && h.certissuer === undefined) {
this.setByObject(h);
}
}
}
}
}
}
}
};
this.getEncodedHex = function () {
if (typeof this.hTLV == "string") {
return this.hTLV;
}
if (this.asn1Array.length == 0 && this.paramArray.length > 0) {
for (var g = 0; g < this.paramArray.length; g++) {
var k = {
array: this.paramArray[g]
};
if (this.sRule != "utf8") {
k.rule = this.sRule;
}
var h = new d(k);
this.asn1Array.push(h);
}
}
var j = new b.DERSequence({
array: this.asn1Array
});
this.hTLV = j.getEncodedHex();
return this.hTLV;
};
if (f !== undefined) {
this.setByParam(f);
}
};
YAHOO.lang.extend(KJUR.asn1.x509.X500Name, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.X500Name.compatToLDAP = function (d) {
if (d.substr(0, 1) !== "/") {
throw "malformed input";
}
var b = "";
d = d.substr(1);
var c = d.split("/");
c.reverse();
c = c.map(function (a) {
return a.replace(/,/, "\\,");
});
return c.join(",");
};
KJUR.asn1.x509.X500Name.onelineToLDAP = function (a) {
return KJUR.asn1.x509.X500Name.compatToLDAP(a);
};
KJUR.asn1.x509.X500Name.ldapToCompat = function (g) {
var c = g.split(",");
var e = false;
var b = [];
for (var f = 0; c.length > 0; f++) {
var h = c.shift();
if (e === true) {
var d = b.pop();
var j = (d + "," + h).replace(/\\,/g, ",");
b.push(j);
e = false;
} else {
b.push(h);
}
if (h.substr(-1, 1) === "\\") {
e = true;
}
}
b = b.map(function (a) {
return a.replace("/", "\\/");
});
b.reverse();
return "/" + b.join("/");
};
KJUR.asn1.x509.X500Name.ldapToOneline = function (a) {
return KJUR.asn1.x509.X500Name.ldapToCompat(a);
};
KJUR.asn1.x509.RDN = function (b) {
KJUR.asn1.x509.RDN.superclass.constructor.call(this);
this.asn1Array = [];
this.paramArray = [];
this.sRule = "utf8";
var a = KJUR.asn1.x509.AttributeTypeAndValue;
this.setByParam = function (c) {
if (c.rule !== undefined) {
this.sRule = c.rule;
}
if (c.str !== undefined) {
this.addByMultiValuedString(c.str);
}
if (c.array !== undefined) {
this.paramArray = c.array;
}
};
this.addByString = function (c) {
this.asn1Array.push(new KJUR.asn1.x509.AttributeTypeAndValue({
str: c,
rule: this.sRule
}));
};
this.addByMultiValuedString = function (e) {
var c = KJUR.asn1.x509.RDN.parseString(e);
for (var d = 0; d < c.length; d++) {
this.addByString(c[d]);
}
};
this.getEncodedHex = function () {
if (this.asn1Array.length == 0 && this.paramArray.length > 0) {
for (var d = 0; d < this.paramArray.length; d++) {
var f = this.paramArray[d];
if (f.rule !== undefined && this.sRule != "utf8") {
f.rule = this.sRule;
}
var c = new a(f);
this.asn1Array.push(c);
}
}
var e = new KJUR.asn1.DERSet({
array: this.asn1Array
});
this.TLV = e.getEncodedHex();
return this.TLV;
};
if (b !== undefined) {
this.setByParam(b);
}
};
YAHOO.lang.extend(KJUR.asn1.x509.RDN, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.RDN.parseString = function (m) {
var j = m.split(/\+/);
var h = false;
var c = [];
for (var g = 0; j.length > 0; g++) {
var k = j.shift();
if (h === true) {
var f = c.pop();
var d = (f + "+" + k).replace(/\\\+/g, "+");
c.push(d);
h = false;
} else {
c.push(k);
}
if (k.substr(-1, 1) === "\\") {
h = true;
}
}
var l = false;
var b = [];
for (var g = 0; c.length > 0; g++) {
var k = c.shift();
if (l === true) {
var e = b.pop();
if (k.match(/"$/)) {
var d = (e + "+" + k).replace(/^([^=]+)="(.*)"$/, "$1=$2");
b.push(d);
l = false;
} else {
b.push(e + "+" + k);
}
} else {
b.push(k);
}
if (k.match(/^[^=]+="/)) {
l = true;
}
}
return b;
};
KJUR.asn1.x509.AttributeTypeAndValue = function (c) {
KJUR.asn1.x509.AttributeTypeAndValue.superclass.constructor.call(this);
this.sRule = "utf8";
this.sType = null;
this.sValue = null;
this.dsType = null;
var a = KJUR,
g = a.asn1,
d = g.DERSequence,
l = g.DERUTF8String,
i = g.DERPrintableString,
h = g.DERTeletexString,
b = g.DERIA5String,
e = g.DERVisibleString,
k = g.DERBMPString,
f = a.lang.String.isMail,
j = a.lang.String.isPrintable;
this.setByParam = function (o) {
if (o.rule !== undefined) {
this.sRule = o.rule;
}
if (o.ds !== undefined) {
this.dsType = o.ds;
}
if (o.value === undefined && o.str !== undefined) {
var n = o.str;
var m = n.match(/^([^=]+)=(.+)$/);
if (m) {
this.sType = m[1];
this.sValue = m[2];
} else {
throw new Error("malformed attrTypeAndValueStr: " + attrTypeAndValueStr);
}
} else {
this.sType = o.type;
this.sValue = o.value;
}
};
this.setByString = function (n, o) {
if (o !== undefined) {
this.sRule = o;
}
var m = n.match(/^([^=]+)=(.+)$/);
if (m) {
this.setByAttrTypeAndValueStr(m[1], m[2]);
} else {
throw new Error("malformed attrTypeAndValueStr: " + attrTypeAndValueStr);
}
};
this._getDsType = function () {
var o = this.sType;
var n = this.sValue;
var m = this.sRule;
if (m === "prn") {
if (o == "CN" && f(n)) {
return "ia5";
}
if (j(n)) {
return "prn";
}
return "utf8";
} else {
if (m === "utf8") {
if (o == "CN" && f(n)) {
return "ia5";
}
if (o == "C") {
return "prn";
}
return "utf8";
}
}
return "utf8";
};
this.setByAttrTypeAndValueStr = function (o, n, m) {
if (m !== undefined) {
this.sRule = m;
}
this.sType = o;
this.sValue = n;
};
this.getValueObj = function (n, m) {
if (n == "utf8") {
return new l({
str: m
});
}
if (n == "prn") {
return new i({
str: m
});
}
if (n == "tel") {
return new h({
str: m
});
}
if (n == "ia5") {
return new b({
str: m
});
}
if (n == "vis") {
return new e({
str: m
});
}
if (n == "bmp") {
return new k({
str: m
});
}
throw new Error("unsupported directory string type: type=" + n + " value=" + m);
};
this.getEncodedHex = function () {
if (this.dsType == null) {
this.dsType = this._getDsType();
}
var n = KJUR.asn1.x509.OID.atype2obj(this.sType);
var m = this.getValueObj(this.dsType, this.sValue);
var p = new d({
array: [n, m]
});
this.TLV = p.getEncodedHex();
return this.TLV;
};
if (c !== undefined) {
this.setByParam(c);
}
};
YAHOO.lang.extend(KJUR.asn1.x509.AttributeTypeAndValue, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.SubjectPublicKeyInfo = function (f) {
KJUR.asn1.x509.SubjectPublicKeyInfo.superclass.constructor.call(this);
var l = null,
k = null,
a = KJUR,
j = a.asn1,
i = j.DERInteger,
b = j.DERBitString,
m = j.DERObjectIdentifier,
e = j.DERSequence,
h = j.ASN1Util.newObject,
d = j.x509,
o = d.AlgorithmIdentifier,
g = a.crypto,
n = g.ECDSA,
c = g.DSA;
this.getASN1Object = function () {
if (this.asn1AlgId == null || this.asn1SubjPKey == null) {
throw "algId and/or subjPubKey not set";
}
var p = new e({
array: [this.asn1AlgId, this.asn1SubjPKey]
});
return p;
};
this.getEncodedHex = function () {
var p = this.getASN1Object();
this.hTLV = p.getEncodedHex();
return this.hTLV;
};
this.setPubKey = function (q) {
try {
if (q instanceof RSAKey) {
var u = h({
seq: [{
"int": {
bigint: q.n
}
}, {
"int": {
"int": q.e
}
}]
});
var s = u.getEncodedHex();
this.asn1AlgId = new o({
name: "rsaEncryption"
});
this.asn1SubjPKey = new b({
hex: "00" + s
});
}
} catch (p) {}
try {
if (q instanceof KJUR.crypto.ECDSA) {
var r = new m({
name: q.curveName
});
this.asn1AlgId = new o({
name: "ecPublicKey",
asn1params: r
});
this.asn1SubjPKey = new b({
hex: "00" + q.pubKeyHex
});
}
} catch (p) {}
try {
if (q instanceof KJUR.crypto.DSA) {
var r = new h({
seq: [{
"int": {
bigint: q.p
}
}, {
"int": {
bigint: q.q
}
}, {
"int": {
bigint: q.g
}
}]
});
this.asn1AlgId = new o({
name: "dsa",
asn1params: r
});
var t = new i({
bigint: q.y
});
this.asn1SubjPKey = new b({
hex: "00" + t.getEncodedHex()
});
}
} catch (p) {}
};
if (f !== undefined) {
this.setPubKey(f);
}
};
YAHOO.lang.extend(KJUR.asn1.x509.SubjectPublicKeyInfo, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.Time = function (f) {
KJUR.asn1.x509.Time.superclass.constructor.call(this);
var e = null,
a = null,
d = KJUR,
c = d.asn1,
b = c.DERUTCTime,
g = c.DERGeneralizedTime;
this.setTimeParams = function (h) {
this.timeParams = h;
};
this.getEncodedHex = function () {
var h = null;
if (this.timeParams != null) {
if (this.type == "utc") {
h = new b(this.timeParams);
} else {
h = new g(this.timeParams);
}
} else {
if (this.type == "utc") {
h = new b();
} else {
h = new g();
}
}
this.TLV = h.getEncodedHex();
return this.TLV;
};
this.type = "utc";
if (f !== undefined) {
if (f.type !== undefined) {
this.type = f.type;
} else {
if (f.str !== undefined) {
if (f.str.match(/^[0-9]{12}Z$/)) {
this.type = "utc";
}
if (f.str.match(/^[0-9]{14}Z$/)) {
this.type = "gen";
}
}
}
this.timeParams = f;
}
};
YAHOO.lang.extend(KJUR.asn1.x509.Time, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.AlgorithmIdentifier = function (e) {
KJUR.asn1.x509.AlgorithmIdentifier.superclass.constructor.call(this);
this.nameAlg = null;
this.asn1Alg = null;
this.asn1Params = null;
this.paramEmpty = false;
var b = KJUR,
a = b.asn1,
c = a.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV;
this.getEncodedHex = function () {
if (this.nameAlg === null && this.asn1Alg === null) {
throw new Error("algorithm not specified");
}
if (this.nameAlg !== null) {
var f = null;
for (var h in c) {
if (h === this.nameAlg) {
f = c[h];
}
}
if (f !== null) {
this.hTLV = f;
return this.hTLV;
}
}
if (this.nameAlg !== null && this.asn1Alg === null) {
this.asn1Alg = a.x509.OID.name2obj(this.nameAlg);
}
var g = [this.asn1Alg];
if (this.asn1Params !== null) {
g.push(this.asn1Params);
}
var i = new a.DERSequence({
array: g
});
this.hTLV = i.getEncodedHex();
return this.hTLV;
};
if (e !== undefined) {
if (e.name !== undefined) {
this.nameAlg = e.name;
}
if (e.asn1params !== undefined) {
this.asn1Params = e.asn1params;
}
if (e.paramempty !== undefined) {
this.paramEmpty = e.paramempty;
}
}
if (this.asn1Params === null && this.paramEmpty === false && this.nameAlg !== null) {
if (this.nameAlg.name !== undefined) {
this.nameAlg = this.nameAlg.name;
}
var d = this.nameAlg.toLowerCase();
if (d.substr(-7, 7) !== "withdsa" && d.substr(-9, 9) !== "withecdsa") {
this.asn1Params = new a.DERNull();
}
}
};
YAHOO.lang.extend(KJUR.asn1.x509.AlgorithmIdentifier, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV = {
SHAwithRSAandMGF1: "300d06092a864886f70d01010a3000",
SHA256withRSAandMGF1: "303d06092a864886f70d01010a3030a00d300b0609608648016503040201a11a301806092a864886f70d010108300b0609608648016503040201a203020120",
SHA384withRSAandMGF1: "303d06092a864886f70d01010a3030a00d300b0609608648016503040202a11a301806092a864886f70d010108300b0609608648016503040202a203020130",
SHA512withRSAandMGF1: "303d06092a864886f70d01010a3030a00d300b0609608648016503040203a11a301806092a864886f70d010108300b0609608648016503040203a203020140"
};
KJUR.asn1.x509.GeneralName = function (e) {
KJUR.asn1.x509.GeneralName.superclass.constructor.call(this);
var m = null,
i = null,
k = {
rfc822: "81",
dns: "82",
dn: "a4",
uri: "86",
ip: "87"
},
b = KJUR,
g = b.asn1,
f = g.DERSequence,
j = g.DEROctetString,
d = g.DERIA5String,
c = g.DERTaggedObject,
l = g.ASN1Object,
a = g.x509.X500Name,
h = pemtohex;
this.explicit = false;
this.setByParam = function (p) {
var r = null;
var u = null;
if (p === undefined) {
return;
}
if (p.rfc822 !== undefined) {
this.type = "rfc822";
u = new d({
str: p[this.type]
});
}
if (p.dns !== undefined) {
this.type = "dns";
u = new d({
str: p[this.type]
});
}
if (p.uri !== undefined) {
this.type = "uri";
u = new d({
str: p[this.type]
});
}
if (p.dn !== undefined) {
this.type = "dn";
this.explicit = true;
if (typeof p.dn === "string") {
u = new a({
str: p.dn
});
} else {
if (p.dn instanceof KJUR.asn1.x509.X500Name) {
u = p.dn;
} else {
u = new a(p.dn);
}
}
}
if (p.ldapdn !== undefined) {
this.type = "dn";
this.explicit = true;
u = new a({
ldapstr: p.ldapdn
});
}
if (p.certissuer !== undefined) {
this.type = "dn";
this.explicit = true;
var o = p.certissuer;
var w = null;
if (o.match(/^[0-9A-Fa-f]+$/)) {
w == o;
}
if (o.indexOf("-----BEGIN ") != -1) {
w = h(o);
}
if (w == null) {
throw "certissuer param not cert";
}
var t = new X509();
t.hex = w;
var y = t.getIssuerHex();
u = new l();
u.hTLV = y;
}
if (p.certsubj !== undefined) {
this.type = "dn";
this.explicit = true;
var o = p.certsubj;
var w = null;
if (o.match(/^[0-9A-Fa-f]+$/)) {
w == o;
}
if (o.indexOf("-----BEGIN ") != -1) {
w = h(o);
}
if (w == null) {
throw "certsubj param not cert";
}
var t = new X509();
t.hex = w;
var y = t.getSubjectHex();
u = new l();
u.hTLV = y;
}
if (p.ip !== undefined) {
this.type = "ip";
this.explicit = false;
var q = p.ip;
var s;
var n = "malformed IP address";
if (q.match(/^[0-9.]+[.][0-9.]+$/)) {
s = intarystrtohex("[" + q.split(".").join(",") + "]");
if (s.length !== 8) {
throw n;
}
} else {
if (q.match(/^[0-9A-Fa-f:]+:[0-9A-Fa-f:]+$/)) {
s = ipv6tohex(q);
} else {
if (q.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/)) {
s = q;
} else {
throw n;
}
}
}
u = new j({
hex: s
});
}
if (this.type == null) {
throw "unsupported type in params=" + p;
}
this.asn1Obj = new c({
explicit: this.explicit,
tag: k[this.type],
obj: u
});
};
this.getEncodedHex = function () {
return this.asn1Obj.getEncodedHex();
};
if (e !== undefined) {
this.setByParam(e);
}
};
YAHOO.lang.extend(KJUR.asn1.x509.GeneralName, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.GeneralNames = function (d) {
KJUR.asn1.x509.GeneralNames.superclass.constructor.call(this);
var a = null,
c = KJUR,
b = c.asn1;
this.setByParamArray = function (g) {
for (var e = 0; e < g.length; e++) {
var f = new b.x509.GeneralName(g[e]);
this.asn1Array.push(f);
}
};
this.getEncodedHex = function () {
var e = new b.DERSequence({
array: this.asn1Array
});
return e.getEncodedHex();
};
this.asn1Array = new Array();
if (typeof d != "undefined") {
this.setByParamArray(d);
}
};
YAHOO.lang.extend(KJUR.asn1.x509.GeneralNames, KJUR.asn1.ASN1Object);
KJUR.asn1.x509.OID = new function (a) {
this.atype2oidList = {
CN: "2.5.4.3",
L: "2.5.4.7",
ST: "2.5.4.8",
O: "2.5.4.10",
OU: "2.5.4.11",
C: "2.5.4.6",
STREET: "2.5.4.9",
DC: "0.9.2342.19200300.100.1.25",
UID: "0.9.2342.19200300.100.1.1",
SN: "2.5.4.4",
T: "2.5.4.12",
DN: "2.5.4.49",
E: "1.2.840.113549.1.9.1",
description: "2.5.4.13",
businessCategory: "2.5.4.15",
postalCode: "2.5.4.17",
serialNumber: "2.5.4.5",
uniqueIdentifier: "2.5.4.45",
organizationIdentifier: "2.5.4.97",
jurisdictionOfIncorporationL: "1.3.6.1.4.1.311.60.2.1.1",
jurisdictionOfIncorporationSP: "1.3.6.1.4.1.311.60.2.1.2",
jurisdictionOfIncorporationC: "1.3.6.1.4.1.311.60.2.1.3"
};
this.name2oidList = {
sha1: "1.3.14.3.2.26",
sha256: "2.16.840.1.101.3.4.2.1",
sha384: "2.16.840.1.101.3.4.2.2",
sha512: "2.16.840.1.101.3.4.2.3",
sha224: "2.16.840.1.101.3.4.2.4",
md5: "1.2.840.113549.2.5",
md2: "1.3.14.7.2.2.1",
ripemd160: "1.3.36.3.2.1",
MD2withRSA: "1.2.840.113549.1.1.2",
MD4withRSA: "1.2.840.113549.1.1.3",
MD5withRSA: "1.2.840.113549.1.1.4",
SHA1withRSA: "1.2.840.113549.1.1.5",
"pkcs1-MGF": "1.2.840.113549.1.1.8",
rsaPSS: "1.2.840.113549.1.1.10",
SHA224withRSA: "1.2.840.113549.1.1.14",
SHA256withRSA: "1.2.840.113549.1.1.11",
SHA384withRSA: "1.2.840.113549.1.1.12",
SHA512withRSA: "1.2.840.113549.1.1.13",
SHA1withECDSA: "1.2.840.10045.4.1",
SHA224withECDSA: "1.2.840.10045.4.3.1",
SHA256withECDSA: "1.2.840.10045.4.3.2",
SHA384withECDSA: "1.2.840.10045.4.3.3",
SHA512withECDSA: "1.2.840.10045.4.3.4",
dsa: "1.2.840.10040.4.1",
SHA1withDSA: "1.2.840.10040.4.3",
SHA224withDSA: "2.16.840.1.101.3.4.3.1",
SHA256withDSA: "2.16.840.1.101.3.4.3.2",
rsaEncryption: "1.2.840.113549.1.1.1",
commonName: "2.5.4.3",
countryName: "2.5.4.6",
localityName: "2.5.4.7",
stateOrProvinceName: "2.5.4.8",
streetAddress: "2.5.4.9",
organizationName: "2.5.4.10",
organizationalUnitName: "2.5.4.11",
domainComponent: "0.9.2342.19200300.100.1.25",
userId: "0.9.2342.19200300.100.1.1",
surname: "2.5.4.4",
title: "2.5.4.12",
distinguishedName: "2.5.4.49",
emailAddress: "1.2.840.113549.1.9.1",
description: "2.5.4.13",
businessCategory: "2.5.4.15",
postalCode: "2.5.4.17",
uniqueIdentifier: "2.5.4.45",
organizationIdentifier: "2.5.4.97",
jurisdictionOfIncorporationL: "1.3.6.1.4.1.311.60.2.1.1",
jurisdictionOfIncorporationSP: "1.3.6.1.4.1.311.60.2.1.2",
jurisdictionOfIncorporationC: "1.3.6.1.4.1.311.60.2.1.3",
subjectKeyIdentifier: "2.5.29.14",
keyUsage: "2.5.29.15",
subjectAltName: "2.5.29.17",
issuerAltName: "2.5.29.18",
basicConstraints: "2.5.29.19",
cRLNumber: "2.5.29.20",
cRLReason: "2.5.29.21",
nameConstraints: "2.5.29.30",
cRLDistributionPoints: "2.5.29.31",
certificatePolicies: "2.5.29.32",
anyPolicy: "2.5.29.32.0",
authorityKeyIdentifier: "2.5.29.35",
policyConstraints: "2.5.29.36",
extKeyUsage: "2.5.29.37",
authorityInfoAccess: "1.3.6.1.5.5.7.1.1",
ocsp: "1.3.6.1.5.5.7.48.1",
ocspBasic: "1.3.6.1.5.5.7.48.1.1",
ocspNonce: "1.3.6.1.5.5.7.48.1.2",
ocspNoCheck: "1.3.6.1.5.5.7.48.1.5",
caIssuers: "1.3.6.1.5.5.7.48.2",
anyExtendedKeyUsage: "2.5.29.37.0",
serverAuth: "1.3.6.1.5.5.7.3.1",
clientAuth: "1.3.6.1.5.5.7.3.2",
codeSigning: "1.3.6.1.5.5.7.3.3",
emailProtection: "1.3.6.1.5.5.7.3.4",
timeStamping: "1.3.6.1.5.5.7.3.8",
ocspSigning: "1.3.6.1.5.5.7.3.9",
ecPublicKey: "1.2.840.10045.2.1",
secp256r1: "1.2.840.10045.3.1.7",
secp256k1: "1.3.132.0.10",
secp384r1: "1.3.132.0.34",
pkcs5PBES2: "1.2.840.113549.1.5.13",
pkcs5PBKDF2: "1.2.840.113549.1.5.12",
"des-EDE3-CBC": "1.2.840.113549.3.7",
data: "1.2.840.113549.1.7.1",
"signed-data": "1.2.840.113549.1.7.2",
"enveloped-data": "1.2.840.113549.1.7.3",
"digested-data": "1.2.840.113549.1.7.5",
"encrypted-data": "1.2.840.113549.1.7.6",
"authenticated-data": "1.2.840.113549.1.9.16.1.2",
tstinfo: "1.2.840.113549.1.9.16.1.4",
signingCertificate: "1.2.840.113549.1.9.16.2.12",
timeStampToken: "1.2.840.113549.1.9.16.2.14",
signaturePolicyIdentifier: "1.2.840.113549.1.9.16.2.15",
etsArchiveTimeStamp: "1.2.840.113549.1.9.16.2.27",
signingCertificateV2: "1.2.840.113549.1.9.16.2.47",
etsArchiveTimeStampV2: "1.2.840.113549.1.9.16.2.48",
extensionRequest: "1.2.840.113549.1.9.14",
contentType: "1.2.840.113549.1.9.3",
messageDigest: "1.2.840.113549.1.9.4",
signingTime: "1.2.840.113549.1.9.5",
counterSignature: "1.2.840.113549.1.9.6",
archiveTimeStampV3: "0.4.0.1733.2.4",
pdfRevocationInfoArchival: "1.2.840.113583.1.1.8",
adobeTimeStamp: "1.2.840.113583.1.1.9.1"
};
this.objCache = {};
this.name2obj = function (b) {
if (typeof this.objCache[b] != "undefined") {
return this.objCache[b];
}
if (typeof this.name2oidList[b] == "undefined") {
throw "Name of ObjectIdentifier not defined: " + b;
}
var c = this.name2oidList[b];
var d = new KJUR.asn1.DERObjectIdentifier({
oid: c
});
this.objCache[b] = d;
return d;
};
this.atype2obj = function (b) {
if (typeof this.objCache[b] != "undefined") {
return this.objCache[b];
}
if (typeof this.atype2oidList[b] == "undefined") {
throw "AttributeType name undefined: " + b;
}
var c = this.atype2oidList[b];
var d = new KJUR.asn1.DERObjectIdentifier({
oid: c
});
this.objCache[b] = d;
return d;
};
}();
KJUR.asn1.x509.OID.oid2name = function (b) {
var c = KJUR.asn1.x509.OID.name2oidList;
for (var a in c) {
if (c[a] == b) {
return a;
}
}
return "";
};
KJUR.asn1.x509.OID.oid2atype = function (b) {
var c = KJUR.asn1.x509.OID.atype2oidList;
for (var a in c) {
if (c[a] == b) {
return a;
}
}
return b;
};
KJUR.asn1.x509.OID.name2oid = function (a) {
if (a.match(/^[0-9.]+$/)) {
return a;
}
var b = KJUR.asn1.x509.OID.name2oidList;
if (b[a] === undefined) {
return "";
}
return b[a];
};
KJUR.asn1.x509.X509Util = {};
KJUR.asn1.x509.X509Util.newCertPEM = function (e) {
var d = KJUR.asn1.x509,
b = d.TBSCertificate,
a = d.Certificate;
var c = new a(e);
return c.getPEM();
};
if (typeof KJUR == "undefined" || !KJUR) {
KJUR = {};
}
if (typeof KJUR.asn1 == "undefined" || !KJUR.asn1) {
KJUR.asn1 = {};
}
if (typeof KJUR.asn1.cms == "undefined" || !KJUR.asn1.cms) {
KJUR.asn1.cms = {};
}
KJUR.asn1.cms.Attribute = function (f) {
var e = Error,
d = KJUR,
c = d.asn1,
b = c.DERSequence,
a = c.DERSet,
g = c.DERObjectIdentifier;
this.params = null;
this.typeOid = null;
this.setByParam = function (h) {
this.params = h;
};
this.getValueArray = function () {
throw new e("not yet implemented abstract");
};
this.getEncodedHex = function () {
var j = new g({
oid: this.typeOid
});
var h = new a({
array: this.getValueArray()
});
var i = new b({
array: [j, h]
});
return i.getEncodedHex();
};
};
YAHOO.lang.extend(KJUR.asn1.cms.Attribute, KJUR.asn1.ASN1Object);
KJUR.asn1.cms.ContentType = function (c) {
var b = KJUR,
a = b.asn1;
a.cms.ContentType.superclass.constructor.call(this);
this.typeOid = "1.2.840.113549.1.9.3";
this.getValueArray = function () {
var d = new a.DERObjectIdentifier(this.params.type);
return [d];
};
if (c != undefined) {
this.setByParam(c);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.ContentType, KJUR.asn1.cms.Attribute);
KJUR.asn1.cms.MessageDigest = function (e) {
var b = KJUR,
a = b.asn1,
c = a.DEROctetString,
d = a.cms;
d.MessageDigest.superclass.constructor.call(this);
this.typeOid = "1.2.840.113549.1.9.4";
this.getValueArray = function () {
var f = new c(this.params);
return [f];
};
if (e != undefined) {
this.setByParam(e);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.MessageDigest, KJUR.asn1.cms.Attribute);
KJUR.asn1.cms.SigningTime = function (c) {
var b = KJUR,
a = b.asn1;
a.cms.SigningTime.superclass.constructor.call(this);
this.typeOid = "1.2.840.113549.1.9.5";
this.getValueArray = function () {
var d = new a.x509.Time(this.params);
return [d];
};
if (c != undefined) {
this.setByParam(c);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.SigningTime, KJUR.asn1.cms.Attribute);
KJUR.asn1.cms.SigningCertificate = function (h) {
var e = Error,
d = KJUR,
c = d.asn1,
b = c.DERSequence,
g = c.cms,
a = g.ESSCertID,
f = d.crypto;
g.SigningCertificate.superclass.constructor.call(this);
this.typeOid = "1.2.840.113549.1.9.16.2.12";
this.getValueArray = function () {
if (this.params == null || this.params == undefined || this.params.array == undefined) {
throw new e("parameter 'array' not specified");
}
var o = this.params.array;
var k = [];
for (var l = 0; l < o.length; l++) {
var n = o[l];
if (h.hasis == false && typeof n == "string" && (n.indexOf("-----BEGIN") != -1 || ASN1HEX.isASN1HEX(n))) {
n = {
cert: n
};
}
if (n.hasis != false && h.hasis == false) {
n.hasis = false;
}
k.push(new a(n));
}
var j = new b({
array: k
});
var m = new b({
array: [j]
});
return [m];
};
if (h != undefined) {
this.setByParam(h);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.SigningCertificate, KJUR.asn1.cms.Attribute);
KJUR.asn1.cms.ESSCertID = function (g) {
KJUR.asn1.cms.ESSCertID.superclass.constructor.call(this);
var d = Error,
c = KJUR,
b = c.asn1,
f = b.DEROctetString,
a = b.DERSequence,
e = b.cms.IssuerSerial;
this.params = null;
this.getCertHash = function (k, h) {
if (k.hash != undefined) {
return k.hash;
}
if (typeof k == "string" && k.indexOf("-----BEGIN") == -1 && !ASN1HEX.isASN1HEX(k)) {
return k;
}
var i;
if (typeof k == "string") {
i = k;
} else {
if (k.cert != undefined) {
i = k.cert;
} else {
throw new d("hash nor cert unspecified");
}
}
var j;
if (i.indexOf("-----BEGIN") != -1) {
j = pemtohex(i);
} else {
j = i;
}
if (typeof k == "string") {
if (k.indexOf("-----BEGIN") != -1) {
j = pemtohex(k);
} else {
if (ASN1HEX.isASN1HEX(k)) {
j = k;
}
}
}
var l;
if (k.alg != undefined) {
l = k.alg;
} else {
if (h != undefined) {
l = h;
} else {
throw new d("hash alg unspecified");
}
}
return c.crypto.Util.hashHex(j, l);
};
this.getEncodedHex = function () {
var k = this.params;
var j = this.getCertHash(k, "sha1");
var h = [];
h.push(new f({
hex: j
}));
if (typeof k == "string" && k.indexOf("-----BEGIN") != -1 || k.cert != undefined && k.hasis != false || k.issuer != undefined && k.serial != undefined) {
h.push(new e(k));
}
var i = new a({
array: h
});
return i.getEncodedHex();
};
if (g != undefined) {
this.setByParam(g);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.ESSCertID, KJUR.asn1.ASN1Object);
KJUR.asn1.cms.SigningCertificateV2 = function (d) {
var h = Error,
a = KJUR,
g = a.asn1,
e = g.DERSequence,
b = g.x509,
i = g.cms,
c = i.ESSCertIDv2,
f = a.crypto;
i.SigningCertificateV2.superclass.constructor.call(this);
this.typeOid = "1.2.840.113549.1.9.16.2.47";
this.getValueArray = function () {
if (this.params == null || this.params == undefined || this.params.array == undefined) {
throw new h("parameter 'array' not specified");
}
var o = this.params.array;
var l = [];
for (var m = 0; m < o.length; m++) {
var n = o[m];
if ((d.alg != undefined || d.hasis == false) && typeof n == "string" && (n.indexOf("-----BEGIN") != -1 || ASN1HEX.isASN1HEX(n))) {
n = {
cert: n
};
}
if (n.alg == undefined && d.alg != undefined) {
n.alg = d.alg;
}
if (n.hasis != false && d.hasis == false) {
n.hasis = false;
}
l.push(new c(n));
}
var k = new e({
array: l
});
var j = new e({
array: [k]
});
return [j];
};
if (d != undefined) {
this.setByParam(d);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.SigningCertificateV2, KJUR.asn1.cms.Attribute);
KJUR.asn1.cms.ESSCertIDv2 = function (h) {
KJUR.asn1.cms.ESSCertIDv2.superclass.constructor.call(this);
var d = Error,
c = KJUR,
b = c.asn1,
f = b.DEROctetString,
a = b.DERSequence,
e = b.cms.IssuerSerial,
g = b.x509.AlgorithmIdentifier;
this.params = null;
this.getEncodedHex = function () {
var l = this.params;
var k = this.getCertHash(l, "sha256");
var i = [];
if (l.alg != undefined && l.alg != "sha256") {
i.push(new g({
name: l.alg
}));
}
i.push(new f({
hex: k
}));
if (typeof l == "string" && l.indexOf("-----BEGIN") != -1 || l.cert != undefined && l.hasis != false || l.issuer != undefined && l.serial != undefined) {
i.push(new e(l));
}
var j = new a({
array: i
});
return j.getEncodedHex();
};
if (h != undefined) {
this.setByParam(h);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.ESSCertIDv2, KJUR.asn1.cms.ESSCertID);
KJUR.asn1.cms.IssuerSerial = function (e) {
var i = Error,
c = KJUR,
h = c.asn1,
g = h.DERInteger,
f = h.DERSequence,
j = h.cms,
d = h.x509,
a = d.GeneralNames,
b = X509;
j.IssuerSerial.superclass.constructor.call(this);
this.setByParam = function (k) {
this.params = k;
};
this.getEncodedHex = function () {
var p = this.params;
var l, r;
if (typeof p == "string" && p.indexOf("-----BEGIN") != -1 || p.cert != undefined) {
var n;
if (p.cert != undefined) {
n = p.cert;
} else {
n = p;
}
var k = new b();
k.readCertPEM(n);
l = k.getIssuer();
r = {
hex: k.getSerialNumberHex()
};
} else {
if (p.issuer != undefined && p.serial) {
l = p.issuer;
r = p.serial;
} else {
throw new i("cert or issuer and serial parameter not specified");
}
}
var q = new a([{
dn: l
}]);
var o = new g(r);
var m = new f({
array: [q, o]
});
return m.getEncodedHex();
};
if (e != undefined) {
this.setByParam(e);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.IssuerSerial, KJUR.asn1.ASN1Object);
KJUR.asn1.cms.SignerIdentifier = function (f) {
var c = KJUR,
i = c.asn1,
h = i.DERInteger,
g = i.DERSequence,
l = i.cms,
k = l.IssuerAndSerialNumber,
d = l.SubjectKeyIdentifier,
e = i.x509,
a = e.X500Name,
b = X509,
j = Error;
l.SignerIdentifier.superclass.constructor.call(this);
this.params = null;
this.getEncodedHex = function () {
var o = this.params;
if (o.type == "isssn") {
var m = new k(o);
return m.getEncodedHex();
} else {
if (o.type == "skid") {
var n = new d(o);
return n.getEncodedHex();
} else {
throw new Error("wrong property for isssn or skid");
}
}
};
if (f != undefined) {
this.setByParam(f);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.SignerIdentifier, KJUR.asn1.ASN1Object);
KJUR.asn1.cms.IssuerAndSerialNumber = function (e) {
var c = KJUR,
h = c.asn1,
g = h.DERInteger,
f = h.DERSequence,
j = h.cms,
d = h.x509,
a = d.X500Name,
b = X509,
i = Error;
j.IssuerAndSerialNumber.superclass.constructor.call(this);
this.params = null;
this.getEncodedHex = function () {
var p = this.params;
var l, r;
if (typeof p == "string" && p.indexOf("-----BEGIN") != -1 || p.cert != undefined) {
var n;
if (p.cert != undefined) {
n = p.cert;
} else {
n = p;
}
var k = new b();
k.readCertPEM(n);
l = k.getIssuer();
r = {
hex: k.getSerialNumberHex()
};
} else {
if (p.issuer != undefined && p.serial) {
l = p.issuer;
r = p.serial;
} else {
throw new i("cert or issuer and serial parameter not specified");
}
}
var q = new a(l);
var o = new g(r);
var m = new f({
array: [q, o]
});
return m.getEncodedHex();
};
this.setByParam = function (k) {
this.params = k;
};
if (e != undefined) {
this.setByParam(e);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.IssuerAndSerialNumber, KJUR.asn1.ASN1Object);
KJUR.asn1.cms.SubjectKeyIdentifier = function (g) {
var d = KJUR,
k = d.asn1,
i = k.DERInteger,
h = k.DERSequence,
j = k.ASN1Util.newObject,
m = k.cms,
f = m.IssuerAndSerialName,
c = m.SubjectKeyIdentifier,
e = k.x509,
a = e.X500Name,
b = X509,
l = Error;
m.SubjectKeyIdentifier.superclass.constructor.call(this);
this.getEncodedHex = function () {
var r = this.params;
if (r.cert == undefined && r.skid == undefined) {
throw new l("property cert nor skid undefined");
}
var q;
if (r.cert != undefined) {
var n = new b(r.cert);
var o = n.getExtSubjectKeyIdentifier();
q = o.kid.hex;
} else {
if (r.skid != undefined) {
q = r.skid;
}
}
var p = j({
tag: {
tage: "a0",
obj: {
octstr: {
hex: q
}
}
}
});
return p.getEncodedHex();
};
if (g != undefined) {
this.setByParam(g);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.SubjectKeyIdentifier, KJUR.asn1.ASN1Object);
KJUR.asn1.cms.AttributeList = function (f) {
var d = Error,
c = KJUR,
b = c.asn1,
a = b.DERSet,
e = b.cms;
e.AttributeList.superclass.constructor.call(this);
this.params = null;
this.hTLV = null;
this.setByParam = function (g) {
this.params = g;
};
this.getEncodedHex = function () {
var o = this.params;
if (this.hTLV != null) {
return this.hTLV;
}
var m = true;
if (o.sortflag != undefined) {
m = o.sortflag;
}
var j = o.array;
var g = [];
for (var l = 0; l < j.length; l++) {
var n = j[l];
var k = n.attr;
if (k == "contentType") {
g.push(new e.ContentType(n));
} else {
if (k == "messageDigest") {
g.push(new e.MessageDigest(n));
} else {
if (k == "signingTime") {
g.push(new e.SigningTime(n));
} else {
if (k == "signingCertificate") {
g.push(new e.SigningCertificate(n));
} else {
if (k == "signingCertificateV2") {
g.push(new e.SigningCertificateV2(n));
} else {
if (k == "signaturePolicyIdentifier") {
g.push(new KJUR.asn1.cades.SignaturePolicyIdentifier(n));
} else {
throw new d("unknown attr: " + k);
}
}
}
}
}
}
}
var h = new a({
array: g,
sortflag: m
});
this.hTLV = h.getEncodedHex();
return this.hTLV;
};
if (f != undefined) {
this.setByParam(f);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.AttributeList, KJUR.asn1.ASN1Object);
KJUR.asn1.cms.SignerInfo = function (p) {
var q = KJUR,
i = q.asn1,
c = i.DERInteger,
f = i.DEROctetString,
h = i.DERSequence,
m = i.DERTaggedObject,
k = i.cms,
o = k.SignerIdentifier,
l = k.AttributeList,
g = k.ContentType,
e = k.EncapsulatedContentInfo,
d = k.MessageDigest,
j = k.SignedData,
a = i.x509,
r = a.AlgorithmIdentifier,
b = q.crypto,
n = KEYUTIL;
k.SignerInfo.superclass.constructor.call(this);
this.params = null;
this.sign = function () {
var x = this.params;
var w = x.sigalg;
var t = new l(x.sattrs).getEncodedHex();
var u = n.getKey(x.signkey);
var v = new b.Signature({
alg: w
});
v.init(u);
v.updateHex(t);
var s = v.sign();
x.sighex = s;
};
this.getEncodedHex = function () {
var v = this.params;
var s = [];
s.push(new c({
"int": v.version
}));
s.push(new o(v.id));
s.push(new r({
name: v.hashalg
}));
if (v.sattrs != undefined) {
var w = new l(v.sattrs);
try {
s.push(new m({
tag: "a0",
explicit: false,
obj: w
}));
} catch (u) {
throw new Error("si sattr error: " + u);
}
}
if (v.sigalgfield != undefined) {
s.push(new r({
name: v.sigalgfield
}));
} else {
s.push(new r({
name: v.sigalg
}));
}
if (v.sighex == undefined && v.signkey != undefined) {
this.sign();
}
s.push(new f({
hex: v.sighex
}));
var t = new h({
array: s
});
return t.getEncodedHex();
};
if (p != undefined) {
this.setByParam(p);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.SignerInfo, KJUR.asn1.ASN1Object);
KJUR.asn1.cms.EncapsulatedContentInfo = function (g) {
var c = KJUR,
b = c.asn1,
e = b.DERTaggedObject,
a = b.DERSequence,
h = b.DERObjectIdentifier,
d = b.DEROctetString,
f = b.cms;
f.EncapsulatedContentInfo.superclass.constructor.call(this);
this.params = null;
this.getEncodedHex = function () {
var m = this.params;
var i = [];
i.push(new h(m.type));
if (m.content != undefined && (m.content.hex != undefined || m.content.str != undefined) && m.isDetached != true) {
var k = new d(m.content);
var l = new e({
tag: "a0",
explicit: true,
obj: k
});
i.push(l);
}
var j = new a({
array: i
});
return j.getEncodedHex();
};
this.setByParam = function (i) {
this.params = i;
};
if (g != undefined) {
this.setByParam(g);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.EncapsulatedContentInfo, KJUR.asn1.ASN1Object);
KJUR.asn1.cms.ContentInfo = function (g) {
var c = KJUR,
b = c.asn1,
d = b.DERTaggedObject,
a = b.DERSequence,
h = b.DERObjectIdentifier,
f = b.x509,
e = f.OID.name2obj;
KJUR.asn1.cms.ContentInfo.superclass.constructor.call(this);
this.params = null;
this.getEncodedHex = function () {
var l = this.params;
var i = [];
i.push(new h(l.type));
var k = new d({
tag: "a0",
explicit: true,
obj: l.obj
});
i.push(k);
var j = new a({
array: i
});
return j.getEncodedHex();
};
this.setByParam = function (i) {
this.params = i;
};
if (g != undefined) {
this.setByParam(g);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.ContentInfo, KJUR.asn1.ASN1Object);
KJUR.asn1.cms.SignedData = function (e) {
var a = KJUR,
h = a.asn1,
l = h.ASN1Object,
g = h.DERInteger,
o = h.DERSet,
f = h.DERSequence,
b = h.DERTaggedObject,
n = h.cms,
k = n.EncapsulatedContentInfo,
d = n.SignerInfo,
p = n.ContentInfo,
j = n.CertificateSet,
i = n.RevocationInfoChoices,
c = h.x509,
m = c.AlgorithmIdentifier;
KJUR.asn1.cms.SignedData.superclass.constructor.call(this);
this.params = null;
this.checkAndFixParam = function () {
var q = this.params;
this._setDigestAlgs(q);
this._setContentTypeByEContent(q);
this._setMessageDigestByEContent(q);
this._setSignerInfoVersion(q);
this._setSignedDataVersion(q);
};
this._setDigestAlgs = function (u) {
var t = {};
var s = u.sinfos;
for (var q = 0; q < s.length; q++) {
var r = s[q];
t[r.hashalg] = 1;
}
u.hashalgs = Object.keys(t).sort();
};
this._setContentTypeByEContent = function (v) {
var t = v.econtent.type;
var u = v.sinfos;
for (var q = 0; q < u.length; q++) {
var s = u[q];
var r = this._getAttrParamByName(s, "contentType");
r.type = t;
}
};
this._setMessageDigestByEContent = function (q) {
var u = q.econtent;
var x = q.econtent.type;
var w = u.content.hex;
if (w == undefined && u.type == "data" && u.content.str != undefined) {
w = rstrtohex(u.content.str);
}
var z = q.sinfos;
for (var t = 0; t < z.length; t++) {
var s = z[t];
var r = s.hashalg;
var y = this._getAttrParamByName(s, "messageDigest");
var v = KJUR.crypto.Util.hashHex(w, r);
y.hex = v;
}
};
this._getAttrParamByName = function (s, r) {
var t = s.sattrs.array;
for (var q = 0; q < t.length; q++) {
if (t[q].attr == r) {
return t[q];
}
}
};
this._setSignerInfoVersion = function (u) {
var s = u.sinfos;
for (var q = 0; q < s.length; q++) {
var r = s[q];
var t = 1;
if (r.id.type == "skid") {
t = 3;
}
r.version = t;
}
};
this._setSignedDataVersion = function (r) {
var q = this._getSignedDataVersion(r);
r.version = q;
};
this._getSignedDataVersion = function (v) {
if (v.revinfos != undefined) {
var q = v.revinfos;
for (var s = 0; s < q.length; s++) {
var r = q[s];
if (r.ocsp != undefined) {
return 5;
}
}
}
var u = v.sinfos;
for (var s = 0; s < u.length; s++) {
var t = v.sinfos[s];
if (t.version == 3) {
return 3;
}
}
if (v.econtent.type != "data") {
return 3;
}
return 1;
};
this.getEncodedHex = function () {
var x = this.params;
if (this.getEncodedHexPrepare != undefined) {
this.getEncodedHexPrepare();
}
if (x.fixed != true) {
this.checkAndFixParam();
}
var q = [];
q.push(new g({
"int": x.version
}));
var v = [];
for (var u = 0; u < x.hashalgs.length; u++) {
var s = x.hashalgs[u];
v.push(new m({
name: s
}));
}
q.push(new o({
array: v
}));
q.push(new k(x.econtent));
if (x.certs != undefined) {
q.push(new j(x.certs));
}
if (x.revinfos != undefined) {
q.push(new i(x.revinfos));
}
var t = [];
for (var u = 0; u < x.sinfos.length; u++) {
var w = x.sinfos[u];
t.push(new d(w));
}
q.push(new o({
array: t
}));
var r = new f({
array: q
});
return r.getEncodedHex();
};
this.getContentInfo = function () {
var q = new p({
type: "signed-data",
obj: this
});
return q;
};
this.getContentInfoEncodedHex = function () {
return this.getContentInfo().getEncodedHex();
};
if (e != undefined) {
this.setByParam(e);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.SignedData, KJUR.asn1.ASN1Object);
KJUR.asn1.cms.CertificateSet = function (f) {
KJUR.asn1.cms.CertificateSet.superclass.constructor.call(this);
var c = Error,
b = KJUR.asn1,
e = b.DERTaggedObject,
a = b.DERSet,
d = b.ASN1Object;
this.params = null;
this.getEncodedHex = function () {
var j = this.params;
var p = [];
var q;
if (j instanceof Array) {
q = j;
} else {
if (j.array != undefined) {
q = j.array;
} else {
throw new c("cert array not specified");
}
}
for (var k = 0; k < q.length; k++) {
var l = q[k];
var n = pemtohex(l);
var g = new d();
g.hTLV = n;
p.push(g);
}
var m = {
array: p
};
if (j.sortflag == false) {
m.sortflag = false;
}
var o = new a(m);
var h = new e({
tag: "a0",
explicit: false,
obj: o
});
return h.getEncodedHex();
};
if (f != undefined) {
this.setByParam(f);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.CertificateSet, KJUR.asn1.ASN1Object);
KJUR.asn1.cms.RevocationInfoChoices = function (a) {
KJUR.asn1.cms.RevocationInfoChoices.superclass.constructor.call(this);
this.params = null;
this.getEncodedHex = function () {
var e = this.params;
if (!e instanceof Array) {
throw new Error("params is not array");
}
var b = [];
for (var c = 0; c < e.length; c++) {
b.push(new KJUR.asn1.cms.RevocationInfoChoice(e[c]));
}
var d = KJUR.asn1.ASN1Util.newObject({
tag: {
tagi: "a1",
obj: {
set: b
}
}
});
return d.getEncodedHex();
};
if (a != undefined) {
this.setByParam(a);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.RevocationInfoChoices, KJUR.asn1.ASN1Object);
KJUR.asn1.cms.RevocationInfoChoice = function (a) {
KJUR.asn1.cms.RevocationInfoChoice.superclass.constructor.call(this);
this.params = null;
this.getEncodedHex = function () {
var d = this.params;
if (d.crl != undefined && typeof d.crl == "string") {
var b = d.crl;
if (d.crl.indexOf("-----BEGIN") != -1) {
b = pemtohex(d.crl);
}
return b;
} else {
if (d.ocsp != undefined) {
var c = KJUR.asn1.ASN1Util.newObject({
tag: {
tagi: "a1",
obj: new KJUR.asn1.cms.OtherRevocationFormat(d)
}
});
return c.getEncodedHex();
} else {
throw new Error("property crl or ocsp undefined");
}
}
};
if (a != undefined) {
this.setByParam(a);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.RevocationInfoChoice, KJUR.asn1.ASN1Object);
KJUR.asn1.cms.OtherRevocationFormat = function (f) {
KJUR.asn1.cms.OtherRevocationFormat.superclass.constructor.call(this);
var d = Error,
c = KJUR,
b = c.asn1,
a = b.ASN1Util.newObject,
e = c.lang.String.isHex;
this.params = null;
this.getEncodedHex = function () {
var h = this.params;
if (h.ocsp == undefined) {
throw new d("property ocsp not specified");
}
if (!e(h.ocsp) || !ASN1HEX.isASN1HEX(h.ocsp)) {
throw new d("ocsp value not ASN.1 hex string");
}
var g = a({
seq: [{
oid: "1.3.6.1.5.5.7.16.2"
}, {
asn1: {
tlv: h.ocsp
}
}]
});
return g.getEncodedHex();
};
if (f != undefined) {
this.setByParam(f);
}
};
YAHOO.lang.extend(KJUR.asn1.cms.OtherRevocationFormat, KJUR.asn1.ASN1Object);
KJUR.asn1.cms.CMSUtil = new function () {}();
KJUR.asn1.cms.CMSUtil.newSignedData = function (a) {
return new KJUR.asn1.cms.SignedData(a);
};
KJUR.asn1.cms.CMSUtil.verifySignedData = function (n) {
var C = KJUR,
p = C.asn1,
s = p.cms,
D = s.SignerInfo,
q = s.SignedData,
y = s.SigningTime,
b = s.SigningCertificate,
d = s.SigningCertificateV2,
A = p.cades,
u = A.SignaturePolicyIdentifier,
i = C.lang.String.isHex,
v = ASN1HEX,
h = v.getVbyList,
a = v.getTLVbyList,
t = v.getIdxbyList,
z = v.getChildIdx,
c = v.getTLV,
B = v.oidname,
j = C.crypto.Util.hashHex;
if (n.cms === undefined && !i(n.cms)) {}
var E = n.cms;
var g = function g(J, H) {
var G;
for (var I = 3; I < 6; I++) {
G = t(J, 0, [1, 0, I]);
if (G !== undefined) {
var F = J.substr(G, 2);
if (F === "a0") {
H.certsIdx = G;
}
if (F === "a1") {
H.revinfosIdx = G;
}
if (F === "31") {
H.signerinfosIdx = G;
}
}
}
};
var l = function l(I, F) {
var H = F.signerinfosIdx;
if (H === undefined) {
return;
}
var L = z(I, H);
F.signerInfoIdxList = L;
for (var G = 0; G < L.length; G++) {
var K = L[G];
var J = {
idx: K
};
k(I, J);
F.signerInfos.push(J);
}
};
var k = function k(I, J) {
var F = J.idx;
J.signerid_issuer1 = a(I, F, [1, 0], "30");
J.signerid_serial1 = h(I, F, [1, 1], "02");
J.hashalg = B(h(I, F, [2, 0], "06"));
var H = t(I, F, [3], "a0");
J.idxSignedAttrs = H;
f(I, J, H);
var G = z(I, F);
var K = G.length;
if (K < 6) {
throw "malformed SignerInfo";
}
J.sigalg = B(h(I, F, [K - 2, 0], "06"));
J.sigval = h(I, F, [K - 1], "04");
};
var f = function f(L, M, F) {
var J = z(L, F);
M.signedAttrIdxList = J;
for (var K = 0; K < J.length; K++) {
var I = J[K];
var G = h(L, I, [0], "06");
var H;
if (G === "2a864886f70d010905") {
H = hextoutf8(h(L, I, [1, 0]));
M.saSigningTime = H;
} else {
if (G === "2a864886f70d010904") {
H = h(L, I, [1, 0], "04");
M.saMessageDigest = H;
}
}
}
};
var w = function w(G, F) {
if (h(G, 0, [0], "06") !== "2a864886f70d010702") {
return F;
}
F.cmsType = "signedData";
F.econtent = h(G, 0, [1, 0, 2, 1, 0]);
g(G, F);
F.signerInfos = [];
l(G, F);
};
var o = function o(J, F) {
var G = F.parse.signerInfos;
var L = G.length;
var K = true;
for (var I = 0; I < L; I++) {
var H = G[I];
e(J, F, H, I);
if (!H.isValid) {
K = false;
}
}
F.isValid = K;
};
var x = function x(F, Q, J, P) {
var N = Q.parse.certsIdx;
var H;
if (Q.certs === undefined) {
H = [];
Q.certkeys = [];
var K = z(F, N);
for (var I = 0; I < K.length; I++) {
var M = c(F, K[I]);
var O = new X509();
O.readCertHex(M);
H[I] = O;
Q.certkeys[I] = O.getPublicKey();
}
Q.certs = H;
} else {
H = Q.certs;
}
Q.cccc = H.length;
Q.cccci = K.length;
for (var I = 0; I < H.length; I++) {
var L = O.getIssuerHex();
var G = O.getSerialNumberHex();
if (J.signerid_issuer1 === L && J.signerid_serial1 === G) {
J.certkey_idx = I;
}
}
};
var e = function e(F, R, I, N) {
I.verifyDetail = {};
var Q = I.verifyDetail;
var K = R.parse.econtent;
var G = I.hashalg;
var L = I.saMessageDigest;
Q.validMessageDigest = false;
if (j(K, G) === L) {
Q.validMessageDigest = true;
}
x(F, R, I, N);
Q.validSignatureValue = false;
var H = I.sigalg;
var M = "31" + c(F, I.idxSignedAttrs).substr(2);
I.signedattrshex = M;
var J = R.certs[I.certkey_idx].getPublicKey();
var P = new KJUR.crypto.Signature({
alg: H
});
P.init(J);
P.updateHex(M);
var O = P.verify(I.sigval);
Q.validSignatureValue_isValid = O;
if (O === true) {
Q.validSignatureValue = true;
}
I.isValid = false;
if (Q.validMessageDigest && Q.validSignatureValue) {
I.isValid = true;
}
};
var m = function m() {};
var r = {
isValid: false,
parse: {}
};
w(E, r.parse);
o(E, r);
return r;
};
if (typeof KJUR == "undefined" || !KJUR) {
KJUR = {};
}
if (typeof KJUR.asn1 == "undefined" || !KJUR.asn1) {
KJUR.asn1 = {};
}
if (typeof KJUR.asn1.tsp == "undefined" || !KJUR.asn1.tsp) {
KJUR.asn1.tsp = {};
}
KJUR.asn1.tsp.TimeStampToken = function (d) {
var c = KJUR,
b = c.asn1,
a = b.tsp;
a.TimeStampToken.superclass.constructor.call(this);
this.params = null;
this.getEncodedHexPrepare = function () {
var e = new a.TSTInfo(this.params.econtent.content);
this.params.econtent.content.hex = e.getEncodedHex();
};
if (d != undefined) {
this.setByParam(d);
}
};
YAHOO.lang.extend(KJUR.asn1.tsp.TimeStampToken, KJUR.asn1.cms.SignedData);
KJUR.asn1.tsp.TSTInfo = function (f) {
var c = KJUR,
j = c.asn1,
g = j.DERSequence,
i = j.DERInteger,
l = j.DERBoolean,
h = j.DERGeneralizedTime,
m = j.DERObjectIdentifier,
e = j.DERTaggedObject,
k = j.tsp,
d = k.MessageImprint,
b = k.Accuracy,
a = j.x509.X500Name,
n = j.x509.GeneralName;
k.TSTInfo.superclass.constructor.call(this);
this.dVersion = new i({
"int": 1
});
this.dPolicy = null;
this.dMessageImprint = null;
this.dSerialNumber = null;
this.dGenTime = null;
this.dAccuracy = null;
this.dOrdering = null;
this.dNonce = null;
this.dTsa = null;
this.getEncodedHex = function () {
var o = [this.dVersion];
if (this.dPolicy == null) {
throw "policy shall be specified.";
}
o.push(this.dPolicy);
if (this.dMessageImprint == null) {
throw "messageImprint shall be specified.";
}
o.push(this.dMessageImprint);
if (this.dSerialNumber == null) {
throw "serialNumber shall be specified.";
}
o.push(this.dSerialNumber);
if (this.dGenTime == null) {
throw "genTime shall be specified.";
}
o.push(this.dGenTime);
if (this.dAccuracy != null) {
o.push(this.dAccuracy);
}
if (this.dOrdering != null) {
o.push(this.dOrdering);
}
if (this.dNonce != null) {
o.push(this.dNonce);
}
if (this.dTsa != null) {
o.push(this.dTsa);
}
var p = new g({
array: o
});
this.hTLV = p.getEncodedHex();
return this.hTLV;
};
if (f !== undefined) {
if (typeof f.policy == "string") {
if (!f.policy.match(/^[0-9.]+$/)) {
throw "policy shall be oid like 0.1.4.134";
}
this.dPolicy = new m({
oid: f.policy
});
}
if (f.messageImprint !== undefined) {
this.dMessageImprint = new d(f.messageImprint);
}
if (f.serialNumber !== undefined) {
this.dSerialNumber = new i(f.serialNumber);
}
if (f.genTime !== undefined) {
this.dGenTime = new h(f.genTime);
}
if (f.accuracy !== undefined) {
this.dAccuracy = new b(f.accuracy);
}
if (f.ordering !== undefined && f.ordering == true) {
this.dOrdering = new l();
}
if (f.nonce !== undefined) {
this.dNonce = new i(f.nonce);
}
if (f.tsa !== undefined) {
this.dTsa = new e({
tag: "a0",
explicit: true,
obj: new n({
dn: f.tsa
})
});
}
}
};
YAHOO.lang.extend(KJUR.asn1.tsp.TSTInfo, KJUR.asn1.ASN1Object);
KJUR.asn1.tsp.Accuracy = function (d) {
var c = KJUR,
b = c.asn1,
a = b.ASN1Util.newObject;
b.tsp.Accuracy.superclass.constructor.call(this);
this.params = null;
this.getEncodedHex = function () {
var f = this.params;
var e = [];
if (f.seconds != undefined && typeof f.seconds == "number") {
e.push({
"int": f.seconds
});
}
if (f.millis != undefined && typeof f.millis == "number") {
e.push({
tag: {
tagi: "80",
obj: {
"int": f.millis
}
}
});
}
if (f.micros != undefined && typeof f.micros == "number") {
e.push({
tag: {
tagi: "81",
obj: {
"int": f.micros
}
}
});
}
return a({
seq: e
}).getEncodedHex();
};
if (d != undefined) {
this.setByParam(d);
}
};
YAHOO.lang.extend(KJUR.asn1.tsp.Accuracy, KJUR.asn1.ASN1Object);
KJUR.asn1.tsp.MessageImprint = function (g) {
var c = KJUR,
b = c.asn1,
a = b.DERSequence,
d = b.DEROctetString,
f = b.x509,
e = f.AlgorithmIdentifier;
b.tsp.MessageImprint.superclass.constructor.call(this);
this.params = null;
this.getEncodedHex = function () {
var k = this.params;
var j = new e({
name: k.alg
});
var h = new d({
hex: k.hash
});
var i = new a({
array: [j, h]
});
return i.getEncodedHex();
};
if (g !== undefined) {
this.setByParam(g);
}
};
YAHOO.lang.extend(KJUR.asn1.tsp.MessageImprint, KJUR.asn1.ASN1Object);
KJUR.asn1.tsp.TimeStampReq = function (c) {
var a = KJUR,
f = a.asn1,
d = f.DERSequence,
e = f.DERInteger,
h = f.DERBoolean,
j = f.ASN1Object,
i = f.DERObjectIdentifier,
g = f.tsp,
b = g.MessageImprint;
g.TimeStampReq.superclass.constructor.call(this);
this.params = null;
this.getEncodedHex = function () {
var m = this.params;
var k = [];
k.push(new e({
"int": 1
}));
if (m.messageImprint instanceof KJUR.asn1.ASN1Object) {
k.push(m.messageImprint);
} else {
k.push(new b(m.messageImprint));
}
if (m.policy != undefined) {
k.push(new i(m.policy));
}
if (m.nonce != undefined) {
k.push(new e(m.nonce));
}
if (m.certreq == true) {
k.push(new h());
}
var l = new d({
array: k
});
return l.getEncodedHex();
};
if (c != undefined) {
this.setByParam(c);
}
};
YAHOO.lang.extend(KJUR.asn1.tsp.TimeStampReq, KJUR.asn1.ASN1Object);
KJUR.asn1.tsp.TimeStampResp = function (g) {
var e = KJUR,
d = e.asn1,
c = d.DERSequence,
f = d.ASN1Object,
a = d.tsp,
b = a.PKIStatusInfo;
a.TimeStampResp.superclass.constructor.call(this);
this.params = null;
this.getEncodedHex = function () {
var j = this.params;
var h = [new b(j.statusinfo)];
if (j.econtent != undefined) {
h.push(new a.TimeStampToken(j).getContentInfo());
}
if (j.tst != undefined && j.tst instanceof d.ASN1Object) {
h.push(j.tst);
}
var i = new c({
array: h
});
return i.getEncodedHex();
};
if (g != undefined) {
this.setByParam(g);
}
};
YAHOO.lang.extend(KJUR.asn1.tsp.TimeStampResp, KJUR.asn1.ASN1Object);
KJUR.asn1.tsp.PKIStatusInfo = function (d) {
var h = Error,
a = KJUR,
g = a.asn1,
e = g.DERSequence,
i = g.tsp,
f = i.PKIStatus,
c = i.PKIFreeText,
b = i.PKIFailureInfo;
i.PKIStatusInfo.superclass.constructor.call(this);
this.params = null;
this.getEncodedHex = function () {
var l = this.params;
var j = [];
if (typeof l == "string") {
j.push(new f(l));
} else {
if (l.status == undefined) {
throw new h("property 'status' unspecified");
}
j.push(new f(l.status));
if (l.statusstr != undefined) {
j.push(new c(l.statusstr));
}
if (l.failinfo != undefined) {
j.push(new b(l.failinfo));
}
}
var k = new e({
array: j
});
return k.getEncodedHex();
};
if (d != undefined) {
this.setByParam(d);
}
};
YAHOO.lang.extend(KJUR.asn1.tsp.PKIStatusInfo, KJUR.asn1.ASN1Object);
KJUR.asn1.tsp.PKIStatus = function (g) {
var e = Error,
d = KJUR,
c = d.asn1,
f = c.DERInteger,
b = c.tsp;
b.PKIStatus.superclass.constructor.call(this);
var a = {
granted: 0,
grantedWithMods: 1,
rejection: 2,
waiting: 3,
revocationWarning: 4,
revocationNotification: 5
};
this.params = null;
this.getEncodedHex = function () {
var k = this.params;
var h, j;
if (typeof k == "string") {
try {
j = a[k];
} catch (i) {
throw new e("undefined name: " + k);
}
} else {
if (typeof k == "number") {
j = k;
} else {
throw new e("unsupported params");
}
}
return new f({
"int": j
}).getEncodedHex();
};
if (g != undefined) {
this.setByParam(g);
}
};
YAHOO.lang.extend(KJUR.asn1.tsp.PKIStatus, KJUR.asn1.ASN1Object);
KJUR.asn1.tsp.PKIFreeText = function (g) {
var f = Error,
e = KJUR,
d = e.asn1,
b = d.DERSequence,
c = d.DERUTF8String,
a = d.tsp;
a.PKIFreeText.superclass.constructor.call(this);
this.params = null;
this.getEncodedHex = function () {
var l = this.params;
if (!l instanceof Array) {
throw new f("wrong params: not array");
}
var h = [];
for (var k = 0; k < l.length; k++) {
h.push(new c({
str: l[k]
}));
}
var j = new b({
array: h
});
return j.getEncodedHex();
};
if (g != undefined) {
this.setByParam(g);
}
};
YAHOO.lang.extend(KJUR.asn1.tsp.PKIFreeText, KJUR.asn1.ASN1Object);
KJUR.asn1.tsp.PKIFailureInfo = function (h) {
var f = Error,
e = KJUR,
d = e.asn1,
g = d.DERBitString,
b = d.tsp,
c = b.PKIFailureInfo;
var a = {
badAlg: 0,
badRequest: 2,
badDataFormat: 5,
timeNotAvailable: 14,
unacceptedPolicy: 15,
unacceptedExtension: 16,
addInfoNotAvailable: 17,
systemFailure: 25
};
c.superclass.constructor.call(this);
this.params = null;
this.getEncodedHex = function () {
var k = this.params;
var j;
if (typeof k == "string") {
try {
j = a[k];
} catch (i) {
throw new f("undefined name: " + k);
}
} else {
if (typeof k == "number") {
j = k;
} else {
throw new f("wrong params");
}
}
return new g({
bin: j.toString(2)
}).getEncodedHex();
};
if (h != undefined) {
this.setByParam(h);
}
};
YAHOO.lang.extend(KJUR.asn1.tsp.PKIFailureInfo, KJUR.asn1.ASN1Object);
KJUR.asn1.tsp.AbstractTSAAdapter = function (a) {
this.getTSTHex = function (c, b) {
throw "not implemented yet";
};
};
KJUR.asn1.tsp.SimpleTSAAdapter = function (e) {
var d = KJUR,
c = d.asn1,
a = c.tsp,
b = d.crypto.Util.hashHex;
a.SimpleTSAAdapter.superclass.constructor.call(this);
this.params = null;
this.serial = 0;
this.getTSTHex = function (g, f) {
var i = b(g, f);
this.params.econtent.content.messageImprint = {
alg: f,
hash: i
};
this.params.econtent.content.serialNumber = {
"int": this.serial++
};
var h = Math.floor(Math.random() * 1000000000);
this.params.econtent.content.nonce = {
"int": h
};
var j = new a.TimeStampToken(this.params);
return j.getContentInfoEncodedHex();
};
if (e !== undefined) {
this.params = e;
}
};
YAHOO.lang.extend(KJUR.asn1.tsp.SimpleTSAAdapter, KJUR.asn1.tsp.AbstractTSAAdapter);
KJUR.asn1.tsp.FixedTSAAdapter = function (e) {
var d = KJUR,
c = d.asn1,
a = c.tsp,
b = d.crypto.Util.hashHex;
a.FixedTSAAdapter.superclass.constructor.call(this);
this.params = null;
this.getTSTHex = function (g, f) {
var h = b(g, f);
this.params.econtent.content.messageImprint = {
alg: f,
hash: h
};
var i = new a.TimeStampToken(this.params);
return i.getContentInfoEncodedHex();
};
if (e !== undefined) {
this.params = e;
}
};
YAHOO.lang.extend(KJUR.asn1.tsp.FixedTSAAdapter, KJUR.asn1.tsp.AbstractTSAAdapter);
KJUR.asn1.tsp.TSPUtil = new function () {}();
KJUR.asn1.tsp.TSPUtil.newTimeStampToken = function (a) {
return new KJUR.asn1.tsp.TimeStampToken(a);
};
KJUR.asn1.tsp.TSPUtil.parseTimeStampReq = function (m) {
var l = ASN1HEX;
var h = l.getChildIdx;
var f = l.getV;
var b = l.getTLV;
var j = {};
j.certreq = false;
var a = h(m, 0);
if (a.length < 2) {
throw "TimeStampReq must have at least 2 items";
}
var e = b(m, a[1]);
j.messageImprint = KJUR.asn1.tsp.TSPUtil.parseMessageImprint(e);
for (var d = 2; d < a.length; d++) {
var g = a[d];
var k = m.substr(g, 2);
if (k == "06") {
var c = f(m, g);
j.policy = l.hextooidstr(c);
}
if (k == "02") {
j.nonce = f(m, g);
}
if (k == "01") {
j.certreq = true;
}
}
return j;
};
KJUR.asn1.tsp.TSPUtil.parseMessageImprint = function (c) {
var m = ASN1HEX;
var j = m.getChildIdx;
var i = m.getV;
var g = m.getIdxbyList;
var k = {};
if (c.substr(0, 2) != "30") {
throw "head of messageImprint hex shall be '30'";
}
var a = j(c, 0);
var l = g(c, 0, [0, 0]);
var e = i(c, l);
var d = m.hextooidstr(e);
var h = KJUR.asn1.x509.OID.oid2name(d);
if (h == "") {
throw "hashAlg name undefined: " + d;
}
var b = h;
var f = g(c, 0, [1]);
k.alg = b;
k.hash = i(c, f);
return k;
};
if (typeof KJUR == "undefined" || !KJUR) {
KJUR = {};
}
if (typeof KJUR.asn1 == "undefined" || !KJUR.asn1) {
KJUR.asn1 = {};
}
if (typeof KJUR.asn1.cades == "undefined" || !KJUR.asn1.cades) {
KJUR.asn1.cades = {};
}
KJUR.asn1.cades.SignaturePolicyIdentifier = function (e) {
var c = KJUR,
b = c.asn1,
a = b.cades,
d = a.SignaturePolicyId;
a.SignaturePolicyIdentifier.superclass.constructor.call(this);
this.typeOid = "1.2.840.113549.1.9.16.2.15";
this.params = null;
this.getValueArray = function () {
return [new d(this.params)];
};
this.setByParam = function (f) {
this.params = f;
};
if (e != undefined) {
this.setByParam(e);
}
};
YAHOO.lang.extend(KJUR.asn1.cades.SignaturePolicyIdentifier, KJUR.asn1.cms.Attribute);
KJUR.asn1.cades.SignaturePolicyId = function (e) {
var a = KJUR,
g = a.asn1,
f = g.DERSequence,
i = g.DERObjectIdentifier,
d = g.x509,
j = d.AlgorithmIdentifier,
c = g.cades,
h = c.SignaturePolicyId,
b = c.OtherHashAlgAndValue;
h.superclass.constructor.call(this);
this.params = null;
this.getEncodedHex = function () {
var m = this.params;
var k = [];
k.push(new i(m.oid));
k.push(new b(m));
var l = new f({
array: k
});
return l.getEncodedHex();
};
this.setByParam = function (k) {
this.params = k;
};
if (e != undefined) {
this.setByParam(e);
}
};
YAHOO.lang.extend(KJUR.asn1.cades.SignaturePolicyId, KJUR.asn1.ASN1Object);
KJUR.asn1.cades.OtherHashAlgAndValue = function (e) {
var h = Error,
a = KJUR,
g = a.asn1,
f = g.DERSequence,
i = g.DEROctetString,
d = g.x509,
j = d.AlgorithmIdentifier,
c = g.cades,
b = c.OtherHashAlgAndValue;
b.superclass.constructor.call(this);
this.params = null;
this.getEncodedHex = function () {
var o = this.params;
if (o.alg == undefined) {
throw new h("property 'alg' not specified");
}
if (o.hash == undefined && o.cert == undefined) {
throw new h("property 'hash' nor 'cert' not specified");
}
var m = null;
if (o.hash != undefined) {
m = o.hash;
} else {
if (o.cert != undefined) {
if (typeof o.cert != "string") {
throw new h("cert not string");
}
var n = o.cert;
if (o.cert.indexOf("-----BEGIN") != -1) {
n = pemtohex(o.cert);
}
m = KJUR.crypto.Util.hashHex(n, o.alg);
}
}
var k = [];
k.push(new j({
name: o.alg
}));
k.push(new i({
hex: m
}));
var l = new f({
array: k
});
return l.getEncodedHex();
};
if (e != undefined) {
this.setByParam(e);
}
};
YAHOO.lang.extend(KJUR.asn1.cades.OtherHashAlgAndValue, KJUR.asn1.ASN1Object);
KJUR.asn1.cades.OtherHashValue = function (g) {
KJUR.asn1.cades.OtherHashValue.superclass.constructor.call(this);
var d = Error,
c = KJUR,
f = c.lang.String.isHex,
b = c.asn1,
e = b.DEROctetString,
a = c.crypto.Util.hashHex;
this.params = null;
this.getEncodedHex = function () {
var j = this.params;
if (j.hash == undefined && j.cert == undefined) {
throw new d("hash or cert not specified");
}
var h = null;
if (j.hash != undefined) {
h = j.hash;
} else {
if (j.cert != undefined) {
if (typeof j.cert != "string") {
throw new d("cert not string");
}
var i = j.cert;
if (j.cert.indexOf("-----BEGIN") != -1) {
i = pemtohex(j.cert);
}
h = KJUR.crypto.Util.hashHex(i, "sha1");
}
}
return new e({
hex: h
}).getEncodedHex();
};
if (g != undefined) {
this.setByParam(g);
}
};
YAHOO.lang.extend(KJUR.asn1.cades.OtherHashValue, KJUR.asn1.ASN1Object);
KJUR.asn1.cades.SignatureTimeStamp = function (h) {
var d = Error,
c = KJUR,
f = c.lang.String.isHex,
b = c.asn1,
e = b.ASN1Object,
g = b.x509,
a = b.cades;
a.SignatureTimeStamp.superclass.constructor.call(this);
this.typeOid = "1.2.840.113549.1.9.16.2.14";
this.params = null;
this.getValueArray = function () {
var l = this.params;
if (l.tst != undefined) {
if (f(l.tst)) {
var j = new e();
j.hTLV = l.tst;
return [j];
} else {
if (l.tst instanceof e) {
return [l.tst];
} else {
throw new d("params.tst has wrong value");
}
}
} else {
if (l.res != undefined) {
var k = l.res;
if (k instanceof e) {
k = k.getEncodedHex();
}
if (typeof k != "string" || !f(k)) {
throw new d("params.res has wrong value");
}
var i = ASN1HEX.getTLVbyList(k, 0, [1]);
var j = new e();
j.hTLV = l.tst;
return [j];
}
}
};
if (h != null) {
this.setByParam(h);
}
};
YAHOO.lang.extend(KJUR.asn1.cades.SignatureTimeStamp, KJUR.asn1.cms.Attribute);
KJUR.asn1.cades.CompleteCertificateRefs = function (h) {
var f = Error,
e = KJUR,
d = e.asn1,
b = d.DERSequence,
c = d.cades,
a = c.OtherCertID,
g = e.lang.String.isHex;
c.CompleteCertificateRefs.superclass.constructor.call(this);
this.typeOid = "1.2.840.113549.1.9.16.2.21";
this.params = null;
this.getValueArray = function () {
var o = this.params;
var k = [];
for (var m = 0; m < o.array.length; m++) {
var n = o.array[m];
if (typeof n == "string") {
if (n.indexOf("-----BEGIN") != -1) {
n = {
cert: n
};
} else {
if (g(n)) {
n = {
hash: n
};
} else {
throw new f("unsupported value: " + n);
}
}
}
if (o.alg != undefined && n.alg == undefined) {
n.alg = o.alg;
}
if (o.hasis != undefined && n.hasis == undefined) {
n.hasis = o.hasis;
}
var j = new a(n);
k.push(j);
}
var l = new b({
array: k
});
return [l];
};
if (h != undefined) {
this.setByParam(h);
}
};
YAHOO.lang.extend(KJUR.asn1.cades.CompleteCertificateRefs, KJUR.asn1.cms.Attribute);
KJUR.asn1.cades.OtherCertID = function (e) {
var a = KJUR,
h = a.asn1,
f = h.DERSequence,
i = h.cms,
g = i.IssuerSerial,
c = h.cades,
d = c.OtherHashValue,
b = c.OtherHashAlgAndValue;
c.OtherCertID.superclass.constructor.call(this);
this.params = e;
this.getEncodedHex = function () {
var n = this.params;
if (typeof n == "string") {
if (n.indexOf("-----BEGIN") != -1) {
n = {
cert: n
};
} else {
if (_isHex(n)) {
n = {
hash: n
};
}
}
}
var j = [];
var m = null;
if (n.alg != undefined) {
m = new b(n);
} else {
m = new d(n);
}
j.push(m);
if (n.cert != undefined && n.hasis == true || n.issuer != undefined && n.serial != undefined) {
var l = new g(n);
j.push(l);
}
var k = new f({
array: j
});
return k.getEncodedHex();
};
if (e != undefined) {
this.setByParam(e);
}
};
YAHOO.lang.extend(KJUR.asn1.cades.OtherCertID, KJUR.asn1.ASN1Object);
KJUR.asn1.cades.OtherHash = function (g) {
var i = Error,
a = KJUR,
h = a.asn1,
j = h.cms,
c = h.cades,
b = c.OtherHashAlgAndValue,
e = c.OtherHashValue,
d = a.crypto.Util.hashHex,
f = a.lang.String.isHex;
c.OtherHash.superclass.constructor.call(this);
this.params = null;
this.getEncodedHex = function () {
var l = this.params;
if (typeof l == "string") {
if (l.indexOf("-----BEGIN") != -1) {
l = {
cert: l
};
} else {
if (f(l)) {
l = {
hash: l
};
}
}
}
var k = null;
if (l.alg != undefined) {
k = new b(l);
} else {
k = new e(l);
}
return k.getEncodedHex();
};
if (g != undefined) {
this.setByParam(g);
}
};
YAHOO.lang.extend(KJUR.asn1.cades.OtherHash, KJUR.asn1.ASN1Object);
KJUR.asn1.cades.CAdESUtil = new function () {}();
KJUR.asn1.cades.CAdESUtil.addSigTS = function (c, b, a) {};
KJUR.asn1.cades.CAdESUtil.parseSignedDataForAddingUnsigned = function (f) {
var q = ASN1HEX,
w = q.getChildIdx,
b = q.getTLV,
a = q.getTLVbyList,
s = q.getTLVbyListEx,
l = q.getIdxbyList,
e = q.getIdxbyListEx,
D = KJUR,
h = D.asn1,
m = h.ASN1Object,
k = h.cms,
j = k.SignedData,
x = h.cades,
B = x.CAdESUtil;
var n = {};
if (a(f, 0, [0]) != "06092a864886f70d010702") {
throw "hex is not CMS SignedData";
}
var A = l(f, 0, [1, 0]);
var C = w(f, A);
if (C.length < 4) {
throw "num of SignedData elem shall be 4 at least";
}
var d = C.shift();
n.version = b(f, d);
var y = C.shift();
n.algs = b(f, y);
var c = C.shift();
n.encapcontent = b(f, c);
n.certs = null;
n.revs = null;
n.si = [];
var p = C.shift();
if (f.substr(p, 2) == "a0") {
n.certs = b(f, p);
p = C.shift();
}
if (f.substr(p, 2) == "a1") {
n.revs = b(f, p);
p = C.shift();
}
var v = p;
if (f.substr(v, 2) != "31") {
throw "Can't find signerInfos";
}
var g = w(f, v);
for (var t = 0; t < g.length; t++) {
var u = g[t];
var o = B.parseSignerInfoForAddingUnsigned(f, u, t);
n.si[t] = o;
}
var z = null;
n.obj = new j();
z = new m();
z.hTLV = n.version;
n.obj.dCMSVersion = z;
z = new m();
z.hTLV = n.algs;
n.obj.dDigestAlgs = z;
z = new m();
z.hTLV = n.encapcontent;
n.obj.dEncapContentInfo = z;
z = new m();
z.hTLV = n.certs;
n.obj.dCerts = z;
n.obj.signerInfoList = [];
for (var t = 0; t < n.si.length; t++) {
n.obj.signerInfoList.push(n.si[t].obj);
}
return n;
};
KJUR.asn1.cades.CAdESUtil.parseSignerInfoForAddingUnsigned = function (g, q, c) {
var p = ASN1HEX,
s = p.getChildIdx,
a = p.getTLV,
l = p.getV,
v = KJUR,
h = v.asn1,
n = h.ASN1Object,
j = h.cms,
k = j.AttributeList,
w = j.SignerInfo;
var o = {};
var t = s(g, q);
if (t.length != 6) {
throw "not supported items for SignerInfo (!=6)";
}
var d = t.shift();
o.version = a(g, d);
var e = t.shift();
o.si = a(g, e);
var m = t.shift();
o.digalg = a(g, m);
var f = t.shift();
o.sattrs = a(g, f);
var i = t.shift();
o.sigalg = a(g, i);
var b = t.shift();
o.sig = a(g, b);
o.sigval = l(g, b);
var u = null;
o.obj = new w();
u = new n();
u.hTLV = o.version;
o.obj.dCMSVersion = u;
u = new n();
u.hTLV = o.si;
o.obj.dSignerIdentifier = u;
u = new n();
u.hTLV = o.digalg;
o.obj.dDigestAlgorithm = u;
u = new n();
u.hTLV = o.sattrs;
o.obj.dSignedAttrs = u;
u = new n();
u.hTLV = o.sigalg;
o.obj.dSigAlg = u;
u = new n();
u.hTLV = o.sig;
o.obj.dSig = u;
o.obj.dUnsignedAttrs = new k();
return o;
};
if (typeof KJUR.asn1.csr == "undefined" || !KJUR.asn1.csr) {
KJUR.asn1.csr = {};
}
KJUR.asn1.csr.CertificationRequest = function (g) {
var d = KJUR,
c = d.asn1,
e = c.DERBitString,
b = c.DERSequence,
a = c.csr,
f = c.x509,
h = a.CertificationRequestInfo;
a.CertificationRequest.superclass.constructor.call(this);
this.setByParam = function (i) {
this.params = i;
};
this.sign = function () {
var j = new h(this.params).getEncodedHex();
var k = new KJUR.crypto.Signature({
alg: this.params.sigalg
});
k.init(this.params.sbjprvkey);
k.updateHex(j);
var i = k.sign();
this.params.sighex = i;
};
this.getPEM = function () {
return hextopem(this.getEncodedHex(), "CERTIFICATE REQUEST");
};
this.getEncodedHex = function () {
var l = this.params;
var j = new KJUR.asn1.csr.CertificationRequestInfo(this.params);
var m = new KJUR.asn1.x509.AlgorithmIdentifier({
name: l.sigalg
});
if (l.sighex == undefined && l.sbjprvkey != undefined) {
this.sign();
}
if (l.sighex == undefined) {
throw new Error("sighex or sbjprvkey parameter not defined");
}
var k = new e({
hex: "00" + l.sighex
});
var i = new b({
array: [j, m, k]
});
return i.getEncodedHex();
};
if (g !== undefined) {
this.setByParam(g);
}
};
YAHOO.lang.extend(KJUR.asn1.csr.CertificationRequest, KJUR.asn1.ASN1Object);
KJUR.asn1.csr.CertificationRequestInfo = function (f) {
var b = KJUR,
j = b.asn1,
c = j.DERBitString,
g = j.DERSequence,
i = j.DERInteger,
n = j.DERUTF8String,
d = j.DERTaggedObject,
h = j.ASN1Util.newObject,
l = j.csr,
e = j.x509,
a = e.X500Name,
k = e.Extensions,
m = e.SubjectPublicKeyInfo;
l.CertificationRequestInfo.superclass.constructor.call(this);
this.params = null;
this.setByParam = function (o) {
if (o != undefined) {
this.params = o;
}
};
this.getEncodedHex = function () {
var s = this.params;
var p = [];
p.push(new i({
"int": 0
}));
p.push(new a(s.subject));
p.push(new m(KEYUTIL.getKey(s.sbjpubkey)));
if (s.extreq != undefined) {
var o = new k(s.extreq);
var r = h({
tag: {
tag: "a0",
explict: true,
obj: {
seq: [{
oid: "1.2.840.113549.1.9.14"
}, {
set: [o]
}]
}
}
});
p.push(r);
} else {
p.push(new d({
tag: "a0",
explicit: false,
obj: new n({
str: ""
})
}));
}
var q = new g({
array: p
});
return q.getEncodedHex();
};
if (f != undefined) {
this.setByParam(f);
}
};
YAHOO.lang.extend(KJUR.asn1.csr.CertificationRequestInfo, KJUR.asn1.ASN1Object);
KJUR.asn1.csr.CSRUtil = new function () {}();
KJUR.asn1.csr.CSRUtil.newCSRPEM = function (e) {
var b = KEYUTIL,
a = KJUR.asn1.csr;
var c = new a.CertificationRequest(e);
var d = c.getPEM();
return d;
};
KJUR.asn1.csr.CSRUtil.getParam = function (c) {
var m = ASN1HEX,
j = m.getV;
_getIdxbyList = m.getIdxbyList;
_getTLVbyList = m.getTLVbyList, _getTLVbyListEx = m.getTLVbyListEx, _getVbyListEx = m.getVbyListEx;
var b = function b(p) {
var o = _getIdxbyList(p, 0, [0, 3, 0, 0], "06");
if (j(p, o) != "2a864886f70d01090e") {
return null;
}
return _getTLVbyList(p, 0, [0, 3, 0, 1, 0], "30");
};
var n = {};
if (c.indexOf("-----BEGIN CERTIFICATE REQUEST") == -1) {
throw new Error("argument is not PEM file");
}
var e = pemtohex(c, "CERTIFICATE REQUEST");
try {
var g = _getTLVbyListEx(e, 0, [0, 1]);
var k = new X509();
n.subject = {};
n.subject.array = k.getX500Name(g);
n.subject.str = X509.hex2dn(g);
} catch (h) {}
var d = _getTLVbyListEx(e, 0, [0, 2]);
var f = KEYUTIL.getKey(d, null, "pkcs8pub");
n.sbjpubkey = KEYUTIL.getPEM(f, "PKCS8PUB");
var i = b(e);
var k = new X509();
if (i != null) {
n.extreq = k.getExtParamArray(i);
}
try {
var a = _getTLVbyListEx(e, 0, [1], "30");
var k = new X509();
n.sigalg = k.getAlgorithmIdentifierName(a);
} catch (h) {}
try {
var l = _getVbyListEx(e, 0, [2]);
n.sighex = l;
} catch (h) {}
return n;
};
if (typeof KJUR == "undefined" || !KJUR) {
KJUR = {};
}
if (typeof KJUR.asn1 == "undefined" || !KJUR.asn1) {
KJUR.asn1 = {};
}
if (typeof KJUR.asn1.ocsp == "undefined" || !KJUR.asn1.ocsp) {
KJUR.asn1.ocsp = {};
}
KJUR.asn1.ocsp.DEFAULT_HASH = "sha1";
KJUR.asn1.ocsp.OCSPResponse = function (e) {
KJUR.asn1.ocsp.OCSPResponse.superclass.constructor.call(this);
var a = KJUR.asn1.DEREnumerated,
b = KJUR.asn1.ASN1Util.newObject,
c = KJUR.asn1.ocsp.ResponseBytes;
var d = ["successful", "malformedRequest", "internalError", "tryLater", "_not_used_", "sigRequired", "unauthorized"];
this.params = null;
this._getStatusCode = function () {
var f = this.params.resstatus;
if (typeof f == "number") {
return f;
}
if (typeof f != "string") {
return -1;
}
return d.indexOf(f);
};
this.setByParam = function (f) {
this.params = f;
};
this.getEncodedHex = function () {
var h = this.params;
var g = this._getStatusCode();
if (g == -1) {
throw new Error("responseStatus not supported: " + h.resstatus);
}
if (g != 0) {
return b({
seq: [{
"enum": {
"int": g
}
}]
}).getEncodedHex();
}
var f = new c(h);
return b({
seq: [{
"enum": {
"int": 0
}
}, {
tag: {
tag: "a0",
explicit: true,
obj: f
}
}]
}).getEncodedHex();
};
if (e !== undefined) {
this.setByParam(e);
}
};
YAHOO.lang.extend(KJUR.asn1.ocsp.OCSPResponse, KJUR.asn1.ASN1Object);
KJUR.asn1.ocsp.ResponseBytes = function (e) {
KJUR.asn1.ocsp.ResponseBytes.superclass.constructor.call(this);
var b = KJUR.asn1,
a = b.DERSequence,
f = b.DERObjectIdentifier,
c = b.DEROctetString,
d = b.ocsp.BasicOCSPResponse;
this.params = null;
this.setByParam = function (g) {
this.params = g;
};
this.getEncodedHex = function () {
var j = this.params;
if (j.restype != "ocspBasic") {
throw new Error("not supported responseType: " + j.restype);
}
var i = new d(j);
var g = [];
g.push(new f({
name: "ocspBasic"
}));
g.push(new c({
hex: i.getEncodedHex()
}));
var h = new a({
array: g
});
return h.getEncodedHex();
};
if (e !== undefined) {
this.setByParam(e);
}
};
YAHOO.lang.extend(KJUR.asn1.ocsp.ResponseBytes, KJUR.asn1.ASN1Object);
KJUR.asn1.ocsp.BasicOCSPResponse = function (d) {
KJUR.asn1.ocsp.BasicOCSPResponse.superclass.constructor.call(this);
var i = Error,
g = KJUR.asn1,
j = g.ASN1Object,
e = g.DERSequence,
f = g.DERGeneralizedTime,
c = g.DERTaggedObject,
b = g.DERBitString,
h = g.x509.Extensions,
k = g.x509.AlgorithmIdentifier,
l = g.ocsp,
a = l.ResponderID;
_SingleResponseList = l.SingleResponseList, _ResponseData = l.ResponseData;
this.params = null;
this.setByParam = function (m) {
this.params = m;
};
this.sign = function () {
var o = this.params;
var m = o.tbsresp.getEncodedHex();
var n = new KJUR.crypto.Signature({
alg: o.sigalg
});
n.init(o.reskey);
n.updateHex(m);
o.sighex = n.sign();
};
this.getEncodedHex = function () {
var t = this.params;
if (t.tbsresp == undefined) {
t.tbsresp = new _ResponseData(t);
}
if (t.sighex == undefined && t.reskey != undefined) {
this.sign();
}
var n = [];
n.push(t.tbsresp);
n.push(new k({
name: t.sigalg
}));
n.push(new b({
hex: "00" + t.sighex
}));
if (t.certs != undefined && t.certs.length != undefined) {
var m = [];
for (var q = 0; q < t.certs.length; q++) {
var s = t.certs[q];
var r = null;
if (ASN1HEX.isASN1HEX(s)) {
r = s;
} else {
if (s.match(/-----BEGIN/)) {
r = pemtohex(s);
} else {
throw new i("certs[" + q + "] not hex or PEM");
}
}
m.push(new j({
tlv: r
}));
}
var p = new e({
array: m
});
n.push(new c({
tag: "a0",
explicit: true,
obj: p
}));
}
var o = new e({
array: n
});
return o.getEncodedHex();
};
if (d !== undefined) {
this.setByParam(d);
}
};
YAHOO.lang.extend(KJUR.asn1.ocsp.BasicOCSPResponse, KJUR.asn1.ASN1Object);
KJUR.asn1.ocsp.ResponseData = function (c) {
KJUR.asn1.ocsp.ResponseData.superclass.constructor.call(this);
var h = Error,
f = KJUR.asn1,
d = f.DERSequence,
e = f.DERGeneralizedTime,
b = f.DERTaggedObject,
g = f.x509.Extensions,
i = f.ocsp,
a = i.ResponderID;
_SingleResponseList = i.SingleResponseList;
this.params = null;
this.getEncodedHex = function () {
var m = this.params;
if (m.respid != undefined) {
new h("respid not specified");
}
if (m.prodat != undefined) {
new h("prodat not specified");
}
if (m.array != undefined) {
new h("array not specified");
}
var j = [];
j.push(new a(m.respid));
j.push(new e(m.prodat));
j.push(new _SingleResponseList(m.array));
if (m.ext != undefined) {
var l = new g(m.ext);
j.push(new b({
tag: "a1",
explicit: true,
obj: l
}));
}
var k = new d({
array: j
});
return k.getEncodedHex();
};
this.setByParam = function (j) {
this.params = j;
};
if (c !== undefined) {
this.setByParam(c);
}
};
YAHOO.lang.extend(KJUR.asn1.ocsp.ResponseData, KJUR.asn1.ASN1Object);
KJUR.asn1.ocsp.ResponderID = function (d) {
KJUR.asn1.ocsp.ResponderID.superclass.constructor.call(this);
var b = KJUR.asn1,
a = b.ASN1Util.newObject,
c = b.x509.X500Name;
this.params = null;
this.getEncodedHex = function () {
var f = this.params;
if (f.key != undefined) {
var e = a({
tag: {
tag: "a2",
explicit: true,
obj: {
octstr: {
hex: f.key
}
}
}
});
return e.getEncodedHex();
} else {
if (f.name != undefined) {
var e = a({
tag: {
tag: "a1",
explicit: true,
obj: new c(f.name)
}
});
return e.getEncodedHex();
}
}
throw new Error("key or name not specified");
};
this.setByParam = function (e) {
this.params = e;
};
if (d !== undefined) {
this.setByParam(d);
}
};
YAHOO.lang.extend(KJUR.asn1.ocsp.ResponderID, KJUR.asn1.ASN1Object);
KJUR.asn1.ocsp.SingleResponseList = function (d) {
KJUR.asn1.ocsp.SingleResponseList.superclass.constructor.call(this);
var c = KJUR.asn1,
b = c.DERSequence,
a = c.ocsp.SingleResponse;
this.params = null;
this.getEncodedHex = function () {
var h = this.params;
if (_typeof(h) != "object" || h.length == undefined) {
throw new Error("params not specified properly");
}
var e = [];
for (var g = 0; g < h.length; g++) {
e.push(new a(h[g]));
}
var f = new b({
array: e
});
return f.getEncodedHex();
};
this.setByParam = function (e) {
this.params = e;
};
if (d !== undefined) {
this.setByParam(d);
}
};
YAHOO.lang.extend(KJUR.asn1.ocsp.SingleResponseList, KJUR.asn1.ASN1Object);
KJUR.asn1.ocsp.SingleResponse = function (e) {
var k = Error,
a = KJUR,
i = a.asn1,
f = i.DERSequence,
g = i.DERGeneralizedTime,
b = i.DERTaggedObject,
l = i.ocsp,
h = l.CertID,
c = l.CertStatus,
d = i.x509,
j = d.Extensions;
l.SingleResponse.superclass.constructor.call(this);
this.params = null;
this.getEncodedHex = function () {
var q = this.params;
var n = [];
if (q.certid == undefined) {
throw new k("certid unspecified");
}
if (q.status == undefined) {
throw new k("status unspecified");
}
if (q.thisupdate == undefined) {
throw new k("thisupdate unspecified");
}
n.push(new h(q.certid));
n.push(new c(q.status));
n.push(new g(q.thisupdate));
if (q.nextupdate != undefined) {
var m = new g(q.nextupdate);
n.push(new b({
tag: "a0",
explicit: true,
obj: m
}));
}
if (q.ext != undefined) {
var p = new j(q.ext);
n.push(new b({
tag: "a1",
explicit: true,
obj: p
}));
}
var o = new f({
array: n
});
return o.getEncodedHex();
};
this.setByParam = function (m) {
this.params = m;
};
if (e !== undefined) {
this.setByParam(e);
}
};
YAHOO.lang.extend(KJUR.asn1.ocsp.SingleResponse, KJUR.asn1.ASN1Object);
KJUR.asn1.ocsp.CertID = function (g) {
var d = KJUR,
k = d.asn1,
m = k.DEROctetString,
j = k.DERInteger,
h = k.DERSequence,
f = k.x509,
n = f.AlgorithmIdentifier,
o = k.ocsp,
l = o.DEFAULT_HASH,
i = d.crypto,
e = i.Util.hashHex,
c = X509,
q = ASN1HEX;
o.CertID.superclass.constructor.call(this);
this.dHashAlg = null;
this.dIssuerNameHash = null;
this.dIssuerKeyHash = null;
this.dSerialNumber = null;
this.setByValue = function (t, s, p, r) {
if (r === undefined) {
r = l;
}
this.dHashAlg = new n({
name: r
});
this.dIssuerNameHash = new m({
hex: t
});
this.dIssuerKeyHash = new m({
hex: s
});
this.dSerialNumber = new j({
hex: p
});
};
this.setByCert = function (x, t, v) {
if (v === undefined) {
v = l;
}
var p = new c();
p.readCertPEM(t);
var y = new c();
y.readCertPEM(x);
var z = y.getPublicKeyHex();
var w = q.getTLVbyList(z, 0, [1, 0], "30");
var r = p.getSerialNumberHex();
var s = e(y.getSubjectHex(), v);
var u = e(w, v);
this.setByValue(s, u, r, v);
this.hoge = p.getSerialNumberHex();
};
this.getEncodedHex = function () {
if (this.dHashAlg === null && this.dIssuerNameHash === null && this.dIssuerKeyHash === null && this.dSerialNumber === null) {
throw "not yet set values";
}
var p = [this.dHashAlg, this.dIssuerNameHash, this.dIssuerKeyHash, this.dSerialNumber];
var r = new h({
array: p
});
this.hTLV = r.getEncodedHex();
return this.hTLV;
};
if (g !== undefined) {
var b = g;
if (b.issuerCert !== undefined && b.subjectCert !== undefined) {
var a = l;
if (b.alg === undefined) {
a = undefined;
}
this.setByCert(b.issuerCert, b.subjectCert, a);
} else {
if (b.issname !== undefined && b.isskey !== undefined && b.sbjsn !== undefined) {
var a = l;
if (b.alg === undefined) {
a = undefined;
}
this.setByValue(b.issname, b.isskey, b.sbjsn, a);
} else {
throw new Error("invalid constructor arguments");
}
}
}
};
YAHOO.lang.extend(KJUR.asn1.ocsp.CertID, KJUR.asn1.ASN1Object);
KJUR.asn1.ocsp.CertStatus = function (a) {
KJUR.asn1.ocsp.CertStatus.superclass.constructor.call(this);
this.params = null;
this.getEncodedHex = function () {
var d = this.params;
if (d.status == "good") {
return "8000";
}
if (d.status == "unknown") {
return "8200";
}
if (d.status == "revoked") {
var c = [{
gentime: {
str: d.time
}
}];
if (d.reason != undefined) {
c.push({
tag: {
tag: "a0",
explicit: true,
obj: {
"enum": {
"int": d.reason
}
}
}
});
}
var b = {
tag: "a1",
explicit: false,
obj: {
seq: c
}
};
return KJUR.asn1.ASN1Util.newObject({
tag: b
}).getEncodedHex();
}
throw new Error("bad status");
};
this.setByParam = function (b) {
this.params = b;
};
if (a !== undefined) {
this.setByParam(a);
}
};
YAHOO.lang.extend(KJUR.asn1.ocsp.CertStatus, KJUR.asn1.ASN1Object);
KJUR.asn1.ocsp.Request = function (f) {
var c = KJUR,
b = c.asn1,
a = b.DERSequence,
d = b.ocsp;
d.Request.superclass.constructor.call(this);
this.dReqCert = null;
this.dExt = null;
this.getEncodedHex = function () {
var g = [];
if (this.dReqCert === null) {
throw "reqCert not set";
}
g.push(this.dReqCert);
var h = new a({
array: g
});
this.hTLV = h.getEncodedHex();
return this.hTLV;
};
if (typeof f !== "undefined") {
var e = new d.CertID(f);
this.dReqCert = e;
}
};
YAHOO.lang.extend(KJUR.asn1.ocsp.Request, KJUR.asn1.ASN1Object);
KJUR.asn1.ocsp.TBSRequest = function (e) {
var c = KJUR,
b = c.asn1,
a = b.DERSequence,
d = b.ocsp;
d.TBSRequest.superclass.constructor.call(this);
this.version = 0;
this.dRequestorName = null;
this.dRequestList = [];
this.dRequestExt = null;
this.setRequestListByParam = function (h) {
var f = [];
for (var g = 0; g < h.length; g++) {
var j = new d.Request(h[0]);
f.push(j);
}
this.dRequestList = f;
};
this.getEncodedHex = function () {
var f = [];
if (this.version !== 0) {
throw "not supported version: " + this.version;
}
if (this.dRequestorName !== null) {
throw "requestorName not supported";
}
var h = new a({
array: this.dRequestList
});
f.push(h);
if (this.dRequestExt !== null) {
throw "requestExtensions not supported";
}
var g = new a({
array: f
});
this.hTLV = g.getEncodedHex();
return this.hTLV;
};
if (e !== undefined) {
if (e.reqList !== undefined) {
this.setRequestListByParam(e.reqList);
}
}
};
YAHOO.lang.extend(KJUR.asn1.ocsp.TBSRequest, KJUR.asn1.ASN1Object);
KJUR.asn1.ocsp.OCSPRequest = function (f) {
var c = KJUR,
b = c.asn1,
a = b.DERSequence,
d = b.ocsp;
d.OCSPRequest.superclass.constructor.call(this);
this.dTbsRequest = null;
this.dOptionalSignature = null;
this.getEncodedHex = function () {
var g = [];
if (this.dTbsRequest !== null) {
g.push(this.dTbsRequest);
} else {
throw "tbsRequest not set";
}
if (this.dOptionalSignature !== null) {
throw "optionalSignature not supported";
}
var h = new a({
array: g
});
this.hTLV = h.getEncodedHex();
return this.hTLV;
};
if (f !== undefined) {
if (f.reqList !== undefined) {
var e = new d.TBSRequest(f);
this.dTbsRequest = e;
}
}
};
YAHOO.lang.extend(KJUR.asn1.ocsp.OCSPRequest, KJUR.asn1.ASN1Object);
KJUR.asn1.ocsp.OCSPUtil = {};
KJUR.asn1.ocsp.OCSPUtil.getRequestHex = function (a, b, h) {
var d = KJUR,
c = d.asn1,
e = c.ocsp;
if (h === undefined) {
h = e.DEFAULT_HASH;
}
var g = {
alg: h,
issuerCert: a,
subjectCert: b
};
var f = new e.OCSPRequest({
reqList: [g]
});
return f.getEncodedHex();
};
KJUR.asn1.ocsp.OCSPUtil.getOCSPResponseInfo = function (b) {
var m = ASN1HEX,
c = m.getVbyList,
k = m.getVbyListEx,
e = m.getIdxbyList,
d = m.getIdxbyListEx,
g = m.getV;
var n = {};
try {
var j = k(b, 0, [0], "0a");
n.responseStatus = parseInt(j, 16);
} catch (f) {}
if (n.responseStatus !== 0) {
return n;
}
try {
var i = e(b, 0, [1, 0, 1, 0, 0, 2, 0, 1]);
if (b.substr(i, 2) === "80") {
n.certStatus = "good";
} else {
if (b.substr(i, 2) === "a1") {
n.certStatus = "revoked";
n.revocationTime = hextoutf8(c(b, i, [0]));
} else {
if (b.substr(i, 2) === "82") {
n.certStatus = "unknown";
}
}
}
} catch (f) {}
try {
var a = e(b, 0, [1, 0, 1, 0, 0, 2, 0, 2]);
n.thisUpdate = hextoutf8(g(b, a));
} catch (f) {}
try {
var l = e(b, 0, [1, 0, 1, 0, 0, 2, 0, 3]);
if (b.substr(l, 2) === "a0") {
n.nextUpdate = hextoutf8(c(b, l, [0]));
}
} catch (f) {}
return n;
};
KJUR.asn1.ocsp.OCSPParser = function () {
var e = Error,
a = X509,
f = new a(),
i = ASN1HEX,
g = i.getV,
b = i.getTLV,
d = i.getIdxbyList,
c = i.getTLVbyListEx,
h = i.getChildIdx;
this.getOCSPRequest = function (l) {
var k = h(l, 0);
if (k.length != 1 && k.length != 2) {
throw new e("wrong number elements: " + k.length);
}
var j = this.getTBSRequest(b(l, k[0]));
return j;
};
this.getTBSRequest = function (l) {
var j = {};
var k = c(l, 0, [0], "30");
j.array = this.getRequestList(k);
var m = c(l, 0, ["[2]", 0], "30");
if (m != null) {
j.ext = f.getExtParamArray(m);
}
return j;
};
this.getRequestList = function (m) {
var j = [];
var k = h(m, 0);
for (var l = 0; l < k.length; l++) {
var m = b(m, k[l]);
j.push(this.getRequest(m));
}
return j;
};
this.getRequest = function (k) {
var j = h(k, 0);
if (j.length != 1 && j.length != 2) {
throw new e("wrong number elements: " + j.length);
}
var m = this.getCertID(b(k, j[0]));
if (j.length == 2) {
var l = d(k, 0, [1, 0]);
m.ext = f.getExtParamArray(b(k, l));
}
return m;
};
this.getCertID = function (m) {
var l = h(m, 0);
if (l.length != 4) {
throw new e("wrong number elements: " + l.length);
}
var k = new a();
var j = {};
j.alg = k.getAlgorithmIdentifierName(b(m, l[0]));
j.issname = g(m, l[1]);
j.isskey = g(m, l[2]);
j.sbjsn = g(m, l[3]);
return j;
};
};
var KJUR;
if (typeof KJUR == "undefined" || !KJUR) {
KJUR = {};
}
if (typeof KJUR.lang == "undefined" || !KJUR.lang) {
KJUR.lang = {};
}
KJUR.lang.String = function () {};
function Base64x() {}
function stoBA(d) {
var b = new Array();
for (var c = 0; c < d.length; c++) {
b[c] = d.charCodeAt(c);
}
return b;
}
function BAtos(b) {
var d = "";
for (var c = 0; c < b.length; c++) {
d = d + String.fromCharCode(b[c]);
}
return d;
}
function BAtohex(b) {
var e = "";
for (var d = 0; d < b.length; d++) {
var c = b[d].toString(16);
if (c.length == 1) {
c = "0" + c;
}
e = e + c;
}
return e;
}
function stohex(a) {
return BAtohex(stoBA(a));
}
function stob64(a) {
return hex2b64(stohex(a));
}
function stob64u(a) {
return b64tob64u(hex2b64(stohex(a)));
}
function b64utos(a) {
return BAtos(b64toBA(b64utob64(a)));
}
function b64tob64u(a) {
a = a.replace(/\=/g, "");
a = a.replace(/\+/g, "-");
a = a.replace(/\//g, "_");
return a;
}
function b64utob64(a) {
if (a.length % 4 == 2) {
a = a + "==";
} else {
if (a.length % 4 == 3) {
a = a + "=";
}
}
a = a.replace(/-/g, "+");
a = a.replace(/_/g, "/");
return a;
}
function hextob64u(a) {
if (a.length % 2 == 1) {
a = "0" + a;
}
return b64tob64u(hex2b64(a));
}
function b64utohex(a) {
return b64tohex(b64utob64(a));
}
var utf8tob64u, b64utoutf8;
if (typeof Buffer === "function") {
utf8tob64u = function utf8tob64u(a) {
return b64tob64u(new Buffer(a, "utf8").toString("base64"));
};
b64utoutf8 = function b64utoutf8(a) {
return new Buffer(b64utob64(a), "base64").toString("utf8");
};
} else {
utf8tob64u = function utf8tob64u(a) {
return hextob64u(uricmptohex(encodeURIComponentAll(a)));
};
b64utoutf8 = function b64utoutf8(a) {
return decodeURIComponent(hextouricmp(b64utohex(a)));
};
}
function utf8tob64(a) {
return hex2b64(uricmptohex(encodeURIComponentAll(a)));
}
function b64toutf8(a) {
return decodeURIComponent(hextouricmp(b64tohex(a)));
}
function utf8tohex(a) {
return uricmptohex(encodeURIComponentAll(a));
}
function hextoutf8(a) {
return decodeURIComponent(hextouricmp(a));
}
function hextorstr(c) {
var b = "";
for (var a = 0; a < c.length - 1; a += 2) {
b += String.fromCharCode(parseInt(c.substr(a, 2), 16));
}
return b;
}
function rstrtohex(c) {
var a = "";
for (var b = 0; b < c.length; b++) {
a += ("0" + c.charCodeAt(b).toString(16)).slice(-2);
}
return a;
}
function hextob64(a) {
return hex2b64(a);
}
function hextob64nl(b) {
var a = hextob64(b);
var c = a.replace(/(.{64})/g, "$1\r\n");
c = c.replace(/\r\n$/, "");
return c;
}
function b64nltohex(b) {
var a = b.replace(/[^0-9A-Za-z\/+=]*/g, "");
var c = b64tohex(a);
return c;
}
function hextopem(a, b) {
var c = hextob64nl(a);
return "-----BEGIN " + b + "-----\r\n" + c + "\r\n-----END " + b + "-----\r\n";
}
function pemtohex(a, b) {
if (a.indexOf("-----BEGIN ") == -1) {
throw "can't find PEM header: " + b;
}
if (b !== undefined) {
a = a.replace(new RegExp("^[^]*-----BEGIN " + b + "-----"), "");
a = a.replace(new RegExp("-----END " + b + "-----[^]*$"), "");
} else {
a = a.replace(/^[^]*-----BEGIN [^-]+-----/, "");
a = a.replace(/-----END [^-]+-----[^]*$/, "");
}
return b64nltohex(a);
}
function hextoArrayBuffer(d) {
if (d.length % 2 != 0) {
throw "input is not even length";
}
if (d.match(/^[0-9A-Fa-f]+$/) == null) {
throw "input is not hexadecimal";
}
var b = new ArrayBuffer(d.length / 2);
var a = new DataView(b);
for (var c = 0; c < d.length / 2; c++) {
a.setUint8(c, parseInt(d.substr(c * 2, 2), 16));
}
return b;
}
function ArrayBuffertohex(b) {
var d = "";
var a = new DataView(b);
for (var c = 0; c < b.byteLength; c++) {
d += ("00" + a.getUint8(c).toString(16)).slice(-2);
}
return d;
}
function zulutomsec(n) {
var l, j, m, e, f, i, b, k;
var a, h, g, c;
c = n.match(/^(\d{2}|\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(|\.\d+)Z$/);
if (c) {
a = c[1];
l = parseInt(a);
if (a.length === 2) {
if (50 <= l && l < 100) {
l = 1900 + l;
} else {
if (0 <= l && l < 50) {
l = 2000 + l;
}
}
}
j = parseInt(c[2]) - 1;
m = parseInt(c[3]);
e = parseInt(c[4]);
f = parseInt(c[5]);
i = parseInt(c[6]);
b = 0;
h = c[7];
if (h !== "") {
g = (h.substr(1) + "00").substr(0, 3);
b = parseInt(g);
}
return Date.UTC(l, j, m, e, f, i, b);
}
throw "unsupported zulu format: " + n;
}
function zulutosec(a) {
var b = zulutomsec(a);
return ~~(b / 1000);
}
function zulutodate(a) {
return new Date(zulutomsec(a));
}
function datetozulu(g, e, f) {
var b;
var a = g.getUTCFullYear();
if (e) {
if (a < 1950 || 2049 < a) {
throw "not proper year for UTCTime: " + a;
}
b = ("" + a).slice(-2);
} else {
b = ("000" + a).slice(-4);
}
b += ("0" + (g.getUTCMonth() + 1)).slice(-2);
b += ("0" + g.getUTCDate()).slice(-2);
b += ("0" + g.getUTCHours()).slice(-2);
b += ("0" + g.getUTCMinutes()).slice(-2);
b += ("0" + g.getUTCSeconds()).slice(-2);
if (f) {
var c = g.getUTCMilliseconds();
if (c !== 0) {
c = ("00" + c).slice(-3);
c = c.replace(/0+$/g, "");
b += "." + c;
}
}
b += "Z";
return b;
}
function uricmptohex(a) {
return a.replace(/%/g, "");
}
function hextouricmp(a) {
return a.replace(/(..)/g, "%$1");
}
function ipv6tohex(g) {
var b = "malformed IPv6 address";
if (!g.match(/^[0-9A-Fa-f:]+$/)) {
throw b;
}
g = g.toLowerCase();
var d = g.split(":").length - 1;
if (d < 2) {
throw b;
}
var e = ":".repeat(7 - d + 2);
g = g.replace("::", e);
var c = g.split(":");
if (c.length != 8) {
throw b;
}
for (var f = 0; f < 8; f++) {
c[f] = ("0000" + c[f]).slice(-4);
}
return c.join("");
}
function hextoipv6(e) {
if (!e.match(/^[0-9A-Fa-f]{32}$/)) {
throw "malformed IPv6 address octet";
}
e = e.toLowerCase();
var b = e.match(/.{1,4}/g);
for (var d = 0; d < 8; d++) {
b[d] = b[d].replace(/^0+/, "");
if (b[d] == "") {
b[d] = "0";
}
}
e = ":" + b.join(":") + ":";
var c = e.match(/:(0:){2,}/g);
if (c === null) {
return e.slice(1, -1);
}
var f = "";
for (var d = 0; d < c.length; d++) {
if (c[d].length > f.length) {
f = c[d];
}
}
e = e.replace(f, "::");
return e.slice(1, -1);
}
function hextoip(b) {
var d = "malformed hex value";
if (!b.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/)) {
throw d;
}
if (b.length == 8) {
var c;
try {
c = parseInt(b.substr(0, 2), 16) + "." + parseInt(b.substr(2, 2), 16) + "." + parseInt(b.substr(4, 2), 16) + "." + parseInt(b.substr(6, 2), 16);
return c;
} catch (a) {
throw d;
}
} else {
if (b.length == 32) {
return hextoipv6(b);
} else {
return b;
}
}
}
function iptohex(f) {
var j = "malformed IP address";
f = f.toLowerCase(f);
if (f.match(/^[0-9.]+$/)) {
var b = f.split(".");
if (b.length !== 4) {
throw j;
}
var g = "";
try {
for (var e = 0; e < 4; e++) {
var h = parseInt(b[e]);
g += ("0" + h.toString(16)).slice(-2);
}
return g;
} catch (c) {
throw j;
}
} else {
if (f.match(/^[0-9a-f:]+$/) && f.indexOf(":") !== -1) {
return ipv6tohex(f);
} else {
throw j;
}
}
}
function encodeURIComponentAll(a) {
var d = encodeURIComponent(a);
var b = "";
for (var c = 0; c < d.length; c++) {
if (d[c] == "%") {
b = b + d.substr(c, 3);
c = c + 2;
} else {
b = b + "%" + stohex(d[c]);
}
}
return b;
}
function newline_toUnix(a) {
a = a.replace(/\r\n/mg, "\n");
return a;
}
function newline_toDos(a) {
a = a.replace(/\r\n/mg, "\n");
a = a.replace(/\n/mg, "\r\n");
return a;
}
KJUR.lang.String.isInteger = function (a) {
if (a.match(/^[0-9]+$/)) {
return true;
} else {
if (a.match(/^-[0-9]+$/)) {
return true;
} else {
return false;
}
}
};
KJUR.lang.String.isHex = function (a) {
if (a.length % 2 == 0 && (a.match(/^[0-9a-f]+$/) || a.match(/^[0-9A-F]+$/))) {
return true;
} else {
return false;
}
};
KJUR.lang.String.isBase64 = function (a) {
a = a.replace(/\s+/g, "");
if (a.match(/^[0-9A-Za-z+\/]+={0,3}$/) && a.length % 4 == 0) {
return true;
} else {
return false;
}
};
KJUR.lang.String.isBase64URL = function (a) {
if (a.match(/[+/=]/)) {
return false;
}
a = b64utob64(a);
return KJUR.lang.String.isBase64(a);
};
KJUR.lang.String.isIntegerArray = function (a) {
a = a.replace(/\s+/g, "");
if (a.match(/^\[[0-9,]+\]$/)) {
return true;
} else {
return false;
}
};
KJUR.lang.String.isPrintable = function (a) {
if (a.match(/^[0-9A-Za-z '()+,-./:=?]*$/) !== null) {
return true;
}
return false;
};
KJUR.lang.String.isIA5 = function (a) {
if (a.match(/^[\x20-\x21\x23-\x7f]*$/) !== null) {
return true;
}
return false;
};
KJUR.lang.String.isMail = function (a) {
if (a.match(/^[A-Za-z0-9]{1}[A-Za-z0-9_.-]*@{1}[A-Za-z0-9_.-]{1,}\.[A-Za-z0-9]{1,}$/) !== null) {
return true;
}
return false;
};
function hextoposhex(a) {
if (a.length % 2 == 1) {
return "0" + a;
}
if (a.substr(0, 1) > "7") {
return "00" + a;
}
return a;
}
function intarystrtohex(b) {
b = b.replace(/^\s*\[\s*/, "");
b = b.replace(/\s*\]\s*$/, "");
b = b.replace(/\s*/g, "");
try {
var c = b.split(/,/).map(function (g, e, h) {
var f = parseInt(g);
if (f < 0 || 255 < f) {
throw "integer not in range 0-255";
}
var d = ("00" + f.toString(16)).slice(-2);
return d;
}).join("");
return c;
} catch (a) {
throw "malformed integer array string: " + a;
}
}
var strdiffidx = function strdiffidx(c, a) {
var d = c.length;
if (c.length > a.length) {
d = a.length;
}
for (var b = 0; b < d; b++) {
if (c.charCodeAt(b) != a.charCodeAt(b)) {
return b;
}
}
if (c.length != a.length) {
return d;
}
return -1;
};
if (typeof KJUR == "undefined" || !KJUR) {
KJUR = {};
}
if (typeof KJUR.crypto == "undefined" || !KJUR.crypto) {
KJUR.crypto = {};
}
KJUR.crypto.Util = new function () {
this.DIGESTINFOHEAD = {
sha1: "3021300906052b0e03021a05000414",
sha224: "302d300d06096086480165030402040500041c",
sha256: "3031300d060960864801650304020105000420",
sha384: "3041300d060960864801650304020205000430",
sha512: "3051300d060960864801650304020305000440",
md2: "3020300c06082a864886f70d020205000410",
md5: "3020300c06082a864886f70d020505000410",
ripemd160: "3021300906052b2403020105000414"
};
this.DEFAULTPROVIDER = {
md5: "cryptojs",
sha1: "cryptojs",
sha224: "cryptojs",
sha256: "cryptojs",
sha384: "cryptojs",
sha512: "cryptojs",
ripemd160: "cryptojs",
hmacmd5: "cryptojs",
hmacsha1: "cryptojs",
hmacsha224: "cryptojs",
hmacsha256: "cryptojs",
hmacsha384: "cryptojs",
hmacsha512: "cryptojs",
hmacripemd160: "cryptojs",
MD5withRSA: "cryptojs/jsrsa",
SHA1withRSA: "cryptojs/jsrsa",
SHA224withRSA: "cryptojs/jsrsa",
SHA256withRSA: "cryptojs/jsrsa",
SHA384withRSA: "cryptojs/jsrsa",
SHA512withRSA: "cryptojs/jsrsa",
RIPEMD160withRSA: "cryptojs/jsrsa",
MD5withECDSA: "cryptojs/jsrsa",
SHA1withECDSA: "cryptojs/jsrsa",
SHA224withECDSA: "cryptojs/jsrsa",
SHA256withECDSA: "cryptojs/jsrsa",
SHA384withECDSA: "cryptojs/jsrsa",
SHA512withECDSA: "cryptojs/jsrsa",
RIPEMD160withECDSA: "cryptojs/jsrsa",
SHA1withDSA: "cryptojs/jsrsa",
SHA224withDSA: "cryptojs/jsrsa",
SHA256withDSA: "cryptojs/jsrsa",
MD5withRSAandMGF1: "cryptojs/jsrsa",
SHAwithRSAandMGF1: "cryptojs/jsrsa",
SHA1withRSAandMGF1: "cryptojs/jsrsa",
SHA224withRSAandMGF1: "cryptojs/jsrsa",
SHA256withRSAandMGF1: "cryptojs/jsrsa",
SHA384withRSAandMGF1: "cryptojs/jsrsa",
SHA512withRSAandMGF1: "cryptojs/jsrsa",
RIPEMD160withRSAandMGF1: "cryptojs/jsrsa"
};
this.CRYPTOJSMESSAGEDIGESTNAME = {
md5: CryptoJS.algo.MD5,
sha1: CryptoJS.algo.SHA1,
sha224: CryptoJS.algo.SHA224,
sha256: CryptoJS.algo.SHA256,
sha384: CryptoJS.algo.SHA384,
sha512: CryptoJS.algo.SHA512,
ripemd160: CryptoJS.algo.RIPEMD160
};
this.getDigestInfoHex = function (a, b) {
if (typeof this.DIGESTINFOHEAD[b] == "undefined") {
throw "alg not supported in Util.DIGESTINFOHEAD: " + b;
}
return this.DIGESTINFOHEAD[b] + a;
};
this.getPaddedDigestInfoHex = function (h, a, j) {
var c = this.getDigestInfoHex(h, a);
var d = j / 4;
if (c.length + 22 > d) {
throw "key is too short for SigAlg: keylen=" + j + "," + a;
}
var b = "0001";
var k = "00" + c;
var g = "";
var l = d - b.length - k.length;
for (var f = 0; f < l; f += 2) {
g += "ff";
}
var e = b + g + k;
return e;
};
this.hashString = function (a, c) {
var b = new KJUR.crypto.MessageDigest({
alg: c
});
return b.digestString(a);
};
this.hashHex = function (b, c) {
var a = new KJUR.crypto.MessageDigest({
alg: c
});
return a.digestHex(b);
};
this.sha1 = function (a) {
return this.hashString(a, "sha1");
};
this.sha256 = function (a) {
return this.hashString(a, "sha256");
};
this.sha256Hex = function (a) {
return this.hashHex(a, "sha256");
};
this.sha512 = function (a) {
return this.hashString(a, "sha512");
};
this.sha512Hex = function (a) {
return this.hashHex(a, "sha512");
};
this.isKey = function (a) {
if (a instanceof RSAKey || a instanceof KJUR.crypto.DSA || a instanceof KJUR.crypto.ECDSA) {
return true;
} else {
return false;
}
};
}();
KJUR.crypto.Util.md5 = function (a) {
var b = new KJUR.crypto.MessageDigest({
alg: "md5",
prov: "cryptojs"
});
return b.digestString(a);
};
KJUR.crypto.Util.ripemd160 = function (a) {
var b = new KJUR.crypto.MessageDigest({
alg: "ripemd160",
prov: "cryptojs"
});
return b.digestString(a);
};
KJUR.crypto.Util.SECURERANDOMGEN = new SecureRandom();
KJUR.crypto.Util.getRandomHexOfNbytes = function (b) {
var a = new Array(b);
KJUR.crypto.Util.SECURERANDOMGEN.nextBytes(a);
return BAtohex(a);
};
KJUR.crypto.Util.getRandomBigIntegerOfNbytes = function (a) {
return new BigInteger(KJUR.crypto.Util.getRandomHexOfNbytes(a), 16);
};
KJUR.crypto.Util.getRandomHexOfNbits = function (d) {
var c = d % 8;
var a = (d - c) / 8;
var b = new Array(a + 1);
KJUR.crypto.Util.SECURERANDOMGEN.nextBytes(b);
b[0] = (255 << c & 255 ^ 255) & b[0];
return BAtohex(b);
};
KJUR.crypto.Util.getRandomBigIntegerOfNbits = function (a) {
return new BigInteger(KJUR.crypto.Util.getRandomHexOfNbits(a), 16);
};
KJUR.crypto.Util.getRandomBigIntegerZeroToMax = function (b) {
var a = b.bitLength();
while (1) {
var c = KJUR.crypto.Util.getRandomBigIntegerOfNbits(a);
if (b.compareTo(c) != -1) {
return c;
}
}
};
KJUR.crypto.Util.getRandomBigIntegerMinToMax = function (e, b) {
var c = e.compareTo(b);
if (c == 1) {
throw "biMin is greater than biMax";
}
if (c == 0) {
return e;
}
var a = b.subtract(e);
var d = KJUR.crypto.Util.getRandomBigIntegerZeroToMax(a);
return d.add(e);
};
KJUR.crypto.MessageDigest = function (c) {
var b = null;
var a = null;
var d = null;
this.setAlgAndProvider = function (g, f) {
g = KJUR.crypto.MessageDigest.getCanonicalAlgName(g);
if (g !== null && f === undefined) {
f = KJUR.crypto.Util.DEFAULTPROVIDER[g];
}
if (":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(g) != -1 && f == "cryptojs") {
try {
this.md = KJUR.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[g].create();
} catch (e) {
throw "setAlgAndProvider hash alg set fail alg=" + g + "/" + e;
}
this.updateString = function (h) {
this.md.update(h);
};
this.updateHex = function (h) {
var i = CryptoJS.enc.Hex.parse(h);
this.md.update(i);
};
this.digest = function () {
var h = this.md.finalize();
return h.toString(CryptoJS.enc.Hex);
};
this.digestString = function (h) {
this.updateString(h);
return this.digest();
};
this.digestHex = function (h) {
this.updateHex(h);
return this.digest();
};
}
if (":sha256:".indexOf(g) != -1 && f == "sjcl") {
try {
this.md = new sjcl.hash.sha256();
} catch (e) {
throw "setAlgAndProvider hash alg set fail alg=" + g + "/" + e;
}
this.updateString = function (h) {
this.md.update(h);
};
this.updateHex = function (i) {
var h = sjcl.codec.hex.toBits(i);
this.md.update(h);
};
this.digest = function () {
var h = this.md.finalize();
return sjcl.codec.hex.fromBits(h);
};
this.digestString = function (h) {
this.updateString(h);
return this.digest();
};
this.digestHex = function (h) {
this.updateHex(h);
return this.digest();
};
}
};
this.updateString = function (e) {
throw "updateString(str) not supported for this alg/prov: " + this.algName + "/" + this.provName;
};
this.updateHex = function (e) {
throw "updateHex(hex) not supported for this alg/prov: " + this.algName + "/" + this.provName;
};
this.digest = function () {
throw "digest() not supported for this alg/prov: " + this.algName + "/" + this.provName;
};
this.digestString = function (e) {
throw "digestString(str) not supported for this alg/prov: " + this.algName + "/" + this.provName;
};
this.digestHex = function (e) {
throw "digestHex(hex) not supported for this alg/prov: " + this.algName + "/" + this.provName;
};
if (c !== undefined) {
if (c.alg !== undefined) {
this.algName = c.alg;
if (c.prov === undefined) {
this.provName = KJUR.crypto.Util.DEFAULTPROVIDER[this.algName];
}
this.setAlgAndProvider(this.algName, this.provName);
}
}
};
KJUR.crypto.MessageDigest.getCanonicalAlgName = function (a) {
if (typeof a === "string") {
a = a.toLowerCase();
a = a.replace(/-/, "");
}
return a;
};
KJUR.crypto.MessageDigest.getHashLength = function (c) {
var b = KJUR.crypto.MessageDigest;
var a = b.getCanonicalAlgName(c);
if (b.HASHLENGTH[a] === undefined) {
throw "not supported algorithm: " + c;
}
return b.HASHLENGTH[a];
};
KJUR.crypto.MessageDigest.HASHLENGTH = {
md5: 16,
sha1: 20,
sha224: 28,
sha256: 32,
sha384: 48,
sha512: 64,
ripemd160: 20
};
KJUR.crypto.Mac = function (d) {
var f = null;
var c = null;
var a = null;
var e = null;
var b = null;
this.setAlgAndProvider = function (k, i) {
k = k.toLowerCase();
if (k == null) {
k = "hmacsha1";
}
k = k.toLowerCase();
if (k.substr(0, 4) != "hmac") {
throw "setAlgAndProvider unsupported HMAC alg: " + k;
}
if (i === undefined) {
i = KJUR.crypto.Util.DEFAULTPROVIDER[k];
}
this.algProv = k + "/" + i;
var g = k.substr(4);
if (":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(g) != -1 && i == "cryptojs") {
try {
var j = KJUR.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[g];
this.mac = CryptoJS.algo.HMAC.create(j, this.pass);
} catch (h) {
throw "setAlgAndProvider hash alg set fail hashAlg=" + g + "/" + h;
}
this.updateString = function (l) {
this.mac.update(l);
};
this.updateHex = function (l) {
var m = CryptoJS.enc.Hex.parse(l);
this.mac.update(m);
};
this.doFinal = function () {
var l = this.mac.finalize();
return l.toString(CryptoJS.enc.Hex);
};
this.doFinalString = function (l) {
this.updateString(l);
return this.doFinal();
};
this.doFinalHex = function (l) {
this.updateHex(l);
return this.doFinal();
};
}
};
this.updateString = function (g) {
throw "updateString(str) not supported for this alg/prov: " + this.algProv;
};
this.updateHex = function (g) {
throw "updateHex(hex) not supported for this alg/prov: " + this.algProv;
};
this.doFinal = function () {
throw "digest() not supported for this alg/prov: " + this.algProv;
};
this.doFinalString = function (g) {
throw "digestString(str) not supported for this alg/prov: " + this.algProv;
};
this.doFinalHex = function (g) {
throw "digestHex(hex) not supported for this alg/prov: " + this.algProv;
};
this.setPassword = function (h) {
if (typeof h == "string") {
var g = h;
if (h.length % 2 == 1 || !h.match(/^[0-9A-Fa-f]+$/)) {
g = rstrtohex(h);
}
this.pass = CryptoJS.enc.Hex.parse(g);
return;
}
if (_typeof(h) != "object") {
throw "KJUR.crypto.Mac unsupported password type: " + h;
}
var g = null;
if (h.hex !== undefined) {
if (h.hex.length % 2 != 0 || !h.hex.match(/^[0-9A-Fa-f]+$/)) {
throw "Mac: wrong hex password: " + h.hex;
}
g = h.hex;
}
if (h.utf8 !== undefined) {
g = utf8tohex(h.utf8);
}
if (h.rstr !== undefined) {
g = rstrtohex(h.rstr);
}
if (h.b64 !== undefined) {
g = b64tohex(h.b64);
}
if (h.b64u !== undefined) {
g = b64utohex(h.b64u);
}
if (g == null) {
throw "KJUR.crypto.Mac unsupported password type: " + h;
}
this.pass = CryptoJS.enc.Hex.parse(g);
};
if (d !== undefined) {
if (d.pass !== undefined) {
this.setPassword(d.pass);
}
if (d.alg !== undefined) {
this.algName = d.alg;
if (d.prov === undefined) {
this.provName = KJUR.crypto.Util.DEFAULTPROVIDER[this.algName];
}
this.setAlgAndProvider(this.algName, this.provName);
}
}
};
KJUR.crypto.Signature = function (o) {
var q = null;
var n = null;
var r = null;
var c = null;
var l = null;
var d = null;
var k = null;
var h = null;
var p = null;
var e = null;
var b = -1;
var g = null;
var j = null;
var a = null;
var i = null;
var f = null;
this._setAlgNames = function () {
var s = this.algName.match(/^(.+)with(.+)$/);
if (s) {
this.mdAlgName = s[1].toLowerCase();
this.pubkeyAlgName = s[2].toLowerCase();
if (this.pubkeyAlgName == "rsaandmgf1" && this.mdAlgName == "sha") {
this.mdAlgName = "sha1";
}
}
};
this._zeroPaddingOfSignature = function (x, w) {
var v = "";
var t = w / 4 - x.length;
for (var u = 0; u < t; u++) {
v = v + "0";
}
return v + x;
};
this.setAlgAndProvider = function (u, t) {
this._setAlgNames();
if (t != "cryptojs/jsrsa") {
throw new Error("provider not supported: " + t);
}
if (":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(this.mdAlgName) != -1) {
try {
this.md = new KJUR.crypto.MessageDigest({
alg: this.mdAlgName
});
} catch (s) {
throw new Error("setAlgAndProvider hash alg set fail alg=" + this.mdAlgName + "/" + s);
}
this.init = function (w, x) {
var y = null;
try {
if (x === undefined) {
y = KEYUTIL.getKey(w);
} else {
y = KEYUTIL.getKey(w, x);
}
} catch (v) {
throw "init failed:" + v;
}
if (y.isPrivate === true) {
this.prvKey = y;
this.state = "SIGN";
} else {
if (y.isPublic === true) {
this.pubKey = y;
this.state = "VERIFY";
} else {
throw "init failed.:" + y;
}
}
};
this.updateString = function (v) {
this.md.updateString(v);
};
this.updateHex = function (v) {
this.md.updateHex(v);
};
this.sign = function () {
this.sHashHex = this.md.digest();
if (this.prvKey === undefined && this.ecprvhex !== undefined && this.eccurvename !== undefined && KJUR.crypto.ECDSA !== undefined) {
this.prvKey = new KJUR.crypto.ECDSA({
curve: this.eccurvename,
prv: this.ecprvhex
});
}
if (this.prvKey instanceof RSAKey && this.pubkeyAlgName === "rsaandmgf1") {
this.hSign = this.prvKey.signWithMessageHashPSS(this.sHashHex, this.mdAlgName, this.pssSaltLen);
} else {
if (this.prvKey instanceof RSAKey && this.pubkeyAlgName === "rsa") {
this.hSign = this.prvKey.signWithMessageHash(this.sHashHex, this.mdAlgName);
} else {
if (this.prvKey instanceof KJUR.crypto.ECDSA) {
this.hSign = this.prvKey.signWithMessageHash(this.sHashHex);
} else {
if (this.prvKey instanceof KJUR.crypto.DSA) {
this.hSign = this.prvKey.signWithMessageHash(this.sHashHex);
} else {
throw "Signature: unsupported private key alg: " + this.pubkeyAlgName;
}
}
}
}
return this.hSign;
};
this.signString = function (v) {
this.updateString(v);
return this.sign();
};
this.signHex = function (v) {
this.updateHex(v);
return this.sign();
};
this.verify = function (v) {
this.sHashHex = this.md.digest();
if (this.pubKey === undefined && this.ecpubhex !== undefined && this.eccurvename !== undefined && KJUR.crypto.ECDSA !== undefined) {
this.pubKey = new KJUR.crypto.ECDSA({
curve: this.eccurvename,
pub: this.ecpubhex
});
}
if (this.pubKey instanceof RSAKey && this.pubkeyAlgName === "rsaandmgf1") {
return this.pubKey.verifyWithMessageHashPSS(this.sHashHex, v, this.mdAlgName, this.pssSaltLen);
} else {
if (this.pubKey instanceof RSAKey && this.pubkeyAlgName === "rsa") {
return this.pubKey.verifyWithMessageHash(this.sHashHex, v);
} else {
if (KJUR.crypto.ECDSA !== undefined && this.pubKey instanceof KJUR.crypto.ECDSA) {
return this.pubKey.verifyWithMessageHash(this.sHashHex, v);
} else {
if (KJUR.crypto.DSA !== undefined && this.pubKey instanceof KJUR.crypto.DSA) {
return this.pubKey.verifyWithMessageHash(this.sHashHex, v);
} else {
throw "Signature: unsupported public key alg: " + this.pubkeyAlgName;
}
}
}
}
};
}
};
this.init = function (s, t) {
throw "init(key, pass) not supported for this alg:prov=" + this.algProvName;
};
this.updateString = function (s) {
throw "updateString(str) not supported for this alg:prov=" + this.algProvName;
};
this.updateHex = function (s) {
throw "updateHex(hex) not supported for this alg:prov=" + this.algProvName;
};
this.sign = function () {
throw "sign() not supported for this alg:prov=" + this.algProvName;
};
this.signString = function (s) {
throw "digestString(str) not supported for this alg:prov=" + this.algProvName;
};
this.signHex = function (s) {
throw "digestHex(hex) not supported for this alg:prov=" + this.algProvName;
};
this.verify = function (s) {
throw "verify(hSigVal) not supported for this alg:prov=" + this.algProvName;
};
this.initParams = o;
if (o !== undefined) {
if (o.alg !== undefined) {
this.algName = o.alg;
if (o.prov === undefined) {
this.provName = KJUR.crypto.Util.DEFAULTPROVIDER[this.algName];
} else {
this.provName = o.prov;
}
this.algProvName = this.algName + ":" + this.provName;
this.setAlgAndProvider(this.algName, this.provName);
this._setAlgNames();
}
if (o.psssaltlen !== undefined) {
this.pssSaltLen = o.psssaltlen;
}
if (o.prvkeypem !== undefined) {
if (o.prvkeypas !== undefined) {
throw "both prvkeypem and prvkeypas parameters not supported";
} else {
try {
var q = KEYUTIL.getKey(o.prvkeypem);
this.init(q);
} catch (m) {
throw "fatal error to load pem private key: " + m;
}
}
}
}
};
KJUR.crypto.Cipher = function (a) {};
KJUR.crypto.Cipher.encrypt = function (e, f, d) {
if (f instanceof RSAKey && f.isPublic) {
var c = KJUR.crypto.Cipher.getAlgByKeyAndName(f, d);
if (c === "RSA") {
return f.encrypt(e);
}
if (c === "RSAOAEP") {
return f.encryptOAEP(e, "sha1");
}
var b = c.match(/^RSAOAEP(\d+)$/);
if (b !== null) {
return f.encryptOAEP(e, "sha" + b[1]);
}
throw "Cipher.encrypt: unsupported algorithm for RSAKey: " + d;
} else {
throw "Cipher.encrypt: unsupported key or algorithm";
}
};
KJUR.crypto.Cipher.decrypt = function (e, f, d) {
if (f instanceof RSAKey && f.isPrivate) {
var c = KJUR.crypto.Cipher.getAlgByKeyAndName(f, d);
if (c === "RSA") {
return f.decrypt(e);
}
if (c === "RSAOAEP") {
return f.decryptOAEP(e, "sha1");
}
var b = c.match(/^RSAOAEP(\d+)$/);
if (b !== null) {
return f.decryptOAEP(e, "sha" + b[1]);
}
throw "Cipher.decrypt: unsupported algorithm for RSAKey: " + d;
} else {
throw "Cipher.decrypt: unsupported key or algorithm";
}
};
KJUR.crypto.Cipher.getAlgByKeyAndName = function (b, a) {
if (b instanceof RSAKey) {
if (":RSA:RSAOAEP:RSAOAEP224:RSAOAEP256:RSAOAEP384:RSAOAEP512:".indexOf(a) != -1) {
return a;
}
if (a === null || a === undefined) {
return "RSA";
}
throw "getAlgByKeyAndName: not supported algorithm name for RSAKey: " + a;
}
throw "getAlgByKeyAndName: not supported algorithm name: " + a;
};
KJUR.crypto.OID = new function () {
this.oidhex2name = {
"2a864886f70d010101": "rsaEncryption",
"2a8648ce3d0201": "ecPublicKey",
"2a8648ce380401": "dsa",
"2a8648ce3d030107": "secp256r1",
"2b8104001f": "secp192k1",
"2b81040021": "secp224r1",
"2b8104000a": "secp256k1",
"2b81040023": "secp521r1",
"2b81040022": "secp384r1",
"2a8648ce380403": "SHA1withDSA",
"608648016503040301": "SHA224withDSA",
"608648016503040302": "SHA256withDSA"
};
}();
if (typeof KJUR == "undefined" || !KJUR) {
KJUR = {};
}
if (typeof KJUR.crypto == "undefined" || !KJUR.crypto) {
KJUR.crypto = {};
}
KJUR.crypto.ECDSA = function (e) {
var g = "secp256r1";
var p = null;
var b = null;
var i = null;
var j = Error,
f = BigInteger,
h = ECPointFp,
m = KJUR.crypto.ECDSA,
c = KJUR.crypto.ECParameterDB,
d = m.getName,
q = ASN1HEX,
n = q.getVbyListEx,
k = q.isASN1HEX;
var a = new SecureRandom();
var o = null;
this.type = "EC";
this.isPrivate = false;
this.isPublic = false;
function l(x, t, w, s) {
var r = Math.max(t.bitLength(), s.bitLength());
var y = x.add2D(w);
var v = x.curve.getInfinity();
for (var u = r - 1; u >= 0; --u) {
v = v.twice2D();
v.z = f.ONE;
if (t.testBit(u)) {
if (s.testBit(u)) {
v = v.add2D(y);
} else {
v = v.add2D(x);
}
} else {
if (s.testBit(u)) {
v = v.add2D(w);
}
}
}
return v;
}
this.getBigRandom = function (r) {
return new f(r.bitLength(), a).mod(r.subtract(f.ONE)).add(f.ONE);
};
this.setNamedCurve = function (r) {
this.ecparams = c.getByName(r);
this.prvKeyHex = null;
this.pubKeyHex = null;
this.curveName = r;
};
this.setPrivateKeyHex = function (r) {
this.isPrivate = true;
this.prvKeyHex = r;
};
this.setPublicKeyHex = function (r) {
this.isPublic = true;
this.pubKeyHex = r;
};
this.getPublicKeyXYHex = function () {
var t = this.pubKeyHex;
if (t.substr(0, 2) !== "04") {
throw "this method supports uncompressed format(04) only";
}
var s = this.ecparams.keylen / 4;
if (t.length !== 2 + s * 2) {
throw "malformed public key hex length";
}
var r = {};
r.x = t.substr(2, s);
r.y = t.substr(2 + s);
return r;
};
this.getShortNISTPCurveName = function () {
var r = this.curveName;
if (r === "secp256r1" || r === "NIST P-256" || r === "P-256" || r === "prime256v1") {
return "P-256";
}
if (r === "secp384r1" || r === "NIST P-384" || r === "P-384") {
return "P-384";
}
return null;
};
this.generateKeyPairHex = function () {
var t = this.ecparams.n;
var w = this.getBigRandom(t);
var u = this.ecparams.G.multiply(w);
var z = u.getX().toBigInteger();
var x = u.getY().toBigInteger();
var r = this.ecparams.keylen / 4;
var v = ("0000000000" + w.toString(16)).slice(-r);
var A = ("0000000000" + z.toString(16)).slice(-r);
var y = ("0000000000" + x.toString(16)).slice(-r);
var s = "04" + A + y;
this.setPrivateKeyHex(v);
this.setPublicKeyHex(s);
return {
ecprvhex: v,
ecpubhex: s
};
};
this.signWithMessageHash = function (r) {
return this.signHex(r, this.prvKeyHex);
};
this.signHex = function (x, u) {
var A = new f(u, 16);
var v = this.ecparams.n;
var z = new f(x.substring(0, this.ecparams.keylen / 4), 16);
do {
var w = this.getBigRandom(v);
var B = this.ecparams.G;
var y = B.multiply(w);
var t = y.getX().toBigInteger().mod(v);
} while (t.compareTo(f.ZERO) <= 0);
var C = w.modInverse(v).multiply(z.add(A.multiply(t))).mod(v);
return m.biRSSigToASN1Sig(t, C);
};
this.sign = function (w, B) {
var z = B;
var u = this.ecparams.n;
var y = f.fromByteArrayUnsigned(w);
do {
var v = this.getBigRandom(u);
var A = this.ecparams.G;
var x = A.multiply(v);
var t = x.getX().toBigInteger().mod(u);
} while (t.compareTo(BigInteger.ZERO) <= 0);
var C = v.modInverse(u).multiply(y.add(z.multiply(t))).mod(u);
return this.serializeSig(t, C);
};
this.verifyWithMessageHash = function (s, r) {
return this.verifyHex(s, r, this.pubKeyHex);
};
this.verifyHex = function (v, y, u) {
try {
var t, B;
var w = m.parseSigHex(y);
t = w.r;
B = w.s;
var x = h.decodeFromHex(this.ecparams.curve, u);
var z = new f(v.substring(0, this.ecparams.keylen / 4), 16);
return this.verifyRaw(z, t, B, x);
} catch (A) {
return false;
}
};
this.verify = function (z, A, u) {
var w, t;
if (Bitcoin.Util.isArray(A)) {
var y = this.parseSig(A);
w = y.r;
t = y.s;
} else {
if ("object" === _typeof(A) && A.r && A.s) {
w = A.r;
t = A.s;
} else {
throw "Invalid value for signature";
}
}
var v;
if (u instanceof ECPointFp) {
v = u;
} else {
if (Bitcoin.Util.isArray(u)) {
v = h.decodeFrom(this.ecparams.curve, u);
} else {
throw "Invalid format for pubkey value, must be byte array or ECPointFp";
}
}
var x = f.fromByteArrayUnsigned(z);
return this.verifyRaw(x, w, t, v);
};
this.verifyRaw = function (z, t, E, y) {
var x = this.ecparams.n;
var D = this.ecparams.G;
if (t.compareTo(f.ONE) < 0 || t.compareTo(x) >= 0) {
return false;
}
if (E.compareTo(f.ONE) < 0 || E.compareTo(x) >= 0) {
return false;
}
var A = E.modInverse(x);
var w = z.multiply(A).mod(x);
var u = t.multiply(A).mod(x);
var B = D.multiply(w).add(y.multiply(u));
var C = B.getX().toBigInteger().mod(x);
return C.equals(t);
};
this.serializeSig = function (v, u) {
var w = v.toByteArraySigned();
var t = u.toByteArraySigned();
var x = [];
x.push(2);
x.push(w.length);
x = x.concat(w);
x.push(2);
x.push(t.length);
x = x.concat(t);
x.unshift(x.length);
x.unshift(48);
return x;
};
this.parseSig = function (y) {
var x;
if (y[0] != 48) {
throw new Error("Signature not a valid DERSequence");
}
x = 2;
if (y[x] != 2) {
throw new Error("First element in signature must be a DERInteger");
}
var w = y.slice(x + 2, x + 2 + y[x + 1]);
x += 2 + y[x + 1];
if (y[x] != 2) {
throw new Error("Second element in signature must be a DERInteger");
}
var t = y.slice(x + 2, x + 2 + y[x + 1]);
x += 2 + y[x + 1];
var v = f.fromByteArrayUnsigned(w);
var u = f.fromByteArrayUnsigned(t);
return {
r: v,
s: u
};
};
this.parseSigCompact = function (w) {
if (w.length !== 65) {
throw "Signature has the wrong length";
}
var t = w[0] - 27;
if (t < 0 || t > 7) {
throw "Invalid signature type";
}
var x = this.ecparams.n;
var v = f.fromByteArrayUnsigned(w.slice(1, 33)).mod(x);
var u = f.fromByteArrayUnsigned(w.slice(33, 65)).mod(x);
return {
r: v,
s: u,
i: t
};
};
this.readPKCS5PrvKeyHex = function (u) {
if (k(u) === false) {
throw new Error("not ASN.1 hex string");
}
var r, t, v;
try {
r = n(u, 0, ["[0]", 0], "06");
t = n(u, 0, [1], "04");
try {
v = n(u, 0, ["[1]", 0], "03");
} catch (s) {}
} catch (s) {
throw new Error("malformed PKCS#1/5 plain ECC private key");
}
this.curveName = d(r);
if (this.curveName === undefined) {
throw "unsupported curve name";
}
this.setNamedCurve(this.curveName);
this.setPublicKeyHex(v);
this.setPrivateKeyHex(t);
this.isPublic = false;
};
this.readPKCS8PrvKeyHex = function (v) {
if (k(v) === false) {
throw new j("not ASN.1 hex string");
}
var t, r, u, w;
try {
t = n(v, 0, [1, 0], "06");
r = n(v, 0, [1, 1], "06");
u = n(v, 0, [2, 0, 1], "04");
try {
w = n(v, 0, [2, 0, "[1]", 0], "03");
} catch (s) {}
} catch (s) {
throw new j("malformed PKCS#8 plain ECC private key");
}
this.curveName = d(r);
if (this.curveName === undefined) {
throw new j("unsupported curve name");
}
this.setNamedCurve(this.curveName);
this.setPublicKeyHex(w);
this.setPrivateKeyHex(u);
this.isPublic = false;
};
this.readPKCS8PubKeyHex = function (u) {
if (k(u) === false) {
throw new j("not ASN.1 hex string");
}
var t, r, v;
try {
t = n(u, 0, [0, 0], "06");
r = n(u, 0, [0, 1], "06");
v = n(u, 0, [1], "03");
} catch (s) {
throw new j("malformed PKCS#8 ECC public key");
}
this.curveName = d(r);
if (this.curveName === null) {
throw new j("unsupported curve name");
}
this.setNamedCurve(this.curveName);
this.setPublicKeyHex(v);
};
this.readCertPubKeyHex = function (t, v) {
if (k(t) === false) {
throw new j("not ASN.1 hex string");
}
var r, u;
try {
r = n(t, 0, [0, 5, 0, 1], "06");
u = n(t, 0, [0, 5, 1], "03");
} catch (s) {
throw new j("malformed X.509 certificate ECC public key");
}
this.curveName = d(r);
if (this.curveName === null) {
throw new j("unsupported curve name");
}
this.setNamedCurve(this.curveName);
this.setPublicKeyHex(u);
};
if (e !== undefined) {
if (e.curve !== undefined) {
this.curveName = e.curve;
}
}
if (this.curveName === undefined) {
this.curveName = g;
}
this.setNamedCurve(this.curveName);
if (e !== undefined) {
if (e.prv !== undefined) {
this.setPrivateKeyHex(e.prv);
}
if (e.pub !== undefined) {
this.setPublicKeyHex(e.pub);
}
}
};
KJUR.crypto.ECDSA.parseSigHex = function (a) {
var b = KJUR.crypto.ECDSA.parseSigHexInHexRS(a);
var d = new BigInteger(b.r, 16);
var c = new BigInteger(b.s, 16);
return {
r: d,
s: c
};
};
KJUR.crypto.ECDSA.parseSigHexInHexRS = function (f) {
var j = ASN1HEX,
i = j.getChildIdx,
g = j.getV;
j.checkStrictDER(f, 0);
if (f.substr(0, 2) != "30") {
throw new Error("signature is not a ASN.1 sequence");
}
var h = i(f, 0);
if (h.length != 2) {
throw new Error("signature shall have two elements");
}
var e = h[0];
var d = h[1];
if (f.substr(e, 2) != "02") {
throw new Error("1st item not ASN.1 integer");
}
if (f.substr(d, 2) != "02") {
throw new Error("2nd item not ASN.1 integer");
}
var c = g(f, e);
var b = g(f, d);
return {
r: c,
s: b
};
};
KJUR.crypto.ECDSA.asn1SigToConcatSig = function (c) {
var d = KJUR.crypto.ECDSA.parseSigHexInHexRS(c);
var b = d.r;
var a = d.s;
if (b.substr(0, 2) == "00" && b.length % 32 == 2) {
b = b.substr(2);
}
if (a.substr(0, 2) == "00" && a.length % 32 == 2) {
a = a.substr(2);
}
if (b.length % 32 == 30) {
b = "00" + b;
}
if (a.length % 32 == 30) {
a = "00" + a;
}
if (b.length % 32 != 0) {
throw "unknown ECDSA sig r length error";
}
if (a.length % 32 != 0) {
throw "unknown ECDSA sig s length error";
}
return b + a;
};
KJUR.crypto.ECDSA.concatSigToASN1Sig = function (a) {
if (a.length / 2 * 8 % (16 * 8) != 0) {
throw "unknown ECDSA concatinated r-s sig length error";
}
var c = a.substr(0, a.length / 2);
var b = a.substr(a.length / 2);
return KJUR.crypto.ECDSA.hexRSSigToASN1Sig(c, b);
};
KJUR.crypto.ECDSA.hexRSSigToASN1Sig = function (b, a) {
var d = new BigInteger(b, 16);
var c = new BigInteger(a, 16);
return KJUR.crypto.ECDSA.biRSSigToASN1Sig(d, c);
};
KJUR.crypto.ECDSA.biRSSigToASN1Sig = function (f, d) {
var c = KJUR.asn1;
var b = new c.DERInteger({
bigint: f
});
var a = new c.DERInteger({
bigint: d
});
var e = new c.DERSequence({
array: [b, a]
});
return e.getEncodedHex();
};
KJUR.crypto.ECDSA.getName = function (a) {
if (a === "2b8104001f") {
return "secp192k1";
}
if (a === "2a8648ce3d030107") {
return "secp256r1";
}
if (a === "2b8104000a") {
return "secp256k1";
}
if (a === "2b81040021") {
return "secp224r1";
}
if (a === "2b81040022") {
return "secp384r1";
}
if ("|secp256r1|NIST P-256|P-256|prime256v1|".indexOf(a) !== -1) {
return "secp256r1";
}
if ("|secp256k1|".indexOf(a) !== -1) {
return "secp256k1";
}
if ("|secp224r1|NIST P-224|P-224|".indexOf(a) !== -1) {
return "secp224r1";
}
if ("|secp384r1|NIST P-384|P-384|".indexOf(a) !== -1) {
return "secp384r1";
}
return null;
};
if (typeof KJUR == "undefined" || !KJUR) {
KJUR = {};
}
if (typeof KJUR.crypto == "undefined" || !KJUR.crypto) {
KJUR.crypto = {};
}
KJUR.crypto.ECParameterDB = new function () {
var b = {};
var c = {};
function a(d) {
return new BigInteger(d, 16);
}
this.getByName = function (e) {
var d = e;
if (typeof c[d] != "undefined") {
d = c[e];
}
if (typeof b[d] != "undefined") {
return b[d];
}
throw "unregistered EC curve name: " + d;
};
this.regist = function (A, l, o, g, m, e, j, f, k, u, d, x) {
b[A] = {};
var s = a(o);
var z = a(g);
var y = a(m);
var t = a(e);
var w = a(j);
var r = new ECCurveFp(s, z, y);
var q = r.decodePointHex("04" + f + k);
b[A]["name"] = A;
b[A]["keylen"] = l;
b[A]["curve"] = r;
b[A]["G"] = q;
b[A]["n"] = t;
b[A]["h"] = w;
b[A]["oid"] = d;
b[A]["info"] = x;
for (var v = 0; v < u.length; v++) {
c[u[v]] = A;
}
};
}();
KJUR.crypto.ECParameterDB.regist("secp128r1", 128, "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF", "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC", "E87579C11079F43DD824993C2CEE5ED3", "FFFFFFFE0000000075A30D1B9038A115", "1", "161FF7528B899B2D0C28607CA52C5B86", "CF5AC8395BAFEB13C02DA292DDED7A83", [], "", "secp128r1 : SECG curve over a 128 bit prime field");
KJUR.crypto.ECParameterDB.regist("secp160k1", 160, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73", "0", "7", "0100000000000000000001B8FA16DFAB9ACA16B6B3", "1", "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB", "938CF935318FDCED6BC28286531733C3F03C4FEE", [], "", "secp160k1 : SECG curve over a 160 bit prime field");
KJUR.crypto.ECParameterDB.regist("secp160r1", 160, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC", "1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45", "0100000000000000000001F4C8F927AED3CA752257", "1", "4A96B5688EF573284664698968C38BB913CBFC82", "23A628553168947D59DCC912042351377AC5FB32", [], "", "secp160r1 : SECG curve over a 160 bit prime field");
KJUR.crypto.ECParameterDB.regist("secp192k1", 192, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37", "0", "3", "FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D", "1", "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D", "9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D", []);
KJUR.crypto.ECParameterDB.regist("secp192r1", 192, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC", "64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1", "FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831", "1", "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012", "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811", []);
KJUR.crypto.ECParameterDB.regist("secp224r1", 224, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE", "B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4", "FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D", "1", "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21", "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34", []);
KJUR.crypto.ECParameterDB.regist("secp256k1", 256, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F", "0", "7", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141", "1", "79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798", "483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8", []);
KJUR.crypto.ECParameterDB.regist("secp256r1", 256, "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF", "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC", "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B", "FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551", "1", "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296", "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5", ["NIST P-256", "P-256", "prime256v1"]);
KJUR.crypto.ECParameterDB.regist("secp384r1", 384, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC", "B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973", "1", "AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7", "3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f", ["NIST P-384", "P-384"]);
KJUR.crypto.ECParameterDB.regist("secp521r1", 521, "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC", "051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00", "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409", "1", "C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66", "011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650", ["NIST P-521", "P-521"]);
if (typeof KJUR == "undefined" || !KJUR) {
KJUR = {};
}
if (typeof KJUR.crypto == "undefined" || !KJUR.crypto) {
KJUR.crypto = {};
}
KJUR.crypto.DSA = function () {
var b = ASN1HEX,
e = b.getVbyList,
d = b.getVbyListEx,
a = b.isASN1HEX,
c = BigInteger;
this.p = null;
this.q = null;
this.g = null;
this.y = null;
this.x = null;
this.type = "DSA";
this.isPrivate = false;
this.isPublic = false;
this.setPrivate = function (j, i, h, k, f) {
this.isPrivate = true;
this.p = j;
this.q = i;
this.g = h;
this.y = k;
this.x = f;
};
this.setPrivateHex = function (i, g, k, n, o) {
var h, f, j, l, m;
h = new BigInteger(i, 16);
f = new BigInteger(g, 16);
j = new BigInteger(k, 16);
if (typeof n === "string" && n.length > 1) {
l = new BigInteger(n, 16);
} else {
l = null;
}
m = new BigInteger(o, 16);
this.setPrivate(h, f, j, l, m);
};
this.setPublic = function (i, h, f, j) {
this.isPublic = true;
this.p = i;
this.q = h;
this.g = f;
this.y = j;
this.x = null;
};
this.setPublicHex = function (k, j, i, l) {
var g, f, m, h;
g = new BigInteger(k, 16);
f = new BigInteger(j, 16);
m = new BigInteger(i, 16);
h = new BigInteger(l, 16);
this.setPublic(g, f, m, h);
};
this.signWithMessageHash = function (j) {
var i = this.p;
var h = this.q;
var m = this.g;
var o = this.y;
var t = this.x;
var l = KJUR.crypto.Util.getRandomBigIntegerMinToMax(BigInteger.ONE.add(BigInteger.ONE), h.subtract(BigInteger.ONE));
var u = j.substr(0, h.bitLength() / 4);
var n = new BigInteger(u, 16);
var f = m.modPow(l, i).mod(h);
var w = l.modInverse(h).multiply(n.add(t.multiply(f))).mod(h);
var v = KJUR.asn1.ASN1Util.jsonToASN1HEX({
seq: [{
"int": {
bigint: f
}
}, {
"int": {
bigint: w
}
}]
});
return v;
};
this.verifyWithMessageHash = function (m, l) {
var j = this.p;
var h = this.q;
var o = this.g;
var u = this.y;
var n = this.parseASN1Signature(l);
var f = n[0];
var C = n[1];
var B = m.substr(0, h.bitLength() / 4);
var t = new BigInteger(B, 16);
if (BigInteger.ZERO.compareTo(f) > 0 || f.compareTo(h) > 0) {
throw "invalid DSA signature";
}
if (BigInteger.ZERO.compareTo(C) >= 0 || C.compareTo(h) > 0) {
throw "invalid DSA signature";
}
var x = C.modInverse(h);
var k = t.multiply(x).mod(h);
var i = f.multiply(x).mod(h);
var A = o.modPow(k, j).multiply(u.modPow(i, j)).mod(j).mod(h);
return A.compareTo(f) == 0;
};
this.parseASN1Signature = function (f) {
try {
var i = new c(d(f, 0, [0], "02"), 16);
var h = new c(d(f, 0, [1], "02"), 16);
return [i, h];
} catch (g) {
throw new Error("malformed ASN.1 DSA signature");
}
};
this.readPKCS5PrvKeyHex = function (j) {
var k, i, g, l, m;
if (a(j) === false) {
throw new Error("not ASN.1 hex string");
}
try {
k = d(j, 0, [1], "02");
i = d(j, 0, [2], "02");
g = d(j, 0, [3], "02");
l = d(j, 0, [4], "02");
m = d(j, 0, [5], "02");
} catch (f) {
throw new Error("malformed PKCS#1/5 plain DSA private key");
}
this.setPrivateHex(k, i, g, l, m);
};
this.readPKCS8PrvKeyHex = function (j) {
var k, i, g, l;
if (a(j) === false) {
throw new Error("not ASN.1 hex string");
}
try {
k = d(j, 0, [1, 1, 0], "02");
i = d(j, 0, [1, 1, 1], "02");
g = d(j, 0, [1, 1, 2], "02");
l = d(j, 0, [2, 0], "02");
} catch (f) {
throw new Error("malformed PKCS#8 plain DSA private key");
}
this.setPrivateHex(k, i, g, null, l);
};
this.readPKCS8PubKeyHex = function (j) {
var k, i, g, l;
if (a(j) === false) {
throw new Error("not ASN.1 hex string");
}
try {
k = d(j, 0, [0, 1, 0], "02");
i = d(j, 0, [0, 1, 1], "02");
g = d(j, 0, [0, 1, 2], "02");
l = d(j, 0, [1, 0], "02");
} catch (f) {
throw new Error("malformed PKCS#8 DSA public key");
}
this.setPublicHex(k, i, g, l);
};
this.readCertPubKeyHex = function (j, m) {
var k, i, g, l;
if (a(j) === false) {
throw new Error("not ASN.1 hex string");
}
try {
k = d(j, 0, [0, 5, 0, 1, 0], "02");
i = d(j, 0, [0, 5, 0, 1, 1], "02");
g = d(j, 0, [0, 5, 0, 1, 2], "02");
l = d(j, 0, [0, 5, 1, 0], "02");
} catch (f) {
throw new Error("malformed X.509 certificate DSA public key");
}
this.setPublicHex(k, i, g, l);
};
};
var KEYUTIL = function () {
var d = function d(p, r, q) {
return k(CryptoJS.AES, p, r, q);
};
var e = function e(p, r, q) {
return k(CryptoJS.TripleDES, p, r, q);
};
var a = function a(p, r, q) {
return k(CryptoJS.DES, p, r, q);
};
var k = function k(s, x, u, q) {
var r = CryptoJS.enc.Hex.parse(x);
var w = CryptoJS.enc.Hex.parse(u);
var p = CryptoJS.enc.Hex.parse(q);
var t = {};
t.key = w;
t.iv = p;
t.ciphertext = r;
var v = s.decrypt(t, w, {
iv: p
});
return CryptoJS.enc.Hex.stringify(v);
};
var l = function l(p, r, q) {
return g(CryptoJS.AES, p, r, q);
};
var o = function o(p, r, q) {
return g(CryptoJS.TripleDES, p, r, q);
};
var f = function f(p, r, q) {
return g(CryptoJS.DES, p, r, q);
};
var g = function g(t, y, v, q) {
var s = CryptoJS.enc.Hex.parse(y);
var x = CryptoJS.enc.Hex.parse(v);
var p = CryptoJS.enc.Hex.parse(q);
var w = t.encrypt(s, x, {
iv: p
});
var r = CryptoJS.enc.Hex.parse(w.toString());
var u = CryptoJS.enc.Base64.stringify(r);
return u;
};
var i = {
"AES-256-CBC": {
proc: d,
eproc: l,
keylen: 32,
ivlen: 16
},
"AES-192-CBC": {
proc: d,
eproc: l,
keylen: 24,
ivlen: 16
},
"AES-128-CBC": {
proc: d,
eproc: l,
keylen: 16,
ivlen: 16
},
"DES-EDE3-CBC": {
proc: e,
eproc: o,
keylen: 24,
ivlen: 8
},
"DES-CBC": {
proc: a,
eproc: f,
keylen: 8,
ivlen: 8
}
};
var c = function c(p) {
return i[p]["proc"];
};
var m = function m(p) {
var r = CryptoJS.lib.WordArray.random(p);
var q = CryptoJS.enc.Hex.stringify(r);
return q;
};
var n = function n(v) {
var w = {};
var q = v.match(new RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)", "m"));
if (q) {
w.cipher = q[1];
w.ivsalt = q[2];
}
var p = v.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"));
if (p) {
w.type = p[1];
}
var u = -1;
var x = 0;
if (v.indexOf("\r\n\r\n") != -1) {
u = v.indexOf("\r\n\r\n");
x = 2;
}
if (v.indexOf("\n\n") != -1) {
u = v.indexOf("\n\n");
x = 1;
}
var t = v.indexOf("-----END");
if (u != -1 && t != -1) {
var r = v.substring(u + x * 2, t - x);
r = r.replace(/\s+/g, "");
w.data = r;
}
return w;
};
var j = function j(q, y, p) {
var v = p.substring(0, 16);
var t = CryptoJS.enc.Hex.parse(v);
var r = CryptoJS.enc.Utf8.parse(y);
var u = i[q]["keylen"] + i[q]["ivlen"];
var x = "";
var w = null;
for (;;) {
var s = CryptoJS.algo.MD5.create();
if (w != null) {
s.update(w);
}
s.update(r);
s.update(t);
w = s.finalize();
x = x + CryptoJS.enc.Hex.stringify(w);
if (x.length >= u * 2) {
break;
}
}
var z = {};
z.keyhex = x.substr(0, i[q]["keylen"] * 2);
z.ivhex = x.substr(i[q]["keylen"] * 2, i[q]["ivlen"] * 2);
return z;
};
var b = function b(p, v, r, w) {
var s = CryptoJS.enc.Base64.parse(p);
var q = CryptoJS.enc.Hex.stringify(s);
var u = i[v]["proc"];
var t = u(q, r, w);
return t;
};
var h = function h(p, s, q, u) {
var r = i[s]["eproc"];
var t = r(p, q, u);
return t;
};
return {
version: "1.0.0",
parsePKCS5PEM: function parsePKCS5PEM(p) {
return n(p);
},
getKeyAndUnusedIvByPasscodeAndIvsalt: function getKeyAndUnusedIvByPasscodeAndIvsalt(q, p, r) {
return j(q, p, r);
},
decryptKeyB64: function decryptKeyB64(p, r, q, s) {
return b(p, r, q, s);
},
getDecryptedKeyHex: function getDecryptedKeyHex(y, x) {
var q = n(y);
var t = q.type;
var r = q.cipher;
var p = q.ivsalt;
var s = q.data;
var w = j(r, x, p);
var v = w.keyhex;
var u = b(s, r, v, p);
return u;
},
getEncryptedPKCS5PEMFromPrvKeyHex: function getEncryptedPKCS5PEMFromPrvKeyHex(x, s, A, t, r) {
var p = "";
if (typeof t == "undefined" || t == null) {
t = "AES-256-CBC";
}
if (typeof i[t] == "undefined") {
throw "KEYUTIL unsupported algorithm: " + t;
}
if (typeof r == "undefined" || r == null) {
var v = i[t]["ivlen"];
var u = m(v);
r = u.toUpperCase();
}
var z = j(t, A, r);
var y = z.keyhex;
var w = h(s, t, y, r);
var q = w.replace(/(.{64})/g, "$1\r\n");
var p = "-----BEGIN " + x + " PRIVATE KEY-----\r\n";
p += "Proc-Type: 4,ENCRYPTED\r\n";
p += "DEK-Info: " + t + "," + r + "\r\n";
p += "\r\n";
p += q;
p += "\r\n-----END " + x + " PRIVATE KEY-----\r\n";
return p;
},
parseHexOfEncryptedPKCS8: function parseHexOfEncryptedPKCS8(y) {
var B = ASN1HEX;
var z = B.getChildIdx;
var w = B.getV;
var t = {};
var r = z(y, 0);
if (r.length != 2) {
throw "malformed format: SEQUENCE(0).items != 2: " + r.length;
}
t.ciphertext = w(y, r[1]);
var A = z(y, r[0]);
if (A.length != 2) {
throw "malformed format: SEQUENCE(0.0).items != 2: " + A.length;
}
if (w(y, A[0]) != "2a864886f70d01050d") {
throw "this only supports pkcs5PBES2";
}
var p = z(y, A[1]);
if (A.length != 2) {
throw "malformed format: SEQUENCE(0.0.1).items != 2: " + p.length;
}
var q = z(y, p[1]);
if (q.length != 2) {
throw "malformed format: SEQUENCE(0.0.1.1).items != 2: " + q.length;
}
if (w(y, q[0]) != "2a864886f70d0307") {
throw "this only supports TripleDES";
}
t.encryptionSchemeAlg = "TripleDES";
t.encryptionSchemeIV = w(y, q[1]);
var s = z(y, p[0]);
if (s.length != 2) {
throw "malformed format: SEQUENCE(0.0.1.0).items != 2: " + s.length;
}
if (w(y, s[0]) != "2a864886f70d01050c") {
throw "this only supports pkcs5PBKDF2";
}
var x = z(y, s[1]);
if (x.length < 2) {
throw "malformed format: SEQUENCE(0.0.1.0.1).items < 2: " + x.length;
}
t.pbkdf2Salt = w(y, x[0]);
var u = w(y, x[1]);
try {
t.pbkdf2Iter = parseInt(u, 16);
} catch (v) {
throw "malformed format pbkdf2Iter: " + u;
}
return t;
},
getPBKDF2KeyHexFromParam: function getPBKDF2KeyHexFromParam(u, p) {
var t = CryptoJS.enc.Hex.parse(u.pbkdf2Salt);
var q = u.pbkdf2Iter;
var s = CryptoJS.PBKDF2(p, t, {
keySize: 192 / 32,
iterations: q
});
var r = CryptoJS.enc.Hex.stringify(s);
return r;
},
_getPlainPKCS8HexFromEncryptedPKCS8PEM: function _getPlainPKCS8HexFromEncryptedPKCS8PEM(x, y) {
var r = pemtohex(x, "ENCRYPTED PRIVATE KEY");
var p = this.parseHexOfEncryptedPKCS8(r);
var u = KEYUTIL.getPBKDF2KeyHexFromParam(p, y);
var v = {};
v.ciphertext = CryptoJS.enc.Hex.parse(p.ciphertext);
var t = CryptoJS.enc.Hex.parse(u);
var s = CryptoJS.enc.Hex.parse(p.encryptionSchemeIV);
var w = CryptoJS.TripleDES.decrypt(v, t, {
iv: s
});
var q = CryptoJS.enc.Hex.stringify(w);
return q;
},
getKeyFromEncryptedPKCS8PEM: function getKeyFromEncryptedPKCS8PEM(s, q) {
var p = this._getPlainPKCS8HexFromEncryptedPKCS8PEM(s, q);
var r = this.getKeyFromPlainPrivatePKCS8Hex(p);
return r;
},
parsePlainPrivatePKCS8Hex: function parsePlainPrivatePKCS8Hex(s) {
var v = ASN1HEX;
var u = v.getChildIdx;
var t = v.getV;
var q = {};
q.algparam = null;
if (s.substr(0, 2) != "30") {
throw "malformed plain PKCS8 private key(code:001)";
}
var r = u(s, 0);
if (r.length != 3) {
throw "malformed plain PKCS8 private key(code:002)";
}
if (s.substr(r[1], 2) != "30") {
throw "malformed PKCS8 private key(code:003)";
}
var p = u(s, r[1]);
if (p.length != 2) {
throw "malformed PKCS8 private key(code:004)";
}
if (s.substr(p[0], 2) != "06") {
throw "malformed PKCS8 private key(code:005)";
}
q.algoid = t(s, p[0]);
if (s.substr(p[1], 2) == "06") {
q.algparam = t(s, p[1]);
}
if (s.substr(r[2], 2) != "04") {
throw "malformed PKCS8 private key(code:006)";
}
q.keyidx = v.getVidx(s, r[2]);
return q;
},
getKeyFromPlainPrivatePKCS8PEM: function getKeyFromPlainPrivatePKCS8PEM(q) {
var p = pemtohex(q, "PRIVATE KEY");
var r = this.getKeyFromPlainPrivatePKCS8Hex(p);
return r;
},
getKeyFromPlainPrivatePKCS8Hex: function getKeyFromPlainPrivatePKCS8Hex(p) {
var q = this.parsePlainPrivatePKCS8Hex(p);
var r;
if (q.algoid == "2a864886f70d010101") {
r = new RSAKey();
} else {
if (q.algoid == "2a8648ce380401") {
r = new KJUR.crypto.DSA();
} else {
if (q.algoid == "2a8648ce3d0201") {
r = new KJUR.crypto.ECDSA();
} else {
throw "unsupported private key algorithm";
}
}
}
r.readPKCS8PrvKeyHex(p);
return r;
},
_getKeyFromPublicPKCS8Hex: function _getKeyFromPublicPKCS8Hex(q) {
var p;
var r = ASN1HEX.getVbyList(q, 0, [0, 0], "06");
if (r === "2a864886f70d010101") {
p = new RSAKey();
} else {
if (r === "2a8648ce380401") {
p = new KJUR.crypto.DSA();
} else {
if (r === "2a8648ce3d0201") {
p = new KJUR.crypto.ECDSA();
} else {
throw "unsupported PKCS#8 public key hex";
}
}
}
p.readPKCS8PubKeyHex(q);
return p;
},
parsePublicRawRSAKeyHex: function parsePublicRawRSAKeyHex(r) {
var u = ASN1HEX;
var t = u.getChildIdx;
var s = u.getV;
var p = {};
if (r.substr(0, 2) != "30") {
throw "malformed RSA key(code:001)";
}
var q = t(r, 0);
if (q.length != 2) {
throw "malformed RSA key(code:002)";
}
if (r.substr(q[0], 2) != "02") {
throw "malformed RSA key(code:003)";
}
p.n = s(r, q[0]);
if (r.substr(q[1], 2) != "02") {
throw "malformed RSA key(code:004)";
}
p.e = s(r, q[1]);
return p;
},
parsePublicPKCS8Hex: function parsePublicPKCS8Hex(t) {
var v = ASN1HEX;
var u = v.getChildIdx;
var s = v.getV;
var q = {};
q.algparam = null;
var r = u(t, 0);
if (r.length != 2) {
throw "outer DERSequence shall have 2 elements: " + r.length;
}
var w = r[0];
if (t.substr(w, 2) != "30") {
throw "malformed PKCS8 public key(code:001)";
}
var p = u(t, w);
if (p.length != 2) {
throw "malformed PKCS8 public key(code:002)";
}
if (t.substr(p[0], 2) != "06") {
throw "malformed PKCS8 public key(code:003)";
}
q.algoid = s(t, p[0]);
if (t.substr(p[1], 2) == "06") {
q.algparam = s(t, p[1]);
} else {
if (t.substr(p[1], 2) == "30") {
q.algparam = {};
q.algparam.p = v.getVbyList(t, p[1], [0], "02");
q.algparam.q = v.getVbyList(t, p[1], [1], "02");
q.algparam.g = v.getVbyList(t, p[1], [2], "02");
}
}
if (t.substr(r[1], 2) != "03") {
throw "malformed PKCS8 public key(code:004)";
}
q.key = s(t, r[1]).substr(2);
return q;
}
};
}();
KEYUTIL.getKey = function (l, k, n) {
var G = ASN1HEX,
L = G.getChildIdx,
v = G.getV,
d = G.getVbyList,
c = KJUR.crypto,
i = c.ECDSA,
C = c.DSA,
w = RSAKey,
M = pemtohex,
F = KEYUTIL;
if (typeof w != "undefined" && l instanceof w) {
return l;
}
if (typeof i != "undefined" && l instanceof i) {
return l;
}
if (typeof C != "undefined" && l instanceof C) {
return l;
}
if (l.curve !== undefined && l.xy !== undefined && l.d === undefined) {
return new i({
pub: l.xy,
curve: l.curve
});
}
if (l.curve !== undefined && l.d !== undefined) {
return new i({
prv: l.d,
curve: l.curve
});
}
if (l.kty === undefined && l.n !== undefined && l.e !== undefined && l.d === undefined) {
var P = new w();
P.setPublic(l.n, l.e);
return P;
}
if (l.kty === undefined && l.n !== undefined && l.e !== undefined && l.d !== undefined && l.p !== undefined && l.q !== undefined && l.dp !== undefined && l.dq !== undefined && l.co !== undefined && l.qi === undefined) {
var P = new w();
P.setPrivateEx(l.n, l.e, l.d, l.p, l.q, l.dp, l.dq, l.co);
return P;
}
if (l.kty === undefined && l.n !== undefined && l.e !== undefined && l.d !== undefined && l.p === undefined) {
var P = new w();
P.setPrivate(l.n, l.e, l.d);
return P;
}
if (l.p !== undefined && l.q !== undefined && l.g !== undefined && l.y !== undefined && l.x === undefined) {
var P = new C();
P.setPublic(l.p, l.q, l.g, l.y);
return P;
}
if (l.p !== undefined && l.q !== undefined && l.g !== undefined && l.y !== undefined && l.x !== undefined) {
var P = new C();
P.setPrivate(l.p, l.q, l.g, l.y, l.x);
return P;
}
if (l.kty === "RSA" && l.n !== undefined && l.e !== undefined && l.d === undefined) {
var P = new w();
P.setPublic(b64utohex(l.n), b64utohex(l.e));
return P;
}
if (l.kty === "RSA" && l.n !== undefined && l.e !== undefined && l.d !== undefined && l.p !== undefined && l.q !== undefined && l.dp !== undefined && l.dq !== undefined && l.qi !== undefined) {
var P = new w();
P.setPrivateEx(b64utohex(l.n), b64utohex(l.e), b64utohex(l.d), b64utohex(l.p), b64utohex(l.q), b64utohex(l.dp), b64utohex(l.dq), b64utohex(l.qi));
return P;
}
if (l.kty === "RSA" && l.n !== undefined && l.e !== undefined && l.d !== undefined) {
var P = new w();
P.setPrivate(b64utohex(l.n), b64utohex(l.e), b64utohex(l.d));
return P;
}
if (l.kty === "EC" && l.crv !== undefined && l.x !== undefined && l.y !== undefined && l.d === undefined) {
var j = new i({
curve: l.crv
});
var t = j.ecparams.keylen / 4;
var B = ("0000000000" + b64utohex(l.x)).slice(-t);
var z = ("0000000000" + b64utohex(l.y)).slice(-t);
var u = "04" + B + z;
j.setPublicKeyHex(u);
return j;
}
if (l.kty === "EC" && l.crv !== undefined && l.x !== undefined && l.y !== undefined && l.d !== undefined) {
var j = new i({
curve: l.crv
});
var t = j.ecparams.keylen / 4;
var B = ("0000000000" + b64utohex(l.x)).slice(-t);
var z = ("0000000000" + b64utohex(l.y)).slice(-t);
var u = "04" + B + z;
var b = ("0000000000" + b64utohex(l.d)).slice(-t);
j.setPublicKeyHex(u);
j.setPrivateKeyHex(b);
return j;
}
if (n === "pkcs5prv") {
var J = l,
G = ASN1HEX,
N,
P;
N = L(J, 0);
if (N.length === 9) {
P = new w();
P.readPKCS5PrvKeyHex(J);
} else {
if (N.length === 6) {
P = new C();
P.readPKCS5PrvKeyHex(J);
} else {
if (N.length > 2 && J.substr(N[1], 2) === "04") {
P = new i();
P.readPKCS5PrvKeyHex(J);
} else {
throw "unsupported PKCS#1/5 hexadecimal key";
}
}
}
return P;
}
if (n === "pkcs8prv") {
var P = F.getKeyFromPlainPrivatePKCS8Hex(l);
return P;
}
if (n === "pkcs8pub") {
return F._getKeyFromPublicPKCS8Hex(l);
}
if (n === "x509pub") {
return X509.getPublicKeyFromCertHex(l);
}
if (l.indexOf("-END CERTIFICATE-", 0) != -1 || l.indexOf("-END X509 CERTIFICATE-", 0) != -1 || l.indexOf("-END TRUSTED CERTIFICATE-", 0) != -1) {
return X509.getPublicKeyFromCertPEM(l);
}
if (l.indexOf("-END PUBLIC KEY-") != -1) {
var O = pemtohex(l, "PUBLIC KEY");
return F._getKeyFromPublicPKCS8Hex(O);
}
if (l.indexOf("-END RSA PRIVATE KEY-") != -1 && l.indexOf("4,ENCRYPTED") == -1) {
var m = M(l, "RSA PRIVATE KEY");
return F.getKey(m, null, "pkcs5prv");
}
if (l.indexOf("-END DSA PRIVATE KEY-") != -1 && l.indexOf("4,ENCRYPTED") == -1) {
var I = M(l, "DSA PRIVATE KEY");
var E = d(I, 0, [1], "02");
var D = d(I, 0, [2], "02");
var K = d(I, 0, [3], "02");
var r = d(I, 0, [4], "02");
var s = d(I, 0, [5], "02");
var P = new C();
P.setPrivate(new BigInteger(E, 16), new BigInteger(D, 16), new BigInteger(K, 16), new BigInteger(r, 16), new BigInteger(s, 16));
return P;
}
if (l.indexOf("-END EC PRIVATE KEY-") != -1 && l.indexOf("4,ENCRYPTED") == -1) {
var m = M(l, "EC PRIVATE KEY");
return F.getKey(m, null, "pkcs5prv");
}
if (l.indexOf("-END PRIVATE KEY-") != -1) {
return F.getKeyFromPlainPrivatePKCS8PEM(l);
}
if (l.indexOf("-END RSA PRIVATE KEY-") != -1 && l.indexOf("4,ENCRYPTED") != -1) {
var o = F.getDecryptedKeyHex(l, k);
var H = new RSAKey();
H.readPKCS5PrvKeyHex(o);
return H;
}
if (l.indexOf("-END EC PRIVATE KEY-") != -1 && l.indexOf("4,ENCRYPTED") != -1) {
var I = F.getDecryptedKeyHex(l, k);
var P = d(I, 0, [1], "04");
var f = d(I, 0, [2, 0], "06");
var A = d(I, 0, [3, 0], "03").substr(2);
var e = "";
if (KJUR.crypto.OID.oidhex2name[f] !== undefined) {
e = KJUR.crypto.OID.oidhex2name[f];
} else {
throw "undefined OID(hex) in KJUR.crypto.OID: " + f;
}
var j = new i({
curve: e
});
j.setPublicKeyHex(A);
j.setPrivateKeyHex(P);
j.isPublic = false;
return j;
}
if (l.indexOf("-END DSA PRIVATE KEY-") != -1 && l.indexOf("4,ENCRYPTED") != -1) {
var I = F.getDecryptedKeyHex(l, k);
var E = d(I, 0, [1], "02");
var D = d(I, 0, [2], "02");
var K = d(I, 0, [3], "02");
var r = d(I, 0, [4], "02");
var s = d(I, 0, [5], "02");
var P = new C();
P.setPrivate(new BigInteger(E, 16), new BigInteger(D, 16), new BigInteger(K, 16), new BigInteger(r, 16), new BigInteger(s, 16));
return P;
}
if (l.indexOf("-END ENCRYPTED PRIVATE KEY-") != -1) {
return F.getKeyFromEncryptedPKCS8PEM(l, k);
}
throw new Error("not supported argument");
};
KEYUTIL.generateKeypair = function (a, c) {
if (a == "RSA") {
var b = c;
var h = new RSAKey();
h.generate(b, "10001");
h.isPrivate = true;
h.isPublic = true;
var f = new RSAKey();
var e = h.n.toString(16);
var i = h.e.toString(16);
f.setPublic(e, i);
f.isPrivate = false;
f.isPublic = true;
var k = {};
k.prvKeyObj = h;
k.pubKeyObj = f;
return k;
} else {
if (a == "EC") {
var d = c;
var g = new KJUR.crypto.ECDSA({
curve: d
});
var j = g.generateKeyPairHex();
var h = new KJUR.crypto.ECDSA({
curve: d
});
h.setPublicKeyHex(j.ecpubhex);
h.setPrivateKeyHex(j.ecprvhex);
h.isPrivate = true;
h.isPublic = false;
var f = new KJUR.crypto.ECDSA({
curve: d
});
f.setPublicKeyHex(j.ecpubhex);
f.isPrivate = false;
f.isPublic = true;
var k = {};
k.prvKeyObj = h;
k.pubKeyObj = f;
return k;
} else {
throw "unknown algorithm: " + a;
}
}
};
KEYUTIL.getPEM = function (b, D, y, m, q, j) {
var F = KJUR,
k = F.asn1,
z = k.DERObjectIdentifier,
f = k.DERInteger,
l = k.ASN1Util.newObject,
a = k.x509,
C = a.SubjectPublicKeyInfo,
e = F.crypto,
u = e.DSA,
r = e.ECDSA,
n = RSAKey;
function A(s) {
var G = l({
seq: [{
"int": 0
}, {
"int": {
bigint: s.n
}
}, {
"int": s.e
}, {
"int": {
bigint: s.d
}
}, {
"int": {
bigint: s.p
}
}, {
"int": {
bigint: s.q
}
}, {
"int": {
bigint: s.dmp1
}
}, {
"int": {
bigint: s.dmq1
}
}, {
"int": {
bigint: s.coeff
}
}]
});
return G;
}
function B(G) {
var s = l({
seq: [{
"int": 1
}, {
octstr: {
hex: G.prvKeyHex
}
}, {
tag: ["a0", true, {
oid: {
name: G.curveName
}
}]
}, {
tag: ["a1", true, {
bitstr: {
hex: "00" + G.pubKeyHex
}
}]
}]
});
return s;
}
function x(s) {
var G = l({
seq: [{
"int": 0
}, {
"int": {
bigint: s.p
}
}, {
"int": {
bigint: s.q
}
}, {
"int": {
bigint: s.g
}
}, {
"int": {
bigint: s.y
}
}, {
"int": {
bigint: s.x
}
}]
});
return G;
}
if ((n !== undefined && b instanceof n || u !== undefined && b instanceof u || r !== undefined && b instanceof r) && b.isPublic == true && (D === undefined || D == "PKCS8PUB")) {
var E = new C(b);
var w = E.getEncodedHex();
return hextopem(w, "PUBLIC KEY");
}
if (D == "PKCS1PRV" && n !== undefined && b instanceof n && (y === undefined || y == null) && b.isPrivate == true) {
var E = A(b);
var w = E.getEncodedHex();
return hextopem(w, "RSA PRIVATE KEY");
}
if (D == "PKCS1PRV" && r !== undefined && b instanceof r && (y === undefined || y == null) && b.isPrivate == true) {
var i = new z({
name: b.curveName
});
var v = i.getEncodedHex();
var h = B(b);
var t = h.getEncodedHex();
var p = "";
p += hextopem(v, "EC PARAMETERS");
p += hextopem(t, "EC PRIVATE KEY");
return p;
}
if (D == "PKCS1PRV" && u !== undefined && b instanceof u && (y === undefined || y == null) && b.isPrivate == true) {
var E = x(b);
var w = E.getEncodedHex();
return hextopem(w, "DSA PRIVATE KEY");
}
if (D == "PKCS5PRV" && n !== undefined && b instanceof n && y !== undefined && y != null && b.isPrivate == true) {
var E = A(b);
var w = E.getEncodedHex();
if (m === undefined) {
m = "DES-EDE3-CBC";
}
return this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA", w, y, m, j);
}
if (D == "PKCS5PRV" && r !== undefined && b instanceof r && y !== undefined && y != null && b.isPrivate == true) {
var E = B(b);
var w = E.getEncodedHex();
if (m === undefined) {
m = "DES-EDE3-CBC";
}
return this.getEncryptedPKCS5PEMFromPrvKeyHex("EC", w, y, m, j);
}
if (D == "PKCS5PRV" && u !== undefined && b instanceof u && y !== undefined && y != null && b.isPrivate == true) {
var E = x(b);
var w = E.getEncodedHex();
if (m === undefined) {
m = "DES-EDE3-CBC";
}
return this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA", w, y, m, j);
}
var o = function o(G, s) {
var I = c(G, s);
var H = new l({
seq: [{
seq: [{
oid: {
name: "pkcs5PBES2"
}
}, {
seq: [{
seq: [{
oid: {
name: "pkcs5PBKDF2"
}
}, {
seq: [{
octstr: {
hex: I.pbkdf2Salt
}
}, {
"int": I.pbkdf2Iter
}]
}]
}, {
seq: [{
oid: {
name: "des-EDE3-CBC"
}
}, {
octstr: {
hex: I.encryptionSchemeIV
}
}]
}]
}]
}, {
octstr: {
hex: I.ciphertext
}
}]
});
return H.getEncodedHex();
};
var c = function c(N, O) {
var H = 100;
var M = CryptoJS.lib.WordArray.random(8);
var L = "DES-EDE3-CBC";
var s = CryptoJS.lib.WordArray.random(8);
var I = CryptoJS.PBKDF2(O, M, {
keySize: 192 / 32,
iterations: H
});
var J = CryptoJS.enc.Hex.parse(N);
var K = CryptoJS.TripleDES.encrypt(J, I, {
iv: s
}) + "";
var G = {};
G.ciphertext = K;
G.pbkdf2Salt = CryptoJS.enc.Hex.stringify(M);
G.pbkdf2Iter = H;
G.encryptionSchemeAlg = L;
G.encryptionSchemeIV = CryptoJS.enc.Hex.stringify(s);
return G;
};
if (D == "PKCS8PRV" && n != undefined && b instanceof n && b.isPrivate == true) {
var g = A(b);
var d = g.getEncodedHex();
var E = l({
seq: [{
"int": 0
}, {
seq: [{
oid: {
name: "rsaEncryption"
}
}, {
"null": true
}]
}, {
octstr: {
hex: d
}
}]
});
var w = E.getEncodedHex();
if (y === undefined || y == null) {
return hextopem(w, "PRIVATE KEY");
} else {
var t = o(w, y);
return hextopem(t, "ENCRYPTED PRIVATE KEY");
}
}
if (D == "PKCS8PRV" && r !== undefined && b instanceof r && b.isPrivate == true) {
var g = new l({
seq: [{
"int": 1
}, {
octstr: {
hex: b.prvKeyHex
}
}, {
tag: ["a1", true, {
bitstr: {
hex: "00" + b.pubKeyHex
}
}]
}]
});
var d = g.getEncodedHex();
var E = l({
seq: [{
"int": 0
}, {
seq: [{
oid: {
name: "ecPublicKey"
}
}, {
oid: {
name: b.curveName
}
}]
}, {
octstr: {
hex: d
}
}]
});
var w = E.getEncodedHex();
if (y === undefined || y == null) {
return hextopem(w, "PRIVATE KEY");
} else {
var t = o(w, y);
return hextopem(t, "ENCRYPTED PRIVATE KEY");
}
}
if (D == "PKCS8PRV" && u !== undefined && b instanceof u && b.isPrivate == true) {
var g = new f({
bigint: b.x
});
var d = g.getEncodedHex();
var E = l({
seq: [{
"int": 0
}, {
seq: [{
oid: {
name: "dsa"
}
}, {
seq: [{
"int": {
bigint: b.p
}
}, {
"int": {
bigint: b.q
}
}, {
"int": {
bigint: b.g
}
}]
}]
}, {
octstr: {
hex: d
}
}]
});
var w = E.getEncodedHex();
if (y === undefined || y == null) {
return hextopem(w, "PRIVATE KEY");
} else {
var t = o(w, y);
return hextopem(t, "ENCRYPTED PRIVATE KEY");
}
}
throw new Error("unsupported object nor format");
};
KEYUTIL.getKeyFromCSRPEM = function (b) {
var a = pemtohex(b, "CERTIFICATE REQUEST");
var c = KEYUTIL.getKeyFromCSRHex(a);
return c;
};
KEYUTIL.getKeyFromCSRHex = function (a) {
var c = KEYUTIL.parseCSRHex(a);
var b = KEYUTIL.getKey(c.p8pubkeyhex, null, "pkcs8pub");
return b;
};
KEYUTIL.parseCSRHex = function (d) {
var i = ASN1HEX;
var f = i.getChildIdx;
var c = i.getTLV;
var b = {};
var g = d;
if (g.substr(0, 2) != "30") {
throw "malformed CSR(code:001)";
}
var e = f(g, 0);
if (e.length < 1) {
throw "malformed CSR(code:002)";
}
if (g.substr(e[0], 2) != "30") {
throw "malformed CSR(code:003)";
}
var a = f(g, e[0]);
if (a.length < 3) {
throw "malformed CSR(code:004)";
}
b.p8pubkeyhex = c(g, a[2]);
return b;
};
KEYUTIL.getKeyID = function (f) {
var c = KEYUTIL;
var e = ASN1HEX;
if (typeof f === "string" && f.indexOf("BEGIN ") != -1) {
f = c.getKey(f);
}
var d = pemtohex(c.getPEM(f));
var b = e.getIdxbyList(d, 0, [1]);
var a = e.getV(d, b).substring(2);
return KJUR.crypto.Util.hashHex(a, "sha1");
};
KEYUTIL.getJWKFromKey = function (d) {
var b = {};
if (d instanceof RSAKey && d.isPrivate) {
b.kty = "RSA";
b.n = hextob64u(d.n.toString(16));
b.e = hextob64u(d.e.toString(16));
b.d = hextob64u(d.d.toString(16));
b.p = hextob64u(d.p.toString(16));
b.q = hextob64u(d.q.toString(16));
b.dp = hextob64u(d.dmp1.toString(16));
b.dq = hextob64u(d.dmq1.toString(16));
b.qi = hextob64u(d.coeff.toString(16));
return b;
} else {
if (d instanceof RSAKey && d.isPublic) {
b.kty = "RSA";
b.n = hextob64u(d.n.toString(16));
b.e = hextob64u(d.e.toString(16));
return b;
} else {
if (d instanceof KJUR.crypto.ECDSA && d.isPrivate) {
var a = d.getShortNISTPCurveName();
if (a !== "P-256" && a !== "P-384") {
throw "unsupported curve name for JWT: " + a;
}
var c = d.getPublicKeyXYHex();
b.kty = "EC";
b.crv = a;
b.x = hextob64u(c.x);
b.y = hextob64u(c.y);
b.d = hextob64u(d.prvKeyHex);
return b;
} else {
if (d instanceof KJUR.crypto.ECDSA && d.isPublic) {
var a = d.getShortNISTPCurveName();
if (a !== "P-256" && a !== "P-384") {
throw "unsupported curve name for JWT: " + a;
}
var c = d.getPublicKeyXYHex();
b.kty = "EC";
b.crv = a;
b.x = hextob64u(c.x);
b.y = hextob64u(c.y);
return b;
}
}
}
}
throw "not supported key object";
};
RSAKey.getPosArrayOfChildrenFromHex = function (a) {
return ASN1HEX.getChildIdx(a, 0);
};
RSAKey.getHexValueArrayOfChildrenFromHex = function (f) {
var n = ASN1HEX;
var i = n.getV;
var k = RSAKey.getPosArrayOfChildrenFromHex(f);
var e = i(f, k[0]);
var j = i(f, k[1]);
var b = i(f, k[2]);
var c = i(f, k[3]);
var h = i(f, k[4]);
var g = i(f, k[5]);
var m = i(f, k[6]);
var l = i(f, k[7]);
var d = i(f, k[8]);
var k = new Array();
k.push(e, j, b, c, h, g, m, l, d);
return k;
};
RSAKey.prototype.readPrivateKeyFromPEMString = function (d) {
var c = pemtohex(d);
var b = RSAKey.getHexValueArrayOfChildrenFromHex(c);
this.setPrivateEx(b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8]);
};
RSAKey.prototype.readPKCS5PrvKeyHex = function (c) {
var b = RSAKey.getHexValueArrayOfChildrenFromHex(c);
this.setPrivateEx(b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8]);
};
RSAKey.prototype.readPKCS8PrvKeyHex = function (e) {
var c, i, k, b, a, f, d, j;
var m = ASN1HEX;
var l = m.getVbyListEx;
if (m.isASN1HEX(e) === false) {
throw new Error("not ASN.1 hex string");
}
try {
c = l(e, 0, [2, 0, 1], "02");
i = l(e, 0, [2, 0, 2], "02");
k = l(e, 0, [2, 0, 3], "02");
b = l(e, 0, [2, 0, 4], "02");
a = l(e, 0, [2, 0, 5], "02");
f = l(e, 0, [2, 0, 6], "02");
d = l(e, 0, [2, 0, 7], "02");
j = l(e, 0, [2, 0, 8], "02");
} catch (g) {
throw new Error("malformed PKCS#8 plain RSA private key");
}
this.setPrivateEx(c, i, k, b, a, f, d, j);
};
RSAKey.prototype.readPKCS5PubKeyHex = function (c) {
var e = ASN1HEX;
var b = e.getV;
if (e.isASN1HEX(c) === false) {
throw new Error("keyHex is not ASN.1 hex string");
}
var a = e.getChildIdx(c, 0);
if (a.length !== 2 || c.substr(a[0], 2) !== "02" || c.substr(a[1], 2) !== "02") {
throw new Error("wrong hex for PKCS#5 public key");
}
var f = b(c, a[0]);
var d = b(c, a[1]);
this.setPublic(f, d);
};
RSAKey.prototype.readPKCS8PubKeyHex = function (b) {
var c = ASN1HEX;
if (c.isASN1HEX(b) === false) {
throw new Error("not ASN.1 hex string");
}
if (c.getTLVbyListEx(b, 0, [0, 0]) !== "06092a864886f70d010101") {
throw new Error("not PKCS8 RSA public key");
}
var a = c.getTLVbyListEx(b, 0, [1, 0]);
this.readPKCS5PubKeyHex(a);
};
RSAKey.prototype.readCertPubKeyHex = function (b, d) {
var a, c;
a = new X509();
a.readCertHex(b);
c = a.getPublicKeyHex();
this.readPKCS8PubKeyHex(c);
};
var _RE_HEXDECONLY = new RegExp("[^0-9a-f]", "gi");
function _rsasign_getHexPaddedDigestInfoForString(d, e, a) {
var b = function b(f) {
return KJUR.crypto.Util.hashString(f, a);
};
var c = b(d);
return KJUR.crypto.Util.getPaddedDigestInfoHex(c, a, e);
}
function _zeroPaddingOfSignature(e, d) {
var c = "";
var a = d / 4 - e.length;
for (var b = 0; b < a; b++) {
c = c + "0";
}
return c + e;
}
RSAKey.prototype.sign = function (d, a) {
var b = function b(e) {
return KJUR.crypto.Util.hashString(e, a);
};
var c = b(d);
return this.signWithMessageHash(c, a);
};
RSAKey.prototype.signWithMessageHash = function (e, c) {
var f = KJUR.crypto.Util.getPaddedDigestInfoHex(e, c, this.n.bitLength());
var b = parseBigInt(f, 16);
var d = this.doPrivate(b);
var a = d.toString(16);
return _zeroPaddingOfSignature(a, this.n.bitLength());
};
function pss_mgf1_str(c, a, e) {
var b = "",
d = 0;
while (b.length < a) {
b += hextorstr(e(rstrtohex(c + String.fromCharCode.apply(String, [(d & 4278190080) >> 24, (d & 16711680) >> 16, (d & 65280) >> 8, d & 255]))));
d += 1;
}
return b;
}
RSAKey.prototype.signPSS = function (e, a, d) {
var c = function c(f) {
return KJUR.crypto.Util.hashHex(f, a);
};
var b = c(rstrtohex(e));
if (d === undefined) {
d = -1;
}
return this.signWithMessageHashPSS(b, a, d);
};
RSAKey.prototype.signWithMessageHashPSS = function (l, a, k) {
var b = hextorstr(l);
var g = b.length;
var m = this.n.bitLength() - 1;
var c = Math.ceil(m / 8);
var d;
var o = function o(i) {
return KJUR.crypto.Util.hashHex(i, a);
};
if (k === -1 || k === undefined) {
k = g;
} else {
if (k === -2) {
k = c - g - 2;
} else {
if (k < -2) {
throw new Error("invalid salt length");
}
}
}
if (c < g + k + 2) {
throw new Error("data too long");
}
var f = "";
if (k > 0) {
f = new Array(k);
new SecureRandom().nextBytes(f);
f = String.fromCharCode.apply(String, f);
}
var n = hextorstr(o(rstrtohex("\x00\x00\x00\x00\x00\x00\x00\x00" + b + f)));
var j = [];
for (d = 0; d < c - k - g - 2; d += 1) {
j[d] = 0;
}
var e = String.fromCharCode.apply(String, j) + "\x01" + f;
var h = pss_mgf1_str(n, e.length, o);
var q = [];
for (d = 0; d < e.length; d += 1) {
q[d] = e.charCodeAt(d) ^ h.charCodeAt(d);
}
var p = 65280 >> 8 * c - m & 255;
q[0] &= ~p;
for (d = 0; d < g; d++) {
q.push(n.charCodeAt(d));
}
q.push(188);
return _zeroPaddingOfSignature(this.doPrivate(new BigInteger(q)).toString(16), this.n.bitLength());
};
function _rsasign_getDecryptSignatureBI(a, d, c) {
var b = new RSAKey();
b.setPublic(d, c);
var e = b.doPublic(a);
return e;
}
function _rsasign_getHexDigestInfoFromSig(a, c, b) {
var e = _rsasign_getDecryptSignatureBI(a, c, b);
var d = e.toString(16).replace(/^1f+00/, "");
return d;
}
function _rsasign_getAlgNameAndHashFromHexDisgestInfo(f) {
for (var e in KJUR.crypto.Util.DIGESTINFOHEAD) {
var d = KJUR.crypto.Util.DIGESTINFOHEAD[e];
var b = d.length;
if (f.substring(0, b) == d) {
var c = [e, f.substring(b)];
return c;
}
}
return [];
}
RSAKey.prototype.verify = function (f, j) {
j = j.replace(_RE_HEXDECONLY, "");
j = j.replace(/[ \n]+/g, "");
var b = parseBigInt(j, 16);
if (b.bitLength() > this.n.bitLength()) {
return 0;
}
var i = this.doPublic(b);
var e = i.toString(16).replace(/^1f+00/, "");
var g = _rsasign_getAlgNameAndHashFromHexDisgestInfo(e);
if (g.length == 0) {
return false;
}
var d = g[0];
var h = g[1];
var a = function a(k) {
return KJUR.crypto.Util.hashString(k, d);
};
var c = a(f);
return h == c;
};
RSAKey.prototype.verifyWithMessageHash = function (e, a) {
if (a.length != Math.ceil(this.n.bitLength() / 4)) {
return false;
}
var b = parseBigInt(a, 16);
if (b.bitLength() > this.n.bitLength()) {
return 0;
}
var h = this.doPublic(b);
var g = h.toString(16).replace(/^1f+00/, "");
var c = _rsasign_getAlgNameAndHashFromHexDisgestInfo(g);
if (c.length == 0) {
return false;
}
var d = c[0];
var f = c[1];
return f == e;
};
RSAKey.prototype.verifyPSS = function (c, b, a, f) {
var e = function e(g) {
return KJUR.crypto.Util.hashHex(g, a);
};
var d = e(rstrtohex(c));
if (f === undefined) {
f = -1;
}
return this.verifyWithMessageHashPSS(d, b, a, f);
};
RSAKey.prototype.verifyWithMessageHashPSS = function (f, s, l, c) {
if (s.length != Math.ceil(this.n.bitLength() / 4)) {
return false;
}
var k = new BigInteger(s, 16);
var r = function r(i) {
return KJUR.crypto.Util.hashHex(i, l);
};
var j = hextorstr(f);
var h = j.length;
var g = this.n.bitLength() - 1;
var m = Math.ceil(g / 8);
var q;
if (c === -1 || c === undefined) {
c = h;
} else {
if (c === -2) {
c = m - h - 2;
} else {
if (c < -2) {
throw new Error("invalid salt length");
}
}
}
if (m < h + c + 2) {
throw new Error("data too long");
}
var a = this.doPublic(k).toByteArray();
for (q = 0; q < a.length; q += 1) {
a[q] &= 255;
}
while (a.length < m) {
a.unshift(0);
}
if (a[m - 1] !== 188) {
throw new Error("encoded message does not end in 0xbc");
}
a = String.fromCharCode.apply(String, a);
var d = a.substr(0, m - h - 1);
var e = a.substr(d.length, h);
var p = 65280 >> 8 * m - g & 255;
if ((d.charCodeAt(0) & p) !== 0) {
throw new Error("bits beyond keysize not zero");
}
var n = pss_mgf1_str(e, d.length, r);
var o = [];
for (q = 0; q < d.length; q += 1) {
o[q] = d.charCodeAt(q) ^ n.charCodeAt(q);
}
o[0] &= ~p;
var b = m - h - c - 2;
for (q = 0; q < b; q += 1) {
if (o[q] !== 0) {
throw new Error("leftmost octets not zero");
}
}
if (o[b] !== 1) {
throw new Error("0x01 marker not found");
}
return e === hextorstr(r(rstrtohex("\x00\x00\x00\x00\x00\x00\x00\x00" + j + String.fromCharCode.apply(String, o.slice(-c)))));
};
RSAKey.SALT_LEN_HLEN = -1;
RSAKey.SALT_LEN_MAX = -2;
RSAKey.SALT_LEN_RECOVER = -2;
function X509(q) {
var j = ASN1HEX,
n = j.getChildIdx,
g = j.getV,
b = j.getTLV,
c = j.getVbyList,
k = j.getVbyListEx,
a = j.getTLVbyList,
l = j.getTLVbyListEx,
h = j.getIdxbyList,
e = j.getIdxbyListEx,
i = j.getVidx,
p = j.oidname,
m = j.hextooidstr,
d = X509,
r = pemtohex,
f;
try {
f = KJUR.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV;
} catch (o) {}
this.HEX2STAG = {
"0c": "utf8",
"13": "prn",
"16": "ia5",
"1a": "vis",
"1e": "bmp"
};
this.hex = null;
this.version = 0;
this.foffset = 0;
this.aExtInfo = null;
this.getVersion = function () {
if (this.hex === null || this.version !== 0) {
return this.version;
}
if (a(this.hex, 0, [0, 0]) !== "a003020102") {
this.version = 1;
this.foffset = -1;
return 1;
}
this.version = 3;
return 3;
};
this.getSerialNumberHex = function () {
return k(this.hex, 0, [0, 0], "02");
};
this.getSignatureAlgorithmField = function () {
var s = l(this.hex, 0, [0, 1]);
return this.getAlgorithmIdentifierName(s);
};
this.getAlgorithmIdentifierName = function (s) {
for (var t in f) {
if (s === f[t]) {
return t;
}
}
return p(k(s, 0, [0], "06"));
};
this.getIssuer = function () {
var s = {};
s.array = this.getX500Name(this.getIssuerHex());
s.str = this.getIssuerString();
return s;
};
this.getIssuerHex = function () {
return a(this.hex, 0, [0, 3 + this.foffset], "30");
};
this.getIssuerString = function () {
return d.hex2dn(this.getIssuerHex());
};
this.getSubject = function () {
var s = {};
s.array = this.getX500Name(this.getSubjectHex());
s.str = this.getSubjectString();
return s;
};
this.getSubjectHex = function () {
return a(this.hex, 0, [0, 5 + this.foffset], "30");
};
this.getSubjectString = function () {
return d.hex2dn(this.getSubjectHex());
};
this.getNotBefore = function () {
var t = c(this.hex, 0, [0, 4 + this.foffset, 0]);
t = t.replace(/(..)/g, "%$1");
t = decodeURIComponent(t);
return t;
};
this.getNotAfter = function () {
var t = c(this.hex, 0, [0, 4 + this.foffset, 1]);
t = t.replace(/(..)/g, "%$1");
t = decodeURIComponent(t);
return t;
};
this.getPublicKeyHex = function () {
return j.getTLVbyList(this.hex, 0, [0, 6 + this.foffset], "30");
};
this.getPublicKeyIdx = function () {
return h(this.hex, 0, [0, 6 + this.foffset], "30");
};
this.getPublicKeyContentIdx = function () {
var s = this.getPublicKeyIdx();
return h(this.hex, s, [1, 0], "30");
};
this.getPublicKey = function () {
return KEYUTIL.getKey(this.getPublicKeyHex(), null, "pkcs8pub");
};
this.getSignatureAlgorithmName = function () {
var s = a(this.hex, 0, [1], "30");
return this.getAlgorithmIdentifierName(s);
};
this.getSignatureValueHex = function () {
return c(this.hex, 0, [2], "03", true);
};
this.verifySignature = function (u) {
var v = this.getSignatureAlgorithmField();
var s = this.getSignatureValueHex();
var t = a(this.hex, 0, [0], "30");
var w = new KJUR.crypto.Signature({
alg: v
});
w.init(u);
w.updateHex(t);
return w.verify(s);
};
this.parseExt = function (B) {
var u, s, w;
if (B === undefined) {
w = this.hex;
if (this.version !== 3) {
return -1;
}
u = h(w, 0, [0, 7, 0], "30");
s = n(w, u);
} else {
w = pemtohex(B);
var x = h(w, 0, [0, 3, 0, 0], "06");
if (g(w, x) != "2a864886f70d01090e") {
this.aExtInfo = new Array();
return;
}
u = h(w, 0, [0, 3, 0, 1, 0], "30");
s = n(w, u);
this.hex = w;
}
this.aExtInfo = new Array();
for (var v = 0; v < s.length; v++) {
var z = {};
z.critical = false;
var y = n(w, s[v]);
var t = 0;
if (y.length === 3) {
z.critical = true;
t = 1;
}
z.oid = j.hextooidstr(c(w, s[v], [0], "06"));
var A = h(w, s[v], [1 + t]);
z.vidx = i(w, A);
this.aExtInfo.push(z);
}
};
this.getExtInfo = function (u) {
var s = this.aExtInfo;
var v = u;
if (!u.match(/^[0-9.]+$/)) {
v = KJUR.asn1.x509.OID.name2oid(u);
}
if (v === "") {
return undefined;
}
for (var t = 0; t < s.length; t++) {
if (s[t].oid === v) {
return s[t];
}
}
return undefined;
};
this.getExtBasicConstraints = function (t, x) {
if (t === undefined && x === undefined) {
var v = this.getExtInfo("basicConstraints");
if (v === undefined) {
return undefined;
}
t = b(this.hex, v.vidx);
x = v.critical;
}
var s = {
extname: "basicConstraints"
};
if (x) {
s.critical = true;
}
if (t === "3000") {
return s;
}
if (t === "30030101ff") {
s.cA = true;
return s;
}
if (t.substr(0, 12) === "30060101ff02") {
var w = g(t, 10);
var u = parseInt(w, 16);
s.cA = true;
s.pathLen = u;
return s;
}
throw new Error("hExtV parse error: " + t);
};
this.getExtKeyUsage = function (t, v) {
if (t === undefined && v === undefined) {
var u = this.getExtInfo("keyUsage");
if (u === undefined) {
return undefined;
}
t = b(this.hex, u.vidx);
v = u.critical;
}
var s = {
extname: "keyUsage"
};
if (v) {
s.critical = true;
}
s.names = this.getExtKeyUsageString(t).split(",");
return s;
};
this.getExtKeyUsageBin = function (u) {
if (u === undefined) {
var v = this.getExtInfo("keyUsage");
if (v === undefined) {
return "";
}
u = b(this.hex, v.vidx);
}
if (u.length != 8 && u.length != 10) {
throw new Error("malformed key usage value: " + u);
}
var t = "000000000000000" + parseInt(u.substr(6), 16).toString(2);
if (u.length == 8) {
t = t.slice(-8);
}
if (u.length == 10) {
t = t.slice(-16);
}
t = t.replace(/0+$/, "");
if (t == "") {
t = "0";
}
return t;
};
this.getExtKeyUsageString = function (u) {
var v = this.getExtKeyUsageBin(u);
var s = new Array();
for (var t = 0; t < v.length; t++) {
if (v.substr(t, 1) == "1") {
s.push(X509.KEYUSAGE_NAME[t]);
}
}
return s.join(",");
};
this.getExtSubjectKeyIdentifier = function (u, w) {
if (u === undefined && w === undefined) {
var v = this.getExtInfo("subjectKeyIdentifier");
if (v === undefined) {
return undefined;
}
u = b(this.hex, v.vidx);
w = v.critical;
}
var s = {
extname: "subjectKeyIdentifier"
};
if (w) {
s.critical = true;
}
var t = g(u, 0);
s.kid = {
hex: t
};
return s;
};
this.getExtAuthorityKeyIdentifier = function (y, w) {
if (y === undefined && w === undefined) {
var s = this.getExtInfo("authorityKeyIdentifier");
if (s === undefined) {
return undefined;
}
y = b(this.hex, s.vidx);
w = s.critical;
}
var z = {
extname: "authorityKeyIdentifier"
};
if (w) {
z.critical = true;
}
var x = n(y, 0);
for (var t = 0; t < x.length; t++) {
var A = y.substr(x[t], 2);
if (A === "80") {
z.kid = {
hex: g(y, x[t])
};
}
if (A === "a1") {
var v = b(y, x[t]);
var u = this.getGeneralNames(v);
z.issuer = u[0]["dn"];
}
if (A === "82") {
z.sn = {
hex: g(y, x[t])
};
}
}
return z;
};
this.getExtExtKeyUsage = function (v, x) {
if (v === undefined && x === undefined) {
var w = this.getExtInfo("extKeyUsage");
if (w === undefined) {
return undefined;
}
v = b(this.hex, w.vidx);
x = w.critical;
}
var s = {
extname: "extKeyUsage",
array: []
};
if (x) {
s.critical = true;
}
var t = n(v, 0);
for (var u = 0; u < t.length; u++) {
s.array.push(p(g(v, t[u])));
}
return s;
};
this.getExtExtKeyUsageName = function () {
var w = this.getExtInfo("extKeyUsage");
if (w === undefined) {
return w;
}
var s = new Array();
var v = b(this.hex, w.vidx);
if (v === "") {
return s;
}
var t = n(v, 0);
for (var u = 0; u < t.length; u++) {
s.push(p(g(v, t[u])));
}
return s;
};
this.getExtSubjectAltName = function (t, v) {
if (t === undefined && v === undefined) {
var u = this.getExtInfo("subjectAltName");
if (u === undefined) {
return undefined;
}
t = b(this.hex, u.vidx);
v = u.critical;
}
var s = {
extname: "subjectAltName",
array: []
};
if (v) {
s.critical = true;
}
s.array = this.getGeneralNames(t);
return s;
};
this.getExtIssuerAltName = function (t, v) {
if (t === undefined && v === undefined) {
var u = this.getExtInfo("issuerAltName");
if (u === undefined) {
return undefined;
}
t = b(this.hex, u.vidx);
v = u.critical;
}
var s = {
extname: "issuerAltName",
array: []
};
if (v) {
s.critical = true;
}
s.array = this.getGeneralNames(t);
return s;
};
this.getGeneralNames = function (w) {
var u = n(w, 0);
var s = [];
for (var v = 0; v < u.length; v++) {
var t = this.getGeneralName(b(w, u[v]));
if (t !== undefined) {
s.push(t);
}
}
return s;
};
this.getGeneralName = function (t) {
var s = t.substr(0, 2);
var v = g(t, 0);
var u = hextorstr(v);
if (s == "81") {
return {
rfc822: u
};
}
if (s == "82") {
return {
dns: u
};
}
if (s == "a4") {
return {
dn: {
hex: v
}
};
}
if (s == "86") {
return {
uri: u
};
}
if (s == "87") {
return {
ip: hextoip(v)
};
}
return undefined;
};
this.getExtSubjectAltName2 = function () {
var w, z, y;
var x = this.getExtInfo("subjectAltName");
if (x === undefined) {
return x;
}
var s = new Array();
var v = b(this.hex, x.vidx);
var t = n(v, 0);
for (var u = 0; u < t.length; u++) {
y = v.substr(t[u], 2);
w = g(v, t[u]);
if (y === "81") {
z = hextoutf8(w);
s.push(["MAIL", z]);
}
if (y === "82") {
z = hextoutf8(w);
s.push(["DNS", z]);
}
if (y === "84") {
z = X509.hex2dn(w, 0);
s.push(["DN", z]);
}
if (y === "86") {
z = hextoutf8(w);
s.push(["URI", z]);
}
if (y === "87") {
z = hextoip(w);
s.push(["IP", z]);
}
}
return s;
};
this.getExtCRLDistributionPoints = function (w, y) {
if (w === undefined && y === undefined) {
var x = this.getExtInfo("cRLDistributionPoints");
if (x === undefined) {
return undefined;
}
w = b(this.hex, x.vidx);
y = x.critical;
}
var t = {
extname: "cRLDistributionPoints",
array: []
};
if (y) {
t.critical = true;
}
var u = n(w, 0);
for (var v = 0; v < u.length; v++) {
var s = b(w, u[v]);
t.array.push(this.getDistributionPoint(s));
}
return t;
};
this.getDistributionPoint = function (x) {
var u = {};
var v = n(x, 0);
for (var w = 0; w < v.length; w++) {
var t = x.substr(v[w], 2);
var s = b(x, v[w]);
if (t == "a0") {
u.dpname = this.getDistributionPointName(s);
}
}
return u;
};
this.getDistributionPointName = function (x) {
var u = {};
var v = n(x, 0);
for (var w = 0; w < v.length; w++) {
var t = x.substr(v[w], 2);
var s = b(x, v[w]);
if (t == "a0") {
u.full = this.getGeneralNames(s);
}
}
return u;
};
this.getExtCRLDistributionPointsURI = function () {
var x = this.getExtInfo("cRLDistributionPoints");
if (x === undefined) {
return x;
}
var s = new Array();
var t = n(this.hex, x.vidx);
for (var v = 0; v < t.length; v++) {
try {
var y = c(this.hex, t[v], [0, 0, 0], "86");
var w = hextoutf8(y);
s.push(w);
} catch (u) {}
}
return s;
};
this.getExtAIAInfo = function () {
var w = this.getExtInfo("authorityInfoAccess");
if (w === undefined) {
return w;
}
var s = {
ocsp: [],
caissuer: []
};
var t = n(this.hex, w.vidx);
for (var u = 0; u < t.length; u++) {
var x = c(this.hex, t[u], [0], "06");
var v = c(this.hex, t[u], [1], "86");
if (x === "2b06010505073001") {
s.ocsp.push(hextoutf8(v));
}
if (x === "2b06010505073002") {
s.caissuer.push(hextoutf8(v));
}
}
return s;
};
this.getExtAuthorityInfoAccess = function (z, x) {
if (z === undefined && x === undefined) {
var s = this.getExtInfo("authorityInfoAccess");
if (s === undefined) {
return undefined;
}
z = b(this.hex, s.vidx);
x = s.critical;
}
var A = {
extname: "authorityInfoAccess",
array: []
};
if (x) {
A.critical = true;
}
var y = n(z, 0);
for (var t = 0; t < y.length; t++) {
var w = k(z, y[t], [0], "06");
var u = c(z, y[t], [1], "86");
var v = hextoutf8(u);
if (w == "2b06010505073001") {
A.array.push({
ocsp: v
});
} else {
if (w == "2b06010505073002") {
A.array.push({
caissuer: v
});
} else {
throw new Error("unknown method: " + w);
}
}
}
return A;
};
this.getExtCertificatePolicies = function (w, z) {
if (w === undefined && z === undefined) {
var y = this.getExtInfo("certificatePolicies");
if (y === undefined) {
return undefined;
}
w = b(this.hex, y.vidx);
z = y.critical;
}
var s = {
extname: "certificatePolicies",
array: []
};
if (z) {
s.critical = true;
}
var t = n(w, 0);
for (var u = 0; u < t.length; u++) {
var x = b(w, t[u]);
var v = this.getPolicyInformation(x);
s.array.push(v);
}
return s;
};
this.getPolicyInformation = function (w) {
var s = {};
var y = c(w, 0, [0], "06");
s.policyoid = p(y);
var z = e(w, 0, [1], "30");
if (z != -1) {
s.array = [];
var t = n(w, z);
for (var u = 0; u < t.length; u++) {
var x = b(w, t[u]);
var v = this.getPolicyQualifierInfo(x);
s.array.push(v);
}
}
return s;
};
this.getPolicyQualifierInfo = function (t) {
var s = {};
var u = c(t, 0, [0], "06");
if (u === "2b06010505070201") {
var w = k(t, 0, [1], "16");
s.cps = hextorstr(w);
} else {
if (u === "2b06010505070202") {
var v = a(t, 0, [1], "30");
s.unotice = this.getUserNotice(v);
}
}
return s;
};
this.getUserNotice = function (w) {
var t = {};
var u = n(w, 0);
for (var v = 0; v < u.length; v++) {
var s = b(w, u[v]);
if (s.substr(0, 2) != "30") {
t.exptext = this.getDisplayText(s);
}
}
return t;
};
this.getDisplayText = function (t) {
var u = {
"0c": "utf8",
"16": "ia5",
"1a": "vis",
"1e": "bmp"
};
var s = {};
s.type = u[t.substr(0, 2)];
s.str = hextorstr(g(t, 0));
return s;
};
this.getExtCRLNumber = function (t, u) {
var s = {
extname: "cRLNumber"
};
if (u) {
s.critical = true;
}
if (t.substr(0, 2) == "02") {
s.num = {
hex: g(t, 0)
};
return s;
}
throw new Error("hExtV parse error: " + t);
};
this.getExtCRLReason = function (t, u) {
var s = {
extname: "cRLReason"
};
if (u) {
s.critical = true;
}
if (t.substr(0, 2) == "0a") {
s.code = parseInt(g(t, 0), 16);
return s;
}
throw new Error("hExtV parse error: " + t);
};
this.getExtOcspNonce = function (t, v) {
var s = {
extname: "ocspNonce"
};
if (v) {
s.critical = true;
}
var u = g(t, 0);
s.hex = u;
return s;
};
this.getExtOcspNoCheck = function (t, u) {
var s = {
extname: "ocspNoCheck"
};
if (u) {
s.critical = true;
}
return s;
};
this.getExtAdobeTimeStamp = function (v, y) {
if (v === undefined && y === undefined) {
var x = this.getExtInfo("adobeTimeStamp");
if (x === undefined) {
return undefined;
}
v = b(this.hex, x.vidx);
y = x.critical;
}
var s = {
extname: "adobeTimeStamp"
};
if (y) {
s.critical = true;
}
var u = n(v, 0);
if (u.length > 1) {
var z = b(v, u[1]);
var t = this.getGeneralName(z);
if (t.uri != undefined) {
s.uri = t.uri;
}
}
if (u.length > 2) {
var w = b(v, u[2]);
if (w == "0101ff") {
s.reqauth = true;
}
if (w == "010100") {
s.reqauth = false;
}
}
return s;
};
this.getX500NameRule = function (s) {
var z = true;
var D = true;
var C = false;
var t = "";
var w = "";
var F = null;
var A = [];
for (var v = 0; v < s.length; v++) {
var x = s[v];
for (var u = 0; u < x.length; u++) {
A.push(x[u]);
}
}
for (var v = 0; v < A.length; v++) {
var E = A[v];
var G = E.ds;
var B = E.value;
var y = E.type;
t += ":" + G;
if (G != "prn" && G != "utf8" && G != "ia5") {
return "mixed";
}
if (G == "ia5") {
if (y != "CN") {
return "mixed";
} else {
if (!KJUR.lang.String.isMail(B)) {
return "mixed";
} else {
continue;
}
}
}
if (y == "C") {
if (G == "prn") {
continue;
} else {
return "mixed";
}
}
w += ":" + G;
if (F == null) {
F = G;
} else {
if (F !== G) {
return "mixed";
}
}
}
if (F == null) {
return "prn";
} else {
return F;
}
};
this.getX500Name = function (v) {
var s = [];
var t = n(v, 0);
for (var u = 0; u < t.length; u++) {
s.push(this.getRDN(b(v, t[u])));
}
return s;
};
this.getRDN = function (v) {
var s = [];
var t = n(v, 0);
for (var u = 0; u < t.length; u++) {
s.push(this.getAttrTypeAndValue(b(v, t[u])));
}
return s;
};
this.getAttrTypeAndValue = function (u) {
var s = {
type: null,
value: null,
ds: null
};
var t = n(u, 0);
var x = c(u, t[0], [], "06");
var w = c(u, t[1], []);
var v = KJUR.asn1.ASN1Util.oidHexToInt(x);
s.type = KJUR.asn1.x509.OID.oid2atype(v);
s.value = hextorstr(w);
s.ds = this.HEX2STAG[u.substr(t[1], 2)];
return s;
};
this.readCertPEM = function (s) {
this.readCertHex(r(s));
};
this.readCertHex = function (s) {
this.hex = s;
this.getVersion();
try {
h(this.hex, 0, [0, 7], "a3");
this.parseExt();
} catch (t) {}
};
this.getParam = function () {
var s = {};
s.version = this.getVersion();
s.serial = {
hex: this.getSerialNumberHex()
};
s.sigalg = this.getSignatureAlgorithmField();
s.issuer = this.getIssuer();
s.notbefore = this.getNotBefore();
s.notafter = this.getNotAfter();
s.subject = this.getSubject();
s.sbjpubkey = hextopem(this.getPublicKeyHex(), "PUBLIC KEY");
if (this.aExtInfo.length > 0) {
s.ext = this.getExtParamArray();
}
s.sighex = this.getSignatureValueHex();
return s;
};
this.getExtParamArray = function (t) {
if (t == undefined) {
var v = e(this.hex, 0, [0, "[3]"]);
if (v != -1) {
t = l(this.hex, 0, [0, "[3]", 0], "30");
}
}
var s = [];
var u = n(t, 0);
for (var w = 0; w < u.length; w++) {
var y = b(t, u[w]);
var x = this.getExtParam(y);
if (x != null) {
s.push(x);
}
}
return s;
};
this.getExtParam = function (t) {
var A = {};
var v = n(t, 0);
var w = v.length;
if (w != 2 && w != 3) {
throw new Error("wrong number elements in Extension: " + w + " " + t);
}
var u = m(c(t, 0, [0], "06"));
var y = false;
if (w == 3 && a(t, 0, [1]) == "0101ff") {
y = true;
}
var z = a(t, 0, [w - 1, 0]);
var x = undefined;
if (u == "2.5.29.14") {
x = this.getExtSubjectKeyIdentifier(z, y);
} else {
if (u == "2.5.29.15") {
x = this.getExtKeyUsage(z, y);
} else {
if (u == "2.5.29.17") {
x = this.getExtSubjectAltName(z, y);
} else {
if (u == "2.5.29.18") {
x = this.getExtIssuerAltName(z, y);
} else {
if (u == "2.5.29.19") {
x = this.getExtBasicConstraints(z, y);
} else {
if (u == "2.5.29.31") {
x = this.getExtCRLDistributionPoints(z, y);
} else {
if (u == "2.5.29.32") {
x = this.getExtCertificatePolicies(z, y);
} else {
if (u == "2.5.29.35") {
x = this.getExtAuthorityKeyIdentifier(z, y);
} else {
if (u == "2.5.29.37") {
x = this.getExtExtKeyUsage(z, y);
} else {
if (u == "1.3.6.1.5.5.7.1.1") {
x = this.getExtAuthorityInfoAccess(z, y);
} else {
if (u == "2.5.29.20") {
x = this.getExtCRLNumber(z, y);
} else {
if (u == "2.5.29.21") {
x = this.getExtCRLReason(z, y);
} else {
if (u == "1.3.6.1.5.5.7.48.1.2") {
x = this.getExtOcspNonce(z, y);
} else {
if (u == "1.3.6.1.5.5.7.48.1.5") {
x = this.getExtOcspNoCheck(z, y);
} else {
if (u == "1.2.840.113583.1.1.9.1") {
x = this.getExtAdobeTimeStamp(z, y);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
if (x != undefined) {
return x;
}
var s = {
extname: u,
extn: z
};
if (y) {
s.critical = true;
}
return s;
};
this.getInfo = function () {
var u = function u(M) {
var L = JSON.stringify(M.array).replace(/[\[\]\{\}\"]/g, "");
return L;
};
var A = function A(R) {
var P = "";
var L = R.array;
for (var O = 0; O < L.length; O++) {
var Q = L[O];
P += " policy oid: " + Q.policyoid + "\n";
if (Q.array === undefined) {
continue;
}
for (var N = 0; N < Q.array.length; N++) {
var M = Q.array[N];
if (M.cps !== undefined) {
P += " cps: " + M.cps + "\n";
}
}
}
return P;
};
var D = function D(P) {
var O = "";
var L = P.array;
for (var N = 0; N < L.length; N++) {
var Q = L[N];
try {
if (Q.dpname.full[0].uri !== undefined) {
O += " " + Q.dpname.full[0].uri + "\n";
}
} catch (M) {}
try {
if (Q.dname.full[0].dn.hex !== undefined) {
O += " " + X509.hex2dn(Q.dpname.full[0].dn.hex) + "\n";
}
} catch (M) {}
}
return O;
};
var B = function B(P) {
var O = "";
var L = P.array;
for (var M = 0; M < L.length; M++) {
var N = L[M];
if (N.caissuer !== undefined) {
O += " caissuer: " + N.caissuer + "\n";
}
if (N.ocsp !== undefined) {
O += " ocsp: " + N.ocsp + "\n";
}
}
return O;
};
var v = X509;
var F, E, K;
F = "Basic Fields\n";
F += " serial number: " + this.getSerialNumberHex() + "\n";
F += " signature algorithm: " + this.getSignatureAlgorithmField() + "\n";
F += " issuer: " + this.getIssuerString() + "\n";
F += " notBefore: " + this.getNotBefore() + "\n";
F += " notAfter: " + this.getNotAfter() + "\n";
F += " subject: " + this.getSubjectString() + "\n";
F += " subject public key info: \n";
E = this.getPublicKey();
F += " key algorithm: " + E.type + "\n";
if (E.type === "RSA") {
F += " n=" + hextoposhex(E.n.toString(16)).substr(0, 16) + "...\n";
F += " e=" + hextoposhex(E.e.toString(16)) + "\n";
}
K = this.aExtInfo;
if (K !== undefined && K !== null) {
F += "X509v3 Extensions:\n";
for (var H = 0; H < K.length; H++) {
var J = K[H];
var t = KJUR.asn1.x509.OID.oid2name(J.oid);
if (t === "") {
t = J.oid;
}
var G = "";
if (J.critical === true) {
G = "CRITICAL";
}
F += " " + t + " " + G + ":\n";
if (t === "basicConstraints") {
var w = this.getExtBasicConstraints();
if (w.cA === undefined) {
F += " {}\n";
} else {
F += " cA=true";
if (w.pathLen !== undefined) {
F += ", pathLen=" + w.pathLen;
}
F += "\n";
}
} else {
if (t === "keyUsage") {
F += " " + this.getExtKeyUsageString() + "\n";
} else {
if (t === "subjectKeyIdentifier") {
F += " " + this.getExtSubjectKeyIdentifier().kid.hex + "\n";
} else {
if (t === "authorityKeyIdentifier") {
var x = this.getExtAuthorityKeyIdentifier();
if (x.kid !== undefined) {
F += " kid=" + x.kid.hex + "\n";
}
} else {
if (t === "extKeyUsage") {
var I = this.getExtExtKeyUsage().array;
F += " " + I.join(", ") + "\n";
} else {
if (t === "subjectAltName") {
var y = u(this.getExtSubjectAltName());
F += " " + y + "\n";
} else {
if (t === "cRLDistributionPoints") {
var C = this.getExtCRLDistributionPoints();
F += D(C);
} else {
if (t === "authorityInfoAccess") {
var z = this.getExtAuthorityInfoAccess();
F += B(z);
} else {
if (t === "certificatePolicies") {
F += A(this.getExtCertificatePolicies());
}
}
}
}
}
}
}
}
}
}
}
F += "signature algorithm: " + this.getSignatureAlgorithmName() + "\n";
F += "signature: " + this.getSignatureValueHex().substr(0, 16) + "...\n";
return F;
};
if (typeof q == "string") {
if (q.indexOf("-----BEGIN") != -1) {
this.readCertPEM(q);
} else {
if (KJUR.lang.String.isHex(q)) {
this.readCertHex(q);
}
}
}
}
X509.hex2dn = function (f, b) {
if (b === undefined) {
b = 0;
}
if (f.substr(b, 2) !== "30") {
throw new Error("malformed DN");
}
var c = new Array();
var d = ASN1HEX.getChildIdx(f, b);
for (var e = 0; e < d.length; e++) {
c.push(X509.hex2rdn(f, d[e]));
}
c = c.map(function (a) {
return a.replace("/", "\\/");
});
return "/" + c.join("/");
};
X509.hex2rdn = function (f, b) {
if (b === undefined) {
b = 0;
}
if (f.substr(b, 2) !== "31") {
throw new Error("malformed RDN");
}
var c = new Array();
var d = ASN1HEX.getChildIdx(f, b);
for (var e = 0; e < d.length; e++) {
c.push(X509.hex2attrTypeValue(f, d[e]));
}
c = c.map(function (a) {
return a.replace("+", "\\+");
});
return c.join("+");
};
X509.hex2attrTypeValue = function (d, i) {
var j = ASN1HEX;
var h = j.getV;
if (i === undefined) {
i = 0;
}
if (d.substr(i, 2) !== "30") {
throw new Error("malformed attribute type and value");
}
var g = j.getChildIdx(d, i);
if (g.length !== 2 || d.substr(g[0], 2) !== "06") {
"malformed attribute type and value";
}
var b = h(d, g[0]);
var f = KJUR.asn1.ASN1Util.oidHexToInt(b);
var e = KJUR.asn1.x509.OID.oid2atype(f);
var a = h(d, g[1]);
var c = hextorstr(a);
return e + "=" + c;
};
X509.getPublicKeyFromCertHex = function (b) {
var a = new X509();
a.readCertHex(b);
return a.getPublicKey();
};
X509.getPublicKeyFromCertPEM = function (b) {
var a = new X509();
a.readCertPEM(b);
return a.getPublicKey();
};
X509.getPublicKeyInfoPropOfCertPEM = function (c) {
var e = ASN1HEX;
var g = e.getVbyList;
var b = {};
var a, f, d;
b.algparam = null;
a = new X509();
a.readCertPEM(c);
f = a.getPublicKeyHex();
b.keyhex = g(f, 0, [1], "03").substr(2);
b.algoid = g(f, 0, [0, 0], "06");
if (b.algoid === "2a8648ce3d0201") {
b.algparam = g(f, 0, [0, 1], "06");
}
return b;
};
X509.KEYUSAGE_NAME = ["digitalSignature", "nonRepudiation", "keyEncipherment", "dataEncipherment", "keyAgreement", "keyCertSign", "cRLSign", "encipherOnly", "decipherOnly"];
var X509CRL = function X509CRL(e) {
var a = KJUR,
f = a.lang.String.isHex,
m = ASN1HEX,
k = m.getV,
b = m.getTLV,
h = m.getVbyList,
c = m.getTLVbyList,
d = m.getTLVbyListEx,
i = m.getIdxbyList,
g = m.getIdxbyListEx,
l = m.getChildIdx,
j = new X509();
this.hex = null;
this.posSigAlg = null;
this.posRevCert = null;
this._setPos = function () {
var o = i(this.hex, 0, [0, 0]);
var n = this.hex.substr(o, 2);
if (n == "02") {
this.posSigAlg = 1;
} else {
if (n == "30") {
this.posSigAlg = 0;
} else {
throw new Error("malformed 1st item of TBSCertList: " + n);
}
}
var s = i(this.hex, 0, [0, this.posSigAlg + 3]);
var r = this.hex.substr(s, 2);
if (r == "17" || r == "18") {
var q, p;
q = i(this.hex, 0, [0, this.posSigAlg + 4]);
this.posRevCert = null;
if (q != -1) {
p = this.hex.substr(q, 2);
if (p == "30") {
this.posRevCert = this.posSigAlg + 4;
}
}
} else {
if (r == "30") {
this.posRevCert = this.posSigAlg + 3;
} else {
if (r == "a0") {
this.posRevCert = null;
} else {
throw new Error("malformed nextUpdate or revCert tag: " + r);
}
}
}
};
this.getVersion = function () {
if (this.posSigAlg == 0) {
return null;
}
return parseInt(h(this.hex, 0, [0, 0], "02"), 16) + 1;
};
this.getSignatureAlgorithmField = function () {
var n = c(this.hex, 0, [0, this.posSigAlg], "30");
return j.getAlgorithmIdentifierName(n);
};
this.getIssuer = function () {
var o = c(this.hex, 0, [0, this.posSigAlg + 1], "30");
var n = {};
n.array = j.getX500Name(o);
return n;
};
this.getThisUpdate = function () {
var n = h(this.hex, 0, [0, this.posSigAlg + 2]);
return result = hextorstr(n);
};
this.getNextUpdate = function () {
var o = i(this.hex, 0, [0, this.posSigAlg + 3]);
var n = this.hex.substr(o, 2);
if (n != "17" && n != "18") {
return null;
}
return hextorstr(k(this.hex, o));
};
this.getRevCertArray = function () {
if (this.posRevCert == null) {
return null;
}
var o = [];
var n = i(this.hex, 0, [0, this.posRevCert]);
var p = l(this.hex, n);
for (var q = 0; q < p.length; q++) {
var r = b(this.hex, p[q]);
o.push(this.getRevCert(r));
}
return o;
};
this.getRevCert = function (p) {
var o = {};
var n = l(p, 0);
o.sn = {
hex: h(p, 0, [0], "02")
};
o.date = hextorstr(h(p, 0, [1]));
if (n.length == 3) {
o.ext = j.getExtParamArray(c(p, 0, [2]));
}
return o;
};
this.getSignatureValueHex = function () {
return h(this.hex, 0, [2], "03", true);
};
this.verifySignature = function (o) {
var p = this.getSignatureAlgorithmField();
var n = this.getSignatureValueHex();
var q = c(this.hex, 0, [0], "30");
var r = new KJUR.crypto.Signature({
alg: p
});
r.init(o);
r.updateHex(q);
return r.verify(n);
};
this.getParam = function () {
var n = {};
var p = this.getVersion();
if (p != null) {
n.version = p;
}
n.sigalg = this.getSignatureAlgorithmField();
n.issuer = this.getIssuer();
n.thisupdate = this.getThisUpdate();
var q = this.getNextUpdate();
if (q != null) {
n.nextupdate = q;
}
var s = this.getRevCertArray();
if (s != null) {
n.revcert = s;
}
var r = g(this.hex, 0, [0, "[0]"]);
if (r != -1) {
var o = d(this.hex, 0, [0, "[0]", 0]);
n.ext = j.getExtParamArray(o);
}
n.sighex = this.getSignatureValueHex();
return n;
};
if (typeof e == "string") {
if (f(e)) {
this.hex = e;
} else {
if (e.match(/-----BEGIN X509 CRL/)) {
this.hex = pemtohex(e);
}
}
this._setPos();
}
};
if (typeof KJUR == "undefined" || !KJUR) {
KJUR = {};
}
if (typeof KJUR.jws == "undefined" || !KJUR.jws) {
KJUR.jws = {};
}
KJUR.jws.JWS = function () {
var b = KJUR,
a = b.jws.JWS,
c = a.isSafeJSONString;
this.parseJWS = function (g, j) {
if (this.parsedJWS !== undefined && (j || this.parsedJWS.sigvalH !== undefined)) {
return;
}
var i = g.match(/^([^.]+)\.([^.]+)\.([^.]+)$/);
if (i == null) {
throw "JWS signature is not a form of 'Head.Payload.SigValue'.";
}
var k = i[1];
var e = i[2];
var l = i[3];
var n = k + "." + e;
this.parsedJWS = {};
this.parsedJWS.headB64U = k;
this.parsedJWS.payloadB64U = e;
this.parsedJWS.sigvalB64U = l;
this.parsedJWS.si = n;
if (!j) {
var h = b64utohex(l);
var f = parseBigInt(h, 16);
this.parsedJWS.sigvalH = h;
this.parsedJWS.sigvalBI = f;
}
var d = b64utoutf8(k);
var m = b64utoutf8(e);
this.parsedJWS.headS = d;
this.parsedJWS.payloadS = m;
if (!c(d, this.parsedJWS, "headP")) {
throw "malformed JSON string for JWS Head: " + d;
}
};
};
KJUR.jws.JWS.sign = function (j, w, z, A, a) {
var x = KJUR,
n = x.jws,
r = n.JWS,
h = r.readSafeJSONString,
q = r.isSafeJSONString,
d = x.crypto,
l = d.ECDSA,
p = d.Mac,
c = d.Signature,
u = JSON;
var t, k, o;
if (typeof w != "string" && _typeof(w) != "object") {
throw "spHeader must be JSON string or object: " + w;
}
if (_typeof(w) == "object") {
k = w;
t = u.stringify(k);
}
if (typeof w == "string") {
t = w;
if (!q(t)) {
throw "JWS Head is not safe JSON string: " + t;
}
k = h(t);
}
o = z;
if (_typeof(z) == "object") {
o = u.stringify(z);
}
if ((j == "" || j == null) && k.alg !== undefined) {
j = k.alg;
}
if (j != "" && j != null && k.alg === undefined) {
k.alg = j;
t = u.stringify(k);
}
if (j !== k.alg) {
throw "alg and sHeader.alg doesn't match: " + j + "!=" + k.alg;
}
var s = null;
if (r.jwsalg2sigalg[j] === undefined) {
throw "unsupported alg name: " + j;
} else {
s = r.jwsalg2sigalg[j];
}
var e = utf8tob64u(t);
var m = utf8tob64u(o);
var b = e + "." + m;
var y = "";
if (s.substr(0, 4) == "Hmac") {
if (A === undefined) {
throw "mac key shall be specified for HS* alg";
}
var i = new p({
alg: s,
prov: "cryptojs",
pass: A
});
i.updateString(b);
y = i.doFinal();
} else {
if (s.indexOf("withECDSA") != -1) {
var f = new c({
alg: s
});
f.init(A, a);
f.updateString(b);
var g = f.sign();
y = KJUR.crypto.ECDSA.asn1SigToConcatSig(g);
} else {
if (s != "none") {
var f = new c({
alg: s
});
f.init(A, a);
f.updateString(b);
y = f.sign();
}
}
}
var v = hextob64u(y);
return b + "." + v;
};
KJUR.jws.JWS.verify = function (w, B, n) {
var x = KJUR,
q = x.jws,
t = q.JWS,
i = t.readSafeJSONString,
e = x.crypto,
p = e.ECDSA,
s = e.Mac,
d = e.Signature,
m;
if (_typeof(RSAKey) !== undefined) {
m = RSAKey;
}
var y = w.split(".");
if (y.length !== 3) {
return false;
}
var f = y[0];
var r = y[1];
var c = f + "." + r;
var A = b64utohex(y[2]);
var l = i(b64utoutf8(y[0]));
var k = null;
var z = null;
if (l.alg === undefined) {
throw "algorithm not specified in header";
} else {
k = l.alg;
z = k.substr(0, 2);
}
if (n != null && Object.prototype.toString.call(n) === "[object Array]" && n.length > 0) {
var b = ":" + n.join(":") + ":";
if (b.indexOf(":" + k + ":") == -1) {
throw "algorithm '" + k + "' not accepted in the list";
}
}
if (k != "none" && B === null) {
throw "key shall be specified to verify.";
}
if (typeof B == "string" && B.indexOf("-----BEGIN ") != -1) {
B = KEYUTIL.getKey(B);
}
if (z == "RS" || z == "PS") {
if (!(B instanceof m)) {
throw "key shall be a RSAKey obj for RS* and PS* algs";
}
}
if (z == "ES") {
if (!(B instanceof p)) {
throw "key shall be a ECDSA obj for ES* algs";
}
}
if (k == "none") {}
var u = null;
if (t.jwsalg2sigalg[l.alg] === undefined) {
throw "unsupported alg name: " + k;
} else {
u = t.jwsalg2sigalg[k];
}
if (u == "none") {
throw "not supported";
} else {
if (u.substr(0, 4) == "Hmac") {
var o = null;
if (B === undefined) {
throw "hexadecimal key shall be specified for HMAC";
}
var j = new s({
alg: u,
pass: B
});
j.updateString(c);
o = j.doFinal();
return A == o;
} else {
if (u.indexOf("withECDSA") != -1) {
var h = null;
try {
h = p.concatSigToASN1Sig(A);
} catch (v) {
return false;
}
var g = new d({
alg: u
});
g.init(B);
g.updateString(c);
return g.verify(h);
} else {
var g = new d({
alg: u
});
g.init(B);
g.updateString(c);
return g.verify(A);
}
}
}
};
KJUR.jws.JWS.parse = function (g) {
var c = g.split(".");
var b = {};
var f, e, d;
if (c.length != 2 && c.length != 3) {
throw "malformed sJWS: wrong number of '.' splitted elements";
}
f = c[0];
e = c[1];
if (c.length == 3) {
d = c[2];
}
b.headerObj = KJUR.jws.JWS.readSafeJSONString(b64utoutf8(f));
b.payloadObj = KJUR.jws.JWS.readSafeJSONString(b64utoutf8(e));
b.headerPP = JSON.stringify(b.headerObj, null, " ");
if (b.payloadObj == null) {
b.payloadPP = b64utoutf8(e);
} else {
b.payloadPP = JSON.stringify(b.payloadObj, null, " ");
}
if (d !== undefined) {
b.sigHex = b64utohex(d);
}
return b;
};
KJUR.jws.JWS.verifyJWT = function (e, l, r) {
var d = KJUR,
j = d.jws,
o = j.JWS,
n = o.readSafeJSONString,
p = o.inArray,
f = o.includedArray;
var k = e.split(".");
var c = k[0];
var i = k[1];
var q = c + "." + i;
var m = b64utohex(k[2]);
var h = n(b64utoutf8(c));
var g = n(b64utoutf8(i));
if (h.alg === undefined) {
return false;
}
if (r.alg === undefined) {
throw "acceptField.alg shall be specified";
}
if (!p(h.alg, r.alg)) {
return false;
}
if (g.iss !== undefined && _typeof(r.iss) === "object") {
if (!p(g.iss, r.iss)) {
return false;
}
}
if (g.sub !== undefined && _typeof(r.sub) === "object") {
if (!p(g.sub, r.sub)) {
return false;
}
}
if (g.aud !== undefined && _typeof(r.aud) === "object") {
if (typeof g.aud == "string") {
if (!p(g.aud, r.aud)) {
return false;
}
} else {
if (_typeof(g.aud) == "object") {
if (!f(g.aud, r.aud)) {
return false;
}
}
}
}
var b = j.IntDate.getNow();
if (r.verifyAt !== undefined && typeof r.verifyAt === "number") {
b = r.verifyAt;
}
if (r.gracePeriod === undefined || typeof r.gracePeriod !== "number") {
r.gracePeriod = 0;
}
if (g.exp !== undefined && typeof g.exp == "number") {
if (g.exp + r.gracePeriod < b) {
return false;
}
}
if (g.nbf !== undefined && typeof g.nbf == "number") {
if (b < g.nbf - r.gracePeriod) {
return false;
}
}
if (g.iat !== undefined && typeof g.iat == "number") {
if (b < g.iat - r.gracePeriod) {
return false;
}
}
if (g.jti !== undefined && r.jti !== undefined) {
if (g.jti !== r.jti) {
return false;
}
}
if (!o.verify(e, l, r.alg)) {
return false;
}
return true;
};
KJUR.jws.JWS.includedArray = function (b, a) {
var c = KJUR.jws.JWS.inArray;
if (b === null) {
return false;
}
if (_typeof(b) !== "object") {
return false;
}
if (typeof b.length !== "number") {
return false;
}
for (var d = 0; d < b.length; d++) {
if (!c(b[d], a)) {
return false;
}
}
return true;
};
KJUR.jws.JWS.inArray = function (d, b) {
if (b === null) {
return false;
}
if (_typeof(b) !== "object") {
return false;
}
if (typeof b.length !== "number") {
return false;
}
for (var c = 0; c < b.length; c++) {
if (b[c] == d) {
return true;
}
}
return false;
};
KJUR.jws.JWS.jwsalg2sigalg = {
HS256: "HmacSHA256",
HS384: "HmacSHA384",
HS512: "HmacSHA512",
RS256: "SHA256withRSA",
RS384: "SHA384withRSA",
RS512: "SHA512withRSA",
ES256: "SHA256withECDSA",
ES384: "SHA384withECDSA",
PS256: "SHA256withRSAandMGF1",
PS384: "SHA384withRSAandMGF1",
PS512: "SHA512withRSAandMGF1",
none: "none"
};
KJUR.jws.JWS.isSafeJSONString = function (c, b, d) {
var e = null;
try {
e = jsonParse(c);
if (_typeof(e) != "object") {
return 0;
}
if (e.constructor === Array) {
return 0;
}
if (b) {
b[d] = e;
}
return 1;
} catch (a) {
return 0;
}
};
KJUR.jws.JWS.readSafeJSONString = function (b) {
var c = null;
try {
c = jsonParse(b);
if (_typeof(c) != "object") {
return null;
}
if (c.constructor === Array) {
return null;
}
return c;
} catch (a) {
return null;
}
};
KJUR.jws.JWS.getEncodedSignatureValueFromJWS = function (b) {
var a = b.match(/^[^.]+\.[^.]+\.([^.]+)$/);
if (a == null) {
throw "JWS signature is not a form of 'Head.Payload.SigValue'.";
}
return a[1];
};
KJUR.jws.JWS.getJWKthumbprint = function (d) {
if (d.kty !== "RSA" && d.kty !== "EC" && d.kty !== "oct") {
throw "unsupported algorithm for JWK Thumprint";
}
var a = "{";
if (d.kty === "RSA") {
if (typeof d.n != "string" || typeof d.e != "string") {
throw "wrong n and e value for RSA key";
}
a += '"e":"' + d.e + '",';
a += '"kty":"' + d.kty + '",';
a += '"n":"' + d.n + '"}';
} else {
if (d.kty === "EC") {
if (typeof d.crv != "string" || typeof d.x != "string" || typeof d.y != "string") {
throw "wrong crv, x and y value for EC key";
}
a += '"crv":"' + d.crv + '",';
a += '"kty":"' + d.kty + '",';
a += '"x":"' + d.x + '",';
a += '"y":"' + d.y + '"}';
} else {
if (d.kty === "oct") {
if (typeof d.k != "string") {
throw "wrong k value for oct(symmetric) key";
}
a += '"kty":"' + d.kty + '",';
a += '"k":"' + d.k + '"}';
}
}
}
var b = rstrtohex(a);
var c = KJUR.crypto.Util.hashHex(b, "sha256");
var e = hextob64u(c);
return e;
};
KJUR.jws.IntDate = {};
KJUR.jws.IntDate.get = function (c) {
var b = KJUR.jws.IntDate,
d = b.getNow,
a = b.getZulu;
if (c == "now") {
return d();
} else {
if (c == "now + 1hour") {
return d() + 60 * 60;
} else {
if (c == "now + 1day") {
return d() + 60 * 60 * 24;
} else {
if (c == "now + 1month") {
return d() + 60 * 60 * 24 * 30;
} else {
if (c == "now + 1year") {
return d() + 60 * 60 * 24 * 365;
} else {
if (c.match(/Z$/)) {
return a(c);
} else {
if (c.match(/^[0-9]+$/)) {
return parseInt(c);
}
}
}
}
}
}
}
throw "unsupported format: " + c;
};
KJUR.jws.IntDate.getZulu = function (a) {
return zulutosec(a);
};
KJUR.jws.IntDate.getNow = function () {
var a = ~~(new Date() / 1000);
return a;
};
KJUR.jws.IntDate.intDate2UTCString = function (a) {
var b = new Date(a * 1000);
return b.toUTCString();
};
KJUR.jws.IntDate.intDate2Zulu = function (e) {
var i = new Date(e * 1000),
h = ("0000" + i.getUTCFullYear()).slice(-4),
g = ("00" + (i.getUTCMonth() + 1)).slice(-2),
b = ("00" + i.getUTCDate()).slice(-2),
a = ("00" + i.getUTCHours()).slice(-2),
c = ("00" + i.getUTCMinutes()).slice(-2),
f = ("00" + i.getUTCSeconds()).slice(-2);
return h + g + b + a + c + f + "Z";
};
if (typeof KJUR == "undefined" || !KJUR) {
KJUR = {};
}
if (typeof KJUR.jws == "undefined" || !KJUR.jws) {
KJUR.jws = {};
}
KJUR.jws.JWSJS = function () {
var c = KJUR,
b = c.jws,
a = b.JWS,
d = a.readSafeJSONString;
this.aHeader = [];
this.sPayload = "";
this.aSignature = [];
this.init = function () {
this.aHeader = [];
this.sPayload = undefined;
this.aSignature = [];
};
this.initWithJWS = function (f) {
this.init();
var e = f.split(".");
if (e.length != 3) {
throw "malformed input JWS";
}
this.aHeader.push(e[0]);
this.sPayload = e[1];
this.aSignature.push(e[2]);
};
this.addSignature = function (e, h, m, k) {
if (this.sPayload === undefined || this.sPayload === null) {
throw "there's no JSON-JS signature to add.";
}
var l = this.aHeader.length;
if (this.aHeader.length != this.aSignature.length) {
throw "aHeader.length != aSignature.length";
}
try {
var f = KJUR.jws.JWS.sign(e, h, this.sPayload, m, k);
var j = f.split(".");
var n = j[0];
var g = j[2];
this.aHeader.push(j[0]);
this.aSignature.push(j[2]);
} catch (i) {
if (this.aHeader.length > l) {
this.aHeader.pop();
}
if (this.aSignature.length > l) {
this.aSignature.pop();
}
throw "addSignature failed: " + i;
}
};
this.verifyAll = function (h) {
if (this.aHeader.length !== h.length || this.aSignature.length !== h.length) {
return false;
}
for (var g = 0; g < h.length; g++) {
var f = h[g];
if (f.length !== 2) {
return false;
}
var e = this.verifyNth(g, f[0], f[1]);
if (e === false) {
return false;
}
}
return true;
};
this.verifyNth = function (f, j, g) {
if (this.aHeader.length <= f || this.aSignature.length <= f) {
return false;
}
var h = this.aHeader[f];
var k = this.aSignature[f];
var l = h + "." + this.sPayload + "." + k;
var e = false;
try {
e = a.verify(l, j, g);
} catch (i) {
return false;
}
return e;
};
this.readJWSJS = function (g) {
if (typeof g === "string") {
var f = d(g);
if (f == null) {
throw "argument is not safe JSON object string";
}
this.aHeader = f.headers;
this.sPayload = f.payload;
this.aSignature = f.signatures;
} else {
try {
if (g.headers.length > 0) {
this.aHeader = g.headers;
} else {
throw "malformed header";
}
if (typeof g.payload === "string") {
this.sPayload = g.payload;
} else {
throw "malformed signatures";
}
if (g.signatures.length > 0) {
this.aSignature = g.signatures;
} else {
throw "malformed signatures";
}
} catch (e) {
throw "malformed JWS-JS JSON object: " + e;
}
}
};
this.getJSON = function () {
return {
headers: this.aHeader,
payload: this.sPayload,
signatures: this.aSignature
};
};
this.isEmpty = function () {
if (this.aHeader.length == 0) {
return 1;
}
return 0;
};
};
exports.SecureRandom = SecureRandom;
exports.rng_seed_time = rng_seed_time;
exports.BigInteger = BigInteger;
exports.RSAKey = RSAKey;
exports.ECDSA = KJUR.crypto.ECDSA;
exports.DSA = KJUR.crypto.DSA;
exports.Signature = KJUR.crypto.Signature;
exports.MessageDigest = KJUR.crypto.MessageDigest;
exports.Mac = KJUR.crypto.Mac;
exports.Cipher = KJUR.crypto.Cipher;
exports.KEYUTIL = KEYUTIL;
exports.ASN1HEX = ASN1HEX;
exports.X509 = X509;
exports.X509CRL = X509CRL;
exports.CryptoJS = CryptoJS; // ext/base64.js
exports.b64tohex = b64tohex;
exports.b64toBA = b64toBA; // ext/ec*.js
exports.ECFieldElementFp = ECFieldElementFp;
exports.ECPointFp = ECPointFp;
exports.ECCurveFp = ECCurveFp; // base64x.js
exports.stoBA = stoBA;
exports.BAtos = BAtos;
exports.BAtohex = BAtohex;
exports.stohex = stohex;
exports.stob64 = stob64;
exports.stob64u = stob64u;
exports.b64utos = b64utos;
exports.b64tob64u = b64tob64u;
exports.b64utob64 = b64utob64;
exports.hex2b64 = hex2b64;
exports.hextob64u = hextob64u;
exports.b64utohex = b64utohex;
exports.utf8tob64u = utf8tob64u;
exports.b64utoutf8 = b64utoutf8;
exports.utf8tob64 = utf8tob64;
exports.b64toutf8 = b64toutf8;
exports.utf8tohex = utf8tohex;
exports.hextoutf8 = hextoutf8;
exports.hextorstr = hextorstr;
exports.rstrtohex = rstrtohex;
exports.hextob64 = hextob64;
exports.hextob64nl = hextob64nl;
exports.b64nltohex = b64nltohex;
exports.hextopem = hextopem;
exports.pemtohex = pemtohex;
exports.hextoArrayBuffer = hextoArrayBuffer;
exports.ArrayBuffertohex = ArrayBuffertohex;
exports.zulutomsec = zulutomsec;
exports.zulutosec = zulutosec;
exports.zulutodate = zulutodate;
exports.datetozulu = datetozulu;
exports.uricmptohex = uricmptohex;
exports.hextouricmp = hextouricmp;
exports.ipv6tohex = ipv6tohex;
exports.hextoipv6 = hextoipv6;
exports.hextoip = hextoip;
exports.iptohex = iptohex;
exports.encodeURIComponentAll = encodeURIComponentAll;
exports.newline_toUnix = newline_toUnix;
exports.newline_toDos = newline_toDos;
exports.hextoposhex = hextoposhex;
exports.intarystrtohex = intarystrtohex;
exports.strdiffidx = strdiffidx; // name spaces
exports.KJUR = KJUR;
exports.crypto = KJUR.crypto;
exports.asn1 = KJUR.asn1;
exports.jws = KJUR.jws;
exports.lang = KJUR.lang;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node-libs-browser/node_modules/buffer/index.js */ "../../node_modules/node-libs-browser/node_modules/buffer/index.js").Buffer))
/***/ }),
/***/ "../../node_modules/lodash/_Hash.js":
/*!*****************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_Hash.js ***!
\*****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var hashClear = __webpack_require__(/*! ./_hashClear */ "../../node_modules/lodash/_hashClear.js"),
hashDelete = __webpack_require__(/*! ./_hashDelete */ "../../node_modules/lodash/_hashDelete.js"),
hashGet = __webpack_require__(/*! ./_hashGet */ "../../node_modules/lodash/_hashGet.js"),
hashHas = __webpack_require__(/*! ./_hashHas */ "../../node_modules/lodash/_hashHas.js"),
hashSet = __webpack_require__(/*! ./_hashSet */ "../../node_modules/lodash/_hashSet.js");
/**
* Creates a hash object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Hash(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
} // Add methods to `Hash`.
Hash.prototype.clear = hashClear;
Hash.prototype['delete'] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
module.exports = Hash;
/***/ }),
/***/ "../../node_modules/lodash/_ListCache.js":
/*!**********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_ListCache.js ***!
\**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var listCacheClear = __webpack_require__(/*! ./_listCacheClear */ "../../node_modules/lodash/_listCacheClear.js"),
listCacheDelete = __webpack_require__(/*! ./_listCacheDelete */ "../../node_modules/lodash/_listCacheDelete.js"),
listCacheGet = __webpack_require__(/*! ./_listCacheGet */ "../../node_modules/lodash/_listCacheGet.js"),
listCacheHas = __webpack_require__(/*! ./_listCacheHas */ "../../node_modules/lodash/_listCacheHas.js"),
listCacheSet = __webpack_require__(/*! ./_listCacheSet */ "../../node_modules/lodash/_listCacheSet.js");
/**
* Creates an list cache object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function ListCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
} // Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
module.exports = ListCache;
/***/ }),
/***/ "../../node_modules/lodash/_Map.js":
/*!****************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_Map.js ***!
\****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(/*! ./_getNative */ "../../node_modules/lodash/_getNative.js"),
root = __webpack_require__(/*! ./_root */ "../../node_modules/lodash/_root.js");
/* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map');
module.exports = Map;
/***/ }),
/***/ "../../node_modules/lodash/_MapCache.js":
/*!*********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_MapCache.js ***!
\*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var mapCacheClear = __webpack_require__(/*! ./_mapCacheClear */ "../../node_modules/lodash/_mapCacheClear.js"),
mapCacheDelete = __webpack_require__(/*! ./_mapCacheDelete */ "../../node_modules/lodash/_mapCacheDelete.js"),
mapCacheGet = __webpack_require__(/*! ./_mapCacheGet */ "../../node_modules/lodash/_mapCacheGet.js"),
mapCacheHas = __webpack_require__(/*! ./_mapCacheHas */ "../../node_modules/lodash/_mapCacheHas.js"),
mapCacheSet = __webpack_require__(/*! ./_mapCacheSet */ "../../node_modules/lodash/_mapCacheSet.js");
/**
* Creates a map cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function MapCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
} // Add methods to `MapCache`.
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
module.exports = MapCache;
/***/ }),
/***/ "../../node_modules/lodash/_SetCache.js":
/*!*********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_SetCache.js ***!
\*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var MapCache = __webpack_require__(/*! ./_MapCache */ "../../node_modules/lodash/_MapCache.js"),
setCacheAdd = __webpack_require__(/*! ./_setCacheAdd */ "../../node_modules/lodash/_setCacheAdd.js"),
setCacheHas = __webpack_require__(/*! ./_setCacheHas */ "../../node_modules/lodash/_setCacheHas.js");
/**
*
* Creates an array cache object to store unique values.
*
* @private
* @constructor
* @param {Array} [values] The values to cache.
*/
function SetCache(values) {
var index = -1,
length = values == null ? 0 : values.length;
this.__data__ = new MapCache();
while (++index < length) {
this.add(values[index]);
}
} // Add methods to `SetCache`.
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;
module.exports = SetCache;
/***/ }),
/***/ "../../node_modules/lodash/_Symbol.js":
/*!*******************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_Symbol.js ***!
\*******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var root = __webpack_require__(/*! ./_root */ "../../node_modules/lodash/_root.js");
/** Built-in value references. */
var _Symbol = root.Symbol;
module.exports = _Symbol;
/***/ }),
/***/ "../../node_modules/lodash/_apply.js":
/*!******************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_apply.js ***!
\******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/**
* A faster alternative to `Function#apply`, this function invokes `func`
* with the `this` binding of `thisArg` and the arguments of `args`.
*
* @private
* @param {Function} func The function to invoke.
* @param {*} thisArg The `this` binding of `func`.
* @param {Array} args The arguments to invoke `func` with.
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg, args) {
switch (args.length) {
case 0:
return func.call(thisArg);
case 1:
return func.call(thisArg, args[0]);
case 2:
return func.call(thisArg, args[0], args[1]);
case 3:
return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
module.exports = apply;
/***/ }),
/***/ "../../node_modules/lodash/_arrayIncludes.js":
/*!**************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_arrayIncludes.js ***!
\**************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var baseIndexOf = __webpack_require__(/*! ./_baseIndexOf */ "../../node_modules/lodash/_baseIndexOf.js");
/**
* A specialized version of `_.includes` for arrays without support for
* specifying an index to search from.
*
* @private
* @param {Array} [array] The array to inspect.
* @param {*} target The value to search for.
* @returns {boolean} Returns `true` if `target` is found, else `false`.
*/
function arrayIncludes(array, value) {
var length = array == null ? 0 : array.length;
return !!length && baseIndexOf(array, value, 0) > -1;
}
module.exports = arrayIncludes;
/***/ }),
/***/ "../../node_modules/lodash/_arrayIncludesWith.js":
/*!******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_arrayIncludesWith.js ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/**
* This function is like `arrayIncludes` except that it accepts a comparator.
*
* @private
* @param {Array} [array] The array to inspect.
* @param {*} target The value to search for.
* @param {Function} comparator The comparator invoked per element.
* @returns {boolean} Returns `true` if `target` is found, else `false`.
*/
function arrayIncludesWith(array, value, comparator) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (comparator(value, array[index])) {
return true;
}
}
return false;
}
module.exports = arrayIncludesWith;
/***/ }),
/***/ "../../node_modules/lodash/_arrayMap.js":
/*!*********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_arrayMap.js ***!
\*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/**
* A specialized version of `_.map` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
*/
function arrayMap(array, iteratee) {
var index = -1,
length = array == null ? 0 : array.length,
result = Array(length);
while (++index < length) {
result[index] = iteratee(array[index], index, array);
}
return result;
}
module.exports = arrayMap;
/***/ }),
/***/ "../../node_modules/lodash/_arrayPush.js":
/*!**********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_arrayPush.js ***!
\**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/**
* Appends the elements of `values` to `array`.
*
* @private
* @param {Array} array The array to modify.
* @param {Array} values The values to append.
* @returns {Array} Returns `array`.
*/
function arrayPush(array, values) {
var index = -1,
length = values.length,
offset = array.length;
while (++index < length) {
array[offset + index] = values[index];
}
return array;
}
module.exports = arrayPush;
/***/ }),
/***/ "../../node_modules/lodash/_assocIndexOf.js":
/*!*************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_assocIndexOf.js ***!
\*************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var eq = __webpack_require__(/*! ./eq */ "../../node_modules/lodash/eq.js");
/**
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
module.exports = assocIndexOf;
/***/ }),
/***/ "../../node_modules/lodash/_baseDifference.js":
/*!***************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_baseDifference.js ***!
\***************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var SetCache = __webpack_require__(/*! ./_SetCache */ "../../node_modules/lodash/_SetCache.js"),
arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ "../../node_modules/lodash/_arrayIncludes.js"),
arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ "../../node_modules/lodash/_arrayIncludesWith.js"),
arrayMap = __webpack_require__(/*! ./_arrayMap */ "../../node_modules/lodash/_arrayMap.js"),
baseUnary = __webpack_require__(/*! ./_baseUnary */ "../../node_modules/lodash/_baseUnary.js"),
cacheHas = __webpack_require__(/*! ./_cacheHas */ "../../node_modules/lodash/_cacheHas.js");
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/**
* The base implementation of methods like `_.difference` without support
* for excluding multiple arrays or iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Array} values The values to exclude.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of filtered values.
*/
function baseDifference(array, values, iteratee, comparator) {
var index = -1,
includes = arrayIncludes,
isCommon = true,
length = array.length,
result = [],
valuesLength = values.length;
if (!length) {
return result;
}
if (iteratee) {
values = arrayMap(values, baseUnary(iteratee));
}
if (comparator) {
includes = arrayIncludesWith;
isCommon = false;
} else if (values.length >= LARGE_ARRAY_SIZE) {
includes = cacheHas;
isCommon = false;
values = new SetCache(values);
}
outer: while (++index < length) {
var value = array[index],
computed = iteratee == null ? value : iteratee(value);
value = comparator || value !== 0 ? value : 0;
if (isCommon && computed === computed) {
var valuesIndex = valuesLength;
while (valuesIndex--) {
if (values[valuesIndex] === computed) {
continue outer;
}
}
result.push(value);
} else if (!includes(values, computed, comparator)) {
result.push(value);
}
}
return result;
}
module.exports = baseDifference;
/***/ }),
/***/ "../../node_modules/lodash/_baseFindIndex.js":
/*!**************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_baseFindIndex.js ***!
\**************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/**
* The base implementation of `_.findIndex` and `_.findLastIndex` without
* support for iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Function} predicate The function invoked per iteration.
* @param {number} fromIndex The index to search from.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseFindIndex(array, predicate, fromIndex, fromRight) {
var length = array.length,
index = fromIndex + (fromRight ? 1 : -1);
while (fromRight ? index-- : ++index < length) {
if (predicate(array[index], index, array)) {
return index;
}
}
return -1;
}
module.exports = baseFindIndex;
/***/ }),
/***/ "../../node_modules/lodash/_baseFlatten.js":
/*!************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_baseFlatten.js ***!
\************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var arrayPush = __webpack_require__(/*! ./_arrayPush */ "../../node_modules/lodash/_arrayPush.js"),
isFlattenable = __webpack_require__(/*! ./_isFlattenable */ "../../node_modules/lodash/_isFlattenable.js");
/**
* The base implementation of `_.flatten` with support for restricting flattening.
*
* @private
* @param {Array} array The array to flatten.
* @param {number} depth The maximum recursion depth.
* @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
* @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
* @param {Array} [result=[]] The initial result value.
* @returns {Array} Returns the new flattened array.
*/
function baseFlatten(array, depth, predicate, isStrict, result) {
var index = -1,
length = array.length;
predicate || (predicate = isFlattenable);
result || (result = []);
while (++index < length) {
var value = array[index];
if (depth > 0 && predicate(value)) {
if (depth > 1) {
// Recursively flatten arrays (susceptible to call stack limits).
baseFlatten(value, depth - 1, predicate, isStrict, result);
} else {
arrayPush(result, value);
}
} else if (!isStrict) {
result[result.length] = value;
}
}
return result;
}
module.exports = baseFlatten;
/***/ }),
/***/ "../../node_modules/lodash/_baseGetTag.js":
/*!***********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_baseGetTag.js ***!
\***********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var _Symbol = __webpack_require__(/*! ./_Symbol */ "../../node_modules/lodash/_Symbol.js"),
getRawTag = __webpack_require__(/*! ./_getRawTag */ "../../node_modules/lodash/_getRawTag.js"),
objectToString = __webpack_require__(/*! ./_objectToString */ "../../node_modules/lodash/_objectToString.js");
/** `Object#toString` result references. */
var nullTag = '[object Null]',
undefinedTag = '[object Undefined]';
/** Built-in value references. */
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
/**
* The base implementation of `getTag` without fallbacks for buggy environments.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
function baseGetTag(value) {
if (value == null) {
return value === undefined ? undefinedTag : nullTag;
}
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
}
module.exports = baseGetTag;
/***/ }),
/***/ "../../node_modules/lodash/_baseIndexOf.js":
/*!************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_baseIndexOf.js ***!
\************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var baseFindIndex = __webpack_require__(/*! ./_baseFindIndex */ "../../node_modules/lodash/_baseFindIndex.js"),
baseIsNaN = __webpack_require__(/*! ./_baseIsNaN */ "../../node_modules/lodash/_baseIsNaN.js"),
strictIndexOf = __webpack_require__(/*! ./_strictIndexOf */ "../../node_modules/lodash/_strictIndexOf.js");
/**
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseIndexOf(array, value, fromIndex) {
return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
}
module.exports = baseIndexOf;
/***/ }),
/***/ "../../node_modules/lodash/_baseIntersection.js":
/*!*****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_baseIntersection.js ***!
\*****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var SetCache = __webpack_require__(/*! ./_SetCache */ "../../node_modules/lodash/_SetCache.js"),
arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ "../../node_modules/lodash/_arrayIncludes.js"),
arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ "../../node_modules/lodash/_arrayIncludesWith.js"),
arrayMap = __webpack_require__(/*! ./_arrayMap */ "../../node_modules/lodash/_arrayMap.js"),
baseUnary = __webpack_require__(/*! ./_baseUnary */ "../../node_modules/lodash/_baseUnary.js"),
cacheHas = __webpack_require__(/*! ./_cacheHas */ "../../node_modules/lodash/_cacheHas.js");
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMin = Math.min;
/**
* The base implementation of methods like `_.intersection`, without support
* for iteratee shorthands, that accepts an array of arrays to inspect.
*
* @private
* @param {Array} arrays The arrays to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of shared values.
*/
function baseIntersection(arrays, iteratee, comparator) {
var includes = comparator ? arrayIncludesWith : arrayIncludes,
length = arrays[0].length,
othLength = arrays.length,
othIndex = othLength,
caches = Array(othLength),
maxLength = Infinity,
result = [];
while (othIndex--) {
var array = arrays[othIndex];
if (othIndex && iteratee) {
array = arrayMap(array, baseUnary(iteratee));
}
maxLength = nativeMin(array.length, maxLength);
caches[othIndex] = !comparator && (iteratee || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined;
}
array = arrays[0];
var index = -1,
seen = caches[0];
outer: while (++index < length && result.length < maxLength) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
value = comparator || value !== 0 ? value : 0;
if (!(seen ? cacheHas(seen, computed) : includes(result, computed, comparator))) {
othIndex = othLength;
while (--othIndex) {
var cache = caches[othIndex];
if (!(cache ? cacheHas(cache, computed) : includes(arrays[othIndex], computed, comparator))) {
continue outer;
}
}
if (seen) {
seen.push(computed);
}
result.push(value);
}
}
return result;
}
module.exports = baseIntersection;
/***/ }),
/***/ "../../node_modules/lodash/_baseIsArguments.js":
/*!****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_baseIsArguments.js ***!
\****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "../../node_modules/lodash/_baseGetTag.js"),
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "../../node_modules/lodash/isObjectLike.js");
/** `Object#toString` result references. */
var argsTag = '[object Arguments]';
/**
* The base implementation of `_.isArguments`.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
*/
function baseIsArguments(value) {
return isObjectLike(value) && baseGetTag(value) == argsTag;
}
module.exports = baseIsArguments;
/***/ }),
/***/ "../../node_modules/lodash/_baseIsNaN.js":
/*!**********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_baseIsNaN.js ***!
\**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/**
* The base implementation of `_.isNaN` without support for number objects.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
*/
function baseIsNaN(value) {
return value !== value;
}
module.exports = baseIsNaN;
/***/ }),
/***/ "../../node_modules/lodash/_baseIsNative.js":
/*!*************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_baseIsNative.js ***!
\*************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isFunction = __webpack_require__(/*! ./isFunction */ "../../node_modules/lodash/isFunction.js"),
isMasked = __webpack_require__(/*! ./_isMasked */ "../../node_modules/lodash/_isMasked.js"),
isObject = __webpack_require__(/*! ./isObject */ "../../node_modules/lodash/isObject.js"),
toSource = __webpack_require__(/*! ./_toSource */ "../../node_modules/lodash/_toSource.js");
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used for built-in method references. */
var funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to detect if a method is native. */
var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
/**
* The base implementation of `_.isNative` without bad shim checks.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function,
* else `false`.
*/
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
module.exports = baseIsNative;
/***/ }),
/***/ "../../node_modules/lodash/_baseRest.js":
/*!*********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_baseRest.js ***!
\*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var identity = __webpack_require__(/*! ./identity */ "../../node_modules/lodash/identity.js"),
overRest = __webpack_require__(/*! ./_overRest */ "../../node_modules/lodash/_overRest.js"),
setToString = __webpack_require__(/*! ./_setToString */ "../../node_modules/lodash/_setToString.js");
/**
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @returns {Function} Returns the new function.
*/
function baseRest(func, start) {
return setToString(overRest(func, start, identity), func + '');
}
module.exports = baseRest;
/***/ }),
/***/ "../../node_modules/lodash/_baseSetToString.js":
/*!****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_baseSetToString.js ***!
\****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var constant = __webpack_require__(/*! ./constant */ "../../node_modules/lodash/constant.js"),
defineProperty = __webpack_require__(/*! ./_defineProperty */ "../../node_modules/lodash/_defineProperty.js"),
identity = __webpack_require__(/*! ./identity */ "../../node_modules/lodash/identity.js");
/**
* The base implementation of `setToString` without support for hot loop shorting.
*
* @private
* @param {Function} func The function to modify.
* @param {Function} string The `toString` result.
* @returns {Function} Returns `func`.
*/
var baseSetToString = !defineProperty ? identity : function (func, string) {
return defineProperty(func, 'toString', {
'configurable': true,
'enumerable': false,
'value': constant(string),
'writable': true
});
};
module.exports = baseSetToString;
/***/ }),
/***/ "../../node_modules/lodash/_baseUnary.js":
/*!**********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_baseUnary.js ***!
\**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/**
* The base implementation of `_.unary` without support for storing metadata.
*
* @private
* @param {Function} func The function to cap arguments for.
* @returns {Function} Returns the new capped function.
*/
function baseUnary(func) {
return function (value) {
return func(value);
};
}
module.exports = baseUnary;
/***/ }),
/***/ "../../node_modules/lodash/_cacheHas.js":
/*!*********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_cacheHas.js ***!
\*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/**
* Checks if a `cache` value for `key` exists.
*
* @private
* @param {Object} cache The cache to query.
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function cacheHas(cache, key) {
return cache.has(key);
}
module.exports = cacheHas;
/***/ }),
/***/ "../../node_modules/lodash/_castArrayLikeObject.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_castArrayLikeObject.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "../../node_modules/lodash/isArrayLikeObject.js");
/**
* Casts `value` to an empty array if it's not an array like object.
*
* @private
* @param {*} value The value to inspect.
* @returns {Array|Object} Returns the cast array-like object.
*/
function castArrayLikeObject(value) {
return isArrayLikeObject(value) ? value : [];
}
module.exports = castArrayLikeObject;
/***/ }),
/***/ "../../node_modules/lodash/_coreJsData.js":
/*!***********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_coreJsData.js ***!
\***********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var root = __webpack_require__(/*! ./_root */ "../../node_modules/lodash/_root.js");
/** Used to detect overreaching core-js shims. */
var coreJsData = root['__core-js_shared__'];
module.exports = coreJsData;
/***/ }),
/***/ "../../node_modules/lodash/_defineProperty.js":
/*!***************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_defineProperty.js ***!
\***************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(/*! ./_getNative */ "../../node_modules/lodash/_getNative.js");
var defineProperty = function () {
try {
var func = getNative(Object, 'defineProperty');
func({}, '', {});
return func;
} catch (e) {}
}();
module.exports = defineProperty;
/***/ }),
/***/ "../../node_modules/lodash/_freeGlobal.js":
/*!***********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_freeGlobal.js ***!
\***********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
/** Detect free variable `global` from Node.js. */
var freeGlobal = (typeof global === "undefined" ? "undefined" : _typeof(global)) == 'object' && global && global.Object === Object && global;
module.exports = freeGlobal;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "../../node_modules/webpack/buildin/global.js")))
/***/ }),
/***/ "../../node_modules/lodash/_getMapData.js":
/*!***********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_getMapData.js ***!
\***********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isKeyable = __webpack_require__(/*! ./_isKeyable */ "../../node_modules/lodash/_isKeyable.js");
/**
* Gets the data for `map`.
*
* @private
* @param {Object} map The map to query.
* @param {string} key The reference key.
* @returns {*} Returns the map data.
*/
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
}
module.exports = getMapData;
/***/ }),
/***/ "../../node_modules/lodash/_getNative.js":
/*!**********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_getNative.js ***!
\**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var baseIsNative = __webpack_require__(/*! ./_baseIsNative */ "../../node_modules/lodash/_baseIsNative.js"),
getValue = __webpack_require__(/*! ./_getValue */ "../../node_modules/lodash/_getValue.js");
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : undefined;
}
module.exports = getNative;
/***/ }),
/***/ "../../node_modules/lodash/_getRawTag.js":
/*!**********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_getRawTag.js ***!
\**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var _Symbol = __webpack_require__(/*! ./_Symbol */ "../../node_modules/lodash/_Symbol.js");
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var nativeObjectToString = objectProto.toString;
/** Built-in value references. */
var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
/**
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the raw `toStringTag`.
*/
function getRawTag(value) {
var isOwn = hasOwnProperty.call(value, symToStringTag),
tag = value[symToStringTag];
try {
value[symToStringTag] = undefined;
var unmasked = true;
} catch (e) {}
var result = nativeObjectToString.call(value);
if (unmasked) {
if (isOwn) {
value[symToStringTag] = tag;
} else {
delete value[symToStringTag];
}
}
return result;
}
module.exports = getRawTag;
/***/ }),
/***/ "../../node_modules/lodash/_getValue.js":
/*!*********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_getValue.js ***!
\*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/**
* Gets the value at `key` of `object`.
*
* @private
* @param {Object} [object] The object to query.
* @param {string} key The key of the property to get.
* @returns {*} Returns the property value.
*/
function getValue(object, key) {
return object == null ? undefined : object[key];
}
module.exports = getValue;
/***/ }),
/***/ "../../node_modules/lodash/_hashClear.js":
/*!**********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_hashClear.js ***!
\**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "../../node_modules/lodash/_nativeCreate.js");
/**
* Removes all key-value entries from the hash.
*
* @private
* @name clear
* @memberOf Hash
*/
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
this.size = 0;
}
module.exports = hashClear;
/***/ }),
/***/ "../../node_modules/lodash/_hashDelete.js":
/*!***********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_hashDelete.js ***!
\***********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/**
* Removes `key` and its value from the hash.
*
* @private
* @name delete
* @memberOf Hash
* @param {Object} hash The hash to modify.
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function hashDelete(key) {
var result = this.has(key) && delete this.__data__[key];
this.size -= result ? 1 : 0;
return result;
}
module.exports = hashDelete;
/***/ }),
/***/ "../../node_modules/lodash/_hashGet.js":
/*!********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_hashGet.js ***!
\********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "../../node_modules/lodash/_nativeCreate.js");
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Gets the hash value for `key`.
*
* @private
* @name get
* @memberOf Hash
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? undefined : result;
}
return hasOwnProperty.call(data, key) ? data[key] : undefined;
}
module.exports = hashGet;
/***/ }),
/***/ "../../node_modules/lodash/_hashHas.js":
/*!********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_hashHas.js ***!
\********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "../../node_modules/lodash/_nativeCreate.js");
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Checks if a hash value for `key` exists.
*
* @private
* @name has
* @memberOf Hash
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
}
module.exports = hashHas;
/***/ }),
/***/ "../../node_modules/lodash/_hashSet.js":
/*!********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_hashSet.js ***!
\********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "../../node_modules/lodash/_nativeCreate.js");
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/**
* Sets the hash `key` to `value`.
*
* @private
* @name set
* @memberOf Hash
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the hash instance.
*/
function hashSet(key, value) {
var data = this.__data__;
this.size += this.has(key) ? 0 : 1;
data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
return this;
}
module.exports = hashSet;
/***/ }),
/***/ "../../node_modules/lodash/_isFlattenable.js":
/*!**************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_isFlattenable.js ***!
\**************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var _Symbol = __webpack_require__(/*! ./_Symbol */ "../../node_modules/lodash/_Symbol.js"),
isArguments = __webpack_require__(/*! ./isArguments */ "../../node_modules/lodash/isArguments.js"),
isArray = __webpack_require__(/*! ./isArray */ "../../node_modules/lodash/isArray.js");
/** Built-in value references. */
var spreadableSymbol = _Symbol ? _Symbol.isConcatSpreadable : undefined;
/**
* Checks if `value` is a flattenable `arguments` object or array.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
*/
function isFlattenable(value) {
return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
}
module.exports = isFlattenable;
/***/ }),
/***/ "../../node_modules/lodash/_isKeyable.js":
/*!**********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_isKeyable.js ***!
\**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
/**
* Checks if `value` is suitable for use as unique object key.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
*/
function isKeyable(value) {
var type = _typeof(value);
return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
}
module.exports = isKeyable;
/***/ }),
/***/ "../../node_modules/lodash/_isMasked.js":
/*!*********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_isMasked.js ***!
\*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var coreJsData = __webpack_require__(/*! ./_coreJsData */ "../../node_modules/lodash/_coreJsData.js");
/** Used to detect methods masquerading as native. */
var maskSrcKey = function () {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
return uid ? 'Symbol(src)_1.' + uid : '';
}();
/**
* Checks if `func` has its source masked.
*
* @private
* @param {Function} func The function to check.
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
*/
function isMasked(func) {
return !!maskSrcKey && maskSrcKey in func;
}
module.exports = isMasked;
/***/ }),
/***/ "../../node_modules/lodash/_listCacheClear.js":
/*!***************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_listCacheClear.js ***!
\***************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/**
* Removes all key-value entries from the list cache.
*
* @private
* @name clear
* @memberOf ListCache
*/
function listCacheClear() {
this.__data__ = [];
this.size = 0;
}
module.exports = listCacheClear;
/***/ }),
/***/ "../../node_modules/lodash/_listCacheDelete.js":
/*!****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_listCacheDelete.js ***!
\****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "../../node_modules/lodash/_assocIndexOf.js");
/** Used for built-in method references. */
var arrayProto = Array.prototype;
/** Built-in value references. */
var splice = arrayProto.splice;
/**
* Removes `key` and its value from the list cache.
*
* @private
* @name delete
* @memberOf ListCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function listCacheDelete(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
--this.size;
return true;
}
module.exports = listCacheDelete;
/***/ }),
/***/ "../../node_modules/lodash/_listCacheGet.js":
/*!*************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_listCacheGet.js ***!
\*************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "../../node_modules/lodash/_assocIndexOf.js");
/**
* Gets the list cache value for `key`.
*
* @private
* @name get
* @memberOf ListCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function listCacheGet(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
return index < 0 ? undefined : data[index][1];
}
module.exports = listCacheGet;
/***/ }),
/***/ "../../node_modules/lodash/_listCacheHas.js":
/*!*************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_listCacheHas.js ***!
\*************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "../../node_modules/lodash/_assocIndexOf.js");
/**
* Checks if a list cache value for `key` exists.
*
* @private
* @name has
* @memberOf ListCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
module.exports = listCacheHas;
/***/ }),
/***/ "../../node_modules/lodash/_listCacheSet.js":
/*!*************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_listCacheSet.js ***!
\*************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "../../node_modules/lodash/_assocIndexOf.js");
/**
* Sets the list cache `key` to `value`.
*
* @private
* @name set
* @memberOf ListCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the list cache instance.
*/
function listCacheSet(key, value) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
++this.size;
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
module.exports = listCacheSet;
/***/ }),
/***/ "../../node_modules/lodash/_mapCacheClear.js":
/*!**************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_mapCacheClear.js ***!
\**************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var Hash = __webpack_require__(/*! ./_Hash */ "../../node_modules/lodash/_Hash.js"),
ListCache = __webpack_require__(/*! ./_ListCache */ "../../node_modules/lodash/_ListCache.js"),
Map = __webpack_require__(/*! ./_Map */ "../../node_modules/lodash/_Map.js");
/**
* Removes all key-value entries from the map.
*
* @private
* @name clear
* @memberOf MapCache
*/
function mapCacheClear() {
this.size = 0;
this.__data__ = {
'hash': new Hash(),
'map': new (Map || ListCache)(),
'string': new Hash()
};
}
module.exports = mapCacheClear;
/***/ }),
/***/ "../../node_modules/lodash/_mapCacheDelete.js":
/*!***************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_mapCacheDelete.js ***!
\***************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(/*! ./_getMapData */ "../../node_modules/lodash/_getMapData.js");
/**
* Removes `key` and its value from the map.
*
* @private
* @name delete
* @memberOf MapCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function mapCacheDelete(key) {
var result = getMapData(this, key)['delete'](key);
this.size -= result ? 1 : 0;
return result;
}
module.exports = mapCacheDelete;
/***/ }),
/***/ "../../node_modules/lodash/_mapCacheGet.js":
/*!************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_mapCacheGet.js ***!
\************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(/*! ./_getMapData */ "../../node_modules/lodash/_getMapData.js");
/**
* Gets the map value for `key`.
*
* @private
* @name get
* @memberOf MapCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
module.exports = mapCacheGet;
/***/ }),
/***/ "../../node_modules/lodash/_mapCacheHas.js":
/*!************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_mapCacheHas.js ***!
\************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(/*! ./_getMapData */ "../../node_modules/lodash/_getMapData.js");
/**
* Checks if a map value for `key` exists.
*
* @private
* @name has
* @memberOf MapCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
module.exports = mapCacheHas;
/***/ }),
/***/ "../../node_modules/lodash/_mapCacheSet.js":
/*!************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_mapCacheSet.js ***!
\************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var getMapData = __webpack_require__(/*! ./_getMapData */ "../../node_modules/lodash/_getMapData.js");
/**
* Sets the map `key` to `value`.
*
* @private
* @name set
* @memberOf MapCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the map cache instance.
*/
function mapCacheSet(key, value) {
var data = getMapData(this, key),
size = data.size;
data.set(key, value);
this.size += data.size == size ? 0 : 1;
return this;
}
module.exports = mapCacheSet;
/***/ }),
/***/ "../../node_modules/lodash/_nativeCreate.js":
/*!*************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_nativeCreate.js ***!
\*************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var getNative = __webpack_require__(/*! ./_getNative */ "../../node_modules/lodash/_getNative.js");
/* Built-in method references that are verified to be native. */
var nativeCreate = getNative(Object, 'create');
module.exports = nativeCreate;
/***/ }),
/***/ "../../node_modules/lodash/_objectToString.js":
/*!***************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_objectToString.js ***!
\***************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var nativeObjectToString = objectProto.toString;
/**
* Converts `value` to a string using `Object.prototype.toString`.
*
* @private
* @param {*} value The value to convert.
* @returns {string} Returns the converted string.
*/
function objectToString(value) {
return nativeObjectToString.call(value);
}
module.exports = objectToString;
/***/ }),
/***/ "../../node_modules/lodash/_overRest.js":
/*!*********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_overRest.js ***!
\*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var apply = __webpack_require__(/*! ./_apply */ "../../node_modules/lodash/_apply.js");
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* A specialized version of `baseRest` which transforms the rest array.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @param {Function} transform The rest array transform.
* @returns {Function} Returns the new function.
*/
function overRest(func, start, transform) {
start = nativeMax(start === undefined ? func.length - 1 : start, 0);
return function () {
var args = arguments,
index = -1,
length = nativeMax(args.length - start, 0),
array = Array(length);
while (++index < length) {
array[index] = args[start + index];
}
index = -1;
var otherArgs = Array(start + 1);
while (++index < start) {
otherArgs[index] = args[index];
}
otherArgs[start] = transform(array);
return apply(func, this, otherArgs);
};
}
module.exports = overRest;
/***/ }),
/***/ "../../node_modules/lodash/_root.js":
/*!*****************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_root.js ***!
\*****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "../../node_modules/lodash/_freeGlobal.js");
/** Detect free variable `self`. */
var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof(self)) == 'object' && self && self.Object === Object && self;
/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();
module.exports = root;
/***/ }),
/***/ "../../node_modules/lodash/_setCacheAdd.js":
/*!************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_setCacheAdd.js ***!
\************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/**
* Adds `value` to the array cache.
*
* @private
* @name add
* @memberOf SetCache
* @alias push
* @param {*} value The value to cache.
* @returns {Object} Returns the cache instance.
*/
function setCacheAdd(value) {
this.__data__.set(value, HASH_UNDEFINED);
return this;
}
module.exports = setCacheAdd;
/***/ }),
/***/ "../../node_modules/lodash/_setCacheHas.js":
/*!************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_setCacheHas.js ***!
\************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/**
* Checks if `value` is in the array cache.
*
* @private
* @name has
* @memberOf SetCache
* @param {*} value The value to search for.
* @returns {number} Returns `true` if `value` is found, else `false`.
*/
function setCacheHas(value) {
return this.__data__.has(value);
}
module.exports = setCacheHas;
/***/ }),
/***/ "../../node_modules/lodash/_setToString.js":
/*!************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_setToString.js ***!
\************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var baseSetToString = __webpack_require__(/*! ./_baseSetToString */ "../../node_modules/lodash/_baseSetToString.js"),
shortOut = __webpack_require__(/*! ./_shortOut */ "../../node_modules/lodash/_shortOut.js");
/**
* Sets the `toString` method of `func` to return `string`.
*
* @private
* @param {Function} func The function to modify.
* @param {Function} string The `toString` result.
* @returns {Function} Returns `func`.
*/
var setToString = shortOut(baseSetToString);
module.exports = setToString;
/***/ }),
/***/ "../../node_modules/lodash/_shortOut.js":
/*!*********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_shortOut.js ***!
\*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/** Used to detect hot functions by number of calls within a span of milliseconds. */
var HOT_COUNT = 800,
HOT_SPAN = 16;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeNow = Date.now;
/**
* Creates a function that'll short out and invoke `identity` instead
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
* milliseconds.
*
* @private
* @param {Function} func The function to restrict.
* @returns {Function} Returns the new shortable function.
*/
function shortOut(func) {
var count = 0,
lastCalled = 0;
return function () {
var stamp = nativeNow(),
remaining = HOT_SPAN - (stamp - lastCalled);
lastCalled = stamp;
if (remaining > 0) {
if (++count >= HOT_COUNT) {
return arguments[0];
}
} else {
count = 0;
}
return func.apply(undefined, arguments);
};
}
module.exports = shortOut;
/***/ }),
/***/ "../../node_modules/lodash/_strictIndexOf.js":
/*!**************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_strictIndexOf.js ***!
\**************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/**
* A specialized version of `_.indexOf` which performs strict equality
* comparisons of values, i.e. `===`.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function strictIndexOf(array, value, fromIndex) {
var index = fromIndex - 1,
length = array.length;
while (++index < length) {
if (array[index] === value) {
return index;
}
}
return -1;
}
module.exports = strictIndexOf;
/***/ }),
/***/ "../../node_modules/lodash/_toSource.js":
/*!*********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/_toSource.js ***!
\*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/** Used for built-in method references. */
var funcProto = Function.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/**
* Converts `func` to its source code.
*
* @private
* @param {Function} func The function to convert.
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return func + '';
} catch (e) {}
}
return '';
}
module.exports = toSource;
/***/ }),
/***/ "../../node_modules/lodash/constant.js":
/*!********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/constant.js ***!
\********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/**
* Creates a function that returns `value`.
*
* @static
* @memberOf _
* @since 2.4.0
* @category Util
* @param {*} value The value to return from the new function.
* @returns {Function} Returns the new constant function.
* @example
*
* var objects = _.times(2, _.constant({ 'a': 1 }));
*
* console.log(objects);
* // => [{ 'a': 1 }, { 'a': 1 }]
*
* console.log(objects[0] === objects[1]);
* // => true
*/
function constant(value) {
return function () {
return value;
};
}
module.exports = constant;
/***/ }),
/***/ "../../node_modules/lodash/debounce.js":
/*!********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/debounce.js ***!
\********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ./isObject */ "../../node_modules/lodash/isObject.js"),
now = __webpack_require__(/*! ./now */ "../../node_modules/lodash/now.js"),
toNumber = __webpack_require__(/*! ./toNumber */ "../../node_modules/lodash/toNumber.js");
/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max,
nativeMin = Math.min;
/**
* Creates a debounced function that delays invoking `func` until after `wait`
* milliseconds have elapsed since the last time the debounced function was
* invoked. The debounced function comes with a `cancel` method to cancel
* delayed `func` invocations and a `flush` method to immediately invoke them.
* Provide `options` to indicate whether `func` should be invoked on the
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
* with the last arguments provided to the debounced function. Subsequent
* calls to the debounced function return the result of the last `func`
* invocation.
*
* **Note:** If `leading` and `trailing` options are `true`, `func` is
* invoked on the trailing edge of the timeout only if the debounced function
* is invoked more than once during the `wait` timeout.
*
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
*
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
* for details over the differences between `_.debounce` and `_.throttle`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to debounce.
* @param {number} [wait=0] The number of milliseconds to delay.
* @param {Object} [options={}] The options object.
* @param {boolean} [options.leading=false]
* Specify invoking on the leading edge of the timeout.
* @param {number} [options.maxWait]
* The maximum time `func` is allowed to be delayed before it's invoked.
* @param {boolean} [options.trailing=true]
* Specify invoking on the trailing edge of the timeout.
* @returns {Function} Returns the new debounced function.
* @example
*
* // Avoid costly calculations while the window size is in flux.
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
*
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
* jQuery(element).on('click', _.debounce(sendMail, 300, {
* 'leading': true,
* 'trailing': false
* }));
*
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
* var source = new EventSource('/stream');
* jQuery(source).on('message', debounced);
*
* // Cancel the trailing debounced invocation.
* jQuery(window).on('popstate', debounced.cancel);
*/
function debounce(func, wait, options) {
var lastArgs,
lastThis,
maxWait,
result,
timerId,
lastCallTime,
lastInvokeTime = 0,
leading = false,
maxing = false,
trailing = true;
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
wait = toNumber(wait) || 0;
if (isObject(options)) {
leading = !!options.leading;
maxing = 'maxWait' in options;
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
trailing = 'trailing' in options ? !!options.trailing : trailing;
}
function invokeFunc(time) {
var args = lastArgs,
thisArg = lastThis;
lastArgs = lastThis = undefined;
lastInvokeTime = time;
result = func.apply(thisArg, args);
return result;
}
function leadingEdge(time) {
// Reset any `maxWait` timer.
lastInvokeTime = time; // Start the timer for the trailing edge.
timerId = setTimeout(timerExpired, wait); // Invoke the leading edge.
return leading ? invokeFunc(time) : result;
}
function remainingWait(time) {
var timeSinceLastCall = time - lastCallTime,
timeSinceLastInvoke = time - lastInvokeTime,
timeWaiting = wait - timeSinceLastCall;
return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
}
function shouldInvoke(time) {
var timeSinceLastCall = time - lastCallTime,
timeSinceLastInvoke = time - lastInvokeTime; // Either this is the first call, activity has stopped and we're at the
// trailing edge, the system time has gone backwards and we're treating
// it as the trailing edge, or we've hit the `maxWait` limit.
return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
}
function timerExpired() {
var time = now();
if (shouldInvoke(time)) {
return trailingEdge(time);
} // Restart the timer.
timerId = setTimeout(timerExpired, remainingWait(time));
}
function trailingEdge(time) {
timerId = undefined; // Only invoke if we have `lastArgs` which means `func` has been
// debounced at least once.
if (trailing && lastArgs) {
return invokeFunc(time);
}
lastArgs = lastThis = undefined;
return result;
}
function cancel() {
if (timerId !== undefined) {
clearTimeout(timerId);
}
lastInvokeTime = 0;
lastArgs = lastCallTime = lastThis = timerId = undefined;
}
function flush() {
return timerId === undefined ? result : trailingEdge(now());
}
function debounced() {
var time = now(),
isInvoking = shouldInvoke(time);
lastArgs = arguments;
lastThis = this;
lastCallTime = time;
if (isInvoking) {
if (timerId === undefined) {
return leadingEdge(lastCallTime);
}
if (maxing) {
// Handle invocations in a tight loop.
clearTimeout(timerId);
timerId = setTimeout(timerExpired, wait);
return invokeFunc(lastCallTime);
}
}
if (timerId === undefined) {
timerId = setTimeout(timerExpired, wait);
}
return result;
}
debounced.cancel = cancel;
debounced.flush = flush;
return debounced;
}
module.exports = debounce;
/***/ }),
/***/ "../../node_modules/lodash/difference.js":
/*!**********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/difference.js ***!
\**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var baseDifference = __webpack_require__(/*! ./_baseDifference */ "../../node_modules/lodash/_baseDifference.js"),
baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "../../node_modules/lodash/_baseFlatten.js"),
baseRest = __webpack_require__(/*! ./_baseRest */ "../../node_modules/lodash/_baseRest.js"),
isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "../../node_modules/lodash/isArrayLikeObject.js");
/**
* Creates an array of `array` values not included in the other given arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons. The order and references of result values are
* determined by the first array.
*
* **Note:** Unlike `_.pullAll`, this method returns a new array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {...Array} [values] The values to exclude.
* @returns {Array} Returns the new array of filtered values.
* @see _.without, _.xor
* @example
*
* _.difference([2, 1], [2, 3]);
* // => [1]
*/
var difference = baseRest(function (array, values) {
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : [];
});
module.exports = difference;
/***/ }),
/***/ "../../node_modules/lodash/eq.js":
/*!**************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/eq.js ***!
\**************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* var object = { 'a': 1 };
* var other = { 'a': 1 };
*
* _.eq(object, object);
* // => true
*
* _.eq(object, other);
* // => false
*
* _.eq('a', 'a');
* // => true
*
* _.eq('a', Object('a'));
* // => false
*
* _.eq(NaN, NaN);
* // => true
*/
function eq(value, other) {
return value === other || value !== value && other !== other;
}
module.exports = eq;
/***/ }),
/***/ "../../node_modules/lodash/identity.js":
/*!********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/identity.js ***!
\********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/**
* This method returns the first argument it receives.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {*} value Any value.
* @returns {*} Returns `value`.
* @example
*
* var object = { 'a': 1 };
*
* console.log(_.identity(object) === object);
* // => true
*/
function identity(value) {
return value;
}
module.exports = identity;
/***/ }),
/***/ "../../node_modules/lodash/intersection.js":
/*!************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/intersection.js ***!
\************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var arrayMap = __webpack_require__(/*! ./_arrayMap */ "../../node_modules/lodash/_arrayMap.js"),
baseIntersection = __webpack_require__(/*! ./_baseIntersection */ "../../node_modules/lodash/_baseIntersection.js"),
baseRest = __webpack_require__(/*! ./_baseRest */ "../../node_modules/lodash/_baseRest.js"),
castArrayLikeObject = __webpack_require__(/*! ./_castArrayLikeObject */ "../../node_modules/lodash/_castArrayLikeObject.js");
/**
* Creates an array of unique values that are included in all given arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons. The order and references of result values are
* determined by the first array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @returns {Array} Returns the new array of intersecting values.
* @example
*
* _.intersection([2, 1], [2, 3]);
* // => [2]
*/
var intersection = baseRest(function (arrays) {
var mapped = arrayMap(arrays, castArrayLikeObject);
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : [];
});
module.exports = intersection;
/***/ }),
/***/ "../../node_modules/lodash/isArguments.js":
/*!***********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/isArguments.js ***!
\***********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var baseIsArguments = __webpack_require__(/*! ./_baseIsArguments */ "../../node_modules/lodash/_baseIsArguments.js"),
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "../../node_modules/lodash/isObjectLike.js");
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Built-in value references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/**
* Checks if `value` is likely an `arguments` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
* else `false`.
* @example
*
* _.isArguments(function() { return arguments; }());
* // => true
*
* _.isArguments([1, 2, 3]);
* // => false
*/
var isArguments = baseIsArguments(function () {
return arguments;
}()) ? baseIsArguments : function (value) {
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
};
module.exports = isArguments;
/***/ }),
/***/ "../../node_modules/lodash/isArray.js":
/*!*******************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/isArray.js ***!
\*******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(document.body.children);
* // => false
*
* _.isArray('abc');
* // => false
*
* _.isArray(_.noop);
* // => false
*/
var isArray = Array.isArray;
module.exports = isArray;
/***/ }),
/***/ "../../node_modules/lodash/isArrayLike.js":
/*!***********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/isArrayLike.js ***!
\***********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isFunction = __webpack_require__(/*! ./isFunction */ "../../node_modules/lodash/isFunction.js"),
isLength = __webpack_require__(/*! ./isLength */ "../../node_modules/lodash/isLength.js");
/**
* Checks if `value` is array-like. A value is considered array-like if it's
* not a function and has a `value.length` that's an integer greater than or
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
* @example
*
* _.isArrayLike([1, 2, 3]);
* // => true
*
* _.isArrayLike(document.body.children);
* // => true
*
* _.isArrayLike('abc');
* // => true
*
* _.isArrayLike(_.noop);
* // => false
*/
function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
module.exports = isArrayLike;
/***/ }),
/***/ "../../node_modules/lodash/isArrayLikeObject.js":
/*!*****************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/isArrayLikeObject.js ***!
\*****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isArrayLike = __webpack_require__(/*! ./isArrayLike */ "../../node_modules/lodash/isArrayLike.js"),
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "../../node_modules/lodash/isObjectLike.js");
/**
* This method is like `_.isArrayLike` except that it also checks if `value`
* is an object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array-like object,
* else `false`.
* @example
*
* _.isArrayLikeObject([1, 2, 3]);
* // => true
*
* _.isArrayLikeObject(document.body.children);
* // => true
*
* _.isArrayLikeObject('abc');
* // => false
*
* _.isArrayLikeObject(_.noop);
* // => false
*/
function isArrayLikeObject(value) {
return isObjectLike(value) && isArrayLike(value);
}
module.exports = isArrayLikeObject;
/***/ }),
/***/ "../../node_modules/lodash/isFunction.js":
/*!**********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/isFunction.js ***!
\**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "../../node_modules/lodash/_baseGetTag.js"),
isObject = __webpack_require__(/*! ./isObject */ "../../node_modules/lodash/isObject.js");
/** `Object#toString` result references. */
var asyncTag = '[object AsyncFunction]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
proxyTag = '[object Proxy]';
/**
* Checks if `value` is classified as a `Function` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
* // => true
*
* _.isFunction(/abc/);
* // => false
*/
function isFunction(value) {
if (!isObject(value)) {
return false;
} // The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 9 which returns 'object' for typed arrays and other constructors.
var tag = baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
module.exports = isFunction;
/***/ }),
/***/ "../../node_modules/lodash/isLength.js":
/*!********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/isLength.js ***!
\********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/**
* Checks if `value` is a valid array-like length.
*
* **Note:** This method is loosely based on
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
* @example
*
* _.isLength(3);
* // => true
*
* _.isLength(Number.MIN_VALUE);
* // => false
*
* _.isLength(Infinity);
* // => false
*
* _.isLength('3');
* // => false
*/
function isLength(value) {
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
module.exports = isLength;
/***/ }),
/***/ "../../node_modules/lodash/isObject.js":
/*!********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/isObject.js ***!
\********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
/**
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(_.noop);
* // => true
*
* _.isObject(null);
* // => false
*/
function isObject(value) {
var type = _typeof(value);
return value != null && (type == 'object' || type == 'function');
}
module.exports = isObject;
/***/ }),
/***/ "../../node_modules/lodash/isObjectLike.js":
/*!************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/isObjectLike.js ***!
\************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return value != null && _typeof(value) == 'object';
}
module.exports = isObjectLike;
/***/ }),
/***/ "../../node_modules/lodash/isSymbol.js":
/*!********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/isSymbol.js ***!
\********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "../../node_modules/lodash/_baseGetTag.js"),
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "../../node_modules/lodash/isObjectLike.js");
/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';
/**
* Checks if `value` is classified as a `Symbol` primitive or object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
* // => true
*
* _.isSymbol('abc');
* // => false
*/
function isSymbol(value) {
return _typeof(value) == 'symbol' || isObjectLike(value) && baseGetTag(value) == symbolTag;
}
module.exports = isSymbol;
/***/ }),
/***/ "../../node_modules/lodash/now.js":
/*!***************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/now.js ***!
\***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var root = __webpack_require__(/*! ./_root */ "../../node_modules/lodash/_root.js");
/**
* Gets the timestamp of the number of milliseconds that have elapsed since
* the Unix epoch (1 January 1970 00:00:00 UTC).
*
* @static
* @memberOf _
* @since 2.4.0
* @category Date
* @returns {number} Returns the timestamp.
* @example
*
* _.defer(function(stamp) {
* console.log(_.now() - stamp);
* }, _.now());
* // => Logs the number of milliseconds it took for the deferred invocation.
*/
var now = function now() {
return root.Date.now();
};
module.exports = now;
/***/ }),
/***/ "../../node_modules/lodash/toNumber.js":
/*!********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/lodash/toNumber.js ***!
\********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ./isObject */ "../../node_modules/lodash/isObject.js"),
isSymbol = __webpack_require__(/*! ./isSymbol */ "../../node_modules/lodash/isSymbol.js");
/** Used as references for various `Number` constants. */
var NAN = 0 / 0;
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
/** Used to detect bad signed hexadecimal string values. */
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
/** Used to detect binary string values. */
var reIsBinary = /^0b[01]+$/i;
/** Used to detect octal string values. */
var reIsOctal = /^0o[0-7]+$/i;
/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;
/**
* Converts `value` to a number.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
* @example
*
* _.toNumber(3.2);
* // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
*
* _.toNumber(Infinity);
* // => Infinity
*
* _.toNumber('3.2');
* // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol(value)) {
return NAN;
}
if (isObject(value)) {
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
value = isObject(other) ? other + '' : other;
}
if (typeof value != 'string') {
return value === 0 ? value : +value;
}
value = value.replace(reTrim, '');
var isBinary = reIsBinary.test(value);
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
}
module.exports = toNumber;
/***/ }),
/***/ "../../node_modules/node-libs-browser/node_modules/buffer/index.js":
/*!************************************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/node-libs-browser/node_modules/buffer/index.js ***!
\************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh
* @license MIT
*/
/* eslint-disable no-proto */
var base64 = __webpack_require__(/*! base64-js */ "../../node_modules/base64-js/index.js");
var ieee754 = __webpack_require__(/*! ieee754 */ "../../node_modules/ieee754/index.js");
var isArray = __webpack_require__(/*! isarray */ "../../node_modules/isarray/index.js");
exports.Buffer = Buffer;
exports.SlowBuffer = SlowBuffer;
exports.INSPECT_MAX_BYTES = 50;
/**
* If `Buffer.TYPED_ARRAY_SUPPORT`:
* === true Use Uint8Array implementation (fastest)
* === false Use Object implementation (most compatible, even IE6)
*
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
* Opera 11.6+, iOS 4.2+.
*
* Due to various browser bugs, sometimes the Object implementation will be used even
* when the browser supports typed arrays.
*
* Note:
*
* - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
* See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
*
* - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
*
* - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
* incorrect length in some situations.
* We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
* get the Object implementation, which is slower but behaves correctly.
*/
Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport();
/*
* Export kMaxLength after typed array support is determined.
*/
exports.kMaxLength = kMaxLength();
function typedArraySupport() {
try {
var arr = new Uint8Array(1);
arr.__proto__ = {
__proto__: Uint8Array.prototype,
foo: function foo() {
return 42;
}
};
return arr.foo() === 42 && // typed array instances can be augmented
typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
arr.subarray(1, 1).byteLength === 0; // ie10 has broken `subarray`
} catch (e) {
return false;
}
}
function kMaxLength() {
return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff;
}
function createBuffer(that, length) {
if (kMaxLength() < length) {
throw new RangeError('Invalid typed array length');
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Return an augmented `Uint8Array` instance, for best performance
that = new Uint8Array(length);
that.__proto__ = Buffer.prototype;
} else {
// Fallback: Return an object instance of the Buffer class
if (that === null) {
that = new Buffer(length);
}
that.length = length;
}
return that;
}
/**
* The Buffer constructor returns instances of `Uint8Array` that have their
* prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
* `Uint8Array`, so the returned instances will have all the node `Buffer` methods
* and the `Uint8Array` methods. Square bracket notation works as expected -- it
* returns a single octet.
*
* The `Uint8Array` prototype remains unmodified.
*/
function Buffer(arg, encodingOrOffset, length) {
if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
return new Buffer(arg, encodingOrOffset, length);
} // Common case.
if (typeof arg === 'number') {
if (typeof encodingOrOffset === 'string') {
throw new Error('If encoding is specified then the first argument must be a string');
}
return allocUnsafe(this, arg);
}
return from(this, arg, encodingOrOffset, length);
}
Buffer.poolSize = 8192; // not used by this implementation
// TODO: Legacy, not needed anymore. Remove in next major version.
Buffer._augment = function (arr) {
arr.__proto__ = Buffer.prototype;
return arr;
};
function from(that, value, encodingOrOffset, length) {
if (typeof value === 'number') {
throw new TypeError('"value" argument must not be a number');
}
if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
return fromArrayBuffer(that, value, encodingOrOffset, length);
}
if (typeof value === 'string') {
return fromString(that, value, encodingOrOffset);
}
return fromObject(that, value);
}
/**
* Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
* if value is a number.
* Buffer.from(str[, encoding])
* Buffer.from(array)
* Buffer.from(buffer)
* Buffer.from(arrayBuffer[, byteOffset[, length]])
**/
Buffer.from = function (value, encodingOrOffset, length) {
return from(null, value, encodingOrOffset, length);
};
if (Buffer.TYPED_ARRAY_SUPPORT) {
Buffer.prototype.__proto__ = Uint8Array.prototype;
Buffer.__proto__ = Uint8Array;
if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) {
// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
Object.defineProperty(Buffer, Symbol.species, {
value: null,
configurable: true
});
}
}
function assertSize(size) {
if (typeof size !== 'number') {
throw new TypeError('"size" argument must be a number');
} else if (size < 0) {
throw new RangeError('"size" argument must not be negative');
}
}
function alloc(that, size, fill, encoding) {
assertSize(size);
if (size <= 0) {
return createBuffer(that, size);
}
if (fill !== undefined) {
// Only pay attention to encoding if it's a string. This
// prevents accidentally sending in a number that would
// be interpretted as a start offset.
return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill);
}
return createBuffer(that, size);
}
/**
* Creates a new filled Buffer instance.
* alloc(size[, fill[, encoding]])
**/
Buffer.alloc = function (size, fill, encoding) {
return alloc(null, size, fill, encoding);
};
function allocUnsafe(that, size) {
assertSize(size);
that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);
if (!Buffer.TYPED_ARRAY_SUPPORT) {
for (var i = 0; i < size; ++i) {
that[i] = 0;
}
}
return that;
}
/**
* Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
* */
Buffer.allocUnsafe = function (size) {
return allocUnsafe(null, size);
};
/**
* Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
*/
Buffer.allocUnsafeSlow = function (size) {
return allocUnsafe(null, size);
};
function fromString(that, string, encoding) {
if (typeof encoding !== 'string' || encoding === '') {
encoding = 'utf8';
}
if (!Buffer.isEncoding(encoding)) {
throw new TypeError('"encoding" must be a valid string encoding');
}
var length = byteLength(string, encoding) | 0;
that = createBuffer(that, length);
var actual = that.write(string, encoding);
if (actual !== length) {
// Writing a hex string, for example, that contains invalid characters will
// cause everything after the first invalid character to be ignored. (e.g.
// 'abxxcd' will be treated as 'ab')
that = that.slice(0, actual);
}
return that;
}
function fromArrayLike(that, array) {
var length = array.length < 0 ? 0 : checked(array.length) | 0;
that = createBuffer(that, length);
for (var i = 0; i < length; i += 1) {
that[i] = array[i] & 255;
}
return that;
}
function fromArrayBuffer(that, array, byteOffset, length) {
array.byteLength; // this throws if `array` is not a valid ArrayBuffer
if (byteOffset < 0 || array.byteLength < byteOffset) {
throw new RangeError('\'offset\' is out of bounds');
}
if (array.byteLength < byteOffset + (length || 0)) {
throw new RangeError('\'length\' is out of bounds');
}
if (byteOffset === undefined && length === undefined) {
array = new Uint8Array(array);
} else if (length === undefined) {
array = new Uint8Array(array, byteOffset);
} else {
array = new Uint8Array(array, byteOffset, length);
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Return an augmented `Uint8Array` instance, for best performance
that = array;
that.__proto__ = Buffer.prototype;
} else {
// Fallback: Return an object instance of the Buffer class
that = fromArrayLike(that, array);
}
return that;
}
function fromObject(that, obj) {
if (Buffer.isBuffer(obj)) {
var len = checked(obj.length) | 0;
that = createBuffer(that, len);
if (that.length === 0) {
return that;
}
obj.copy(that, 0, 0, len);
return that;
}
if (obj) {
if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) {
if (typeof obj.length !== 'number' || isnan(obj.length)) {
return createBuffer(that, 0);
}
return fromArrayLike(that, obj);
}
if (obj.type === 'Buffer' && isArray(obj.data)) {
return fromArrayLike(that, obj.data);
}
}
throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.');
}
function checked(length) {
// Note: cannot use `length < kMaxLength()` here because that fails when
// length is NaN (which is otherwise coerced to zero.)
if (length >= kMaxLength()) {
throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes');
}
return length | 0;
}
function SlowBuffer(length) {
if (+length != length) {
// eslint-disable-line eqeqeq
length = 0;
}
return Buffer.alloc(+length);
}
Buffer.isBuffer = function isBuffer(b) {
return !!(b != null && b._isBuffer);
};
Buffer.compare = function compare(a, b) {
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
throw new TypeError('Arguments must be Buffers');
}
if (a === b) return 0;
var x = a.length;
var y = b.length;
for (var i = 0, len = Math.min(x, y); i < len; ++i) {
if (a[i] !== b[i]) {
x = a[i];
y = b[i];
break;
}
}
if (x < y) return -1;
if (y < x) return 1;
return 0;
};
Buffer.isEncoding = function isEncoding(encoding) {
switch (String(encoding).toLowerCase()) {
case 'hex':
case 'utf8':
case 'utf-8':
case 'ascii':
case 'latin1':
case 'binary':
case 'base64':
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return true;
default:
return false;
}
};
Buffer.concat = function concat(list, length) {
if (!isArray(list)) {
throw new TypeError('"list" argument must be an Array of Buffers');
}
if (list.length === 0) {
return Buffer.alloc(0);
}
var i;
if (length === undefined) {
length = 0;
for (i = 0; i < list.length; ++i) {
length += list[i].length;
}
}
var buffer = Buffer.allocUnsafe(length);
var pos = 0;
for (i = 0; i < list.length; ++i) {
var buf = list[i];
if (!Buffer.isBuffer(buf)) {
throw new TypeError('"list" argument must be an Array of Buffers');
}
buf.copy(buffer, pos);
pos += buf.length;
}
return buffer;
};
function byteLength(string, encoding) {
if (Buffer.isBuffer(string)) {
return string.length;
}
if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
return string.byteLength;
}
if (typeof string !== 'string') {
string = '' + string;
}
var len = string.length;
if (len === 0) return 0; // Use a for loop to avoid recursion
var loweredCase = false;
for (;;) {
switch (encoding) {
case 'ascii':
case 'latin1':
case 'binary':
return len;
case 'utf8':
case 'utf-8':
case undefined:
return utf8ToBytes(string).length;
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return len * 2;
case 'hex':
return len >>> 1;
case 'base64':
return base64ToBytes(string).length;
default:
if (loweredCase) return utf8ToBytes(string).length; // assume utf8
encoding = ('' + encoding).toLowerCase();
loweredCase = true;
}
}
}
Buffer.byteLength = byteLength;
function slowToString(encoding, start, end) {
var loweredCase = false; // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
// property of a typed array.
// This behaves neither like String nor Uint8Array in that we set start/end
// to their upper/lower bounds if the value passed is out of range.
// undefined is handled specially as per ECMA-262 6th Edition,
// Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
if (start === undefined || start < 0) {
start = 0;
} // Return early if start > this.length. Done here to prevent potential uint32
// coercion fail below.
if (start > this.length) {
return '';
}
if (end === undefined || end > this.length) {
end = this.length;
}
if (end <= 0) {
return '';
} // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
end >>>= 0;
start >>>= 0;
if (end <= start) {
return '';
}
if (!encoding) encoding = 'utf8';
while (true) {
switch (encoding) {
case 'hex':
return hexSlice(this, start, end);
case 'utf8':
case 'utf-8':
return utf8Slice(this, start, end);
case 'ascii':
return asciiSlice(this, start, end);
case 'latin1':
case 'binary':
return latin1Slice(this, start, end);
case 'base64':
return base64Slice(this, start, end);
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return utf16leSlice(this, start, end);
default:
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
encoding = (encoding + '').toLowerCase();
loweredCase = true;
}
}
} // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
// Buffer instances.
Buffer.prototype._isBuffer = true;
function swap(b, n, m) {
var i = b[n];
b[n] = b[m];
b[m] = i;
}
Buffer.prototype.swap16 = function swap16() {
var len = this.length;
if (len % 2 !== 0) {
throw new RangeError('Buffer size must be a multiple of 16-bits');
}
for (var i = 0; i < len; i += 2) {
swap(this, i, i + 1);
}
return this;
};
Buffer.prototype.swap32 = function swap32() {
var len = this.length;
if (len % 4 !== 0) {
throw new RangeError('Buffer size must be a multiple of 32-bits');
}
for (var i = 0; i < len; i += 4) {
swap(this, i, i + 3);
swap(this, i + 1, i + 2);
}
return this;
};
Buffer.prototype.swap64 = function swap64() {
var len = this.length;
if (len % 8 !== 0) {
throw new RangeError('Buffer size must be a multiple of 64-bits');
}
for (var i = 0; i < len; i += 8) {
swap(this, i, i + 7);
swap(this, i + 1, i + 6);
swap(this, i + 2, i + 5);
swap(this, i + 3, i + 4);
}
return this;
};
Buffer.prototype.toString = function toString() {
var length = this.length | 0;
if (length === 0) return '';
if (arguments.length === 0) return utf8Slice(this, 0, length);
return slowToString.apply(this, arguments);
};
Buffer.prototype.equals = function equals(b) {
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');
if (this === b) return true;
return Buffer.compare(this, b) === 0;
};
Buffer.prototype.inspect = function inspect() {
var str = '';
var max = exports.INSPECT_MAX_BYTES;
if (this.length > 0) {
str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');
if (this.length > max) str += ' ... ';
}
return '';
};
Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
if (!Buffer.isBuffer(target)) {
throw new TypeError('Argument must be a Buffer');
}
if (start === undefined) {
start = 0;
}
if (end === undefined) {
end = target ? target.length : 0;
}
if (thisStart === undefined) {
thisStart = 0;
}
if (thisEnd === undefined) {
thisEnd = this.length;
}
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
throw new RangeError('out of range index');
}
if (thisStart >= thisEnd && start >= end) {
return 0;
}
if (thisStart >= thisEnd) {
return -1;
}
if (start >= end) {
return 1;
}
start >>>= 0;
end >>>= 0;
thisStart >>>= 0;
thisEnd >>>= 0;
if (this === target) return 0;
var x = thisEnd - thisStart;
var y = end - start;
var len = Math.min(x, y);
var thisCopy = this.slice(thisStart, thisEnd);
var targetCopy = target.slice(start, end);
for (var i = 0; i < len; ++i) {
if (thisCopy[i] !== targetCopy[i]) {
x = thisCopy[i];
y = targetCopy[i];
break;
}
}
if (x < y) return -1;
if (y < x) return 1;
return 0;
}; // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
//
// Arguments:
// - buffer - a Buffer to search
// - val - a string, Buffer, or number
// - byteOffset - an index into `buffer`; will be clamped to an int32
// - encoding - an optional encoding, relevant is val is a string
// - dir - true for indexOf, false for lastIndexOf
function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
// Empty buffer means no match
if (buffer.length === 0) return -1; // Normalize byteOffset
if (typeof byteOffset === 'string') {
encoding = byteOffset;
byteOffset = 0;
} else if (byteOffset > 0x7fffffff) {
byteOffset = 0x7fffffff;
} else if (byteOffset < -0x80000000) {
byteOffset = -0x80000000;
}
byteOffset = +byteOffset; // Coerce to Number.
if (isNaN(byteOffset)) {
// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
byteOffset = dir ? 0 : buffer.length - 1;
} // Normalize byteOffset: negative offsets start from the end of the buffer
if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
if (byteOffset >= buffer.length) {
if (dir) return -1;else byteOffset = buffer.length - 1;
} else if (byteOffset < 0) {
if (dir) byteOffset = 0;else return -1;
} // Normalize val
if (typeof val === 'string') {
val = Buffer.from(val, encoding);
} // Finally, search either indexOf (if dir is true) or lastIndexOf
if (Buffer.isBuffer(val)) {
// Special case: looking for empty string/buffer always fails
if (val.length === 0) {
return -1;
}
return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
} else if (typeof val === 'number') {
val = val & 0xFF; // Search for a byte value [0-255]
if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {
if (dir) {
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
} else {
return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
}
}
return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);
}
throw new TypeError('val must be string, number or Buffer');
}
function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
var indexSize = 1;
var arrLength = arr.length;
var valLength = val.length;
if (encoding !== undefined) {
encoding = String(encoding).toLowerCase();
if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {
if (arr.length < 2 || val.length < 2) {
return -1;
}
indexSize = 2;
arrLength /= 2;
valLength /= 2;
byteOffset /= 2;
}
}
function read(buf, i) {
if (indexSize === 1) {
return buf[i];
} else {
return buf.readUInt16BE(i * indexSize);
}
}
var i;
if (dir) {
var foundIndex = -1;
for (i = byteOffset; i < arrLength; i++) {
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
if (foundIndex === -1) foundIndex = i;
if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
} else {
if (foundIndex !== -1) i -= i - foundIndex;
foundIndex = -1;
}
}
} else {
if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
for (i = byteOffset; i >= 0; i--) {
var found = true;
for (var j = 0; j < valLength; j++) {
if (read(arr, i + j) !== read(val, j)) {
found = false;
break;
}
}
if (found) return i;
}
}
return -1;
}
Buffer.prototype.includes = function includes(val, byteOffset, encoding) {
return this.indexOf(val, byteOffset, encoding) !== -1;
};
Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
};
Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
};
function hexWrite(buf, string, offset, length) {
offset = Number(offset) || 0;
var remaining = buf.length - offset;
if (!length) {
length = remaining;
} else {
length = Number(length);
if (length > remaining) {
length = remaining;
}
} // must be an even number of digits
var strLen = string.length;
if (strLen % 2 !== 0) throw new TypeError('Invalid hex string');
if (length > strLen / 2) {
length = strLen / 2;
}
for (var i = 0; i < length; ++i) {
var parsed = parseInt(string.substr(i * 2, 2), 16);
if (isNaN(parsed)) return i;
buf[offset + i] = parsed;
}
return i;
}
function utf8Write(buf, string, offset, length) {
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
}
function asciiWrite(buf, string, offset, length) {
return blitBuffer(asciiToBytes(string), buf, offset, length);
}
function latin1Write(buf, string, offset, length) {
return asciiWrite(buf, string, offset, length);
}
function base64Write(buf, string, offset, length) {
return blitBuffer(base64ToBytes(string), buf, offset, length);
}
function ucs2Write(buf, string, offset, length) {
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
}
Buffer.prototype.write = function write(string, offset, length, encoding) {
// Buffer#write(string)
if (offset === undefined) {
encoding = 'utf8';
length = this.length;
offset = 0; // Buffer#write(string, encoding)
} else if (length === undefined && typeof offset === 'string') {
encoding = offset;
length = this.length;
offset = 0; // Buffer#write(string, offset[, length][, encoding])
} else if (isFinite(offset)) {
offset = offset | 0;
if (isFinite(length)) {
length = length | 0;
if (encoding === undefined) encoding = 'utf8';
} else {
encoding = length;
length = undefined;
} // legacy write(string, encoding, offset, length) - remove in v0.13
} else {
throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');
}
var remaining = this.length - offset;
if (length === undefined || length > remaining) length = remaining;
if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
throw new RangeError('Attempt to write outside buffer bounds');
}
if (!encoding) encoding = 'utf8';
var loweredCase = false;
for (;;) {
switch (encoding) {
case 'hex':
return hexWrite(this, string, offset, length);
case 'utf8':
case 'utf-8':
return utf8Write(this, string, offset, length);
case 'ascii':
return asciiWrite(this, string, offset, length);
case 'latin1':
case 'binary':
return latin1Write(this, string, offset, length);
case 'base64':
// Warning: maxLength not taken into account in base64Write
return base64Write(this, string, offset, length);
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return ucs2Write(this, string, offset, length);
default:
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
encoding = ('' + encoding).toLowerCase();
loweredCase = true;
}
}
};
Buffer.prototype.toJSON = function toJSON() {
return {
type: 'Buffer',
data: Array.prototype.slice.call(this._arr || this, 0)
};
};
function base64Slice(buf, start, end) {
if (start === 0 && end === buf.length) {
return base64.fromByteArray(buf);
} else {
return base64.fromByteArray(buf.slice(start, end));
}
}
function utf8Slice(buf, start, end) {
end = Math.min(buf.length, end);
var res = [];
var i = start;
while (i < end) {
var firstByte = buf[i];
var codePoint = null;
var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;
if (i + bytesPerSequence <= end) {
var secondByte, thirdByte, fourthByte, tempCodePoint;
switch (bytesPerSequence) {
case 1:
if (firstByte < 0x80) {
codePoint = firstByte;
}
break;
case 2:
secondByte = buf[i + 1];
if ((secondByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;
if (tempCodePoint > 0x7F) {
codePoint = tempCodePoint;
}
}
break;
case 3:
secondByte = buf[i + 1];
thirdByte = buf[i + 2];
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;
if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
codePoint = tempCodePoint;
}
}
break;
case 4:
secondByte = buf[i + 1];
thirdByte = buf[i + 2];
fourthByte = buf[i + 3];
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;
if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
codePoint = tempCodePoint;
}
}
}
}
if (codePoint === null) {
// we did not generate a valid codePoint so insert a
// replacement char (U+FFFD) and advance only 1 byte
codePoint = 0xFFFD;
bytesPerSequence = 1;
} else if (codePoint > 0xFFFF) {
// encode to utf16 (surrogate pair dance)
codePoint -= 0x10000;
res.push(codePoint >>> 10 & 0x3FF | 0xD800);
codePoint = 0xDC00 | codePoint & 0x3FF;
}
res.push(codePoint);
i += bytesPerSequence;
}
return decodeCodePointsArray(res);
} // Based on http://stackoverflow.com/a/22747272/680742, the browser with
// the lowest limit is Chrome, with 0x10000 args.
// We go 1 magnitude less, for safety
var MAX_ARGUMENTS_LENGTH = 0x1000;
function decodeCodePointsArray(codePoints) {
var len = codePoints.length;
if (len <= MAX_ARGUMENTS_LENGTH) {
return String.fromCharCode.apply(String, codePoints); // avoid extra slice()
} // Decode in chunks to avoid "call stack size exceeded".
var res = '';
var i = 0;
while (i < len) {
res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
}
return res;
}
function asciiSlice(buf, start, end) {
var ret = '';
end = Math.min(buf.length, end);
for (var i = start; i < end; ++i) {
ret += String.fromCharCode(buf[i] & 0x7F);
}
return ret;
}
function latin1Slice(buf, start, end) {
var ret = '';
end = Math.min(buf.length, end);
for (var i = start; i < end; ++i) {
ret += String.fromCharCode(buf[i]);
}
return ret;
}
function hexSlice(buf, start, end) {
var len = buf.length;
if (!start || start < 0) start = 0;
if (!end || end < 0 || end > len) end = len;
var out = '';
for (var i = start; i < end; ++i) {
out += toHex(buf[i]);
}
return out;
}
function utf16leSlice(buf, start, end) {
var bytes = buf.slice(start, end);
var res = '';
for (var i = 0; i < bytes.length; i += 2) {
res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
}
return res;
}
Buffer.prototype.slice = function slice(start, end) {
var len = this.length;
start = ~~start;
end = end === undefined ? len : ~~end;
if (start < 0) {
start += len;
if (start < 0) start = 0;
} else if (start > len) {
start = len;
}
if (end < 0) {
end += len;
if (end < 0) end = 0;
} else if (end > len) {
end = len;
}
if (end < start) end = start;
var newBuf;
if (Buffer.TYPED_ARRAY_SUPPORT) {
newBuf = this.subarray(start, end);
newBuf.__proto__ = Buffer.prototype;
} else {
var sliceLen = end - start;
newBuf = new Buffer(sliceLen, undefined);
for (var i = 0; i < sliceLen; ++i) {
newBuf[i] = this[i + start];
}
}
return newBuf;
};
/*
* Need to make sure that buffer isn't trying to write out of bounds.
*/
function checkOffset(offset, ext, length) {
if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');
if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');
}
Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {
offset = offset | 0;
byteLength = byteLength | 0;
if (!noAssert) checkOffset(offset, byteLength, this.length);
var val = this[offset];
var mul = 1;
var i = 0;
while (++i < byteLength && (mul *= 0x100)) {
val += this[offset + i] * mul;
}
return val;
};
Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {
offset = offset | 0;
byteLength = byteLength | 0;
if (!noAssert) {
checkOffset(offset, byteLength, this.length);
}
var val = this[offset + --byteLength];
var mul = 1;
while (byteLength > 0 && (mul *= 0x100)) {
val += this[offset + --byteLength] * mul;
}
return val;
};
Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {
if (!noAssert) checkOffset(offset, 1, this.length);
return this[offset];
};
Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length);
return this[offset] | this[offset + 1] << 8;
};
Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length);
return this[offset] << 8 | this[offset + 1];
};
Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length);
return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;
};
Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length);
return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
};
Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {
offset = offset | 0;
byteLength = byteLength | 0;
if (!noAssert) checkOffset(offset, byteLength, this.length);
var val = this[offset];
var mul = 1;
var i = 0;
while (++i < byteLength && (mul *= 0x100)) {
val += this[offset + i] * mul;
}
mul *= 0x80;
if (val >= mul) val -= Math.pow(2, 8 * byteLength);
return val;
};
Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {
offset = offset | 0;
byteLength = byteLength | 0;
if (!noAssert) checkOffset(offset, byteLength, this.length);
var i = byteLength;
var mul = 1;
var val = this[offset + --i];
while (i > 0 && (mul *= 0x100)) {
val += this[offset + --i] * mul;
}
mul *= 0x80;
if (val >= mul) val -= Math.pow(2, 8 * byteLength);
return val;
};
Buffer.prototype.readInt8 = function readInt8(offset, noAssert) {
if (!noAssert) checkOffset(offset, 1, this.length);
if (!(this[offset] & 0x80)) return this[offset];
return (0xff - this[offset] + 1) * -1;
};
Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length);
var val = this[offset] | this[offset + 1] << 8;
return val & 0x8000 ? val | 0xFFFF0000 : val;
};
Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length);
var val = this[offset + 1] | this[offset] << 8;
return val & 0x8000 ? val | 0xFFFF0000 : val;
};
Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length);
return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
};
Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length);
return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
};
Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length);
return ieee754.read(this, offset, true, 23, 4);
};
Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length);
return ieee754.read(this, offset, false, 23, 4);
};
Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
if (!noAssert) checkOffset(offset, 8, this.length);
return ieee754.read(this, offset, true, 52, 8);
};
Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
if (!noAssert) checkOffset(offset, 8, this.length);
return ieee754.read(this, offset, false, 52, 8);
};
function checkInt(buf, value, offset, ext, max, min) {
if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
if (offset + ext > buf.length) throw new RangeError('Index out of range');
}
Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {
value = +value;
offset = offset | 0;
byteLength = byteLength | 0;
if (!noAssert) {
var maxBytes = Math.pow(2, 8 * byteLength) - 1;
checkInt(this, value, offset, byteLength, maxBytes, 0);
}
var mul = 1;
var i = 0;
this[offset] = value & 0xFF;
while (++i < byteLength && (mul *= 0x100)) {
this[offset + i] = value / mul & 0xFF;
}
return offset + byteLength;
};
Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {
value = +value;
offset = offset | 0;
byteLength = byteLength | 0;
if (!noAssert) {
var maxBytes = Math.pow(2, 8 * byteLength) - 1;
checkInt(this, value, offset, byteLength, maxBytes, 0);
}
var i = byteLength - 1;
var mul = 1;
this[offset + i] = value & 0xFF;
while (--i >= 0 && (mul *= 0x100)) {
this[offset + i] = value / mul & 0xFF;
}
return offset + byteLength;
};
Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
this[offset] = value & 0xff;
return offset + 1;
};
function objectWriteUInt16(buf, value, offset, littleEndian) {
if (value < 0) value = 0xffff + value + 1;
for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8;
}
}
Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = value & 0xff;
this[offset + 1] = value >>> 8;
} else {
objectWriteUInt16(this, value, offset, true);
}
return offset + 2;
};
Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = value >>> 8;
this[offset + 1] = value & 0xff;
} else {
objectWriteUInt16(this, value, offset, false);
}
return offset + 2;
};
function objectWriteUInt32(buf, value, offset, littleEndian) {
if (value < 0) value = 0xffffffff + value + 1;
for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff;
}
}
Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset + 3] = value >>> 24;
this[offset + 2] = value >>> 16;
this[offset + 1] = value >>> 8;
this[offset] = value & 0xff;
} else {
objectWriteUInt32(this, value, offset, true);
}
return offset + 4;
};
Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = value >>> 24;
this[offset + 1] = value >>> 16;
this[offset + 2] = value >>> 8;
this[offset + 3] = value & 0xff;
} else {
objectWriteUInt32(this, value, offset, false);
}
return offset + 4;
};
Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) {
var limit = Math.pow(2, 8 * byteLength - 1);
checkInt(this, value, offset, byteLength, limit - 1, -limit);
}
var i = 0;
var mul = 1;
var sub = 0;
this[offset] = value & 0xFF;
while (++i < byteLength && (mul *= 0x100)) {
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
sub = 1;
}
this[offset + i] = (value / mul >> 0) - sub & 0xFF;
}
return offset + byteLength;
};
Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) {
var limit = Math.pow(2, 8 * byteLength - 1);
checkInt(this, value, offset, byteLength, limit - 1, -limit);
}
var i = byteLength - 1;
var mul = 1;
var sub = 0;
this[offset + i] = value & 0xFF;
while (--i >= 0 && (mul *= 0x100)) {
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
sub = 1;
}
this[offset + i] = (value / mul >> 0) - sub & 0xFF;
}
return offset + byteLength;
};
Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
if (value < 0) value = 0xff + value + 1;
this[offset] = value & 0xff;
return offset + 1;
};
Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = value & 0xff;
this[offset + 1] = value >>> 8;
} else {
objectWriteUInt16(this, value, offset, true);
}
return offset + 2;
};
Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = value >>> 8;
this[offset + 1] = value & 0xff;
} else {
objectWriteUInt16(this, value, offset, false);
}
return offset + 2;
};
Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = value & 0xff;
this[offset + 1] = value >>> 8;
this[offset + 2] = value >>> 16;
this[offset + 3] = value >>> 24;
} else {
objectWriteUInt32(this, value, offset, true);
}
return offset + 4;
};
Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
if (value < 0) value = 0xffffffff + value + 1;
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = value >>> 24;
this[offset + 1] = value >>> 16;
this[offset + 2] = value >>> 8;
this[offset + 3] = value & 0xff;
} else {
objectWriteUInt32(this, value, offset, false);
}
return offset + 4;
};
function checkIEEE754(buf, value, offset, ext, max, min) {
if (offset + ext > buf.length) throw new RangeError('Index out of range');
if (offset < 0) throw new RangeError('Index out of range');
}
function writeFloat(buf, value, offset, littleEndian, noAssert) {
if (!noAssert) {
checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38);
}
ieee754.write(buf, value, offset, littleEndian, 23, 4);
return offset + 4;
}
Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
return writeFloat(this, value, offset, true, noAssert);
};
Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
return writeFloat(this, value, offset, false, noAssert);
};
function writeDouble(buf, value, offset, littleEndian, noAssert) {
if (!noAssert) {
checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308);
}
ieee754.write(buf, value, offset, littleEndian, 52, 8);
return offset + 8;
}
Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
return writeDouble(this, value, offset, true, noAssert);
};
Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
return writeDouble(this, value, offset, false, noAssert);
}; // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
Buffer.prototype.copy = function copy(target, targetStart, start, end) {
if (!start) start = 0;
if (!end && end !== 0) end = this.length;
if (targetStart >= target.length) targetStart = target.length;
if (!targetStart) targetStart = 0;
if (end > 0 && end < start) end = start; // Copy 0 bytes; we're done
if (end === start) return 0;
if (target.length === 0 || this.length === 0) return 0; // Fatal error conditions
if (targetStart < 0) {
throw new RangeError('targetStart out of bounds');
}
if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds');
if (end < 0) throw new RangeError('sourceEnd out of bounds'); // Are we oob?
if (end > this.length) end = this.length;
if (target.length - targetStart < end - start) {
end = target.length - targetStart + start;
}
var len = end - start;
var i;
if (this === target && start < targetStart && targetStart < end) {
// descending copy from end
for (i = len - 1; i >= 0; --i) {
target[i + targetStart] = this[i + start];
}
} else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
// ascending copy from start
for (i = 0; i < len; ++i) {
target[i + targetStart] = this[i + start];
}
} else {
Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart);
}
return len;
}; // Usage:
// buffer.fill(number[, offset[, end]])
// buffer.fill(buffer[, offset[, end]])
// buffer.fill(string[, offset[, end]][, encoding])
Buffer.prototype.fill = function fill(val, start, end, encoding) {
// Handle string cases:
if (typeof val === 'string') {
if (typeof start === 'string') {
encoding = start;
start = 0;
end = this.length;
} else if (typeof end === 'string') {
encoding = end;
end = this.length;
}
if (val.length === 1) {
var code = val.charCodeAt(0);
if (code < 256) {
val = code;
}
}
if (encoding !== undefined && typeof encoding !== 'string') {
throw new TypeError('encoding must be a string');
}
if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
throw new TypeError('Unknown encoding: ' + encoding);
}
} else if (typeof val === 'number') {
val = val & 255;
} // Invalid ranges are not set to a default, so can range check early.
if (start < 0 || this.length < start || this.length < end) {
throw new RangeError('Out of range index');
}
if (end <= start) {
return this;
}
start = start >>> 0;
end = end === undefined ? this.length : end >>> 0;
if (!val) val = 0;
var i;
if (typeof val === 'number') {
for (i = start; i < end; ++i) {
this[i] = val;
}
} else {
var bytes = Buffer.isBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString());
var len = bytes.length;
for (i = 0; i < end - start; ++i) {
this[i + start] = bytes[i % len];
}
}
return this;
}; // HELPER FUNCTIONS
// ================
var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g;
function base64clean(str) {
// Node strips out invalid characters like \n and \t from the string, base64-js does not
str = stringtrim(str).replace(INVALID_BASE64_RE, ''); // Node converts strings with length < 2 to ''
if (str.length < 2) return ''; // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
while (str.length % 4 !== 0) {
str = str + '=';
}
return str;
}
function stringtrim(str) {
if (str.trim) return str.trim();
return str.replace(/^\s+|\s+$/g, '');
}
function toHex(n) {
if (n < 16) return '0' + n.toString(16);
return n.toString(16);
}
function utf8ToBytes(string, units) {
units = units || Infinity;
var codePoint;
var length = string.length;
var leadSurrogate = null;
var bytes = [];
for (var i = 0; i < length; ++i) {
codePoint = string.charCodeAt(i); // is surrogate component
if (codePoint > 0xD7FF && codePoint < 0xE000) {
// last char was a lead
if (!leadSurrogate) {
// no lead yet
if (codePoint > 0xDBFF) {
// unexpected trail
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
continue;
} else if (i + 1 === length) {
// unpaired lead
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
continue;
} // valid lead
leadSurrogate = codePoint;
continue;
} // 2 leads in a row
if (codePoint < 0xDC00) {
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
leadSurrogate = codePoint;
continue;
} // valid surrogate pair
codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
} else if (leadSurrogate) {
// valid bmp char, but last char was a lead
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
}
leadSurrogate = null; // encode utf8
if (codePoint < 0x80) {
if ((units -= 1) < 0) break;
bytes.push(codePoint);
} else if (codePoint < 0x800) {
if ((units -= 2) < 0) break;
bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);
} else if (codePoint < 0x10000) {
if ((units -= 3) < 0) break;
bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
} else if (codePoint < 0x110000) {
if ((units -= 4) < 0) break;
bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
} else {
throw new Error('Invalid code point');
}
}
return bytes;
}
function asciiToBytes(str) {
var byteArray = [];
for (var i = 0; i < str.length; ++i) {
// Node's code seems to be doing this and not & 0x7F..
byteArray.push(str.charCodeAt(i) & 0xFF);
}
return byteArray;
}
function utf16leToBytes(str, units) {
var c, hi, lo;
var byteArray = [];
for (var i = 0; i < str.length; ++i) {
if ((units -= 2) < 0) break;
c = str.charCodeAt(i);
hi = c >> 8;
lo = c % 256;
byteArray.push(lo);
byteArray.push(hi);
}
return byteArray;
}
function base64ToBytes(str) {
return base64.toByteArray(base64clean(str));
}
function blitBuffer(src, dst, offset, length) {
for (var i = 0; i < length; ++i) {
if (i + offset >= dst.length || i >= src.length) break;
dst[i + offset] = src[i];
}
return i;
}
function isnan(val) {
return val !== val; // eslint-disable-line no-self-compare
}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "../../node_modules/webpack/buildin/global.js")))
/***/ }),
/***/ "../../node_modules/popper.js/dist/esm/popper.js":
/*!******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/popper.js/dist/esm/popper.js ***!
\******************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* WEBPACK VAR INJECTION */(function(global) {/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.16.1
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';
var timeoutDuration = function () {
var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
return 1;
}
}
return 0;
}();
function microtaskDebounce(fn) {
var called = false;
return function () {
if (called) {
return;
}
called = true;
window.Promise.resolve().then(function () {
called = false;
fn();
});
};
}
function taskDebounce(fn) {
var scheduled = false;
return function () {
if (!scheduled) {
scheduled = true;
setTimeout(function () {
scheduled = false;
fn();
}, timeoutDuration);
}
};
}
var supportsMicroTasks = isBrowser && window.Promise;
/**
* Create a debounced version of a method, that's asynchronously deferred
* but called in the minimum time possible.
*
* @method
* @memberof Popper.Utils
* @argument {Function} fn
* @returns {Function}
*/
var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;
/**
* Check if the given variable is a function
* @method
* @memberof Popper.Utils
* @argument {Any} functionToCheck - variable to check
* @returns {Boolean} answer to: is a function?
*/
function isFunction(functionToCheck) {
var getType = {};
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
}
/**
* Get CSS computed property of the given element
* @method
* @memberof Popper.Utils
* @argument {Eement} element
* @argument {String} property
*/
function getStyleComputedProperty(element, property) {
if (element.nodeType !== 1) {
return [];
} // NOTE: 1 DOM access here
var window = element.ownerDocument.defaultView;
var css = window.getComputedStyle(element, null);
return property ? css[property] : css;
}
/**
* Returns the parentNode or the host of the element
* @method
* @memberof Popper.Utils
* @argument {Element} element
* @returns {Element} parent
*/
function getParentNode(element) {
if (element.nodeName === 'HTML') {
return element;
}
return element.parentNode || element.host;
}
/**
* Returns the scrolling parent of the given element
* @method
* @memberof Popper.Utils
* @argument {Element} element
* @returns {Element} scroll parent
*/
function getScrollParent(element) {
// Return body, `getScroll` will take care to get the correct `scrollTop` from it
if (!element) {
return document.body;
}
switch (element.nodeName) {
case 'HTML':
case 'BODY':
return element.ownerDocument.body;
case '#document':
return element.body;
} // Firefox want us to check `-x` and `-y` variations as well
var _getStyleComputedProp = getStyleComputedProperty(element),
overflow = _getStyleComputedProp.overflow,
overflowX = _getStyleComputedProp.overflowX,
overflowY = _getStyleComputedProp.overflowY;
if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
return element;
}
return getScrollParent(getParentNode(element));
}
/**
* Returns the reference node of the reference object, or the reference object itself.
* @method
* @memberof Popper.Utils
* @param {Element|Object} reference - the reference element (the popper will be relative to this)
* @returns {Element} parent
*/
function getReferenceNode(reference) {
return reference && reference.referenceNode ? reference.referenceNode : reference;
}
var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);
var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);
/**
* Determines if the browser is Internet Explorer
* @method
* @memberof Popper.Utils
* @param {Number} version to check
* @returns {Boolean} isIE
*/
function isIE(version) {
if (version === 11) {
return isIE11;
}
if (version === 10) {
return isIE10;
}
return isIE11 || isIE10;
}
/**
* Returns the offset parent of the given element
* @method
* @memberof Popper.Utils
* @argument {Element} element
* @returns {Element} offset parent
*/
function getOffsetParent(element) {
if (!element) {
return document.documentElement;
}
var noOffsetParent = isIE(10) ? document.body : null; // NOTE: 1 DOM access here
var offsetParent = element.offsetParent || null; // Skip hidden elements which don't have an offsetParent
while (offsetParent === noOffsetParent && element.nextElementSibling) {
offsetParent = (element = element.nextElementSibling).offsetParent;
}
var nodeName = offsetParent && offsetParent.nodeName;
if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
return element ? element.ownerDocument.documentElement : document.documentElement;
} // .offsetParent will return the closest TH, TD or TABLE in case
// no offsetParent is present, I hate this job...
if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
return getOffsetParent(offsetParent);
}
return offsetParent;
}
function isOffsetContainer(element) {
var nodeName = element.nodeName;
if (nodeName === 'BODY') {
return false;
}
return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;
}
/**
* Finds the root node (document, shadowDOM root) of the given element
* @method
* @memberof Popper.Utils
* @argument {Element} node
* @returns {Element} root node
*/
function getRoot(node) {
if (node.parentNode !== null) {
return getRoot(node.parentNode);
}
return node;
}
/**
* Finds the offset parent common to the two provided nodes
* @method
* @memberof Popper.Utils
* @argument {Element} element1
* @argument {Element} element2
* @returns {Element} common offset parent
*/
function findCommonOffsetParent(element1, element2) {
// This check is needed to avoid errors in case one of the elements isn't defined for any reason
if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {
return document.documentElement;
} // Here we make sure to give as "start" the element that comes first in the DOM
var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
var start = order ? element1 : element2;
var end = order ? element2 : element1; // Get common ancestor container
var range = document.createRange();
range.setStart(start, 0);
range.setEnd(end, 0);
var commonAncestorContainer = range.commonAncestorContainer; // Both nodes are inside #document
if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {
if (isOffsetContainer(commonAncestorContainer)) {
return commonAncestorContainer;
}
return getOffsetParent(commonAncestorContainer);
} // one of the nodes is inside shadowDOM, find which one
var element1root = getRoot(element1);
if (element1root.host) {
return findCommonOffsetParent(element1root.host, element2);
} else {
return findCommonOffsetParent(element1, getRoot(element2).host);
}
}
/**
* Gets the scroll value of the given element in the given side (top and left)
* @method
* @memberof Popper.Utils
* @argument {Element} element
* @argument {String} side `top` or `left`
* @returns {number} amount of scrolled pixels
*/
function getScroll(element) {
var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
var nodeName = element.nodeName;
if (nodeName === 'BODY' || nodeName === 'HTML') {
var html = element.ownerDocument.documentElement;
var scrollingElement = element.ownerDocument.scrollingElement || html;
return scrollingElement[upperSide];
}
return element[upperSide];
}
/*
* Sum or subtract the element scroll values (left and top) from a given rect object
* @method
* @memberof Popper.Utils
* @param {Object} rect - Rect object you want to change
* @param {HTMLElement} element - The element from the function reads the scroll values
* @param {Boolean} subtract - set to true if you want to subtract the scroll values
* @return {Object} rect - The modifier rect object
*/
function includeScroll(rect, element) {
var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var scrollTop = getScroll(element, 'top');
var scrollLeft = getScroll(element, 'left');
var modifier = subtract ? -1 : 1;
rect.top += scrollTop * modifier;
rect.bottom += scrollTop * modifier;
rect.left += scrollLeft * modifier;
rect.right += scrollLeft * modifier;
return rect;
}
/*
* Helper to detect borders of a given element
* @method
* @memberof Popper.Utils
* @param {CSSStyleDeclaration} styles
* Result of `getStyleComputedProperty` on the given element
* @param {String} axis - `x` or `y`
* @return {number} borders - The borders size of the given axis
*/
function getBordersSize(styles, axis) {
var sideA = axis === 'x' ? 'Left' : 'Top';
var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']);
}
function getSize(axis, body, html, computedStyle) {
return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);
}
function getWindowSizes(document) {
var body = document.body;
var html = document.documentElement;
var computedStyle = isIE(10) && getComputedStyle(html);
return {
height: getSize('Height', body, html, computedStyle),
width: getSize('Width', body, html, computedStyle)
};
}
var classCallCheck = function classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
};
var createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
var defineProperty = function defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
};
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
/**
* Given element offsets, generate an output similar to getBoundingClientRect
* @method
* @memberof Popper.Utils
* @argument {Object} offsets
* @returns {Object} ClientRect like output
*/
function getClientRect(offsets) {
return _extends({}, offsets, {
right: offsets.left + offsets.width,
bottom: offsets.top + offsets.height
});
}
/**
* Get bounding client rect of given element
* @method
* @memberof Popper.Utils
* @param {HTMLElement} element
* @return {Object} client rect
*/
function getBoundingClientRect(element) {
var rect = {}; // IE10 10 FIX: Please, don't ask, the element isn't
// considered in DOM in some circumstances...
// This isn't reproducible in IE10 compatibility mode of IE11
try {
if (isIE(10)) {
rect = element.getBoundingClientRect();
var scrollTop = getScroll(element, 'top');
var scrollLeft = getScroll(element, 'left');
rect.top += scrollTop;
rect.left += scrollLeft;
rect.bottom += scrollTop;
rect.right += scrollLeft;
} else {
rect = element.getBoundingClientRect();
}
} catch (e) {}
var result = {
left: rect.left,
top: rect.top,
width: rect.right - rect.left,
height: rect.bottom - rect.top
}; // subtract scrollbar size from sizes
var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};
var width = sizes.width || element.clientWidth || result.width;
var height = sizes.height || element.clientHeight || result.height;
var horizScrollbar = element.offsetWidth - width;
var vertScrollbar = element.offsetHeight - height; // if an hypothetical scrollbar is detected, we must be sure it's not a `border`
// we make this check conditional for performance reasons
if (horizScrollbar || vertScrollbar) {
var styles = getStyleComputedProperty(element);
horizScrollbar -= getBordersSize(styles, 'x');
vertScrollbar -= getBordersSize(styles, 'y');
result.width -= horizScrollbar;
result.height -= vertScrollbar;
}
return getClientRect(result);
}
function getOffsetRectRelativeToArbitraryNode(children, parent) {
var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var isIE10 = isIE(10);
var isHTML = parent.nodeName === 'HTML';
var childrenRect = getBoundingClientRect(children);
var parentRect = getBoundingClientRect(parent);
var scrollParent = getScrollParent(children);
var styles = getStyleComputedProperty(parent);
var borderTopWidth = parseFloat(styles.borderTopWidth);
var borderLeftWidth = parseFloat(styles.borderLeftWidth); // In cases where the parent is fixed, we must ignore negative scroll in offset calc
if (fixedPosition && isHTML) {
parentRect.top = Math.max(parentRect.top, 0);
parentRect.left = Math.max(parentRect.left, 0);
}
var offsets = getClientRect({
top: childrenRect.top - parentRect.top - borderTopWidth,
left: childrenRect.left - parentRect.left - borderLeftWidth,
width: childrenRect.width,
height: childrenRect.height
});
offsets.marginTop = 0;
offsets.marginLeft = 0; // Subtract margins of documentElement in case it's being used as parent
// we do this only on HTML because it's the only element that behaves
// differently when margins are applied to it. The margins are included in
// the box of the documentElement, in the other cases not.
if (!isIE10 && isHTML) {
var marginTop = parseFloat(styles.marginTop);
var marginLeft = parseFloat(styles.marginLeft);
offsets.top -= borderTopWidth - marginTop;
offsets.bottom -= borderTopWidth - marginTop;
offsets.left -= borderLeftWidth - marginLeft;
offsets.right -= borderLeftWidth - marginLeft; // Attach marginTop and marginLeft because in some circumstances we may need them
offsets.marginTop = marginTop;
offsets.marginLeft = marginLeft;
}
if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
offsets = includeScroll(offsets, parent);
}
return offsets;
}
function getViewportOffsetRectRelativeToArtbitraryNode(element) {
var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var html = element.ownerDocument.documentElement;
var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
var width = Math.max(html.clientWidth, window.innerWidth || 0);
var height = Math.max(html.clientHeight, window.innerHeight || 0);
var scrollTop = !excludeScroll ? getScroll(html) : 0;
var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;
var offset = {
top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,
width: width,
height: height
};
return getClientRect(offset);
}
/**
* Check if the given element is fixed or is inside a fixed parent
* @method
* @memberof Popper.Utils
* @argument {Element} element
* @argument {Element} customContainer
* @returns {Boolean} answer to "isFixed?"
*/
function isFixed(element) {
var nodeName = element.nodeName;
if (nodeName === 'BODY' || nodeName === 'HTML') {
return false;
}
if (getStyleComputedProperty(element, 'position') === 'fixed') {
return true;
}
var parentNode = getParentNode(element);
if (!parentNode) {
return false;
}
return isFixed(parentNode);
}
/**
* Finds the first parent of an element that has a transformed property defined
* @method
* @memberof Popper.Utils
* @argument {Element} element
* @returns {Element} first transformed parent or documentElement
*/
function getFixedPositionOffsetParent(element) {
// This check is needed to avoid errors in case one of the elements isn't defined for any reason
if (!element || !element.parentElement || isIE()) {
return document.documentElement;
}
var el = element.parentElement;
while (el && getStyleComputedProperty(el, 'transform') === 'none') {
el = el.parentElement;
}
return el || document.documentElement;
}
/**
* Computed the boundaries limits and return them
* @method
* @memberof Popper.Utils
* @param {HTMLElement} popper
* @param {HTMLElement} reference
* @param {number} padding
* @param {HTMLElement} boundariesElement - Element used to define the boundaries
* @param {Boolean} fixedPosition - Is in fixed position mode
* @returns {Object} Coordinates of the boundaries
*/
function getBoundaries(popper, reference, padding, boundariesElement) {
var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; // NOTE: 1 DOM access here
var boundaries = {
top: 0,
left: 0
};
var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference)); // Handle viewport case
if (boundariesElement === 'viewport') {
boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
} else {
// Handle other cases based on DOM element used as boundaries
var boundariesNode = void 0;
if (boundariesElement === 'scrollParent') {
boundariesNode = getScrollParent(getParentNode(reference));
if (boundariesNode.nodeName === 'BODY') {
boundariesNode = popper.ownerDocument.documentElement;
}
} else if (boundariesElement === 'window') {
boundariesNode = popper.ownerDocument.documentElement;
} else {
boundariesNode = boundariesElement;
}
var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition); // In case of HTML, we need a different computation
if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
var _getWindowSizes = getWindowSizes(popper.ownerDocument),
height = _getWindowSizes.height,
width = _getWindowSizes.width;
boundaries.top += offsets.top - offsets.marginTop;
boundaries.bottom = height + offsets.top;
boundaries.left += offsets.left - offsets.marginLeft;
boundaries.right = width + offsets.left;
} else {
// for all the other DOM elements, this one is good
boundaries = offsets;
}
} // Add paddings
padding = padding || 0;
var isPaddingNumber = typeof padding === 'number';
boundaries.left += isPaddingNumber ? padding : padding.left || 0;
boundaries.top += isPaddingNumber ? padding : padding.top || 0;
boundaries.right -= isPaddingNumber ? padding : padding.right || 0;
boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;
return boundaries;
}
function getArea(_ref) {
var width = _ref.width,
height = _ref.height;
return width * height;
}
/**
* Utility used to transform the `auto` placement to the placement with more
* available space.
* @method
* @memberof Popper.Utils
* @argument {Object} data - The data object generated by update method
* @argument {Object} options - Modifiers configuration and options
* @returns {Object} The data object, properly modified
*/
function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {
var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
if (placement.indexOf('auto') === -1) {
return placement;
}
var boundaries = getBoundaries(popper, reference, padding, boundariesElement);
var rects = {
top: {
width: boundaries.width,
height: refRect.top - boundaries.top
},
right: {
width: boundaries.right - refRect.right,
height: boundaries.height
},
bottom: {
width: boundaries.width,
height: boundaries.bottom - refRect.bottom
},
left: {
width: refRect.left - boundaries.left,
height: boundaries.height
}
};
var sortedAreas = Object.keys(rects).map(function (key) {
return _extends({
key: key
}, rects[key], {
area: getArea(rects[key])
});
}).sort(function (a, b) {
return b.area - a.area;
});
var filteredAreas = sortedAreas.filter(function (_ref2) {
var width = _ref2.width,
height = _ref2.height;
return width >= popper.clientWidth && height >= popper.clientHeight;
});
var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;
var variation = placement.split('-')[1];
return computedPlacement + (variation ? '-' + variation : '');
}
/**
* Get offsets to the reference element
* @method
* @memberof Popper.Utils
* @param {Object} state
* @param {Element} popper - the popper element
* @param {Element} reference - the reference element (the popper will be relative to this)
* @param {Element} fixedPosition - is in fixed position mode
* @returns {Object} An object containing the offsets which will be applied to the popper
*/
function getReferenceOffsets(state, popper, reference) {
var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));
return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
}
/**
* Get the outer sizes of the given element (offset size + margins)
* @method
* @memberof Popper.Utils
* @argument {Element} element
* @returns {Object} object containing width and height properties
*/
function getOuterSizes(element) {
var window = element.ownerDocument.defaultView;
var styles = window.getComputedStyle(element);
var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);
var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);
var result = {
width: element.offsetWidth + y,
height: element.offsetHeight + x
};
return result;
}
/**
* Get the opposite placement of the given one
* @method
* @memberof Popper.Utils
* @argument {String} placement
* @returns {String} flipped placement
*/
function getOppositePlacement(placement) {
var hash = {
left: 'right',
right: 'left',
bottom: 'top',
top: 'bottom'
};
return placement.replace(/left|right|bottom|top/g, function (matched) {
return hash[matched];
});
}
/**
* Get offsets to the popper
* @method
* @memberof Popper.Utils
* @param {Object} position - CSS position the Popper will get applied
* @param {HTMLElement} popper - the popper element
* @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)
* @param {String} placement - one of the valid placement options
* @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper
*/
function getPopperOffsets(popper, referenceOffsets, placement) {
placement = placement.split('-')[0]; // Get popper node sizes
var popperRect = getOuterSizes(popper); // Add position, width and height to our offsets object
var popperOffsets = {
width: popperRect.width,
height: popperRect.height
}; // depending by the popper placement we have to compute its offsets slightly differently
var isHoriz = ['right', 'left'].indexOf(placement) !== -1;
var mainSide = isHoriz ? 'top' : 'left';
var secondarySide = isHoriz ? 'left' : 'top';
var measurement = isHoriz ? 'height' : 'width';
var secondaryMeasurement = !isHoriz ? 'height' : 'width';
popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;
if (placement === secondarySide) {
popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];
} else {
popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];
}
return popperOffsets;
}
/**
* Mimics the `find` method of Array
* @method
* @memberof Popper.Utils
* @argument {Array} arr
* @argument prop
* @argument value
* @returns index or -1
*/
function find(arr, check) {
// use native find if supported
if (Array.prototype.find) {
return arr.find(check);
} // use `filter` to obtain the same behavior of `find`
return arr.filter(check)[0];
}
/**
* Return the index of the matching object
* @method
* @memberof Popper.Utils
* @argument {Array} arr
* @argument prop
* @argument value
* @returns index or -1
*/
function findIndex(arr, prop, value) {
// use native findIndex if supported
if (Array.prototype.findIndex) {
return arr.findIndex(function (cur) {
return cur[prop] === value;
});
} // use `find` + `indexOf` if `findIndex` isn't supported
var match = find(arr, function (obj) {
return obj[prop] === value;
});
return arr.indexOf(match);
}
/**
* Loop trough the list of modifiers and run them in order,
* each of them will then edit the data object.
* @method
* @memberof Popper.Utils
* @param {dataObject} data
* @param {Array} modifiers
* @param {String} ends - Optional modifier name used as stopper
* @returns {dataObject}
*/
function runModifiers(modifiers, data, ends) {
var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
modifiersToRun.forEach(function (modifier) {
if (modifier['function']) {
// eslint-disable-line dot-notation
console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
}
var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation
if (modifier.enabled && isFunction(fn)) {
// Add properties to offsets to make them a complete clientRect object
// we do this before each modifier to make sure the previous one doesn't
// mess with these values
data.offsets.popper = getClientRect(data.offsets.popper);
data.offsets.reference = getClientRect(data.offsets.reference);
data = fn(data, modifier);
}
});
return data;
}
/**
* Updates the position of the popper, computing the new offsets and applying
* the new style.
* Prefer `scheduleUpdate` over `update` because of performance reasons.
* @method
* @memberof Popper
*/
function update() {
// if popper is destroyed, don't perform any further update
if (this.state.isDestroyed) {
return;
}
var data = {
instance: this,
styles: {},
arrowStyles: {},
attributes: {},
flipped: false,
offsets: {}
}; // compute reference element offsets
data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); // compute auto placement, store placement inside the data object,
// modifiers will be able to edit `placement` if needed
// and refer to originalPlacement to know the original value
data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); // store the computed placement inside `originalPlacement`
data.originalPlacement = data.placement;
data.positionFixed = this.options.positionFixed; // compute the popper offsets
data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);
data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers
data = runModifiers(this.modifiers, data); // the first `update` will call `onCreate` callback
// the other ones will call `onUpdate` callback
if (!this.state.isCreated) {
this.state.isCreated = true;
this.options.onCreate(data);
} else {
this.options.onUpdate(data);
}
}
/**
* Helper used to know if the given modifier is enabled.
* @method
* @memberof Popper.Utils
* @returns {Boolean}
*/
function isModifierEnabled(modifiers, modifierName) {
return modifiers.some(function (_ref) {
var name = _ref.name,
enabled = _ref.enabled;
return enabled && name === modifierName;
});
}
/**
* Get the prefixed supported property name
* @method
* @memberof Popper.Utils
* @argument {String} property (camelCase)
* @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)
*/
function getSupportedPropertyName(property) {
var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
var upperProp = property.charAt(0).toUpperCase() + property.slice(1);
for (var i = 0; i < prefixes.length; i++) {
var prefix = prefixes[i];
var toCheck = prefix ? '' + prefix + upperProp : property;
if (typeof document.body.style[toCheck] !== 'undefined') {
return toCheck;
}
}
return null;
}
/**
* Destroys the popper.
* @method
* @memberof Popper
*/
function destroy() {
this.state.isDestroyed = true; // touch DOM only if `applyStyle` modifier is enabled
if (isModifierEnabled(this.modifiers, 'applyStyle')) {
this.popper.removeAttribute('x-placement');
this.popper.style.position = '';
this.popper.style.top = '';
this.popper.style.left = '';
this.popper.style.right = '';
this.popper.style.bottom = '';
this.popper.style.willChange = '';
this.popper.style[getSupportedPropertyName('transform')] = '';
}
this.disableEventListeners(); // remove the popper if user explicitly asked for the deletion on destroy
// do not use `remove` because IE11 doesn't support it
if (this.options.removeOnDestroy) {
this.popper.parentNode.removeChild(this.popper);
}
return this;
}
/**
* Get the window associated with the element
* @argument {Element} element
* @returns {Window}
*/
function getWindow(element) {
var ownerDocument = element.ownerDocument;
return ownerDocument ? ownerDocument.defaultView : window;
}
function attachToScrollParents(scrollParent, event, callback, scrollParents) {
var isBody = scrollParent.nodeName === 'BODY';
var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;
target.addEventListener(event, callback, {
passive: true
});
if (!isBody) {
attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);
}
scrollParents.push(target);
}
/**
* Setup needed event listeners used to update the popper position
* @method
* @memberof Popper.Utils
* @private
*/
function setupEventListeners(reference, options, state, updateBound) {
// Resize event listener on window
state.updateBound = updateBound;
getWindow(reference).addEventListener('resize', state.updateBound, {
passive: true
}); // Scroll event listener on scroll parents
var scrollElement = getScrollParent(reference);
attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
state.scrollElement = scrollElement;
state.eventsEnabled = true;
return state;
}
/**
* It will add resize/scroll events and start recalculating
* position of the popper element when they are triggered.
* @method
* @memberof Popper
*/
function enableEventListeners() {
if (!this.state.eventsEnabled) {
this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);
}
}
/**
* Remove event listeners used to update the popper position
* @method
* @memberof Popper.Utils
* @private
*/
function removeEventListeners(reference, state) {
// Remove resize event listener on window
getWindow(reference).removeEventListener('resize', state.updateBound); // Remove scroll event listener on scroll parents
state.scrollParents.forEach(function (target) {
target.removeEventListener('scroll', state.updateBound);
}); // Reset state
state.updateBound = null;
state.scrollParents = [];
state.scrollElement = null;
state.eventsEnabled = false;
return state;
}
/**
* It will remove resize/scroll events and won't recalculate popper position
* when they are triggered. It also won't trigger `onUpdate` callback anymore,
* unless you call `update` method manually.
* @method
* @memberof Popper
*/
function disableEventListeners() {
if (this.state.eventsEnabled) {
cancelAnimationFrame(this.scheduleUpdate);
this.state = removeEventListeners(this.reference, this.state);
}
}
/**
* Tells if a given input is a number
* @method
* @memberof Popper.Utils
* @param {*} input to check
* @return {Boolean}
*/
function isNumeric(n) {
return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
}
/**
* Set the style to the given popper
* @method
* @memberof Popper.Utils
* @argument {Element} element - Element to apply the style to
* @argument {Object} styles
* Object with a list of properties and values which will be applied to the element
*/
function setStyles(element, styles) {
Object.keys(styles).forEach(function (prop) {
var unit = ''; // add unit if the value is numeric and is one of the following
if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
unit = 'px';
}
element.style[prop] = styles[prop] + unit;
});
}
/**
* Set the attributes to the given popper
* @method
* @memberof Popper.Utils
* @argument {Element} element - Element to apply the attributes to
* @argument {Object} styles
* Object with a list of properties and values which will be applied to the element
*/
function setAttributes(element, attributes) {
Object.keys(attributes).forEach(function (prop) {
var value = attributes[prop];
if (value !== false) {
element.setAttribute(prop, attributes[prop]);
} else {
element.removeAttribute(prop);
}
});
}
/**
* @function
* @memberof Modifiers
* @argument {Object} data - The data object generated by `update` method
* @argument {Object} data.styles - List of style properties - values to apply to popper element
* @argument {Object} data.attributes - List of attribute properties - values to apply to popper element
* @argument {Object} options - Modifiers configuration and options
* @returns {Object} The same data object
*/
function applyStyle(data) {
// any property present in `data.styles` will be applied to the popper,
// in this way we can make the 3rd party modifiers add custom styles to it
// Be aware, modifiers could override the properties defined in the previous
// lines of this modifier!
setStyles(data.instance.popper, data.styles); // any property present in `data.attributes` will be applied to the popper,
// they will be set as HTML attributes of the element
setAttributes(data.instance.popper, data.attributes); // if arrowElement is defined and arrowStyles has some properties
if (data.arrowElement && Object.keys(data.arrowStyles).length) {
setStyles(data.arrowElement, data.arrowStyles);
}
return data;
}
/**
* Set the x-placement attribute before everything else because it could be used
* to add margins to the popper margins needs to be calculated to get the
* correct popper offsets.
* @method
* @memberof Popper.modifiers
* @param {HTMLElement} reference - The reference element used to position the popper
* @param {HTMLElement} popper - The HTML element used as popper
* @param {Object} options - Popper.js options
*/
function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
// compute reference element offsets
var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed); // compute auto placement, store placement inside the data object,
// modifiers will be able to edit `placement` if needed
// and refer to originalPlacement to know the original value
var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);
popper.setAttribute('x-placement', placement); // Apply `position` to popper before anything else because
// without the position applied we can't guarantee correct computations
setStyles(popper, {
position: options.positionFixed ? 'fixed' : 'absolute'
});
return options;
}
/**
* @function
* @memberof Popper.Utils
* @argument {Object} data - The data object generated by `update` method
* @argument {Boolean} shouldRound - If the offsets should be rounded at all
* @returns {Object} The popper's position offsets rounded
*
* The tale of pixel-perfect positioning. It's still not 100% perfect, but as
* good as it can be within reason.
* Discussion here: https://github.com/FezVrasta/popper.js/pull/715
*
* Low DPI screens cause a popper to be blurry if not using full pixels (Safari
* as well on High DPI screens).
*
* Firefox prefers no rounding for positioning and does not have blurriness on
* high DPI screens.
*
* Only horizontal placement and left/right values need to be considered.
*/
function getRoundedOffsets(data, shouldRound) {
var _data$offsets = data.offsets,
popper = _data$offsets.popper,
reference = _data$offsets.reference;
var round = Math.round,
floor = Math.floor;
var noRound = function noRound(v) {
return v;
};
var referenceWidth = round(reference.width);
var popperWidth = round(popper.width);
var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;
var isVariation = data.placement.indexOf('-') !== -1;
var sameWidthParity = referenceWidth % 2 === popperWidth % 2;
var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;
var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;
var verticalToInteger = !shouldRound ? noRound : round;
return {
left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),
top: verticalToInteger(popper.top),
bottom: verticalToInteger(popper.bottom),
right: horizontalToInteger(popper.right)
};
}
var isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);
/**
* @function
* @memberof Modifiers
* @argument {Object} data - The data object generated by `update` method
* @argument {Object} options - Modifiers configuration and options
* @returns {Object} The data object, properly modified
*/
function computeStyle(data, options) {
var x = options.x,
y = options.y;
var popper = data.offsets.popper; // Remove this legacy support in Popper.js v2
var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {
return modifier.name === 'applyStyle';
}).gpuAcceleration;
if (legacyGpuAccelerationOption !== undefined) {
console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
}
var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;
var offsetParent = getOffsetParent(data.instance.popper);
var offsetParentRect = getBoundingClientRect(offsetParent); // Styles
var styles = {
position: popper.position
};
var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);
var sideA = x === 'bottom' ? 'top' : 'bottom';
var sideB = y === 'right' ? 'left' : 'right'; // if gpuAcceleration is set to `true` and transform is supported,
// we use `translate3d` to apply the position to the popper we
// automatically use the supported prefixed version if needed
var prefixedProperty = getSupportedPropertyName('transform'); // now, let's make a step back and look at this code closely (wtf?)
// If the content of the popper grows once it's been positioned, it
// may happen that the popper gets misplaced because of the new content
// overflowing its reference element
// To avoid this problem, we provide two options (x and y), which allow
// the consumer to define the offset origin.
// If we position a popper on top of a reference element, we can set
// `x` to `top` to make the popper grow towards its top instead of
// its bottom.
var left = void 0,
top = void 0;
if (sideA === 'bottom') {
// when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar)
// and not the bottom of the html element
if (offsetParent.nodeName === 'HTML') {
top = -offsetParent.clientHeight + offsets.bottom;
} else {
top = -offsetParentRect.height + offsets.bottom;
}
} else {
top = offsets.top;
}
if (sideB === 'right') {
if (offsetParent.nodeName === 'HTML') {
left = -offsetParent.clientWidth + offsets.right;
} else {
left = -offsetParentRect.width + offsets.right;
}
} else {
left = offsets.left;
}
if (gpuAcceleration && prefixedProperty) {
styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
styles[sideA] = 0;
styles[sideB] = 0;
styles.willChange = 'transform';
} else {
// othwerise, we use the standard `top`, `left`, `bottom` and `right` properties
var invertTop = sideA === 'bottom' ? -1 : 1;
var invertLeft = sideB === 'right' ? -1 : 1;
styles[sideA] = top * invertTop;
styles[sideB] = left * invertLeft;
styles.willChange = sideA + ', ' + sideB;
} // Attributes
var attributes = {
'x-placement': data.placement
}; // Update `data` attributes, styles and arrowStyles
data.attributes = _extends({}, attributes, data.attributes);
data.styles = _extends({}, styles, data.styles);
data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);
return data;
}
/**
* Helper used to know if the given modifier depends from another one.
* It checks if the needed modifier is listed and enabled.
* @method
* @memberof Popper.Utils
* @param {Array} modifiers - list of modifiers
* @param {String} requestingName - name of requesting modifier
* @param {String} requestedName - name of requested modifier
* @returns {Boolean}
*/
function isModifierRequired(modifiers, requestingName, requestedName) {
var requesting = find(modifiers, function (_ref) {
var name = _ref.name;
return name === requestingName;
});
var isRequired = !!requesting && modifiers.some(function (modifier) {
return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;
});
if (!isRequired) {
var _requesting = '`' + requestingName + '`';
var requested = '`' + requestedName + '`';
console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');
}
return isRequired;
}
/**
* @function
* @memberof Modifiers
* @argument {Object} data - The data object generated by update method
* @argument {Object} options - Modifiers configuration and options
* @returns {Object} The data object, properly modified
*/
function arrow(data, options) {
var _data$offsets$arrow; // arrow depends on keepTogether in order to work
if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {
return data;
}
var arrowElement = options.element; // if arrowElement is a string, suppose it's a CSS selector
if (typeof arrowElement === 'string') {
arrowElement = data.instance.popper.querySelector(arrowElement); // if arrowElement is not found, don't run the modifier
if (!arrowElement) {
return data;
}
} else {
// if the arrowElement isn't a query selector we must check that the
// provided DOM node is child of its popper node
if (!data.instance.popper.contains(arrowElement)) {
console.warn('WARNING: `arrow.element` must be child of its popper element!');
return data;
}
}
var placement = data.placement.split('-')[0];
var _data$offsets = data.offsets,
popper = _data$offsets.popper,
reference = _data$offsets.reference;
var isVertical = ['left', 'right'].indexOf(placement) !== -1;
var len = isVertical ? 'height' : 'width';
var sideCapitalized = isVertical ? 'Top' : 'Left';
var side = sideCapitalized.toLowerCase();
var altSide = isVertical ? 'left' : 'top';
var opSide = isVertical ? 'bottom' : 'right';
var arrowElementSize = getOuterSizes(arrowElement)[len]; //
// extends keepTogether behavior making sure the popper and its
// reference have enough pixels in conjunction
//
// top/left side
if (reference[opSide] - arrowElementSize < popper[side]) {
data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);
} // bottom/right side
if (reference[side] + arrowElementSize > popper[opSide]) {
data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];
}
data.offsets.popper = getClientRect(data.offsets.popper); // compute center of the popper
var center = reference[side] + reference[len] / 2 - arrowElementSize / 2; // Compute the sideValue using the updated popper offsets
// take popper margin in account because we don't have this info available
var css = getStyleComputedProperty(data.instance.popper);
var popperMarginSide = parseFloat(css['margin' + sideCapitalized]);
var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']);
var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide; // prevent arrowElement from being placed not contiguously to its popper
sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);
data.arrowElement = arrowElement;
data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);
return data;
}
/**
* Get the opposite placement variation of the given one
* @method
* @memberof Popper.Utils
* @argument {String} placement variation
* @returns {String} flipped placement variation
*/
function getOppositeVariation(variation) {
if (variation === 'end') {
return 'start';
} else if (variation === 'start') {
return 'end';
}
return variation;
}
/**
* List of accepted placements to use as values of the `placement` option.
* Valid placements are:
* - `auto`
* - `top`
* - `right`
* - `bottom`
* - `left`
*
* Each placement can have a variation from this list:
* - `-start`
* - `-end`
*
* Variations are interpreted easily if you think of them as the left to right
* written languages. Horizontally (`top` and `bottom`), `start` is left and `end`
* is right.
* Vertically (`left` and `right`), `start` is top and `end` is bottom.
*
* Some valid examples are:
* - `top-end` (on top of reference, right aligned)
* - `right-start` (on right of reference, top aligned)
* - `bottom` (on bottom, centered)
* - `auto-end` (on the side with more space available, alignment depends by placement)
*
* @static
* @type {Array}
* @enum {String}
* @readonly
* @method placements
* @memberof Popper
*/
var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']; // Get rid of `auto` `auto-start` and `auto-end`
var validPlacements = placements.slice(3);
/**
* Given an initial placement, returns all the subsequent placements
* clockwise (or counter-clockwise).
*
* @method
* @memberof Popper.Utils
* @argument {String} placement - A valid placement (it accepts variations)
* @argument {Boolean} counter - Set to true to walk the placements counterclockwise
* @returns {Array} placements including their variations
*/
function clockwise(placement) {
var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var index = validPlacements.indexOf(placement);
var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));
return counter ? arr.reverse() : arr;
}
var BEHAVIORS = {
FLIP: 'flip',
CLOCKWISE: 'clockwise',
COUNTERCLOCKWISE: 'counterclockwise'
};
/**
* @function
* @memberof Modifiers
* @argument {Object} data - The data object generated by update method
* @argument {Object} options - Modifiers configuration and options
* @returns {Object} The data object, properly modified
*/
function flip(data, options) {
// if `inner` modifier is enabled, we can't use the `flip` modifier
if (isModifierEnabled(data.instance.modifiers, 'inner')) {
return data;
}
if (data.flipped && data.placement === data.originalPlacement) {
// seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
return data;
}
var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);
var placement = data.placement.split('-')[0];
var placementOpposite = getOppositePlacement(placement);
var variation = data.placement.split('-')[1] || '';
var flipOrder = [];
switch (options.behavior) {
case BEHAVIORS.FLIP:
flipOrder = [placement, placementOpposite];
break;
case BEHAVIORS.CLOCKWISE:
flipOrder = clockwise(placement);
break;
case BEHAVIORS.COUNTERCLOCKWISE:
flipOrder = clockwise(placement, true);
break;
default:
flipOrder = options.behavior;
}
flipOrder.forEach(function (step, index) {
if (placement !== step || flipOrder.length === index + 1) {
return data;
}
placement = data.placement.split('-')[0];
placementOpposite = getOppositePlacement(placement);
var popperOffsets = data.offsets.popper;
var refOffsets = data.offsets.reference; // using floor because the reference offsets may contain decimals we are not going to consider here
var floor = Math.floor;
var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);
var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);
var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);
var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);
var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);
var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom; // flip the variation if required
var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; // flips variation if reference element overflows boundaries
var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom); // flips variation if popper content overflows boundaries
var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);
var flippedVariation = flippedVariationByRef || flippedVariationByContent;
if (overlapsRef || overflowsBoundaries || flippedVariation) {
// this boolean to detect any flip loop
data.flipped = true;
if (overlapsRef || overflowsBoundaries) {
placement = flipOrder[index + 1];
}
if (flippedVariation) {
variation = getOppositeVariation(variation);
}
data.placement = placement + (variation ? '-' + variation : ''); // this object contains `position`, we want to preserve it along with
// any additional property we may add in the future
data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));
data = runModifiers(data.instance.modifiers, data, 'flip');
}
});
return data;
}
/**
* @function
* @memberof Modifiers
* @argument {Object} data - The data object generated by update method
* @argument {Object} options - Modifiers configuration and options
* @returns {Object} The data object, properly modified
*/
function keepTogether(data) {
var _data$offsets = data.offsets,
popper = _data$offsets.popper,
reference = _data$offsets.reference;
var placement = data.placement.split('-')[0];
var floor = Math.floor;
var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
var side = isVertical ? 'right' : 'bottom';
var opSide = isVertical ? 'left' : 'top';
var measurement = isVertical ? 'width' : 'height';
if (popper[side] < floor(reference[opSide])) {
data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];
}
if (popper[opSide] > floor(reference[side])) {
data.offsets.popper[opSide] = floor(reference[side]);
}
return data;
}
/**
* Converts a string containing value + unit into a px value number
* @function
* @memberof {modifiers~offset}
* @private
* @argument {String} str - Value + unit string
* @argument {String} measurement - `height` or `width`
* @argument {Object} popperOffsets
* @argument {Object} referenceOffsets
* @returns {Number|String}
* Value in pixels, or original string if no values were extracted
*/
function toValue(str, measurement, popperOffsets, referenceOffsets) {
// separate value from unit
var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);
var value = +split[1];
var unit = split[2]; // If it's not a number it's an operator, I guess
if (!value) {
return str;
}
if (unit.indexOf('%') === 0) {
var element = void 0;
switch (unit) {
case '%p':
element = popperOffsets;
break;
case '%':
case '%r':
default:
element = referenceOffsets;
}
var rect = getClientRect(element);
return rect[measurement] / 100 * value;
} else if (unit === 'vh' || unit === 'vw') {
// if is a vh or vw, we calculate the size based on the viewport
var size = void 0;
if (unit === 'vh') {
size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
} else {
size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
}
return size / 100 * value;
} else {
// if is an explicit pixel unit, we get rid of the unit and keep the value
// if is an implicit unit, it's px, and we return just the value
return value;
}
}
/**
* Parse an `offset` string to extrapolate `x` and `y` numeric offsets.
* @function
* @memberof {modifiers~offset}
* @private
* @argument {String} offset
* @argument {Object} popperOffsets
* @argument {Object} referenceOffsets
* @argument {String} basePlacement
* @returns {Array} a two cells array with x and y offsets in numbers
*/
function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
var offsets = [0, 0]; // Use height if placement is left or right and index is 0 otherwise use width
// in this way the first offset will use an axis and the second one
// will use the other one
var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1; // Split the offset string to obtain a list of values and operands
// The regex addresses values with the plus or minus sign in front (+10, -20, etc)
var fragments = offset.split(/(\+|\-)/).map(function (frag) {
return frag.trim();
}); // Detect if the offset string contains a pair of values or a single one
// they could be separated by comma or space
var divider = fragments.indexOf(find(fragments, function (frag) {
return frag.search(/,|\s/) !== -1;
}));
if (fragments[divider] && fragments[divider].indexOf(',') === -1) {
console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
} // If divider is found, we divide the list of values and operands to divide
// them by ofset X and Y.
var splitRegex = /\s*,\s*|\s+/;
var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments]; // Convert the values with units to absolute pixels to allow our computations
ops = ops.map(function (op, index) {
// Most of the units rely on the orientation of the popper
var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';
var mergeWithPrevious = false;
return op // This aggregates any `+` or `-` sign that aren't considered operators
// e.g.: 10 + +5 => [10, +, +5]
.reduce(function (a, b) {
if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {
a[a.length - 1] = b;
mergeWithPrevious = true;
return a;
} else if (mergeWithPrevious) {
a[a.length - 1] += b;
mergeWithPrevious = false;
return a;
} else {
return a.concat(b);
}
}, []) // Here we convert the string values into number values (in px)
.map(function (str) {
return toValue(str, measurement, popperOffsets, referenceOffsets);
});
}); // Loop trough the offsets arrays and execute the operations
ops.forEach(function (op, index) {
op.forEach(function (frag, index2) {
if (isNumeric(frag)) {
offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);
}
});
});
return offsets;
}
/**
* @function
* @memberof Modifiers
* @argument {Object} data - The data object generated by update method
* @argument {Object} options - Modifiers configuration and options
* @argument {Number|String} options.offset=0
* The offset value as described in the modifier description
* @returns {Object} The data object, properly modified
*/
function offset(data, _ref) {
var offset = _ref.offset;
var placement = data.placement,
_data$offsets = data.offsets,
popper = _data$offsets.popper,
reference = _data$offsets.reference;
var basePlacement = placement.split('-')[0];
var offsets = void 0;
if (isNumeric(+offset)) {
offsets = [+offset, 0];
} else {
offsets = parseOffset(offset, popper, reference, basePlacement);
}
if (basePlacement === 'left') {
popper.top += offsets[0];
popper.left -= offsets[1];
} else if (basePlacement === 'right') {
popper.top += offsets[0];
popper.left += offsets[1];
} else if (basePlacement === 'top') {
popper.left += offsets[0];
popper.top -= offsets[1];
} else if (basePlacement === 'bottom') {
popper.left += offsets[0];
popper.top += offsets[1];
}
data.popper = popper;
return data;
}
/**
* @function
* @memberof Modifiers
* @argument {Object} data - The data object generated by `update` method
* @argument {Object} options - Modifiers configuration and options
* @returns {Object} The data object, properly modified
*/
function preventOverflow(data, options) {
var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper); // If offsetParent is the reference element, we really want to
// go one step up and use the next offsetParent as reference to
// avoid to make this modifier completely useless and look like broken
if (data.instance.reference === boundariesElement) {
boundariesElement = getOffsetParent(boundariesElement);
} // NOTE: DOM access here
// resets the popper's position so that the document size can be calculated excluding
// the size of the popper element itself
var transformProp = getSupportedPropertyName('transform');
var popperStyles = data.instance.popper.style; // assignment to help minification
var top = popperStyles.top,
left = popperStyles.left,
transform = popperStyles[transformProp];
popperStyles.top = '';
popperStyles.left = '';
popperStyles[transformProp] = '';
var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed); // NOTE: DOM access here
// restores the original style properties after the offsets have been computed
popperStyles.top = top;
popperStyles.left = left;
popperStyles[transformProp] = transform;
options.boundaries = boundaries;
var order = options.priority;
var popper = data.offsets.popper;
var check = {
primary: function primary(placement) {
var value = popper[placement];
if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {
value = Math.max(popper[placement], boundaries[placement]);
}
return defineProperty({}, placement, value);
},
secondary: function secondary(placement) {
var mainSide = placement === 'right' ? 'left' : 'top';
var value = popper[mainSide];
if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {
value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));
}
return defineProperty({}, mainSide, value);
}
};
order.forEach(function (placement) {
var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
popper = _extends({}, popper, check[side](placement));
});
data.offsets.popper = popper;
return data;
}
/**
* @function
* @memberof Modifiers
* @argument {Object} data - The data object generated by `update` method
* @argument {Object} options - Modifiers configuration and options
* @returns {Object} The data object, properly modified
*/
function shift(data) {
var placement = data.placement;
var basePlacement = placement.split('-')[0];
var shiftvariation = placement.split('-')[1]; // if shift shiftvariation is specified, run the modifier
if (shiftvariation) {
var _data$offsets = data.offsets,
reference = _data$offsets.reference,
popper = _data$offsets.popper;
var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;
var side = isVertical ? 'left' : 'top';
var measurement = isVertical ? 'width' : 'height';
var shiftOffsets = {
start: defineProperty({}, side, reference[side]),
end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
};
data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);
}
return data;
}
/**
* @function
* @memberof Modifiers
* @argument {Object} data - The data object generated by update method
* @argument {Object} options - Modifiers configuration and options
* @returns {Object} The data object, properly modified
*/
function hide(data) {
if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {
return data;
}
var refRect = data.offsets.reference;
var bound = find(data.instance.modifiers, function (modifier) {
return modifier.name === 'preventOverflow';
}).boundaries;
if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {
// Avoid unnecessary DOM access if visibility hasn't changed
if (data.hide === true) {
return data;
}
data.hide = true;
data.attributes['x-out-of-boundaries'] = '';
} else {
// Avoid unnecessary DOM access if visibility hasn't changed
if (data.hide === false) {
return data;
}
data.hide = false;
data.attributes['x-out-of-boundaries'] = false;
}
return data;
}
/**
* @function
* @memberof Modifiers
* @argument {Object} data - The data object generated by `update` method
* @argument {Object} options - Modifiers configuration and options
* @returns {Object} The data object, properly modified
*/
function inner(data) {
var placement = data.placement;
var basePlacement = placement.split('-')[0];
var _data$offsets = data.offsets,
popper = _data$offsets.popper,
reference = _data$offsets.reference;
var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;
var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;
popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);
data.placement = getOppositePlacement(placement);
data.offsets.popper = getClientRect(popper);
return data;
}
/**
* Modifier function, each modifier can have a function of this type assigned
* to its `fn` property.
* These functions will be called on each update, this means that you must
* make sure they are performant enough to avoid performance bottlenecks.
*
* @function ModifierFn
* @argument {dataObject} data - The data object generated by `update` method
* @argument {Object} options - Modifiers configuration and options
* @returns {dataObject} The data object, properly modified
*/
/**
* Modifiers are plugins used to alter the behavior of your poppers.
* Popper.js uses a set of 9 modifiers to provide all the basic functionalities
* needed by the library.
*
* Usually you don't want to override the `order`, `fn` and `onLoad` props.
* All the other properties are configurations that could be tweaked.
* @namespace modifiers
*/
var modifiers = {
/**
* Modifier used to shift the popper on the start or end of its reference
* element.
* It will read the variation of the `placement` property.
* It can be one either `-end` or `-start`.
* @memberof modifiers
* @inner
*/
shift: {
/** @prop {number} order=100 - Index used to define the order of execution */
order: 100,
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
enabled: true,
/** @prop {ModifierFn} */
fn: shift
},
/**
* The `offset` modifier can shift your popper on both its axis.
*
* It accepts the following units:
* - `px` or unit-less, interpreted as pixels
* - `%` or `%r`, percentage relative to the length of the reference element
* - `%p`, percentage relative to the length of the popper element
* - `vw`, CSS viewport width unit
* - `vh`, CSS viewport height unit
*
* For length is intended the main axis relative to the placement of the popper.
* This means that if the placement is `top` or `bottom`, the length will be the
* `width`. In case of `left` or `right`, it will be the `height`.
*
* You can provide a single value (as `Number` or `String`), or a pair of values
* as `String` divided by a comma or one (or more) white spaces.
* The latter is a deprecated method because it leads to confusion and will be
* removed in v2.
* Additionally, it accepts additions and subtractions between different units.
* Note that multiplications and divisions aren't supported.
*
* Valid examples are:
* ```
* 10
* '10%'
* '10, 10'
* '10%, 10'
* '10 + 10%'
* '10 - 5vh + 3%'
* '-10px + 5vh, 5px - 6%'
* ```
* > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap
* > with their reference element, unfortunately, you will have to disable the `flip` modifier.
* > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).
*
* @memberof modifiers
* @inner
*/
offset: {
/** @prop {number} order=200 - Index used to define the order of execution */
order: 200,
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
enabled: true,
/** @prop {ModifierFn} */
fn: offset,
/** @prop {Number|String} offset=0
* The offset value as described in the modifier description
*/
offset: 0
},
/**
* Modifier used to prevent the popper from being positioned outside the boundary.
*
* A scenario exists where the reference itself is not within the boundaries.
* We can say it has "escaped the boundaries" — or just "escaped".
* In this case we need to decide whether the popper should either:
*
* - detach from the reference and remain "trapped" in the boundaries, or
* - if it should ignore the boundary and "escape with its reference"
*
* When `escapeWithReference` is set to`true` and reference is completely
* outside its boundaries, the popper will overflow (or completely leave)
* the boundaries in order to remain attached to the edge of the reference.
*
* @memberof modifiers
* @inner
*/
preventOverflow: {
/** @prop {number} order=300 - Index used to define the order of execution */
order: 300,
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
enabled: true,
/** @prop {ModifierFn} */
fn: preventOverflow,
/**
* @prop {Array} [priority=['left','right','top','bottom']]
* Popper will try to prevent overflow following these priorities by default,
* then, it could overflow on the left and on top of the `boundariesElement`
*/
priority: ['left', 'right', 'top', 'bottom'],
/**
* @prop {number} padding=5
* Amount of pixel used to define a minimum distance between the boundaries
* and the popper. This makes sure the popper always has a little padding
* between the edges of its container
*/
padding: 5,
/**
* @prop {String|HTMLElement} boundariesElement='scrollParent'
* Boundaries used by the modifier. Can be `scrollParent`, `window`,
* `viewport` or any DOM element.
*/
boundariesElement: 'scrollParent'
},
/**
* Modifier used to make sure the reference and its popper stay near each other
* without leaving any gap between the two. Especially useful when the arrow is
* enabled and you want to ensure that it points to its reference element.
* It cares only about the first axis. You can still have poppers with margin
* between the popper and its reference element.
* @memberof modifiers
* @inner
*/
keepTogether: {
/** @prop {number} order=400 - Index used to define the order of execution */
order: 400,
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
enabled: true,
/** @prop {ModifierFn} */
fn: keepTogether
},
/**
* This modifier is used to move the `arrowElement` of the popper to make
* sure it is positioned between the reference element and its popper element.
* It will read the outer size of the `arrowElement` node to detect how many
* pixels of conjunction are needed.
*
* It has no effect if no `arrowElement` is provided.
* @memberof modifiers
* @inner
*/
arrow: {
/** @prop {number} order=500 - Index used to define the order of execution */
order: 500,
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
enabled: true,
/** @prop {ModifierFn} */
fn: arrow,
/** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */
element: '[x-arrow]'
},
/**
* Modifier used to flip the popper's placement when it starts to overlap its
* reference element.
*
* Requires the `preventOverflow` modifier before it in order to work.
*
* **NOTE:** this modifier will interrupt the current update cycle and will
* restart it if it detects the need to flip the placement.
* @memberof modifiers
* @inner
*/
flip: {
/** @prop {number} order=600 - Index used to define the order of execution */
order: 600,
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
enabled: true,
/** @prop {ModifierFn} */
fn: flip,
/**
* @prop {String|Array} behavior='flip'
* The behavior used to change the popper's placement. It can be one of
* `flip`, `clockwise`, `counterclockwise` or an array with a list of valid
* placements (with optional variations)
*/
behavior: 'flip',
/**
* @prop {number} padding=5
* The popper will flip if it hits the edges of the `boundariesElement`
*/
padding: 5,
/**
* @prop {String|HTMLElement} boundariesElement='viewport'
* The element which will define the boundaries of the popper position.
* The popper will never be placed outside of the defined boundaries
* (except if `keepTogether` is enabled)
*/
boundariesElement: 'viewport',
/**
* @prop {Boolean} flipVariations=false
* The popper will switch placement variation between `-start` and `-end` when
* the reference element overlaps its boundaries.
*
* The original placement should have a set variation.
*/
flipVariations: false,
/**
* @prop {Boolean} flipVariationsByContent=false
* The popper will switch placement variation between `-start` and `-end` when
* the popper element overlaps its reference boundaries.
*
* The original placement should have a set variation.
*/
flipVariationsByContent: false
},
/**
* Modifier used to make the popper flow toward the inner of the reference element.
* By default, when this modifier is disabled, the popper will be placed outside
* the reference element.
* @memberof modifiers
* @inner
*/
inner: {
/** @prop {number} order=700 - Index used to define the order of execution */
order: 700,
/** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */
enabled: false,
/** @prop {ModifierFn} */
fn: inner
},
/**
* Modifier used to hide the popper when its reference element is outside of the
* popper boundaries. It will set a `x-out-of-boundaries` attribute which can
* be used to hide with a CSS selector the popper when its reference is
* out of boundaries.
*
* Requires the `preventOverflow` modifier before it in order to work.
* @memberof modifiers
* @inner
*/
hide: {
/** @prop {number} order=800 - Index used to define the order of execution */
order: 800,
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
enabled: true,
/** @prop {ModifierFn} */
fn: hide
},
/**
* Computes the style that will be applied to the popper element to gets
* properly positioned.
*
* Note that this modifier will not touch the DOM, it just prepares the styles
* so that `applyStyle` modifier can apply it. This separation is useful
* in case you need to replace `applyStyle` with a custom implementation.
*
* This modifier has `850` as `order` value to maintain backward compatibility
* with previous versions of Popper.js. Expect the modifiers ordering method
* to change in future major versions of the library.
*
* @memberof modifiers
* @inner
*/
computeStyle: {
/** @prop {number} order=850 - Index used to define the order of execution */
order: 850,
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
enabled: true,
/** @prop {ModifierFn} */
fn: computeStyle,
/**
* @prop {Boolean} gpuAcceleration=true
* If true, it uses the CSS 3D transformation to position the popper.
* Otherwise, it will use the `top` and `left` properties
*/
gpuAcceleration: true,
/**
* @prop {string} [x='bottom']
* Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.
* Change this if your popper should grow in a direction different from `bottom`
*/
x: 'bottom',
/**
* @prop {string} [x='left']
* Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.
* Change this if your popper should grow in a direction different from `right`
*/
y: 'right'
},
/**
* Applies the computed styles to the popper element.
*
* All the DOM manipulations are limited to this modifier. This is useful in case
* you want to integrate Popper.js inside a framework or view library and you
* want to delegate all the DOM manipulations to it.
*
* Note that if you disable this modifier, you must make sure the popper element
* has its position set to `absolute` before Popper.js can do its work!
*
* Just disable this modifier and define your own to achieve the desired effect.
*
* @memberof modifiers
* @inner
*/
applyStyle: {
/** @prop {number} order=900 - Index used to define the order of execution */
order: 900,
/** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
enabled: true,
/** @prop {ModifierFn} */
fn: applyStyle,
/** @prop {Function} */
onLoad: applyStyleOnLoad,
/**
* @deprecated since version 1.10.0, the property moved to `computeStyle` modifier
* @prop {Boolean} gpuAcceleration=true
* If true, it uses the CSS 3D transformation to position the popper.
* Otherwise, it will use the `top` and `left` properties
*/
gpuAcceleration: undefined
}
};
/**
* The `dataObject` is an object containing all the information used by Popper.js.
* This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.
* @name dataObject
* @property {Object} data.instance The Popper.js instance
* @property {String} data.placement Placement applied to popper
* @property {String} data.originalPlacement Placement originally defined on init
* @property {Boolean} data.flipped True if popper has been flipped by flip modifier
* @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper
* @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier
* @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)
* @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)
* @property {Object} data.boundaries Offsets of the popper boundaries
* @property {Object} data.offsets The measurements of popper, reference and arrow elements
* @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values
* @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values
* @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0
*/
/**
* Default options provided to Popper.js constructor.
* These can be overridden using the `options` argument of Popper.js.
* To override an option, simply pass an object with the same
* structure of the `options` object, as the 3rd argument. For example:
* ```
* new Popper(ref, pop, {
* modifiers: {
* preventOverflow: { enabled: false }
* }
* })
* ```
* @type {Object}
* @static
* @memberof Popper
*/
var Defaults = {
/**
* Popper's placement.
* @prop {Popper.placements} placement='bottom'
*/
placement: 'bottom',
/**
* Set this to true if you want popper to position it self in 'fixed' mode
* @prop {Boolean} positionFixed=false
*/
positionFixed: false,
/**
* Whether events (resize, scroll) are initially enabled.
* @prop {Boolean} eventsEnabled=true
*/
eventsEnabled: true,
/**
* Set to true if you want to automatically remove the popper when
* you call the `destroy` method.
* @prop {Boolean} removeOnDestroy=false
*/
removeOnDestroy: false,
/**
* Callback called when the popper is created.
* By default, it is set to no-op.
* Access Popper.js instance with `data.instance`.
* @prop {onCreate}
*/
onCreate: function onCreate() {},
/**
* Callback called when the popper is updated. This callback is not called
* on the initialization/creation of the popper, but only on subsequent
* updates.
* By default, it is set to no-op.
* Access Popper.js instance with `data.instance`.
* @prop {onUpdate}
*/
onUpdate: function onUpdate() {},
/**
* List of modifiers used to modify the offsets before they are applied to the popper.
* They provide most of the functionalities of Popper.js.
* @prop {modifiers}
*/
modifiers: modifiers
};
/**
* @callback onCreate
* @param {dataObject} data
*/
/**
* @callback onUpdate
* @param {dataObject} data
*/
// Utils
// Methods
var Popper = function () {
/**
* Creates a new Popper.js instance.
* @class Popper
* @param {Element|referenceObject} reference - The reference element used to position the popper
* @param {Element} popper - The HTML / XML element used as the popper
* @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)
* @return {Object} instance - The generated Popper.js instance
*/
function Popper(reference, popper) {
var _this = this;
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
classCallCheck(this, Popper);
this.scheduleUpdate = function () {
return requestAnimationFrame(_this.update);
}; // make update() debounced, so that it only runs at most once-per-tick
this.update = debounce(this.update.bind(this)); // with {} we create a new object with the options inside it
this.options = _extends({}, Popper.Defaults, options); // init state
this.state = {
isDestroyed: false,
isCreated: false,
scrollParents: []
}; // get reference and popper elements (allow jQuery wrappers)
this.reference = reference && reference.jquery ? reference[0] : reference;
this.popper = popper && popper.jquery ? popper[0] : popper; // Deep merge modifiers options
this.options.modifiers = {};
Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
_this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
}); // Refactoring modifiers' list (Object => Array)
this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
return _extends({
name: name
}, _this.options.modifiers[name]);
}) // sort the modifiers by order
.sort(function (a, b) {
return a.order - b.order;
}); // modifiers have the ability to execute arbitrary code when Popper.js get inited
// such code is executed in the same order of its modifier
// they could add new properties to their options configuration
// BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
this.modifiers.forEach(function (modifierOptions) {
if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
}
}); // fire the first update to position the popper in the right place
this.update();
var eventsEnabled = this.options.eventsEnabled;
if (eventsEnabled) {
// setup event listeners, they will take care of update the position in specific situations
this.enableEventListeners();
}
this.state.eventsEnabled = eventsEnabled;
} // We can't use class properties because they don't get listed in the
// class prototype and break stuff like Sinon stubs
createClass(Popper, [{
key: 'update',
value: function update$$1() {
return update.call(this);
}
}, {
key: 'destroy',
value: function destroy$$1() {
return destroy.call(this);
}
}, {
key: 'enableEventListeners',
value: function enableEventListeners$$1() {
return enableEventListeners.call(this);
}
}, {
key: 'disableEventListeners',
value: function disableEventListeners$$1() {
return disableEventListeners.call(this);
}
/**
* Schedules an update. It will run on the next UI update available.
* @method scheduleUpdate
* @memberof Popper
*/
/**
* Collection of utilities useful when writing custom modifiers.
* Starting from version 1.7, this method is available only if you
* include `popper-utils.js` before `popper.js`.
*
* **DEPRECATION**: This way to access PopperUtils is deprecated
* and will be removed in v2! Use the PopperUtils module directly instead.
* Due to the high instability of the methods contained in Utils, we can't
* guarantee them to follow semver. Use them at your own risk!
* @static
* @private
* @type {Object}
* @deprecated since version 1.8
* @member Utils
* @memberof Popper
*/
}]);
return Popper;
}();
/**
* The `referenceObject` is an object that provides an interface compatible with Popper.js
* and lets you use it as replacement of a real DOM node.
* You can use this method to position a popper relatively to a set of coordinates
* in case you don't have a DOM node to use as reference.
*
* ```
* new Popper(referenceObject, popperNode);
* ```
*
* NB: This feature isn't supported in Internet Explorer 10.
* @name referenceObject
* @property {Function} data.getBoundingClientRect
* A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.
* @property {number} data.clientWidth
* An ES6 getter that will return the width of the virtual reference element.
* @property {number} data.clientHeight
* An ES6 getter that will return the height of the virtual reference element.
*/
Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;
Popper.placements = placements;
Popper.Defaults = Defaults;
/* harmony default export */ __webpack_exports__["default"] = (Popper);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "../../node_modules/webpack/buildin/global.js")))
/***/ }),
/***/ "../../node_modules/process/browser.js":
/*!********************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/process/browser.js ***!
\********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
// shim for using process in browser
var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it
// don't break things. But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals. It's inside a
// function because try/catches deoptimize in certain engines.
var cachedSetTimeout;
var cachedClearTimeout;
function defaultSetTimout() {
throw new Error('setTimeout has not been defined');
}
function defaultClearTimeout() {
throw new Error('clearTimeout has not been defined');
}
(function () {
try {
if (typeof setTimeout === 'function') {
cachedSetTimeout = setTimeout;
} else {
cachedSetTimeout = defaultSetTimout;
}
} catch (e) {
cachedSetTimeout = defaultSetTimout;
}
try {
if (typeof clearTimeout === 'function') {
cachedClearTimeout = clearTimeout;
} else {
cachedClearTimeout = defaultClearTimeout;
}
} catch (e) {
cachedClearTimeout = defaultClearTimeout;
}
})();
function runTimeout(fun) {
if (cachedSetTimeout === setTimeout) {
//normal enviroments in sane situations
return setTimeout(fun, 0);
} // if setTimeout wasn't available but was latter defined
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
cachedSetTimeout = setTimeout;
return setTimeout(fun, 0);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedSetTimeout(fun, 0);
} catch (e) {
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedSetTimeout.call(null, fun, 0);
} catch (e) {
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
return cachedSetTimeout.call(this, fun, 0);
}
}
}
function runClearTimeout(marker) {
if (cachedClearTimeout === clearTimeout) {
//normal enviroments in sane situations
return clearTimeout(marker);
} // if clearTimeout wasn't available but was latter defined
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
cachedClearTimeout = clearTimeout;
return clearTimeout(marker);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedClearTimeout(marker);
} catch (e) {
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedClearTimeout.call(null, marker);
} catch (e) {
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
return cachedClearTimeout.call(this, marker);
}
}
}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
function cleanUpNextTick() {
if (!draining || !currentQueue) {
return;
}
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
} else {
queueIndex = -1;
}
if (queue.length) {
drainQueue();
}
}
function drainQueue() {
if (draining) {
return;
}
var timeout = runTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
while (len) {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
}
currentQueue = null;
draining = false;
runClearTimeout(timeout);
}
process.nextTick = function (fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i = 1; i < arguments.length; i++) {
args[i - 1] = arguments[i];
}
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
runTimeout(drainQueue);
}
}; // v8 likes predictible objects
function Item(fun, array) {
this.fun = fun;
this.array = array;
}
Item.prototype.run = function () {
this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};
function noop() {}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;
process.listeners = function (name) {
return [];
};
process.binding = function (name) {
throw new Error('process.binding is not supported');
};
process.cwd = function () {
return '/';
};
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
};
process.umask = function () {
return 0;
};
/***/ }),
/***/ "../../node_modules/regenerator-runtime/runtime.js":
/*!********************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/regenerator-runtime/runtime.js ***!
\********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
/**
* Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var runtime = (function (exports) {
"use strict";
var Op = Object.prototype;
var hasOwn = Op.hasOwnProperty;
var undefined; // More compressible than void 0.
var $Symbol = typeof Symbol === "function" ? Symbol : {};
var iteratorSymbol = $Symbol.iterator || "@@iterator";
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
function define(obj, key, value) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
return obj[key];
}
try {
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
define({}, "");
} catch (err) {
define = function(obj, key, value) {
return obj[key] = value;
};
}
function wrap(innerFn, outerFn, self, tryLocsList) {
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
var generator = Object.create(protoGenerator.prototype);
var context = new Context(tryLocsList || []);
// The ._invoke method unifies the implementations of the .next,
// .throw, and .return methods.
generator._invoke = makeInvokeMethod(innerFn, self, context);
return generator;
}
exports.wrap = wrap;
// Try/catch helper to minimize deoptimizations. Returns a completion
// record like context.tryEntries[i].completion. This interface could
// have been (and was previously) designed to take a closure to be
// invoked without arguments, but in all the cases we care about we
// already have an existing method we want to call, so there's no need
// to create a new function object. We can even get away with assuming
// the method takes exactly one argument, since that happens to be true
// in every case, so we don't have to touch the arguments object. The
// only additional allocation required is the completion record, which
// has a stable shape and so hopefully should be cheap to allocate.
function tryCatch(fn, obj, arg) {
try {
return { type: "normal", arg: fn.call(obj, arg) };
} catch (err) {
return { type: "throw", arg: err };
}
}
var GenStateSuspendedStart = "suspendedStart";
var GenStateSuspendedYield = "suspendedYield";
var GenStateExecuting = "executing";
var GenStateCompleted = "completed";
// Returning this object from the innerFn has the same effect as
// breaking out of the dispatch switch statement.
var ContinueSentinel = {};
// Dummy constructor functions that we use as the .constructor and
// .constructor.prototype properties for functions that return Generator
// objects. For full spec compliance, you may wish to configure your
// minifier not to mangle the names of these two functions.
function Generator() {}
function GeneratorFunction() {}
function GeneratorFunctionPrototype() {}
// This is a polyfill for %IteratorPrototype% for environments that
// don't natively support it.
var IteratorPrototype = {};
IteratorPrototype[iteratorSymbol] = function () {
return this;
};
var getProto = Object.getPrototypeOf;
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
if (NativeIteratorPrototype &&
NativeIteratorPrototype !== Op &&
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
// This environment has a native %IteratorPrototype%; use it instead
// of the polyfill.
IteratorPrototype = NativeIteratorPrototype;
}
var Gp = GeneratorFunctionPrototype.prototype =
Generator.prototype = Object.create(IteratorPrototype);
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
GeneratorFunctionPrototype.constructor = GeneratorFunction;
GeneratorFunction.displayName = define(
GeneratorFunctionPrototype,
toStringTagSymbol,
"GeneratorFunction"
);
// Helper for defining the .next, .throw, and .return methods of the
// Iterator interface in terms of a single ._invoke method.
function defineIteratorMethods(prototype) {
["next", "throw", "return"].forEach(function(method) {
define(prototype, method, function(arg) {
return this._invoke(method, arg);
});
});
}
exports.isGeneratorFunction = function(genFun) {
var ctor = typeof genFun === "function" && genFun.constructor;
return ctor
? ctor === GeneratorFunction ||
// For the native GeneratorFunction constructor, the best we can
// do is to check its .name property.
(ctor.displayName || ctor.name) === "GeneratorFunction"
: false;
};
exports.mark = function(genFun) {
if (Object.setPrototypeOf) {
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
} else {
genFun.__proto__ = GeneratorFunctionPrototype;
define(genFun, toStringTagSymbol, "GeneratorFunction");
}
genFun.prototype = Object.create(Gp);
return genFun;
};
// Within the body of any async function, `await x` is transformed to
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
// `hasOwn.call(value, "__await")` to determine if the yielded value is
// meant to be awaited.
exports.awrap = function(arg) {
return { __await: arg };
};
function AsyncIterator(generator, PromiseImpl) {
function invoke(method, arg, resolve, reject) {
var record = tryCatch(generator[method], generator, arg);
if (record.type === "throw") {
reject(record.arg);
} else {
var result = record.arg;
var value = result.value;
if (value &&
typeof value === "object" &&
hasOwn.call(value, "__await")) {
return PromiseImpl.resolve(value.__await).then(function(value) {
invoke("next", value, resolve, reject);
}, function(err) {
invoke("throw", err, resolve, reject);
});
}
return PromiseImpl.resolve(value).then(function(unwrapped) {
// When a yielded Promise is resolved, its final value becomes
// the .value of the Promise<{value,done}> result for the
// current iteration.
result.value = unwrapped;
resolve(result);
}, function(error) {
// If a rejected Promise was yielded, throw the rejection back
// into the async generator function so it can be handled there.
return invoke("throw", error, resolve, reject);
});
}
}
var previousPromise;
function enqueue(method, arg) {
function callInvokeWithMethodAndArg() {
return new PromiseImpl(function(resolve, reject) {
invoke(method, arg, resolve, reject);
});
}
return previousPromise =
// If enqueue has been called before, then we want to wait until
// all previous Promises have been resolved before calling invoke,
// so that results are always delivered in the correct order. If
// enqueue has not been called before, then it is important to
// call invoke immediately, without waiting on a callback to fire,
// so that the async generator function has the opportunity to do
// any necessary setup in a predictable way. This predictability
// is why the Promise constructor synchronously invokes its
// executor callback, and why async functions synchronously
// execute code before the first await. Since we implement simple
// async functions in terms of async generators, it is especially
// important to get this right, even though it requires care.
previousPromise ? previousPromise.then(
callInvokeWithMethodAndArg,
// Avoid propagating failures to Promises returned by later
// invocations of the iterator.
callInvokeWithMethodAndArg
) : callInvokeWithMethodAndArg();
}
// Define the unified helper method that is used to implement .next,
// .throw, and .return (see defineIteratorMethods).
this._invoke = enqueue;
}
defineIteratorMethods(AsyncIterator.prototype);
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
return this;
};
exports.AsyncIterator = AsyncIterator;
// Note that simple async functions are implemented on top of
// AsyncIterator objects; they just return a Promise for the value of
// the final result produced by the iterator.
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
if (PromiseImpl === void 0) PromiseImpl = Promise;
var iter = new AsyncIterator(
wrap(innerFn, outerFn, self, tryLocsList),
PromiseImpl
);
return exports.isGeneratorFunction(outerFn)
? iter // If outerFn is a generator, return the full iterator.
: iter.next().then(function(result) {
return result.done ? result.value : iter.next();
});
};
function makeInvokeMethod(innerFn, self, context) {
var state = GenStateSuspendedStart;
return function invoke(method, arg) {
if (state === GenStateExecuting) {
throw new Error("Generator is already running");
}
if (state === GenStateCompleted) {
if (method === "throw") {
throw arg;
}
// Be forgiving, per 25.3.3.3.3 of the spec:
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
return doneResult();
}
context.method = method;
context.arg = arg;
while (true) {
var delegate = context.delegate;
if (delegate) {
var delegateResult = maybeInvokeDelegate(delegate, context);
if (delegateResult) {
if (delegateResult === ContinueSentinel) continue;
return delegateResult;
}
}
if (context.method === "next") {
// Setting context._sent for legacy support of Babel's
// function.sent implementation.
context.sent = context._sent = context.arg;
} else if (context.method === "throw") {
if (state === GenStateSuspendedStart) {
state = GenStateCompleted;
throw context.arg;
}
context.dispatchException(context.arg);
} else if (context.method === "return") {
context.abrupt("return", context.arg);
}
state = GenStateExecuting;
var record = tryCatch(innerFn, self, context);
if (record.type === "normal") {
// If an exception is thrown from innerFn, we leave state ===
// GenStateExecuting and loop back for another invocation.
state = context.done
? GenStateCompleted
: GenStateSuspendedYield;
if (record.arg === ContinueSentinel) {
continue;
}
return {
value: record.arg,
done: context.done
};
} else if (record.type === "throw") {
state = GenStateCompleted;
// Dispatch the exception by looping back around to the
// context.dispatchException(context.arg) call above.
context.method = "throw";
context.arg = record.arg;
}
}
};
}
// Call delegate.iterator[context.method](context.arg) and handle the
// result, either by returning a { value, done } result from the
// delegate iterator, or by modifying context.method and context.arg,
// setting context.delegate to null, and returning the ContinueSentinel.
function maybeInvokeDelegate(delegate, context) {
var method = delegate.iterator[context.method];
if (method === undefined) {
// A .throw or .return when the delegate iterator has no .throw
// method always terminates the yield* loop.
context.delegate = null;
if (context.method === "throw") {
// Note: ["return"] must be used for ES3 parsing compatibility.
if (delegate.iterator["return"]) {
// If the delegate iterator has a return method, give it a
// chance to clean up.
context.method = "return";
context.arg = undefined;
maybeInvokeDelegate(delegate, context);
if (context.method === "throw") {
// If maybeInvokeDelegate(context) changed context.method from
// "return" to "throw", let that override the TypeError below.
return ContinueSentinel;
}
}
context.method = "throw";
context.arg = new TypeError(
"The iterator does not provide a 'throw' method");
}
return ContinueSentinel;
}
var record = tryCatch(method, delegate.iterator, context.arg);
if (record.type === "throw") {
context.method = "throw";
context.arg = record.arg;
context.delegate = null;
return ContinueSentinel;
}
var info = record.arg;
if (! info) {
context.method = "throw";
context.arg = new TypeError("iterator result is not an object");
context.delegate = null;
return ContinueSentinel;
}
if (info.done) {
// Assign the result of the finished delegate to the temporary
// variable specified by delegate.resultName (see delegateYield).
context[delegate.resultName] = info.value;
// Resume execution at the desired location (see delegateYield).
context.next = delegate.nextLoc;
// If context.method was "throw" but the delegate handled the
// exception, let the outer generator proceed normally. If
// context.method was "next", forget context.arg since it has been
// "consumed" by the delegate iterator. If context.method was
// "return", allow the original .return call to continue in the
// outer generator.
if (context.method !== "return") {
context.method = "next";
context.arg = undefined;
}
} else {
// Re-yield the result returned by the delegate method.
return info;
}
// The delegate iterator is finished, so forget it and continue with
// the outer generator.
context.delegate = null;
return ContinueSentinel;
}
// Define Generator.prototype.{next,throw,return} in terms of the
// unified ._invoke helper method.
defineIteratorMethods(Gp);
define(Gp, toStringTagSymbol, "Generator");
// A Generator should always return itself as the iterator object when the
// @@iterator function is called on it. Some browsers' implementations of the
// iterator prototype chain incorrectly implement this, causing the Generator
// object to not be returned from this call. This ensures that doesn't happen.
// See https://github.com/facebook/regenerator/issues/274 for more details.
Gp[iteratorSymbol] = function() {
return this;
};
Gp.toString = function() {
return "[object Generator]";
};
function pushTryEntry(locs) {
var entry = { tryLoc: locs[0] };
if (1 in locs) {
entry.catchLoc = locs[1];
}
if (2 in locs) {
entry.finallyLoc = locs[2];
entry.afterLoc = locs[3];
}
this.tryEntries.push(entry);
}
function resetTryEntry(entry) {
var record = entry.completion || {};
record.type = "normal";
delete record.arg;
entry.completion = record;
}
function Context(tryLocsList) {
// The root entry object (effectively a try statement without a catch
// or a finally block) gives us a place to store values thrown from
// locations where there is no enclosing try statement.
this.tryEntries = [{ tryLoc: "root" }];
tryLocsList.forEach(pushTryEntry, this);
this.reset(true);
}
exports.keys = function(object) {
var keys = [];
for (var key in object) {
keys.push(key);
}
keys.reverse();
// Rather than returning an object with a next method, we keep
// things simple and return the next function itself.
return function next() {
while (keys.length) {
var key = keys.pop();
if (key in object) {
next.value = key;
next.done = false;
return next;
}
}
// To avoid creating an additional object, we just hang the .value
// and .done properties off the next function object itself. This
// also ensures that the minifier will not anonymize the function.
next.done = true;
return next;
};
};
function values(iterable) {
if (iterable) {
var iteratorMethod = iterable[iteratorSymbol];
if (iteratorMethod) {
return iteratorMethod.call(iterable);
}
if (typeof iterable.next === "function") {
return iterable;
}
if (!isNaN(iterable.length)) {
var i = -1, next = function next() {
while (++i < iterable.length) {
if (hasOwn.call(iterable, i)) {
next.value = iterable[i];
next.done = false;
return next;
}
}
next.value = undefined;
next.done = true;
return next;
};
return next.next = next;
}
}
// Return an iterator with no values.
return { next: doneResult };
}
exports.values = values;
function doneResult() {
return { value: undefined, done: true };
}
Context.prototype = {
constructor: Context,
reset: function(skipTempReset) {
this.prev = 0;
this.next = 0;
// Resetting context._sent for legacy support of Babel's
// function.sent implementation.
this.sent = this._sent = undefined;
this.done = false;
this.delegate = null;
this.method = "next";
this.arg = undefined;
this.tryEntries.forEach(resetTryEntry);
if (!skipTempReset) {
for (var name in this) {
// Not sure about the optimal order of these conditions:
if (name.charAt(0) === "t" &&
hasOwn.call(this, name) &&
!isNaN(+name.slice(1))) {
this[name] = undefined;
}
}
}
},
stop: function() {
this.done = true;
var rootEntry = this.tryEntries[0];
var rootRecord = rootEntry.completion;
if (rootRecord.type === "throw") {
throw rootRecord.arg;
}
return this.rval;
},
dispatchException: function(exception) {
if (this.done) {
throw exception;
}
var context = this;
function handle(loc, caught) {
record.type = "throw";
record.arg = exception;
context.next = loc;
if (caught) {
// If the dispatched exception was caught by a catch block,
// then let that catch block handle the exception normally.
context.method = "next";
context.arg = undefined;
}
return !! caught;
}
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
var record = entry.completion;
if (entry.tryLoc === "root") {
// Exception thrown outside of any try block that could handle
// it, so set the completion value of the entire function to
// throw the exception.
return handle("end");
}
if (entry.tryLoc <= this.prev) {
var hasCatch = hasOwn.call(entry, "catchLoc");
var hasFinally = hasOwn.call(entry, "finallyLoc");
if (hasCatch && hasFinally) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
} else if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else if (hasCatch) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
}
} else if (hasFinally) {
if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else {
throw new Error("try statement without catch or finally");
}
}
}
},
abrupt: function(type, arg) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc <= this.prev &&
hasOwn.call(entry, "finallyLoc") &&
this.prev < entry.finallyLoc) {
var finallyEntry = entry;
break;
}
}
if (finallyEntry &&
(type === "break" ||
type === "continue") &&
finallyEntry.tryLoc <= arg &&
arg <= finallyEntry.finallyLoc) {
// Ignore the finally entry if control is not jumping to a
// location outside the try/catch block.
finallyEntry = null;
}
var record = finallyEntry ? finallyEntry.completion : {};
record.type = type;
record.arg = arg;
if (finallyEntry) {
this.method = "next";
this.next = finallyEntry.finallyLoc;
return ContinueSentinel;
}
return this.complete(record);
},
complete: function(record, afterLoc) {
if (record.type === "throw") {
throw record.arg;
}
if (record.type === "break" ||
record.type === "continue") {
this.next = record.arg;
} else if (record.type === "return") {
this.rval = this.arg = record.arg;
this.method = "return";
this.next = "end";
} else if (record.type === "normal" && afterLoc) {
this.next = afterLoc;
}
return ContinueSentinel;
},
finish: function(finallyLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.finallyLoc === finallyLoc) {
this.complete(entry.completion, entry.afterLoc);
resetTryEntry(entry);
return ContinueSentinel;
}
}
},
"catch": function(tryLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc === tryLoc) {
var record = entry.completion;
if (record.type === "throw") {
var thrown = record.arg;
resetTryEntry(entry);
}
return thrown;
}
}
// The context.catch method must only be called with a location
// argument that corresponds to a known catch block.
throw new Error("illegal catch attempt");
},
delegateYield: function(iterable, resultName, nextLoc) {
this.delegate = {
iterator: values(iterable),
resultName: resultName,
nextLoc: nextLoc
};
if (this.method === "next") {
// Deliberately forget the last sent value so that we don't
// accidentally pass it on to the delegate.
this.arg = undefined;
}
return ContinueSentinel;
}
};
// Regardless of whether this script is executing as a CommonJS module
// or not, return the runtime object so that we can declare the variable
// regeneratorRuntime in the outer scope, which allows this module to be
// injected easily by `bin/regenerator --include-runtime script.js`.
return exports;
}(
// If this script is executing as a CommonJS module, use module.exports
// as the regeneratorRuntime namespace. Otherwise create a new empty
// object. Either way, the resulting object will be used to initialize
// the regeneratorRuntime variable at the top of this file.
true ? module.exports : undefined
));
try {
regeneratorRuntime = runtime;
} catch (accidentalStrictMode) {
// This module should not be running in strict mode, so the above
// assignment should always work unless something is misconfigured. Just
// in case runtime.js accidentally runs in strict mode, we can escape
// strict mode using a global Function call. This could conceivably fail
// if a Content Security Policy forbids using Function, but in that case
// the proper solution is to fix the accidental strict mode problem. If
// you've misconfigured your bundler to force strict mode and applied a
// CSP to forbid Function, and you're not willing to fix either of those
// problems, please detail your unique predicament in a GitHub issue.
Function("r", "regeneratorRuntime = r")(runtime);
}
/***/ }),
/***/ "../../node_modules/setimmediate/setImmediate.js":
/*!******************************************************************************************!*\
!*** /Users/bgreenberg2/Documents/dev/station/node_modules/setimmediate/setImmediate.js ***!
\******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
"use strict";
if (global.setImmediate) {
return;
}
var nextHandle = 1; // Spec says greater than zero
var tasksByHandle = {};
var currentlyRunningATask = false;
var doc = global.document;
var registerImmediate;
function setImmediate(callback) {
// Callback can either be a function or a string
if (typeof callback !== "function") {
callback = new Function("" + callback);
} // Copy function arguments
var args = new Array(arguments.length - 1);
for (var i = 0; i < args.length; i++) {
args[i] = arguments[i + 1];
} // Store and register the task
var task = {
callback: callback,
args: args
};
tasksByHandle[nextHandle] = task;
registerImmediate(nextHandle);
return nextHandle++;
}
function clearImmediate(handle) {
delete tasksByHandle[handle];
}
function run(task) {
var callback = task.callback;
var args = task.args;
switch (args.length) {
case 0:
callback();
break;
case 1:
callback(args[0]);
break;
case 2:
callback(args[0], args[1]);
break;
case 3:
callback(args[0], args[1], args[2]);
break;
default:
callback.apply(undefined, args);
break;
}
}
function runIfPresent(handle) {
// From the spec: "Wait until any invocations of this algorithm started before this one have completed."
// So if we're currently running a task, we'll need to delay this invocation.
if (currentlyRunningATask) {
// Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
// "too much recursion" error.
setTimeout(runIfPresent, 0, handle);
} else {
var task = tasksByHandle[handle];
if (task) {
currentlyRunningATask = true;
try {
run(task);
} finally {
clearImmediate(handle);
currentlyRunningATask = false;
}
}
}
}
function installNextTickImplementation() {
registerImmediate = function registerImmediate(handle) {
process.nextTick(function () {
runIfPresent(handle);
});
};
}
function canUsePostMessage() {
// The test against `importScripts` prevents this implementation from being installed inside a web worker,
// where `global.postMessage` means something completely different and can't be used for this purpose.
if (global.postMessage && !global.importScripts) {
var postMessageIsAsynchronous = true;
var oldOnMessage = global.onmessage;
global.onmessage = function () {
postMessageIsAsynchronous = false;
};
global.postMessage("", "*");
global.onmessage = oldOnMessage;
return postMessageIsAsynchronous;
}
}
function installPostMessageImplementation() {
// Installs an event handler on `global` for the `message` event: see
// * https://developer.mozilla.org/en/DOM/window.postMessage
// * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
var messagePrefix = "setImmediate$" + Math.random() + "$";
var onGlobalMessage = function onGlobalMessage(event) {
if (event.source === global && typeof event.data === "string" && event.data.indexOf(messagePrefix) === 0) {
runIfPresent(+event.data.slice(messagePrefix.length));
}
};
if (global.addEventListener) {
global.addEventListener("message", onGlobalMessage, false);
} else {
global.attachEvent("onmessage", onGlobalMessage);
}
registerImmediate = function registerImmediate(handle) {
global.postMessage(messagePrefix + handle, "*");
};
}
function installMessageChannelImplementation() {
var channel = new MessageChannel();
channel.port1.onmessage = function (event) {
var handle = event.data;
runIfPresent(handle);
};
registerImmediate = function registerImmediate(handle) {
channel.port2.postMessage(handle);
};
}
function installReadyStateChangeImplementation() {
var html = doc.documentElement;
registerImmediate = function registerImmediate(handle) {
// Create a