Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save elvismunyikiiru/ae1d3bf0e1f7728096bd8aeffecb92a7 to your computer and use it in GitHub Desktop.
Save elvismunyikiiru/ae1d3bf0e1f7728096bd8aeffecb92a7 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
ELHU EMKPI
/**
* This file is part of Adguard Browser Extension (https://github.com/AdguardTeam/AdguardBrowserExtension).
*
* Adguard Browser Extension is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Adguard Browser Extension is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Adguard Browser Extension. If not, see <http://www.gnu.org/licenses/>.
*/
/* global CSS */
/**
* Object that collapses or hides DOM elements and able to roll it back.
*/
var ElementCollapser = (function () {
/**
* https://github.com/AdguardTeam/AdguardBrowserExtension/issues/1436
* Because Edge doesn't support CSS.escape use next function
*/
var cssEscape = CSS.escape || function(value) {
if (arguments.length === 0) {
throw new TypeError('`CSS.escape` requires an argument.');
}
var string = String(value);
var length = string.length;
var index = -1;
var codeUnit;
var result = '';
var firstCodeUnit = string.charCodeAt(0);
while (++index < length) {
codeUnit = string.charCodeAt(index);
// Note: there’s no need to special-case astral symbols, surrogate
// pairs, or lone surrogates.
// If the character is NULL (U+0000), then the REPLACEMENT CHARACTER
// (U+FFFD).
if (codeUnit === 0x0000) {
result += '\uFFFD';
continue;
}
if (
// If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
// U+007F, […]
(codeUnit >= 0x0001 && codeUnit <= 0x001F) || codeUnit == 0x007F ||
// If the character is the first character and is in the range [0-9]
// (U+0030 to U+0039), […]
(index === 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) ||
// If the character is the second character and is in the range [0-9]
// (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
(
index == 1 &&
codeUnit >= 0x0030 && codeUnit <= 0x0039 &&
firstCodeUnit == 0x002D
)
) {
// https://drafts.csswg.org/cssom/#escape-a-character-as-code-point
result += '\\' + codeUnit.toString(16) + ' ';
continue;
}
if (
// If the character is the first character and is a `-` (U+002D), and
// there is no second character, […]
index === 0 &&
length == 1 &&
codeUnit == 0x002D
) {
result += '\\' + string.charAt(index);
continue;
}
// If the character is not handled by one of the above rules and is
// greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or
// is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to
// U+005A), or [a-z] (U+0061 to U+007A), […]
if (
codeUnit >= 0x0080 ||
codeUnit == 0x002D ||
codeUnit == 0x005F ||
codeUnit >= 0x0030 && codeUnit <= 0x0039 ||
codeUnit >= 0x0041 && codeUnit <= 0x005A ||
codeUnit >= 0x0061 && codeUnit <= 0x007A
) {
// the character itself
result += string.charAt(index);
continue;
}
// Otherwise, the escaped character.
// https://drafts.csswg.org/cssom/#escape-a-character
result += '\\' + string.charAt(index);
}
return result;
};
/**
* The <style> node that contains all the collapsing styles
*/
var styleNode;
/**
* Adds "selectorText { display:none!important; }" style
* @param selectorText
* @param cssText optional
*/
var hideBySelector = function (selectorText, cssText) {
var rule = selectorText + '{' + (cssText || "display: none!important;") + '}';
if (!styleNode) {
styleNode = document.createElement("style");
styleNode.setAttribute("type", "text/css");
(document.head || document.documentElement).appendChild(styleNode);
}
styleNode.sheet.insertRule(rule, styleNode.sheet.cssRules.length);
};
/**
* Adds "selectorText { display:none!important; }" style
*/
var hideBySelectorAndTagName = function (selectorText, tagName) {
if (tagName === "frame" || tagName === "iframe") {
// Use specific style for frames due to these issues:
// https://github.com/AdguardTeam/AdguardBrowserExtension/issues/346
// https://github.com/AdguardTeam/AdguardBrowserExtension/issues/355
// https://github.com/AdguardTeam/AdguardBrowserExtension/issues/347
// https://github.com/AdguardTeam/AdguardBrowserExtension/issues/733
hideBySelector(selectorText, "visibility: hidden!important; height: 0px!important; min-height: 0px!important;");
} else {
hideBySelector(selectorText, null);
}
};
/**
* Creates selector for specified tagName and src attribute
*/
var createSelectorForSrcAttr = function (srcAttrValue, tagName) {
return tagName + '[src="' + cssEscape(srcAttrValue) + '"]';
};
/**
* Clears priority for specified styles
*
* @param {HTMLElement} element element affected
* @param {Array.<string>} styles array of style names
*/
var clearElStylesPriority = function (element, styles) {
var elementStyle = element.style;
styles.forEach(function (prop) {
var elCssPriority = elementStyle.getPropertyPriority(prop);
if (elCssPriority && elCssPriority.toLowerCase() === 'important') {
var elCssValue = elementStyle.getPropertyValue(prop);
elementStyle.setProperty(prop, elCssValue, null);
}
});
};
/**
* Collapses the specified element using a CSS style if possible (or inline style if not)
*
* @param {HTMLElement} element Element to collapse
* @param {string} elementUrl Element's source url
*/
var collapseElement = function (element, elementUrl) {
if (isCollapsed(element)) {
return;
}
var tagName = element.tagName.toLowerCase();
if (elementUrl) {
// Check that element still has the same "src" attribute
// If it has changed, we do not need to collapse it anymore
if (element.src === elementUrl) {
// To not to keep track of changing src for elements, we are going to collapse it with a CSS rule
// But we take element url, cause current source could be already modified
// https://github.com/AdguardTeam/AdguardBrowserExtension/issues/408
var srcAttribute = element.getAttribute('src');
var srcSelector = createSelectorForSrcAttr(srcAttribute, tagName);
hideBySelectorAndTagName(srcSelector, tagName);
// Remove important priority from the element style
// https://github.com/AdguardTeam/AdguardBrowserExtension/issues/733
clearElStylesPriority(element, ['display', 'visibility', 'height', 'min-height']);
}
// Do not process it further in any case
return;
}
var cssProperty = "display";
var cssValue = "none";
var cssPriority = "important";
if (tagName == "frame") {
cssProperty = "visibility";
cssValue = "hidden";
}
var elementStyle = element.style;
var elCssValue = elementStyle.getPropertyValue(cssProperty);
var elCssPriority = elementStyle.getPropertyPriority(cssProperty);
// <input type="image"> elements try to load their image again
// when the "display" CSS property is set. So we have to check
// that it isn't already collapsed to avoid an infinite recursion.
if (elCssValue != cssValue || elCssPriority != cssPriority) {
elementStyle.setProperty(cssProperty, cssValue, cssPriority);
}
};
/**
* Checks if specified element is already collapsed or not.
* There is a big chance that we've already done it from the background page (see collapseElement method in webrequest.js)
*
* @param {HTMLElement} element Element to check
*/
var isCollapsed = function (element) {
var computedStyle = window.getComputedStyle(element);
return (computedStyle && computedStyle.display === "none");
};
/**
* Removes the collapser's style node
*/
var clear = function() {
if (!styleNode) {
return;
}
styleNode.parentNode.removeChild(styleNode);
};
// EXPOSE
return {
collapseElement: collapseElement,
isCollapsed: isCollapsed,
clear: clear
};
})();
/*! extended-css - v1.3.13 - Thu Jul 29 2021
* https://github.com/AdguardTeam/ExtendedCss
* Copyright (c) 2021 AdGuard. Licensed GPL-3.0
*/
var ExtendedCss = (function () {
'use strict';
function _typeof(obj) {
"@babel/helpers - typeof";
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function (obj) {
return typeof obj;
};
} else {
_typeof = function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
}
return _typeof(obj);
}
function _slicedToArray(arr, i) {
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
}
function _toConsumableArray(arr) {
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
}
function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
}
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
}
function _iterableToArrayLimit(arr, i) {
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"] != null) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
/**
* Copyright 2016 Adguard Software Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable no-console */
var utils = {};
utils.MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
/**
* Stores native Node textContent getter to be used for contains pseudo-class
* because elements' 'textContent' and 'innerText' properties might be mocked
* https://github.com/AdguardTeam/ExtendedCss/issues/127
*/
utils.nodeTextContentGetter = function () {
var nativeNode = window.Node || Node;
return Object.getOwnPropertyDescriptor(nativeNode.prototype, 'textContent').get;
}();
utils.isSafariBrowser = function () {
var isChrome = navigator.userAgent.indexOf('Chrome') > -1;
var isSafari = navigator.userAgent.indexOf('Safari') > -1;
if (isSafari) {
if (isChrome) {
// Chrome seems to have both Chrome and Safari userAgents
return false;
}
return true;
}
return false;
}();
/**
* Converts regular expressions passed as pseudo class arguments into RegExp instances.
* Have to unescape doublequote " as well, because we escape them while enclosing such
* arguments with doublequotes, and sizzle does not automatically unescapes them.
*/
utils.pseudoArgToRegex = function (regexSrc, flag) {
flag = flag || 'i';
regexSrc = regexSrc.trim().replace(/\\(["\\])/g, '$1');
return new RegExp(regexSrc, flag);
};
/**
* Converts string to the regexp
* @param {string} str
* @returns {RegExp}
*/
utils.toRegExp = function (str) {
if (str[0] === '/' && str[str.length - 1] === '/') {
return new RegExp(str.slice(1, -1));
}
var escaped = str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
return new RegExp(escaped);
};
utils.startsWith = function (str, prefix) {
// if str === '', (str && false) will return ''
// that's why it has to be !!str
return !!str && str.indexOf(prefix) === 0;
};
utils.endsWith = function (str, postfix) {
if (!str || !postfix) {
return false;
}
if (str.endsWith) {
return str.endsWith(postfix);
}
var t = String(postfix);
var index = str.lastIndexOf(t);
return index >= 0 && index === str.length - t.length;
};
/**
* Helper function for creating regular expression from a url filter rule syntax.
*/
utils.createURLRegex = function () {
// Constants
var regexConfiguration = {
maskStartUrl: '||',
maskPipe: '|',
maskSeparator: '^',
maskAnySymbol: '*',
regexAnySymbol: '.*',
regexSeparator: '([^ a-zA-Z0-9.%_-]|$)',
regexStartUrl: '^(http|https|ws|wss)://([a-z0-9-_.]+\\.)?',
regexStartString: '^',
regexEndString: '$'
}; // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/regexp
// should be escaped . * + ? ^ $ { } ( ) | [ ] / \
// except of * | ^
var specials = ['.', '+', '?', '$', '{', '}', '(', ')', '[', ']', '\\', '/'];
var specialsRegex = new RegExp("[".concat(specials.join('\\'), "]"), 'g');
/**
* Escapes regular expression string
*/
var escapeRegExp = function escapeRegExp(str) {
return str.replace(specialsRegex, '\\$&');
};
var replaceAll = function replaceAll(str, find, replace) {
if (!str) {
return str;
}
return str.split(find).join(replace);
};
/**
* Main function that converts a url filter rule string to a regex.
* @param {string} str
* @return {RegExp}
*/
var createRegexText = function createRegexText(str) {
var regex = escapeRegExp(str);
if (utils.startsWith(regex, regexConfiguration.maskStartUrl)) {
regex = regex.substring(0, regexConfiguration.maskStartUrl.length) + replaceAll(regex.substring(regexConfiguration.maskStartUrl.length, regex.length - 1), '\|', '\\|') + regex.substring(regex.length - 1);
} else if (utils.startsWith(regex, regexConfiguration.maskPipe)) {
regex = regex.substring(0, regexConfiguration.maskPipe.length) + replaceAll(regex.substring(regexConfiguration.maskPipe.length, regex.length - 1), '\|', '\\|') + regex.substring(regex.length - 1);
} else {
regex = replaceAll(regex.substring(0, regex.length - 1), '\|', '\\|') + regex.substring(regex.length - 1);
} // Replacing special url masks
regex = replaceAll(regex, regexConfiguration.maskAnySymbol, regexConfiguration.regexAnySymbol);
regex = replaceAll(regex, regexConfiguration.maskSeparator, regexConfiguration.regexSeparator);
if (utils.startsWith(regex, regexConfiguration.maskStartUrl)) {
regex = regexConfiguration.regexStartUrl + regex.substring(regexConfiguration.maskStartUrl.length);
} else if (utils.startsWith(regex, regexConfiguration.maskPipe)) {
regex = regexConfiguration.regexStartString + regex.substring(regexConfiguration.maskPipe.length);
}
if (utils.endsWith(regex, regexConfiguration.maskPipe)) {
regex = regex.substring(0, regex.length - 1) + regexConfiguration.regexEndString;
}
return new RegExp(regex, 'i');
};
return createRegexText;
}();
/**
* Creates an object implementing Location interface from a url.
* An alternative to URL.
* https://github.com/AdguardTeam/FingerprintingBlocker/blob/master/src/shared/url.ts#L64
*/
utils.createLocation = function (href) {
var anchor = document.createElement('a');
anchor.href = href;
if (anchor.host === '') {
anchor.href = anchor.href; // eslint-disable-line no-self-assign
}
return anchor;
};
/**
* Checks whether A has the same origin as B.
* @param {string} urlA location.href of A.
* @param {Location} locationB location of B.
* @param {string} domainB document.domain of B.
* @return {boolean}
*/
utils.isSameOrigin = function (urlA, locationB, domainB) {
var locationA = utils.createLocation(urlA); // eslint-disable-next-line no-script-url
if (locationA.protocol === 'javascript:' || locationA.href === 'about:blank') {
return true;
}
if (locationA.protocol === 'data:' || locationA.protocol === 'file:') {
return false;
}
return locationA.hostname === domainB && locationA.port === locationB.port && locationA.protocol === locationB.protocol;
};
/**
* A helper class to throttle function calls with setTimeout and requestAnimationFrame.
*/
utils.AsyncWrapper = function () {
/**
* PhantomJS passes a wrong timestamp to the requestAnimationFrame callback and that breaks the AsyncWrapper logic
* https://github.com/ariya/phantomjs/issues/14832
*/
var supported = typeof window.requestAnimationFrame !== 'undefined' && !/phantom/i.test(navigator.userAgent);
var rAF = supported ? requestAnimationFrame : setTimeout;
var cAF = supported ? cancelAnimationFrame : clearTimeout;
var perf = supported ? performance : Date;
/**
* @param {Function} callback
* @param {number} throttle number, the provided callback should be executed twice
* in this time frame.
* @constructor
*/
function AsyncWrapper(callback, throttle) {
this.callback = callback;
this.throttle = throttle;
this.wrappedCallback = this.wrappedCallback.bind(this);
if (this.wrappedAsapCallback) {
this.wrappedAsapCallback = this.wrappedAsapCallback.bind(this);
}
}
/** @private */
AsyncWrapper.prototype.wrappedCallback = function (ts) {
this.lastRun = isNumber(ts) ? ts : perf.now();
delete this.rAFid;
delete this.timerId;
delete this.asapScheduled;
this.callback();
};
/** @private Indicates whether there is a scheduled callback. */
AsyncWrapper.prototype.hasPendingCallback = function () {
return isNumber(this.rAFid) || isNumber(this.timerId);
};
/**
* Schedules a function call before the next animation frame.
*/
AsyncWrapper.prototype.run = function () {
if (this.hasPendingCallback()) {
// There is a pending execution scheduled.
return;
}
if (typeof this.lastRun !== 'undefined') {
var elapsed = perf.now() - this.lastRun;
if (elapsed < this.throttle) {
this.timerId = setTimeout(this.wrappedCallback, this.throttle - elapsed);
return;
}
}
this.rAFid = rAF(this.wrappedCallback);
};
/**
* Schedules a function call in the most immenent microtask.
* This cannot be canceled.
*/
AsyncWrapper.prototype.runAsap = function () {
if (this.asapScheduled) {
return;
}
this.asapScheduled = true;
cAF(this.rAFid);
clearTimeout(this.timerId);
if (utils.MutationObserver) {
/**
* Using MutationObservers to access microtask queue is a standard technique,
* used in ASAP library
* {@link https://github.com/kriskowal/asap/blob/master/browser-raw.js#L140}
*/
if (!this.mo) {
this.mo = new utils.MutationObserver(this.wrappedCallback);
this.node = document.createTextNode(1);
this.mo.observe(this.node, {
characterData: true
});
}
this.node.nodeValue = -this.node.nodeValue;
} else {
setTimeout(this.wrappedCallback);
}
};
/**
* Runs scheduled execution immediately, if there were any.
*/
AsyncWrapper.prototype.runImmediately = function () {
if (this.hasPendingCallback()) {
cAF(this.rAFid);
clearTimeout(this.timerId);
delete this.rAFid;
delete this.timerId;
this.wrappedCallback();
}
};
AsyncWrapper.now = function () {
return perf.now();
};
return AsyncWrapper;
}();
/**
* Stores native OdP to be used in WeakMap and Set polyfills.
*/
utils.defineProperty = Object.defineProperty;
utils.WeakMap = typeof WeakMap !== 'undefined' ? WeakMap : function () {
/** Originally based on {@link https://github.com/Polymer/WeakMap} */
var counter = Date.now() % 1e9;
var WeakMap = function WeakMap() {
this.name = "__st".concat(Math.random() * 1e9 >>> 0).concat(counter++, "__");
};
WeakMap.prototype = {
set: function set(key, value) {
var entry = key[this.name];
if (entry && entry[0] === key) {
entry[1] = value;
} else {
utils.defineProperty(key, this.name, {
value: [key, value],
writable: true
});
}
return this;
},
get: function get(key) {
var entry = key[this.name];
return entry && entry[0] === key ? entry[1] : undefined;
},
delete: function _delete(key) {
var entry = key[this.name];
if (!entry) {
return false;
}
var hasValue = entry[0] === key;
delete entry[0];
delete entry[1];
return hasValue;
},
has: function has(key) {
var entry = key[this.name];
if (!entry) {
return false;
}
return entry[0] === key;
}
};
return WeakMap;
}();
utils.Set = typeof Set !== 'undefined' ? Set : function () {
var counter = Date.now() % 1e9;
/**
* A polyfill which covers only the basic usage.
* Only supports methods that are supported in IE11.
* {@link https://docs.microsoft.com/en-us/scripting/javascript/reference/set-object-javascript}
* Assumes that 'key's are all objects, not primitives such as a number.
*
* @param {Array} items Initial items in this set
*/
var Set = function Set(items) {
this.name = "__st".concat(Math.random() * 1e9 >>> 0).concat(counter++, "__");
this.keys = [];
if (items && items.length) {
var iItems = items.length;
while (iItems--) {
this.add(items[iItems]);
}
}
};
Set.prototype = {
add: function add(key) {
if (!isNumber(key[this.name])) {
var index = this.keys.push(key) - 1;
utils.defineProperty(key, this.name, {
value: index,
writable: true
});
}
},
delete: function _delete(key) {
if (isNumber(key[this.name])) {
var index = key[this.name];
delete this.keys[index];
key[this.name] = undefined;
}
},
has: function has(key) {
return isNumber(key[this.name]);
},
clear: function clear() {
this.keys.forEach(function (key) {
key[this.name] = undefined;
});
this.keys.length = 0;
},
forEach: function forEach(cb) {
var that = this;
this.keys.forEach(function (value) {
cb(value, value, that);
});
}
};
utils.defineProperty(Set.prototype, 'size', {
get: function get() {
// Skips holes.
return this.keys.reduce(function (acc) {
return acc + 1;
}, 0);
}
});
return Set;
}();
/**
* Vendor-specific Element.prototype.matches
*/
utils.matchesPropertyName = function () {
var props = ['matches', 'matchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector', 'webkitMatchesSelector'];
for (var i = 0; i < 6; i++) {
if (Element.prototype.hasOwnProperty(props[i])) {
return props[i];
}
}
}();
/**
* Provides stats information
*/
utils.Stats = function () {
/** @member {Array<number>} */
this.array = [];
/** @member {number} */
this.length = 0;
var zeroDescriptor = {
value: 0,
writable: true
};
/** @member {number} @private */
Object.defineProperty(this, 'sum', zeroDescriptor);
/** @member {number} @private */
Object.defineProperty(this, 'squaredSum', zeroDescriptor);
};
/**
* @param {number} dataPoint data point
*/
utils.Stats.prototype.push = function (dataPoint) {
this.array.push(dataPoint);
this.length++;
this.sum += dataPoint;
this.squaredSum += dataPoint * dataPoint;
/** @member {number} */
this.mean = this.sum / this.length;
/** @member {number} */
// eslint-disable-next-line no-restricted-properties
this.stddev = Math.sqrt(this.squaredSum / this.length - Math.pow(this.mean, 2));
};
/** Safe console.error version */
utils.logError = typeof console !== 'undefined' && console.error && Function.prototype.bind && console.error.bind ? console.error.bind(window.console) : console.error;
/** Safe console.info version */
utils.logInfo = typeof console !== 'undefined' && console.info && Function.prototype.bind && console.info.bind ? console.info.bind(window.console) : console.info;
function isNumber(obj) {
return typeof obj === 'number';
}
/**
* Returns path to element we will use as element identifier
* @param {Element} inputEl
* @returns {string} - path to the element
*/
utils.getNodeSelector = function (inputEl) {
if (!(inputEl instanceof Element)) {
throw new Error('Function received argument with wrong type');
}
var el = inputEl;
var path = []; // we need to check '!!el' first because it is possible
// that some ancestor of the inputEl was removed before it
while (!!el && el.nodeType === Node.ELEMENT_NODE) {
var selector = el.nodeName.toLowerCase();
if (el.id && typeof el.id === 'string') {
selector += "#".concat(el.id);
path.unshift(selector);
break;
} else {
var sibling = el;
var nth = 1;
while (sibling.previousSibling) {
sibling = sibling.previousSibling;
if (sibling.nodeType === Node.ELEMENT_NODE && sibling.nodeName.toLowerCase() === selector) {
nth++;
}
}
if (nth !== 1) {
selector += ":nth-of-type(".concat(nth, ")");
}
}
path.unshift(selector);
el = el.parentNode;
}
return path.join(' > ');
};
/**
* Copyright 2016 Adguard Software Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Helper class css utils
*
* @type {{normalize}}
*/
var cssUtils = function () {
/**
* Regex that matches AdGuard's backward compatible syntaxes.
*/
var reAttrFallback = /\[-(?:ext|abp)-([a-z-_]+)=(["'])((?:(?=(\\?))\4.)*?)\2\]/g;
/**
* Complex replacement function.
* Unescapes quote characters inside of an extended selector.
*
* @param match Whole matched string
* @param name Group 1
* @param quoteChar Group 2
* @param value Group 3
*/
var evaluateMatch = function evaluateMatch(match, name, quoteChar, value) {
// Unescape quotes
var re = new RegExp("([^\\\\]|^)\\\\".concat(quoteChar), 'g');
value = value.replace(re, "$1".concat(quoteChar));
return ":".concat(name, "(").concat(value, ")");
}; // Sizzle's parsing of pseudo class arguments is buggy on certain circumstances
// We support following form of arguments:
// 1. for :matches-css, those of a form {propertyName}: /.*/
// 2. for :contains, those of a form /.*/
// We transform such cases in a way that Sizzle has no ambiguity in parsing arguments.
var reMatchesCss = /\:(matches-css(?:-after|-before)?)\(([a-z-\s]*\:\s*\/(?:\\.|[^\/])*?\/\s*)\)/g;
var reContains = /:(?:-abp-)?(contains|has-text)\((\s*\/(?:\\.|[^\/])*?\/\s*)\)/g;
var reScope = /\(\:scope >/g; // Note that we require `/` character in regular expressions to be escaped.
/**
* Used for pre-processing pseudo-classes values with above two regexes.
*/
var addQuotes = function addQuotes(_, c1, c2) {
return ":".concat(c1, "(\"").concat(c2.replace(/["\\]/g, '\\$&'), "\")");
};
var SCOPE_REPLACER = '(>';
/**
* Normalizes specified css text in a form that can be parsed by the
* Sizzle engine.
* Normalization means
* 1. transforming [-ext-*=""] attributes to pseudo classes
* 2. enclosing possibly ambiguous arguments of `:contains`,
* `:matches-css` pseudo classes with quotes.
* @param {string} cssText
* @return {string}
*/
var normalize = function normalize(cssText) {
var normalizedCssText = cssText.replace(reAttrFallback, evaluateMatch).replace(reMatchesCss, addQuotes).replace(reContains, addQuotes).replace(reScope, SCOPE_REPLACER);
return normalizedCssText;
};
var isSimpleSelectorValid = function isSimpleSelectorValid(selector) {
try {
document.querySelectorAll(selector);
} catch (e) {
return false;
}
return true;
};
return {
normalize: normalize,
isSimpleSelectorValid: isSimpleSelectorValid
};
}();
/*!
* Sizzle CSS Selector Engine v2.3.4-pre-adguard
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://js.foundation/
*
* Date: 2020-08-04
*/
/**
* Version of Sizzle patched by AdGuard in order to be used in the ExtendedCss module.
* https://github.com/AdguardTeam/sizzle-extcss
*
* Look for [AdGuard Patch] and ADGUARD_EXTCSS markers to find out what exactly was changed by us.
*
* Global changes:
* 1. Added additional parameters to the "Sizzle.tokenize" method so that it can be used for stylesheets parsing and validation.
* 2. Added tokens re-sorting mechanism forcing slow pseudos to be matched last (see sortTokenGroups).
* 3. Fix the nonnativeSelectorCache caching -- there was no value corresponding to a key.
* 4. Added Sizzle.compile call to the `:has` pseudo definition.
*
* Changes that are applied to the ADGUARD_EXTCSS build only:
* 1. Do not expose Sizzle to the global scope. Initialize it lazily via initializeSizzle().
* 2. Removed :contains pseudo declaration -- its syntax is changed and declared outside of Sizzle.
* 3. Removed declarations for the following non-standard pseudo classes:
* :parent, :header, :input, :button, :text, :first, :last, :eq,
* :even, :odd, :lt, :gt, :nth, :radio, :checkbox, :file,
* :password, :image, :submit, :reset
* 4. Added es6 module export
*/
var Sizzle;
/**
* Initializes Sizzle object.
* In the case of AdGuard ExtendedCss we want to avoid initializing Sizzle right away
* and exposing it to the global scope.
*/
var initializeSizzle = function initializeSizzle() {
// jshint ignore:line
if (!Sizzle) {
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Sizzle = function (window) {
var support,
Expr,
getText,
isXML,
tokenize,
compile,
select,
outermostContext,
sortInput,
hasDuplicate,
// Local document vars
setDocument,
document,
docElem,
documentIsHTML,
rbuggyQSA,
rbuggyMatches,
matches,
contains,
// Instance-specific data
expando = "sizzle" + 1 * new Date(),
preferredDoc = window.document,
dirruns = 0,
done = 0,
classCache = createCache(),
tokenCache = createCache(),
compilerCache = createCache(),
nonnativeSelectorCache = createCache(),
sortOrder = function sortOrder(a, b) {
if (a === b) {
hasDuplicate = true;
}
return 0;
},
// Instance methods
hasOwn = {}.hasOwnProperty,
arr = [],
pop = arr.pop,
push_native = arr.push,
push = arr.push,
slice = arr.slice,
// Use a stripped-down indexOf as it's faster than native
// https://jsperf.com/thor-indexof-vs-for/5
indexOf = function indexOf(list, elem) {
var i = 0,
len = list.length;
for (; i < len; i++) {
if (list[i] === elem) {
return i;
}
}
return -1;
},
booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
// Regular expressions
// http://www.w3.org/TR/css3-selectors/#whitespace
whitespace = "[\\x20\\t\\r\\n\\f]",
// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + // Operator (capture 2)
"*([*^$|!~]?=)" + whitespace + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + "*\\]",
pseudos = ":(" + identifier + ")(?:\\((" + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
// 1. quoted (capture 3; capture 4 or capture 5)
"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + // 2. simple (capture 6)
"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + // 3. anything else (capture 2)
".*" + ")\\)|)",
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
rwhitespace = new RegExp(whitespace + "+", "g"),
rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g"),
rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"),
rcombinators = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"),
rpseudo = new RegExp(pseudos),
ridentifier = new RegExp("^" + identifier + "$"),
matchExpr = {
"ID": new RegExp("^#(" + identifier + ")"),
"CLASS": new RegExp("^\\.(" + identifier + ")"),
"TAG": new RegExp("^(" + identifier + "|[*])"),
"ATTR": new RegExp("^" + attributes),
"PSEUDO": new RegExp("^" + pseudos),
"CHILD": new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i"),
"bool": new RegExp("^(?:" + booleans + ")$", "i"),
// For use in libraries implementing .is()
// We use this for POS matching in `select`
"needsContext": new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i")
},
rnative = /^[^{]+\{\s*\[native \w/,
// Easily-parseable/retrievable ID or TAG or CLASS selectors
rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
rsibling = /[+~]/,
// CSS escapes
// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
runescape = new RegExp("\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig"),
funescape = function funescape(_, escaped, escapedWhitespace) {
var high = "0x" + escaped - 0x10000; // NaN means non-codepoint
// Support: Firefox<24
// Workaround erroneous numeric interpretation of +"0x"
return high !== high || escapedWhitespace ? escaped : high < 0 ? // BMP codepoint
String.fromCharCode(high + 0x10000) : // Supplemental Plane codepoint (surrogate pair)
String.fromCharCode(high >> 10 | 0xD800, high & 0x3FF | 0xDC00);
},
// CSS string/identifier serialization
// https://drafts.csswg.org/cssom/#common-serializing-idioms
rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
fcssescape = function fcssescape(ch, asCodePoint) {
if (asCodePoint) {
// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
if (ch === "\0") {
return "\uFFFD";
} // Control characters and (dependent upon position) numbers get escaped as code points
return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16) + " ";
} // Other potentially-special ASCII characters get backslash-escaped
return "\\" + ch;
},
// Used for iframes
// See setDocument()
// Removing the function wrapper causes a "Permission Denied"
// error in IE
unloadHandler = function unloadHandler() {
setDocument();
},
inDisabledFieldset = addCombinator(function (elem) {
return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset";
}, {
dir: "parentNode",
next: "legend"
}); // Optimize for push.apply( _, NodeList )
try {
push.apply(arr = slice.call(preferredDoc.childNodes), preferredDoc.childNodes); // Support: Android<4.0
// Detect silently failing push.apply
arr[preferredDoc.childNodes.length].nodeType;
} catch (e) {
push = {
apply: arr.length ? // Leverage slice if possible
function (target, els) {
push_native.apply(target, slice.call(els));
} : // Support: IE<9
// Otherwise append directly
function (target, els) {
var j = target.length,
i = 0; // Can't trust NodeList.length
while (target[j++] = els[i++]) {}
target.length = j - 1;
}
};
}
function Sizzle(selector, context, results, seed) {
var m,
i,
elem,
nid,
match,
groups,
newSelector,
newContext = context && context.ownerDocument,
// nodeType defaults to 9, since context defaults to document
nodeType = context ? context.nodeType : 9;
results = results || []; // Return early from calls with invalid selector or context
if (typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) {
return results;
} // Try to shortcut find operations (as opposed to filters) in HTML documents
if (!seed) {
if ((context ? context.ownerDocument || context : preferredDoc) !== document) {
setDocument(context);
}
context = context || document;
if (documentIsHTML) {
// If the selector is sufficiently simple, try using a "get*By*" DOM method
// (excepting DocumentFragment context, where the methods don't exist)
if (nodeType !== 11 && (match = rquickExpr.exec(selector))) {
// ID selector
if (m = match[1]) {
// Document context
if (nodeType === 9) {
if (elem = context.getElementById(m)) {
// Support: IE, Opera, Webkit
// TODO: identify versions
// getElementById can match elements by name instead of ID
if (elem.id === m) {
results.push(elem);
return results;
}
} else {
return results;
} // Element context
} else {
// Support: IE, Opera, Webkit
// TODO: identify versions
// getElementById can match elements by name instead of ID
if (newContext && (elem = newContext.getElementById(m)) && contains(context, elem) && elem.id === m) {
results.push(elem);
return results;
}
} // Type selector
} else if (match[2]) {
push.apply(results, context.getElementsByTagName(selector));
return results; // Class selector
} else if ((m = match[3]) && support.getElementsByClassName && context.getElementsByClassName) {
push.apply(results, context.getElementsByClassName(m));
return results;
}
} // Take advantage of querySelectorAll
if (support.qsa && !nonnativeSelectorCache[selector + " "] && (!rbuggyQSA || !rbuggyQSA.test(selector))) {
if (nodeType !== 1) {
newContext = context;
newSelector = selector; // qSA looks outside Element context, which is not what we want
// Thanks to Andrew Dupont for this workaround technique
// Support: IE <=8
// Exclude object elements
} else if (context.nodeName.toLowerCase() !== "object") {
// Capture the context ID, setting it first if necessary
if (nid = context.getAttribute("id")) {
nid = nid.replace(rcssescape, fcssescape);
} else {
context.setAttribute("id", nid = expando);
} // Prefix every selector in the list
groups = tokenize(selector);
i = groups.length;
while (i--) {
groups[i] = "#" + nid + " " + toSelector(groups[i]);
}
newSelector = groups.join(","); // Expand context for sibling selectors
newContext = rsibling.test(selector) && testContext(context.parentNode) || context;
}
if (newSelector) {
try {
push.apply(results, newContext.querySelectorAll(newSelector));
return results;
} catch (qsaError) {
// [AdGuard Path]: Fix the cache value
nonnativeSelectorCache(selector, true);
} finally {
if (nid === expando) {
context.removeAttribute("id");
}
}
}
}
}
} // All others
return select(selector.replace(rtrim, "$1"), context, results, seed);
}
/**
* Create key-value caches of limited size
* @returns {function(string, object)} Returns the Object data after storing it on itself with
* property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
* deleting the oldest entry
*/
function createCache() {
var keys = [];
function cache(key, value) {
// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
if (keys.push(key + " ") > Expr.cacheLength) {
// Only keep the most recent entries
delete cache[keys.shift()];
}
return cache[key + " "] = value;
}
return cache;
}
/**
* Mark a function for special use by Sizzle
* @param {Function} fn The function to mark
*/
function markFunction(fn) {
fn[expando] = true;
return fn;
}
/**
* Support testing using an element
* @param {Function} fn Passed the created element and returns a boolean result
*/
function assert(fn) {
var el = document.createElement("fieldset");
try {
return !!fn(el);
} catch (e) {
return false;
} finally {
// Remove from its parent by default
if (el.parentNode) {
el.parentNode.removeChild(el);
} // release memory in IE
el = null;
}
}
/**
* Adds the same handler for all of the specified attrs
* @param {String} attrs Pipe-separated list of attributes
* @param {Function} handler The method that will be applied
*/
function addHandle(attrs, handler) {
var arr = attrs.split("|"),
i = arr.length;
while (i--) {
Expr.attrHandle[arr[i]] = handler;
}
}
/**
* Checks document order of two siblings
* @param {Element} a
* @param {Element} b
* @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
*/
function siblingCheck(a, b) {
var cur = b && a,
diff = cur && a.nodeType === 1 && b.nodeType === 1 && a.sourceIndex - b.sourceIndex; // Use IE sourceIndex if available on both nodes
if (diff) {
return diff;
} // Check if b follows a
if (cur) {
while (cur = cur.nextSibling) {
if (cur === b) {
return -1;
}
}
}
return a ? 1 : -1;
}
/**
* Returns a function to use in pseudos for :enabled/:disabled
* @param {Boolean} disabled true for :disabled; false for :enabled
*/
function createDisabledPseudo(disabled) {
// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
return function (elem) {
// Only certain elements can match :enabled or :disabled
// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
if ("form" in elem) {
// Check for inherited disabledness on relevant non-disabled elements:
// * listed form-associated elements in a disabled fieldset
// https://html.spec.whatwg.org/multipage/forms.html#category-listed
// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
// * option elements in a disabled optgroup
// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
// All such elements have a "form" property.
if (elem.parentNode && elem.disabled === false) {
// Option elements defer to a parent optgroup if present
if ("label" in elem) {
if ("label" in elem.parentNode) {
return elem.parentNode.disabled === disabled;
} else {
return elem.disabled === disabled;
}
} // Support: IE 6 - 11
// Use the isDisabled shortcut property to check for disabled fieldset ancestors
return elem.isDisabled === disabled || // Where there is no isDisabled, check manually
/* jshint -W018 */
elem.isDisabled !== !disabled && inDisabledFieldset(elem) === disabled;
}
return elem.disabled === disabled; // Try to winnow out elements that can't be disabled before trusting the disabled property.
// Some victims get caught in our net (label, legend, menu, track), but it shouldn't
// even exist on them, let alone have a boolean value.
} else if ("label" in elem) {
return elem.disabled === disabled;
} // Remaining elements are neither :enabled nor :disabled
return false;
};
}
/**
* Checks a node for validity as a Sizzle context
* @param {Element|Object=} context
* @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
*/
function testContext(context) {
return context && typeof context.getElementsByTagName !== "undefined" && context;
} // Expose support vars for convenience
support = Sizzle.support = {};
/**
* Detects XML nodes
* @param {Element|Object} elem An element or a document
* @returns {Boolean} True iff elem is a non-HTML XML node
*/
isXML = Sizzle.isXML = function (elem) {
// documentElement is verified for cases where it doesn't yet exist
// (such as loading iframes in IE - #4833)
var documentElement = elem && (elem.ownerDocument || elem).documentElement;
return documentElement ? documentElement.nodeName !== "HTML" : false;
};
/**
* Sets document-related variables once based on the current document
* @param {Element|Object} [doc] An element or document object to use to set the document
* @returns {Object} Returns the current document
*/
setDocument = Sizzle.setDocument = function (node) {
var hasCompare,
subWindow,
doc = node ? node.ownerDocument || node : preferredDoc; // Return early if doc is invalid or already selected
if (doc === document || doc.nodeType !== 9 || !doc.documentElement) {
return document;
} // Update global variables
document = doc;
docElem = document.documentElement;
documentIsHTML = !isXML(document); // Support: IE 9-11, Edge
// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
if (preferredDoc !== document && (subWindow = document.defaultView) && subWindow.top !== subWindow) {
// Support: IE 11, Edge
if (subWindow.addEventListener) {
subWindow.addEventListener("unload", unloadHandler, false); // Support: IE 9 - 10 only
} else if (subWindow.attachEvent) {
subWindow.attachEvent("onunload", unloadHandler);
}
}
/* Attributes
---------------------------------------------------------------------- */
// Support: IE<8
// Verify that getAttribute really returns attributes and not properties
// (excepting IE8 booleans)
support.attributes = assert(function (el) {
el.className = "i";
return !el.getAttribute("className");
});
/* getElement(s)By*
---------------------------------------------------------------------- */
// Check if getElementsByTagName("*") returns only elements
support.getElementsByTagName = assert(function (el) {
el.appendChild(document.createComment(""));
return !el.getElementsByTagName("*").length;
}); // Support: IE<9
support.getElementsByClassName = rnative.test(document.getElementsByClassName); // Support: IE<10
// Check if getElementById returns elements by name
// The broken getElementById methods don't pick up programmatically-set names,
// so use a roundabout getElementsByName test
support.getById = assert(function (el) {
docElem.appendChild(el).id = expando;
return !document.getElementsByName || !document.getElementsByName(expando).length;
}); // ID filter and find
if (support.getById) {
Expr.filter["ID"] = function (id) {
var attrId = id.replace(runescape, funescape);
return function (elem) {
return elem.getAttribute("id") === attrId;
};
};
Expr.find["ID"] = function (id, context) {
if (typeof context.getElementById !== "undefined" && documentIsHTML) {
var elem = context.getElementById(id);
return elem ? [elem] : [];
}
};
} else {
Expr.filter["ID"] = function (id) {
var attrId = id.replace(runescape, funescape);
return function (elem) {
var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
return node && node.value === attrId;
};
}; // Support: IE 6 - 7 only
// getElementById is not reliable as a find shortcut
Expr.find["ID"] = function (id, context) {
if (typeof context.getElementById !== "undefined" && documentIsHTML) {
var node,
i,
elems,
elem = context.getElementById(id);
if (elem) {
// Verify the id attribute
node = elem.getAttributeNode("id");
if (node && node.value === id) {
return [elem];
} // Fall back on getElementsByName
elems = context.getElementsByName(id);
i = 0;
while (elem = elems[i++]) {
node = elem.getAttributeNode("id");
if (node && node.value === id) {
return [elem];
}
}
}
return [];
}
};
} // Tag
Expr.find["TAG"] = support.getElementsByTagName ? function (tag, context) {
if (typeof context.getElementsByTagName !== "undefined") {
return context.getElementsByTagName(tag); // DocumentFragment nodes don't have gEBTN
} else if (support.qsa) {
return context.querySelectorAll(tag);
}
} : function (tag, context) {
var elem,
tmp = [],
i = 0,
// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
results = context.getElementsByTagName(tag); // Filter out possible comments
if (tag === "*") {
while (elem = results[i++]) {
if (elem.nodeType === 1) {
tmp.push(elem);
}
}
return tmp;
}
return results;
}; // Class
Expr.find["CLASS"] = support.getElementsByClassName && function (className, context) {
if (typeof context.getElementsByClassName !== "undefined" && documentIsHTML) {
return context.getElementsByClassName(className);
}
};
/* QSA/matchesSelector
---------------------------------------------------------------------- */
// QSA and matchesSelector support
// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
rbuggyMatches = []; // qSa(:focus) reports false when true (Chrome 21)
// We allow this because of a bug in IE8/9 that throws an error
// whenever `document.activeElement` is accessed on an iframe
// So, we allow :focus to pass through QSA all the time to avoid the IE error
// See https://bugs.jquery.com/ticket/13378
rbuggyQSA = [];
if (support.qsa = rnative.test(document.querySelectorAll)) {
// Build QSA regex
// Regex strategy adopted from Diego Perini
assert(function (el) {
// Select is set to empty string on purpose
// This is to test IE's treatment of not explicitly
// setting a boolean content attribute,
// since its presence should be enough
// https://bugs.jquery.com/ticket/12359
docElem.appendChild(el).innerHTML = AGPolicy.createHTML("<a id='" + expando + "'></a>" + "<select id='" + expando + "-\r\\' msallowcapture=''>" + "<option selected=''></option></select>"); // Support: IE8, Opera 11-12.16
// Nothing should be selected when empty strings follow ^= or $= or *=
// The test attribute must be unknown in Opera but "safe" for WinRT
// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
if (el.querySelectorAll("[msallowcapture^='']").length) {
rbuggyQSA.push("[*^$]=" + whitespace + "*(?:''|\"\")");
} // Support: IE8
// Boolean attributes and "value" are not treated correctly
if (!el.querySelectorAll("[selected]").length) {
rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")");
} // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
if (!el.querySelectorAll("[id~=" + expando + "-]").length) {
rbuggyQSA.push("~=");
} // Webkit/Opera - :checked should return selected option elements
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
// IE8 throws error here and will not see later tests
if (!el.querySelectorAll(":checked").length) {
rbuggyQSA.push(":checked");
} // Support: Safari 8+, iOS 8+
// https://bugs.webkit.org/show_bug.cgi?id=136851
// In-page `selector#id sibling-combinator selector` fails
if (!el.querySelectorAll("a#" + expando + "+*").length) {
rbuggyQSA.push(".#.+[+~]");
}
});
assert(function (el) {
el.innerHTML = AGPolicy.createHTML("<a href='' disabled='disabled'></a>" + "<select disabled='disabled'><option/></select>"); // Support: Windows 8 Native Apps
// The type and name attributes are restricted during .innerHTML assignment
var input = document.createElement("input");
input.setAttribute("type", "hidden");
el.appendChild(input).setAttribute("name", "D"); // Support: IE8
// Enforce case-sensitivity of name attribute
if (el.querySelectorAll("[name=d]").length) {
rbuggyQSA.push("name" + whitespace + "*[*^$|!~]?=");
} // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
// IE8 throws error here and will not see later tests
if (el.querySelectorAll(":enabled").length !== 2) {
rbuggyQSA.push(":enabled", ":disabled");
} // Support: IE9-11+
// IE's :disabled selector does not pick up the children of disabled fieldsets
docElem.appendChild(el).disabled = true;
if (el.querySelectorAll(":disabled").length !== 2) {
rbuggyQSA.push(":enabled", ":disabled");
} // Opera 10-11 does not throw on post-comma invalid pseudos
el.querySelectorAll("*,:x");
rbuggyQSA.push(",.*:");
});
}
if (support.matchesSelector = rnative.test(matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector)) {
assert(function (el) {
// Check to see if it's possible to do matchesSelector
// on a disconnected node (IE 9)
support.disconnectedMatch = matches.call(el, "*"); // This should fail with an exception
// Gecko does not error, returns false instead
matches.call(el, "[s!='']:x");
rbuggyMatches.push("!=", pseudos);
});
}
rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|"));
rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|"));
/* Contains
---------------------------------------------------------------------- */
hasCompare = rnative.test(docElem.compareDocumentPosition); // Element contains another
// Purposefully self-exclusive
// As in, an element does not contain itself
contains = hasCompare || rnative.test(docElem.contains) ? function (a, b) {
var adown = a.nodeType === 9 ? a.documentElement : a,
bup = b && b.parentNode;
return a === bup || !!(bup && bup.nodeType === 1 && (adown.contains ? adown.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16));
} : function (a, b) {
if (b) {
while (b = b.parentNode) {
if (b === a) {
return true;
}
}
}
return false;
};
/* Sorting
---------------------------------------------------------------------- */
// Document order sorting
sortOrder = hasCompare ? function (a, b) {
// Flag for duplicate removal
if (a === b) {
hasDuplicate = true;
return 0;
} // Sort on method existence if only one input has compareDocumentPosition
var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
if (compare) {
return compare;
} // Calculate position if both inputs belong to the same document
compare = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : // Otherwise we know they are disconnected
1; // Disconnected nodes
if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) {
// Choose the first element that is related to our preferred document
if (a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a)) {
return -1;
}
if (b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b)) {
return 1;
} // Maintain original order
return sortInput ? indexOf(sortInput, a) - indexOf(sortInput, b) : 0;
}
return compare & 4 ? -1 : 1;
} : function (a, b) {
// Exit early if the nodes are identical
if (a === b) {
hasDuplicate = true;
return 0;
}
var cur,
i = 0,
aup = a.parentNode,
bup = b.parentNode,
ap = [a],
bp = [b]; // Parentless nodes are either documents or disconnected
if (!aup || !bup) {
return a === document ? -1 : b === document ? 1 : aup ? -1 : bup ? 1 : sortInput ? indexOf(sortInput, a) - indexOf(sortInput, b) : 0; // If the nodes are siblings, we can do a quick check
} else if (aup === bup) {
return siblingCheck(a, b);
} // Otherwise we need full lists of their ancestors for comparison
cur = a;
while (cur = cur.parentNode) {
ap.unshift(cur);
}
cur = b;
while (cur = cur.parentNode) {
bp.unshift(cur);
} // Walk down the tree looking for a discrepancy
while (ap[i] === bp[i]) {
i++;
}
return i ? // Do a sibling check if the nodes have a common ancestor
siblingCheck(ap[i], bp[i]) : // Otherwise nodes in our document sort first
ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0;
};
return document;
};
Sizzle.matches = function (expr, elements) {
return Sizzle(expr, null, null, elements);
};
Sizzle.matchesSelector = function (elem, expr) {
// Set document vars if needed
if ((elem.ownerDocument || elem) !== document) {
setDocument(elem);
}
if (support.matchesSelector && documentIsHTML && !nonnativeSelectorCache[expr + " "] && (!rbuggyMatches || !rbuggyMatches.test(expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr))) {
try {
var ret = matches.call(elem, expr); // IE 9's matchesSelector returns false on disconnected nodes
if (ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document
// fragment in IE 9
elem.document && elem.document.nodeType !== 11) {
return ret;
}
} catch (e) {
// [AdGuard Path]: Fix the cache value
nonnativeSelectorCache(expr, true);
}
}
return Sizzle(expr, document, null, [elem]).length > 0;
};
Sizzle.contains = function (context, elem) {
// Set document vars if needed
if ((context.ownerDocument || context) !== document) {
setDocument(context);
}
return contains(context, elem);
};
Sizzle.attr = function (elem, name) {
// Set document vars if needed
if ((elem.ownerDocument || elem) !== document) {
setDocument(elem);
}
var fn = Expr.attrHandle[name.toLowerCase()],
// Don't get fooled by Object.prototype properties (jQuery #13807)
val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : undefined;
return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute(name) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
};
Sizzle.escape = function (sel) {
return (sel + "").replace(rcssescape, fcssescape);
};
Sizzle.error = function (msg) {
throw new Error("Syntax error, unrecognized expression: " + msg);
};
/**
* Document sorting and removing duplicates
* @param {ArrayLike} results
*/
Sizzle.uniqueSort = function (results) {
var elem,
duplicates = [],
j = 0,
i = 0; // Unless we *know* we can detect duplicates, assume their presence
hasDuplicate = !support.detectDuplicates;
sortInput = !support.sortStable && results.slice(0);
results.sort(sortOrder);
if (hasDuplicate) {
while (elem = results[i++]) {
if (elem === results[i]) {
j = duplicates.push(i);
}
}
while (j--) {
results.splice(duplicates[j], 1);
}
} // Clear input after sorting to release objects
// See https://github.com/jquery/sizzle/pull/225
sortInput = null;
return results;
};
/**
* Utility function for retrieving the text value of an array of DOM nodes
* @param {Array|Element} elem
*/
getText = Sizzle.getText = function (elem) {
var node,
ret = "",
i = 0,
nodeType = elem.nodeType;
if (!nodeType) {
// If no nodeType, this is expected to be an array
while (node = elem[i++]) {
// Do not traverse comment nodes
ret += getText(node);
}
} else if (nodeType === 1 || nodeType === 9 || nodeType === 11) {
// Use textContent for elements
// innerText usage removed for consistency of new lines (jQuery #11153)
if (typeof elem.textContent === "string") {
return elem.textContent;
} else {
// Traverse its children
for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
ret += getText(elem);
}
}
} else if (nodeType === 3 || nodeType === 4) {
return elem.nodeValue;
} // Do not include comment or processing instruction nodes
return ret;
};
Expr = Sizzle.selectors = {
// Can be adjusted by the user
cacheLength: 50,
createPseudo: markFunction,
match: matchExpr,
attrHandle: {},
find: {},
relative: {
">": {
dir: "parentNode",
first: true
},
" ": {
dir: "parentNode"
},
"+": {
dir: "previousSibling",
first: true
},
"~": {
dir: "previousSibling"
}
},
preFilter: {
"ATTR": function ATTR(match) {
match[1] = match[1].replace(runescape, funescape); // Move the given value to match[3] whether quoted or unquoted
match[3] = (match[3] || match[4] || match[5] || "").replace(runescape, funescape);
if (match[2] === "~=") {
match[3] = " " + match[3] + " ";
}
return match.slice(0, 4);
},
"CHILD": function CHILD(match) {
/* matches from matchExpr["CHILD"]
1 type (only|nth|...)
2 what (child|of-type)
3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
4 xn-component of xn+y argument ([+-]?\d*n|)
5 sign of xn-component
6 x of xn-component
7 sign of y-component
8 y of y-component
*/
match[1] = match[1].toLowerCase();
if (match[1].slice(0, 3) === "nth") {
// nth-* requires argument
if (!match[3]) {
Sizzle.error(match[0]);
} // numeric x and y parameters for Expr.filter.CHILD
// remember that false/true cast respectively to 0/1
match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd"));
match[5] = +(match[7] + match[8] || match[3] === "odd"); // other types prohibit arguments
} else if (match[3]) {
Sizzle.error(match[0]);
}
return match;
},
"PSEUDO": function PSEUDO(match) {
var excess,
unquoted = !match[6] && match[2];
if (matchExpr["CHILD"].test(match[0])) {
return null;
} // Accept quoted arguments as-is
if (match[3]) {
match[2] = match[4] || match[5] || ""; // Strip excess characters from unquoted arguments
} else if (unquoted && rpseudo.test(unquoted) && ( // Get excess from tokenize (recursively)
excess = tokenize(unquoted, true)) && ( // advance to the next closing parenthesis
excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) {
// excess is a negative index
match[0] = match[0].slice(0, excess);
match[2] = unquoted.slice(0, excess);
} // Return only captures needed by the pseudo filter method (type and argument)
return match.slice(0, 3);
}
},
filter: {
"TAG": function TAG(nodeNameSelector) {
var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
return nodeNameSelector === "*" ? function () {
return true;
} : function (elem) {
return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
};
},
"CLASS": function CLASS(className) {
var pattern = classCache[className + " "];
return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function (elem) {
return pattern.test(typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "");
});
},
"ATTR": function ATTR(name, operator, check) {
return function (elem) {
var result = Sizzle.attr(elem, name);
if (result == null) {
return operator === "!=";
}
if (!operator) {
return true;
}
result += "";
return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf(check) === 0 : operator === "*=" ? check && result.indexOf(check) > -1 : operator === "$=" ? check && result.slice(-check.length) === check : operator === "~=" ? (" " + result.replace(rwhitespace, " ") + " ").indexOf(check) > -1 : operator === "|=" ? result === check || result.slice(0, check.length + 1) === check + "-" : false;
};
},
"CHILD": function CHILD(type, what, argument, first, last) {
var simple = type.slice(0, 3) !== "nth",
forward = type.slice(-4) !== "last",
ofType = what === "of-type";
return first === 1 && last === 0 ? // Shortcut for :nth-*(n)
function (elem) {
return !!elem.parentNode;
} : function (elem, context, xml) {
var cache,
uniqueCache,
outerCache,
node,
nodeIndex,
start,
dir = simple !== forward ? "nextSibling" : "previousSibling",
parent = elem.parentNode,
name = ofType && elem.nodeName.toLowerCase(),
useCache = !xml && !ofType,
diff = false;
if (parent) {
// :(first|last|only)-(child|of-type)
if (simple) {
while (dir) {
node = elem;
while (node = node[dir]) {
if (ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) {
return false;
}
} // Reverse direction for :only-* (if we haven't yet done so)
start = dir = type === "only" && !start && "nextSibling";
}
return true;
}
start = [forward ? parent.firstChild : parent.lastChild]; // non-xml :nth-child(...) stores cache data on `parent`
if (forward && useCache) {
// Seek `elem` from a previously-cached index
// ...in a gzip-friendly way
node = parent;
outerCache = node[expando] || (node[expando] = {}); // Support: IE <9 only
// Defend against cloned attroperties (jQuery gh-1709)
uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {});
cache = uniqueCache[type] || [];
nodeIndex = cache[0] === dirruns && cache[1];
diff = nodeIndex && cache[2];
node = nodeIndex && parent.childNodes[nodeIndex];
while (node = ++nodeIndex && node && node[dir] || ( // Fallback to seeking `elem` from the start
diff = nodeIndex = 0) || start.pop()) {
// When found, cache indexes on `parent` and break
if (node.nodeType === 1 && ++diff && node === elem) {
uniqueCache[type] = [dirruns, nodeIndex, diff];
break;
}
}
} else {
// Use previously-cached element index if available
if (useCache) {
// ...in a gzip-friendly way
node = elem;
outerCache = node[expando] || (node[expando] = {}); // Support: IE <9 only
// Defend against cloned attroperties (jQuery gh-1709)
uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {});
cache = uniqueCache[type] || [];
nodeIndex = cache[0] === dirruns && cache[1];
diff = nodeIndex;
} // xml :nth-child(...)
// or :nth-last-child(...) or :nth(-last)?-of-type(...)
if (diff === false) {
// Use the same loop as above to seek `elem` from the start
while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) {
if ((ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) && ++diff) {
// Cache the index of each encountered element
if (useCache) {
outerCache = node[expando] || (node[expando] = {}); // Support: IE <9 only
// Defend against cloned attroperties (jQuery gh-1709)
uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {});
uniqueCache[type] = [dirruns, diff];
}
if (node === elem) {
break;
}
}
}
}
} // Incorporate the offset, then check against cycle size
diff -= last;
return diff === first || diff % first === 0 && diff / first >= 0;
}
};
},
"PSEUDO": function PSEUDO(pseudo, argument) {
// pseudo-class names are case-insensitive
// http://www.w3.org/TR/selectors/#pseudo-classes
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
// Remember that setFilters inherits from pseudos
var args,
fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error("unsupported pseudo: " + pseudo); // The user may use createPseudo to indicate that
// arguments are needed to create the filter function
// just as Sizzle does
if (fn[expando]) {
return fn(argument);
} // But maintain support for old signatures
if (fn.length > 1) {
args = [pseudo, pseudo, "", argument];
return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function (seed, matches) {
var idx,
matched = fn(seed, argument),
i = matched.length;
while (i--) {
idx = indexOf(seed, matched[i]);
seed[idx] = !(matches[idx] = matched[i]);
}
}) : function (elem) {
return fn(elem, 0, args);
};
}
return fn;
}
},
pseudos: {
// Potentially complex pseudos
"not": markFunction(function (selector) {
// Trim the selector passed to compile
// to avoid treating leading and trailing
// spaces as combinators
var input = [],
results = [],
matcher = compile(selector.replace(rtrim, "$1"));
return matcher[expando] ? markFunction(function (seed, matches, context, xml) {
var elem,
unmatched = matcher(seed, null, xml, []),
i = seed.length; // Match elements unmatched by `matcher`
while (i--) {
if (elem = unmatched[i]) {
seed[i] = !(matches[i] = elem);
}
}
}) : function (elem, context, xml) {
input[0] = elem;
matcher(input, null, xml, results); // Don't keep the element (issue #299)
input[0] = null;
return !results.pop();
};
}),
"has": markFunction(function (selector) {
if (typeof selector === "string") {
Sizzle.compile(selector);
}
return function (elem) {
return Sizzle(selector, elem).length > 0;
};
}),
// Removed :contains pseudo-class declaration
// "Whether an element is represented by a :lang() selector
// is based solely on the element's language value
// being equal to the identifier C,
// or beginning with the identifier C immediately followed by "-".
// The matching of C against the element's language value is performed case-insensitively.
// The identifier C does not have to be a valid language name."
// http://www.w3.org/TR/selectors/#lang-pseudo
"lang": markFunction(function (lang) {
// lang value must be a valid identifier
if (!ridentifier.test(lang || "")) {
Sizzle.error("unsupported lang: " + lang);
}
lang = lang.replace(runescape, funescape).toLowerCase();
return function (elem) {
var elemLang;
do {
if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) {
elemLang = elemLang.toLowerCase();
return elemLang === lang || elemLang.indexOf(lang + "-") === 0;
}
} while ((elem = elem.parentNode) && elem.nodeType === 1);
return false;
};
}),
// Miscellaneous
"target": function target(elem) {
var hash = window.location && window.location.hash;
return hash && hash.slice(1) === elem.id;
},
"root": function root(elem) {
return elem === docElem;
},
"focus": function focus(elem) {
return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
},
// Boolean properties
"enabled": createDisabledPseudo(false),
"disabled": createDisabledPseudo(true),
"checked": function checked(elem) {
// In CSS3, :checked should return both checked and selected elements
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
var nodeName = elem.nodeName.toLowerCase();
return nodeName === "input" && !!elem.checked || nodeName === "option" && !!elem.selected;
},
"selected": function selected(elem) {
// Accessing this property makes selected-by-default
// options in Safari work properly
if (elem.parentNode) {
elem.parentNode.selectedIndex;
}
return elem.selected === true;
},
// Contents
"empty": function empty(elem) {
// http://www.w3.org/TR/selectors/#empty-pseudo
// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
// but not by others (comment: 8; processing instruction: 7; etc.)
// nodeType < 6 works because attributes (2) do not appear as children
for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
if (elem.nodeType < 6) {
return false;
}
}
return true;
} // Removed custom pseudo-classes
}
}; // Removed custom pseudo-classes
// Easy API for creating new setFilters
function setFilters() {}
setFilters.prototype = Expr.filters = Expr.pseudos;
Expr.setFilters = new setFilters();
/**
* [AdGuard Patch]:
* Sorts the tokens in order to mitigate the performance issues caused by matching slow pseudos first:
* https://github.com/AdguardTeam/ExtendedCss/issues/55#issuecomment-364058745
*/
var sortTokenGroups = function () {
/**
* Splits compound selector into a list of simple selectors
*
* @param {*} tokens Tokens to split into groups
* @returns an array consisting of token groups (arrays) and relation tokens.
*/
var splitCompoundSelector = function splitCompoundSelector(tokens) {
var groups = [];
var currentTokensGroup = [];
var maxIdx = tokens.length - 1;
for (var i = 0; i <= maxIdx; i++) {
var token = tokens[i];
var relative = Sizzle.selectors.relative[token.type];
if (relative) {
groups.push(currentTokensGroup);
groups.push(token);
currentTokensGroup = [];
} else {
currentTokensGroup.push(token);
}
if (i === maxIdx) {
groups.push(currentTokensGroup);
}
}
return groups;
};
var TOKEN_TYPES_VALUES = {
// nth-child, etc, always go last
"CHILD": 100,
"ID": 90,
"CLASS": 80,
"TAG": 70,
"ATTR": 70,
"PSEUDO": 60
};
var POSITIONAL_PSEUDOS = ["nth", "first", "last", "eq", "even", "odd", "lt", "gt", "not"];
/**
* A function that defines the sort order.
* Returns a value lesser than 0 if "left" is less than "right".
*/
var compareFunction = function compareFunction(left, right) {
var leftValue = TOKEN_TYPES_VALUES[left.type];
var rightValue = TOKEN_TYPES_VALUES[right.type];
return leftValue - rightValue;
};
/**
* Checks if the specified tokens group is sortable.
* We do not re-sort tokens in case of any positional or child pseudos in the group
*/
var isSortable = function isSortable(tokens) {
var iTokens = tokens.length;
while (iTokens--) {
var token = tokens[iTokens];
if (token.type === "PSEUDO" && POSITIONAL_PSEUDOS.indexOf(token.matches[0]) !== -1) {
return false;
}
if (token.type === "CHILD") {
return false;
}
}
return true;
};
/**
* Sorts the tokens in order to mitigate the issues caused by the left-to-right matching.
* The idea is change the tokens order so that Sizzle was matching fast selectors first (id, class),
* and slow selectors after that (and here I mean our slow custom pseudo classes).
*
* @param {Array} tokens An array of tokens to sort
* @returns {Array} A new re-sorted array
*/
var sortTokens = function sortTokens(tokens) {
if (!tokens || tokens.length === 1) {
return tokens;
}
var sortedTokens = [];
var groups = splitCompoundSelector(tokens);
for (var i = 0; i < groups.length; i++) {
var group = groups[i];
if (group instanceof Array) {
if (isSortable(group)) {
group.sort(compareFunction);
}
sortedTokens = sortedTokens.concat(group);
} else {
sortedTokens.push(group);
}
}
return sortedTokens;
};
/**
* Sorts every tokens array inside of the specified "groups" array.
* See "sortTokens" methods for more information on how tokens are sorted.
*
* @param {Array} groups An array of tokens arrays.
* @returns {Array} A new array that consists of the same tokens arrays after sorting
*/
var sortTokenGroups = function sortTokenGroups(groups) {
var sortedGroups = [];
var len = groups.length;
var i = 0;
for (; i < len; i++) {
sortedGroups.push(sortTokens(groups[i]));
}
return sortedGroups;
}; // Expose
return sortTokenGroups;
}();
/**
* Creates custom policy to use TrustedTypes CSP policy
* https://w3c.github.io/webappsec-trusted-types/dist/spec/
*/
var AGPolicy = function createPolicy() {
var defaultPolicy = {
createHTML: function createHTML(input) {
return input;
},
createScript: function createScript(input) {
return input;
},
createScriptURL: function createScriptURL(input) {
return input;
}
};
if (window.trustedTypes && window.trustedTypes.createPolicy) {
return window.trustedTypes.createPolicy("AGPolicy", defaultPolicy);
}
return defaultPolicy;
}();
/**
* [AdGuard Patch]:
* Removes trailing spaces from the tokens list
*
* @param {*} tokens An array of Sizzle tokens to post-process
*/
function removeTrailingSpaces(tokens) {
var iTokens = tokens.length;
while (iTokens--) {
var token = tokens[iTokens];
if (token.type === " ") {
tokens.length = iTokens;
} else {
break;
}
}
}
/**
* [AdGuard Patch]:
* An object with the information about selectors and their token representation
* @typedef {{selectorText: string, groups: Array}} SelectorData
* @property {string} selectorText A CSS selector text
* @property {Array} groups An array of token groups corresponding to that selector
*/
/**
* [AdGuard Patch]:
* This method processes parsed token groups, divides them into a number of selectors
* and makes sure that each selector's tokens are cached properly in Sizzle.
*
* @param {*} groups Token groups (see {@link Sizzle.tokenize})
* @returns {Array.<SelectorData>} An array of selectors data we got from the groups
*/
function tokenGroupsToSelectors(groups) {
// Remove trailing spaces which we can encounter in tolerant mode
// We're doing it in tolerant mode only as this is the only case when
// encountering trailing spaces is expected
removeTrailingSpaces(groups[groups.length - 1]); // We need sorted tokens to make cache work properly
var sortedGroups = sortTokenGroups(groups);
var selectors = [];
for (var i = 0; i < groups.length; i++) {
var tokenGroups = groups[i];
var selectorText = toSelector(tokenGroups);
selectors.push({
// Sizzle expects an array of token groups when compiling a selector
groups: [tokenGroups],
selectorText: selectorText
}); // Now make sure that selector tokens are cached
var tokensCacheItem = {
groups: tokenGroups,
sortedGroups: [sortedGroups[i]]
};
tokenCache(selectorText, tokensCacheItem);
}
return selectors;
}
/**
* [AdGuard Patch]:
* Add an additional argument for Sizzle.tokenize which indicates that it
* should not throw on invalid tokens, and instead should return tokens
* that it has produced so far.
*
* One more additional argument that allow to choose if you want to receive sorted or unsorted tokens
* The problem is that the re-sorted selectors are valid for Sizzle, but not for the browser.
* options.returnUnsorted -- return unsorted tokens if true.
* options.cacheOnly -- return cached result only. Required for unit-tests.
*
* @param {*} options Optional configuration object with two additional flags
* (options.tolerant, options.returnUnsorted, options.cacheOnly) -- see patches #5 and #6 notes
*/
tokenize = Sizzle.tokenize = function (selector, parseOnly, options) {
var matched,
match,
tokens,
type,
soFar,
groups,
preFilters,
cached = tokenCache[selector + " "];
var tolerant = options && options.tolerant;
var returnUnsorted = options && options.returnUnsorted;
var cacheOnly = options && options.cacheOnly;
if (cached) {
if (parseOnly) {
return 0;
} else {
return (returnUnsorted ? cached.groups : cached.sortedGroups).slice(0);
}
}
if (cacheOnly) {
return null;
}
soFar = selector;
groups = [];
preFilters = Expr.preFilter;
while (soFar) {
// Comma and first run
if (!matched || (match = rcomma.exec(soFar))) {
if (match) {
// Don't consume trailing commas as valid
soFar = soFar.slice(match[0].length) || soFar;
}
groups.push(tokens = []);
}
matched = false; // Combinators
if (match = rcombinators.exec(soFar)) {
matched = match.shift();
tokens.push({
value: matched,
// Cast descendant combinators to space
type: match[0].replace(rtrim, " ")
});
soFar = soFar.slice(matched.length);
} // Filters
for (type in Expr.filter) {
if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) {
matched = match.shift();
tokens.push({
value: matched,
type: type,
matches: match
});
soFar = soFar.slice(matched.length);
}
}
if (!matched) {
break;
}
} // Return the length of the invalid excess
// if we're just parsing
// Otherwise, throw an error or return tokens
var invalidLen = soFar.length;
if (parseOnly) {
return invalidLen;
}
if (invalidLen !== 0 && !tolerant) {
Sizzle.error(selector); // Throws an error.
}
if (tolerant) {
/**
* [AdGuard Patch]:
* In tolerant mode we return a special object that constists of
* an array of parsed selectors (and their tokens) and a "nextIndex" field
* that points to an index after which we're not able to parse selectors farther.
*/
var nextIndex = selector.length - invalidLen;
var selectors = tokenGroupsToSelectors(groups);
return {
selectors: selectors,
nextIndex: nextIndex
};
}
/** [AdGuard Patch]: Sorting tokens */
var sortedGroups = sortTokenGroups(groups);
/** [AdGuard Patch]: Change the way tokens are cached */
var tokensCacheItem = {
groups: groups,
sortedGroups: sortedGroups
};
tokensCacheItem = tokenCache(selector, tokensCacheItem);
return (returnUnsorted ? tokensCacheItem.groups : tokensCacheItem.sortedGroups).slice(0);
};
function toSelector(tokens) {
var i = 0,
len = tokens.length,
selector = "";
for (; i < len; i++) {
selector += tokens[i].value;
}
return selector;
}
function addCombinator(matcher, combinator, base) {
var dir = combinator.dir,
skip = combinator.next,
key = skip || dir,
checkNonElements = base && key === "parentNode",
doneName = done++;
return combinator.first ? // Check against closest ancestor/preceding element
function (elem, context, xml) {
while (elem = elem[dir]) {
if (elem.nodeType === 1 || checkNonElements) {
return matcher(elem, context, xml);
}
}
return false;
} : // Check against all ancestor/preceding elements
function (elem, context, xml) {
var oldCache,
uniqueCache,
outerCache,
newCache = [dirruns, doneName]; // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
if (xml) {
while (elem = elem[dir]) {
if (elem.nodeType === 1 || checkNonElements) {
if (matcher(elem, context, xml)) {
return true;
}
}
}
} else {
while (elem = elem[dir]) {
if (elem.nodeType === 1 || checkNonElements) {
outerCache = elem[expando] || (elem[expando] = {}); // Support: IE <9 only
// Defend against cloned attroperties (jQuery gh-1709)
uniqueCache = outerCache[elem.uniqueID] || (outerCache[elem.uniqueID] = {});
if (skip && skip === elem.nodeName.toLowerCase()) {
elem = elem[dir] || elem;
} else if ((oldCache = uniqueCache[key]) && oldCache[0] === dirruns && oldCache[1] === doneName) {
// Assign to newCache so results back-propagate to previous elements
return newCache[2] = oldCache[2];
} else {
// Reuse newcache so results back-propagate to previous elements
uniqueCache[key] = newCache; // A match means we're done; a fail means we have to keep checking
if (newCache[2] = matcher(elem, context, xml)) {
return true;
}
}
}
}
}
return false;
};
}
function elementMatcher(matchers) {
return matchers.length > 1 ? function (elem, context, xml) {
var i = matchers.length;
while (i--) {
if (!matchers[i](elem, context, xml)) {
return false;
}
}
return true;
} : matchers[0];
}
function multipleContexts(selector, contexts, results) {
var i = 0,
len = contexts.length;
for (; i < len; i++) {
Sizzle(selector, contexts[i], results);
}
return results;
}
function condense(unmatched, map, filter, context, xml) {
var elem,
newUnmatched = [],
i = 0,
len = unmatched.length,
mapped = map != null;
for (; i < len; i++) {
if (elem = unmatched[i]) {
if (!filter || filter(elem, context, xml)) {
newUnmatched.push(elem);
if (mapped) {
map.push(i);
}
}
}
}
return newUnmatched;
}
function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
if (postFilter && !postFilter[expando]) {
postFilter = setMatcher(postFilter);
}
if (postFinder && !postFinder[expando]) {
postFinder = setMatcher(postFinder, postSelector);
}
return markFunction(function (seed, results, context, xml) {
var temp,
i,
elem,
preMap = [],
postMap = [],
preexisting = results.length,
// Get initial elements from seed or context
elems = seed || multipleContexts(selector || "*", context.nodeType ? [context] : context, []),
// Prefilter to get matcher input, preserving a map for seed-results synchronization
matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems,
matcherOut = matcher ? // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
postFinder || (seed ? preFilter : preexisting || postFilter) ? // ...intermediate processing is necessary
[] : // ...otherwise use results directly
results : matcherIn; // Find primary matches
if (matcher) {
matcher(matcherIn, matcherOut, context, xml);
} // Apply postFilter
if (postFilter) {
temp = condense(matcherOut, postMap);
postFilter(temp, [], context, xml); // Un-match failing elements by moving them back to matcherIn
i = temp.length;
while (i--) {
if (elem = temp[i]) {
matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem);
}
}
}
if (seed) {
if (postFinder || preFilter) {
if (postFinder) {
// Get the final matcherOut by condensing this intermediate into postFinder contexts
temp = [];
i = matcherOut.length;
while (i--) {
if (elem = matcherOut[i]) {
// Restore matcherIn since elem is not yet a final match
temp.push(matcherIn[i] = elem);
}
}
postFinder(null, matcherOut = [], temp, xml);
} // Move matched elements from seed to results to keep them synchronized
i = matcherOut.length;
while (i--) {
if ((elem = matcherOut[i]) && (temp = postFinder ? indexOf(seed, elem) : preMap[i]) > -1) {
seed[temp] = !(results[temp] = elem);
}
}
} // Add elements to results, through postFinder if defined
} else {
matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut);
if (postFinder) {
postFinder(null, results, matcherOut, xml);
} else {
push.apply(results, matcherOut);
}
}
});
}
function matcherFromTokens(tokens) {
var checkContext,
matcher,
j,
len = tokens.length,
leadingRelative = Expr.relative[tokens[0].type],
implicitRelative = leadingRelative || Expr.relative[" "],
i = leadingRelative ? 1 : 0,
// The foundational matcher ensures that elements are reachable from top-level context(s)
matchContext = addCombinator(function (elem) {
return elem === checkContext;
}, implicitRelative, true),
matchAnyContext = addCombinator(function (elem) {
return indexOf(checkContext, elem) > -1;
}, implicitRelative, true),
matchers = [function (elem, context, xml) {
var ret = !leadingRelative && (xml || context !== outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml)); // Avoid hanging onto element (issue #299)
checkContext = null;
return ret;
}];
for (; i < len; i++) {
if (matcher = Expr.relative[tokens[i].type]) {
matchers = [addCombinator(elementMatcher(matchers), matcher)];
} else {
matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches); // Return special upon seeing a positional matcher
if (matcher[expando]) {
// Find the next relative operator (if any) for proper handling
j = ++i;
for (; j < len; j++) {
if (Expr.relative[tokens[j].type]) {
break;
}
}
return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector( // If the preceding token was a descendant combinator, insert an implicit any-element `*`
tokens.slice(0, i - 1).concat({
value: tokens[i - 2].type === " " ? "*" : ""
})).replace(rtrim, "$1"), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens(tokens = tokens.slice(j)), j < len && toSelector(tokens));
}
matchers.push(matcher);
}
}
return elementMatcher(matchers);
}
function matcherFromGroupMatchers(elementMatchers, setMatchers) {
var bySet = setMatchers.length > 0,
byElement = elementMatchers.length > 0,
superMatcher = function superMatcher(seed, context, xml, results, outermost) {
var elem,
j,
matcher,
matchedCount = 0,
i = "0",
unmatched = seed && [],
setMatched = [],
contextBackup = outermostContext,
// We must always have either seed elements or outermost context
elems = seed || byElement && Expr.find["TAG"]("*", outermost),
// Use integer dirruns iff this is the outermost matcher
dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1,
len = elems.length;
if (outermost) {
outermostContext = context === document || context || outermost;
} // Add elements passing elementMatchers directly to results
// Support: IE<9, Safari
// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
for (; i !== len && (elem = elems[i]) != null; i++) {
if (byElement && elem) {
j = 0;
if (!context && elem.ownerDocument !== document) {
setDocument(elem);
xml = !documentIsHTML;
}
while (matcher = elementMatchers[j++]) {
if (matcher(elem, context || document, xml)) {
results.push(elem);
break;
}
}
if (outermost) {
dirruns = dirrunsUnique;
}
} // Track unmatched elements for set filters
if (bySet) {
// They will have gone through all possible matchers
if (elem = !matcher && elem) {
matchedCount--;
} // Lengthen the array for every element, matched or not
if (seed) {
unmatched.push(elem);
}
}
} // `i` is now the count of elements visited above, and adding it to `matchedCount`
// makes the latter nonnegative.
matchedCount += i; // Apply set filters to unmatched elements
// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
// equals `i`), unless we didn't visit _any_ elements in the above loop because we have
// no element matchers and no seed.
// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
// case, which will result in a "00" `matchedCount` that differs from `i` but is also
// numerically zero.
if (bySet && i !== matchedCount) {
j = 0;
while (matcher = setMatchers[j++]) {
matcher(unmatched, setMatched, context, xml);
}
if (seed) {
// Reintegrate element matches to eliminate the need for sorting
if (matchedCount > 0) {
while (i--) {
if (!(unmatched[i] || setMatched[i])) {
setMatched[i] = pop.call(results);
}
}
} // Discard index placeholder values to get only actual matches
setMatched = condense(setMatched);
} // Add matches to results
push.apply(results, setMatched); // Seedless set matches succeeding multiple successful matchers stipulate sorting
if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) {
Sizzle.uniqueSort(results);
}
} // Override manipulation of globals by nested matchers
if (outermost) {
dirruns = dirrunsUnique;
outermostContext = contextBackup;
}
return unmatched;
};
return bySet ? markFunction(superMatcher) : superMatcher;
}
compile = Sizzle.compile = function (selector, match
/* Internal Use Only */
) {
var i,
setMatchers = [],
elementMatchers = [],
cached = compilerCache[selector + " "];
if (!cached) {
// Generate a function of recursive functions that can be used to check each element
if (!match) {
match = tokenize(selector);
}
i = match.length;
while (i--) {
cached = matcherFromTokens(match[i]);
if (cached[expando]) {
setMatchers.push(cached);
} else {
elementMatchers.push(cached);
}
} // Cache the compiled function
cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers)); // Save selector and tokenization
cached.selector = selector;
}
return cached;
};
/**
* A low-level selection function that works with Sizzle's compiled
* selector functions
* @param {String|Function} selector A selector or a pre-compiled
* selector function built with Sizzle.compile
* @param {Element} context
* @param {Array} [results]
* @param {Array} [seed] A set of elements to match against
*/
select = Sizzle.select = function (selector, context, results, seed) {
var i,
tokens,
token,
type,
find,
compiled = typeof selector === "function" && selector,
match = !seed && tokenize(selector = compiled.selector || selector);
results = results || []; // Try to minimize operations if there is only one selector in the list and no seed
// (the latter of which guarantees us context)
if (match.length === 1) {
// Reduce context if the leading compound selector is an ID
tokens = match[0] = match[0].slice(0);
if (tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) {
context = (Expr.find["ID"](token.matches[0].replace(runescape, funescape), context) || [])[0];
if (!context) {
return results; // Precompiled matchers will still verify ancestry, so step up a level
} else if (compiled) {
context = context.parentNode;
}
selector = selector.slice(tokens.shift().value.length);
} // Fetch a seed set for right-to-left matching
i = matchExpr["needsContext"].test(selector) ? 0 : tokens.length;
while (i--) {
token = tokens[i]; // Abort if we hit a combinator
if (Expr.relative[type = token.type]) {
break;
}
if (find = Expr.find[type]) {
// Search, expanding context for leading sibling combinators
if (seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && testContext(context.parentNode) || context)) {
// If seed is empty or no tokens remain, we can return early
tokens.splice(i, 1);
selector = seed.length && toSelector(tokens);
if (!selector) {
push.apply(results, seed);
return results;
}
break;
}
}
}
} // Compile and execute a filtering function if one is not provided
// Provide `match` to avoid retokenization if we modified the selector above
(compiled || compile(selector, match))(seed, context, !documentIsHTML, results, !context || rsibling.test(selector) && testContext(context.parentNode) || context);
return results;
}; // One-time assignments
// Sort stability
support.sortStable = expando.split("").sort(sortOrder).join("") === expando; // Support: Chrome 14-35+
// Always assume duplicates if they aren't passed to the comparison function
support.detectDuplicates = !!hasDuplicate; // Initialize against the default document
setDocument(); // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
// Detached nodes confoundingly follow *each other*
support.sortDetached = assert(function (el) {
// Should return 1, but returns 4 (following)
return el.compareDocumentPosition(document.createElement("fieldset")) & 1;
}); // Support: IE<8
// Prevent attribute/property "interpolation"
// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
if (!assert(function (el) {
el.innerHTML = AGPolicy.createHTML("<a href='#'></a>");
return el.firstChild.getAttribute("href") === "#";
})) {
addHandle("type|href|height|width", function (elem, name, isXML) {
if (!isXML) {
return elem.getAttribute(name, name.toLowerCase() === "type" ? 1 : 2);
}
});
} // Support: IE<9
// Use defaultValue in place of getAttribute("value")
if (!support.attributes || !assert(function (el) {
el.innerHTML = AGPolicy.createHTML("<input/>");
el.firstChild.setAttribute("value", "");
return el.firstChild.getAttribute("value") === "";
})) {
addHandle("value", function (elem, name, isXML) {
if (!isXML && elem.nodeName.toLowerCase() === "input") {
return elem.defaultValue;
}
});
} // Support: IE<9
// Use getAttributeNode to fetch booleans when getAttribute lies
if (!assert(function (el) {
return el.getAttribute("disabled") == null;
})) {
addHandle(booleans, function (elem, name, isXML) {
var val;
if (!isXML) {
return elem[name] === true ? name.toLowerCase() : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
}
});
} // EXPOSE
// Do not expose Sizzle to the global scope in the case of AdGuard ExtendedCss build
return Sizzle; // EXPOSE
}(window); //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
}
return Sizzle;
};
/* jshint ignore:end */
/**
* Copyright 2016 Adguard Software Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Class that extends Sizzle and adds support for "matches-css" pseudo element.
*/
var StylePropertyMatcher = function (window) {
var isPhantom = !!window._phantom;
var useFallback = isPhantom && !!window.getMatchedCSSRules;
/**
* Unquotes specified value
* Webkit-based browsers singlequotes <string> content property values
* Other browsers doublequotes content property values.
*/
var removeContentQuotes = function removeContentQuotes(value) {
if (typeof value === 'string') {
return value.replace(/^(["'])([\s\S]*)\1$/, '$2');
}
return value;
};
var getComputedStyle = window.getComputedStyle.bind(window);
var getMatchedCSSRules = useFallback ? window.getMatchedCSSRules.bind(window) : null;
/**
* There is an issue in browsers based on old webkit:
* getComputedStyle(el, ":before") is empty if element is not visible.
*
* To circumvent this issue we use getMatchedCSSRules instead.
*
* It appears that getMatchedCSSRules sorts the CSS rules
* in increasing order of specifities of corresponding selectors.
* We pick the css rule that is being applied to an element based on this assumption.
*
* @param element DOM node
* @param pseudoElement Optional pseudoElement name
* @param propertyName CSS property name
*/
var getComputedStylePropertyValue = function getComputedStylePropertyValue(element, pseudoElement, propertyName) {
var value = '';
if (useFallback && pseudoElement) {
var cssRules = getMatchedCSSRules(element, pseudoElement) || [];
var i = cssRules.length;
while (i-- > 0 && !value) {
value = cssRules[i].style.getPropertyValue(propertyName);
}
} else {
var style = getComputedStyle(element, pseudoElement);
if (style) {
value = style.getPropertyValue(propertyName); // https://bugs.webkit.org/show_bug.cgi?id=93445
if (propertyName === 'opacity' && utils.isSafariBrowser) {
value = (Math.round(parseFloat(value) * 100) / 100).toString();
}
}
}
if (propertyName === 'content') {
value = removeContentQuotes(value);
}
return value;
};
/**
* Adds url parameter quotes for non-regex pattern
* @param {string} pattern
*/
var addUrlQuotes = function addUrlQuotes(pattern) {
// for regex patterns
if (pattern[0] === '/' && pattern[pattern.length - 1] === '/' && pattern.indexOf('\\"') < 10) {
// e.g. /^url\\([a-z]{4}:[a-z]{5}/
// or /^url\\(data\\:\\image\\/gif;base64.+/
var re = /(\^)?url(\\)?\\\((\w|\[\w)/g;
return pattern.replace(re, '$1url$2\\\(\\"?$3');
} // for non-regex patterns
if (pattern.indexOf('url("') === -1) {
var _re = /url\((.*?)\)/g;
return pattern.replace(_re, 'url("$1")');
}
return pattern;
};
/**
* Class that matches element style against the specified expression
* @member {string} propertyName
* @member {string} pseudoElement
* @member {RegExp} regex
*/
var Matcher = function Matcher(propertyFilter, pseudoElement) {
this.pseudoElement = pseudoElement;
try {
var index = propertyFilter.indexOf(':');
this.propertyName = propertyFilter.substring(0, index).trim();
var pattern = propertyFilter.substring(index + 1).trim();
pattern = addUrlQuotes(pattern); // Unescaping pattern
// For non-regex patterns, (,),[,] should be unescaped, because we require escaping them in filter rules.
// For regex patterns, ",\ should be escaped, because we manually escape those in extended-css-selector.js.
if (/^\/.*\/$/.test(pattern)) {
pattern = pattern.slice(1, -1);
this.regex = utils.pseudoArgToRegex(pattern);
} else {
pattern = pattern.replace(/\\([\\()[\]"])/g, '$1');
this.regex = utils.createURLRegex(pattern);
}
} catch (ex) {
utils.logError("StylePropertyMatcher: invalid match string ".concat(propertyFilter));
}
};
/**
* Function to check if element CSS property matches filter pattern
* @param {Element} element to check
*/
Matcher.prototype.matches = function (element) {
if (!this.regex || !this.propertyName) {
return false;
}
var value = getComputedStylePropertyValue(element, this.pseudoElement, this.propertyName);
return value && this.regex.test(value);
};
/**
* Creates a new pseudo-class and registers it in Sizzle
*/
var extendSizzle = function extendSizzle(sizzle) {
// First of all we should prepare Sizzle engine
sizzle.selectors.pseudos['matches-css'] = sizzle.selectors.createPseudo(function (propertyFilter) {
var matcher = new Matcher(propertyFilter);
return function (element) {
return matcher.matches(element);
};
});
sizzle.selectors.pseudos['matches-css-before'] = sizzle.selectors.createPseudo(function (propertyFilter) {
var matcher = new Matcher(propertyFilter, ':before');
return function (element) {
return matcher.matches(element);
};
});
sizzle.selectors.pseudos['matches-css-after'] = sizzle.selectors.createPseudo(function (propertyFilter) {
var matcher = new Matcher(propertyFilter, ':after');
return function (element) {
return matcher.matches(element);
};
});
}; // EXPOSE
return {
extendSizzle: extendSizzle
};
}(window);
/**
* Copyright 2016 Adguard Software Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var matcherUtils = {};
matcherUtils.MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
/**
* Parses argument of matcher pseudo (for matches-attr and matches-property)
* @param {string} matcherFilter argument of pseudo class
* @returns {Array}
*/
matcherUtils.parseMatcherFilter = function (matcherFilter) {
var FULL_MATCH_MARKER = '"="';
var rawArgs = [];
if (matcherFilter.indexOf(FULL_MATCH_MARKER) === -1) {
// if there is only one pseudo arg
// e.g. :matches-attr("data-name") or :matches-property("inner.prop")
// Sizzle will parse it and get rid of quotes
// so it might be valid arg already without them
rawArgs.push(matcherFilter);
} else {
matcherFilter.split('=').forEach(function (arg) {
if (arg[0] === '"' && arg[arg.length - 1] === '"') {
rawArgs.push(arg.slice(1, -1));
}
});
}
return rawArgs;
};
/**
* @typedef {Object} ArgData
* @property {string} arg
* @property {boolean} isRegexp
*/
/**
* Parses raw matcher arg
* @param {string} rawArg
* @returns {ArgData}
*/
matcherUtils.parseRawMatcherArg = function (rawArg) {
var arg = rawArg;
var isRegexp = !!rawArg && rawArg[0] === '/' && rawArg[rawArg.length - 1] === '/';
if (isRegexp) {
// to avoid at least such case — :matches-property("//")
if (rawArg.length > 2) {
arg = utils.toRegExp(rawArg);
} else {
throw new Error("Invalid regexp: ".concat(rawArg));
}
}
return {
arg: arg,
isRegexp: isRegexp
};
};
/**
* @typedef Chain
* @property {Object} base
* @property {string} prop
* @property {string} value
*/
/**
* Checks if the property exists in the base object (recursively).
* @param {Object} base
* @param {ArgData[]} chain array of objects - parsed string property chain
* @param {Array} [output=[]] result acc
* @returns {Chain[]} array of objects
*/
matcherUtils.filterRootsByRegexpChain = function (base, chain) {
var output = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
var tempProp = chain[0];
if (chain.length === 1) {
// eslint-disable-next-line no-restricted-syntax
for (var key in base) {
if (tempProp.isRegexp) {
if (tempProp.arg.test(key)) {
output.push({
base: base,
prop: key,
value: base[key]
});
}
} else if (tempProp.arg === key) {
output.push({
base: base,
prop: tempProp.arg,
value: base[key]
});
}
}
return output;
} // if there is a regexp prop in input chain
// e.g. 'unit./^ad.+/.src' for 'unit.ad-1gf2.src unit.ad-fgd34.src'),
// every base keys should be tested by regexp and it can be more that one results
if (tempProp.isRegexp) {
var nextProp = chain.slice(1);
var baseKeys = []; // eslint-disable-next-line no-restricted-syntax
for (var _key in base) {
if (tempProp.arg.test(_key)) {
baseKeys.push(_key);
}
}
baseKeys.forEach(function (key) {
var item = base[key];
matcherUtils.filterRootsByRegexpChain(item, nextProp, output);
});
} // avoid TypeError while accessing to null-prop's child
if (base === null) {
return;
}
var nextBase = base[tempProp.arg];
chain = chain.slice(1);
if (nextBase !== undefined) {
matcherUtils.filterRootsByRegexpChain(nextBase, chain, output);
}
return output;
};
/**
* Validates parsed args of matches-property pseudo
* @param {...ArgData} args
*/
matcherUtils.validatePropMatcherArgs = function () {
for (var _len = arguments.length, args = new Array(_len), _key2 = 0; _key2 < _len; _key2++) {
args[_key2] = arguments[_key2];
}
for (var i = 0; i < args.length; i += 1) {
if (args[i].isRegexp) {
if (!utils.startsWith(args[i].arg.toString(), '/') || !utils.endsWith(args[i].arg.toString(), '/')) {
return false;
} // simple arg check if it is not a regexp
} else if (!/^[\w-]+$/.test(args[i].arg)) {
return false;
}
}
return true;
};
/**
* Class that extends Sizzle and adds support for "matches-attr" pseudo element.
*/
var AttributesMatcher = function () {
/**
* Class that matches element attributes against the specified expressions
* @param {ArgData} nameArg - parsed name argument
* @param {ArgData} valueArg - parsed value argument
* @param {string} pseudoElement
* @constructor
*
* @member {string|RegExp} attrName
* @member {boolean} isRegexpName
* @member {string|RegExp} attrValue
* @member {boolean} isRegexpValue
*/
var AttrMatcher = function AttrMatcher(nameArg, valueArg, pseudoElement) {
this.pseudoElement = pseudoElement;
this.attrName = nameArg.arg;
this.isRegexpName = nameArg.isRegexp;
this.attrValue = valueArg.arg;
this.isRegexpValue = valueArg.isRegexp;
};
/**
* Function to check if element attributes matches filter pattern
* @param {Element} element to check
*/
AttrMatcher.prototype.matches = function (element) {
var elAttrs = element.attributes;
if (elAttrs.length === 0 || !this.attrName) {
return false;
}
var i = 0;
while (i < elAttrs.length) {
var attr = elAttrs[i];
var matched = false;
var attrNameMatched = this.isRegexpName ? this.attrName.test(attr.name) : this.attrName === attr.name;
if (!this.attrValue) {
// for :matches-attr("/regex/") or :matches-attr("attr-name")
matched = attrNameMatched;
} else {
var attrValueMatched = this.isRegexpValue ? this.attrValue.test(attr.value) : this.attrValue === attr.value;
matched = attrNameMatched && attrValueMatched;
}
if (matched) {
return true;
}
i += 1;
}
};
/**
* Creates a new pseudo-class and registers it in Sizzle
*/
var extendSizzle = function extendSizzle(sizzle) {
// First of all we should prepare Sizzle engine
sizzle.selectors.pseudos['matches-attr'] = sizzle.selectors.createPseudo(function (attrFilter) {
var _matcherUtils$parseMa = matcherUtils.parseMatcherFilter(attrFilter),
_matcherUtils$parseMa2 = _slicedToArray(_matcherUtils$parseMa, 2),
rawName = _matcherUtils$parseMa2[0],
rawValue = _matcherUtils$parseMa2[1];
var nameArg = matcherUtils.parseRawMatcherArg(rawName);
var valueArg = matcherUtils.parseRawMatcherArg(rawValue);
if (!attrFilter || !matcherUtils.validatePropMatcherArgs(nameArg, valueArg)) {
throw new Error("Invalid argument of :matches-attr pseudo class: ".concat(attrFilter));
}
var matcher = new AttrMatcher(nameArg, valueArg);
return function (element) {
return matcher.matches(element);
};
});
}; // EXPOSE
return {
extendSizzle: extendSizzle
};
}();
/**
* Parses raw property arg
* @param {string} input
* @returns {ArgData[]} array of objects
*/
var parseRawPropChain = function parseRawPropChain(input) {
var PROPS_DIVIDER = '.';
var REGEXP_MARKER = '/';
var propsArr = [];
var str = input;
while (str.length > 0) {
if (utils.startsWith(str, PROPS_DIVIDER)) {
// for cases like '.prop.id' and 'nested..test'
throw new Error("Invalid chain property: ".concat(input));
}
if (!utils.startsWith(str, REGEXP_MARKER)) {
var isRegexp = false;
var dividerIndex = str.indexOf(PROPS_DIVIDER);
if (str.indexOf(PROPS_DIVIDER) === -1) {
// if there is no '.' left in str
// take the rest of str as prop
propsArr.push({
arg: str,
isRegexp: isRegexp
});
return propsArr;
} // else take prop from str
var prop = str.slice(0, dividerIndex); // for cases like 'asadf.?+/.test'
if (prop.indexOf(REGEXP_MARKER) > -1) {
// prop is '?+/'
throw new Error("Invalid chain property: ".concat(prop));
}
propsArr.push({
arg: prop,
isRegexp: isRegexp
}); // delete prop from str
str = str.slice(dividerIndex);
} else {
// deal with regexp
var propChunks = [];
propChunks.push(str.slice(0, 1)); // if str starts with '/', delete it from str and find closing regexp slash.
// note that chained property name can not include '/' or '.'
// so there is no checking for escaped characters
str = str.slice(1);
var regexEndIndex = str.indexOf(REGEXP_MARKER);
if (regexEndIndex < 1) {
// regexp should be at least === '/./'
// so we should avoid args like '/id' and 'test.//.id'
throw new Error("Invalid regexp: ".concat(REGEXP_MARKER).concat(str));
}
var _isRegexp = true; // take the rest regexp part
propChunks.push(str.slice(0, regexEndIndex + 1));
var _prop = utils.toRegExp(propChunks.join(''));
propsArr.push({
arg: _prop,
isRegexp: _isRegexp
}); // delete prop from str
str = str.slice(regexEndIndex + 1);
}
if (!str) {
return propsArr;
} // str should be like '.nextProp' now
// so 'zx.prop' or '.' is invalid
if (!utils.startsWith(str, PROPS_DIVIDER) || utils.startsWith(str, PROPS_DIVIDER) && str.length === 1) {
throw new Error("Invalid chain property: ".concat(input));
}
str = str.slice(1);
}
};
var convertTypeFromStr = function convertTypeFromStr(value) {
var numValue = Number(value);
var output;
if (!Number.isNaN(numValue)) {
output = numValue;
} else {
switch (value) {
case 'undefined':
output = undefined;
break;
case 'null':
output = null;
break;
case 'true':
output = true;
break;
case 'false':
output = false;
break;
default:
output = value;
}
}
return output;
};
var convertTypeIntoStr = function convertTypeIntoStr(value) {
var output;
switch (value) {
case undefined:
output = 'undefined';
break;
case null:
output = 'null';
break;
default:
output = value.toString();
}
return output;
};
/**
* Class that extends Sizzle and adds support for "matches-property" pseudo element.
*/
var ElementPropertyMatcher = function () {
/**
* Class that matches element properties against the specified expressions
* @param {ArgData[]} propsChainArg - array of parsed props chain objects
* @param {ArgData} valueArg - parsed value argument
* @param {string} pseudoElement
* @constructor
*
* @member {Array} chainedProps
* @member {boolean} isRegexpName
* @member {string|RegExp} propValue
* @member {boolean} isRegexpValue
*/
var PropMatcher = function PropMatcher(propsChainArg, valueArg, pseudoElement) {
this.pseudoElement = pseudoElement;
this.chainedProps = propsChainArg;
this.propValue = valueArg.arg;
this.isRegexpValue = valueArg.isRegexp;
};
/**
* Function to check if element properties matches filter pattern
* @param {Element} element to check
*/
PropMatcher.prototype.matches = function (element) {
var ownerObjArr = matcherUtils.filterRootsByRegexpChain(element, this.chainedProps);
if (ownerObjArr.length === 0) {
return false;
}
var matched = true;
if (this.propValue) {
for (var i = 0; i < ownerObjArr.length; i += 1) {
var realValue = ownerObjArr[i].value;
if (this.isRegexpValue) {
matched = this.propValue.test(convertTypeIntoStr(realValue));
} else {
// handle 'null' and 'undefined' property values set as string
if (realValue === 'null' || realValue === 'undefined') {
matched = this.propValue === realValue;
break;
}
matched = convertTypeFromStr(this.propValue) === realValue;
}
if (matched) {
break;
}
}
}
return matched;
};
/**
* Creates a new pseudo-class and registers it in Sizzle
*/
var extendSizzle = function extendSizzle(sizzle) {
// First of all we should prepare Sizzle engine
sizzle.selectors.pseudos['matches-property'] = sizzle.selectors.createPseudo(function (propertyFilter) {
if (!propertyFilter) {
throw new Error('No argument is given for :matches-property pseudo class');
}
var _matcherUtils$parseMa = matcherUtils.parseMatcherFilter(propertyFilter),
_matcherUtils$parseMa2 = _slicedToArray(_matcherUtils$parseMa, 2),
rawProp = _matcherUtils$parseMa2[0],
rawValue = _matcherUtils$parseMa2[1]; // chained property name can not include '/' or '.'
// so regex prop names with such escaped characters are invalid
if (rawProp.indexOf('\\/') > -1 || rawProp.indexOf('\\.') > -1) {
throw new Error("Invalid property name: ".concat(rawProp));
}
var propsChainArg = parseRawPropChain(rawProp);
var valueArg = matcherUtils.parseRawMatcherArg(rawValue);
var propsToValidate = [].concat(_toConsumableArray(propsChainArg), [valueArg]);
if (!matcherUtils.validatePropMatcherArgs(propsToValidate)) {
throw new Error("Invalid argument of :matches-property pseudo class: ".concat(propertyFilter));
}
var matcher = new PropMatcher(propsChainArg, valueArg);
return function (element) {
return matcher.matches(element);
};
});
}; // EXPOSE
return {
extendSizzle: extendSizzle
};
}();
/**
* Copyright 2020 Adguard Software Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Class that extends Sizzle and adds support for :is() pseudo element.
*/
var IsAnyMatcher = function () {
/**
* Class that matches element by one of the selectors
* https://developer.mozilla.org/en-US/docs/Web/CSS/:is
* @param {Array} selectors
* @param {string} pseudoElement
* @constructor
*/
var IsMatcher = function IsMatcher(selectors, pseudoElement) {
this.selectors = selectors;
this.pseudoElement = pseudoElement;
};
/**
* Function to check if element can be matched by any passed selector
* @param {Element} element to check
*/
IsMatcher.prototype.matches = function (element) {
var isMatched = !!this.selectors.find(function (selector) {
var nodes = document.querySelectorAll(selector);
return Array.from(nodes).find(function (node) {
return node === element;
});
});
return isMatched;
};
/**
* Creates a new pseudo-class and registers it in Sizzle
*/
var extendSizzle = function extendSizzle(sizzle) {
// First of all we should prepare Sizzle engine
sizzle.selectors.pseudos['is'] = sizzle.selectors.createPseudo(function (input) {
if (input === '') {
throw new Error("Invalid argument of :is pseudo-class: ".concat(input));
}
var selectors = input.split(',').map(function (s) {
return s.trim();
}); // collect valid selectors and log about invalid ones
var validSelectors = selectors.reduce(function (acc, selector) {
if (cssUtils.isSimpleSelectorValid(selector)) {
acc.push(selector);
} else {
utils.logInfo("Invalid selector passed to :is() pseudo-class: '".concat(selector, "'"));
}
return acc;
}, []);
var matcher = new IsMatcher(validSelectors);
return function (element) {
return matcher.matches(element);
};
});
};
return {
extendSizzle: extendSizzle
};
}();
/**
* Copyright 2021 Adguard Software Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Extended selector factory module, for creating extended selector classes.
*
* Extended selection capabilities description:
* https://github.com/AdguardTeam/ExtendedCss/blob/master/README.md
*/
var ExtendedSelectorFactory = function () {
// while adding new markers, constants in other AdGuard repos should be corrected
// AdGuard browser extension : CssFilterRule.SUPPORTED_PSEUDO_CLASSES and CssFilterRule.EXTENDED_CSS_MARKERS
// tsurlfilter, SafariConverterLib : EXT_CSS_PSEUDO_INDICATORS
var PSEUDO_EXTENSIONS_MARKERS = [':has', ':contains', ':has-text', ':matches-css', ':-abp-has', ':-abp-has-text', ':if', ':if-not', ':xpath', ':nth-ancestor', ':upward', ':remove', ':matches-attr', ':matches-property', ':-abp-contains', ':is'];
var initialized = false;
var Sizzle;
/**
* Lazy initialization of the ExtendedSelectorFactory and objects that might be necessary for creating and applying styles.
* This method extends Sizzle engine that we use under the hood with our custom pseudo-classes.
*/
function initialize() {
if (initialized) {
return;
}
initialized = true; // Our version of Sizzle is initialized lazily as well
Sizzle = initializeSizzle(); // Add :matches-css-*() support
StylePropertyMatcher.extendSizzle(Sizzle); // Add :matches-attr() support
AttributesMatcher.extendSizzle(Sizzle); // Add :matches-property() support
ElementPropertyMatcher.extendSizzle(Sizzle); // Add :is() support
IsAnyMatcher.extendSizzle(Sizzle); // Add :contains, :has-text, :-abp-contains support
var containsPseudo = Sizzle.selectors.createPseudo(function (text) {
if (/^\s*\/.*\/[gmisuy]*\s*$/.test(text)) {
text = text.trim();
var flagsIndex = text.lastIndexOf('/');
var flags = text.substring(flagsIndex + 1);
text = text.substr(0, flagsIndex + 1).slice(1, -1).replace(/\\([\\"])/g, '$1');
var regex;
try {
regex = new RegExp(text, flags);
} catch (e) {
throw new Error("Invalid argument of :contains pseudo class: ".concat(text));
}
return function (elem) {
var elemTextContent = utils.nodeTextContentGetter.apply(elem);
return regex.test(elemTextContent);
};
}
text = text.replace(/\\([\\()[\]"])/g, '$1');
return function (elem) {
var elemTextContent = utils.nodeTextContentGetter.apply(elem);
return elemTextContent.indexOf(text) > -1;
};
});
Sizzle.selectors.pseudos['contains'] = containsPseudo;
Sizzle.selectors.pseudos['has-text'] = containsPseudo;
Sizzle.selectors.pseudos['-abp-contains'] = containsPseudo; // Add :if, :-abp-has support
Sizzle.selectors.pseudos['if'] = Sizzle.selectors.pseudos['has'];
Sizzle.selectors.pseudos['-abp-has'] = Sizzle.selectors.pseudos['has']; // Add :if-not support
Sizzle.selectors.pseudos['if-not'] = Sizzle.selectors.createPseudo(function (selector) {
if (typeof selector === 'string') {
Sizzle.compile(selector);
}
return function (elem) {
return Sizzle(selector, elem).length === 0;
};
});
registerParserOnlyTokens();
}
/**
* Registrate custom tokens for parser.
* Needed for proper work of pseudos:
* for checking if the token is last and pseudo-class arguments validation
*/
function registerParserOnlyTokens() {
Sizzle.selectors.pseudos['xpath'] = Sizzle.selectors.createPseudo(function (selector) {
try {
document.createExpression(selector, null);
} catch (e) {
throw new Error("Invalid argument of :xpath pseudo class: ".concat(selector));
}
return function () {
return true;
};
});
Sizzle.selectors.pseudos['nth-ancestor'] = Sizzle.selectors.createPseudo(function (selector) {
var deep = Number(selector);
if (Number.isNaN(deep) || deep < 1 || deep >= 256) {
throw new Error("Invalid argument of :nth-ancestor pseudo class: ".concat(selector));
}
return function () {
return true;
};
});
Sizzle.selectors.pseudos['upward'] = Sizzle.selectors.createPseudo(function (input) {
if (input === '') {
throw new Error("Invalid argument of :upward pseudo class: ".concat(input));
} else if (Number.isInteger(+input) && (+input < 1 || +input >= 256)) {
throw new Error("Invalid argument of :upward pseudo class: ".concat(input));
}
return function () {
return true;
};
});
Sizzle.selectors.pseudos['remove'] = Sizzle.selectors.createPseudo(function (input) {
if (input !== '') {
throw new Error("Invalid argument of :remove pseudo class: ".concat(input));
}
return function () {
return true;
};
});
}
/**
* Checks if specified token can be used by document.querySelectorAll.
*/
function isSimpleToken(token) {
var type = token.type;
if (type === 'ID' || type === 'CLASS' || type === 'ATTR' || type === 'TAG' || type === 'CHILD') {
// known simple tokens
return true;
}
if (type === 'PSEUDO') {
// check if value contains any of extended pseudo classes
var i = PSEUDO_EXTENSIONS_MARKERS.length;
while (i--) {
if (token.value.indexOf(PSEUDO_EXTENSIONS_MARKERS[i]) >= 0) {
return false;
}
}
return true;
} // all others aren't simple
return false;
}
/**
* Checks if specified token is a combinator
*/
function isRelationToken(token) {
var type = token.type;
return type === ' ' || type === '>' || type === '+' || type === '~';
}
/**
* ExtendedSelectorParser is a helper class for creating various selector instances which
* all shares a method `querySelectorAll()` and `matches()` implementing different search strategies
* depending on a type of selector.
*
* Currently, there are 3 types:
* A trait-less extended selector
* - we directly feed selector strings to Sizzle.
* A splitted extended selector
* - such as #container #feedItem:has(.ads), where it is splitted to `#container` and `#feedItem:has(.ads)`.
*/
function ExtendedSelectorParser(selectorText, tokens, debug) {
initialize();
if (typeof tokens === 'undefined') {
this.selectorText = cssUtils.normalize(selectorText); // Passing `returnUnsorted` in order to receive tokens in the order that's valid for the browser
// In Sizzle internally, the tokens are re-sorted: https://github.com/AdguardTeam/ExtendedCss/issues/55
this.tokens = Sizzle.tokenize(this.selectorText, false, {
returnUnsorted: true
});
} else {
this.selectorText = selectorText;
this.tokens = tokens;
}
if (debug === true) {
this.debug = true;
}
}
ExtendedSelectorParser.prototype = {
/**
* The main method, creates a selector instance depending on the type of a selector.
* @public
*/
createSelector: function createSelector() {
var debug = this.debug;
var tokens = this.tokens;
var selectorText = this.selectorText;
if (tokens.length !== 1) {
// Comma-separate selector - can't optimize further
return new TraitLessSelector(selectorText, debug);
}
var xpathPart = this.getXpathPart();
if (typeof xpathPart !== 'undefined') {
return new XpathSelector(selectorText, xpathPart, debug);
}
var upwardPart = this.getUpwardPart();
if (typeof upwardPart !== 'undefined') {
var output;
var upwardDeep = parseInt(upwardPart, 10); // if upward parameter is not a number, we consider it as a selector
if (Number.isNaN(upwardDeep)) {
output = new UpwardSelector(selectorText, upwardPart, debug);
} else {
// upward works like nth-ancestor
var xpath = this.convertNthAncestorToken(upwardDeep);
output = new XpathSelector(selectorText, xpath, debug);
}
return output;
} // argument of pseudo-class remove;
// it's defined only if remove is parsed as last token
// and it's valid only if remove arg is empty string
var removePart = this.getRemovePart();
if (typeof removePart !== 'undefined') {
var hasValidRemovePart = removePart === '';
return new RemoveSelector(selectorText, hasValidRemovePart, debug);
}
tokens = tokens[0];
var l = tokens.length;
var lastRelTokenInd = this.getSplitPoint();
if (typeof lastRelTokenInd === 'undefined') {
try {
document.querySelector(selectorText);
} catch (e) {
return new TraitLessSelector(selectorText, debug);
}
return new NotAnExtendedSelector(selectorText, debug);
}
var simple = '';
var relation = null;
var complex = '';
var i = 0;
for (; i < lastRelTokenInd; i++) {
// build simple part
simple += tokens[i].value;
}
if (i > 0) {
// build relation part
relation = tokens[i++].type;
} // i is pointing to the start of a complex part.
for (; i < l; i++) {
complex += tokens[i].value;
}
return lastRelTokenInd === -1 ? new TraitLessSelector(selectorText, debug) : new SplittedSelector(selectorText, simple, relation, complex, debug);
},
/**
* @private
* @return {number|undefined} An index of a token that is split point.
* returns undefined if the selector does not contain any complex tokens
* or it is not eligible for splitting.
* Otherwise returns an integer indicating the index of the last relation token.
*/
getSplitPoint: function getSplitPoint() {
var tokens = this.tokens[0]; // We split selector only when the last compound selector
// is the only extended selector.
var latestRelationTokenIndex = -1;
var haveMetComplexToken = false;
for (var i = 0, l = tokens.length; i < l; i++) {
var token = tokens[i];
if (isRelationToken(token)) {
if (haveMetComplexToken) {
return;
}
latestRelationTokenIndex = i;
} else if (!isSimpleToken(token)) {
haveMetComplexToken = true;
}
}
if (!haveMetComplexToken) {
return;
}
return latestRelationTokenIndex;
},
/**
* @private
* @return {string|undefined} xpath selector part if exists
* returns undefined if the selector does not contain xpath tokens
*/
getXpathPart: function getXpathPart() {
var tokens = this.tokens[0];
for (var i = 0, tokensLength = tokens.length; i < tokensLength; i++) {
var token = tokens[i];
if (token.type === 'PSEUDO') {
var matches = token.matches;
if (matches && matches.length > 1) {
if (matches[0] === 'xpath') {
if (this.isLastToken(tokens, i)) {
throw new Error('Invalid pseudo: \':xpath\' should be at the end of the selector');
}
return matches[1];
}
if (matches[0] === 'nth-ancestor') {
if (this.isLastToken(tokens, i)) {
throw new Error('Invalid pseudo: \':nth-ancestor\' should be at the end of the selector');
}
var deep = matches[1];
if (deep > 0 && deep < 256) {
return this.convertNthAncestorToken(deep);
}
}
}
}
}
},
/**
* converts nth-ancestor/upward deep value to xpath equivalent
* @param {number} deep
* @return {string}
*/
convertNthAncestorToken: function convertNthAncestorToken(deep) {
var result = '..';
while (deep > 1) {
result += '/..';
deep--;
}
return result;
},
/**
* Checks if the token is last,
* except of remove pseudo-class
* @param {Array} tokens
* @param {number} i index of token
* @returns {boolean}
*/
isLastToken: function isLastToken(tokens, i) {
// check id the next parsed token is remove pseudo
var isNextRemoveToken = tokens[i + 1] && tokens[i + 1].type === 'PSEUDO' && tokens[i + 1].matches && tokens[i + 1].matches[0] === 'remove'; // check if the token is last
// and if it is not check if it is remove one
// which should be skipped
return i + 1 !== tokens.length && !isNextRemoveToken;
},
/**
* @private
* @return {string|undefined} upward parameter
* or undefined if the input does not contain upward tokens
*/
getUpwardPart: function getUpwardPart() {
var tokens = this.tokens[0];
for (var i = 0, tokensLength = tokens.length; i < tokensLength; i++) {
var token = tokens[i];
if (token.type === 'PSEUDO') {
var matches = token.matches;
if (matches && matches.length > 1) {
if (matches[0] === 'upward') {
if (this.isLastToken(tokens, i)) {
throw new Error('Invalid pseudo: \':upward\' should be at the end of the selector');
}
return matches[1];
}
}
}
}
},
/**
* @private
* @return {string|undefined} remove parameter
* or undefined if the input does not contain remove tokens
*/
getRemovePart: function getRemovePart() {
var tokens = this.tokens[0];
for (var i = 0, tokensLength = tokens.length; i < tokensLength; i++) {
var token = tokens[i];
if (token.type === 'PSEUDO') {
var matches = token.matches;
if (matches && matches.length > 1) {
if (matches[0] === 'remove') {
if (i + 1 !== tokensLength) {
throw new Error('Invalid pseudo: \':remove\' should be at the end of the selector');
}
return matches[1];
}
}
}
}
}
};
var globalDebuggingFlag = false;
function isDebugging() {
return globalDebuggingFlag || this.debug;
}
/**
* This class represents a selector which is not an extended selector.
* @param {string} selectorText
* @param {boolean=} debug
* @final
*/
function NotAnExtendedSelector(selectorText, debug) {
this.selectorText = selectorText;
this.debug = debug;
}
NotAnExtendedSelector.prototype = {
querySelectorAll: function querySelectorAll() {
return document.querySelectorAll(this.selectorText);
},
matches: function matches(element) {
return element[utils.matchesPropertyName](this.selectorText);
},
isDebugging: isDebugging
};
/**
* A trait-less extended selector class.
* @param {string} selectorText
* @param {boolean=} debug
* @constructor
*/
function TraitLessSelector(selectorText, debug) {
this.selectorText = selectorText;
this.debug = debug;
Sizzle.compile(selectorText);
}
TraitLessSelector.prototype = {
querySelectorAll: function querySelectorAll() {
return Sizzle(this.selectorText);
},
/** @final */
matches: function matches(element) {
return Sizzle.matchesSelector(element, this.selectorText);
},
/** @final */
isDebugging: isDebugging
};
/**
* Parental class for such pseudo-classes as xpath, upward, remove
* which are limited to be the last one token in selector
*
* @param {string} selectorText
* @param {string} pseudoClassArg pseudo-class arg
* @param {boolean=} debug
* @constructor
*/
function BaseLastArgumentSelector(selectorText, pseudoClassArg, debug) {
this.selectorText = selectorText;
this.pseudoClassArg = pseudoClassArg;
this.debug = debug;
Sizzle.compile(this.selectorText);
}
BaseLastArgumentSelector.prototype = {
querySelectorAll: function querySelectorAll() {
var _this = this;
var resultNodes = [];
var simpleNodes;
if (this.selectorText) {
simpleNodes = Sizzle(this.selectorText);
if (!simpleNodes || !simpleNodes.length) {
return resultNodes;
}
} else {
simpleNodes = [document];
}
simpleNodes.forEach(function (node) {
_this.searchResultNodes(node, _this.pseudoClassArg, resultNodes);
});
return Sizzle.uniqueSort(resultNodes);
},
/** @final */
matches: function matches(element) {
var results = this.querySelectorAll();
return results.indexOf(element) > -1;
},
/** @final */
isDebugging: isDebugging,
/**
* Primitive method that returns all nodes if pseudo-class arg is defined.
* That logic works for remove pseudo-class,
* but for others it should be overridden.
* @param {Object} node context element
* @param {string} pseudoClassArg pseudo-class argument
* @param {Array} result
*/
searchResultNodes: function searchResultNodes(node, pseudoClassArg, result) {
if (pseudoClassArg) {
result.push(node);
}
}
};
/**
* Xpath selector class
* Limited to support 'xpath' to be only the last one token in selector
* @param {string} selectorText
* @param {string} xpath value
* @param {boolean=} debug
* @constructor
* @augments BaseLastArgumentSelector
*/
function XpathSelector(selectorText, xpath, debug) {
var NO_SELECTOR_MARKER = ':xpath(//';
var BODY_SELECTOR_REPLACER = 'body:xpath(//';
var modifiedSelectorText = selectorText; // Normally, a pseudo-class is applied to nodes selected by a selector -- selector:xpath(...).
// However, :xpath is special as the selector can be ommited.
// For any other pseudo-class that would mean "apply to ALL DOM nodes",
// but in case of :xpath it just means "apply me to the document".
if (utils.startsWith(selectorText, NO_SELECTOR_MARKER)) {
modifiedSelectorText = selectorText.replace(NO_SELECTOR_MARKER, BODY_SELECTOR_REPLACER);
}
BaseLastArgumentSelector.call(this, modifiedSelectorText, xpath, debug);
}
XpathSelector.prototype = Object.create(BaseLastArgumentSelector.prototype);
XpathSelector.prototype.constructor = XpathSelector;
/**
* Applies xpath pseudo-class to provided context node
* @param {Object} node context element
* @param {string} pseudoClassArg xpath
* @param {Array} result
* @override
*/
XpathSelector.prototype.searchResultNodes = function (node, pseudoClassArg, result) {
var xpathResult = document.evaluate(pseudoClassArg, node, null, XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null);
var iNode; // eslint-disable-next-line no-cond-assign
while (iNode = xpathResult.iterateNext()) {
result.push(iNode);
}
};
/**
* Upward selector class
* Limited to support 'upward' to be only the last one token in selector
* @param {string} selectorText
* @param {string} upwardSelector value
* @param {boolean=} debug
* @constructor
* @augments BaseLastArgumentSelector
*/
function UpwardSelector(selectorText, upwardSelector, debug) {
BaseLastArgumentSelector.call(this, selectorText, upwardSelector, debug);
}
UpwardSelector.prototype = Object.create(BaseLastArgumentSelector.prototype);
UpwardSelector.prototype.constructor = UpwardSelector;
/**
* Applies upward pseudo-class to provided context node
* @param {Object} node context element
* @param {string} upwardSelector upward selector
* @param {Array} result
* @override
*/
UpwardSelector.prototype.searchResultNodes = function (node, upwardSelector, result) {
if (upwardSelector !== '') {
var parent = node.parentElement;
if (parent === null) {
return;
}
node = parent.closest(upwardSelector);
if (node === null) {
return;
}
}
result.push(node);
};
/**
* Remove selector class
* Limited to support 'remove' to be only the last one token in selector
* @param {string} selectorText
* @param {boolean} hasValidRemovePart
* @param {boolean=} debug
* @constructor
* @augments BaseLastArgumentSelector
*/
function RemoveSelector(selectorText, hasValidRemovePart, debug) {
var REMOVE_PSEUDO_MARKER = ':remove()';
var removeMarkerIndex = selectorText.indexOf(REMOVE_PSEUDO_MARKER); // deleting remove part of rule instead of which
// pseudo-property property 'remove' will be added by ExtendedCssParser
var modifiedSelectorText = selectorText.slice(0, removeMarkerIndex);
BaseLastArgumentSelector.call(this, modifiedSelectorText, hasValidRemovePart, debug); // mark extendedSelector as Remove one for ExtendedCssParser
this.isRemoveSelector = true;
}
RemoveSelector.prototype = Object.create(BaseLastArgumentSelector.prototype);
RemoveSelector.prototype.constructor = RemoveSelector;
/**
* A splitted extended selector class.
*
* #container #feedItem:has(.ads)
* +--------+ simple
* + relation
* +-----------------+ complex
* We split selector only when the last selector is complex
* @param {string} selectorText
* @param {string} simple
* @param {string} relation
* @param {string} complex
* @param {boolean=} debug
* @constructor
* @extends TraitLessSelector
*/
function SplittedSelector(selectorText, simple, relation, complex, debug) {
TraitLessSelector.call(this, selectorText, debug);
this.simple = simple;
this.relation = relation;
this.complex = complex;
Sizzle.compile(complex);
}
SplittedSelector.prototype = Object.create(TraitLessSelector.prototype);
SplittedSelector.prototype.constructor = SplittedSelector;
/** @override */
SplittedSelector.prototype.querySelectorAll = function () {
var _this2 = this;
var resultNodes = [];
var simpleNodes;
var simple = this.simple;
var relation;
if (simple) {
// First we use simple selector to narrow our search
simpleNodes = document.querySelectorAll(simple);
if (!simpleNodes || !simpleNodes.length) {
return resultNodes;
}
relation = this.relation;
} else {
simpleNodes = [document];
relation = ' ';
}
switch (relation) {
case ' ':
simpleNodes.forEach(function (node) {
_this2.relativeSearch(node, resultNodes);
});
break;
case '>':
{
simpleNodes.forEach(function (node) {
Object.values(node.children).forEach(function (childNode) {
if (_this2.matches(childNode)) {
resultNodes.push(childNode);
}
});
});
break;
}
case '+':
{
simpleNodes.forEach(function (node) {
var parentNode = node.parentNode;
Object.values(parentNode.children).forEach(function (childNode) {
if (_this2.matches(childNode) && childNode.previousElementSibling === node) {
resultNodes.push(childNode);
}
});
});
break;
}
case '~':
{
simpleNodes.forEach(function (node) {
var parentNode = node.parentNode;
Object.values(parentNode.children).forEach(function (childNode) {
if (_this2.matches(childNode) && node.compareDocumentPosition(childNode) === 4) {
resultNodes.push(childNode);
}
});
});
break;
}
}
return Sizzle.uniqueSort(resultNodes);
};
/**
* Performs a search of "complex" part relative to results for the "simple" part.
* @param {Node} node a node matching the "simple" part.
* @param {Node[]} result an array to append search result.
*/
SplittedSelector.prototype.relativeSearch = function (node, results) {
Sizzle(this.complex, node, results);
};
return {
/**
* Wraps the inner class so that the instance is not exposed.
*/
createSelector: function createSelector(selector, tokens, debug) {
return new ExtendedSelectorParser(selector, tokens, debug).createSelector();
},
/**
* Mark every selector as a selector being debugged, so that timing information
* for the selector is printed to the console.
*/
enableGlobalDebugging: function enableGlobalDebugging() {
globalDebuggingFlag = true;
}
};
}();
/**
* Copyright 2016 Adguard Software Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* A helper class that parses stylesheets containing extended selectors
* into ExtendedSelector instances and key-value maps of style declarations.
* Please note, that it does not support any complex things like media queries and such.
*/
var ExtendedCssParser = function () {
var reDeclEnd = /[;}]/g;
var reDeclDivider = /[;:}]/g;
var reNonWhitespace = /\S/g;
var Sizzle;
/**
* @param {string} cssText
* @constructor
*/
function Parser(cssText) {
this.cssText = cssText;
}
Parser.prototype = {
error: function error(position) {
throw new Error("CssParser: parse error at position ".concat(this.posOffset + position));
},
/**
* Validates that the tokens correspond to a valid selector.
* Sizzle is different from browsers and some selectors that it tolerates aren't actually valid.
* For instance, "div >" won't work in a browser, but it will in Sizzle (it'd be the same as "div > *").
*
* @param {*} selectors An array of SelectorData (selector, groups)
* @returns {boolean} false if any of the groups are invalid
*/
validateSelectors: function validateSelectors(selectors) {
var iSelectors = selectors.length;
while (iSelectors--) {
var groups = selectors[iSelectors].groups;
var iGroups = groups.length;
while (iGroups--) {
var tokens = groups[iGroups];
var lastToken = tokens[tokens.length - 1];
if (Sizzle.selectors.relative[lastToken.type]) {
return false;
}
}
}
return true;
},
/**
* Parses a stylesheet and returns a list of pairs of an ExtendedSelector and a styles map.
* This method will throw an error in case of an obviously invalid input.
* If any of the selectors used in the stylesheet cannot be compiled into an ExtendedSelector,
* it will be ignored.
*
* @typedef {Object} ExtendedStyle
* @property {Object} selector An instance of the {@link ExtendedSelector} class
* @property {Object} styleMap A map of styles parsed
*
* @returns {Array.<ExtendedStyle>} An array of the styles parsed
*/
parseCss: function parseCss() {
this.posOffset = 0;
if (!this.cssText) {
this.error(0);
}
var results = [];
while (this.cssText) {
// Apply tolerant tokenization.
var parseResult = Sizzle.tokenize(this.cssText, false, {
tolerant: true,
returnUnsorted: true
});
var selectorData = parseResult.selectors;
this.nextIndex = parseResult.nextIndex;
if (this.cssText.charCodeAt(this.nextIndex) !== 123 ||
/* charCode of '{' */
!this.validateSelectors(selectorData)) {
this.error(this.nextIndex);
}
this.nextIndex++; // Move the pointer to the start of style declaration.
var styleMap = this.parseNextStyle();
var debug = false; // If there is a style property 'debug', mark the selector
// as a debuggable selector, and delete the style declaration.
var debugPropertyValue = styleMap['debug'];
if (typeof debugPropertyValue !== 'undefined') {
if (debugPropertyValue === 'global') {
ExtendedSelectorFactory.enableGlobalDebugging();
}
debug = true;
delete styleMap['debug'];
} // Creating an ExtendedSelector instance for every selector we got from Sizzle.tokenize.
// This is quite important as Sizzle does a poor job at executing selectors like "selector1, selector2".
for (var i = 0, l = selectorData.length; i < l; i++) {
var data = selectorData[i];
try {
var extendedSelector = ExtendedSelectorFactory.createSelector(data.selectorText, data.groups, debug);
if (extendedSelector.pseudoClassArg && extendedSelector.isRemoveSelector) {
// if there is remove pseudo-class in rule,
// the element will be removed and no other styles will be applied
styleMap['remove'] = 'true';
}
results.push({
selector: extendedSelector,
style: styleMap
});
} catch (ex) {
utils.logError("ExtendedCssParser: ignoring invalid selector ".concat(data.selectorText));
}
}
}
return results;
},
parseNextStyle: function parseNextStyle() {
var styleMap = Object.create(null);
var bracketPos = this.parseUntilClosingBracket(styleMap); // Cut out matched portion from cssText.
reNonWhitespace.lastIndex = bracketPos + 1;
var match = reNonWhitespace.exec(this.cssText);
if (match === null) {
this.cssText = '';
return styleMap;
}
var matchPos = match.index;
this.cssText = this.cssText.slice(matchPos);
this.posOffset += matchPos;
return styleMap;
},
/**
* @return {number} an index of the next '}' in `this.cssText`.
*/
parseUntilClosingBracket: function parseUntilClosingBracket(styleMap) {
// Expects ":", ";", and "}".
reDeclDivider.lastIndex = this.nextIndex;
var match = reDeclDivider.exec(this.cssText);
if (match === null) {
this.error(this.nextIndex);
}
var matchPos = match.index;
var matched = match[0];
if (matched === '}') {
return matchPos;
}
if (matched === ':') {
var colonIndex = matchPos; // Expects ";" and "}".
reDeclEnd.lastIndex = colonIndex;
match = reDeclEnd.exec(this.cssText);
if (match === null) {
this.error(colonIndex);
}
matchPos = match.index;
matched = match[0]; // Populates the `styleMap` key-value map.
var property = this.cssText.slice(this.nextIndex, colonIndex).trim();
var value = this.cssText.slice(colonIndex + 1, matchPos).trim();
styleMap[property] = value; // If found "}", re-run the outer loop.
if (matched === '}') {
return matchPos;
}
} // matchPos is the position of the next ';'.
// Increase 'nextIndex' and re-run the loop.
this.nextIndex = matchPos + 1;
return this.parseUntilClosingBracket(styleMap); // Should be a subject of tail-call optimization.
}
};
return {
parseCss: function parseCss(cssText) {
Sizzle = initializeSizzle();
return new Parser(cssUtils.normalize(cssText)).parseCss();
}
};
}();
/**
* This callback is used to get affected node elements and handle style properties
* before they are applied to them if it is necessary
* @callback beforeStyleApplied
* @param {object} affectedElement - Object containing DOM node and rule to be applied
* @return {object} affectedElement - Same or modified object containing DOM node and rule to be applied
*/
/**
* Extended css class
*
* @param {Object} configuration
* @param {string} configuration.styleSheet - the CSS stylesheet text
* @param {beforeStyleApplied} [configuration.beforeStyleApplied] - the callback that handles affected elements
* @constructor
*/
function ExtendedCss(configuration) {
if (!configuration) {
throw new Error('Configuration is not provided.');
}
var styleSheet = configuration.styleSheet;
var beforeStyleApplied = configuration.beforeStyleApplied;
if (beforeStyleApplied && typeof beforeStyleApplied !== 'function') {
// eslint-disable-next-line max-len
throw new Error("Wrong configuration. Type of 'beforeStyleApplied' field should be a function, received: ".concat(_typeof(beforeStyleApplied)));
} // We use EventTracker to track the event that is likely to cause the mutation.
// The problem is that we cannot use `window.event` directly from the mutation observer call
// as we're not in the event handler context anymore.
var EventTracker = function () {
var ignoredEventTypes = ['mouseover', 'mouseleave', 'mouseenter', 'mouseout'];
var LAST_EVENT_TIMEOUT_MS = 10;
var EVENTS = [// keyboard events
'keydown', 'keypress', 'keyup', // mouse events
'auxclick', 'click', 'contextmenu', 'dblclick', 'mousedown', 'mouseenter', 'mouseleave', 'mousemove', 'mouseover', 'mouseout', 'mouseup', 'pointerlockchange', 'pointerlockerror', 'select', 'wheel']; // 'wheel' event makes scrolling in Safari twitchy
// https://github.com/AdguardTeam/ExtendedCss/issues/120
var safariProblematicEvents = ['wheel'];
var trackedEvents = utils.isSafariBrowser ? EVENTS.filter(function (el) {
return !(safariProblematicEvents.indexOf(el) > -1);
}) : EVENTS;
var lastEventType;
var lastEventTime;
var trackEvent = function trackEvent(e) {
lastEventType = e.type;
lastEventTime = Date.now();
};
trackedEvents.forEach(function (evName) {
document.documentElement.addEventListener(evName, trackEvent, true);
});
var getLastEventType = function getLastEventType() {
return lastEventType;
};
var getTimeSinceLastEvent = function getTimeSinceLastEvent() {
return Date.now() - lastEventTime;
};
return {
isIgnoredEventType: function isIgnoredEventType() {
return ignoredEventTypes.indexOf(getLastEventType()) > -1 && getTimeSinceLastEvent() < LAST_EVENT_TIMEOUT_MS;
}
};
}();
var rules = [];
var affectedElements = [];
var removalsStatistic = {};
var domObserved;
var eventListenerSupported = window.addEventListener;
var domMutationObserver;
function observeDocument(callback) {
// We are trying to limit the number of callback calls by not calling it on all kind of "hover" events.
// The rationale behind this is that "hover" events often cause attributes modification,
// but re-applying extCSS rules will be useless as these attribute changes are usually transient.
var isIgnoredMutation = function isIgnoredMutation(mutations) {
for (var i = 0; i < mutations.length; i += 1) {
if (mutations.type !== 'attributes') {
return false;
}
}
return true;
};
if (utils.MutationObserver) {
domMutationObserver = new utils.MutationObserver(function (mutations) {
if (!mutations || mutations.length === 0) {
return;
}
if (EventTracker.isIgnoredEventType() && isIgnoredMutation(mutations)) {
return;
}
callback();
});
domMutationObserver.observe(document, {
childList: true,
subtree: true,
attributes: true,
attributeFilter: ['id', 'class']
});
} else if (eventListenerSupported) {
document.addEventListener('DOMNodeInserted', callback, false);
document.addEventListener('DOMNodeRemoved', callback, false);
document.addEventListener('DOMAttrModified', callback, false);
}
}
function disconnectDocument(callback) {
if (domMutationObserver) {
domMutationObserver.disconnect();
} else if (eventListenerSupported) {
document.removeEventListener('DOMNodeInserted', callback, false);
document.removeEventListener('DOMNodeRemoved', callback, false);
document.removeEventListener('DOMAttrModified', callback, false);
}
}
var MAX_STYLE_PROTECTION_COUNT = 50;
var protectionObserverOption = {
attributes: true,
attributeOldValue: true,
attributeFilter: ['style']
};
/**
* Creates MutationObserver protection function
*
* @param styles
* @return {protectionFunction}
*/
function createProtectionFunction(styles) {
function protectionFunction(mutations, observer) {
if (!mutations.length) {
return;
}
var mutation = mutations[0];
var target = mutation.target;
observer.disconnect();
styles.forEach(function (style) {
setStyleToElement(target, style);
});
if (++observer.styleProtectionCount < MAX_STYLE_PROTECTION_COUNT) {
observer.observe(target, protectionObserverOption);
} else {
utils.logError('ExtendedCss: infinite loop protection for style');
}
}
return protectionFunction;
}
/**
* Sets up a MutationObserver which protects style attributes from changes
* @param node DOM node
* @param rules rules
* @returns Mutation observer used to protect attribute or null if there's nothing to protect
*/
function protectStyleAttribute(node, rules) {
if (!utils.MutationObserver) {
return null;
}
var styles = rules.map(function (r) {
return r.style;
});
var protectionObserver = new utils.MutationObserver(createProtectionFunction(styles));
protectionObserver.observe(node, protectionObserverOption); // Adds an expando to the observer to keep 'style fix counts'.
protectionObserver.styleProtectionCount = 0;
return protectionObserver;
}
function removeSuffix(str, suffix) {
var index = str.indexOf(suffix, str.length - suffix.length);
if (index >= 0) {
return str.substring(0, index);
}
return str;
}
/**
* Finds affectedElement object for the specified DOM node
* @param node DOM node
* @returns affectedElement found or null
*/
function findAffectedElement(node) {
for (var i = 0; i < affectedElements.length; i += 1) {
if (affectedElements[i].node === node) {
return affectedElements[i];
}
}
return null;
}
function removeElement(affectedElement) {
var node = affectedElement.node;
affectedElement.removed = true;
var elementSelector = utils.getNodeSelector(node); // check if the element has been already removed earlier
var elementRemovalsCounter = removalsStatistic[elementSelector] || 0; // if removals attempts happened more than specified we do not try to remove node again
if (elementRemovalsCounter > MAX_STYLE_PROTECTION_COUNT) {
utils.logError('ExtendedCss: infinite loop protection for SELECTOR', elementSelector);
return;
}
if (node.parentNode) {
node.parentNode.removeChild(node);
removalsStatistic[elementSelector] = elementRemovalsCounter + 1;
}
}
/**
* Applies style to the specified DOM node
* @param affectedElement Object containing DOM node and rule to be applied
*/
function applyStyle(affectedElement) {
if (affectedElement.protectionObserver) {
// Style is already applied and protected by the observer
return;
}
if (beforeStyleApplied) {
affectedElement = beforeStyleApplied(affectedElement);
if (!affectedElement) {
return;
}
}
var _affectedElement = affectedElement,
node = _affectedElement.node;
for (var i = 0; i < affectedElement.rules.length; i++) {
var style = affectedElement.rules[i].style;
if (style['remove'] === 'true') {
removeElement(affectedElement);
return;
}
setStyleToElement(node, style);
}
}
/**
* Sets style to the specified DOM node
* @param node element
* @param style style
*/
function setStyleToElement(node, style) {
Object.keys(style).forEach(function (prop) {
// Apply this style only to existing properties
// We can't use hasOwnProperty here (does not work in FF)
if (typeof node.style.getPropertyValue(prop) !== 'undefined') {
var value = style[prop]; // First we should remove !important attribute (or it won't be applied')
value = removeSuffix(value.trim(), '!important').trim();
node.style.setProperty(prop, value, 'important');
}
});
}
/**
* Reverts style for the affected object
*/
function revertStyle(affectedElement) {
if (affectedElement.protectionObserver) {
affectedElement.protectionObserver.disconnect();
}
affectedElement.node.style.cssText = affectedElement.originalStyle;
}
/**
* Applies specified rule and returns list of elements affected
* @param rule Rule to apply
* @returns List of elements affected by this rule
*/
function applyRule(rule) {
var debug = rule.selector.isDebugging();
var start;
if (debug) {
start = utils.AsyncWrapper.now();
}
var selector = rule.selector;
var nodes = selector.querySelectorAll();
nodes.forEach(function (node) {
var affectedElement = findAffectedElement(node);
if (affectedElement) {
affectedElement.rules.push(rule);
applyStyle(affectedElement);
} else {
// Applying style first time
var originalStyle = node.style.cssText;
affectedElement = {
node: node,
// affected DOM node
rules: [rule],
// rules to be applied
originalStyle: originalStyle,
// original node style
protectionObserver: null // style attribute observer
};
applyStyle(affectedElement);
affectedElements.push(affectedElement);
}
});
if (debug) {
var elapsed = utils.AsyncWrapper.now() - start;
if (!('timingStats' in rule)) {
rule.timingStats = new utils.Stats();
}
rule.timingStats.push(elapsed);
}
return nodes;
}
/**
* Applies filtering rules
*/
function applyRules() {
var elementsIndex = []; // some rules could make call - selector.querySelectorAll() temporarily to change node id attribute
// this caused MutationObserver to call recursively
// https://github.com/AdguardTeam/ExtendedCss/issues/81
stopObserve();
rules.forEach(function (rule) {
var nodes = applyRule(rule);
Array.prototype.push.apply(elementsIndex, nodes);
}); // Now revert styles for elements which are no more affected
var l = affectedElements.length; // do nothing if there is no elements to process
if (elementsIndex.length > 0) {
while (l--) {
var obj = affectedElements[l];
if (elementsIndex.indexOf(obj.node) === -1) {
// Time to revert style
revertStyle(obj);
affectedElements.splice(l, 1);
} else if (!obj.removed) {
// Add style protection observer
// Protect "style" attribute from changes
if (!obj.protectionObserver) {
obj.protectionObserver = protectStyleAttribute(obj.node, obj.rules);
}
}
}
} // After styles are applied we can start observe again
observe();
printTimingInfo();
}
var APPLY_RULES_DELAY = 150;
var applyRulesScheduler = new utils.AsyncWrapper(applyRules, APPLY_RULES_DELAY);
var mainCallback = applyRulesScheduler.run.bind(applyRulesScheduler);
function observe() {
if (domObserved) {
return;
} // Handle dynamically added elements
domObserved = true;
observeDocument(mainCallback);
}
function stopObserve() {
if (!domObserved) {
return;
}
domObserved = false;
disconnectDocument(mainCallback);
}
function apply() {
applyRules();
if (document.readyState !== 'complete') {
document.addEventListener('DOMContentLoaded', applyRules);
}
}
/**
* Disposes ExtendedCss and removes our styles from matched elements
*/
function dispose() {
stopObserve();
affectedElements.forEach(function (obj) {
revertStyle(obj);
});
}
var timingsPrinted = false;
/**
* Prints timing information for all selectors marked as "debug"
*/
function printTimingInfo() {
if (timingsPrinted) {
return;
}
timingsPrinted = true;
var timings = rules.filter(function (rule) {
return rule.selector.isDebugging();
}).map(function (rule) {
return {
selectorText: rule.selector.selectorText,
timingStats: rule.timingStats
};
});
if (timings.length === 0) {
return;
} // Add location.href to the message to distinguish frames
utils.logInfo('[ExtendedCss] Timings for %o:\n%o (in milliseconds)', window.location.href, timings);
} // First of all parse the stylesheet
rules = ExtendedCssParser.parseCss(styleSheet); // EXPOSE
this.dispose = dispose;
this.apply = apply;
/** Exposed for testing purposes only */
this._getAffectedElements = function () {
return affectedElements;
};
}
/**
* Expose querySelectorAll for debugging and validating selectors
*
* @param {string} selectorText selector text
* @param {boolean} noTiming if true -- do not print the timing to the console
* @returns {Array<Node>|NodeList} a list of elements found
* @throws Will throw an error if the argument is not a valid selector
*/
ExtendedCss.query = function (selectorText, noTiming) {
if (typeof selectorText !== 'string') {
throw new Error('Selector text is empty');
}
var now = utils.AsyncWrapper.now;
var start = now();
try {
return ExtendedSelectorFactory.createSelector(selectorText).querySelectorAll();
} finally {
var end = now();
if (!noTiming) {
utils.logInfo("[ExtendedCss] Elapsed: ".concat(Math.round((end - start) * 1000), " \u03BCs."));
}
}
};
return ExtendedCss;
}());
/**
* This file is part of Adguard Browser Extension (https://github.com/AdguardTeam/AdguardBrowserExtension).
*
* Adguard Browser Extension is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Adguard Browser Extension is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Adguard Browser Extension. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Global object for content scripts.
* !!! DO not change to const, because this variable will be redeclared in adguard-api
*/
var adguardContent = {}; // eslint-disable-line no-unused-vars, no-var
/**
* This file is part of Adguard Browser Extension (https://github.com/AdguardTeam/AdguardBrowserExtension).
*
* Adguard Browser Extension is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Adguard Browser Extension is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Adguard Browser Extension. If not, see <http://www.gnu.org/licenses/>.
*/
/* global adguardContent */
(function (adguard, self) {
'use strict';
/**
* https://bugs.chromium.org/p/project-zero/issues/detail?id=1225&desc=6
* Page script can inject global variables into the DOM,
* so content script isolation doesn't work as expected
* So we have to make additional check before accessing a global variable.
*/
function isDefined(property) {
return Object.prototype.hasOwnProperty.call(self, property);
}
const browserApi = isDefined('browser') && self.browser !== undefined ? self.browser : self.chrome;
adguard.i18n = browserApi.i18n;
adguard.runtimeImpl = (function () {
const onMessage = (function () {
if (browserApi.runtime && browserApi.runtime.onMessage) {
// Chromium, Edge, Firefox WebExtensions
return browserApi.runtime.onMessage;
}
// Old Chromium
return browserApi.extension.onMessage || browserApi.extension.onRequest;
})();
const sendMessage = (function () {
if (browserApi.runtime && browserApi.runtime.sendMessage) {
// Chromium, Edge, Firefox WebExtensions
return browserApi.runtime.sendMessage;
}
// Old Chromium
return browserApi.extension.sendMessage || browserApi.extension.sendRequest;
})();
return {
onMessage,
sendMessage,
};
})();
})(typeof adguardContent !== 'undefined' ? adguardContent : adguard, this); // jshint ignore:line
/**
* This file is part of Adguard Browser Extension (https://github.com/AdguardTeam/AdguardBrowserExtension).
*
* Adguard Browser Extension is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Adguard Browser Extension is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Adguard Browser Extension. If not, see <http://www.gnu.org/licenses/>.
*/
/* global adguardContent */
(function (adguard) {
'use strict';
window.i18n = adguard.i18n;
window.contentPage = {
sendMessage: adguard.runtimeImpl.sendMessage,
onMessage: adguard.runtimeImpl.onMessage,
};
})(adguardContent);
/**
* This file is part of Adguard Browser Extension (https://github.com/AdguardTeam/AdguardBrowserExtension).
*
* Adguard Browser Extension is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Adguard Browser Extension is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Adguard Browser Extension. If not, see <http://www.gnu.org/licenses/>.
*/
/* global contentPage, WeakSet */
/**
* Function for injecting some helper API into page context, that is used by request wrappers.
*
* @param scriptName Unique script name
* @param shouldOverrideWebRTC If true we should override WebRTC objects
* @param isInjected True means that we've already injected scripts in the contentWindow, i.e. wrapped request objects and passed message channel
*/
function injectPageScriptAPI(scriptName, shouldOverrideWebRTC, isInjected) {
'use strict';
/**
* If script have been injected into a frame via contentWindow then we can simply take the copy of messageChannel left for us by parent document
* Otherwise creates new message channel that sends a message to the content-script to check if request should be allowed or not.
*/
const messageChannel = isInjected ? window[scriptName] : (function () {
// Save original postMessage and addEventListener functions to prevent webpage from tampering both.
const postMessage = window.postMessage;
const addEventListener = window.addEventListener;
// Current request ID (incremented every time we send a new message)
let currentRequestId = 0;
const requestsMap = {};
/**
* Handles messages sent from the content script back to the page script.
*
* @param event Event with necessary data
*/
const onMessageReceived = function (event) {
if (!event.data || !event.data.direction || event.data.direction !== 'to-page-script@adguard') {
return;
}
const requestData = requestsMap[event.data.requestId];
if (requestData) {
const wrapper = requestData.wrapper;
requestData.onResponseReceived(wrapper, event.data.block);
delete requestsMap[event.data.requestId];
}
};
/**
* @param url The URL to which wrapped object is willing to connect
* @param requestType Request type ( WEBSOCKET or WEBRTC)
* @param wrapper WebSocket wrapper instance
* @param onResponseReceived Called when response is received
*/
const sendMessage = function (url, requestType, wrapper, onResponseReceived) {
if (currentRequestId === 0) {
// Subscribe to response when this method is called for the first time
addEventListener.call(window, 'message', onMessageReceived, false);
}
const requestId = ++currentRequestId;
requestsMap[requestId] = {
wrapper: wrapper,
onResponseReceived: onResponseReceived,
};
const message = {
requestId: requestId,
direction: 'from-page-script@adguard',
elementUrl: url,
documentUrl: document.URL,
requestType: requestType,
};
// Send a message to the background page to check if the request should be blocked
postMessage.call(window, message, '*');
};
return {
sendMessage: sendMessage,
};
})();
/*
* In some case Chrome won't run content scripts inside frames.
* So we have to intercept access to contentWindow/contentDocument and manually inject wrapper script into this context
*
* Based on: https://github.com/adblockplus/adblockpluschrome/commit/1aabfb3346dc0821c52dd9e97f7d61b8c99cd707
*/
const injectedToString = Function.prototype.toString.bind(injectPageScriptAPI);
let injectedFramesAdd;
let injectedFramesHas;
if (window.WeakSet instanceof Function) {
const injectedFrames = new WeakSet();
injectedFramesAdd = WeakSet.prototype.add.bind(injectedFrames);
injectedFramesHas = WeakSet.prototype.has.bind(injectedFrames);
} else {
const frames = [];
injectedFramesAdd = function (el) {
if (frames.indexOf(el) < 0) {
frames.push(el);
}
};
injectedFramesHas = function (el) {
return frames.indexOf(el) >= 0;
};
}
/**
* Injects wrapper's script into passed window
* @param contentWindow Frame's content window
*/
function injectPageScriptAPIInWindow(contentWindow) {
try {
if (contentWindow && !injectedFramesHas(contentWindow)) {
injectedFramesAdd(contentWindow);
contentWindow[scriptName] = messageChannel; // Left message channel for the injected script
const args = `'${scriptName}', ${shouldOverrideWebRTC}, true`;
contentWindow.eval(`(${injectedToString()})(${args});`);
delete contentWindow[scriptName];
}
} catch (e) {
}
}
/**
* Overrides access to contentWindow/contentDocument for the passed HTML element's interface (iframe, frame, object)
* If the content of one of these objects is requested we will inject our wrapper script.
* @param iface HTML element's interface
*/
function overrideContentAccess(iface) {
const contentWindowDescriptor = Object.getOwnPropertyDescriptor(iface.prototype, 'contentWindow');
const contentDocumentDescriptor = Object.getOwnPropertyDescriptor(iface.prototype, 'contentDocument');
// Apparently in HTMLObjectElement.prototype.contentWindow does not exist
// in older versions of Chrome such as 42.
if (!contentWindowDescriptor) {
return;
}
const getContentWindow = Function.prototype.call.bind(contentWindowDescriptor.get);
const getContentDocument = Function.prototype.call.bind(contentDocumentDescriptor.get);
contentWindowDescriptor.get = function () {
const contentWindow = getContentWindow(this);
injectPageScriptAPIInWindow(contentWindow);
return contentWindow;
};
contentDocumentDescriptor.get = function () {
injectPageScriptAPIInWindow(getContentWindow(this));
return getContentDocument(this);
};
Object.defineProperty(iface.prototype, 'contentWindow', contentWindowDescriptor);
Object.defineProperty(iface.prototype, 'contentDocument', contentDocumentDescriptor);
}
const interfaces = [HTMLFrameElement, HTMLIFrameElement, HTMLObjectElement];
for (let i = 0; i < interfaces.length; i += 1) {
overrideContentAccess(interfaces[i]);
}
/**
* Defines properties in destination object
* @param src Source object
* @param dest Destination object
* @param properties Properties to copy
*/
const copyProperties = function (src, dest, properties) {
for (let i = 0; i < properties.length; i += 1) {
const prop = properties[i];
const descriptor = Object.getOwnPropertyDescriptor(src, prop);
// Passed property may be undefined
if (descriptor) {
Object.defineProperty(dest, prop, descriptor);
}
}
};
/**
* Check request by sending message to content script
* @param url URL to block
* @param type Request type
* @param callback Result callback
*/
const checkRequest = function (url, type, callback) {
messageChannel.sendMessage(url, type, this, function (wrapper, blockConnection) {
callback(blockConnection);
});
};
/**
* The function overrides window.RTCPeerConnection with our wrapper, that will check ice servers URLs with filters through messaging with content-script.
*
* IMPORTANT NOTE:
* This function is first loaded as a content script. The only purpose of it is to call
* the "toString" method and use resulting string as a text content for injected script.
*/
const overrideWebRTC = function () {
if (!(window.RTCPeerConnection instanceof Function)
&& !(window.webkitRTCPeerConnection instanceof Function)) {
return;
}
/**
* RTCPeerConnection wrapper implementation.
* https://github.com/AdguardTeam/AdguardBrowserExtension/issues/588
*
* Based on:
* https://github.com/adblockplus/adblockpluschrome/commit/af0585137be19011eace1cf68bf61eed2e6db974
*
* Chromium webRequest API doesn't allow the blocking of WebRTC connections
* https://bugs.chromium.org/p/chromium/issues/detail?id=707683
*/
const RealRTCPeerConnection = window.RTCPeerConnection || window.webkitRTCPeerConnection;
const closeRTCPeerConnection = Function.prototype.call.bind(RealRTCPeerConnection.prototype.close);
const RealArray = Array;
const RealString = String;
const createObject = Object.create;
const defineProperty = Object.defineProperty;
/**
* Convert passed url to string
* @param url URL
* @returns {string}
*/
function urlToString(url) {
if (typeof url !== 'undefined') {
return RealString(url);
}
}
/**
* Creates new immutable array from original with some transform function
* @param original
* @param transform
* @returns {*}
*/
function safeCopyArray(original, transform) {
if (original === null || typeof original !== 'object') {
return original;
}
const immutable = RealArray(original.length);
for (let i = 0; i < immutable.length; i += 1) {
defineProperty(immutable, i, {
configurable: false,
enumerable: false,
writable: false,
value: transform(original[i]),
});
}
defineProperty(immutable, 'length', {
configurable: false,
enumerable: false,
writable: false,
value: immutable.length,
});
return immutable;
}
/**
* Protect configuration from mutations
* @param configuration RTCPeerConnection configuration object
* @returns {*}
*/
function protectConfiguration(configuration) {
if (configuration === null || typeof configuration !== 'object') {
return configuration;
}
const iceServers = safeCopyArray(
configuration.iceServers,
function (iceServer) {
let { url, urls } = iceServer;
// RTCPeerConnection doesn't iterate through pseudo Arrays of urls.
if (typeof urls !== 'undefined' && !(urls instanceof RealArray)) {
urls = [urls];
}
return createObject(iceServer, {
url: {
configurable: false,
enumerable: false,
writable: false,
value: urlToString(url),
},
urls: {
configurable: false,
enumerable: false,
writable: false,
value: safeCopyArray(urls, urlToString),
},
});
}
);
return createObject(configuration, {
iceServers: {
configurable: false,
enumerable: false,
writable: false,
value: iceServers,
},
});
}
/**
* Check WebRTC connection's URL and close if it's blocked by rule
* @param connection Connection
* @param url URL to check
*/
function checkWebRTCRequest(connection, url) {
checkRequest(url, 'WEBRTC', function (blocked) {
if (blocked) {
try {
closeRTCPeerConnection(connection);
} catch (e) {
// Ignore exceptions
}
}
});
}
/**
* Check each URL of ice server in configuration for blocking.
*
* @param connection RTCPeerConnection
* @param configuration Configuration for RTCPeerConnection
* https://developer.mozilla.org/en-US/docs/Web/API/RTCConfiguration
*/
function checkConfiguration(connection, configuration) {
if (!configuration || !configuration.iceServers) {
return;
}
const iceServers = configuration.iceServers;
for (let i = 0; i < iceServers.length; i += 1) {
const iceServer = iceServers[i];
if (!iceServer) {
continue;
}
if (iceServer.url) {
checkWebRTCRequest(connection, iceServer.url);
}
if (iceServer.urls) {
for (let j = 0; j < iceServer.urls.length; j += 1) {
checkWebRTCRequest(connection, iceServer.urls[j]);
}
}
}
}
/**
* Overrides setConfiguration method
* https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/setConfiguration
*/
if (RealRTCPeerConnection.prototype.setConfiguration) {
const realSetConfiguration = Function.prototype.call.bind(RealRTCPeerConnection.prototype.setConfiguration);
RealRTCPeerConnection.prototype.setConfiguration = function (configuration) {
configuration = protectConfiguration(configuration);
// Call the real method first, so that validates the configuration
realSetConfiguration(this, configuration);
checkConfiguration(this, configuration);
};
}
function WrappedRTCPeerConnection(configuration, arg) {
if (!(this instanceof WrappedRTCPeerConnection)) {
return RealRTCPeerConnection();
}
configuration = protectConfiguration(configuration);
/**
* The old webkitRTCPeerConnection constructor takes an optional second argument and we must pass it.
*/
const connection = new RealRTCPeerConnection(configuration, arg);
checkConfiguration(connection, configuration);
return connection;
}
WrappedRTCPeerConnection.prototype = RealRTCPeerConnection.prototype;
const boundWrappedRTCPeerConnection = WrappedRTCPeerConnection.bind();
copyProperties(RealRTCPeerConnection, boundWrappedRTCPeerConnection, ['caller', 'generateCertificate', 'name', 'prototype']);
RealRTCPeerConnection.prototype.constructor = boundWrappedRTCPeerConnection;
if ('RTCPeerConnection' in window) {
window.RTCPeerConnection = boundWrappedRTCPeerConnection;
}
if ('webkitRTCPeerConnection' in window) {
window.webkitRTCPeerConnection = boundWrappedRTCPeerConnection;
}
};
if (shouldOverrideWebRTC) {
overrideWebRTC();
}
}
/**
* This function is executed in the content script. It starts listening to events from the page script and passes them further to the background page.
*/
const initPageMessageListener = function () {
'use strict';
/**
* Listener for websocket wrapper messages.
*
* @param event
*/
function pageMessageListener(event) {
if (!(event.source === window
&& event.data.direction
&& event.data.direction === 'from-page-script@adguard'
&& event.data.elementUrl
&& event.data.documentUrl)) {
return;
}
const message = {
type: 'checkPageScriptWrapperRequest',
elementUrl: event.data.elementUrl,
documentUrl: event.data.documentUrl,
requestType: event.data.requestType,
requestId: event.data.requestId,
};
contentPage.sendMessage(message, function (response) {
if (!response) {
return;
}
const message = {
direction: 'to-page-script@adguard',
elementUrl: event.data.elementUrl,
documentUrl: event.data.documentUrl,
requestType: event.data.requestType,
requestId: response.requestId,
block: response.block,
};
event.source.postMessage(message, event.origin);
});
}
window.addEventListener('message', pageMessageListener, false);
};
/**
* This file is part of Adguard Browser Extension (https://github.com/AdguardTeam/AdguardBrowserExtension).
*
* Adguard Browser Extension is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Adguard Browser Extension is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Adguard Browser Extension. If not, see <http://www.gnu.org/licenses/>.
*/
/* global contentPage, ExtendedCss, HTMLDocument, XMLDocument, ElementCollapser, CssHitsCounter, adguardContent */
(function () {
var requestTypeMap = {
"img": "IMAGE",
"input": "IMAGE",
"audio": "MEDIA",
"video": "MEDIA",
"object": "OBJECT",
"frame": "SUBDOCUMENT",
"iframe": "SUBDOCUMENT",
"embed": "OBJECT"
};
var collapseRequests = Object.create(null);
var collapseRequestId = 1;
var isFirefox = false;
var isOpera = false;
/**
* Unexpectedly global variable contentPage could become undefined in FF,
* in this case we redefine it.
*
* More details:
* https://github.com/AdguardTeam/AdguardBrowserExtension/issues/924
* https://github.com/AdguardTeam/AdguardBrowserExtension/issues/880
*/
var getContentPage = function () {
if (typeof contentPage === 'undefined') {
contentPage = {
sendMessage: adguardContent.runtimeImpl.sendMessage,
onMessage: adguardContent.runtimeImpl.onMessage
};
}
return contentPage;
};
/**
* When Background page receives 'onCommitted' frame event then it sends scripts to corresponding frame
* It allows us to execute script as soon as possible, because runtime.messaging makes huge overhead
* If onCommitted event doesn't occur for the frame, scripts will be applied in usual way.
*/
getContentPage().onMessage.addListener(function (response, sender, sendResponse) {
if (response.type === 'injectScripts') {
// Notify background-page that content-script was received scripts
sendResponse({applied: true});
if (!isHtml()) {
return;
}
applyScripts(response.scripts);
}
});
/**
* Initializing content script
*/
var init = function () {
if (!isHtml()) {
return;
}
initRequestWrappers();
var userAgent = navigator.userAgent.toLowerCase();
isFirefox = userAgent.indexOf('firefox') > -1;
isOpera = userAgent.indexOf('opera') > -1 || userAgent.indexOf('opr') > -1;
initCollapseEventListeners();
tryLoadCssAndScripts();
};
/**
* Checks if it is html document
*
* @returns {boolean}
*/
var isHtml = function () {
return (document instanceof HTMLDocument) ||
// https://github.com/AdguardTeam/AdguardBrowserExtension/issues/233
((document instanceof XMLDocument) && (document.createElement('div') instanceof HTMLDivElement));
};
/**
* Uses in `initRequestWrappers` method.
* We insert wrapper's code into http/https documents and dynamically created frames.
* The last one is due to the circumvention with using iframe's contentWindow.
*/
var isHttpOrAboutPage = function () {
var protocol = window.location.protocol;
return protocol.indexOf('http') === 0 || protocol.indexOf('about:') === 0;
};
/**
* Execute several scripts
* @param {Array<string>} scripts Scripts to execute
*/
var executeScripts = function (scripts) {
if (!scripts || scripts.length === 0) {
return;
}
// Wraps with try catch and appends cleanup
scripts.unshift('( function () { try {');
scripts.push("} catch (ex) { console.error('Error executing AG js: ' + ex); } })();");
executeScript(scripts.join('\r\n'));
};
/**
* Execute scripts in a page context and cleanup itself when execution completes
* @param {string} script Script to execute
*/
const executeScript = function (script) {
const scriptTag = document.createElement('script');
scriptTag.setAttribute('type', 'text/javascript');
scriptTag.textContent = script;
const parent = document.head || document.documentElement;
parent.appendChild(scriptTag);
if (scriptTag.parentNode) {
scriptTag.parentNode.removeChild(scriptTag);
}
};
/**
* Overrides window.RTCPeerConnection running the function from wrappers.js
* https://github.com/AdguardTeam/AdguardBrowserExtension/issues/588
*/
/* global injectPageScriptAPI, initPageMessageListener */
const initRequestWrappers = function () {
// Only for dynamically created frames and http/https documents.
if (!isHttpOrAboutPage()) {
return;
}
/**
* The code below is supposed to be used in WebExt extensions.
* This code overrides RTCPeerConnection constructor, so that we could inspect & block them.
*/
initPageMessageListener();
const wrapperScriptName = 'wrapper-script-' + Math.random().toString().substr(2);
const script = `(${injectPageScriptAPI.toString()})('${wrapperScriptName}', true);`;
executeScripts([script]);
};
/**
* Loads CSS and JS injections
*/
var tryLoadCssAndScripts = function () {
var message = {
type: 'getSelectorsAndScripts',
documentUrl: window.location.href,
};
/**
* Sending message to background page and passing a callback function
*/
getContentPage().sendMessage(message, processCssAndScriptsResponse);
};
/**
* Processes response from the background page containing CSS and JS injections
* @param response Response from the background page
*/
const processCssAndScriptsResponse = (response) => {
if (!response || response.requestFilterReady === false) {
/**
* This flag (requestFilterReady) means that we should wait for a while, because the
* request filter is not ready yet. This is possible only on browser startup.
* In this case we'll delay injections until extension is fully initialized.
*/
setTimeout(tryLoadCssAndScripts, 100);
return;
}
if (response.collectRulesHits) {
CssHitsCounter.init((stats) => {
getContentPage().sendMessage({ type: 'saveCssHitStats', stats });
});
}
if (response.collapseAllElements) {
/**
* This flag (collapseAllElements) means that we should check all page elements
* and collapse them if needed. Why? On browser startup we can't block some
* ad/tracking requests because extension is not yet initialized when
* these requests are executed. At least we could hide these elements.
*/
applySelectors(response.selectors);
applyScripts(response.scripts);
initBatchCollapse();
} else {
applySelectors(response.selectors);
applyScripts(response.scripts);
}
};
/**
* Sets "style" DOM element content.
* @param styleEl "style" DOM element
* @param cssContent CSS content to set
*/
var setStyleContent = function (styleEl, cssContent) {
styleEl.textContent = cssContent;
};
/**
* Applies CSS and extended CSS stylesheets
* @param selectors Object with the stylesheets got from the background page.
*/
var applySelectors = function (selectors) {
if (!selectors) {
return;
}
applyCss(selectors.css);
applyExtendedCss(selectors.extendedCss);
};
/**
* Applies CSS stylesheets
*
* @param css Array with CSS stylesheets
*/
var applyCss = function (css) {
if (!css || css.length === 0) {
return;
}
for (var i = 0; i < css.length; i++) {
var styleEl = document.createElement("style");
styleEl.setAttribute("type", "text/css");
setStyleContent(styleEl, css[i]);
(document.head || document.documentElement).appendChild(styleEl);
protectStyleElementContent(styleEl);
}
};
/**
* Applies Extended Css stylesheet
*
* @param extendedCss Array with ExtendedCss stylesheets
*/
var applyExtendedCss = function (extendedCss) {
if (!extendedCss || !extendedCss.length) {
return;
}
// https://github.com/AdguardTeam/ExtendedCss
window.extcss = new ExtendedCss({
styleSheet: extendedCss.join('\n'),
beforeStyleApplied: CssHitsCounter.countAffectedByExtendedCss,
});
extcss.apply();
};
/**
* Protects specified style element from changes to the current document
* Add a mutation observer, which is adds our rules again if it was removed
*
* @param protectStyleEl protected style element
*/
var protectStyleElementContent = function (protectStyleEl) {
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
if (!MutationObserver) {
return;
}
/* observer, which observe protectStyleEl inner changes, without deleting styleEl */
var innerObserver = new MutationObserver(function (mutations) {
for (var i = 0; i < mutations.length; i++) {
var m = mutations[i];
if (protectStyleEl.hasAttribute("mod") && protectStyleEl.getAttribute("mod") === "inner") {
protectStyleEl.removeAttribute("mod");
break;
}
protectStyleEl.setAttribute("mod", "inner");
var isProtectStyleElModified = false;
/* further, there are two mutually exclusive situations: either there were changes the text of protectStyleEl,
either there was removes a whole child "text" element of protectStyleEl
we'll process both of them */
if (m.removedNodes.length > 0) {
for (var j = 0; j < m.removedNodes.length; j++) {
isProtectStyleElModified = true;
protectStyleEl.appendChild(m.removedNodes[j]);
}
} else {
if (m.oldValue) {
isProtectStyleElModified = true;
protectStyleEl.textContent = m.oldValue;
}
}
if (!isProtectStyleElModified) {
protectStyleEl.removeAttribute("mod");
}
}
});
innerObserver.observe(protectStyleEl, {
'childList': true,
'characterData': true,
'subtree': true,
'characterDataOldValue': true
});
};
/**
* Applies JS injections.
* @param scripts Array with JS scripts and scriptSource ('remote' or 'local')
*/
var applyScripts = function (scripts) {
if (!scripts || scripts.length === 0) {
return;
}
/**
* JS injections are created by JS filtering rules:
* http://adguard.com/en/filterrules.html#javascriptInjection
*/
executeScript(scripts);
};
/**
* Init listeners for error and load events.
* We will then check loaded elements if they are blocked by our extension.
* In this case we'll hide these blocked elements.
*/
var initCollapseEventListeners = function () {
document.addEventListener("error", checkShouldCollapse, true);
// We need to listen for load events to hide blocked iframes (they don't raise error event)
document.addEventListener("load", checkShouldCollapse, true);
};
/**
* Checks if loaded element is blocked by AG and should be hidden
* @param event Load or error event
*/
var checkShouldCollapse = function (event) {
var element = event.target;
var eventType = event.type;
var tagName = element.tagName.toLowerCase();
var expectedEventType = (tagName === "iframe" || tagName === "frame" || tagName === "embed") ? "load" : "error";
if (eventType !== expectedEventType) {
return;
}
checkShouldCollapseElement(element);
};
/**
* Extracts element URL from the dom node
* @param element DOM node
*/
var getElementUrl = function (element) {
var elementUrl = element.src || element.data;
if (!elementUrl ||
elementUrl.indexOf('http') !== 0 ||
// Some sources could not be set yet, lazy loaded images or smth.
// In some cases like on gog.com, collapsing these elements could break the page script loading their sources
elementUrl === element.baseURI) {
return null;
}
// truncate too long urls
// https://github.com/AdguardTeam/AdguardBrowserExtension/issues/1493
const MAX_URL_LENGTH = 16 * 1024;
if (elementUrl.length > MAX_URL_LENGTH) {
elementUrl = elementUrl.slice(0, MAX_URL_LENGTH);
}
return elementUrl;
};
/**
* Saves collapse request (to be reused after we get result from bg page)
* @param element Element to check
* @return request ID
*/
var saveCollapseRequest = function (element) {
var tagName = element.tagName.toLowerCase();
var requestId = collapseRequestId++;
collapseRequests[requestId] = {
element: element,
src: element.src,
tagName: tagName
};
return requestId;
};
/**
* Response callback for "processShouldCollapse" message.
* @param response Response got from the background page
*/
var onProcessShouldCollapseResponse = function (response) {
if (!response) {
return;
}
// Get original collapse request
var collapseRequest = collapseRequests[response.requestId];
if (!collapseRequest) {
return;
}
delete collapseRequests[response.requestId];
var element = collapseRequest.element;
if (response.collapse === true) {
var elementUrl = collapseRequest.src;
ElementCollapser.collapseElement(element, elementUrl);
}
};
/**
* Checks if element is blocked by AG and should be hidden
* @param element Element to check
*/
var checkShouldCollapseElement = function (element) {
var requestType = requestTypeMap[element.localName];
if (!requestType) {
return;
}
var elementUrl = getElementUrl(element);
if (!elementUrl) {
return;
}
if (ElementCollapser.isCollapsed(element)) {
return;
}
// Save request to a map (it will be used in response callback)
var requestId = saveCollapseRequest(element);
// Send a message to the background page to check if the element really should be collapsed
var message = {
type: 'processShouldCollapse',
elementUrl: elementUrl,
documentUrl: document.URL,
requestType: requestType,
requestId: requestId
};
getContentPage().sendMessage(message, onProcessShouldCollapseResponse);
};
/**
* Response callback for "processShouldCollapseMany" message.
* @param response Response from bg page.
*/
var onProcessShouldCollapseManyResponse = function (response) {
if (!response) {
return;
}
var requests = response.requests;
for (var i = 0; i < requests.length; i++) {
var collapseRequest = requests[i];
onProcessShouldCollapseResponse(collapseRequest);
}
};
/**
* Collects all elements from the page and checks if we should hide them.
*/
var checkBatchShouldCollapse = function () {
var requests = [];
// Collect collapse requests
for (var tagName in requestTypeMap) { // jshint ignore:line
var requestType = requestTypeMap[tagName];
var elements = document.getElementsByTagName(tagName);
for (var j = 0; j < elements.length; j++) {
var element = elements[j];
var elementUrl = getElementUrl(element);
if (!elementUrl) {
continue;
}
var requestId = saveCollapseRequest(element);
requests.push({
elementUrl: elementUrl,
requestType: requestType,
requestId: requestId,
tagName: tagName
});
}
}
var message = {
type: 'processShouldCollapseMany',
requests: requests,
documentUrl: document.URL
};
// Send all prepared requests in one message
getContentPage().sendMessage(message, onProcessShouldCollapseManyResponse);
};
/**
* This method is used when we need to check all page elements with collapse rules.
* We need this when the browser is just started and add-on is not yet initialized.
* In this case content scripts waits for add-on initialization and the
* checks all page elements.
*/
var initBatchCollapse = function () {
if (document.readyState === 'complete' ||
document.readyState === 'loaded' ||
document.readyState === 'interactive') {
checkBatchShouldCollapse();
} else {
document.addEventListener('DOMContentLoaded', checkBatchShouldCollapse);
}
};
/**
* Called when document become visible.
* https://github.com/AdguardTeam/AdguardBrowserExtension/issues/159
*/
var onVisibilityChange = function () {
if (document.hidden === false) {
document.removeEventListener("visibilitychange", onVisibilityChange);
init();
}
};
// Start the content script
init();
})();
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=795)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return l})),n.d(t,"h",(function(){return d})),n.d(t,"c",(function(){return p})),n.d(t,"e",(function(){return y})),n.d(t,"d",(function(){return v}));var r=n(2),i=function(){var e=[],t=[],n=new Set,s=function(n){return e.forEach((function(e){n.add(e.middleware,Object(r.__assign)({},e))})),t.forEach((function(e){n.addRelativeTo(e.middleware,Object(r.__assign)({},e))})),n},u=function(e){var t=[];return e.before.forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Object(r.__spread)(u(e)))})),t.push(e),e.after.reverse().forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Object(r.__spread)(u(e)))})),t},c=function(){var n,i=[],s=[],c={};return e.forEach((function(e){var t=Object(r.__assign)(Object(r.__assign)({},e),{before:[],after:[]});t.name&&(c[t.name]=t),i.push(t)})),t.forEach((function(e){var t=Object(r.__assign)(Object(r.__assign)({},e),{before:[],after:[]});t.name&&(c[t.name]=t),s.push(t)})),s.forEach((function(e){if(e.toMiddleware){var t=c[e.toMiddleware];if(void 0===t)throw new Error(e.toMiddleware+" is not found when adding "+(e.name||"anonymous")+" middleware "+e.relation+" "+e.toMiddleware);"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),(n=i,n.sort((function(e,t){return o[t.step]-o[e.step]||a[t.priority||"normal"]-a[e.priority||"normal"]}))).map(u).reduce((function(e,t){return e.push.apply(e,Object(r.__spread)(t)),e}),[]).map((function(e){return e.middleware}))},l={add:function(t,i){void 0===i&&(i={});var o=i.name,a=i.override,s=Object(r.__assign)({step:"initialize",priority:"normal",middleware:t},i);if(o){if(n.has(o)){if(!a)throw new Error("Duplicate middleware name '"+o+"'");var u=e.findIndex((function(e){return e.name===o})),c=e[u];if(c.step!==s.step||c.priority!==s.priority)throw new Error('"'+o+'" middleware with '+c.priority+" priority in "+c.step+" step cannot be overridden by same-name middleware with "+s.priority+" priority in "+s.step+" step.");e.splice(u,1)}n.add(o)}e.push(s)},addRelativeTo:function(e,i){var o=i.name,a=i.override,s=Object(r.__assign)({middleware:e},i);if(o){if(n.has(o)){if(!a)throw new Error("Duplicate middleware name '"+o+"'");var u=t.findIndex((function(e){return e.name===o})),c=t[u];if(c.toMiddleware!==s.toMiddleware||c.relation!==s.relation)throw new Error('"'+o+'" middleware '+c.relation+' "'+c.toMiddleware+'" middleware cannot be overridden by same-name middleware '+s.relation+' "'+s.toMiddleware+'" middleware.');t.splice(u,1)}n.add(o)}t.push(s)},clone:function(){return s(i())},use:function(e){e.applyToStack(l)},remove:function(r){return"string"==typeof r?function(r){var i=!1,o=function(e){return!e.name||e.name!==r||(i=!0,n.delete(r),!1)};return e=e.filter(o),t=t.filter(o),i}(r):function(r){var i=!1,o=function(e){return e.middleware!==r||(i=!0,e.name&&n.delete(e.name),!1)};return e=e.filter(o),t=t.filter(o),i}(r)},removeByTag:function(r){var i=!1,o=function(e){var t=e.tags,o=e.name;return!t||!t.includes(r)||(o&&n.delete(o),i=!0,!1)};return e=e.filter(o),t=t.filter(o),i},concat:function(e){var t=s(i());return t.use(e),t},applyToStack:s,resolve:function(e,t){var n,i;try{for(var o=Object(r.__values)(c().reverse()),a=o.next();!a.done;a=o.next()){e=(0,a.value)(e,t)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return e}};return l},o={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},a={high:3,normal:2,low:1},s=function(){function e(e){this.middlewareStack=i(),this.config=e}return e.prototype.send=function(e,t,n){var r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n,o=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return o(e).then((function(e){return e.output}));o(e).then((function(e){return i(null,e.output)}),(function(e){return i(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),u=function(){this.middlewareStack=i()};function c(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}var l=function(e){return Array.isArray(e)?e:[e]},d=function(e){for(var t in e)e.hasOwnProperty(t)&&void 0!==e[t]["#text"]?e[t]=e[t]["#text"]:"object"==typeof e[t]&&null!==e[t]&&(e[t]=d(e[t]));return e},f=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,Object(r.__spread)([null],arguments)),n=new t;return Object.setPrototypeOf(n,e.prototype),n};f.prototype=Object.create(String.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(f,String);var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.deserializeJSON=function(){return JSON.parse(e.prototype.toString.call(this))},t.prototype.toJSON=function(){return e.prototype.toString.call(this)},t.fromObject=function(e){return e instanceof t?e:new t(e instanceof String||"string"==typeof e?e:JSON.stringify(e))},t}(f),h=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],g=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function y(e){var t=e.getUTCFullYear(),n=e.getUTCMonth(),r=e.getUTCDay(),i=e.getUTCDate(),o=e.getUTCHours(),a=e.getUTCMinutes(),s=e.getUTCSeconds();return h[r]+", "+(i<10?"0"+i:""+i)+" "+g[n]+" "+t+" "+(o<10?"0"+o:""+o)+":"+(a<10?"0"+a:""+a)+":"+(s<10?"0"+s:""+s)+" GMT"}var v="***SensitiveInformation***"},function(e,t,n){"use strict";e.exports=n(666)},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return o})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return d})),n.d(t,"__createBinding",(function(){return f})),n.d(t,"__exportStar",(function(){return p})),n.d(t,"__values",(function(){return h})),n.d(t,"__read",(function(){return g})),n.d(t,"__spread",(function(){return y})),n.d(t,"__spreadArrays",(function(){return v})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return M})),n.d(t,"__asyncValues",(function(){return I})),n.d(t,"__makeTemplateObject",(function(){return w})),n.d(t,"__importStar",(function(){return N})),n.d(t,"__importDefault",(function(){return S})),n.d(t,"__classPrivateFieldGet",(function(){return x})),n.d(t,"__classPrivateFieldSet",(function(){return T}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function s(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function f(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function v(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function M(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function I(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function w(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function N(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function T(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return u}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function s(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Object.create;function u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}Object.create},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}));var r=function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}return e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers},e}(),i=n(2),o=function(){function e(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.substr(-1)?e.protocol+":":e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/"+e.path:e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,n=new e(Object(i.__assign)(Object(i.__assign)({},this),{headers:Object(i.__assign)({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var r,o=t[n];return Object(i.__assign)(Object(i.__assign)({},e),((r={})[n]=Array.isArray(o)?Object(i.__spread)(o):o,r))}),{}))),n},e}()},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return u})),n.d(t,"b",(function(){return c}));var r=n(54),i=n(182),o=n(305);class a extends Error{constructor(e,...t){var n,o,u;const{nodes:c,source:l,positions:d,path:f,originalError:p,extensions:h}=function(e){const t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=f?f:void 0,this.originalError=null!=p?p:void 0,this.nodes=s(Array.isArray(c)?c:c?[c]:void 0);const g=s(null===(n=this.nodes)||void 0===n?void 0:n.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=l?l:null==g||null===(o=g[0])||void 0===o?void 0:o.source,this.positions=null!=d?d:null==g?void 0:g.map((e=>e.start)),this.locations=d&&l?d.map((e=>Object(i.a)(l,e))):null==g?void 0:g.map((e=>Object(i.a)(e.source,e.start)));const y=Object(r.a)(null==p?void 0:p.extensions)?null==p?void 0:p.extensions:void 0;this.extensions=null!==(u=null!=h?h:y)&&void 0!==u?u:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=p&&p.stack?Object.defineProperty(this,"stack",{value:p.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,a):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const t of this.nodes)t.loc&&(e+="\n\n"+Object(o.a)(t.loc));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+Object(o.b)(this.source,t);return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function s(e){return void 0===e||0===e.length?void 0:e}function u(e){return e.toString()}function c(e){return e.toJSON()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));function r(e){return i(e,[])}function i(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:i(t,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const n=Math.min(10,e.length),r=e.length-n,o=[];for(let r=0;r<n;++r)o.push(i(e[r],t));1===r?o.push("... 1 more item"):r>1&&o.push(`... ${r} more items`);return"["+o.join(", ")+"]"}(e,n);return function(e,t){const n=Object.entries(e);if(0===n.length)return"{}";if(t.length>2)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";return"{ "+n.map((([e,n])=>e+": "+i(n,t))).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"ServerStyleSheet",(function(){return Ue})),n.d(t,"StyleSheetConsumer",(function(){return ie})),n.d(t,"StyleSheetContext",(function(){return re})),n.d(t,"StyleSheetManager",(function(){return le})),n.d(t,"ThemeConsumer",(function(){return Ce})),n.d(t,"ThemeContext",(function(){return Ee})),n.d(t,"ThemeProvider",(function(){return Oe})),n.d(t,"__PRIVATE__",(function(){return Fe})),n.d(t,"createGlobalStyle",(function(){return _e})),n.d(t,"css",(function(){return be})),n.d(t,"isStyledComponent",(function(){return M})),n.d(t,"keyframes",(function(){return Re})),n.d(t,"useTheme",(function(){return Ye})),n.d(t,"version",(function(){return w})),n.d(t,"withTheme",(function(){return Be}));var r=n(132),i=n(1),o=n.n(i),a=n(651),s=n.n(a),u=n(652),c=n(653),l=n(308),d=n(126),f=n.n(d);function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var h=function(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n},g=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!Object(r.typeOf)(e)},y=Object.freeze([]),v=Object.freeze({});function m(e){return"function"==typeof e}function b(e){return e.displayName||e.name||"Component"}function M(e){return e&&"string"==typeof e.styledComponentId}var I=void 0!==e&&(e.env.REACT_APP_SC_ATTR||e.env.SC_ATTR)||"data-styled",w="5.3.0",N="undefined"!=typeof window&&"HTMLElement"in window,S=Boolean(!0),x={};function T(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var D=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)(i<<=1)<0&&T(16,""+e);this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var o=r;o<i;o++)this.groupSizes[o]=0}for(var a=this.indexOfGroup(e+1),s=0,u=t.length;s<u;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var i=n;i<r;i++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,o=r;o<i;o++)t+=this.tag.getRule(o)+"/*!sc*/\n";return t},e}(),A=new Map,j=new Map,E=1,C=function(e){if(A.has(e))return A.get(e);for(;j.has(E);)E++;var t=E++;return A.set(e,t),j.set(t,e),t},O=function(e){return j.get(e)},k=function(e,t){A.set(e,t),j.set(t,e)},L="style["+I+'][data-styled-version="5.3.0"]',z=new RegExp("^"+I+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),P=function(e,t,n){for(var r,i=n.split(","),o=0,a=i.length;o<a;o++)(r=i[o])&&e.registerName(t,r)},_=function(e,t){for(var n=t.innerHTML.split("/*!sc*/\n"),r=[],i=0,o=n.length;i<o;i++){var a=n[i].trim();if(a){var s=a.match(z);if(s){var u=0|parseInt(s[1],10),c=s[2];0!==u&&(k(c,u),P(e,c,s[3]),e.getTag().insertRules(u,r)),r.length=0}else r.push(a)}}},R=function(){return"undefined"!=typeof window&&void 0!==window.__webpack_nonce__?window.__webpack_nonce__:null},U=function(e){var t=document.head,n=e||t,r=document.createElement("style"),i=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(I))return r}}(n),o=void 0!==i?i.nextSibling:null;r.setAttribute(I,"active"),r.setAttribute("data-styled-version","5.3.0");var a=R();return a&&r.setAttribute("nonce",a),n.insertBefore(r,o),r},B=function(){function e(e){var t=this.element=U(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var i=t[n];if(i.ownerNode===e)return i}T(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),Y=function(){function e(e){var t=this.element=U(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),F=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Q=N,G={isServer:!N,useCSSOMInjection:!S},Z=function(){function e(e,t,n){void 0===e&&(e=v),void 0===t&&(t={}),this.options=p({},G,{},e),this.gs=t,this.names=new Map(n),!this.options.isServer&&N&&Q&&(Q=!1,function(e){for(var t=document.querySelectorAll(L),n=0,r=t.length;n<r;n++){var i=t[n];i&&"active"!==i.getAttribute(I)&&(_(e,i),i.parentNode&&i.parentNode.removeChild(i))}}(this))}e.registerId=function(e){return C(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(p({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,i=t.target,e=n?new F(i):r?new B(i):new Y(i),new D(e)));var e,t,n,r,i},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(C(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(C(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(C(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",i=0;i<n;i++){var o=O(i);if(void 0!==o){var a=e.names.get(o),s=t.getGroup(i);if(void 0!==a&&0!==s.length){var u=I+".g"+i+'[id="'+o+'"]',c="";void 0!==a&&a.forEach((function(e){e.length>0&&(c+=e+",")})),r+=""+s+u+'{content:"'+c+'"}/*!sc*/\n'}}}return r}(this)},e}(),V=/(a)(d)/gi,H=function(e){return String.fromCharCode(e+(e>25?39:97))};function W(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=H(t%52)+n;return(H(t%52)+n).replace(V,"$1-$2")}var J=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},K=function(e){return J(5381,e)};function q(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(m(n)&&!M(n))return!1}return!0}var X=K("5.3.0"),$=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&q(e),this.componentId=t,this.baseHash=J(X,t),this.baseStyle=n,Z.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,i=[];if(this.baseStyle&&i.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))i.push(this.staticRulesId);else{var o=me(this.rules,e,t,n).join(""),a=W(J(this.baseHash,o.length)>>>0);if(!t.hasNameForId(r,a)){var s=n(o,"."+a,void 0,r);t.insertRules(r,a,s)}i.push(a),this.staticRulesId=a}else{for(var u=this.rules.length,c=J(this.baseHash,n.hash),l="",d=0;d<u;d++){var f=this.rules[d];if("string"==typeof f)l+=f;else if(f){var p=me(f,e,t,n),h=Array.isArray(p)?p.join(""):p;c=J(c,h+d),l+=h}}if(l){var g=W(c>>>0);if(!t.hasNameForId(r,g)){var y=n(l,"."+g,void 0,r);t.insertRules(r,g,y)}i.push(g)}}return i.join(" ")},e}(),ee=/^\s*\/\/.*$/gm,te=[":","[",".","#"];function ne(e){var t,n,r,i,o=void 0===e?v:e,a=o.options,s=void 0===a?v:a,c=o.plugins,l=void 0===c?y:c,d=new u.a(s),f=[],p=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,i,o,a,s,u,c,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(i[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){f.push(e)})),h=function(e,r,o){return 0===r&&-1!==te.indexOf(o[n.length])||o.match(i)?e:"."+t};function g(e,o,a,s){void 0===s&&(s="&");var u=e.replace(ee,""),c=o&&a?a+" "+o+" { "+u+" }":u;return t=s,n=o,r=new RegExp("\\"+n+"\\b","g"),i=new RegExp("(\\"+n+"\\b){2,}"),d(a||!o?"":o,c)}return d.use([].concat(l,[function(e,t,i){2===e&&i.length&&i[0].lastIndexOf(n)>0&&(i[0]=i[0].replace(r,h))},p,function(e){if(-2===e){var t=f;return f=[],t}}])),g.hash=l.length?l.reduce((function(e,t){return t.name||T(15),J(e,t.name)}),5381).toString():"",g}var re=o.a.createContext(),ie=re.Consumer,oe=o.a.createContext(),ae=(oe.Consumer,new Z),se=ne();function ue(){return Object(i.useContext)(re)||ae}function ce(){return Object(i.useContext)(oe)||se}function le(e){var t=Object(i.useState)(e.stylisPlugins),n=t[0],r=t[1],a=ue(),u=Object(i.useMemo)((function(){var t=a;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),c=Object(i.useMemo)((function(){return ne({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return Object(i.useEffect)((function(){s()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),o.a.createElement(re.Provider,{value:u},o.a.createElement(oe.Provider,{value:c},e.children))}var de=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=se);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return T(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=se),this.name+e.hash},e}(),fe=/([A-Z])/,pe=/([A-Z])/g,he=/^ms-/,ge=function(e){return"-"+e.toLowerCase()};function ye(e){return fe.test(e)?e.replace(pe,ge).replace(he,"-ms-"):e}var ve=function(e){return null==e||!1===e||""===e};function me(e,t,n,r){if(Array.isArray(e)){for(var i,o=[],a=0,s=e.length;a<s;a+=1)""!==(i=me(e[a],t,n,r))&&(Array.isArray(i)?o.push.apply(o,i):o.push(i));return o}return ve(e)?"":M(e)?"."+e.styledComponentId:m(e)?"function"!=typeof(u=e)||u.prototype&&u.prototype.isReactComponent||!t?e:me(e(t),t,n,r):e instanceof de?n?(e.inject(n,r),e.getName(r)):e:g(e)?function e(t,n){var r,i,o=[];for(var a in t)t.hasOwnProperty(a)&&!ve(t[a])&&(g(t[a])?o.push.apply(o,e(t[a],a)):m(t[a])?o.push(ye(a)+":",t[a],";"):o.push(ye(a)+": "+(r=a,(null==(i=t[a])||"boolean"==typeof i||""===i?"":"number"!=typeof i||0===i||r in c.a?String(i).trim():i+"px")+";")));return n?[n+" {"].concat(o,["}"]):o}(e):e.toString();var u}function be(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return m(e)||g(e)?me(h(y,[e].concat(n))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:me(h(e,n))}new Set;var Me=function(e,t,n){return void 0===n&&(n=v),e.theme!==n.theme&&e.theme||t||n.theme},Ie=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,we=/(^-|-$)/g;function Ne(e){return e.replace(Ie,"-").replace(we,"")}var Se=function(e){return W(K(e)>>>0)};function xe(e){return"string"==typeof e&&!0}var Te=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},De=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Ae(e,t,n){var r=e[n];Te(t)&&Te(r)?je(r,t):e[n]=t}function je(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];if(Te(a))for(var s in a)De(s)&&Ae(e,a[s],s)}return e}var Ee=o.a.createContext(),Ce=Ee.Consumer;function Oe(e){var t=Object(i.useContext)(Ee),n=Object(i.useMemo)((function(){return function(e,t){return e?m(e)?e(t):Array.isArray(e)||"object"!=typeof e?T(8):t?p({},t,{},e):e:T(14)}(e.theme,t)}),[e.theme,t]);return e.children?o.a.createElement(Ee.Provider,{value:n},e.children):null}var ke={};function Le(e,t,n){var r=M(e),a=!xe(e),s=t.attrs,u=void 0===s?y:s,c=t.componentId,d=void 0===c?function(e,t){var n="string"!=typeof e?"sc":Ne(e);ke[n]=(ke[n]||0)+1;var r=n+"-"+Se("5.3.0"+n+ke[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):c,h=t.displayName,g=void 0===h?function(e){return xe(e)?"styled."+e:"Styled("+b(e)+")"}(e):h,I=t.displayName&&t.componentId?Ne(t.displayName)+"-"+t.componentId:t.componentId||d,w=r&&e.attrs?Array.prototype.concat(e.attrs,u).filter(Boolean):u,N=t.shouldForwardProp;r&&e.shouldForwardProp&&(N=t.shouldForwardProp?function(n,r,i){return e.shouldForwardProp(n,r,i)&&t.shouldForwardProp(n,r,i)}:e.shouldForwardProp);var S,x=new $(n,I,r?e.componentStyle:void 0),T=x.isStatic&&0===u.length,D=function(e,t){return function(e,t,n,r){var o=e.attrs,a=e.componentStyle,s=e.defaultProps,u=e.foldedComponentIds,c=e.shouldForwardProp,d=e.styledComponentId,f=e.target,h=function(e,t,n){void 0===e&&(e=v);var r=p({},t,{theme:e}),i={};return n.forEach((function(e){var t,n,o,a=e;for(t in m(a)&&(a=a(r)),a)r[t]=i[t]="className"===t?(n=i[t],o=a[t],n&&o?n+" "+o:n||o):a[t]})),[r,i]}(Me(t,Object(i.useContext)(Ee),s)||v,t,o),g=h[0],y=h[1],b=function(e,t,n,r){var i=ue(),o=ce();return t?e.generateAndInjectStyles(v,i,o):e.generateAndInjectStyles(n,i,o)}(a,r,g),M=n,I=y.$as||t.$as||y.as||t.as||f,w=xe(I),N=y!==t?p({},t,{},y):t,S={};for(var x in N)"$"!==x[0]&&"as"!==x&&("forwardedAs"===x?S.as=N[x]:(c?c(x,l.a,I):!w||Object(l.a)(x))&&(S[x]=N[x]));return t.style&&y.style!==t.style&&(S.style=p({},t.style,{},y.style)),S.className=Array.prototype.concat(u,d,b!==d?b:null,t.className,y.className).filter(Boolean).join(" "),S.ref=M,Object(i.createElement)(I,S)}(S,e,t,T)};return D.displayName=g,(S=o.a.forwardRef(D)).attrs=w,S.componentStyle=x,S.displayName=g,S.shouldForwardProp=N,S.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):y,S.styledComponentId=I,S.target=r?e.target:e,S.withComponent=function(e){var r=t.componentId,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["componentId"]),o=r&&r+"-"+(xe(e)?e:Ne(b(e)));return Le(e,p({},i,{attrs:w,componentId:o}),n)},Object.defineProperty(S,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?je({},e.defaultProps,t):t}}),S.toString=function(){return"."+S.styledComponentId},a&&f()(S,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),S}var ze=function(e){return function e(t,n,i){if(void 0===i&&(i=v),!Object(r.isValidElementType)(n))return T(1,String(n));var o=function(){return t(n,i,be.apply(void 0,arguments))};return o.withConfig=function(r){return e(t,n,p({},i,{},r))},o.attrs=function(r){return e(t,n,p({},i,{attrs:Array.prototype.concat(i.attrs,r).filter(Boolean)}))},o}(Le,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){ze[e]=ze(e)}));var Pe=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=q(e),Z.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var i=r(me(this.rules,t,n,r).join(""),""),o=this.componentId+e;n.insertRules(o,o,i)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&Z.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function _e(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=be.apply(void 0,[e].concat(n)),s="sc-global-"+Se(JSON.stringify(a)),u=new Pe(a,s);function c(e){var t=ue(),n=ce(),r=Object(i.useContext)(Ee),o=Object(i.useRef)(t.allocateGSInstance(s)).current;return Object(i.useLayoutEffect)((function(){return l(o,e,t,r,n),function(){return u.removeStyles(o,t)}}),[o,e,t,r,n]),null}function l(e,t,n,r,i){if(u.isStatic)u.renderStyles(e,x,n,i);else{var o=p({},t,{theme:Me(t,r,c.defaultProps)});u.renderStyles(e,o,n,i)}}return o.a.memo(c)}function Re(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=be.apply(void 0,[e].concat(n)).join(""),o=Se(i);return new de(o,i)}var Ue=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),n=R();return"<style "+[n&&'nonce="'+n+'"',I+'="true"','data-styled-version="5.3.0"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?T(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return T(2);var n=((t={})[I]="",t["data-styled-version"]="5.3.0",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=R();return r&&(n.nonce=r),[o.a.createElement("style",p({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new Z({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?T(2):o.a.createElement(le,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return T(3)},e}(),Be=function(e){var t=o.a.forwardRef((function(t,n){var r=Object(i.useContext)(Ee),a=e.defaultProps,s=Me(t,r,a);return o.a.createElement(e,p({},t,{theme:s,ref:n}))}));return f()(t,e),t.displayName="WithTheme("+b(e)+")",t},Ye=function(){return Object(i.useContext)(Ee)},Fe={StyleSheet:Z,masterSheet:ae};t.default=ze}.call(this,n(129))},function(e,t,n){e.exports=n(670)()},function(e,t,n){"use strict";n.d(t,"f",(function(){return S})),n.d(t,"t",(function(){return x})),n.d(t,"y",(function(){return T})),n.d(t,"s",(function(){return A})),n.d(t,"e",(function(){return j})),n.d(t,"x",(function(){return C})),n.d(t,"g",(function(){return O})),n.d(t,"h",(function(){return k})),n.d(t,"d",(function(){return P})),n.d(t,"c",(function(){return _})),n.d(t,"b",(function(){return R})),n.d(t,"a",(function(){return z})),n.d(t,"u",(function(){return U})),n.d(t,"v",(function(){return Y})),n.d(t,"i",(function(){return F})),n.d(t,"w",(function(){return Q})),n.d(t,"z",(function(){return G})),n.d(t,"j",(function(){return Z})),n.d(t,"p",(function(){return V})),n.d(t,"k",(function(){return H})),n.d(t,"q",(function(){return W})),n.d(t,"l",(function(){return J})),n.d(t,"n",(function(){return K})),n.d(t,"r",(function(){return q})),n.d(t,"o",(function(){return X})),n.d(t,"m",(function(){return $}));var r=n(19);function i(e){var t=new Error(e);return t.source="ulid",t}var o="0123456789ABCDEFGHJKMNPQRSTVWXYZ",a=o.length,s=Math.pow(2,48)-1;function u(e,t,n){return t>e.length-1?e:e.substr(0,t)+n+e.substr(t+1)}function c(e){var t=Math.floor(e()*a);return t===a&&(t=a-1),o.charAt(t)}function l(e,t){if(isNaN(e))throw new Error(e+" must be a number");if(e>s)throw i("cannot encode time greater than "+s);if(e<0)throw i("time must be positive");if(!1===Number.isInteger(e))throw i("time must be an integer");for(var n=void 0,r="";t>0;t--)r=o.charAt(n=e%a)+r,e=(e-n)/a;return r}function d(e,t){for(var n="";e>0;e--)n=c(t)+n;return n}function f(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments[1];t||(t="undefined"!=typeof window?window:null);var r=t&&(t.crypto||t.msCrypto);if(r)return function(){var e=new Uint8Array(1);return r.getRandomValues(e),e[0]/255};try{var o=n(464);return function(){return o.randomBytes(1).readUInt8()/255}}catch(e){}if(e)return function(){return Math.random()};throw i("secure crypto unusable, insecure Math.random not allowed")}function p(e){e||(e=f());var t=0,n=void 0;return function(r){if(isNaN(r)&&(r=Date.now()),r<=t){var s=n=function(e){for(var t=void 0,n=e.length,r=void 0,s=void 0,c=a-1;!t&&n-- >=0;){if(r=e[n],-1===(s=o.indexOf(r)))throw i("incorrectly encoded string");s!==c?t=u(e,n,o[s+1]):e=u(e,n,o[0])}if("string"==typeof t)return t;throw i("cannot increment this string")}(n);return l(t,10)+s}t=r;var c=n=d(16,e);return l(r,10)+c}}h||(h=f());var h,g,y=n(147),v=n(12),m=n(43),b=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},M=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},I=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},w=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},N=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(I(arguments[t]));return e},S=function(e,t){if(void 0===t&&(t=!0),t)throw new Error("Invalid "+e)},x=function(e){return void 0===e||null==e},T=function(e,t,n){var r,i=!1;if(0===n.length)return!0;switch(t){case"not":r="every",i=!0;break;case"and":r="every";break;case"or":r="some";break;default:S(t)}var o=n[r]((function(t){if(Object(v.n)(t)){var n=t.field,r=t.operator,i=t.operand,o=e[n];return D(o,r,i)}if(Object(v.m)(t)){var a=t.type,s=t.predicates;return T(e,a,s)}throw new Error("Not a predicate or group")}));return i?!o:o},D=function(e,t,n){switch(t){case"ne":return e!==n;case"eq":return e===n;case"le":return e<=n;case"lt":return e<n;case"ge":return e>=n;case"gt":return e>n;case"between":var r=I(n,2),i=r[0],o=r[1];return e>=i&&e<=o;case"beginsWith":return e.startsWith(n);case"contains":return e.indexOf(n)>-1;case"notContains":return-1===e.indexOf(n);default:return S(t,!1),!1}},A=function(e){return e&&"function"==typeof e.copyOf},j=function(e){var t={};return Object.keys(e.models).forEach((function(n){t[n]={indexes:[],relationTypes:[]};var r=e.models[n];Object.keys(r.fields).forEach((function(e){var i=r.fields[e];if("object"==typeof i.type&&"model"in i.type){var o=i.association.connectionType;t[n].relationTypes.push({fieldName:i.name,modelName:i.type.model,relationType:o,targetName:i.association.targetName,associatedWith:i.association.associatedWith}),"BELONGS_TO"===o&&t[n].indexes.push(i.association.targetName)}})),r.attributes&&r.attributes.forEach((function(e){if("key"===e.type){var r=e.properties.fields;r&&r.forEach((function(e){t[n].indexes.includes(e)||t[n].indexes.push(e)}))}}))})),t},E=new WeakMap,C=function(e,t,n,r,i){var o=n.relationships,a=i(n.name,e),s=o[e],u=[],c=a.copyOf(t,(function(e){s.relationTypes.forEach((function(o){var a=i(n.name,o.modelName);switch(o.relationType){case"HAS_ONE":if(t[o.fieldName]){var s=void 0;try{s=r(a,t[o.fieldName])}catch(e){}u.push({modelName:o.modelName,item:t[o.fieldName],instance:s}),e[o.fieldName]=e[o.fieldName].id}break;case"BELONGS_TO":if(t[o.fieldName]){s=void 0;try{s=r(a,t[o.fieldName])}catch(e){}e[o.fieldName]._deleted||u.push({modelName:o.modelName,item:t[o.fieldName],instance:s})}e[o.targetName]=e[o.fieldName]?e[o.fieldName].id:null,delete e[o.fieldName];break;case"HAS_MANY":break;default:S(o.relationType)}}))}));u.unshift({modelName:e,item:c,instance:c}),E.has(n)||E.set(n,Array.from(n.modelTopologicalOrdering.keys()));var l=E.get(n);return u.sort((function(e,t){return l.indexOf(e.modelName)-l.indexOf(t.modelName)})),u},O=function(e,t){var n="";return e.some((function(e){e.modelName===t&&(n=e.targetName)})),n},k=function(e,t){return e.find((function(e){return e===t}))};!function(e){e.DATASTORE="datastore",e.USER="user",e.SYNC="sync",e.STORAGE="storage"}(g||(g={}));var L,z=g.DATASTORE,P=g.USER,_=g.SYNC,R=g.STORAGE,U=function(){return new Promise((function(e){var t,n=Object(y.v4)(),r=function(){L=!1,e(!0)},i=function(){return b(void 0,void 0,void 0,(function(){return M(this,(function(r){switch(r.label){case 0:return t&&t.result&&"function"==typeof t.result.close?[4,t.result.close()]:[3,2];case 1:r.sent(),r.label=2;case 2:return[4,indexedDB.deleteDatabase(n)];case 3:return r.sent(),L=!0,[2,e(!1)]}}))}))};return!0===L?i():!1===L||null===indexedDB?r():((t=indexedDB.open(n)).onerror=r,void(t.onsuccess=i))}))},B=function(){return(e=1,r.Buffer.from((new m.j).random(e).toString(),"hex")).readUInt8(0)/255;var e};function Y(e){var t=p(B);return function(){return t(e)}}function F(){return"undefined"!=typeof performance&&performance&&"function"==typeof performance.now?0|performance.now():Date.now()}function Q(e){return function(t,n){var r,i;try{for(var o=w(e),a=o.next();!a.done;a=o.next()){var s=a.value,u=s.field,c=s.sortDirection===v.h.ASCENDING?1:-1;if(t[u]<n[u])return-1*c;if(t[u]>n[u])return 1*c}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return 0}}function G(e,t,n){var r,i;void 0===n&&(n=!1);var o,a,s=e,u=t;if(s instanceof Object&&!(u instanceof Object)||!(s instanceof Object)&&u instanceof Object)return!1;if(!(s instanceof Object))return!(!n||(o=s,a=u,null!=o||null!=a))||s===u;if(Array.isArray(s)&&!Array.isArray(u)||Array.isArray(u)&&!Array.isArray(s))return!1;s instanceof Set&&u instanceof Set&&(s=N(s),u=N(u)),s instanceof Map&&u instanceof Map&&(s=Object.fromEntries(s),u=Object.fromEntries(u));var c=Object.keys(s),l=Object.keys(u);if(c.length!==l.length&&(!n||Array.isArray(s)))return!1;var d=c.length>=l.length?c:l;try{for(var f=w(d),p=f.next();!p.done;p=f.next()){var h=p.value;if(!G(s[h],u[h],n))return!1}}catch(e){r={error:e}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}return!0}var Z=function(e){return!!/^\d{4}-\d{2}-\d{2}(Z|[+-]\d{2}:\d{2}($|:\d{2}))?$/.exec(e)},V=function(e){return!!/^\d{2}:\d{2}(:\d{2}(.\d+)?)?(Z|[+-]\d{2}:\d{2}($|:\d{2}))?$/.exec(e)},H=function(e){return!!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(.\d+)?)?(Z|[+-]\d{2}:\d{2}($|:\d{2}))?$/.exec(e)},W=function(e){return!!/^\d+$/.exec(String(e))},J=function(e){return!!/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.exec(e)},K=function(e){try{return JSON.parse(e),!0}catch(e){return!1}},q=function(e){try{return!!new URL(e)}catch(e){return!1}},X=function(e){return!!/^\+?\d[\d\s-]+$/.exec(e)},$=function(e){return!!/((^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0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[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?$))$/.exec(e)}},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"o",(function(){return h})),n.d(t,"p",(function(){return g})),n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"j",(function(){return y})),n.d(t,"k",(function(){return v})),n.d(t,"l",(function(){return m})),n.d(t,"i",(function(){return b})),n.d(t,"f",(function(){return a})),n.d(t,"n",(function(){return M})),n.d(t,"m",(function(){return I})),n.d(t,"g",(function(){return s})),n.d(t,"h",(function(){return u})),n.d(t,"a",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"q",(function(){return w})),n.d(t,"b",(function(){return N}));var r,i,o,a,s,u,c,l,d=n(10),f=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},p=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};function h(e){return e&&void 0!==e.pluralName}function g(e){return e&&e.targetName}function y(e){return e&&void 0!==o[e]}function v(e){return!(!e||!e.model)}function m(e){return!(!e||!e.nonModel)}function b(e){return!(!e||!e.enum)}function M(e){return e&&void 0!==e.field}function I(e){return e&&void 0!==e.type}function w(e,t){return f(this,void 0,void 0,(function(){return p(this,(function(n){return[2,{modelConstructor:e,conditionProducer:t}]}))}))}!function(e){e.OWNER="owner",e.GROUPS="groups",e.PRIVATE="private",e.PUBLIC="public"}(r||(r={})),function(e){e.USER_POOLS="userPools",e.OIDC="oidc",e.IAM="iam",e.API_KEY="apiKey"}(i||(i={})),function(e){e[e.ID=0]="ID",e[e.String=1]="String",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Boolean=4]="Boolean",e[e.AWSDate=5]="AWSDate",e[e.AWSTime=6]="AWSTime",e[e.AWSDateTime=7]="AWSDateTime",e[e.AWSTimestamp=8]="AWSTimestamp",e[e.AWSEmail=9]="AWSEmail",e[e.AWSJSON=10]="AWSJSON",e[e.AWSURL=11]="AWSURL",e[e.AWSPhone=12]="AWSPhone",e[e.AWSIPAddress=13]="AWSIPAddress"}(o||(o={})),function(e){e.getJSType=function(e){switch(e){case"Boolean":return"boolean";case"ID":case"String":case"AWSDate":case"AWSTime":case"AWSDateTime":case"AWSEmail":case"AWSJSON":case"AWSURL":case"AWSPhone":case"AWSIPAddress":return"string";case"Int":case"Float":case"AWSTimestamp":return"number";default:Object(d.f)(e)}},e.getValidationFunction=function(e){switch(e){case"AWSDate":return d.j;case"AWSTime":return d.p;case"AWSDateTime":return d.k;case"AWSTimestamp":return d.q;case"AWSEmail":return d.l;case"AWSJSON":return d.n;case"AWSURL":return d.r;case"AWSPhone":return d.o;case"AWSIPAddress":return d.m;default:return}}}(o||(o={})),function(e){e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"}(a||(a={})),function(e){e[e.FIRST=0]="FIRST",e[e.LAST=1]="LAST"}(s||(s={})),function(e){e.ASCENDING="ASCENDING",e.DESCENDING="DESCENDING"}(u||(u={})),function(e){e.DEFAULT="DEFAULT",e.MULTI_AUTH="MULTI_AUTH"}(c||(c={})),function(e){e.CREATE="CREATE",e.READ="READ",e.UPDATE="UPDATE",e.DELETE="DELETE"}(l||(l={}));var N=Symbol("DISCARD")},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(35),i=n(72),o=(n(172),n(119),{userAgent:i.a.userAgent});r.a},function(e,t,n){"use strict";var r={getTabId:function(){return new Promise(((e,t)=>{chrome.runtime.sendMessage({action:"appMgr.getTabId",data:{},sender:location.href},(t=>{e(t)}))}))},sendMessage:function(e,t){return new Promise(((n,r)=>{chrome.runtime.sendMessage({action:e,data:t,sender:location.href},(e=>{n(e)}))}))}};t.a=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"e",(function(){return v})),n.d(t,"c",(function(){return m})),n.d(t,"b",(function(){return b})),n.d(t,"d",(function(){return M})),n.d(t,"j",(function(){return I})),n.d(t,"k",(function(){return w})),n.d(t,"i",(function(){return N})),n.d(t,"h",(function(){return S})),n.d(t,"g",(function(){return x})),n.d(t,"f",(function(){return T}));var r,i,o=n(48),a=n(51),s=n(12),u=n(10),c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},l=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},d=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},f=new a.a("DataStore");!function(e){e.LIST="query",e.CREATE="mutation",e.UPDATE="mutation",e.DELETE="mutation",e.GET="query"}(r||(r={})),function(e){e.CREATE="Create",e.UPDATE="Update",e.DELETE="Delete",e.GET="Get"}(i||(i={}));var p={_version:void 0,_lastChangedAt:void 0,_deleted:void 0},h=Object.keys(p);function g(e,t){var n=y(t),r=function(e,t){var n=[];return Object.values(t.fields).forEach((function(t){var r=t.name,i=t.type;if(Object(s.l)(i)){var o=e.nonModels[i.nonModel],a=Object.values(y(o)).map((function(e){return e.name})),u=[];Object.values(o.fields).forEach((function(t){var n=t.type,r=t.name;if(Object(s.l)(n)){var i=e.nonModels[n.nonModel];u.push(r+" { "+g(e,i)+" }")}})),n.push(r+" { "+a.join(" ")+" "+u.join(" ")+" }")}})),n}(e,t),i=function(e,t){var n=function(e){var t=[];Object(s.o)(e)&&e.attributes&&e.attributes.forEach((function(e){if(e.properties&&e.properties.rules){var n=e.properties.rules.find((function(e){return"owner"===e.allow}));n&&n.ownerField&&t.push(n.ownerField)}}));return t}(e);if(!t.owner&&n.includes("owner"))return["owner"];return[]}(t,n),o=Object.values(n).map((function(e){return e.name})).concat(i).concat(r);return Object(s.o)(t)&&(o=o.concat(h).concat(function(e){var t=[];return Object.values(e.fields).filter((function(e){var t=e.association;return t&&Object.keys(t).length})).forEach((function(e){var n=e.name,r=e.association,i=r.connectionType;switch(i){case"HAS_ONE":case"HAS_MANY":break;case"BELONGS_TO":Object(s.p)(r)&&t.push(n+" { id _deleted }");break;default:Object(u.f)(i)}})),t}(t))),o.join("\n")}function y(e){var t=e.fields;return Object.values(t).filter((function(e){return!(!Object(s.j)(e.type)&&!Object(s.i)(e.type))})).reduce((function(e,t){return e[t.name]=t,e}),{})}function v(e){var t=([].concat(e.attributes).find((function(e){return e&&"auth"===e.type}))||{}).properties,n=(void 0===t?{}:t).rules,r=[];return(void 0===n?[]:n).forEach((function(t){var n=t.identityClaim,i=void 0===n?"cognito:username":n,o=t.ownerField,a=void 0===o?"owner":o,s=t.operations,u=void 0===s?["create","update","delete","read"]:s,c=t.provider,l=void 0===c?"userPools":c,d=t.groupClaim,f=void 0===d?"cognito:groups":d,p=t.allow,h=void 0===p?"iam":p,g=t.groups,y=void 0===g?[]:g,v="owner"===h;if(u.includes("read")||v){var m={identityClaim:i,ownerField:a,provider:l,groupClaim:f,authStrategy:h,groups:y,areSubscriptionsPublic:!1};if(v){var b=([].concat(e.attributes).find((function(e){return e&&"model"===e.type}))||{}).properties,M=(void 0===b?{}:b).subscriptions,I=(void 0===M?{}:M).level,w=void 0===I?"on":I;m.areSubscriptionsPublic=!u.includes("read")||"public"===w}v?r.push(m):r.unshift(m)}})),r}function m(e,t,n,r,i){var o=g(e,t),a=t.name,s=(t.pluralName,"on"+n+a),u="",c="";return r&&(u="($"+i+": String!)",c="("+i+": $"+i+")"),[n,s,"subscription operation"+u+"{\n\t\t\t"+s+c+"{\n\t\t\t\t"+o+"\n\t\t\t}\n\t\t}"]}function b(e,t,n){var o,a,s=g(e,t),c=t.name,l=t.pluralName,d=" ",f=" ";switch(n){case"LIST":o="sync"+l,d="($limit: Int, $nextToken: String, $lastSync: AWSTimestamp, $filter: Model"+c+"FilterInput)",f="(limit: $limit, nextToken: $nextToken, lastSync: $lastSync, filter: $filter)",s="items {\n\t\t\t\t\t\t\t"+s+"\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnextToken\n\t\t\t\t\t\tstartedAt";break;case"CREATE":o="create"+c,d="($input: Create"+c+"Input!)",f="(input: $input)",a=i.CREATE;break;case"UPDATE":o="update"+c,d="($input: Update"+c+"Input!, $condition: Model"+c+"ConditionInput)",f="(input: $input, condition: $condition)",a=i.UPDATE;break;case"DELETE":o="delete"+c,d="($input: Delete"+c+"Input!, $condition: Model"+c+"ConditionInput)",f="(input: $input, condition: $condition)",a=i.DELETE;break;case"GET":o="get"+c,d="($id: ID!)",f="(id: $id)",a=i.GET;break;default:Object(u.f)(n)}return[[a,o,r[n]+" operation"+d+"{\n\t\t"+o+f+"{\n\t\t\t"+s+"\n\t\t}\n\t}"]]}function M(e,t,n,r,o,a,l,d,f){var p;switch(n){case s.f.INSERT:p=i.CREATE;break;case s.f.UPDATE:p=i.UPDATE;break;case s.f.DELETE:p=i.DELETE;break;default:Object(u.f)(n)}return d(l,c(c({},f?{id:f}:{}),{data:JSON.stringify(o),modelId:o.id,model:r.name,operation:p,condition:JSON.stringify(a)}))}function I(e){var t={};return e&&Array.isArray(e.predicates)?(e.predicates.forEach((function(e){var n;if(Object(s.n)(e)){var r=e.field,i=e.operator,o=e.operand;if("id"===r)return;t[r]=((n={})[i]=o,n)}else t[e.type]=I(e)})),t):t}function w(e){var t={};if(!e||!Array.isArray(e.predicates))return t;var n=e.type,r=e.predicates,i="and"===n||"or"===n;t[n]=i?[]:{};var o=function(e){return i?t[n].push(e):t[n]=e};return r.forEach((function(e){var t,n;if(Object(s.n)(e)){var r=e.field,i=e.operator,a=e.operand,u=((t={})[r]=((n={})[i]=a,n),t);o(u)}else o(w(e))})),t}function N(e,t){var n=e[t.groupClaim]||[];if("string"==typeof n){var r=void 0;try{r=JSON.parse(n)}catch(e){r=n}n=[].concat(r)}return n}function S(e){var t=e.authModeStrategy,n=e.defaultAuthMode,r=e.modelName,i=e.schema;return l(this,void 0,void 0,(function(){var e,o,a,u=this;return d(this,(function(c){switch(c.label){case 0:e=Object.values(s.e),o={CREATE:[],READ:[],UPDATE:[],DELETE:[]},c.label=1;case 1:return c.trys.push([1,3,,4]),[4,Promise.all(e.map((function(e){return l(u,void 0,void 0,(function(){var a;return d(this,(function(s){switch(s.label){case 0:return[4,t({schema:i,modelName:r,operation:e})];case 1:return"string"==typeof(a=s.sent())?o[e]=[a]:Array.isArray(a)&&a.length?o[e]=a:o[e]=[n],[2]}}))}))})))];case 2:return c.sent(),[3,4];case 3:return a=c.sent(),f.debug("Error getting auth modes for model: "+r,a),[3,4];case 4:return[2,o]}}))}))}function x(e){var t,n=["Request failed with status code 401","Request failed with status code 403"];return e&&e.errors?t=e.errors.find((function(e){return n.includes(e.message)})):e&&e.message&&(t=e),t?t.message:null}function T(e){var t=Object.values(o.b);return e&&e.message&&t.find((function(t){return e.message.includes(t)}))||null}},function(e,t,n){"use strict";n.r(t),n.d(t,"Provider",(function(){return d})),n.d(t,"connectAdvanced",(function(){return S})),n.d(t,"ReactReduxContext",(function(){return o})),n.d(t,"connect",(function(){return B})),n.d(t,"batch",(function(){return K.unstable_batchedUpdates})),n.d(t,"useDispatch",(function(){return Z})),n.d(t,"createDispatchHook",(function(){return G})),n.d(t,"useSelector",(function(){return J})),n.d(t,"createSelectorHook",(function(){return H})),n.d(t,"useStore",(function(){return Q})),n.d(t,"createStoreHook",(function(){return F})),n.d(t,"shallowEqual",(function(){return T}));var r=n(1),i=n.n(r),o=(n(9),i.a.createContext(null));var a=function(e){e()},s={notify:function(){}};function u(){var e=a,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var c=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=s,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=u())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=s)},e}(),l="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect;var d=function(e){var t=e.store,n=e.context,a=e.children,s=Object(r.useMemo)((function(){var e=new c(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),u=Object(r.useMemo)((function(){return t.getState()}),[t]);l((function(){var e=s.subscription;return e.trySubscribe(),u!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[s,u]);var d=n||o;return i.a.createElement(d.Provider,{value:s},a)},f=n(46),p=n(81),h=n(126),g=n.n(h),y=n(132),v=[],m=[null,null];function b(e,t){var n=e[1];return[t.payload,n+1]}function M(e,t,n){l((function(){return e.apply(void 0,t)}),n)}function I(e,t,n,r,i,o,a){e.current=r,t.current=i,n.current=!1,o.current&&(o.current=null,a())}function w(e,t,n,r,i,o,a,s,u,c){if(e){var l=!1,d=null,f=function(){if(!l){var e,n,f=t.getState();try{e=r(f,i.current)}catch(e){n=e,d=e}n||(d=null),e===o.current?a.current||u():(o.current=e,s.current=e,a.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=f,n.trySubscribe(),f();return function(){if(l=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var N=function(){return[null,0]};function S(e,t){void 0===t&&(t={});var n=t,a=n.getDisplayName,s=void 0===a?function(e){return"ConnectAdvanced("+e+")"}:a,u=n.methodName,l=void 0===u?"connectAdvanced":u,d=n.renderCountProp,h=void 0===d?void 0:d,S=n.shouldHandleStateChanges,x=void 0===S||S,T=n.storeKey,D=void 0===T?"store":T,A=(n.withRef,n.forwardRef),j=void 0!==A&&A,E=n.context,C=void 0===E?o:E,O=Object(p.a)(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),k=C;return function(t){var n=t.displayName||t.name||"Component",o=s(n),a=Object(f.a)({},O,{getDisplayName:s,methodName:l,renderCountProp:h,shouldHandleStateChanges:x,storeKey:D,displayName:o,wrappedComponentName:n,WrappedComponent:t}),u=O.pure;var d=u?r.useMemo:function(e){return e()};function S(n){var o=Object(r.useMemo)((function(){var e=n.reactReduxForwardedRef,t=Object(p.a)(n,["reactReduxForwardedRef"]);return[n.context,e,t]}),[n]),s=o[0],u=o[1],l=o[2],h=Object(r.useMemo)((function(){return s&&s.Consumer&&Object(y.isContextConsumer)(i.a.createElement(s.Consumer,null))?s:k}),[s,k]),g=Object(r.useContext)(h),S=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(g)&&Boolean(g.store);var T=S?n.store:g.store,D=Object(r.useMemo)((function(){return function(t){return e(t.dispatch,a)}(T)}),[T]),A=Object(r.useMemo)((function(){if(!x)return m;var e=new c(T,S?null:g.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[T,S,g]),j=A[0],E=A[1],C=Object(r.useMemo)((function(){return S?g:Object(f.a)({},g,{subscription:j})}),[S,g,j]),O=Object(r.useReducer)(b,v,N),L=O[0][0],z=O[1];if(L&&L.error)throw L.error;var P=Object(r.useRef)(),_=Object(r.useRef)(l),R=Object(r.useRef)(),U=Object(r.useRef)(!1),B=d((function(){return R.current&&l===_.current?R.current:D(T.getState(),l)}),[T,L,l]);M(I,[_,P,U,l,B,R,E]),M(w,[x,T,j,D,_,P,U,R,E,z],[T,j,D]);var Y=Object(r.useMemo)((function(){return i.a.createElement(t,Object(f.a)({},B,{ref:u}))}),[u,t,B]);return Object(r.useMemo)((function(){return x?i.a.createElement(h.Provider,{value:C},Y):Y}),[h,Y,C])}var T=u?i.a.memo(S):S;if(T.WrappedComponent=t,T.displayName=S.displayName=o,j){var A=i.a.forwardRef((function(e,t){return i.a.createElement(T,Object(f.a)({},e,{reactReduxForwardedRef:t}))}));return A.displayName=o,A.WrappedComponent=t,g()(A,t)}return g()(T,t)}}function x(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function T(e,t){if(x(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!x(e[n[i]],t[n[i]]))return!1;return!0}function D(e){return function(t,n){var r=e(t,n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function A(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function j(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=A(e);var i=r(t,n);return"function"==typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=A(i),i=r(t,n)),i},r}}var E=[function(e){return"function"==typeof e?j(e):void 0},function(e){return e?void 0:D((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?D((function(t){return function(e,t){var n={},r=function(r){var i=e[r];"function"==typeof i&&(n[r]=function(){return t(i.apply(void 0,arguments))})};for(var i in e)r(i);return n}(e,t)})):void 0}];var C=[function(e){return"function"==typeof e?j(e):void 0},function(e){return e?void 0:D((function(){return{}}))}];function O(e,t,n){return Object(f.a)({},n,e,t)}var k=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,i=n.pure,o=n.areMergedPropsEqual,a=!1;return function(t,n,s){var u=e(t,n,s);return a?i&&o(u,r)||(r=u):(a=!0,r=u),r}}}(e):void 0},function(e){return e?void 0:function(){return O}}];function L(e,t,n,r){return function(i,o){return n(e(i,o),t(r,o),o)}}function z(e,t,n,r,i){var o,a,s,u,c,l=i.areStatesEqual,d=i.areOwnPropsEqual,f=i.areStatePropsEqual,p=!1;function h(i,p){var h,g,y=!d(p,a),v=!l(i,o);return o=i,a=p,y&&v?(s=e(o,a),t.dependsOnOwnProps&&(u=t(r,a)),c=n(s,u,a)):y?(e.dependsOnOwnProps&&(s=e(o,a)),t.dependsOnOwnProps&&(u=t(r,a)),c=n(s,u,a)):v?(h=e(o,a),g=!f(h,s),s=h,g&&(c=n(s,u,a)),c):c}return function(i,l){return p?h(i,l):(s=e(o=i,a=l),u=t(r,a),c=n(s,u,a),p=!0,c)}}function P(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,o=Object(p.a)(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=n(e,o),s=r(e,o),u=i(e,o);return(o.pure?z:L)(a,s,u,e,o)}function _(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function R(e,t){return e===t}function U(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?S:n,i=t.mapStateToPropsFactories,o=void 0===i?C:i,a=t.mapDispatchToPropsFactories,s=void 0===a?E:a,u=t.mergePropsFactories,c=void 0===u?k:u,l=t.selectorFactory,d=void 0===l?P:l;return function(e,t,n,i){void 0===i&&(i={});var a=i,u=a.pure,l=void 0===u||u,h=a.areStatesEqual,g=void 0===h?R:h,y=a.areOwnPropsEqual,v=void 0===y?T:y,m=a.areStatePropsEqual,b=void 0===m?T:m,M=a.areMergedPropsEqual,I=void 0===M?T:M,w=Object(p.a)(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),N=_(e,o,"mapStateToProps"),S=_(t,s,"mapDispatchToProps"),x=_(n,c,"mergeProps");return r(d,Object(f.a)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:N,initMapDispatchToProps:S,initMergeProps:x,pure:l,areStatesEqual:g,areOwnPropsEqual:v,areStatePropsEqual:b,areMergedPropsEqual:I},w))}}var B=U();function Y(){return Object(r.useContext)(o)}function F(e){void 0===e&&(e=o);var t=e===o?Y:function(){return Object(r.useContext)(e)};return function(){return t().store}}var Q=F();function G(e){void 0===e&&(e=o);var t=e===o?Q:F(e);return function(){return t().dispatch}}var Z=G(),V=function(e,t){return e===t};function H(e){void 0===e&&(e=o);var t=e===o?Y:function(){return Object(r.useContext)(e)};return function(e,n){void 0===n&&(n=V);var i=t(),o=function(e,t,n,i){var o,a=Object(r.useReducer)((function(e){return e+1}),0)[1],s=Object(r.useMemo)((function(){return new c(n,i)}),[n,i]),u=Object(r.useRef)(),d=Object(r.useRef)(),f=Object(r.useRef)(),p=Object(r.useRef)(),h=n.getState();try{if(e!==d.current||h!==f.current||u.current){var g=e(h);o=void 0!==p.current&&t(g,p.current)?p.current:g}else o=p.current}catch(e){throw u.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+u.current.stack+"\n\n"),e}return l((function(){d.current=e,f.current=h,p.current=o,u.current=void 0})),l((function(){function e(){try{var e=n.getState(),r=d.current(e);if(t(r,p.current))return;p.current=r,f.current=e}catch(e){u.current=e}a()}return s.onStateChange=e,s.trySubscribe(),e(),function(){return s.tryUnsubscribe()}}),[n,s]),o}(e,n,i.store,i.subscription);return Object(r.useDebugValue)(o),o}}var W,J=H(),K=n(86);W=K.unstable_batchedUpdates,a=W},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(10),i=new WeakSet;function o(e){return i.has(e)}Symbol("A predicate that matches all records");var a=function(){function e(){}return Object.defineProperty(e,"ALL",{get:function(){var e=function(e){return e};return i.add(e),e},enumerable:!0,configurable:!0}),e}(),s=function(){function e(){}return e.createPredicateBuilder=function(t){var n,i=t.name,o=new Set(Object.keys(t.fields)),a=new Proxy({},n={get:function(t,a,s){var u=a;switch(u){case"and":case"or":case"not":return function(t){var r={type:u,predicates:[]},i=new Proxy({},n);return e.predicateGroupsMap.set(i,r),t(i),e.predicateGroupsMap.get(s).predicates.push(r),s};default:Object(r.f)(u,!1)}var c=a;if(!o.has(c))throw new Error("Invalid field for model. field: "+c+", model: "+i);return function(t,n){return e.predicateGroupsMap.get(s).predicates.push({field:c,operator:t,operand:n}),s}}});return e.predicateGroupsMap.set(a,{type:"and",predicates:[]}),a},e.isValidPredicate=function(t){return e.predicateGroupsMap.has(t)},e.getPredicates=function(t,n){if(void 0===n&&(n=!0),n&&!e.isValidPredicate(t))throw new Error("The predicate is not valid");return e.predicateGroupsMap.get(t)},e.createFromExisting=function(t,n){if(n&&t)return n(e.createPredicateBuilder(t))},e.createForId=function(t,n){return e.createPredicateBuilder(t).id("eq",n)},e.predicateGroupsMap=new WeakMap,e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2),i={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},o={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function a(e,t,n){return{applyToStack:function(a){a.add(function(e,t){return function(n,i){return function(i){return Object(r.__awaiter)(void 0,void 0,void 0,(function(){var o,a;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:return[4,n(i)];case 1:return o=r.sent().response,[4,t(o,e)];case 2:return a=r.sent(),[2,{response:o,output:a}]}}))}))}}}(e,n),i),a.add(function(e,t){return function(n,i){return function(i){return Object(r.__awaiter)(void 0,void 0,void 0,(function(){var o;return Object(r.__generator)(this,(function(a){switch(a.label){case 0:return[4,t(i.input,e)];case 1:return o=a.sent(),[2,n(Object(r.__assign)(Object(r.__assign)({},i),{request:o}))]}}))}))}}}(e,t),o)}}}},function(e,t,n){"use strict";(function(e){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
var r=n(328),i=n(329),o=n(330);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=f(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),i=(e=s(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|p(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):f(e,t);if("Buffer"===t.type&&o(t.data))return f(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(l(t),e=s(e,t<0?0:0|p(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|p(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(e).length;default:if(r)return Y(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return E(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return A(this,t,n);case"latin1":case"binary":return j(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,i){var o,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=n;o<s;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var d=!0,f=0;f<u;f++)if(c(e,o+f)!==c(t,f)){d=!1;break}if(d)return o}return-1}function b(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function M(e,t,n,r){return Q(Y(t,e.length-n),e,n,r)}function I(e,t,n,r){return Q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return I(e,t,n,r)}function N(e,t,n,r){return Q(F(t),e,n,r)}function S(e,t,n,r){return Q(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function x(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function T(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,u,c=e[i],l=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=d}return function(e){var t=e.length;if(t<=D)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=D));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return c(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return d(null,e)},u.allocUnsafeSlow=function(e){return d(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).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!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},u.byteLength=h,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?T(this,0,e):g.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(r,i),l=e.slice(t,n),d=0;d<s;++d)if(c[d]!==l[d]){o=c[d],a=l[d];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return M(this,e,t,n);case"ascii":return I(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return N(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function A(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function j(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function E(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=B(e[o]);return i}function C(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function O(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function k(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function z(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function P(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function _(e,t,n,r,o){return o||P(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function R(e,t,n,r,o){return o||P(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||k(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||k(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):z(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);k(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);k(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):z(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return _(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return _(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return R(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return R(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=u.isBuffer(e)?e:Y(new u(e,r).toString()),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function Y(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function F(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Q(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(89))},function(e,t,n){"use strict";function r(e,t){if(!Boolean(e))throw new Error(t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";let r;n.d(t,"a",(function(){return r})),function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return v})),n.d(t,"c",(function(){return M}));var r=n(2),i={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},o=function(e){return{applyToStack:function(t){t.add(function(e){return function(t,n){return function(i){return Object(r.__awaiter)(void 0,void 0,void 0,(function(){var o;return Object(r.__generator)(this,(function(a){return(null===(o=null==e?void 0:e.retryStrategy)||void 0===o?void 0:o.mode)&&(n.userAgent=Object(r.__spread)(n.userAgent||[],[["cfg/retry-mode",e.retryStrategy.mode]])),[2,e.retryStrategy.retry(t,i)]}))}))}}}(e),i)}}},a=n(4),s="amz-sdk-invocation-id",u="amz-sdk-request",c=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],l=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],d=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],f=[500,502,503,504],p=function(e){var t,n;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||l.includes(e.name)||1==(null===(n=e.$retryable)||void 0===n?void 0:n.throttling)},h=n(267),g=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},y=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return c.includes(e.name)}(e)||p(e)||function(e){var t;return d.includes(e.name)||f.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},v=3,m="standard",b=function(){function e(e,t){var n,r,i,o,a,s,u,c;this.maxAttemptsProvider=e,this.mode=m,this.retryDecider=null!==(n=null==t?void 0:t.retryDecider)&&void 0!==n?n:y,this.delayDecider=null!==(r=null==t?void 0:t.delayDecider)&&void 0!==r?r:g,this.retryQuota=null!==(i=null==t?void 0:t.retryQuota)&&void 0!==i?i:(a=o=500,s=o,u=function(e){return"TimeoutError"===e.name?10:5},c=function(e){return u(e)<=s},Object.freeze({hasRetryTokens:c,retrieveRetryTokens:function(e){if(!c(e))throw new Error("No retry token available");var t=u(e);return s-=t,t},releaseRetryTokens:function(e){s+=null!=e?e:1,s=Math.min(s,a)}}))}return e.prototype.shouldRetry=function(e,t,n){return t<n&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return Object(r.__awaiter)(this,void 0,void 0,(function(){var e;return Object(r.__generator)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.maxAttemptsProvider()];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),e=v,[3,3];case 3:return[2,e]}}))}))},e.prototype.retry=function(e,t){return Object(r.__awaiter)(this,void 0,void 0,(function(){var n,i,o,c,l,d,f,g;return Object(r.__generator)(this,(function(y){switch(y.label){case 0:return i=0,o=0,[4,this.getMaxAttempts()];case 1:c=y.sent(),l=t.request,a.a.isInstance(l)&&(l.headers[s]=Object(h.v4)()),d=function(){var s,d,h,g,y;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,5]),a.a.isInstance(l)&&(l.headers[u]="attempt="+(i+1)+"; max="+c),[4,e(t)];case 1:return s=r.sent(),d=s.response,h=s.output,f.retryQuota.releaseRetryTokens(n),h.$metadata.attempts=i+1,h.$metadata.totalRetryDelay=o,[2,{value:{response:d,output:h}}];case 2:return g=r.sent(),i++,f.shouldRetry(g,i,c)?(n=f.retryQuota.retrieveRetryTokens(g),y=f.delayDecider(p(g)?500:100,i),o+=y,[4,new Promise((function(e){return setTimeout(e,y)}))]):[3,4];case 3:return r.sent(),[2,"continue"];case 4:throw g.$metadata||(g.$metadata={}),g.$metadata.attempts=i,g.$metadata.totalRetryDelay=o,g;case 5:return[2]}}))},f=this,y.label=2;case 2:return[5,d()];case 3:return"object"==typeof(g=y.sent())?[2,g.value]:[3,2];case 4:return[2]}}))}))},e}(),M=function(e){var t=I(e.maxAttempts);return Object(r.__assign)(Object(r.__assign)({},e),{maxAttempts:t,retryStrategy:e.retryStrategy||new b(t)})},I=function(e){if(void 0===e&&(e=v),"number"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}},function(e,t,n){var r;
/*!
* jQuery JavaScript Library v3.6.0
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2021-03-02T17:08Z
*/!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(n,i){"use strict";var o=[],a=Object.getPrototypeOf,s=o.slice,u=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},c=o.push,l=o.indexOf,d={},f=d.toString,p=d.hasOwnProperty,h=p.toString,g=h.call(Object),y={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},m=function(e){return null!=e&&e===e.window},b=n.document,M={type:!0,src:!0,nonce:!0,noModule:!0};function I(e,t,n){var r,i,o=(n=n||b).createElement("script");if(o.text=e,t)for(r in M)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[f.call(e)]||"object":typeof e}var N="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function x(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!v(e)&&!m(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}S.fn=S.prototype={jquery:N,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(e){return this.pushStack(S.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(S.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:c,sort:o.sort,splice:o.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||v(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(c&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(c,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(N+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==f.call(e))&&(!(t=a(e))||"function"==typeof(n=p.call(t,"constructor")&&t.constructor)&&h.call(n)===g)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){I(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(x(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(x(Object(e))?S.merge(n,"string"==typeof e?[e]:e):c.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:l.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(x(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return u(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=o[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){d["[object "+t+"]"]=t.toLowerCase()}));var T=
/*!
* Sizzle CSS Selector Engine v2.3.6
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://js.foundation/
*
* Date: 2021-02-16
*/
function(e){var t,n,r,i,o,a,s,u,c,l,d,f,p,h,g,y,v,m,b,M="sizzle"+1*new Date,I=e.document,w=0,N=0,S=ue(),x=ue(),T=ue(),D=ue(),A=function(e,t){return e===t&&(d=!0),0},j={}.hasOwnProperty,E=[],C=E.pop,O=E.push,k=E.push,L=E.slice,z=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",_="[\\x20\\t\\r\\n\\f]",R="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",U="\\[[\\x20\\t\\r\\n\\f]*("+R+")(?:"+_+"*([*^$|!~]?=)"+_+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+_+"*\\]",B=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+U+")*)|.*)\\)|)",Y=new RegExp(_+"+","g"),F=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),Q=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),G=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),Z=new RegExp(_+"|>"),V=new RegExp(B),H=new RegExp("^"+R+"$"),W={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+U),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},J=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){f()},ae=Me((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{k.apply(E=L.call(I.childNodes),I.childNodes),E[I.childNodes.length].nodeType}catch(e){k={apply:E.length?function(e,t){O.apply(e,L.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var o,s,c,l,d,h,v,m=t&&t.ownerDocument,I=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==I&&9!==I&&11!==I)return r;if(!i&&(f(t),t=t||p,g)){if(11!==I&&(d=$.exec(e)))if(o=d[1]){if(9===I){if(!(c=t.getElementById(o)))return r;if(c.id===o)return r.push(c),r}else if(m&&(c=m.getElementById(o))&&b(t,c)&&c.id===o)return r.push(c),r}else{if(d[2])return k.apply(r,t.getElementsByTagName(e)),r;if((o=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return k.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!D[e+" "]&&(!y||!y.test(e))&&(1!==I||"object"!==t.nodeName.toLowerCase())){if(v=e,m=t,1===I&&(Z.test(e)||G.test(e))){for((m=ee.test(e)&&ve(t.parentNode)||t)===t&&n.scope||((l=t.getAttribute("id"))?l=l.replace(re,ie):t.setAttribute("id",l=M)),s=(h=a(e)).length;s--;)h[s]=(l?"#"+l:":scope")+" "+be(h[s]);v=h.join(",")}try{return k.apply(r,m.querySelectorAll(v)),r}catch(t){D(e,!0)}finally{l===M&&t.removeAttribute("id")}}}return u(e.replace(F,"$1"),t,r,i)}function ue(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function ce(e){return e[M]=!0,e}function le(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function fe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ye(e){return ce((function(t){return t=+t,ce((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!J.test(t||n&&n.nodeName||"HTML")},f=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:I;return a!=p&&9===a.nodeType&&a.documentElement?(h=(p=a).documentElement,g=!o(p),I!=p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=le((function(e){return h.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=le((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=le((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=X.test(p.getElementsByClassName),n.getById=le((function(e){return h.appendChild(e).id=M,!p.getElementsByName||!p.getElementsByName(M).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],y=[],(n.qsa=X.test(p.querySelectorAll))&&(le((function(e){var t;h.appendChild(e).innerHTML="<a id='"+M+"'></a><select id='"+M+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+P+")"),e.querySelectorAll("[id~="+M+"-]").length||y.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+M+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")})),le((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")}))),(n.matchesSelector=X.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&le((function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),v.push("!=",B)})),y=y.length&&new RegExp(y.join("|")),v=v.length&&new RegExp(v.join("|")),t=X.test(h.compareDocumentPosition),b=t||X.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},A=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==p||e.ownerDocument==I&&b(I,e)?-1:t==p||t.ownerDocument==I&&b(I,t)?1:l?z(l,e)-z(l,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==p?-1:t==p?1:i?-1:o?1:l?z(l,e)-z(l,t):0;if(i===o)return fe(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?fe(a[r],s[r]):a[r]==I?-1:s[r]==I?1:0},p):p},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(f(e),n.matchesSelector&&g&&!D[t+" "]&&(!v||!v.test(t))&&(!y||!y.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){D(t,!0)}return se(t,p,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=p&&f(e),b(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=p&&f(e);var i=r.attrHandle[t.toLowerCase()],o=i&&j.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],i=0,o=0;if(d=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(A),d){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return l=null,e},i=se.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=se.selectors={cacheLength:50,createPseudo:ce,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return W.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+_+"|$)"))&&S(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=se.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(Y," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var c,l,d,f,p,h,g=o!==a?"nextSibling":"previousSibling",y=t.parentNode,v=s&&t.nodeName.toLowerCase(),m=!u&&!s,b=!1;if(y){if(o){for(;g;){for(f=t;f=f[g];)if(s?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&m){for(b=(p=(c=(l=(d=(f=y)[M]||(f[M]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===w&&c[1])&&c[2],f=p&&y.childNodes[p];f=++p&&f&&f[g]||(b=p=0)||h.pop();)if(1===f.nodeType&&++b&&f===t){l[e]=[w,p,b];break}}else if(m&&(b=p=(c=(l=(d=(f=t)[M]||(f[M]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===w&&c[1]),!1===b)for(;(f=++p&&f&&f[g]||(b=p=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++b||(m&&((l=(d=f[M]||(f[M]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]=[w,b]),f!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[M]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ce((function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=z(e,o[a])]=!(n[r]=o[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:ce((function(e){var t=[],n=[],r=s(e.replace(F,"$1"));return r[M]?ce((function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:ce((function(e){return function(t){return se(e,t).length>0}})),contains:ce((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:ce((function(e){return H.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return q.test(e.nodeName)},input:function(e){return K.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ye((function(){return[0]})),last:ye((function(e,t){return[t-1]})),eq:ye((function(e,t,n){return[n<0?n+t:n]})),even:ye((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:ye((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:ye((function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e})),gt:ye((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=pe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=he(t);function me(){}function be(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function Me(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=N++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var c,l,d,f=[w,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(l=(d=t[M]||(t[M]={}))[t.uniqueID]||(d[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((c=l[o])&&c[0]===w&&c[1]===s)return f[2]=c[2];if(l[o]=f,f[2]=e(t,n,u))return!0}return!1}}function Ie(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function we(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,c=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),c&&t.push(s)));return a}function Ne(e,t,n,r,i,o){return r&&!r[M]&&(r=Ne(r)),i&&!i[M]&&(i=Ne(i,o)),ce((function(o,a,s,u){var c,l,d,f=[],p=[],h=a.length,g=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),y=!e||!o&&t?g:we(g,f,e,s,u),v=n?i||(o?e:h||r)?[]:a:y;if(n&&n(y,v,s,u),r)for(c=we(v,p),r(c,[],s,u),l=c.length;l--;)(d=c[l])&&(v[p[l]]=!(y[p[l]]=d));if(o){if(i||e){if(i){for(c=[],l=v.length;l--;)(d=v[l])&&c.push(y[l]=d);i(null,v=[],c,u)}for(l=v.length;l--;)(d=v[l])&&(c=i?z(o,d):f[l])>-1&&(o[c]=!(a[c]=d))}}else v=we(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):k.apply(a,v)}))}function Se(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,l=Me((function(e){return e===t}),s,!0),d=Me((function(e){return z(t,e)>-1}),s,!0),f=[function(e,n,r){var i=!a&&(r||n!==c)||((t=n).nodeType?l(e,n,r):d(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])f=[Me(Ie(f),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[M]){for(i=++u;i<o&&!r.relative[e[i].type];i++);return Ne(u>1&&Ie(f),u>1&&be(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(F,"$1"),n,u<i&&Se(e.slice(u,i)),i<o&&Se(e=e.slice(i)),i<o&&be(e))}f.push(n)}return Ie(f)}return me.prototype=r.filters=r.pseudos,r.setFilters=new me,a=se.tokenize=function(e,t){var n,i,o,a,s,u,c,l=x[e+" "];if(l)return t?0:l.slice(0);for(s=e,u=[],c=r.preFilter;s;){for(a in n&&!(i=Q.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=G.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(F," ")}),s=s.slice(n.length)),r.filter)!(i=W[a].exec(s))||c[a]&&!(i=c[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?se.error(e):x(e,u).slice(0)},s=se.compile=function(e,t){var n,i=[],o=[],s=T[e+" "];if(!s){for(t||(t=a(e)),n=t.length;n--;)(s=Se(t[n]))[M]?i.push(s):o.push(s);(s=T(e,function(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,u,l){var d,h,y,v=0,m="0",b=o&&[],M=[],I=c,N=o||i&&r.find.TAG("*",l),S=w+=null==I?1:Math.random()||.1,x=N.length;for(l&&(c=a==p||a||l);m!==x&&null!=(d=N[m]);m++){if(i&&d){for(h=0,a||d.ownerDocument==p||(f(d),s=!g);y=e[h++];)if(y(d,a||p,s)){u.push(d);break}l&&(w=S)}n&&((d=!y&&d)&&v--,o&&b.push(d))}if(v+=m,n&&m!==v){for(h=0;y=t[h++];)y(b,M,a,s);if(o){if(v>0)for(;m--;)b[m]||M[m]||(M[m]=C.call(u));M=we(M)}k.apply(u,M),l&&!o&&M.length>0&&v+t.length>1&&se.uniqueSort(u)}return l&&(w=S,c=I),b};return n?ce(o):o}(o,i))).selector=e}return s},u=se.select=function(e,t,n,i){var o,u,c,l,d,f="function"==typeof e&&e,p=!i&&a(e=f.selector||e);if(n=n||[],1===p.length){if((u=p[0]=p[0].slice(0)).length>2&&"ID"===(c=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(c.matches[0].replace(te,ne),t)||[])[0]))return n;f&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(o=W.needsContext.test(e)?0:u.length;o--&&(c=u[o],!r.relative[l=c.type]);)if((d=r.find[l])&&(i=d(c.matches[0].replace(te,ne),ee.test(u[0].type)&&ve(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&be(u)))return k.apply(n,i),n;break}}return(f||s(e,p))(i,t,!g,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=M.split("").sort(A).join("")===M,n.detectDuplicates=!!d,f(),n.sortDetached=le((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),le((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||de("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&le((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||de("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),le((function(e){return null==e.getAttribute("disabled")}))||de(P,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(n);S.find=T,S.expr=T.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=T.uniqueSort,S.text=T.getText,S.isXMLDoc=T.isXML,S.contains=T.contains,S.escapeSelector=T.escape;var D=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},A=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},j=S.expr.match.needsContext;function E(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var C=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function O(e,t,n){return v(t)?S.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?S.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?S.grep(e,(function(e){return l.call(t,e)>-1!==n})):S.filter(t,e,n)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,(function(e){return 1===e.nodeType})))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter((function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return r>1?S.uniqueSort(n):n},filter:function(e){return this.pushStack(O(this,e||[],!1))},not:function(e){return this.pushStack(O(this,e||[],!0))},is:function(e){return!!O(this,"string"==typeof e&&j.test(e)?S(e):e||[],!1).length}});var k,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),C.test(r[1])&&S.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=b.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,k=S(b);var z=/^(?:parents|prev(?:Until|All))/,P={children:!0,contents:!0,next:!0,prev:!0};function _(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!j.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?l.call(S(e),this[0]):l.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return D(e,"parentNode")},parentsUntil:function(e,t,n){return D(e,"parentNode",n)},next:function(e){return _(e,"nextSibling")},prev:function(e){return _(e,"previousSibling")},nextAll:function(e){return D(e,"nextSibling")},prevAll:function(e){return D(e,"previousSibling")},nextUntil:function(e,t,n){return D(e,"nextSibling",n)},prevUntil:function(e,t,n){return D(e,"previousSibling",n)},siblings:function(e){return A((e.parentNode||{}).firstChild,e)},children:function(e){return A(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(E(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},(function(e,t){S.fn[e]=function(n,r){var i=S.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=S.filter(r,i)),this.length>1&&(P[e]||S.uniqueSort(i),z.test(e)&&i.reverse()),this.pushStack(i)}}));var R=/[^\x20\t\r\n\f]+/g;function U(e){return e}function B(e){throw e}function Y(e,t,n,r){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return S.each(e.match(R)||[],(function(e,n){t[n]=!0})),t}(e):S.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},c={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){S.each(n,(function(n,r){v(r)?e.unique&&c.has(r)||o.push(r):r&&r.length&&"string"!==w(r)&&t(r)}))}(arguments),n&&!t&&u()),this},remove:function(){return S.each(arguments,(function(e,t){for(var n;(n=S.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--})),this},has:function(e){return e?S.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},S.extend({Deferred:function(e){var t=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return S.Deferred((function(n){S.each(t,(function(t,r){var i=v(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&v(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,r,i){var o=0;function a(e,t,r,i){return function(){var s=this,u=arguments,c=function(){var n,c;if(!(e<o)){if((n=r.apply(s,u))===t.promise())throw new TypeError("Thenable self-resolution");c=n&&("object"==typeof n||"function"==typeof n)&&n.then,v(c)?i?c.call(n,a(o,t,U,i),a(o,t,B,i)):(o++,c.call(n,a(o,t,U,i),a(o,t,B,i),a(o,t,U,t.notifyWith))):(r!==U&&(s=void 0,u=[n]),(i||t.resolveWith)(s,u))}},l=i?c:function(){try{c()}catch(n){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(n,l.stackTrace),e+1>=o&&(r!==B&&(s=void 0,u=[n]),t.rejectWith(s,u))}};e?l():(S.Deferred.getStackHook&&(l.stackTrace=S.Deferred.getStackHook()),n.setTimeout(l))}}return S.Deferred((function(n){t[0][3].add(a(0,n,v(i)?i:U,n.notifyWith)),t[1][3].add(a(0,n,v(e)?e:U)),t[2][3].add(a(0,n,v(r)?r:B))})).promise()},promise:function(e){return null!=e?S.extend(e,i):i}},o={};return S.each(t,(function(e,n){var a=n[2],s=n[5];i[n[1]]=a.add,s&&a.add((function(){r=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=s.call(arguments),o=S.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?s.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(Y(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||v(i[n]&&i[n].then)))return o.then();for(;n--;)Y(i[n],a(n),o.reject);return o.promise()}});var F=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&F.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){n.setTimeout((function(){throw e}))};var Q=S.Deferred();function G(){b.removeEventListener("DOMContentLoaded",G),n.removeEventListener("load",G),S.ready()}S.fn.ready=function(e){return Q.then(e).catch((function(e){S.readyException(e)})),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0,!0!==e&&--S.readyWait>0||Q.resolveWith(b,[S]))}}),S.ready.then=Q.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?n.setTimeout(S.ready):(b.addEventListener("DOMContentLoaded",G),n.addEventListener("load",G));var Z=function(e,t,n,r,i,o,a){var s=0,u=e.length,c=null==n;if("object"===w(n))for(s in i=!0,n)Z(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,v(r)||(a=!0),c&&(a?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:c?t.call(e):u?t(e[0],n):o},V=/^-ms-/,H=/-([a-z])/g;function W(e,t){return t.toUpperCase()}function J(e){return e.replace(V,"ms-").replace(H,W)}var K=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function q(){this.expando=S.expando+q.uid++}q.uid=1,q.prototype={cache:function(e){var t=e[this.expando];return t||(t={},K(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[J(t)]=n;else for(r in t)i[J(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][J(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(J):(t=J(t))in r?[t]:t.match(R)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var X=new q,$=new q,ee=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,te=/[A-Z]/g;function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(te,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ee.test(e)?JSON.parse(e):e)}(n)}catch(e){}$.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return $.hasData(e)||X.hasData(e)},data:function(e,t,n){return $.access(e,t,n)},removeData:function(e,t){$.remove(e,t)},_data:function(e,t,n){return X.access(e,t,n)},_removeData:function(e,t){X.remove(e,t)}}),S.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=$.get(o),1===o.nodeType&&!X.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=J(r.slice(5)),ne(o,r,i[r]));X.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){$.set(this,e)})):Z(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=$.get(o,e))||void 0!==(n=ne(o,e))?n:void 0;this.each((function(){$.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){$.remove(this,e)}))}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=X.get(e,t),n&&(!r||Array.isArray(n)?r=X.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){S.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return X.get(e,n)||X.access(e,n,{empty:S.Callbacks("once memory").add((function(){X.remove(e,[t+"queue",n])}))})}}),S.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?S.queue(this[0],e):void 0===t?this:this.each((function(){var n=S.queue(this,e,t);S._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&S.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){S.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=X.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ae=b.documentElement,se=function(e){return S.contains(e.ownerDocument,e)},ue={composed:!0};ae.getRootNode&&(se=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(ue)===e.ownerDocument});var ce=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&se(e)&&"none"===S.css(e,"display")};function le(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),c=n&&n[3]||(S.cssNumber[t]?"":"px"),l=e.nodeType&&(S.cssNumber[t]||"px"!==c&&+u)&&ie.exec(S.css(e,t));if(l&&l[3]!==c){for(u/=2,c=c||l[3],l=+u||1;a--;)S.style(e,t,l+c),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),l/=o;l*=2,S.style(e,t,l+c),n=n||[]}return n&&(l=+l||+u||0,i=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=i)),i}var de={};function fe(e){var t,n=e.ownerDocument,r=e.nodeName,i=de[r];return i||(t=n.body.appendChild(n.createElement(r)),i=S.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),de[r]=i,i)}function pe(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=X.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ce(r)&&(i[o]=fe(r))):"none"!==n&&(i[o]="none",X.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}S.fn.extend({show:function(){return pe(this,!0)},hide:function(){return pe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){ce(this)?S(this).show():S(this).hide()}))}});var he,ge,ye=/^(?:checkbox|radio)$/i,ve=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,me=/^$|^module$|\/(?:java|ecma)script/i;he=b.createDocumentFragment().appendChild(b.createElement("div")),(ge=b.createElement("input")).setAttribute("type","radio"),ge.setAttribute("checked","checked"),ge.setAttribute("name","t"),he.appendChild(ge),y.checkClone=he.cloneNode(!0).cloneNode(!0).lastChild.checked,he.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!he.cloneNode(!0).lastChild.defaultValue,he.innerHTML="<option></option>",y.option=!!he.lastChild;var be={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Me(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&E(e,t)?S.merge([e],n):n}function Ie(e,t){for(var n=0,r=e.length;n<r;n++)X.set(e[n],"globalEval",!t||X.get(t[n],"globalEval"))}be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,y.option||(be.optgroup=be.option=[1,"<select multiple='multiple'>","</select>"]);var we=/<|&#?\w+;/;function Ne(e,t,n,r,i){for(var o,a,s,u,c,l,d=t.createDocumentFragment(),f=[],p=0,h=e.length;p<h;p++)if((o=e[p])||0===o)if("object"===w(o))S.merge(f,o.nodeType?[o]:o);else if(we.test(o)){for(a=a||d.appendChild(t.createElement("div")),s=(ve.exec(o)||["",""])[1].toLowerCase(),u=be[s]||be._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],l=u[0];l--;)a=a.lastChild;S.merge(f,a.childNodes),(a=d.firstChild).textContent=""}else f.push(t.createTextNode(o));for(d.textContent="",p=0;o=f[p++];)if(r&&S.inArray(o,r)>-1)i&&i.push(o);else if(c=se(o),a=Me(d.appendChild(o),"script"),c&&Ie(a),n)for(l=0;o=a[l++];)me.test(o.type||"")&&n.push(o);return d}var Se=/^([^.]*)(?:\.(.+)|)/;function xe(){return!0}function Te(){return!1}function De(e,t){return e===function(){try{return b.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each((function(){S.event.add(this,t,i,r,n)}))}function je(e,t,n){n?(X.set(e,t,!1),S.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=X.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(S.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=s.call(arguments),X.set(this,t,o),r=n(this,t),this[t](),o!==(i=X.get(this,t))||r?X.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i&&i.value}else o.length&&(X.set(this,t,{value:S.event.trigger(S.extend(o[0],S.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===X.get(e,t)&&S.event.add(e,t,xe)}S.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,c,l,d,f,p,h,g,y=X.get(e);if(K(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(ae,i),n.guid||(n.guid=S.guid++),(u=y.events)||(u=y.events=Object.create(null)),(a=y.handle)||(a=y.handle=function(t){return void 0!==S&&S.event.triggered!==t.type?S.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(R)||[""]).length;c--;)p=g=(s=Se.exec(t[c])||[])[1],h=(s[2]||"").split(".").sort(),p&&(d=S.event.special[p]||{},p=(i?d.delegateType:d.bindType)||p,d=S.event.special[p]||{},l=S.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(f=u[p])||((f=u[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),d.add&&(d.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,l):f.push(l),S.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,c,l,d,f,p,h,g,y=X.hasData(e)&&X.get(e);if(y&&(u=y.events)){for(c=(t=(t||"").match(R)||[""]).length;c--;)if(p=g=(s=Se.exec(t[c])||[])[1],h=(s[2]||"").split(".").sort(),p){for(d=S.event.special[p]||{},f=u[p=(r?d.delegateType:d.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=f.length;o--;)l=f[o],!i&&g!==l.origType||n&&n.guid!==l.guid||s&&!s.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(f.splice(o,1),l.selector&&f.delegateCount--,d.remove&&d.remove.call(e,l));a&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,h,y.handle)||S.removeEvent(e,p,y.handle),delete u[p])}else for(p in u)S.event.remove(e,p+t[c],n,r,!0);S.isEmptyObject(u)&&X.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),c=(X.get(this,"events")||Object.create(null))[u.type]||[],l=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,u)){for(a=S.event.handlers.call(this,u,c),t=0;(i=a[t++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,c=e.target;if(u&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?S(i,this).index(c)>-1:S.find(i,this,null,[c]).length),a[i]&&o.push(r);o.length&&s.push({elem:c,handlers:o})}return c=this,u<t.length&&s.push({elem:c,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(S.Event.prototype,e,{enumerable:!0,configurable:!0,get:v(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return ye.test(t.type)&&t.click&&E(t,"input")&&je(t,"click",xe),!1},trigger:function(e){var t=this||e;return ye.test(t.type)&&t.click&&E(t,"input")&&je(t,"click"),!0},_default:function(e){var t=e.target;return ye.test(t.type)&&t.click&&E(t,"input")&&X.get(t,"click")||E(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?xe:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=xe,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=xe,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=xe,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},(function(e,t){S.event.special[e]={setup:function(){return je(this,e,De),!1},trigger:function(){return je(this,e),!0},_default:function(){return!0},delegateType:t}})),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){S.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||S.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}})),S.fn.extend({on:function(e,t,n,r){return Ae(this,e,t,n,r)},one:function(e,t,n,r){return Ae(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each((function(){S.event.remove(this,e,n,t)}))}});var Ee=/<script|<style|<link/i,Ce=/checked\s*(?:[^=]|=\s*.checked.)/i,Oe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function ke(e,t){return E(e,"table")&&E(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ze(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(X.hasData(e)&&(s=X.get(e).events))for(i in X.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);$.hasData(e)&&(o=$.access(e),a=S.extend({},o),$.set(t,a))}}function _e(e,t){var n=t.nodeName.toLowerCase();"input"===n&&ye.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Re(e,t,n,r){t=u(t);var i,o,a,s,c,l,d=0,f=e.length,p=f-1,h=t[0],g=v(h);if(g||f>1&&"string"==typeof h&&!y.checkClone&&Ce.test(h))return e.each((function(i){var o=e.eq(i);g&&(t[0]=h.call(this,i,o.html())),Re(o,t,n,r)}));if(f&&(o=(i=Ne(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=S.map(Me(i,"script"),Le)).length;d<f;d++)c=i,d!==p&&(c=S.clone(c,!0,!0),s&&S.merge(a,Me(c,"script"))),n.call(e[d],c,d);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,ze),d=0;d<s;d++)c=a[d],me.test(c.type||"")&&!X.access(c,"globalEval")&&S.contains(l,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?S._evalUrl&&!c.noModule&&S._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},l):I(c.textContent.replace(Oe,""),c,l))}return e}function Ue(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(Me(r)),r.parentNode&&(n&&se(r)&&Ie(Me(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=se(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=Me(s),r=0,i=(o=Me(e)).length;r<i;r++)_e(o[r],a[r]);if(t)if(n)for(o=o||Me(e),a=a||Me(s),r=0,i=o.length;r<i;r++)Pe(o[r],a[r]);else Pe(e,s);return(a=Me(s,"script")).length>0&&Ie(a,!u&&Me(e,"script")),s},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(K(n)){if(t=n[X.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[X.expando]=void 0}n[$.expando]&&(n[$.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Ue(this,e,!0)},remove:function(e){return Ue(this,e)},text:function(e){return Z(this,(function(e){return void 0===e?S.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Re(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||ke(this,e).appendChild(e)}))},prepend:function(){return Re(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ke(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Re(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Re(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(Me(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return S.clone(this,e,t)}))},html:function(e){return Z(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ee.test(e)&&!be[(ve.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(Me(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Re(this,arguments,(function(t){var n=this.parentNode;S.inArray(this,e)<0&&(S.cleanData(Me(this)),n&&n.replaceChild(t,this))}),e)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){S.fn[e]=function(e){for(var n,r=[],i=S(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),S(i[a])[t](n),c.apply(r,n.get());return this.pushStack(r)}}));var Be=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),Ye=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},Fe=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Qe=new RegExp(oe.join("|"),"i");function Ge(e,t,n){var r,i,o,a,s=e.style;return(n=n||Ye(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||se(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Be.test(a)&&Qe.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ae.appendChild(c).appendChild(l);var e=n.getComputedStyle(l);r="1%"!==e.top,u=12===t(e.marginLeft),l.style.right="60%",a=36===t(e.right),i=36===t(e.width),l.style.position="absolute",o=12===t(l.offsetWidth/3),ae.removeChild(c),l=null}}function t(e){return Math.round(parseFloat(e))}var r,i,o,a,s,u,c=b.createElement("div"),l=b.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),r},reliableMarginLeft:function(){return e(),u},scrollboxSize:function(){return e(),o},reliableTrDimensions:function(){var e,t,r,i;return null==s&&(e=b.createElement("table"),t=b.createElement("tr"),r=b.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",r.style.height="9px",r.style.display="block",ae.appendChild(e).appendChild(t).appendChild(r),i=n.getComputedStyle(t),s=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===t.offsetHeight,ae.removeChild(e)),s}}))}();var Ve=["Webkit","Moz","ms"],He=b.createElement("div").style,We={};function Je(e){var t=S.cssProps[e]||We[e];return t||(e in He?e:We[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Ve.length;n--;)if((e=Ve[n]+t)in He)return e}(e)||e)}var Ke=/^(none|table(?!-c[ea]).+)/,qe=/^--/,Xe={position:"absolute",visibility:"hidden",display:"block"},$e={letterSpacing:"0",fontWeight:"400"};function et(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function tt(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+oe[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+oe[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+oe[a]+"Width",!0,i))):(u+=S.css(e,"padding"+oe[a],!0,i),"padding"!==n?u+=S.css(e,"border"+oe[a]+"Width",!0,i):s+=S.css(e,"border"+oe[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function nt(e,t,n){var r=Ye(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=Ge(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Be.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&E(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+tt(e,t,n||(i?"border":"content"),o,r,a)+"px"}function rt(e,t,n,r,i){return new rt.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ge(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=J(t),u=qe.test(t),c=e.style;if(u||(t=Je(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:c[t];"string"===(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=le(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o,a,s=J(t);return qe.test(t)||(t=Je(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ge(e,t,r)),"normal"===i&&t in $e&&(i=$e[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],(function(e,t){S.cssHooks[t]={get:function(e,n,r){if(n)return!Ke.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?nt(e,t,r):Fe(e,Xe,(function(){return nt(e,t,r)}))},set:function(e,n,r){var i,o=Ye(e),a=!y.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===S.css(e,"boxSizing",!1,o),u=r?tt(e,t,r,s,o):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-tt(e,t,"border",!1,o)-.5)),u&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=S.css(e,t)),et(0,n,u)}}})),S.cssHooks.marginLeft=Ze(y.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-Fe(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),S.each({margin:"",padding:"",border:"Width"},(function(e,t){S.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(S.cssHooks[e+t].set=et)})),S.fn.extend({css:function(e,t){return Z(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ye(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)}),e,t,arguments.length>1)}}),S.Tween=rt,rt.prototype={constructor:rt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=rt.propHooks[this.prop];return e&&e.get?e.get(this):rt.propHooks._default.get(this)},run:function(e){var t,n=rt.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rt.propHooks._default.set(this),this}},rt.prototype.init.prototype=rt.prototype,rt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Je(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}},rt.propHooks.scrollTop=rt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=rt.prototype.init,S.fx.step={};var it,ot,at=/^(?:toggle|show|hide)$/,st=/queueHooks$/;function ut(){ot&&(!1===b.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ut):n.setTimeout(ut,S.fx.interval),S.fx.tick())}function ct(){return n.setTimeout((function(){it=void 0})),it=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function dt(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ft(e,t,n){var r,i,o=0,a=ft.prefilters.length,s=S.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var t=it||ct(),n=Math.max(0,c.startTime+c.duration-t),r=1-(n/c.duration||0),o=0,a=c.tweens.length;o<a;o++)c.tweens[o].run(r);return s.notifyWith(e,[c,r,n]),r<1&&a?n:(a||s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:S.extend({},t),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},n),originalProperties:t,originalOptions:n,startTime:it||ct(),duration:n.duration,tweens:[],createTween:function(t,n){var r=S.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(r),r},stop:function(t){var n=0,r=t?c.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)c.tweens[n].run(1);return t?(s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c,t])):s.rejectWith(e,[c,t]),this}}),l=c.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=J(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(l,c.opts.specialEasing);o<a;o++)if(r=ft.prefilters[o].call(c,e,l,c.opts))return v(r.stop)&&(S._queueHooks(c.elem,c.opts.queue).stop=r.stop.bind(r)),r;return S.map(l,dt,c),v(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),S.fx.timer(S.extend(u,{elem:e,anim:c,queue:c.opts.queue})),c}S.Animation=S.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return le(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(R);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,c,l,d="width"in t||"height"in t,f=this,p={},h=e.style,g=e.nodeType&&ce(e),y=X.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,f.always((function(){f.always((function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()}))}))),t)if(i=t[r],at.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0}p[r]=y&&y[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(p))for(r in d&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(c=y&&y.display)&&(c=X.get(e,"display")),"none"===(l=S.css(e,"display"))&&(c?l=c:(pe([e],!0),c=e.style.display||c,l=S.css(e,"display"),pe([e]))),("inline"===l||"inline-block"===l&&null!=c)&&"none"===S.css(e,"float")&&(u||(f.done((function(){h.display=c})),null==c&&(l=h.display,c="none"===l?"":l)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",f.always((function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}))),u=!1,p)u||(y?"hidden"in y&&(g=y.hidden):y=X.access(e,"fxshow",{display:c}),o&&(y.hidden=!g),g&&pe([e],!0),f.done((function(){for(r in g||pe([e]),X.remove(e,"fxshow"),p)S.style(e,r,p[r])}))),u=dt(g?y[r]:0,r,f),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){v(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ce).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=S.isEmptyObject(e),o=S.speed(t,n,r),a=function(){var t=ft(this,S.extend({},e),o);(i||X.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=S.timers,a=X.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&st.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||S.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=X.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=S.timers,a=r?r.length:0;for(n.finish=!0,S.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),S.each(["toggle","show","hide"],(function(e,t){var n=S.fn[t];S.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(lt(t,!0),e,r,i)}})),S.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){S.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(it=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),it=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){ot||(ot=!0,ut())},S.fx.stop=function(){ot=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(e,t){return e=S.fx&&S.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,r){var i=n.setTimeout(t,e);r.stop=function(){n.clearTimeout(i)}}))},function(){var e=b.createElement("input"),t=b.createElement("select").appendChild(b.createElement("option"));e.type="checkbox",y.checkOn=""!==e.value,y.optSelected=t.selected,(e=b.createElement("input")).value="t",e.type="radio",y.radioValue="t"===e.value}();var pt,ht=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return Z(this,S.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){S.removeAttr(this,e)}))}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&E(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(R);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=ht[t]||S.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}}));var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;function vt(e){return(e.match(R)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function bt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(R)||[]}S.fn.extend({prop:function(e,t){return Z(this,S.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[S.propFix[e]||e]}))}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){S.propFix[this.toLowerCase()]=this})),S.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(v(e))return this.each((function(t){S(this).addClass(e.call(this,t,mt(this)))}));if((t=bt(e)).length)for(;n=this[u++];)if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(v(e))return this.each((function(t){S(this).removeClass(e.call(this,t,mt(this)))}));if(!arguments.length)return this.attr("class","");if((t=bt(e)).length)for(;n=this[u++];)if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):v(e)?this.each((function(n){S(this).toggleClass(e.call(this,n,mt(this),t),t)})):this.each((function(){var t,i,o,a;if(r)for(i=0,o=S(this),a=bt(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=mt(this))&&X.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":X.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+vt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var Mt=/\r/g;S.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=v(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,S(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=S.map(i,(function(e){return null==e?"":e+""}))),(t=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=S.valHooks[i.type]||S.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Mt,""):null==n?"":n:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:vt(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!E(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=S.makeArray(t),a=i.length;a--;)((r=i[a]).selected=S.inArray(S.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],(function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=S.inArray(S(e).val(),t)>-1}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),y.focusin="onfocusin"in n;var It=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,r,i){var o,a,s,u,c,l,d,f,h=[r||b],g=p.call(e,"type")?e.type:e,y=p.call(e,"namespace")?e.namespace.split("."):[];if(a=f=s=r=r||b,3!==r.nodeType&&8!==r.nodeType&&!It.test(g+S.event.triggered)&&(g.indexOf(".")>-1&&(y=g.split("."),g=y.shift(),y.sort()),c=g.indexOf(":")<0&&"on"+g,(e=e[S.expando]?e:new S.Event(g,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=y.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:S.makeArray(t,[e]),d=S.event.special[g]||{},i||!d.trigger||!1!==d.trigger.apply(r,t))){if(!i&&!d.noBubble&&!m(r)){for(u=d.delegateType||g,It.test(u+g)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(r.ownerDocument||b)&&h.push(s.defaultView||s.parentWindow||n)}for(o=0;(a=h[o++])&&!e.isPropagationStopped();)f=a,e.type=o>1?u:d.bindType||g,(l=(X.get(a,"events")||Object.create(null))[e.type]&&X.get(a,"handle"))&&l.apply(a,t),(l=c&&a[c])&&l.apply&&K(a)&&(e.result=l.apply(a,t),!1===e.result&&e.preventDefault());return e.type=g,i||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(h.pop(),t)||!K(r)||c&&v(r[g])&&!m(r)&&((s=r[c])&&(r[c]=null),S.event.triggered=g,e.isPropagationStopped()&&f.addEventListener(g,wt),r[g](),e.isPropagationStopped()&&f.removeEventListener(g,wt),S.event.triggered=void 0,s&&(r[c]=s)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each((function(){S.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){S.event.simulate(t,e.target,S.event.fix(e))};S.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=X.access(r,t);i||r.addEventListener(e,n,!0),X.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=X.access(r,t)-1;i?X.access(r,t,i):(r.removeEventListener(e,n,!0),X.remove(r,t))}}}));var Nt=n.location,St={guid:Date.now()},xt=/\?/;S.parseXML=function(e){var t,r;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){}return r=t&&t.getElementsByTagName("parsererror")[0],t&&!r||S.error("Invalid XML: "+(r?S.map(r.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var Tt=/\[\]$/,Dt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,jt=/^(?:input|select|textarea|keygen)/i;function Et(e,t,n,r){var i;if(Array.isArray(t))S.each(t,(function(t,i){n||Tt.test(e)?r(e,i):Et(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==w(t))r(e,t);else for(i in t)Et(e+"["+i+"]",t[i],n,r)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,(function(){i(this.name,this.value)}));else for(n in e)Et(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&jt.test(this.nodeName)&&!At.test(e)&&(this.checked||!ye.test(e))})).map((function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,(function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}})):{name:t.name,value:n.replace(Dt,"\r\n")}})).get()}});var Ct=/%20/g,Ot=/#.*$/,kt=/([?&])_=[^&]*/,Lt=/^(.*?):[ \t]*([^\r\n]*)$/gm,zt=/^(?:GET|HEAD)$/,Pt=/^\/\//,_t={},Rt={},Ut="*/".concat("*"),Bt=b.createElement("a");function Yt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(R)||[];if(v(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Ft(e,t,n,r){var i={},o=e===Rt;function a(s){var u;return i[s]=!0,S.each(e[s]||[],(function(e,s){var c=s(t,n,r);return"string"!=typeof c||o||i[c]?o?!(u=c):void 0:(t.dataTypes.unshift(c),a(c),!1)})),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Qt(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Bt.href=Nt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Nt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Nt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ut,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Qt(Qt(e,S.ajaxSettings),t):Qt(S.ajaxSettings,e)},ajaxPrefilter:Yt(_t),ajaxTransport:Yt(Rt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,a,s,u,c,l,d,f,p=S.ajaxSetup({},t),h=p.context||p,g=p.context&&(h.nodeType||h.jquery)?S(h):S.event,y=S.Deferred(),v=S.Callbacks("once memory"),m=p.statusCode||{},M={},I={},w="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(c){if(!a)for(a={};t=Lt.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(e,t){return null==c&&(e=I[e.toLowerCase()]=I[e.toLowerCase()]||e,M[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)N.always(e[N.status]);else for(t in e)m[t]=[m[t],e[t]];return this},abort:function(e){var t=e||w;return r&&r.abort(t),x(0,t),this}};if(y.promise(N),p.url=((e||p.url||Nt.href)+"").replace(Pt,Nt.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(R)||[""],null==p.crossDomain){u=b.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=Bt.protocol+"//"+Bt.host!=u.protocol+"//"+u.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=S.param(p.data,p.traditional)),Ft(_t,p,t,N),c)return N;for(d in(l=S.event&&p.global)&&0==S.active++&&S.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!zt.test(p.type),i=p.url.replace(Ot,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ct,"+")):(f=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(xt.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(kt,"$1"),f=(xt.test(i)?"&":"?")+"_="+St.guid+++f),p.url=i+f),p.ifModified&&(S.lastModified[i]&&N.setRequestHeader("If-Modified-Since",S.lastModified[i]),S.etag[i]&&N.setRequestHeader("If-None-Match",S.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&N.setRequestHeader("Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Ut+"; q=0.01":""):p.accepts["*"]),p.headers)N.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(h,N,p)||c))return N.abort();if(w="abort",v.add(p.complete),N.done(p.success),N.fail(p.error),r=Ft(Rt,p,t,N)){if(N.readyState=1,l&&g.trigger("ajaxSend",[N,p]),c)return N;p.async&&p.timeout>0&&(s=n.setTimeout((function(){N.abort("timeout")}),p.timeout));try{c=!1,r.send(M,x)}catch(e){if(c)throw e;x(-1,e)}}else x(-1,"No Transport");function x(e,t,a,u){var d,f,b,M,I,w=t;c||(c=!0,s&&n.clearTimeout(s),r=void 0,o=u||"",N.readyState=e>0?4:0,d=e>=200&&e<300||304===e,a&&(M=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(p,N,a)),!d&&S.inArray("script",p.dataTypes)>-1&&S.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),M=function(e,t,n,r){var i,o,a,s,u,c={},l=e.dataTypes.slice();if(l[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=l.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=l.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=c[u+" "+o]||c["* "+o]))for(i in c)if((s=i.split(" "))[1]===o&&(a=c[u+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[i]:!0!==c[i]&&(o=s[0],l.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(p,M,N,d),d?(p.ifModified&&((I=N.getResponseHeader("Last-Modified"))&&(S.lastModified[i]=I),(I=N.getResponseHeader("etag"))&&(S.etag[i]=I)),204===e||"HEAD"===p.type?w="nocontent":304===e?w="notmodified":(w=M.state,f=M.data,d=!(b=M.error))):(b=w,!e&&w||(w="error",e<0&&(e=0))),N.status=e,N.statusText=(t||w)+"",d?y.resolveWith(h,[f,w,N]):y.rejectWith(h,[N,w,b]),N.statusCode(m),m=void 0,l&&g.trigger(d?"ajaxSuccess":"ajaxError",[N,p,d?f:b]),v.fireWith(h,[N,w]),l&&(g.trigger("ajaxComplete",[N,p]),--S.active||S.event.trigger("ajaxStop")))}return N},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],(function(e,t){S[t]=function(e,n,r,i){return v(n)&&(i=i||r,r=n,n=void 0),S.ajax(S.extend({url:e,type:t,dataType:i,data:n,success:r},S.isPlainObject(e)&&e))}})),S.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return v(e)?this.each((function(t){S(this).wrapInner(e.call(this,t))})):this.each((function(){var t=S(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=v(e);return this.each((function(n){S(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){S(this).replaceWith(this.childNodes)})),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Gt={0:200,1223:204},Zt=S.ajaxSettings.xhr();y.cors=!!Zt&&"withCredentials"in Zt,y.ajax=Zt=!!Zt,S.ajaxTransport((function(e){var t,r;if(y.cors||Zt&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Gt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),r=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout((function(){t&&r()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),S.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),S.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=S("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),b.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Vt,Ht=[],Wt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Ht.pop()||S.expando+"_"+St.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",(function(e,t,r){var i,o,a,s=!1!==e.jsonp&&(Wt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Wt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Wt,"$1"+i):!1!==e.jsonp&&(e.url+=(xt.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return a||S.error(i+" was not called"),a[0]},e.dataTypes[0]="json",o=n[i],n[i]=function(){a=arguments},r.always((function(){void 0===o?S(n).removeProp(i):n[i]=o,e[i]&&(e.jsonpCallback=t.jsonpCallback,Ht.push(i)),a&&v(o)&&o(a[0]),a=o=void 0})),"script"})),y.createHTMLDocument=((Vt=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Vt.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,t.head.appendChild(r)):t=b),o=!n&&[],(i=C.exec(e))?[t.createElement(i[1])]:(i=Ne([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=vt(e.slice(s)),e=e.slice(0,s)),v(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},S.expr.pseudos.animated=function(e){return S.grep(S.timers,(function(t){return e===t.elem})).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,c=S.css(e,"position"),l=S(e),d={};"static"===c&&(e.style.position="relative"),s=l.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1?(a=(r=l.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):l.css(d)}},S.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){S.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===S.css(e,"position");)e=e.offsetParent;return e||ae}))}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;S.fn[e]=function(r){return Z(this,(function(e,r,i){var o;if(m(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),S.each(["top","left"],(function(e,t){S.cssHooks[t]=Ze(y.pixelPosition,(function(e,n){if(n)return n=Ge(e,t),Be.test(n)?S(e).position()[t]+"px":n}))})),S.each({Height:"height",Width:"width"},(function(e,t){S.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){S.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return Z(this,(function(t,n,i){var o;return m(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?S.css(t,n,s):S.style(t,n,i,s)}),t,a?i:void 0,a)}}))})),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){S.fn[t]=function(e){return this.on(t,e)}})),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){S.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var Jt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),v(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=E,S.isFunction=v,S.isWindow=m,S.camelCase=J,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Jt,"")},void 0===(r=function(){return S}.apply(t,[]))||(e.exports=r);var Kt=n.jQuery,qt=n.$;return S.noConflict=function(e){return n.$===S&&(n.$=qt),e&&n.jQuery===S&&(n.jQuery=Kt),S},void 0===i&&(n.jQuery=n.$=S),S}))},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var i={transitionDuration:{short:"0.2s",long:"0.5s"},colors:{primary:{production:"#DA3832",development:"#1A73E8",testing:"#689D6A"}[null!==(r="production")?r:"production"],blackBase:"#211E1C",grey100:"#8C8B8A",grey200:"#CECECE",grey300:"#EDEDED",grey400:"#FAFAFA",whiteBase:"#FFFFFF",whiteT50:"rgba(255, 255, 255, 0.5)",danger:"#F54C60",dangerDark:"#DF495B",dangerLight:"#F7A9B3",success:"#68CEA8",successDark:"#60BF9C",successLight:"#B1E6D2",warning:"#F6D97F",warningDark:"#E4C86F",warningLight:"#FBE7AA",scrollBar:"#BABAC0",secondary:"#000000",tertiary:"#FFFFFF",background:"#E5E5E5",transparentPrimary:"rgba(224, 0, 27, 0.15)",transparentSecondary:"rgba(0, 0, 0, 0.1)",transparentSecondary2:"rgba(0, 0, 0, 0.2)",transparentSecondary05:"rgba(0, 0, 0, 0.05)",transparentTertiary:"rgba(255, 255, 255, 0.2)",transparentBackground:"rgba(229, 229, 229, 0.2)",transparentGrey:"rgba(149, 149, 149, 0)",grey:"#e5e4eb",purpleLight:"#9a97ac",greyBackground:"#fefefe",greyBorder:"#888888",red:"#ec1730",alertRed:"#FEF3F2",alertWarning:"#FFFBEB",alertSuccess:"#ECFDF5",green:"#00c851",blue:"#1a73e8",redBackground:"#FFE3E7",black:"#000000",grey2:"#222222",grey7:"#777777",greyC:"#cccccc",greyE:"#eeeeee",greyF0:"#f0f0f0"},font:"'Inter', sans-serif",sizes:{headerHeight:"70px"},screenWidth:{tablet:1024,mobile:480}};t.default=i},function(e,t,n){"use strict";function r(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r,i;function o(e){return e&&!!["provider"].find((function(t){return e.hasOwnProperty(t)}))}function a(e){return e&&!!["customProvider"].find((function(t){return e.hasOwnProperty(t)}))}function s(e){return e&&!!["customState"].find((function(t){return e.hasOwnProperty(t)}))}function u(e){return void 0!==e.redirectSignIn}function c(e){return!!e.username}n.d(t,"b",(function(){return r})),n.d(t,"e",(function(){return o})),n.d(t,"f",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return u})),n.d(t,"a",(function(){return i})),n.d(t,"g",(function(){return c})),function(e){e.Cognito="COGNITO",e.Google="Google",e.Facebook="Facebook",e.Amazon="LoginWithAmazon",e.Apple="SignInWithApple"}(r||(r={})),function(e){e.NoConfig="noConfig",e.MissingAuthConfig="missingAuthConfig",e.EmptyUsername="emptyUsername",e.InvalidUsername="invalidUsername",e.EmptyPassword="emptyPassword",e.EmptyCode="emptyCode",e.SignUpError="signUpError",e.NoMFA="noMFA",e.InvalidMFA="invalidMFA",e.EmptyChallengeResponse="emptyChallengeResponse",e.NoUserSession="noUserSession",e.Default="default"}(i||(i={}))},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return i}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e.charCodeAt(n);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(n+1<e.length&&55296==(64512&i)&&56320==(64512&e.charCodeAt(n+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n));t.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else t.push(i>>12|224,i>>6&63|128,63&i|128)}return Uint8Array.from(t)}(e)},i=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var i=e[n];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++n];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var a="%"+[i,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&i)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},function(e,t,n){"use strict";var r=n(278),i=n.n(r).a;t.a=i},function(e,t,n){"use strict";t.a={debugUI:!0,debugPageMgt:!0}},function(e,t,n){"use strict";function r(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d}));for(var r={},i=new Array(64),o=0,a="A".charCodeAt(0),s="Z".charCodeAt(0);o+a<=s;o++){var u=String.fromCharCode(o+a);r[u]=o,i[o]=u}for(o=0,a="a".charCodeAt(0),s="z".charCodeAt(0);o+a<=s;o++){u=String.fromCharCode(o+a);var c=o+26;r[u]=c,i[c]=u}for(o=0;o<10;o++){r[o.toString(10)]=o+52;u=o.toString(10),c=o+52;r[u]=c,i[c]=u}r["+"]=62,i[62]="+",r["/"]=63,i[63]="/";function l(e){var t=e.length/4*3;"=="===e.substr(-2)?t-=2:"="===e.substr(-1)&&t--;for(var n=new ArrayBuffer(t),i=new DataView(n),o=0;o<e.length;o+=4){for(var a=0,s=0,u=o,c=o+3;u<=c;u++)"="!==e[u]?(a|=r[e[u]]<<6*(c-u),s+=6):a>>=6;var l=o/4*3;a>>=s%8;for(var d=Math.floor(s/8),f=0;f<d;f++){var p=8*(d-f-1);i.setUint8(l+f,(a&255<<p)>>p)}}return new Uint8Array(n)}function d(e){for(var t="",n=0;n<e.length;n+=3){for(var r=0,o=0,a=n,s=Math.min(n+3,e.length);a<s;a++)r|=e[a]<<8*(s-a-1),o+=8;var u=Math.ceil(o/6);r<<=6*u-o;for(var c=1;c<=u;c++){var l=6*(u-c);t+=i[(r&63<<l)>>l]}t+="==".slice(0,4-u)}return t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return u}));var r=n(2),i=n(4),o=n(101);var a=function(){function e(e){var t=(void 0===e?{}:e).requestTimeout;this.requestTimeout=t}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var n=(void 0===t?{}:t).abortSignal,a=this.requestTimeout;if(null==n?void 0:n.aborted){var s=new Error("Request aborted");return s.name="AbortError",Promise.reject(s)}var u=e.path;if(e.query){var c=Object(o.a)(e.query);c&&(u+="?"+c)}var l=e.port,d=e.method,f=e.protocol+"//"+e.hostname+(l?":"+l:"")+u,p={body:"GET"===d||"HEAD"===d?void 0:e.body,headers:new Headers(e.headers),method:d};"undefined"!=typeof AbortController&&(p.signal=n);var h,g=new Request(f,p),y=[fetch(g).then((function(e){var t,n,o=e.headers,a={};try{for(var s=Object(r.__values)(o.entries()),u=s.next();!u.done;u=s.next()){var c=u.value;a[c[0]]=c[1]}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new i.b({headers:a,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new i.b({headers:a,statusCode:e.status,body:t})}}))})),(h=a,void 0===h&&(h=0),new Promise((function(e,t){h&&setTimeout((function(){var e=new Error("Request did not complete within "+h+" ms");e.name="TimeoutError",t(e)}),h)})))];return n&&y.push(new Promise((function(e,t){n.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),Promise.race(y)},e}(),s=n(31),u=function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return Object(r.__awaiter)(this,void 0,void 0,(function(){var t,n;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:return[4,c(e)];case 1:return t=r.sent(),n=Object(s.a)(t),[2,new Uint8Array(n)]}}))}))}(e):function(e){return Object(r.__awaiter)(this,void 0,void 0,(function(){var t,n,i,o,a,s,u;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:t=new Uint8Array(0),n=e.getReader(),i=!1,r.label=1;case 1:return i?[3,3]:[4,n.read()];case 2:return o=r.sent(),a=o.done,(s=o.value)&&(u=t,(t=new Uint8Array(u.length+s.length)).set(u),t.set(s,u.length)),i=a,[3,1];case 3:return[2,t]}}))}))}(e)};function c(e){return new Promise((function(t,n){var r=new FileReader;r.onloadend=function(){var e;if(2!==r.readyState)return n(new Error("Reader aborted too early"));var i=null!==(e=r.result)&&void 0!==e?e:"",o=i.indexOf(","),a=o>-1?o+1:i.length;t(i.substring(a))},r.onabort=function(){return n(new Error("Read aborted"))},r.onerror=function(){return n(r.error)},r.readAsDataURL(e)}))}},function(e,t,n){"use strict";var r=n(335),i=n(336);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){i.isString(e)&&(e=b(e));return e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),d=["%","/","?",";","#"].concat(l),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=n(337);function b(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),s=-1!==o&&o<e.indexOf("#")?"?":"#",c=e.split(s);c[0]=c[0].replace(/\\/g,"/");var b=e=c.join(s);if(b=b.trim(),!n&&1===e.split("#").length){var M=u.exec(b);if(M)return this.path=b,this.href=b,this.pathname=M[1],M[2]?(this.search=M[2],this.query=t?m.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var I=a.exec(b);if(I){var w=(I=I[0]).toLowerCase();this.protocol=w,b=b.substr(I.length)}if(n||I||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var N="//"===b.substr(0,2);!N||I&&y[I]||(b=b.substr(2),this.slashes=!0)}if(!y[I]&&(N||I&&!v[I])){for(var S,x,T=-1,D=0;D<f.length;D++){-1!==(A=b.indexOf(f[D]))&&(-1===T||A<T)&&(T=A)}-1!==(x=-1===T?b.lastIndexOf("@"):b.lastIndexOf("@",T))&&(S=b.slice(0,x),b=b.slice(x+1),this.auth=decodeURIComponent(S)),T=-1;for(D=0;D<d.length;D++){var A;-1!==(A=b.indexOf(d[D]))&&(-1===T||A<T)&&(T=A)}-1===T&&(T=b.length),this.host=b.slice(0,T),b=b.slice(T),this.parseHost(),this.hostname=this.hostname||"";var j="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!j)for(var E=this.hostname.split(/\./),C=(D=0,E.length);D<C;D++){var O=E[D];if(O&&!O.match(p)){for(var k="",L=0,z=O.length;L<z;L++)O.charCodeAt(L)>127?k+="x":k+=O[L];if(!k.match(p)){var P=E.slice(0,D),_=E.slice(D+1),R=O.match(h);R&&(P.push(R[1]),_.unshift(R[2])),_.length&&(b="/"+_.join(".")+b),this.hostname=P.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),j||(this.hostname=r.toASCII(this.hostname));var U=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+U,this.href+=this.host,j&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!g[w])for(D=0,C=l.length;D<C;D++){var Y=l[D];if(-1!==b.indexOf(Y)){var F=encodeURIComponent(Y);F===Y&&(F=escape(Y)),b=b.split(Y).join(F)}}var Q=b.indexOf("#");-1!==Q&&(this.hash=b.substr(Q),b=b.slice(0,Q));var G=b.indexOf("?");if(-1!==G?(this.search=b.substr(G),this.query=b.substr(G+1),t&&(this.query=m.parse(this.query)),b=b.slice(0,G)):t&&(this.search="",this.query={}),b&&(this.pathname=b),v[w]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){U=this.pathname||"";var Z=this.search||"";this.path=U+Z}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,a="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(a=m.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||v[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+o+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+r},o.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var n=new o,r=Object.keys(this),a=0;a<r.length;a++){var s=r[a];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var l=u[c];"protocol"!==l&&(n[l]=e[l])}return v[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!v[e.protocol]){for(var d=Object.keys(e),f=0;f<d.length;f++){var p=d[f];n[p]=e[p]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||y[e.protocol])n.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),n.pathname=h.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var g=n.pathname||"",m=n.search||"";n.path=g+m}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var b=n.pathname&&"/"===n.pathname.charAt(0),M=e.host||e.pathname&&"/"===e.pathname.charAt(0),I=M||b||n.host&&e.pathname,w=I,N=n.pathname&&n.pathname.split("/")||[],S=(h=e.pathname&&e.pathname.split("/")||[],n.protocol&&!v[n.protocol]);if(S&&(n.hostname="",n.port=null,n.host&&(""===N[0]?N[0]=n.host:N.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),I=I&&(""===h[0]||""===N[0])),M)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,N=h;else if(h.length)N||(N=[]),N.pop(),N=N.concat(h),n.search=e.search,n.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(S)n.hostname=n.host=N.shift(),(j=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=j.shift(),n.host=n.hostname=j.shift());return n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!N.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var x=N.slice(-1)[0],T=(n.host||e.host||N.length>1)&&("."===x||".."===x)||""===x,D=0,A=N.length;A>=0;A--)"."===(x=N[A])?N.splice(A,1):".."===x?(N.splice(A,1),D++):D&&(N.splice(A,1),D--);if(!I&&!w)for(;D--;D)N.unshift("..");!I||""===N[0]||N[0]&&"/"===N[0].charAt(0)||N.unshift(""),T&&"/"!==N.join("/").substr(-1)&&N.push("");var j,E=""===N[0]||N[0]&&"/"===N[0].charAt(0);S&&(n.hostname=n.host=E?"":N.length?N.shift():"",(j=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=j.shift(),n.host=n.hostname=j.shift()));return(I=I||n.host&&N.length)&&!E&&N.unshift(""),N.length?n.pathname=N.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(25);function i(e){Object(r.a)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):new Date(NaN)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(51),i=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=new r.a("Amplify"),a=function(){function e(){this._components=[],this._config={},this._modules={},this.Auth=null,this.Analytics=null,this.API=null,this.Credentials=null,this.Storage=null,this.I18n=null,this.Cache=null,this.PubSub=null,this.Interactions=null,this.Pushnotification=null,this.UI=null,this.XR=null,this.Predictions=null,this.DataStore=null,this.Logger=r.a,this.ServiceWorker=null}return e.prototype.register=function(e){o.debug("component registered in amplify",e),this._components.push(e),"function"==typeof e.getModuleName?(this._modules[e.getModuleName()]=e,this[e.getModuleName()]=e):o.debug("no getModuleName method for component",e),e.configure(this._config)},e.prototype.configure=function(e){var t=this;return e?(this._config=Object.assign(this._config,e),o.debug("amplify config",this._config),Object.entries(this._modules).forEach((function(e){var n=i(e,2),r=(n[0],n[1]);Object.keys(r).forEach((function(e){t._modules[e]&&(r[e]=t._modules[e])}))})),this._components.map((function(e){e.configure(t._config)})),this._config):this._config},e.prototype.addPluggable=function(e){e&&e.getCategory&&"function"==typeof e.getCategory&&this._components.map((function(t){t.addPluggable&&"function"==typeof t.addPluggable&&t.addPluggable(e)}))},e}(),s=new a},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=s(n(1)),c=a(n(8)),l=s(n(24));t.default=function(e){var t=e.icon,n=e.color,r=e.hoverColor,i=e.width,o=void 0===i?"24px":i,a=e.height,s=void 0===a?"24px":a,c=e.disabled,l=void 0!==c&&c,d=e.fit,f=void 0!==d&&d,p=e.onClick,h=e.stopPropagation,y=void 0!==h&&h,v=e.className,m=void 0===v?"":v;return u.default.createElement(g,{icon:t,className:m,color:n,hoverColor:r,width:o,height:s,disabled:l,fit:f,clickable:!!p&&"function"==typeof p,onClick:function(e){y&&e.stopPropagation(),!l&&(null==p||p(e))}})};var d;d=function(e){var t,n,r;return null===(t=null===chrome||void 0===chrome?void 0:chrome.runtime)||void 0===t?void 0:t.getURL("icons/"+(r="svg",(n=e).split(".").length>1?n:n+"."+r))};var f,p,h,g=c.default.div.withConfig({displayName:"IconImage",componentId:"sc-1oekuv0"})(h||(h=r(["\n width: ",";\n height: ",";\n mask-image: url(",");\n mask-position: center center;\n mask-repeat: no-repeat;\n mask-size: ",";\n background-color: ",";\n flex-shrink: 0;\n\n &:hover {\n background-color: ",";\n }\n \n ","\n\n ","\n"],["\n width: ",";\n height: ",";\n mask-image: url(",");\n mask-position: center center;\n mask-repeat: no-repeat;\n mask-size: ",";\n background-color: ",";\n flex-shrink: 0;\n\n &:hover {\n background-color: ",";\n }\n \n ","\n\n ","\n"])),(function(e){var t=e.width;return null!=t?t:"auto"}),(function(e){var t=e.height;return null!=t?t:"auto"}),(function(e){var t=e.icon;return d(t)}),(function(e){return e.fit?"fit":"cover"}),(function(e){var t=e.color;return l.default.colors[null!=t?t:""]}),(function(e){var t=e.hoverColor;return l.default.colors[null!=t?t:""]}),(function(e){return e.clickable&&c.css(f||(f=r(["\n cursor: pointer;\n "],["\n cursor: pointer;\n "])))}),(function(e){var t=e.disabled,n=e.color;return t&&c.css(p||(p=r(["\n opacity: 0.5;\n cursor: default;\n\n &:hover {\n background-color: ",";\n }\n "],["\n opacity: 0.5;\n cursor: default;\n\n &:hover {\n background-color: ",";\n }\n "])),l.default.colors[null!=n?n:""])}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s}));var r=n(2),i=n(4);function o(e){return e}var a={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},s=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(n){return Object(r.__awaiter)(void 0,void 0,void 0,(function(){var o,a;return Object(r.__generator)(this,(function(r){return i.a.isInstance(n.request)?(o=n.request,(void 0===(a=(e.requestHandler.metadata||{}).handlerProtocol)?"":a).indexOf("h2")>=0&&!o.headers[":authority"]?(delete o.headers.host,o.headers[":authority"]=""):o.headers.host||(o.headers.host=o.hostname),[2,t(n)]):[2,t(n)]}))}))}}}(e),a)}}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return l}));var r=n(2);function i(e){return Object(r.__assign)(Object(r.__assign)({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}var o=n(4),a="user-agent",s=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,u=function(e){var t=Object(r.__read)(e,2),n=t[0],i=t[1],o=n.indexOf("/"),a=n.substring(0,o),u=n.substring(o+1);return"api"===a&&(u=u.toLowerCase()),[a,u,i].filter((function(e){return e&&e.length>0})).map((function(e){return null==e?void 0:e.replace(s,"_")})).join("/")},c={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},l=function(e){return{applyToStack:function(t){var n;t.add((n=e,function(e,t){return function(i){return Object(r.__awaiter)(void 0,void 0,void 0,(function(){var s,c,l,d,f,p,h,g;return Object(r.__generator)(this,(function(y){switch(y.label){case 0:return s=i.request,o.a.isInstance(s)?(c=s.headers,l=(null===(h=null==t?void 0:t.userAgent)||void 0===h?void 0:h.map(u))||[],[4,n.defaultUserAgentProvider()]):[2,e(i)];case 1:return d=y.sent().map(u),f=(null===(g=null==n?void 0:n.customUserAgent)||void 0===g?void 0:g.map(u))||[],c["x-amz-user-agent"]=Object(r.__spread)(d,l,f).join(" "),p=Object(r.__spread)(d.filter((function(e){return e.startsWith("aws-sdk-")})),f).join(" "),"browser"!==n.runtime&&p&&(c[a]=c[a]?c[a]+" "+p:p),[2,e(Object(r.__assign)(Object(r.__assign)({},i),{request:s}))]}}))}))}}),c)}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var r=n(2),i=function(e){var t;return Object(r.__assign)(Object(r.__assign)({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?o(e):function(){return a(e)},isCustomEndpoint:!!e.endpoint})},o=function(e){var t=e.endpoint,n=e.urlParser;if("string"==typeof t){var r=Promise.resolve(n(t));return function(){return r}}if("object"==typeof t){var i=Promise.resolve(t);return function(){return i}}return t},a=function(e){return Object(r.__awaiter)(void 0,void 0,void 0,(function(){var t,n,i,o,a;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:return t=e.tls,n=void 0===t||t,[4,e.region()];case 1:if(i=r.sent(),!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(i))throw new Error("Invalid region in client config");return[4,e.regionInfoProvider(i)];case 2:if(!(o=(null!==(a=r.sent())&&void 0!==a?a:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((n?"https:":"http:")+"//"+o)]}}))}))},s=function(e){if(!e.region)throw new Error("Region is missing");return Object(r.__assign)(Object(r.__assign)({},e),{region:u(e.region)})},u=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u}));for(var r={},i={},o=0;o<256;o++){var a=o.toString(16).toLowerCase();1===a.length&&(a="0"+a),r[o]=a,i[a]=o}function s(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");for(var t=new Uint8Array(e.length/2),n=0;n<e.length;n+=2){var r=e.substr(n,2).toLowerCase();if(!(r in i))throw new Error("Cannot decode unrecognized sequence "+r+" as hexadecimal");t[n/2]=i[r]}return t}function u(e){for(var t="",n=0;n<e.byteLength;n++)t+=r[e[n]];return t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"e",(function(){return s})),n.d(t,"b",(function(){return u}));class r{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class i{constructor(e,t,n,r,i,o){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const o={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},a=new Set(Object.keys(o));function s(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&a.has(t)}let u;!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(u||(u={}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return d}));var r=n(2),i=n(149);function o(e){var t,n=this,o=a(e.credentials||e.credentialDefaultProvider(e)),s=e.signingEscapePath,u=void 0===s||s,c=e.systemClockOffset,l=void 0===c?e.systemClockOffset||0:c,d=e.sha256;return t=e.signer?a(e.signer):function(){return a(e.region)().then((function(t){return Object(r.__awaiter)(n,void 0,void 0,(function(){return Object(r.__generator)(this,(function(n){switch(n.label){case 0:return[4,e.regionInfoProvider(t)];case 1:return[2,[n.sent()||{},t]]}}))}))})).then((function(t){var n=Object(r.__read)(t,2),a=n[0],s=n[1],c=a.signingRegion,l=a.signingService;return e.signingRegion=e.signingRegion||c||s,e.signingName=e.signingName||l||e.serviceId,new i.a({credentials:o,region:e.signingRegion,service:e.signingName,sha256:d,uriEscapePath:u})}))},Object(r.__assign)(Object(r.__assign)({},e),{systemClockOffset:l,signingEscapePath:u,credentials:o,signer:t})}function a(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}var s=n(4),u=function(e){return new Date(Date.now()+e)};function c(e){return function(t,n){return function(i){return Object(r.__awaiter)(this,void 0,void 0,(function(){var o,a,c,l,d,f,p,h,g;return Object(r.__generator)(this,(function(y){switch(y.label){case 0:return s.a.isInstance(i.request)?"function"!=typeof e.signer?[3,2]:[4,e.signer()]:[2,t(i)];case 1:return a=y.sent(),[3,3];case 2:a=e.signer,y.label=3;case 3:return o=a,l=t,d=[Object(r.__assign)({},i)],g={},[4,o.sign(i.request,{signingDate:new Date(Date.now()+e.systemClockOffset),signingRegion:n.signing_region,signingService:n.signing_service})];case 4:return[4,l.apply(void 0,[r.__assign.apply(void 0,d.concat([(g.request=y.sent(),g)]))])];case 5:return c=y.sent(),f=c.response.headers,(p=f&&(f.date||f.Date))&&(h=Date.parse(p),v=h,m=e.systemClockOffset,Math.abs(u(m).getTime()-v)>=3e5&&(e.systemClockOffset=h-Date.now())),[2,c]}var v,m}))}))}}}var l={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0},d=function(e){return{applyToStack:function(t){t.addRelativeTo(c(e),l)}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return C})),n.d(t,"c",(function(){return k})),n.d(t,"d",(function(){return L})),n.d(t,"e",(function(){return V})),n.d(t,"f",(function(){return Y})),n.d(t,"g",(function(){return re})),n.d(t,"h",(function(){return _})),n.d(t,"i",(function(){return oe})),n.d(t,"k",(function(){return W})),n.d(t,"j",(function(){return p}));
/*!
* Copyright 2016 Amazon.com,
* Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Amazon Software License (the "License").
* You may not use this file except in compliance with the
* License. A copy of the License is located at
*
* http://aws.amazon.com/asl/
*
* or in the "license" file accompanying this file. This file is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, express or implied. See the License
* for the specific language governing permissions and
* limitations under the License.
*/
var r=function(){function e(e){var t=e||{},n=t.ValidationData,r=t.Username,i=t.Password,o=t.AuthParameters,a=t.ClientMetadata;this.validationData=n||{},this.authParameters=o||{},this.clientMetadata=a||{},this.username=r,this.password=i}var t=e.prototype;return t.getUsername=function(){return this.username},t.getPassword=function(){return this.password},t.getValidationData=function(){return this.validationData},t.getAuthParameters=function(){return this.authParameters},t.getClientMetadata=function(){return this.clientMetadata},e}(),i=n(19),o=n(50),a=n.n(o),s=(n(212),n(114)),u=n.n(s),c=n(102),l=n.n(c),d=n(266);var f,p=function(){function e(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length}var t=e.prototype;return t.random=function(t){for(var n=[],r=0;r<t;r+=4)n.push(Object(d.a)());return new e(n,t)},t.toString=function(){return function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")}(this)},e}(),h=g;function g(e,t){null!=e&&this.fromString(e,t)}function y(){return new g(null)}var v="undefined"!=typeof navigator;v&&"Microsoft Internet Explorer"==navigator.appName?(g.prototype.am=function(e,t,n,r,i,o){for(var a=32767&t,s=t>>15;--o>=0;){var u=32767&this[e],c=this[e++]>>15,l=s*u+c*a;i=((u=a*u+((32767&l)<<15)+n[r]+(1073741823&i))>>>30)+(l>>>15)+s*c+(i>>>30),n[r++]=1073741823&u}return i},f=30):v&&"Netscape"!=navigator.appName?(g.prototype.am=function(e,t,n,r,i,o){for(;--o>=0;){var a=t*this[e++]+n[r]+i;i=Math.floor(a/67108864),n[r++]=67108863&a}return i},f=26):(g.prototype.am=function(e,t,n,r,i,o){for(var a=16383&t,s=t>>14;--o>=0;){var u=16383&this[e],c=this[e++]>>14,l=s*u+c*a;i=((u=a*u+((16383&l)<<14)+n[r]+i)>>28)+(l>>14)+s*c,n[r++]=268435455&u}return i},f=28),g.prototype.DB=f,g.prototype.DM=(1<<f)-1,g.prototype.DV=1<<f;g.prototype.FV=Math.pow(2,52),g.prototype.F1=52-f,g.prototype.F2=2*f-52;var m,b,M=new Array;for(m="0".charCodeAt(0),b=0;b<=9;++b)M[m++]=b;for(m="a".charCodeAt(0),b=10;b<36;++b)M[m++]=b;for(m="A".charCodeAt(0),b=10;b<36;++b)M[m++]=b;function I(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function w(e,t){var n=M[e.charCodeAt(t)];return null==n?-1:n}function N(e){var t=y();return t.fromInt(e),t}function S(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function x(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}
/*!
* Copyright 2016 Amazon.com,
* Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Amazon Software License (the "License").
* You may not use this file except in compliance with the
* License. A copy of the License is located at
*
* http://aws.amazon.com/asl/
*
* or in the "license" file accompanying this file. This file is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, express or implied. See the License
* for the specific language governing permissions and
* limitations under the License.
*/
function T(e){return i.Buffer.from((new p).random(e).toString(),"hex")}x.prototype.convert=function(e){var t=y();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(g.ZERO)>0&&this.m.subTo(t,t),t},x.prototype.revert=function(e){var t=y();return e.copyTo(t),this.reduce(t),t},x.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},x.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},x.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},g.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},g.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},g.prototype.fromString=function(e,t){var n;if(16==t)n=4;else if(8==t)n=3;else if(2==t)n=1;else if(32==t)n=5;else{if(4!=t)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");n=2}this.t=0,this.s=0;for(var r=e.length,i=!1,o=0;--r>=0;){var a=w(e,r);a<0?"-"==e.charAt(r)&&(i=!0):(i=!1,0==o?this[this.t++]=a:o+n>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,(o+=n)>=this.DB&&(o-=this.DB))}this.clamp(),i&&g.ZERO.subTo(this,this)},g.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},g.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},g.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},g.prototype.lShiftTo=function(e,t){var n,r=e%this.DB,i=this.DB-r,o=(1<<i)-1,a=Math.floor(e/this.DB),s=this.s<<r&this.DM;for(n=this.t-1;n>=0;--n)t[n+a+1]=this[n]>>i|s,s=(this[n]&o)<<r;for(n=a-1;n>=0;--n)t[n]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},g.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,i=this.DB-r,o=(1<<r)-1;t[0]=this[n]>>r;for(var a=n+1;a<this.t;++a)t[a-n-1]|=(this[a]&o)<<i,t[a-n]=this[a]>>r;r>0&&(t[this.t-n-1]|=(this.s&o)<<i),t.t=this.t-n,t.clamp()}},g.prototype.subTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},g.prototype.multiplyTo=function(e,t){var n=this.abs(),r=e.abs(),i=n.t;for(t.t=i+r.t;--i>=0;)t[i]=0;for(i=0;i<r.t;++i)t[i+n.t]=n.am(0,r[i],t,i,0,n.t);t.s=0,t.clamp(),this.s!=e.s&&g.ZERO.subTo(t,t)},g.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},g.prototype.divRemTo=function(e,t,n){var r=e.abs();if(!(r.t<=0)){var i=this.abs();if(i.t<r.t)return null!=t&&t.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=y());var o=y(),a=this.s,s=e.s,u=this.DB-S(r[r.t-1]);u>0?(r.lShiftTo(u,o),i.lShiftTo(u,n)):(r.copyTo(o),i.copyTo(n));var c=o.t,l=o[c-1];if(0!=l){var d=l*(1<<this.F1)+(c>1?o[c-2]>>this.F2:0),f=this.FV/d,p=(1<<this.F1)/d,h=1<<this.F2,v=n.t,m=v-c,b=null==t?y():t;for(o.dlShiftTo(m,b),n.compareTo(b)>=0&&(n[n.t++]=1,n.subTo(b,n)),g.ONE.dlShiftTo(c,b),b.subTo(o,o);o.t<c;)o[o.t++]=0;for(;--m>=0;){var M=n[--v]==l?this.DM:Math.floor(n[v]*f+(n[v-1]+h)*p);if((n[v]+=o.am(0,M,n,m,0,c))<M)for(o.dlShiftTo(m,b),n.subTo(b,n);n[v]<--M;)n.subTo(b,n)}null!=t&&(n.drShiftTo(c,t),a!=s&&g.ZERO.subTo(t,t)),n.t=c,n.clamp(),u>0&&n.rShiftTo(u,n),a<0&&g.ZERO.subTo(n,n)}}},g.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},g.prototype.addTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},g.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");t=2}var n,r=(1<<t)-1,i=!1,o="",a=this.t,s=this.DB-a*this.DB%t;if(a-- >0)for(s<this.DB&&(n=this[a]>>s)>0&&(i=!0,o=I(n));a>=0;)s<t?(n=(this[a]&(1<<s)-1)<<t-s,n|=this[--a]>>(s+=this.DB-t)):(n=this[a]>>(s-=t)&r,s<=0&&(s+=this.DB,--a)),n>0&&(i=!0),i&&(o+=I(n));return i?o:"0"},g.prototype.negate=function(){var e=y();return g.ZERO.subTo(this,e),e},g.prototype.abs=function(){return this.s<0?this.negate():this},g.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},g.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+S(this[this.t-1]^this.s&this.DM)},g.prototype.mod=function(e){var t=y();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(g.ZERO)>0&&e.subTo(t,t),t},g.prototype.equals=function(e){return 0==this.compareTo(e)},g.prototype.add=function(e){var t=y();return this.addTo(e,t),t},g.prototype.subtract=function(e){var t=y();return this.subTo(e,t),t},g.prototype.multiply=function(e){var t=y();return this.multiplyTo(e,t),t},g.prototype.divide=function(e){var t=y();return this.divRemTo(e,t,null),t},g.prototype.modPow=function(e,t,n){var r,i=e.bitLength(),o=N(1),a=new x(t);if(i<=0)return o;r=i<18?1:i<48?3:i<144?4:i<768?5:6;var s=new Array,u=3,c=r-1,l=(1<<r)-1;if(s[1]=a.convert(this),r>1){var d=y();for(a.sqrTo(s[1],d);u<=l;)s[u]=y(),a.mulTo(d,s[u-2],s[u]),u+=2}var f,p,h=e.t-1,g=!0,v=y();for(i=S(e[h])-1;h>=0;){for(i>=c?f=e[h]>>i-c&l:(f=(e[h]&(1<<i+1)-1)<<c-i,h>0&&(f|=e[h-1]>>this.DB+i-c)),u=r;0==(1&f);)f>>=1,--u;if((i-=u)<0&&(i+=this.DB,--h),g)s[f].copyTo(o),g=!1;else{for(;u>1;)a.sqrTo(o,v),a.sqrTo(v,o),u-=2;u>0?a.sqrTo(o,v):(p=o,o=v,v=p),a.mulTo(v,s[f],o)}for(;h>=0&&0==(e[h]&1<<i);)a.sqrTo(o,v),p=o,o=v,v=p,--i<0&&(i=this.DB-1,--h)}var m=a.revert(o);return n(null,m),m},g.ZERO=N(0),g.ONE=N(1);var D=/^[89a-f]/i,A=function(){function e(e){this.N=new h("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",16),this.g=new h("2",16),this.k=new h(this.hexHash(""+this.padHex(this.N)+this.padHex(this.g)),16),this.smallAValue=this.generateRandomSmallA(),this.getLargeAValue((function(){})),this.infoBits=i.Buffer.from("Caldera Derived Key","utf8"),this.poolName=e}var t=e.prototype;return t.getSmallAValue=function(){return this.smallAValue},t.getLargeAValue=function(e){var t=this;this.largeAValue?e(null,this.largeAValue):this.calculateA(this.smallAValue,(function(n,r){n&&e(n,null),t.largeAValue=r,e(null,t.largeAValue)}))},t.generateRandomSmallA=function(){var e=T(128).toString("hex");return new h(e,16)},t.generateRandomString=function(){return T(40).toString("base64")},t.getRandomPassword=function(){return this.randomPassword},t.getSaltDevices=function(){return this.SaltToHashDevices},t.getVerifierDevices=function(){return this.verifierDevices},t.generateHashDevice=function(e,t,n){var r=this;this.randomPassword=this.generateRandomString();var i=""+e+t+":"+this.randomPassword,o=this.hash(i),a=T(16).toString("hex");this.SaltToHashDevices=this.padHex(new h(a,16)),this.g.modPow(new h(this.hexHash(this.SaltToHashDevices+o),16),this.N,(function(e,t){e&&n(e,null),r.verifierDevices=r.padHex(t),n(null,null)}))},t.calculateA=function(e,t){var n=this;this.g.modPow(e,this.N,(function(e,r){e&&t(e,null),r.mod(n.N).equals(h.ZERO)&&t(new Error("Illegal paramater. A mod N cannot be 0."),null),t(null,r)}))},t.calculateU=function(e,t){return this.UHexHash=this.hexHash(this.padHex(e)+this.padHex(t)),new h(this.UHexHash,16)},t.hash=function(e){var t=e instanceof i.Buffer?a.a.lib.WordArray.create(e):e,n=u()(t).toString();return new Array(64-n.length).join("0")+n},t.hexHash=function(e){return this.hash(i.Buffer.from(e,"hex"))},t.computehkdf=function(e,t){var n=a.a.lib.WordArray.create(i.Buffer.concat([this.infoBits,i.Buffer.from(String.fromCharCode(1),"utf8")])),r=e instanceof i.Buffer?a.a.lib.WordArray.create(e):e,o=t instanceof i.Buffer?a.a.lib.WordArray.create(t):t,s=l()(r,o),u=l()(n,s);return i.Buffer.from(u.toString(),"hex").slice(0,16)},t.getPasswordAuthenticationKey=function(e,t,n,r,o){var a=this;if(n.mod(this.N).equals(h.ZERO))throw new Error("B cannot be zero.");if(this.UValue=this.calculateU(this.largeAValue,n),this.UValue.equals(h.ZERO))throw new Error("U cannot be zero.");var s=""+this.poolName+e+":"+t,u=this.hash(s),c=new h(this.hexHash(this.padHex(r)+u),16);this.calculateS(c,n,(function(e,t){e&&o(e,null);var n=a.computehkdf(i.Buffer.from(a.padHex(t),"hex"),i.Buffer.from(a.padHex(a.UValue),"hex"));o(null,n)}))},t.calculateS=function(e,t,n){var r=this;this.g.modPow(e,this.N,(function(i,o){i&&n(i,null),t.subtract(r.k.multiply(o)).modPow(r.smallAValue.add(r.UValue.multiply(e)),r.N,(function(e,t){e&&n(e,null),n(null,t.mod(r.N))}))}))},t.getNewPasswordRequiredChallengeUserAttributePrefix=function(){return"userAttributes."},t.padHex=function(e){if(!(e instanceof h))throw new Error("Not a BigInteger");var t=e.compareTo(h.ZERO)<0,n=e.abs().toString(16);if(n=n.length%2!=0?"0"+n:n,n=D.test(n)?"00"+n:n,t){var r=n.split("").map((function(e){var t=15&~parseInt(e,16);return"0123456789ABCDEF".charAt(t)})).join("");(n=new h(r,16).add(h.ONE).toString(16)).toUpperCase().startsWith("FF8")&&(n=n.substring(2))}return n},e}(),j=function(){function e(e){this.jwtToken=e||"",this.payload=this.decodePayload()}var t=e.prototype;return t.getJwtToken=function(){return this.jwtToken},t.getExpiration=function(){return this.payload.exp},t.getIssuedAt=function(){return this.payload.iat},t.decodePayload=function(){var e=this.jwtToken.split(".")[1];try{return JSON.parse(i.Buffer.from(e,"base64").toString("utf8"))}catch(e){return{}}},e}();function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var C=function(e){var t,n;function r(t){var n=(void 0===t?{}:t).AccessToken;return e.call(this,n||"")||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,E(t,n),r}(j);function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
/*!
* Copyright 2016 Amazon.com,
* Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Amazon Software License (the "License").
* You may not use this file except in compliance with the
* License. A copy of the License is located at
*
* http://aws.amazon.com/asl/
*
* or in the "license" file accompanying this file. This file is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, express or implied. See the License
* for the specific language governing permissions and
* limitations under the License.
*/var k=function(e){var t,n;function r(t){var n=(void 0===t?{}:t).IdToken;return e.call(this,n||"")||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,O(t,n),r}(j),L=function(){function e(e){var t=(void 0===e?{}:e).RefreshToken;this.token=t||""}return e.prototype.getToken=function(){return this.token},e}(),z=n(123),P=n.n(z),_=function(){function e(e){var t=void 0===e?{}:e,n=t.IdToken,r=t.RefreshToken,i=t.AccessToken,o=t.ClockDrift;if(null==i||null==n)throw new Error("Id token and Access Token must be present.");this.idToken=n,this.refreshToken=r,this.accessToken=i,this.clockDrift=void 0===o?this.calculateClockDrift():o}var t=e.prototype;return t.getIdToken=function(){return this.idToken},t.getRefreshToken=function(){return this.refreshToken},t.getAccessToken=function(){return this.accessToken},t.getClockDrift=function(){return this.clockDrift},t.calculateClockDrift=function(){return Math.floor(new Date/1e3)-Math.min(this.accessToken.getIssuedAt(),this.idToken.getIssuedAt())},t.isValid=function(){var e=Math.floor(new Date/1e3)-this.clockDrift;return e<this.accessToken.getExpiration()&&e<this.idToken.getExpiration()},e}(),R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],U=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],B=function(){function e(){}return e.prototype.getNowString=function(){var e=new Date,t=U[e.getUTCDay()],n=R[e.getUTCMonth()],r=e.getUTCDate(),i=e.getUTCHours();i<10&&(i="0"+i);var o=e.getUTCMinutes();o<10&&(o="0"+o);var a=e.getUTCSeconds();return a<10&&(a="0"+a),t+" "+n+" "+r+" "+i+":"+o+":"+a+" UTC "+e.getUTCFullYear()},e}(),Y=function(){function e(e){var t=void 0===e?{}:e,n=t.Name,r=t.Value;this.Name=n||"",this.Value=r||""}var t=e.prototype;return t.getValue=function(){return this.Value},t.setValue=function(e){return this.Value=e,this},t.getName=function(){return this.Name},t.setName=function(e){return this.Name=e,this},t.toString=function(){return JSON.stringify(this)},t.toJSON=function(){return{Name:this.Name,Value:this.Value}},e}(),F={},Q=function(){function e(){}return e.setItem=function(e,t){return F[e]=t,F[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(F,e)?F[e]:void 0},e.removeItem=function(e){return delete F[e]},e.clear=function(){return F={}},e}(),G=function(){function e(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.cognito.test-ls",1),this.storageWindow.removeItem("aws.cognito.test-ls")}catch(e){this.storageWindow=Q}}return e.prototype.getStorage=function(){return this.storageWindow},e}(),Z="undefined"!=typeof navigator?navigator.userAgent:"nodejs",V=function(){function e(e){if(null==e||null==e.Username||null==e.Pool)throw new Error("Username and Pool information are required.");this.username=e.Username||"",this.pool=e.Pool,this.Session=null,this.client=e.Pool.client,this.signInUserSession=null,this.authenticationFlowType="USER_SRP_AUTH",this.storage=e.Storage||(new G).getStorage(),this.keyPrefix="CognitoIdentityServiceProvider."+this.pool.getClientId(),this.userDataKey=this.keyPrefix+"."+this.username+".userData"}var t=e.prototype;return t.setSignInUserSession=function(e){this.clearCachedUserData(),this.signInUserSession=e,this.cacheTokens()},t.getSignInUserSession=function(){return this.signInUserSession},t.getUsername=function(){return this.username},t.getAuthenticationFlowType=function(){return this.authenticationFlowType},t.setAuthenticationFlowType=function(e){this.authenticationFlowType=e},t.initiateAuth=function(e,t){var n=this,r=e.getAuthParameters();r.USERNAME=this.username;var i=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),o={AuthFlow:"CUSTOM_AUTH",ClientId:this.pool.getClientId(),AuthParameters:r,ClientMetadata:i};this.getUserContextData()&&(o.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",o,(function(e,r){if(e)return t.onFailure(e);var i=r.ChallengeName,o=r.ChallengeParameters;return"CUSTOM_CHALLENGE"===i?(n.Session=r.Session,t.customChallenge(o)):(n.signInUserSession=n.getCognitoUserSession(r.AuthenticationResult),n.cacheTokens(),t.onSuccess(n.signInUserSession))}))},t.authenticateUser=function(e,t){return"USER_PASSWORD_AUTH"===this.authenticationFlowType?this.authenticateUserPlainUsernamePassword(e,t):"USER_SRP_AUTH"===this.authenticationFlowType||"CUSTOM_AUTH"===this.authenticationFlowType?this.authenticateUserDefaultAuth(e,t):t.onFailure(new Error("Authentication flow type is invalid."))},t.authenticateUserDefaultAuth=function(e,t){var n,r,o=this,s=new A(this.pool.getUserPoolId().split("_")[1]),u=new B,c={};null!=this.deviceKey&&(c.DEVICE_KEY=this.deviceKey),c.USERNAME=this.username,s.getLargeAValue((function(d,f){d&&t.onFailure(d),c.SRP_A=f.toString(16),"CUSTOM_AUTH"===o.authenticationFlowType&&(c.CHALLENGE_NAME="SRP_A");var p=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),g={AuthFlow:o.authenticationFlowType,ClientId:o.pool.getClientId(),AuthParameters:c,ClientMetadata:p};o.getUserContextData(o.username)&&(g.UserContextData=o.getUserContextData(o.username)),o.client.request("InitiateAuth",g,(function(c,d){if(c)return t.onFailure(c);var f=d.ChallengeParameters;o.username=f.USER_ID_FOR_SRP,o.userDataKey=o.keyPrefix+"."+o.username+".userData",n=new h(f.SRP_B,16),r=new h(f.SALT,16),o.getCachedDeviceKeyAndPassword(),s.getPasswordAuthenticationKey(o.username,e.getPassword(),n,r,(function(e,n){e&&t.onFailure(e);var r=u.getNowString(),c=a.a.lib.WordArray.create(i.Buffer.concat([i.Buffer.from(o.pool.getUserPoolId().split("_")[1],"utf8"),i.Buffer.from(o.username,"utf8"),i.Buffer.from(f.SECRET_BLOCK,"base64"),i.Buffer.from(r,"utf8")])),h=a.a.lib.WordArray.create(n),g=P.a.stringify(l()(c,h)),y={};y.USERNAME=o.username,y.PASSWORD_CLAIM_SECRET_BLOCK=f.SECRET_BLOCK,y.TIMESTAMP=r,y.PASSWORD_CLAIM_SIGNATURE=g,null!=o.deviceKey&&(y.DEVICE_KEY=o.deviceKey);var v={ChallengeName:"PASSWORD_VERIFIER",ClientId:o.pool.getClientId(),ChallengeResponses:y,Session:d.Session,ClientMetadata:p};o.getUserContextData()&&(v.UserContextData=o.getUserContextData()),function e(t,n){return o.client.request("RespondToAuthChallenge",t,(function(r,i){return r&&"ResourceNotFoundException"===r.code&&-1!==r.message.toLowerCase().indexOf("device")?(y.DEVICE_KEY=null,o.deviceKey=null,o.randomPassword=null,o.deviceGroupKey=null,o.clearCachedDeviceKeyAndPassword(),e(t,n)):n(r,i)}))}(v,(function(e,n){return e?t.onFailure(e):o.authenticateUserInternal(n,s,t)}))}))}))}))},t.authenticateUserPlainUsernamePassword=function(e,t){var n=this,r={};if(r.USERNAME=this.username,r.PASSWORD=e.getPassword(),r.PASSWORD){var i=new A(this.pool.getUserPoolId().split("_")[1]);this.getCachedDeviceKeyAndPassword(),null!=this.deviceKey&&(r.DEVICE_KEY=this.deviceKey);var o=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),a={AuthFlow:"USER_PASSWORD_AUTH",ClientId:this.pool.getClientId(),AuthParameters:r,ClientMetadata:o};this.getUserContextData(this.username)&&(a.UserContextData=this.getUserContextData(this.username)),this.client.request("InitiateAuth",a,(function(e,r){return e?t.onFailure(e):n.authenticateUserInternal(r,i,t)}))}else t.onFailure(new Error("PASSWORD parameter is required"))},t.authenticateUserInternal=function(e,t,n){var r=this,o=e.ChallengeName,a=e.ChallengeParameters;if("SMS_MFA"===o)return this.Session=e.Session,n.mfaRequired(o,a);if("SELECT_MFA_TYPE"===o)return this.Session=e.Session,n.selectMFAType(o,a);if("MFA_SETUP"===o)return this.Session=e.Session,n.mfaSetup(o,a);if("SOFTWARE_TOKEN_MFA"===o)return this.Session=e.Session,n.totpRequired(o,a);if("CUSTOM_CHALLENGE"===o)return this.Session=e.Session,n.customChallenge(a);if("NEW_PASSWORD_REQUIRED"===o){this.Session=e.Session;var s=null,u=null,c=[],l=t.getNewPasswordRequiredChallengeUserAttributePrefix();if(a&&(s=JSON.parse(e.ChallengeParameters.userAttributes),u=JSON.parse(e.ChallengeParameters.requiredAttributes)),u)for(var d=0;d<u.length;d++)c[d]=u[d].substr(l.length);return n.newPasswordRequired(s,c)}if("DEVICE_SRP_AUTH"!==o){this.signInUserSession=this.getCognitoUserSession(e.AuthenticationResult),this.challengeName=o,this.cacheTokens();var f=e.AuthenticationResult.NewDeviceMetadata;if(null==f)return n.onSuccess(this.signInUserSession);t.generateHashDevice(e.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,e.AuthenticationResult.NewDeviceMetadata.DeviceKey,(function(o){if(o)return n.onFailure(o);var a={Salt:i.Buffer.from(t.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:i.Buffer.from(t.getVerifierDevices(),"hex").toString("base64")};r.verifierDevices=a.PasswordVerifier,r.deviceGroupKey=f.DeviceGroupKey,r.randomPassword=t.getRandomPassword(),r.client.request("ConfirmDevice",{DeviceKey:f.DeviceKey,AccessToken:r.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:a,DeviceName:Z},(function(t,i){return t?n.onFailure(t):(r.deviceKey=e.AuthenticationResult.NewDeviceMetadata.DeviceKey,r.cacheDeviceKeyAndPassword(),!0===i.UserConfirmationNecessary?n.onSuccess(r.signInUserSession,i.UserConfirmationNecessary):n.onSuccess(r.signInUserSession))}))}))}else this.getDeviceResponse(n)},t.completeNewPasswordChallenge=function(e,t,n,r){var i=this;if(!e)return n.onFailure(new Error("New password is required."));var o=new A(this.pool.getUserPoolId().split("_")[1]),a=o.getNewPasswordRequiredChallengeUserAttributePrefix(),s={};t&&Object.keys(t).forEach((function(e){s[a+e]=t[e]})),s.NEW_PASSWORD=e,s.USERNAME=this.username;var u={ChallengeName:"NEW_PASSWORD_REQUIRED",ClientId:this.pool.getClientId(),ChallengeResponses:s,Session:this.Session,ClientMetadata:r};this.getUserContextData()&&(u.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",u,(function(e,t){return e?n.onFailure(e):i.authenticateUserInternal(t,o,n)}))},t.getDeviceResponse=function(e,t){var n=this,r=new A(this.deviceGroupKey),o=new B,s={};s.USERNAME=this.username,s.DEVICE_KEY=this.deviceKey,r.getLargeAValue((function(u,c){u&&e.onFailure(u),s.SRP_A=c.toString(16);var d={ChallengeName:"DEVICE_SRP_AUTH",ClientId:n.pool.getClientId(),ChallengeResponses:s,ClientMetadata:t};n.getUserContextData()&&(d.UserContextData=n.getUserContextData()),n.client.request("RespondToAuthChallenge",d,(function(t,s){if(t)return e.onFailure(t);var u=s.ChallengeParameters,c=new h(u.SRP_B,16),d=new h(u.SALT,16);r.getPasswordAuthenticationKey(n.deviceKey,n.randomPassword,c,d,(function(t,r){if(t)return e.onFailure(t);var c=o.getNowString(),d=a.a.lib.WordArray.create(i.Buffer.concat([i.Buffer.from(n.deviceGroupKey,"utf8"),i.Buffer.from(n.deviceKey,"utf8"),i.Buffer.from(u.SECRET_BLOCK,"base64"),i.Buffer.from(c,"utf8")])),f=a.a.lib.WordArray.create(r),p=P.a.stringify(l()(d,f)),h={};h.USERNAME=n.username,h.PASSWORD_CLAIM_SECRET_BLOCK=u.SECRET_BLOCK,h.TIMESTAMP=c,h.PASSWORD_CLAIM_SIGNATURE=p,h.DEVICE_KEY=n.deviceKey;var g={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:n.pool.getClientId(),ChallengeResponses:h,Session:s.Session};n.getUserContextData()&&(g.UserContextData=n.getUserContextData()),n.client.request("RespondToAuthChallenge",g,(function(t,r){return t?e.onFailure(t):(n.signInUserSession=n.getCognitoUserSession(r.AuthenticationResult),n.cacheTokens(),e.onSuccess(n.signInUserSession))}))}))}))}))},t.confirmRegistration=function(e,t,n,r){var i={ClientId:this.pool.getClientId(),ConfirmationCode:e,Username:this.username,ForceAliasCreation:t,ClientMetadata:r};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("ConfirmSignUp",i,(function(e){return e?n(e,null):n(null,"SUCCESS")}))},t.sendCustomChallengeAnswer=function(e,t,n){var r=this,i={};i.USERNAME=this.username,i.ANSWER=e;var o=new A(this.pool.getUserPoolId().split("_")[1]);this.getCachedDeviceKeyAndPassword(),null!=this.deviceKey&&(i.DEVICE_KEY=this.deviceKey);var a={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:i,ClientId:this.pool.getClientId(),Session:this.Session,ClientMetadata:n};this.getUserContextData()&&(a.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",a,(function(e,n){return e?t.onFailure(e):r.authenticateUserInternal(n,o,t)}))},t.sendMFACode=function(e,t,n,r){var o=this,a={};a.USERNAME=this.username,a.SMS_MFA_CODE=e;var s=n||"SMS_MFA";"SOFTWARE_TOKEN_MFA"===s&&(a.SOFTWARE_TOKEN_MFA_CODE=e),null!=this.deviceKey&&(a.DEVICE_KEY=this.deviceKey);var u={ChallengeName:s,ChallengeResponses:a,ClientId:this.pool.getClientId(),Session:this.Session,ClientMetadata:r};this.getUserContextData()&&(u.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",u,(function(e,n){if(e)return t.onFailure(e);if("DEVICE_SRP_AUTH"!==n.ChallengeName){if(o.signInUserSession=o.getCognitoUserSession(n.AuthenticationResult),o.cacheTokens(),null==n.AuthenticationResult.NewDeviceMetadata)return t.onSuccess(o.signInUserSession);var r=new A(o.pool.getUserPoolId().split("_")[1]);r.generateHashDevice(n.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,n.AuthenticationResult.NewDeviceMetadata.DeviceKey,(function(e){if(e)return t.onFailure(e);var a={Salt:i.Buffer.from(r.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:i.Buffer.from(r.getVerifierDevices(),"hex").toString("base64")};o.verifierDevices=a.PasswordVerifier,o.deviceGroupKey=n.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,o.randomPassword=r.getRandomPassword(),o.client.request("ConfirmDevice",{DeviceKey:n.AuthenticationResult.NewDeviceMetadata.DeviceKey,AccessToken:o.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:a,DeviceName:Z},(function(e,r){return e?t.onFailure(e):(o.deviceKey=n.AuthenticationResult.NewDeviceMetadata.DeviceKey,o.cacheDeviceKeyAndPassword(),!0===r.UserConfirmationNecessary?t.onSuccess(o.signInUserSession,r.UserConfirmationNecessary):t.onSuccess(o.signInUserSession))}))}))}else o.getDeviceResponse(t)}))},t.changePassword=function(e,t,n,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return n(new Error("User is not authenticated"),null);this.client.request("ChangePassword",{PreviousPassword:e,ProposedPassword:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:r},(function(e){return e?n(e,null):n(null,"SUCCESS")}))},t.enableMFA=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);var t=[];t.push({DeliveryMedium:"SMS",AttributeName:"phone_number"}),this.client.request("SetUserSettings",{MFAOptions:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(t){return t?e(t,null):e(null,"SUCCESS")}))},t.setUserMfaPreference=function(e,t,n){if(null==this.signInUserSession||!this.signInUserSession.isValid())return n(new Error("User is not authenticated"),null);this.client.request("SetUserMFAPreference",{SMSMfaSettings:e,SoftwareTokenMfaSettings:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(e){return e?n(e,null):n(null,"SUCCESS")}))},t.disableMFA=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("SetUserSettings",{MFAOptions:[],AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(t){return t?e(t,null):e(null,"SUCCESS")}))},t.deleteUser=function(e,t){var n=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("DeleteUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:t},(function(t){return t?e(t,null):(n.clearCachedUser(),e(null,"SUCCESS"))}))},t.updateAttributes=function(e,t,n){var r=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return t(new Error("User is not authenticated"),null);this.client.request("UpdateUserAttributes",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserAttributes:e,ClientMetadata:n},(function(e){return e?t(e,null):r.getUserData((function(){return t(null,"SUCCESS")}),{bypassCache:!0})}))},t.getUserAttributes=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(t,n){if(t)return e(t,null);for(var r=[],i=0;i<n.UserAttributes.length;i++){var o={Name:n.UserAttributes[i].Name,Value:n.UserAttributes[i].Value},a=new Y(o);r.push(a)}return e(null,r)}))},t.getMFAOptions=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(t,n){return t?e(t,null):e(null,n.MFAOptions)}))},t.createGetUserRequest=function(){return this.client.promisifyRequest("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()})},t.refreshSessionIfPossible=function(e){var t=this;return void 0===e&&(e={}),new Promise((function(n){var r=t.signInUserSession.getRefreshToken();r&&r.getToken()?t.refreshSession(r,n,e.clientMetadata):n()}))},t.getUserData=function(e,t){var n=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return this.clearCachedUserData(),e(new Error("User is not authenticated"),null);var r=this.getUserDataFromCache();if(r)if(this.isFetchUserDataAndTokenRequired(t))this.fetchUserData().then((function(e){return n.refreshSessionIfPossible(t).then((function(){return e}))})).then((function(t){return e(null,t)})).catch(e);else try{return void e(null,JSON.parse(r))}catch(t){return this.clearCachedUserData(),void e(t,null)}else this.fetchUserData().then((function(t){e(null,t)})).catch(e)},t.getUserDataFromCache=function(){return this.storage.getItem(this.userDataKey)},t.isFetchUserDataAndTokenRequired=function(e){var t=(e||{}).bypassCache;return void 0!==t&&t},t.fetchUserData=function(){var e=this;return this.createGetUserRequest().then((function(t){return e.cacheUserData(t),t}))},t.deleteAttributes=function(e,t){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t(new Error("User is not authenticated"),null);this.client.request("DeleteUserAttributes",{UserAttributeNames:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(e){return e?t(e,null):t(null,"SUCCESS")}))},t.resendConfirmationCode=function(e,t){var n={ClientId:this.pool.getClientId(),Username:this.username,ClientMetadata:t};this.client.request("ResendConfirmationCode",n,(function(t,n){return t?e(t,null):e(null,n)}))},t.getSession=function(e,t){if(void 0===t&&(t={}),null==this.username)return e(new Error("Username is null. Cannot retrieve a new session"),null);if(null!=this.signInUserSession&&this.signInUserSession.isValid())return e(null,this.signInUserSession);var n="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,r=n+".idToken",i=n+".accessToken",o=n+".refreshToken",a=n+".clockDrift";if(this.storage.getItem(r)){var s=new k({IdToken:this.storage.getItem(r)}),u=new C({AccessToken:this.storage.getItem(i)}),c=new L({RefreshToken:this.storage.getItem(o)}),l=parseInt(this.storage.getItem(a),0)||0,d=new _({IdToken:s,AccessToken:u,RefreshToken:c,ClockDrift:l});if(d.isValid())return this.signInUserSession=d,e(null,this.signInUserSession);if(!c.getToken())return e(new Error("Cannot retrieve a new session. Please authenticate."),null);this.refreshSession(c,e,t.clientMetadata)}else e(new Error("Local storage is missing an ID Token, Please authenticate"),null)},t.refreshSession=function(e,t,n){var r=this,i=this.pool.wrapRefreshSessionCallback?this.pool.wrapRefreshSessionCallback(t):t,o={};o.REFRESH_TOKEN=e.getToken();var a="CognitoIdentityServiceProvider."+this.pool.getClientId(),s=a+".LastAuthUser";if(this.storage.getItem(s)){this.username=this.storage.getItem(s);var u=a+"."+this.username+".deviceKey";this.deviceKey=this.storage.getItem(u),o.DEVICE_KEY=this.deviceKey}var c={ClientId:this.pool.getClientId(),AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:o,ClientMetadata:n};this.getUserContextData()&&(c.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",c,(function(t,n){if(t)return"NotAuthorizedException"===t.code&&r.clearCachedUser(),i(t,null);if(n){var o=n.AuthenticationResult;return Object.prototype.hasOwnProperty.call(o,"RefreshToken")||(o.RefreshToken=e.getToken()),r.signInUserSession=r.getCognitoUserSession(o),r.cacheTokens(),i(null,r.signInUserSession)}}))},t.cacheTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),t=e+"."+this.username+".idToken",n=e+"."+this.username+".accessToken",r=e+"."+this.username+".refreshToken",i=e+"."+this.username+".clockDrift",o=e+".LastAuthUser";this.storage.setItem(t,this.signInUserSession.getIdToken().getJwtToken()),this.storage.setItem(n,this.signInUserSession.getAccessToken().getJwtToken()),this.storage.setItem(r,this.signInUserSession.getRefreshToken().getToken()),this.storage.setItem(i,""+this.signInUserSession.getClockDrift()),this.storage.setItem(o,this.username)},t.cacheUserData=function(e){this.storage.setItem(this.userDataKey,JSON.stringify(e))},t.clearCachedUserData=function(){this.storage.removeItem(this.userDataKey)},t.clearCachedUser=function(){this.clearCachedTokens(),this.clearCachedUserData()},t.cacheDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",n=e+".randomPasswordKey",r=e+".deviceGroupKey";this.storage.setItem(t,this.deviceKey),this.storage.setItem(n,this.randomPassword),this.storage.setItem(r,this.deviceGroupKey)},t.getCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",n=e+".randomPasswordKey",r=e+".deviceGroupKey";this.storage.getItem(t)&&(this.deviceKey=this.storage.getItem(t),this.randomPassword=this.storage.getItem(n),this.deviceGroupKey=this.storage.getItem(r))},t.clearCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",n=e+".randomPasswordKey",r=e+".deviceGroupKey";this.storage.removeItem(t),this.storage.removeItem(n),this.storage.removeItem(r)},t.clearCachedTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),t=e+"."+this.username+".idToken",n=e+"."+this.username+".accessToken",r=e+"."+this.username+".refreshToken",i=e+".LastAuthUser",o=e+"."+this.username+".clockDrift";this.storage.removeItem(t),this.storage.removeItem(n),this.storage.removeItem(r),this.storage.removeItem(i),this.storage.removeItem(o)},t.getCognitoUserSession=function(e){var t=new k(e),n=new C(e),r=new L(e);return new _({IdToken:t,AccessToken:n,RefreshToken:r})},t.forgotPassword=function(e,t){var n={ClientId:this.pool.getClientId(),Username:this.username,ClientMetadata:t};this.getUserContextData()&&(n.UserContextData=this.getUserContextData()),this.client.request("ForgotPassword",n,(function(t,n){return t?e.onFailure(t):"function"==typeof e.inputVerificationCode?e.inputVerificationCode(n):e.onSuccess(n)}))},t.confirmPassword=function(e,t,n,r){var i={ClientId:this.pool.getClientId(),Username:this.username,ConfirmationCode:e,Password:t,ClientMetadata:r};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("ConfirmForgotPassword",i,(function(e){return e?n.onFailure(e):n.onSuccess()}))},t.getAttributeVerificationCode=function(e,t,n){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t.onFailure(new Error("User is not authenticated"));this.client.request("GetUserAttributeVerificationCode",{AttributeName:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:n},(function(e,n){return e?t.onFailure(e):"function"==typeof t.inputVerificationCode?t.inputVerificationCode(n):t.onSuccess()}))},t.verifyAttribute=function(e,t,n){if(null==this.signInUserSession||!this.signInUserSession.isValid())return n.onFailure(new Error("User is not authenticated"));this.client.request("VerifyUserAttribute",{AttributeName:e,Code:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(e){return e?n.onFailure(e):n.onSuccess("SUCCESS")}))},t.getDevice=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("GetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey},(function(t,n){return t?e.onFailure(t):e.onSuccess(n)}))},t.forgetSpecificDevice=function(e,t){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t.onFailure(new Error("User is not authenticated"));this.client.request("ForgetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:e},(function(e){return e?t.onFailure(e):t.onSuccess("SUCCESS")}))},t.forgetDevice=function(e){var t=this;this.forgetSpecificDevice(this.deviceKey,{onFailure:e.onFailure,onSuccess:function(n){return t.deviceKey=null,t.deviceGroupKey=null,t.randomPassword=null,t.clearCachedDeviceKeyAndPassword(),e.onSuccess(n)}})},t.setDeviceStatusRemembered=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"remembered"},(function(t){return t?e.onFailure(t):e.onSuccess("SUCCESS")}))},t.setDeviceStatusNotRemembered=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"not_remembered"},(function(t){return t?e.onFailure(t):e.onSuccess("SUCCESS")}))},t.listDevices=function(e,t,n){if(null==this.signInUserSession||!this.signInUserSession.isValid())return n.onFailure(new Error("User is not authenticated"));var r={AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),Limit:e};t&&(r.PaginationToken=t),this.client.request("ListDevices",r,(function(e,t){return e?n.onFailure(e):n.onSuccess(t)}))},t.globalSignOut=function(e){var t=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("GlobalSignOut",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(n){return n?e.onFailure(n):(t.clearCachedUser(),e.onSuccess("SUCCESS"))}))},t.signOut=function(){this.signInUserSession=null,this.clearCachedUser()},t.sendMFASelectionAnswer=function(e,t){var n=this,r={};r.USERNAME=this.username,r.ANSWER=e;var i={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:r,ClientId:this.pool.getClientId(),Session:this.Session};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",i,(function(r,i){return r?t.onFailure(r):(n.Session=i.Session,"SMS_MFA"===e?t.mfaRequired(i.ChallengeName,i.ChallengeParameters):"SOFTWARE_TOKEN_MFA"===e?t.totpRequired(i.ChallengeName,i.ChallengeParameters):void 0)}))},t.getUserContextData=function(){return this.pool.getUserContextData(this.username)},t.associateSoftwareToken=function(e){var t=this;null!=this.signInUserSession&&this.signInUserSession.isValid()?this.client.request("AssociateSoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(t,n){return t?e.onFailure(t):e.associateSecretCode(n.SecretCode)})):this.client.request("AssociateSoftwareToken",{Session:this.Session},(function(n,r){return n?e.onFailure(n):(t.Session=r.Session,e.associateSecretCode(r.SecretCode))}))},t.verifySoftwareToken=function(e,t,n){var r=this;null!=this.signInUserSession&&this.signInUserSession.isValid()?this.client.request("VerifySoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserCode:e,FriendlyDeviceName:t},(function(e,t){return e?n.onFailure(e):n.onSuccess(t)})):this.client.request("VerifySoftwareToken",{Session:this.Session,UserCode:e,FriendlyDeviceName:t},(function(e,t){if(e)return n.onFailure(e);r.Session=t.Session;var i={};i.USERNAME=r.username;var o={ChallengeName:"MFA_SETUP",ClientId:r.pool.getClientId(),ChallengeResponses:i,Session:r.Session};r.getUserContextData()&&(o.UserContextData=r.getUserContextData()),r.client.request("RespondToAuthChallenge",o,(function(e,t){return e?n.onFailure(e):(r.signInUserSession=r.getCognitoUserSession(t.AuthenticationResult),r.cacheTokens(),n.onSuccess(r.signInUserSession))}))}))},e}();
/*!
* Copyright 2016 Amazon.com,
* Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Amazon Software License (the "License").
* You may not use this file except in compliance with the
* License. A copy of the License is located at
*
* http://aws.amazon.com/asl/
*
* or in the "license" file accompanying this file. This file is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, express or implied. See the License
* for the specific language governing permissions and
* limitations under the License.
*/n(334);function H(){}H.prototype.userAgent="aws-amplify/0.1.x js";var W=function(e){e&&(H.prototype.userAgent&&!H.prototype.userAgent.includes(e)&&(H.prototype.userAgent=H.prototype.userAgent.concat(" ",e)),H.prototype.userAgent&&""!==H.prototype.userAgent||(H.prototype.userAgent=e))},J=H;function K(e){var t="function"==typeof Map?new Map:void 0;return(K=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return q(e,arguments,ee(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),$(r,e)})(e)}function q(e,t,n){return(q=X()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&$(i,n.prototype),i}).apply(null,arguments)}function X(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function $(e,t){return($=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var te=function(e){var t,n;function r(t,n,r,i){var o;return(o=e.call(this,t)||this).code=n,o.name=r,o.statusCode=i,o}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,$(t,n),r}(K(Error)),ne=function(){function e(e,t,n){this.endpoint=t||"https://cognito-idp."+e+".amazonaws.com/";var r=(n||{}).credentials;this.fetchOptions=r?{credentials:r}:{}}var t=e.prototype;return t.promisifyRequest=function(e,t){var n=this;return new Promise((function(r,i){n.request(e,t,(function(e,t){e?i(new te(e.message,e.code,e.name,e.statusCode)):r(t)}))}))},t.request=function(e,t,n){var r,i={"Content-Type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityProviderService."+e,"X-Amz-User-Agent":J.prototype.userAgent},o=Object.assign({},this.fetchOptions,{headers:i,method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify(t)});fetch(this.endpoint,o).then((function(e){return r=e,e}),(function(e){if(e instanceof TypeError)throw new Error("Network error");throw e})).then((function(e){return e.json().catch((function(){return{}}))})).then((function(e){if(r.ok)return n(null,e);e;var t=(e.__type||e.code).split("#").pop(),i={code:t,name:t,message:e.message||e.Message||null};return n(i)})).catch((function(e){if(!(r&&r.headers&&r.headers.get("x-amzn-errortype"))){if(e instanceof Error&&"Network error"===e.message){var t={code:"NetworkError",name:e.name,message:e.message};return n(t)}return n(e)}try{var i=r.headers.get("x-amzn-errortype").split(":")[0],o={code:i,name:i,statusCode:r.status,message:r.status?r.status.toString():null};return n(o)}catch(t){return n(e)}}))},e}(),re=function(){function e(e,t){var n=e||{},r=n.UserPoolId,i=n.ClientId,o=n.endpoint,a=n.fetchOptions,s=n.AdvancedSecurityDataCollectionFlag;if(!r||!i)throw new Error("Both UserPoolId and ClientId are required.");if(!/^[\w-]+_.+$/.test(r))throw new Error("Invalid UserPoolId format.");var u=r.split("_")[0];this.userPoolId=r,this.clientId=i,this.client=new ne(u,o,a),this.advancedSecurityDataCollectionFlag=!1!==s,this.storage=e.Storage||(new G).getStorage(),t&&(this.wrapRefreshSessionCallback=t)}var t=e.prototype;return t.getUserPoolId=function(){return this.userPoolId},t.getClientId=function(){return this.clientId},t.signUp=function(e,t,n,r,i,o){var a=this,s={ClientId:this.clientId,Username:e,Password:t,UserAttributes:n,ValidationData:r,ClientMetadata:o};this.getUserContextData(e)&&(s.UserContextData=this.getUserContextData(e)),this.client.request("SignUp",s,(function(t,n){if(t)return i(t,null);var r={Username:e,Pool:a,Storage:a.storage},o={user:new V(r),userConfirmed:n.UserConfirmed,userSub:n.UserSub,codeDeliveryDetails:n.CodeDeliveryDetails};return i(null,o)}))},t.getCurrentUser=function(){var e="CognitoIdentityServiceProvider."+this.clientId+".LastAuthUser",t=this.storage.getItem(e);if(t){var n={Username:t,Pool:this,Storage:this.storage};return new V(n)}return null},t.getUserContextData=function(e){if("undefined"!=typeof AmazonCognitoAdvancedSecurityData){var t=AmazonCognitoAdvancedSecurityData;if(this.advancedSecurityDataCollectionFlag){var n=t.getData(e,this.userPoolId,this.clientId);if(n)return{EncodedData:n}}return{}}},e}(),ie=n(105),oe=function(){function e(e){if(!e.domain)throw new Error("The domain of cookieStorage can not be undefined.");if(this.domain=e.domain,e.path?this.path=e.path:this.path="/",Object.prototype.hasOwnProperty.call(e,"expires")?this.expires=e.expires:this.expires=365,Object.prototype.hasOwnProperty.call(e,"secure")?this.secure=e.secure:this.secure=!0,Object.prototype.hasOwnProperty.call(e,"sameSite")){if(!["strict","lax","none"].includes(e.sameSite))throw new Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if("none"===e.sameSite&&!this.secure)throw new Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=e.sameSite}else this.sameSite=null}var t=e.prototype;return t.setItem=function(e,t){var n={path:this.path,expires:this.expires,domain:this.domain,secure:this.secure};return this.sameSite&&(n.sameSite=this.sameSite),ie.set(e,t,n),ie.get(e)},t.getItem=function(e){return ie.get(e)},t.removeItem=function(e){var t={path:this.path,expires:this.expires,domain:this.domain,secure:this.secure};return this.sameSite&&(t.sameSite=this.sameSite),ie.remove(e,t)},t.clear=function(){for(var e=ie.get(),t=Object.keys(e).length,n=0;n<t;++n)this.removeItem(Object.keys(e)[n]);return{}},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r,i=n(143);!function(e){e.CONNECTION_CLOSED="Connection closed",e.CONNECTION_FAILED="Connection failed",e.REALTIME_SUBSCRIPTION_INIT_ERROR="AppSync Realtime subscription init error",e.SUBSCRIPTION_ACK="Subscription ack",e.TIMEOUT_DISCONNECT="Timeout disconnect"}(r||(r={})),t.b=i.a},function(e,t,n){"use strict";var r=n(35),i={keyPrefix:"aws-amplify-cache",capacityInBytes:1048576,itemMaxSize:21e4,defaultTTL:2592e5,defaultPriority:5,warningThreshold:.8,storage:(new(n(113).a)).getStorage()};function o(e){var t=0;t=e.length;for(var n=e.length;n>=0;n-=1){var r=e.charCodeAt(n);r>127&&r<=2047?t+=1:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&(n-=1)}return t}function a(){return(new Date).getTime()}function s(e){return Number.isInteger?Number.isInteger(e):function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}(e)}var u,c={},l=(function(){function e(){}e.clear=function(){c={}},e.getItem=function(e){return c[e]||null},e.setItem=function(e,t){c[e]=t},e.removeItem=function(e){delete c[e]}}(),n(51)),d=new l.a("StorageCache"),f=function(){function e(e){this.config=Object.assign({},e),this.cacheCurSizeKey=this.config.keyPrefix+"CurSize",this.checkConfig()}return e.prototype.getModuleName=function(){return"Cache"},e.prototype.checkConfig=function(){s(this.config.capacityInBytes)||(d.error("Invalid parameter: capacityInBytes. It should be an Integer. Setting back to default."),this.config.capacityInBytes=i.capacityInBytes),s(this.config.itemMaxSize)||(d.error("Invalid parameter: itemMaxSize. It should be an Integer. Setting back to default."),this.config.itemMaxSize=i.itemMaxSize),s(this.config.defaultTTL)||(d.error("Invalid parameter: defaultTTL. It should be an Integer. Setting back to default."),this.config.defaultTTL=i.defaultTTL),s(this.config.defaultPriority)||(d.error("Invalid parameter: defaultPriority. It should be an Integer. Setting back to default."),this.config.defaultPriority=i.defaultPriority),this.config.itemMaxSize>this.config.capacityInBytes&&(d.error("Invalid parameter: itemMaxSize. It should be smaller than capacityInBytes. Setting back to default."),this.config.itemMaxSize=i.itemMaxSize),(this.config.defaultPriority>5||this.config.defaultPriority<1)&&(d.error("Invalid parameter: defaultPriority. It should be between 1 and 5. Setting back to default."),this.config.defaultPriority=i.defaultPriority),(Number(this.config.warningThreshold)>1||Number(this.config.warningThreshold)<0)&&(d.error("Invalid parameter: warningThreshold. It should be between 0 and 1. Setting back to default."),this.config.warningThreshold=i.warningThreshold);this.config.capacityInBytes>5242880&&(d.error("Cache Capacity should be less than 5MB. Setting back to default. Setting back to default."),this.config.capacityInBytes=i.capacityInBytes)},e.prototype.fillCacheItem=function(e,t,n){var r={key:e,data:t,timestamp:a(),visitedTime:a(),priority:n.priority,expires:n.expires,type:typeof t,byteSize:0};return r.byteSize=o(JSON.stringify(r)),r.byteSize=o(JSON.stringify(r)),r},e.prototype.configure=function(e){return e?(e.keyPrefix&&d.warn("Don't try to configure keyPrefix!"),this.config=Object.assign({},this.config,e,e.Cache),this.checkConfig(),this.config):this.config},e}(),p=(u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=new l.a("Cache"),g=new(function(e){function t(t){var n=this,r=t?Object.assign({},i,t):i;return(n=e.call(this,r)||this).config.storage=r.storage,n.getItem=n.getItem.bind(n),n.setItem=n.setItem.bind(n),n.removeItem=n.removeItem.bind(n),n}return p(t,e),t.prototype._decreaseCurSizeInBytes=function(e){var t=this.getCacheCurSize();this.config.storage.setItem(this.cacheCurSizeKey,(t-e).toString())},t.prototype._increaseCurSizeInBytes=function(e){var t=this.getCacheCurSize();this.config.storage.setItem(this.cacheCurSizeKey,(t+e).toString())},t.prototype._refreshItem=function(e,t){return e.visitedTime=a(),this.config.storage.setItem(t,JSON.stringify(e)),e},t.prototype._isExpired=function(e){var t=this.config.storage.getItem(e),n=JSON.parse(t);return a()>=n.expires},t.prototype._removeItem=function(e,t){var n=t||JSON.parse(this.config.storage.getItem(e)).byteSize;this._decreaseCurSizeInBytes(n),this.config.storage.removeItem(e)},t.prototype._setItem=function(e,t){this._increaseCurSizeInBytes(t.byteSize);try{this.config.storage.setItem(e,JSON.stringify(t))}catch(e){this._decreaseCurSizeInBytes(t.byteSize),h.error("Failed to set item "+e)}},t.prototype._sizeToPop=function(e){var t=this.getCacheCurSize()+e-this.config.capacityInBytes,n=(1-this.config.warningThreshold)*this.config.capacityInBytes;return t>n?t:n},t.prototype._isCacheFull=function(e){return e+this.getCacheCurSize()>this.config.capacityInBytes},t.prototype._findValidKeys=function(){for(var e=[],t=[],n=0;n<this.config.storage.length;n+=1)t.push(this.config.storage.key(n));for(n=0;n<t.length;n+=1){var r=t[n];0===r.indexOf(this.config.keyPrefix)&&r!==this.cacheCurSizeKey&&(this._isExpired(r)?this._removeItem(r):e.push(r))}return e},t.prototype._popOutItems=function(e,t){for(var n=[],r=t,i=0;i<e.length;i+=1){var o=this.config.storage.getItem(e[i]);if(null!=o){var a=JSON.parse(o);n.push(a)}}n.sort((function(e,t){return e.priority>t.priority?-1:e.priority<t.priority?1:e.visitedTime<t.visitedTime?-1:1}));for(i=0;i<n.length;i+=1)if(this._removeItem(n[i].key,n[i].byteSize),(r-=n[i].byteSize)<=0)return},t.prototype.setItem=function(e,t,n){h.log("Set item: key is "+e+", value is "+t+" with options: "+n);var r=this.config.keyPrefix+e;if(r!==this.config.keyPrefix&&r!==this.cacheCurSizeKey)if(void 0!==t){var i={priority:n&&void 0!==n.priority?n.priority:this.config.defaultPriority,expires:n&&void 0!==n.expires?n.expires:this.config.defaultTTL+a()};if(i.priority<1||i.priority>5)h.warn("Invalid parameter: priority due to out or range. It should be within 1 and 5.");else{var o=this.fillCacheItem(r,t,i);if(o.byteSize>this.config.itemMaxSize)h.warn("Item with key: "+e+" you are trying to put into is too big!");else try{var s=this.config.storage.getItem(r);if(s&&this._removeItem(r,JSON.parse(s).byteSize),this._isCacheFull(o.byteSize)){var u=this._findValidKeys();if(this._isCacheFull(o.byteSize)){var c=this._sizeToPop(o.byteSize);this._popOutItems(u,c)}}this._setItem(r,o)}catch(e){h.warn("setItem failed! "+e)}}}else h.warn("The value of item should not be undefined!");else h.warn("Invalid key: should not be empty or 'CurSize'")},t.prototype.getItem=function(e,t){h.log("Get item: key is "+e+" with options "+t);var n=null,r=this.config.keyPrefix+e;if(r===this.config.keyPrefix||r===this.cacheCurSizeKey)return h.warn("Invalid key: should not be empty or 'CurSize'"),null;try{if(null!=(n=this.config.storage.getItem(r))){if(!this._isExpired(r)){var i=JSON.parse(n);return(i=this._refreshItem(i,r)).data}this._removeItem(r,JSON.parse(n).byteSize),n=null}if(t&&void 0!==t.callback){var o=t.callback();return null!==o&&this.setItem(e,o,t),o}return null}catch(e){return h.warn("getItem failed! "+e),null}},t.prototype.removeItem=function(e){h.log("Remove item: key is "+e);var t=this.config.keyPrefix+e;if(t!==this.config.keyPrefix&&t!==this.cacheCurSizeKey)try{var n=this.config.storage.getItem(t);n&&this._removeItem(t,JSON.parse(n).byteSize)}catch(e){h.warn("removeItem failed! "+e)}},t.prototype.clear=function(){h.log("Clear Cache");for(var e=[],t=0;t<this.config.storage.length;t+=1){var n=this.config.storage.key(t);0===n.indexOf(this.config.keyPrefix)&&e.push(n)}try{for(t=0;t<e.length;t+=1)this.config.storage.removeItem(e[t])}catch(e){h.warn("clear failed! "+e)}},t.prototype.getAllKeys=function(){for(var e=[],t=0;t<this.config.storage.length;t+=1){var n=this.config.storage.key(t);0===n.indexOf(this.config.keyPrefix)&&n!==this.cacheCurSizeKey&&e.push(n.substring(this.config.keyPrefix.length))}return e},t.prototype.getCacheCurSize=function(){var e=this.config.storage.getItem(this.cacheCurSizeKey);return e||(this.config.storage.setItem(this.cacheCurSizeKey,"0"),e="0"),Number(e)},t.prototype.createInstance=function(e){return e.keyPrefix&&e.keyPrefix!==i.keyPrefix||(h.error("invalid keyPrefix, setting keyPrefix with timeStamp"),e.keyPrefix=a.toString()),new t(e)},t}(f));t.a=g;r.a.register(g)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t);var r=n(93);n.d(t,"Auth",(function(){return r.a}));var i=n(26);n.d(t,"CognitoHostedUIIdentityProvider",(function(){return i.b}));var o=n(43);n.d(t,"CognitoUser",(function(){return o.e})),n.d(t,"CookieStorage",(function(){return o.i})),n.d(t,"appendToCognitoUserAgent",(function(){return o.k}));var a=n(52);n.d(t,"AuthErrorStrings",(function(){return a.a})),t.default=r.a},function(e,t,n){"use strict";var r,i;n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),function(e){e.API_KEY="API_KEY",e.AWS_IAM="AWS_IAM",e.OPENID_CONNECT="OPENID_CONNECT",e.AMAZON_COGNITO_USER_POOLS="AMAZON_COGNITO_USER_POOLS"}(r||(r={})),function(e){e.NO_API_KEY="No api-key configured",e.NO_CURRENT_USER="No current user",e.NO_CREDENTIALS="No credentials",e.NO_FEDERATED_JWT="No federated jwt"}(i||(i={}))},function(e,t,n){"use strict";(function(e){n.d(t,"d",(function(){return l})),n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return y}));var r=[{type:"text/plain",ext:"txt"},{type:"text/html",ext:"html"},{type:"text/javascript",ext:"js"},{type:"text/css",ext:"css"},{type:"text/csv",ext:"csv"},{type:"text/yaml",ext:"yml"},{type:"text/yaml",ext:"yaml"},{type:"text/calendar",ext:"ics"},{type:"text/calendar",ext:"ical"},{type:"image/apng",ext:"apng"},{type:"image/bmp",ext:"bmp"},{type:"image/gif",ext:"gif"},{type:"image/x-icon",ext:"ico"},{type:"image/x-icon",ext:"cur"},{type:"image/jpeg",ext:"jpg"},{type:"image/jpeg",ext:"jpeg"},{type:"image/jpeg",ext:"jfif"},{type:"image/jpeg",ext:"pjp"},{type:"image/jpeg",ext:"pjpeg"},{type:"image/png",ext:"png"},{type:"image/svg+xml",ext:"svg"},{type:"image/tiff",ext:"tif"},{type:"image/tiff",ext:"tiff"},{type:"image/webp",ext:"webp"},{type:"application/json",ext:"json"},{type:"application/xml",ext:"xml"},{type:"application/x-sh",ext:"sh"},{type:"application/zip",ext:"zip"},{type:"application/x-rar-compressed",ext:"rar"},{type:"application/x-tar",ext:"tar"},{type:"application/x-bzip",ext:"bz"},{type:"application/x-bzip2",ext:"bz2"},{type:"application/pdf",ext:"pdf"},{type:"application/java-archive",ext:"jar"},{type:"application/msword",ext:"doc"},{type:"application/vnd.ms-excel",ext:"xls"},{type:"application/vnd.ms-excel",ext:"xlsx"},{type:"message/rfc822",ext:"eml"}],i=function(e){return void 0===e&&(e={}),0===Object.keys(e).length},o=function(e,t,n){if(!e||!e.sort)return!1;var r=n&&"desc"===n?-1:1;return e.sort((function(e,n){var i=e[t],o=n[t];return void 0===o?void 0===i?0:1*r:void 0===i||i<o?-1*r:i>o?1*r:0})),!0},a=function(e,t){var n=Object.assign({},e);return t&&("string"==typeof t?delete n[t]:t.forEach((function(e){delete n[e]}))),n},s=function(e,t){void 0===t&&(t="application/octet-stream");var n=e.toLowerCase(),i=r.filter((function(e){return n.endsWith("."+e.ext)}));return i.length>0?i[0].type:t},u=function(e){var t=e.toLowerCase();return!!t.startsWith("text/")||("application/json"===t||"application/xml"===t||"application/sh"===t)},c=function(){for(var e="",t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n=32;n>0;n-=1)e+=t[Math.floor(Math.random()*t.length)];return e},l=function(e){if(e.isResolved)return e;var t=!0,n=!1,r=!1,i=e.then((function(e){return r=!0,t=!1,e}),(function(e){throw n=!0,t=!1,e}));return i.isFullfilled=function(){return r},i.isPending=function(){return t},i.isRejected=function(){return n},i},d=function(){if("undefined"==typeof self)return!1;var e=self;return void 0!==e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope},f=function(){return{isBrowser:"undefined"!=typeof window&&void 0!==window.document,isNode:void 0!==e&&null!=e.versions&&null!=e.versions.node}},p=function(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),!g(e))return e;var r={};for(var i in e){if(e.hasOwnProperty(i))r[t.includes(i)?i:i[0].toLowerCase()+i.slice(1)]=n.includes(i)?e[i]:p(e[i],t,n)}return r},h=function(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),!g(e))return e;var r={};for(var i in e){if(e.hasOwnProperty(i))r[t.includes(i)?i:i[0].toUpperCase()+i.slice(1)]=n.includes(i)?e[i]:h(e[i],t,n)}return r},g=function(e){return!(!(e instanceof Object)||e instanceof Array||e instanceof Function||e instanceof Number||e instanceof String||e instanceof Boolean)},y=function(){function e(){}return e.isEmpty=i,e.sortByField=o,e.objectLessAttributes=a,e.filenameToContentType=s,e.isTextFile=u,e.generateRandomString=c,e.makeQuerablePromise=l,e.isWebWorker=d,e.browserOrNode=f,e.transferKeyToLowerCase=p,e.transferKeyToUpperCase=h,e.isStrictObject=g,e}()}).call(this,n(129))},function(e,t,n){(function(t){var r;e.exports=(r=r||function(e,r){var i;if("undefined"!=typeof window&&window.crypto&&(i=window.crypto),"undefined"!=typeof self&&self.crypto&&(i=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!=typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&void 0!==t&&t.crypto&&(i=t.crypto),!i)try{i=n(331)}catch(e){}var o=function(){if(i){if("function"==typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),s={},u=s.lib={},c=u.Base={extend:function(e){var t=a(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},l=u.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=t!=r?t:4*e.length},toString:function(e){return(e||f).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var a=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s<i;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(o());return new l.init(t,e)}}),d=s.enc={},f=d.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new l.init(n,t/2)}},p=d.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new l.init(n,t)}},h=d.Utf8={stringify:function(e){try{return decodeURIComponent(escape(p.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return p.parse(unescape(encodeURIComponent(e)))}},g=u.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,c=e.min(4*u,o);if(u){for(var d=0;d<u;d+=a)this._doProcessBlock(i,d);n=i.splice(0,u),r.sigBytes-=c}return new l.init(n,c)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),y=(u.Hasher=g.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){g.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new y.HMAC.init(e,n).finalize(t)}}}),s.algo={});return s}(Math),r)}).call(this,n(89))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e},o={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5},a=function(){function e(e,t){void 0===t&&(t="WARN"),this.name=e,this.level=t}return e.prototype._padding=function(e){return e<10?"0"+e:""+e},e.prototype._ts=function(){var e=new Date;return[this._padding(e.getMinutes()),this._padding(e.getSeconds())].join(":")+"."+e.getMilliseconds()},e.prototype._log=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.level;e.LOG_LEVEL&&(i=e.LOG_LEVEL),"undefined"!=typeof window&&window.LOG_LEVEL&&(i=window.LOG_LEVEL);var a=o[i],s=o[t];if(s>=a){var u=void 0;"ERROR"===t&&console.error&&(u=void 0),"WARN"===t&&console.warn&&(u=void 0);var c="["+t+"] "+this._ts()+" "+this.name;if(1===n.length&&"string"==typeof n[0])u(c+" - "+n[0]);else if(1===n.length)u(c,n[0]);else if("string"==typeof n[0]){var l=n.slice(1);1===l.length&&(l=l[0]),u(c+" - "+n[0],l)}else u(c,n)}},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,i(["INFO"],e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,i(["INFO"],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,i(["WARN"],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,i(["ERROR"],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,i(["DEBUG"],e))},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,i(["VERBOSE"],e))},e.LOG_LEVEL=null,e}()},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.DEFAULT_MSG="Authentication Error",e.EMPTY_USERNAME="Username cannot be empty",e.INVALID_USERNAME="The username should either be a string or one of the sign in types",e.EMPTY_PASSWORD="Password cannot be empty",e.EMPTY_CODE="Confirmation code cannot be empty",e.SIGN_UP_ERROR="Error creating account",e.NO_MFA="No valid MFA method provided",e.INVALID_MFA="Invalid MFA type",e.EMPTY_CHALLENGE="Challenge response cannot be empty",e.NO_USER_SESSION="Failed to get the session because the user is empty"}(r||(r={}))},function(e,t,n){var r=n(229),i=n(231),o=n(185),a=n(79),s=n(161),u=n(166),c=n(230),l=n(167),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(d.call(e,n))return!1;return!0}},function(e,t,n){"use strict";function r(e){return"object"==typeof e&&null!==e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(2),i=n(4),o="content-length";var a={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},s=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(n){return function(a){return Object(r.__awaiter)(t,void 0,void 0,(function(){var t,s,u,c,l;return Object(r.__generator)(this,(function(d){return t=a.request,i.a.isInstance(t)&&(s=t.body,u=t.headers,s&&-1===Object.keys(u).map((function(e){return e.toLowerCase()})).indexOf(o)&&void 0!==(c=e(s))&&(t.headers=Object(r.__assign)(Object(r.__assign)({},t.headers),((l={})["content-length"]=String(c),l)))),[2,n(Object(r.__assign)(Object(r.__assign)({},a),{request:t}))]}))}))}}}(e.bodyLengthChecker),a)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,n(2).__exportStar(n(342),t);var r=n(216);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var i=n(219);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return i.Sha256}})},function(e,t,n){"use strict";function r(e){if("string"==typeof e){for(var t=e.length,n=t-1;n>=0;n--){var r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2)}return t}return"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.size?e.size:void 0}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2),i=n(269),o=n.n(i),a=function(e){var t=e.serviceId,n=e.clientVersion;return function(){return Object(r.__awaiter)(void 0,void 0,void 0,(function(){var e,i,a,s,u,c,l,d,f;return Object(r.__generator)(this,(function(r){return e=(null===(a=null===window||void 0===window?void 0:window.navigator)||void 0===a?void 0:a.userAgent)?o.a.parse(window.navigator.userAgent):void 0,i=[["aws-sdk-js",n],["os/"+((null===(s=null==e?void 0:e.os)||void 0===s?void 0:s.name)||"other"),null===(u=null==e?void 0:e.os)||void 0===u?void 0:u.version],["lang/js"],["md/browser",(null!==(l=null===(c=null==e?void 0:e.browser)||void 0===c?void 0:c.name)&&void 0!==l?l:"unknown")+"_"+(null!==(f=null===(d=null==e?void 0:e.browser)||void 0===d?void 0:d.version)&&void 0!==f?f:"unknown")]],t&&i.push(["api/"+t,n]),[2,i]}))}))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e){return function(){return Promise.reject(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2),i={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},o=function(e){return{applyToStack:function(e){e.add((function(e,t){return function(n){return Object(r.__awaiter)(void 0,void 0,void 0,(function(){var i,o,a,s,u,c,l,d,f;return Object(r.__generator)(this,(function(p){switch(p.label){case 0:return i=t.clientName,o=t.commandName,a=t.inputFilterSensitiveLog,s=t.logger,u=t.outputFilterSensitiveLog,[4,e(n)];case 1:return c=p.sent(),s?("function"==typeof s.info&&(l=c.output,d=l.$metadata,f=Object(r.__rest)(l,["$metadata"]),s.info({clientName:i,commandName:o,input:a(n.input),output:u(f),metadata:d})),[2,c]):[2,c]}}))}))}}),i)}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2);var i=function(e){var t,n=new URL(e),i=n.hostname,o=n.pathname,a=n.port,s=n.protocol,u=n.search;return u&&(t=function(e){var t,n,i={};if(e=e.replace(/^\?/,""))try{for(var o=Object(r.__values)(e.split("&")),a=o.next();!a.done;a=o.next()){var s=a.value,u=Object(r.__read)(s.split("="),2),c=u[0],l=u[1],d=void 0===l?null:l;c=decodeURIComponent(c),d&&(d=decodeURIComponent(d)),c in i?Array.isArray(i[c])?i[c].push(d):i[c]=[i[c],d]:i[c]=d}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}(u)),{hostname:i,port:a?parseInt(a):void 0,protocol:s,path:o,query:t}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return c}));var r=n(14),i=(n(23),n(97));class o{constructor({videoEltId:e,pageUrl:t,frameId:n,sourceUrl:r,documentTitle:i,iframeType:a="",liveOrArchived:s=o.liveOrArchived}){this._debug=!1,this.videoEltId=e,this.pageUrl=t,this.frameId=n,this.sourceUrl=r,this.documentTitle=i,this.iframeType=a,this.liveOrArchived=s}static buildVideoMgr(e){return{videoEltId:e&&e.VNid,documentTitle:document.title,pageUrl:document.URL,sourceUrl:e&&e.src}}getVideoElt(){return document.querySelector(`video[vnid='${this.videoEltId}']`)}isPaused(){if(this.frameId)return r.a.sendMessage("Messenger.relay",{name:"sidebar",action:"videoAction",data:{action:"isPaused",video:this},frameId:this.frameId}).then((e=>e.data));var e=this.getVideoElt();return e?Promise.resolve(e.paused):void 0}play(){if(this.frameId)return r.a.sendMessage("Messenger.relay",{name:"sidebar",action:"videoAction",data:{action:"play",video:this},frameId:this.frameId}).then((e=>new o(e.data)));var e=this.getVideoElt();return e&&(e.src?e&&e.paused&&e.play():this.iframeType),Promise.resolve(this)}isLiveCall(){let e=!1;return[/https\:\/\/meet\.google\.com/].forEach((t=>{t.exec(document.URL)&&(e=!0)})),e}getSeekTime(){return this.isLiveCall()?Promise.resolve({liveCall:!0,videoTime:Date.now()}):this.getSeekTimeForStoredVideo().then((e=>({liveCall:!1,videoTime:1e3*e})))}getProps(){if(this.frameId)return r.a.sendMessage("Messenger.relay",{name:"sidebar",action:"videoAction",data:{action:"getProps",video:this},frameId:this.frameId}).then((e=>e.data));var e=this.getVideoElt();let t={};if(e){var n=e.getBoundingClientRect();t={width:n.width,height:n.height,playbackRate:e.playbackRate,success:!0}}else t={success:!1,message:`Video does not exist [${this.videoEltId}]`};return Promise.resolve(t)}getSeekTimeForStoredVideo(){if(this.frameId)return r.a.sendMessage("Messenger.relay",{name:"sidebar",action:"videoAction",data:{action:"getSeekTimeForStoredVideo",video:this},frameId:this.frameId}).then((e=>e.data));var e=this.getVideoElt();if(e)if(e.src)this.videoTime=e.currentTime;else if("youtube"==this.iframeType)document.querySelector("[aria-label='Play']");return Promise.resolve(Math.floor(e.currentTime))}pause(){if(this.frameId)return r.a.sendMessage("Messenger.relay",{name:"sidebar",action:"videoAction",data:{action:"pause",video:this},frameId:this.frameId}).then((e=>new o(e.data)));var e=this.getVideoElt();return e&&e.pause(),Promise.resolve(this)}snapshot(e,t){try{if(this.frameId)return r.a.sendMessage("Messenger.relay",{name:"sidebar",action:"videoAction",data:{action:"snapshot",video:this,args:e},frameId:this.frameId}).then((e=>e.data));var n=this.getVideoElt();if(n)return new Promise((async(t,r)=>{var{success:i,dataUrl:o,imgData:a,width:s,height:u}=await this.takeSnapshot(n,e||{});t({success:i,dataUrl:o,imgData:a,time:n?n.currentTime:Date.now(),width:s,height:u})}));throw"video is null"}catch(e){return Promise.resolve({success:!1,message:`Video does not exist [${this.videoEltId}]`})}}seek(e){try{return this.frameId?r.a.sendMessage("Messenger.relay",{name:"sidebar",action:"videoAction",seekTime:e,data:{action:"seek",video:this,seekTime:e},frameId:this.frameId}).then((e=>new o(e.data))):new Promise(((t,n)=>{var r=this.getVideoElt();r&&(r.currentTime=e,t(this))}))}catch(e){}}typeOf(){try{return this.frameId?r.a.sendMessage("Messenger.relay",{name:"sidebar",action:"videoAction",data:{action:"seek",video:this},frameId:this.frameId}).then((e=>new o(e.data))):new Promise(((e,t)=>{var n=this.getVideoElt(),r=Math.floor(n.currentTime),i=Math.floor(n.duration);n&&(n.currentTime=1e5);const o=t=>{this.liveOrArchived=Math.abs(Math.floor(n.currentTime)-Math.floor(n.duration))>2||Math.abs(i-Math.floor(n.duration))>2?"LIVESTREAM":"ARCHIVED",n.currentTime=r,e(this),n.removeEventListener("seeked",o)};n.addEventListener("seeked",o)}))}catch(e){}}async takeSnapshot(e,t){let n="",o=null,a=0,{width:s}=t,u=e.getBoundingClientRect();try{if(s){a=s/(u.width/u.height)}else s=u.width,a=u.height;var l=document.createElement("canvas");l.width=s,l.height=a;let t=l.getContext("2d");if(t.drawImage(e,0,0,s,a),((e,t,n)=>{const r=e.getImageData(0,0,t,n).data;for(let e=0;e<t*n;e+=4)if(r[e]+r[e+1]+r[e+2]!==0||255!==r[e+3])return!1;return!0})(t,s,a))return new Promise((async(t,a)=>{e.getBoundingClientRect().y<window.pageYOffset&&window.scrollTo(0,e.getBoundingClientRect().y),await i.a.wait(100),u=e.getBoundingClientRect();let s=await r.a.sendMessage("appMgr.captureVisibleTab",{format:"jpeg",quality:80});if(s.ok){n=s.data;let e=document.createElement("img");document.querySelector("body").append(e),e.src=s.data,e.onload=function(){try{let i=e.naturalWidth/window.innerWidth;var r=document.createElement("canvas");r.width=u.width*i,r.height=u.height*i;let a=r.getContext("2d");a.drawImage(e,u.left*i,u.top*i,u.width*i,u.height*i,0,0,u.width*i,u.height*i),o=a.getImageData(0,0,r.width,r.height),n=r.toDataURL("image/jpeg",.8)}catch(e){n=c}finally{return e.remove(),r.remove(),t({success:!0,dataUrl:n,imgData:o,width:r.width,canvas:r.height})}}}}));{n=l.toDataURL("image/jpeg",.8),o=t.getImageData(0,0,l.width,l.height);let e={success:!0,dataUrl:n,imgData:o,width:l.width,height:l.height};return l.remove(),Promise.resolve(e)}}catch(e){return Promise.resolve({success:!1,dataUrl:n,imgData:o})}}}var a,s,u;u="stored",(s="liveOrArchived")in(a=o)?Object.defineProperty(a,s,{value:u,enumerable:!0,configurable:!0,writable:!0}):a[s]=u;const c="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAkACQAAD/4QB0RXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAIdpAAQAAAABAAAATgAAAAAAAACQAAAAAQAAAJAAAAABAAKgAgAEAAAAAQAAAe6gAwAEAAAAAQAAAQQAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAQQB7gMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmao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AcngdelTp9yov8AljD9f8aRQ1W8mVY0Aw2Cc8mse6upfOkBORkcGtZ/+PlPpWDdf6+X6ilLYpbmnp99K8MsRVNqHj5cnn61G7FGWb7zsw5Pb6VW037tx9RViX7if74/mKctkHVl+zLXMrxzMWVYJZQOnzIuRyOcZpLe3jm3vJklAAPTnrS6Z/x8S/8AXpcf+g1NZfcl+q0hLc07K1gihS6VAX3hfmAI+8R0xjoPp7VLNAtuI9pLb4Y5G3c/NJuJ7D8Pan23/Hgn/XX/ANnan3v/ACw/69rf+TVSIZ//2Q==";t.a=o},function(e,t,n){"use strict";var r=n(233),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:u,isUndefined:a,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return s(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function e(){var t={};function n(n,r){u(t[r])&&u(n)?t[r]=e(t[r],n):u(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return t},extend:function(e,t,n){return l(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t,n){"use strict";var r=n(241),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:u,isUndefined:a,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return s(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function e(){var t={};function n(n,r){u(t[r])&&u(n)?t[r]=e(t[r],n):u(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return t},extend:function(e,t,n){return l(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t,n){"use strict";var r=n(256),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:u,isUndefined:a,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return s(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function e(){var t={};function n(n,r){u(t[r])&&u(n)?t[r]=e(t[r],n):u(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return t},extend:function(e,t,n){return l(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t,n){var r=n(354),i=n(355),o=i;o.v1=r,o.v4=i,e.exports=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(6);function i(e,t,n){return new r.a(`Syntax Error: ${n}`,void 0,e,[t])}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.exportVideoById=t.deleteVideos=t.moveVideos=t.shareBulkVideos=t.shareVideos=t.editVideo=t.addVideo=t.viewVideo=t.fetchVideoById=t.fetchPublicVideoById=t.fetchSharedVideos=t.fetchVideosByPlatform=t.fetchVideosByNotebook=void 0;var a=n(160);t.fetchVideosByNotebook=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,a.apiRequest("get","/videos/notebooks/"+e)];case 1:return[2,t.sent().data]}}))}))};t.fetchVideosByPlatform=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,a.apiRequest("get","/videos/platform/"+e)];case 1:return[2,t.sent().data]}}))}))};t.fetchSharedVideos=function(){return i(void 0,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,a.apiRequest("get","/public/"+localStorage.getItem("tmp_id")+"/videos/shared")];case 1:return[2,e.sent().data]}}))}))};t.fetchPublicVideoById=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,a.apiRequest("get","public/videos/"+e)];case 1:return[2,t.sent().data]}}))}))};t.fetchVideoById=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,a.apiRequest("get","/videos/"+e)];case 1:return[2,t.sent().data]}}))}))};t.viewVideo=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,a.apiRequest("patch","/videos/view/"+e)];case 1:return[2,t.sent().data]}}))}))};t.addVideo=function(e,t){return i(void 0,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,a.apiRequest("post","/videos",r({},e),{notebookId:null!=t?t:null})];case 1:return[2,n.sent().data]}}))}))};t.editVideo=function(e,t){return i(void 0,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,a.apiRequest("patch","/videos/"+e,r({},t))];case 1:return[2,n.sent().data]}}))}))};t.shareVideos=function(e,t,n){return i(void 0,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,a.apiRequest("post","/videos/share",{videoIds:e,emails:null!=t?t:[],message:n})];case 1:return[2,r.sent().data]}}))}))};t.shareBulkVideos=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,a.apiRequest("post","/videos/share/bulk",{videoIds:e})];case 1:return[2,t.sent().data]}}))}))};t.moveVideos=function(e,t,n,r){return i(void 0,void 0,void 0,(function(){return o(this,(function(i){switch(i.label){case 0:return[4,a.apiRequest("patch","/videos/notebooks",{videoIds:e,notebookId:t,notebookName:r,oldNotebookId:n})];case 1:return[2,i.sent().data]}}))}))};t.deleteVideos=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,a.apiRequest("delete","/videos",{ids:e})];case 1:return[2,t.sent().data]}}))}))};t.exportVideoById=function(e){var t=e.userId,n=e.videoId,r=e.targetFormat;return i(void 0,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,a.apiRequest("get","/users/"+t+"/videos/"+n+"/export/"+r)];case 1:return[2,e.sent().data]}}))}))}},,function(e,t,n){"use strict";var r=n(91);t.a=r.a},function(e,t,n){"use strict";n.r(t);const r={MAIN_URL:`https://${new Map([["development","dev"],["production","app"],["testing","test"]]).get("production")}.videonotebook.com/`,JUST_INSTALLED_PATH:"https://app.videonotebook.com/sign-up",COVER_IMAGE_WIDTH:540};t.default=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r="aws-amplify/3.8.23",i={userAgent:r+" js",product:"",navigator:null,isReactNative:!1};if("undefined"!=typeof navigator&&navigator.product)switch(i.product=navigator.product||"",i.navigator=navigator||null,navigator.product){case"ReactNative":i.userAgent=r+" react-native",i.isReactNative=!0;break;default:i.userAgent=r+" js",i.isReactNative=!1}var o=function(){return i.userAgent}},function(e,t,n){var r=n(225),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1);t.default=function(e,t){var n=i.useState(e),o=n[0],a=n[1],s=i.useState(t),u=s[0],c=s[1];return r([o,{set:function(e,t){a(e),c(t)},enable:function(){return a(!0)},disable:function(){return a(!1)},toggle:function(){return a(!o)},toggleThereAndBack:function(e){a(!o),setTimeout((function(){return a(o)}),e)}}],void 0!==u?[u]:[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.triggerActivity=void 0;var r=null;t.triggerActivity=function(e){void 0===e&&(e=4500);var t=document.querySelector("#dialogContainer");t&&(r&&clearTimeout(r),t.setAttribute("is-active","true"),e!=1/0&&(r=window.setTimeout((function(){t.setAttribute("is-active","false")}),e)))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=function(e,t){return e instanceof t}},function(e,t,n){"use strict";function r(e){return 9===e||32===e}function i(e){return e>=48&&e<=57}function o(e){return e>=97&&e<=122||e>=65&&e<=90}function a(e){return o(e)||95===e}function s(e){return o(e)||i(e)||95===e}n.d(t,"d",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return s}))},,function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";const r=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i="["+r+"][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",o=new RegExp("^"+i+"$");t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t,n){if(t){const r=Object.keys(t),i=r.length;for(let o=0;o<i;o++)e[r[o]]="strict"===n?[t[r[o]]]:t[r[o]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.buildOptions=function(e,t,n){var r={};if(!e)return t;for(let i=0;i<n.length;i++)void 0!==e[n[i]]?r[n[i]]=e[n[i]]:r[n[i]]=t[n[i]];return r},t.isTagNameInArrayMode=function(e,t,n){return!1!==t&&(t instanceof RegExp?t.test(e):"function"==typeof t?!!t(e,n):"strict"===t)},t.isName=function(e){const t=o.exec(e);return!(null==t)},t.getAllMatches=function(e,t){const n=[];let r=t.exec(e);for(;r;){const i=[],o=r.length;for(let e=0;e<o;e++)i.push(r[e]);n.push(i),r=t.exec(e)}return n},t.nameRegexp=i},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,i)},i=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}},function(e,t,n){"use strict";var r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.NoteType=t.NoteListType=void 0,function(e){e.Notes="notes",e.Captions="captions"}(r||(r={})),t.NoteListType=r,function(e){e.Text="T",e.Screenshot="S",e.Annotation="A",e.AutogeneratedSlide="G"}(i||(i={})),t.NoteType=i},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";var r={stringToSet:function(e){return""==e?new Set:new Set(JSON.parse(e))},setItem:function(e,t){return new Promise(((n,r)=>{chrome.storage.local.set({[e]:t},(()=>{n()}))}))},getItem:function(e){return new Promise(((t,n)=>{chrome.storage.local.get(e,(n=>{t(n[e])}))}))},setListener:function(e){chrome.storage.local.onChanged.addListener(((t,n)=>{this.get().then((n=>e(n,t)))}))}};t.a=r},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){}}(),e.exports=n(667)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.unsubscribe=t.validateEmails=t.editMeWithoutWrapper=t.editMe=t.fetchMeWithoutWrapper=t.fetchMe=t.GoogleDriveAuthType=void 0;var a=n(160),s=n(265);!function(e){e.Always="Always",e.NotForNow="NotForNow",e.Never="Never"}(t.GoogleDriveAuthType||(t.GoogleDriveAuthType={}));t.fetchMe=function(){return i(void 0,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,a.apiRequest("get","/users/me")];case 1:return[2,e.sent().data]}}))}))};t.fetchMeWithoutWrapper=function(){return i(void 0,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,s.instance.get("/users/me")];case 1:return[2,e.sent().data]}}))}))};t.editMe=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,a.apiRequest("patch","/users/me",r({},e))];case 1:return[2,t.sent().data]}}))}))};t.editMeWithoutWrapper=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,s.instance.patch("/users/me",r({},e))];case 1:return[2,t.sent().data]}}))}))};t.validateEmails=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,a.apiRequest("get","/users/validate-emails",void 0,{emails:e.join(";")})];case 1:return[2,t.sent().data]}}))}))};t.unsubscribe=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,a.apiRequest("patch","/users/unsubscribe/"+e)];case 1:return[2,t.sent().data]}}))}))}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchLatest=t.deleteNotes=t.editNote=t.addTranscriptNote=t.addAutogeneratedSlideNote=t.addImageNote=t.addTextNote=t.addNote=t.fetchTranscriptsByUnfiled=t.fetchTranscriptsByShared=t.fetchTranscriptsByNotebook=t.fetchTranscriptsByNotebookOrVideo=t.fetchTranscriptsAll=t.fetchCaptionsByVideo=t.fetchNotesByVideo=t.fetchNotesByUnfiled=t.fetchNotesByShared=t.fetchNotesByNotebook=t.fetchNotesByNotebookOrVideo=t.fetchNotesAll=t.PER_PAGE=void 0;var a=n(160),s=n(83);t.PER_PAGE=50;t.fetchNotesAll=function(e){var n=e.offset,r=e.text,s=e.from,u=e.to,c=e.isPublic;return i(void 0,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,a.apiRequest("get",c?"/public/"+localStorage.getItem("tmp_id")+"/notes/notebooks/shared":"/notes",void 0,{type:"notes",limit:t.PER_PAGE,offset:n,text:r,from:s,to:u})];case 1:return[2,e.sent().data]}}))}))};t.fetchNotesByNotebookOrVideo=function(e){var n=e.notebookId,r=e.videoId,a=e.offset,s=e.text,u=e.from,c=e.to,l=e.isPublic,d=void 0!==l&&l;return i(void 0,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return r?[4,t.fetchNotesByVideo({limit:t.PER_PAGE,offset:a},r,s,u,c,d)]:[3,2];case 1:return[2,e.sent()];case 2:return"unfiled"!==n?[3,4]:[4,t.fetchNotesByUnfiled(a,s,u,c)];case 3:return[2,e.sent()];case 4:return"shared"!==n?[3,6]:[4,t.fetchNotesByShared(a,s,u,c,d)];case 5:return[2,e.sent()];case 6:return[4,t.fetchNotesByNotebook(n,a,s,u,c)];case 7:return[2,e.sent()]}}))}))};t.fetchNotesByNotebook=function(e,n,r,s,u){return i(void 0,void 0,void 0,(function(){return o(this,(function(i){switch(i.label){case 0:return[4,a.apiRequest("get","/notes/notebooks/"+e,void 0,{type:"notes",limit:t.PER_PAGE,offset:n,text:r,from:s,to:u})];case 1:return[2,i.sent().data]}}))}))};t.fetchNotesByShared=function(e,n,r,s,u){return i(void 0,void 0,void 0,(function(){return o(this,(function(i){switch(i.label){case 0:return[4,a.apiRequest("get",u?"/public/"+localStorage.getItem("tmp_id")+"/notes/notebooks/shared":"/notes/notebooks/shared",void 0,{type:"notes",limit:t.PER_PAGE,offset:e,text:n,from:r,to:s})];case 1:return[2,i.sent().data]}}))}))};t.fetchNotesByUnfiled=function(e,n,r,s){return i(void 0,void 0,void 0,(function(){return o(this,(function(i){switch(i.label){case 0:return[4,a.apiRequest("get","/notes/notebooks/unfiled",void 0,{type:"notes",limit:t.PER_PAGE,offset:e,text:n,from:r,to:s})];case 1:return[2,i.sent().data]}}))}))};t.fetchNotesByVideo=function(e,t,n,s,u,c){return i(void 0,void 0,void 0,(function(){return o(this,(function(i){switch(i.label){case 0:return[4,a.apiRequest("get",c?"/public/notes/videos/"+t:"/notes/videos/"+t,void 0,r(r({type:"notes"},e),{text:n,from:s,to:u}))];case 1:return[2,i.sent().data]}}))}))};t.fetchCaptionsByVideo=function(e,t,n,s,u,c){return i(void 0,void 0,void 0,(function(){return o(this,(function(i){switch(i.label){case 0:return[4,a.apiRequest("get",c?"/public/notes/videos/"+t:"/notes/videos/"+t,void 0,r(r({type:"transcript"},e),{text:n,from:s,to:u}))];case 1:return[2,i.sent().data]}}))}))};t.fetchTranscriptsAll=function(e){var n=e.offset,r=e.text,s=e.from,u=e.to,c=e.isPublic;return i(void 0,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,a.apiRequest("get",c?"/public/"+localStorage.getItem("tmp_id")+"/notes/notebooks/shared":"/notes",void 0,{type:"transcript",limit:t.PER_PAGE,offset:n,text:r,from:s,to:u})];case 1:return[2,e.sent().data]}}))}))};t.fetchTranscriptsByNotebookOrVideo=function(e){var n=e.notebookId,r=e.videoId,a=e.offset,s=e.text,u=e.from,c=e.to,l=e.isPublic,d=void 0!==l&&l;return i(void 0,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return r?[4,t.fetchCaptionsByVideo({limit:t.PER_PAGE,offset:a},r,s,u,c,d)]:[3,2];case 1:return[2,e.sent()];case 2:return"unfiled"!==n?[3,4]:[4,t.fetchTranscriptsByUnfiled(a,s,u,c)];case 3:return[2,e.sent()];case 4:return"shared"!==n?[3,6]:[4,t.fetchTranscriptsByShared(a,s,u,c,d)];case 5:return[2,e.sent()];case 6:return[4,t.fetchTranscriptsByNotebook(n,a,s,u,c)];case 7:return[2,e.sent()]}}))}))};t.fetchTranscriptsByNotebook=function(e,n,r,s,u){return i(void 0,void 0,void 0,(function(){return o(this,(function(i){switch(i.label){case 0:return[4,a.apiRequest("get","/notes/notebooks/"+e,void 0,{type:"transcript",limit:t.PER_PAGE,offset:n,text:r,from:s,to:u})];case 1:return[2,i.sent().data]}}))}))};t.fetchTranscriptsByShared=function(e,n,r,s,u){return i(void 0,void 0,void 0,(function(){return o(this,(function(i){switch(i.label){case 0:return[4,a.apiRequest("get",u?"/public/"+localStorage.getItem("tmp_id")+"/notes/notebooks/shared":"/notes/notebooks/shared",void 0,{type:"transcript",limit:t.PER_PAGE,offset:e,text:n,from:r,to:s})];case 1:return[2,i.sent().data]}}))}))};t.fetchTranscriptsByUnfiled=function(e,n,r,s){return i(void 0,void 0,void 0,(function(){return o(this,(function(i){switch(i.label){case 0:return[4,a.apiRequest("get","/notes/notebooks/unfiled",void 0,{type:"transcript",limit:t.PER_PAGE,offset:e,text:n,from:r,to:s})];case 1:return[2,i.sent().data]}}))}))};t.addNote=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,a.apiRequest("post","/notes",r({},e))];case 1:return[2,t.sent().data]}}))}))};t.addTextNote=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(n){return[2,t.addNote(r(r({},e),{noteType:s.NoteType.Text}))]}))}))};t.addImageNote=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(n){return[2,t.addNote(r(r({},e),{noteType:s.NoteType.Screenshot}))]}))}))};t.addAutogeneratedSlideNote=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(n){return[2,t.addNote(r(r({},e),{noteType:s.NoteType.AutogeneratedSlide}))]}))}))};t.addTranscriptNote=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(n){return[2,t.addNote(r(r({},e),{noteType:s.NoteType.Annotation}))]}))}))};t.editNote=function(e,t){return i(void 0,void 0,void 0,(function(){var n,r,i,u,c,l,d;return o(this,(function(o){switch(o.label){case 0:return n={textContent:null!==(r=t.textContent)&&void 0!==r?r:void 0,htmlContent:null!==(i=t.htmlContent)&&void 0!==i?i:void 0,image:null!==(u=t.image)&&void 0!==u?u:void 0,imageMarked:null!==(c=t.imageMarked)&&void 0!==c?c:void 0,marks:null!==(l=t.marks)&&void 0!==l?l:void 0},t.noteType!==s.NoteType.Screenshot||(null===(d=t.textContent)||void 0===d?void 0:d.length)||(n.textContent=void 0),[4,a.apiRequest("patch","/notes/"+e,n)];case 1:return[2,o.sent().data]}}))}))};t.deleteNotes=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,a.apiRequest("delete","/notes",{ids:e})];case 1:return[2,t.sent().data]}}))}))};t.fetchLatest=function(){return i(void 0,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,a.apiRequest("get","/notes/latest")];case 1:return[2,e.sent().data]}}))}))}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(14);t.a=class{constructor(e="",t=!1){this._mode=chrome.tabs&&chrome.extension.getBackgroundPage()===window?"background":"contentScript","background"==this._mode&&t&&Messenger.addReceiver("addonAnalyticsMgr",this)}_onMessage_sendCustomEvent(e,t,n){const r=backendMgr.getUserInfo();r&&!r.optedOutOfReporting&&this.sendCustomEvent(e),n({success:ok})}sendCustomEvent({category:e,action:t,label:n}){if("background"==this._mode){const r=backendMgr.getUserInfo(),i=null==r?void 0:r.id;return i&&ga("set","userId",i),ga("send","event",e,t,n)}r.a.sendMessage("addonAnalyticsMgr.sendCustomEvent",{category:e,label:n,action:t})}sendPageView(e){ga("send","pageview",e)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return I})),n.d(t,"a",(function(){return w}));var r=n(93),i=n(45),o=n(277),a=n(51),s=n(119),u=n(35),c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},l=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},d=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},p=new a.a("RestAPI"),h=function(){function e(e){this._api=null,this.Credentials=s.a,this._options=e,p.debug("API Options",this._options)}return e.prototype.getModuleName=function(){return"RestAPI"},e.prototype.configure=function(e){var t=e||{},n=t.API,r=void 0===n?{}:n,i=f(t,["API"]),o=c(c({},i),r);if(p.debug("configure Rest API",{opt:o}),o.aws_project_region){if(o.aws_cloud_logic_custom){var a=o.aws_cloud_logic_custom;o.endpoints="string"==typeof a?JSON.parse(a):a}o=Object.assign({},o,{region:o.aws_project_region,header:{}})}return Array.isArray(o.endpoints)?o.endpoints.forEach((function(e){void 0!==e.custom_header&&"function"!=typeof e.custom_header&&(p.warn("Rest API "+e.name+", custom_header should be a function"),e.custom_header=void 0)})):this._options&&Array.isArray(this._options.endpoints)?o.endpoints=this._options.endpoints:o.endpoints=[],this._options=Object.assign({},this._options,o),this.createInstance(),this._options},e.prototype.createInstance=function(){return p.debug("create Rest API instance"),this._api=new o.a(this._options),this._api.Credentials=this.Credentials,!0},e.prototype.get=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var a=this._api.get(r,o);return this._api.updateRequestToBeCancellable(a,i),a}catch(e){return Promise.reject(e.message)}},e.prototype.post=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var a=this._api.post(r,o);return this._api.updateRequestToBeCancellable(a,i),a}catch(e){return Promise.reject(e.message)}},e.prototype.put=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var a=this._api.put(r,o);return this._api.updateRequestToBeCancellable(a,i),a}catch(e){return Promise.reject(e.message)}},e.prototype.patch=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var a=this._api.patch(r,o);return this._api.updateRequestToBeCancellable(a,i),a}catch(e){return Promise.reject(e.message)}},e.prototype.del=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var a=this._api.del(r,o);return this._api.updateRequestToBeCancellable(a,i),a}catch(e){return Promise.reject(e.message)}},e.prototype.head=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var a=this._api.head(r,o);return this._api.updateRequestToBeCancellable(a,i),a}catch(e){return Promise.reject(e.message)}},e.prototype.isCancel=function(e){return this._api.isCancel(e)},e.prototype.cancel=function(e,t){return this._api.cancel(e,t)},e.prototype.endpoint=function(e){return l(this,void 0,void 0,(function(){return d(this,(function(t){return[2,this._api.endpoint(e)]}))}))},e.prototype.getEndpointInfo=function(e,t){var n=this._options.endpoints;if(!Array.isArray(n))throw new Error("API category not configured");var r=n.find((function(t){return t.name===e}));if(!r)throw new Error("API "+e+" does not exist");var i={endpoint:r.endpoint+t};return"string"==typeof r.region?i.region=r.region:"string"==typeof this._options.region&&(i.region=this._options.region),"string"==typeof r.service?i.service=r.service||"execute-api":i.service="execute-api","function"==typeof r.custom_header?i.custom_header=r.custom_header:i.custom_header=void 0,i},e}(),g=new h(null);u.a.register(g);var y=n(264),v=function(){return(v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},m=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},b=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},M=new a.a("API"),I=function(){function e(e){this.Auth=r.a,this.Cache=i.a,this.Credentials=s.a,this._options=e,this._restApi=new h(e),this._graphqlApi=new y.a(e),M.debug("API Options",this._options)}return e.prototype.getModuleName=function(){return"API"},e.prototype.configure=function(e){this._options=Object.assign({},this._options,e),this._restApi.Credentials=this.Credentials,this._graphqlApi.Auth=this.Auth,this._graphqlApi.Cache=this.Cache,this._graphqlApi.Credentials=this.Credentials;var t=this._restApi.configure(this._options),n=this._graphqlApi.configure(this._options);return v(v({},t),n)},e.prototype.get=function(e,t,n){return this._restApi.get(e,t,n)},e.prototype.post=function(e,t,n){return this._restApi.post(e,t,n)},e.prototype.put=function(e,t,n){return this._restApi.put(e,t,n)},e.prototype.patch=function(e,t,n){return this._restApi.patch(e,t,n)},e.prototype.del=function(e,t,n){return this._restApi.del(e,t,n)},e.prototype.head=function(e,t,n){return this._restApi.head(e,t,n)},e.prototype.isCancel=function(e){return this._restApi.isCancel(e)},e.prototype.cancel=function(e,t){return this._restApi.cancel(e,t)},e.prototype.endpoint=function(e){return m(this,void 0,void 0,(function(){return b(this,(function(t){return[2,this._restApi.endpoint(e)]}))}))},e.prototype.getGraphqlOperationType=function(e){return this._graphqlApi.getGraphqlOperationType(e)},e.prototype.graphql=function(e,t){return this._graphqlApi.graphql(e,t)},e}(),w=new I(null);u.a.register(w)},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=s(n(1)),c=a(n(8)),l=s(n(24));t.default=function(e){var t=e.block,n=void 0!==t&&t,r=e.width,i=void 0===r?"100%":r,o=e.height,a=void 0===o?"100%":o,s=e.inverted,c=void 0!==s&&s,l=e.overlay,d=void 0!==l&&l,f=e.relative,p=void 0!==f&&f;return n?u.default.createElement(g,{width:i,height:a,overlay:d,relative:p},u.default.createElement(y,{inverted:c},u.default.createElement("div",null),u.default.createElement("div",null),u.default.createElement("div",null),u.default.createElement("div",null),u.default.createElement("div",null),u.default.createElement("div",null),u.default.createElement("div",null),u.default.createElement("div",null),u.default.createElement("div",null))):u.default.createElement(v,{inverted:c},u.default.createElement("div",null),u.default.createElement("div",null),u.default.createElement("div",null),u.default.createElement("div",null))};var d,f,p,h,g=c.default.div.withConfig({displayName:"Container",componentId:"sc-rwrz7f"})(f||(f=r(["\n width: ",";\n height: ",";\n display: flex;\n align-items: center;\n justify-content: center;\n\n ","\n"],["\n width: ",";\n height: ",";\n display: flex;\n align-items: center;\n justify-content: center;\n\n ","\n"])),(function(e){return e.width}),(function(e){return e.height}),(function(e){var t=e.overlay,n=e.relative;return t&&c.css(d||(d=r(["\n backdrop-filter: blur(2px);\n position: ",";\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n "],["\n backdrop-filter: blur(2px);\n position: ",";\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n "])),n?"absolute":"fixed")})),y=c.default.div.withConfig({displayName:"LoaderSquare",componentId:"sc-16r1vkf"})(p||(p=r(["\n display: inline-block;\n position: relative;\n width: 80px;\n height: 80px;\n\n div {\n position: absolute;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: ",";\n animation: lds-grid 1.2s linear infinite;\n\n &:nth-child(1) {\n top: 8px;\n left: 8px;\n animation-delay: 0s;\n }\n\n &:nth-child(2) {\n top: 8px;\n left: 32px;\n animation-delay: -0.4s;\n }\n\n &:nth-child(3) {\n top: 8px;\n left: 56px;\n animation-delay: -0.8s;\n }\n\n &:nth-child(4) {\n top: 32px;\n left: 8px;\n animation-delay: -0.4s;\n }\n\n &:nth-child(5) {\n top: 32px;\n left: 32px;\n animation-delay: -0.8s;\n }\n\n &:nth-child(6) {\n top: 32px;\n left: 56px;\n animation-delay: -1.2s;\n }\n\n &:nth-child(7) {\n top: 56px;\n left: 8px;\n animation-delay: -0.8s;\n }\n\n &:nth-child(8) {\n top: 56px;\n left: 32px;\n animation-delay: -1.2s;\n }\n\n &:nth-child(9) {\n top: 56px;\n left: 56px;\n animation-delay: -1.6s;\n }\n }\n\n @keyframes lds-grid {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n }\n"],["\n display: inline-block;\n position: relative;\n width: 80px;\n height: 80px;\n\n div {\n position: absolute;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: ",";\n animation: lds-grid 1.2s linear infinite;\n\n &:nth-child(1) {\n top: 8px;\n left: 8px;\n animation-delay: 0s;\n }\n\n &:nth-child(2) {\n top: 8px;\n left: 32px;\n animation-delay: -0.4s;\n }\n\n &:nth-child(3) {\n top: 8px;\n left: 56px;\n animation-delay: -0.8s;\n }\n\n &:nth-child(4) {\n top: 32px;\n left: 8px;\n animation-delay: -0.4s;\n }\n\n &:nth-child(5) {\n top: 32px;\n left: 32px;\n animation-delay: -0.8s;\n }\n\n &:nth-child(6) {\n top: 32px;\n left: 56px;\n animation-delay: -1.2s;\n }\n\n &:nth-child(7) {\n top: 56px;\n left: 8px;\n animation-delay: -0.8s;\n }\n\n &:nth-child(8) {\n top: 56px;\n left: 32px;\n animation-delay: -1.2s;\n }\n\n &:nth-child(9) {\n top: 56px;\n left: 56px;\n animation-delay: -1.6s;\n }\n }\n\n @keyframes lds-grid {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n }\n"])),(function(e){return e.inverted?l.default.colors.whiteBase:l.default.colors.primary})),v=c.default.div.withConfig({displayName:"LoaderInline",componentId:"sc-1ifg739"})(h||(h=r(["\n display: inline-block;\n position: relative;\n width: 80px;\n height: 20px;\n\n div {\n position: absolute;\n top: 6px;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: ",";\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n\n &:nth-child(1) {\n left: 8px;\n animation: lds-ellipsis1 0.6s infinite;\n }\n\n &:nth-child(2) {\n left: 8px;\n animation: lds-ellipsis2 0.6s infinite;\n }\n\n &:nth-child(3) {\n left: 32px;\n animation: lds-ellipsis2 0.6s infinite;\n }\n\n &:nth-child(4) {\n left: 56px;\n animation: lds-ellipsis3 0.6s infinite;\n }\n }\n\n @keyframes lds-ellipsis1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n\n @keyframes lds-ellipsis3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n }\n\n @keyframes lds-ellipsis2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(24px, 0);\n }\n }\n"],["\n display: inline-block;\n position: relative;\n width: 80px;\n height: 20px;\n\n div {\n position: absolute;\n top: 6px;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: ",";\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n\n &:nth-child(1) {\n left: 8px;\n animation: lds-ellipsis1 0.6s infinite;\n }\n\n &:nth-child(2) {\n left: 8px;\n animation: lds-ellipsis2 0.6s infinite;\n }\n\n &:nth-child(3) {\n left: 32px;\n animation: lds-ellipsis2 0.6s infinite;\n }\n\n &:nth-child(4) {\n left: 56px;\n animation: lds-ellipsis3 0.6s infinite;\n }\n }\n\n @keyframes lds-ellipsis1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n\n @keyframes lds-ellipsis3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n }\n\n @keyframes lds-ellipsis2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(24px, 0);\n }\n }\n"])),(function(e){return e.inverted?l.default.colors.whiteBase:l.default.colors.primary}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return F}));var r=n(26),i=n(51),o=n(115),a=n(119),s=n(221),u=n(177),c=n(113),l=n(49);var d,f=n(35),p=n(43),h=n(33),g=function(e){var t=window.open(e,"_self");return t?Promise.resolve(t):Promise.reject()},y=n(114),v=n.n(y),m=n(123),b=n.n(m),M=function(){return(M=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},I=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},w=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},N=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},S="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",x=function(e,t,n){o.a.dispatch("auth",{event:e,data:t,message:n},"Auth",S)},T=new i.a("OAuth"),D=function(){function e(e){var t=e.config,n=e.cognitoClientId,r=e.scopes,i=void 0===r?[]:r;if(this._urlOpener=t.urlOpener||g,this._config=t,this._cognitoClientId=n,!this.isValidScopes(i))throw Error("scopes must be a String Array");this._scopes=i}return e.prototype.isValidScopes=function(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))},e.prototype.oauthSignIn=function(e,t,n,i,o,a){void 0===e&&(e="code"),void 0===o&&(o=r.b.Cognito);var s=this._generateState(32),u=a?s+"-"+a.split("").map((function(e){return e.charCodeAt(0).toString(16).padStart(2,"0")})).join(""):s;!function(e){window.sessionStorage.setItem("oauth_state",e)}(u);var c,l=this._generateRandom(128);c=l,window.sessionStorage.setItem("ouath_pkce_key",c);var d=this._generateChallenge(l),f=this._scopes.join(" "),p="https://"+t+"/oauth2/authorize?"+Object.entries(M(M({redirect_uri:n,response_type:e,client_id:i,identity_provider:o,scope:f,state:u},"code"===e?{code_challenge:d}:{}),"code"===e?{code_challenge_method:"S256"}:{})).map((function(e){var t=N(e,2),n=t[0],r=t[1];return encodeURIComponent(n)+"="+encodeURIComponent(r)})).join("&");T.debug("Redirecting to "+p),this._urlOpener(p,n)},e.prototype._handleCodeFlow=function(e){return I(this,void 0,void 0,(function(){var t,n,i,o,a,s,u,c,l,d,f,p,g,y;return w(this,(function(v){switch(v.label){case 0:return t=(Object(h.parse)(e).query||"").split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var n,r=N(t,2),i=r[0],o=r[1];return M(M({},e),((n={})[i]=o,n))}),{code:void 0}).code,n=Object(h.parse)(e).pathname||"/",i=Object(h.parse)(this._config.redirectSignIn).pathname||"/",t&&n===i?(o="https://"+this._config.domain+"/oauth2/token",x("codeFlow",{},"Retrieving tokens from "+o),a=Object(r.d)(this._config)?this._cognitoClientId:this._config.clientID,s=Object(r.d)(this._config)?this._config.redirectSignIn:this._config.redirectUri,m=window.sessionStorage.getItem("ouath_pkce_key"),window.sessionStorage.removeItem("ouath_pkce_key"),c=M({grant_type:"authorization_code",code:t,client_id:a,redirect_uri:s},(u=m)?{code_verifier:u}:{}),T.debug("Calling token endpoint: "+o+" with",c),l=Object.entries(c).map((function(e){var t=N(e,2),n=t[0],r=t[1];return encodeURIComponent(n)+"="+encodeURIComponent(r)})).join("&"),[4,fetch(o,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:l})]):[2];case 1:return[4,v.sent().json()];case 2:if(d=v.sent(),f=d.access_token,p=d.refresh_token,g=d.id_token,y=d.error)throw new Error(y);return[2,{accessToken:f,refreshToken:p,idToken:g}]}var m}))}))},e.prototype._handleImplicitFlow=function(e){return I(this,void 0,void 0,(function(){var t,n,r;return w(this,(function(i){return t=(Object(h.parse)(e).hash||"#").substr(1).split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var n,r=N(t,2),i=r[0],o=r[1];return M(M({},e),((n={})[i]=o,n))}),{id_token:void 0,access_token:void 0}),n=t.id_token,r=t.access_token,x("implicitFlow",{},"Got tokens from "+e),T.debug("Retrieving implicit tokens from "+e+" with"),[2,{accessToken:r,idToken:n,refreshToken:null}]}))}))},e.prototype.handleAuthResponse=function(e){return I(this,void 0,void 0,(function(){var t,n,r,i,o,a,s;return w(this,(function(u){switch(u.label){case 0:if(u.trys.push([0,5,,6]),t=e?M(M({},(Object(h.parse)(e).hash||"#").substr(1).split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var n=N(t,2),r=n[0],i=n[1];return e[r]=i,e}),{})),(Object(h.parse)(e).query||"").split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var n=N(t,2),r=n[0],i=n[1];return e[r]=i,e}),{})):{},n=t.error,r=t.error_description,n)throw new Error(r);return i=this._validateState(t),T.debug("Starting "+this._config.responseType+" flow with "+e),"code"!==this._config.responseType?[3,2]:(o=[{}],[4,this._handleCodeFlow(e)]);case 1:return[2,M.apply(void 0,[M.apply(void 0,o.concat([u.sent()])),{state:i}])];case 2:return a=[{}],[4,this._handleImplicitFlow(e)];case 3:return[2,M.apply(void 0,[M.apply(void 0,a.concat([u.sent()])),{state:i}])];case 4:return[3,6];case 5:throw s=u.sent(),T.error("Error handling auth response.",s),s;case 6:return[2]}}))}))},e.prototype._validateState=function(e){if(e){var t,n=(t=window.sessionStorage.getItem("oauth_state"),window.sessionStorage.removeItem("oauth_state"),t),r=e.state;if(n&&n!==r)throw new Error("Invalid state in OAuth flow");return r}},e.prototype.signOut=function(){return I(this,void 0,void 0,(function(){var e,t,n;return w(this,(function(i){return e="https://"+this._config.domain+"/logout?",t=Object(r.d)(this._config)?this._cognitoClientId:this._config.oauth.clientID,n=Object(r.d)(this._config)?this._config.redirectSignOut:this._config.returnTo,e+=Object.entries({client_id:t,logout_uri:encodeURIComponent(n)}).map((function(e){var t=N(e,2);return t[0]+"="+t[1]})).join("&"),x("oAuthSignOut",{oAuth:"signOut"},"Signing out from "+e),T.debug("Signing out from "+e),[2,this._urlOpener(e)]}))}))},e.prototype._generateState=function(e){for(var t="",n=e,r="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";n>0;--n)t+=r[Math.round(Math.random()*(r.length-1))];return t},e.prototype._generateChallenge=function(e){return this._base64URL(v()(e))},e.prototype._base64URL=function(e){return e.toString(b.a).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},e.prototype._generateRandom=function(e){var t=new Uint8Array(e);if("undefined"!=typeof window&&window.crypto)window.crypto.getRandomValues(t);else for(var n=0;n<e;n+=1)t[n]=Math.random()*"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~".length|0;return this._bufferToString(t)},e.prototype._bufferToString=function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],r=0;r<e.byteLength;r+=1){var i=e[r]%t.length;n.push(t[i])}return n.join("")},e}(),A=n(52),j=(d=function(e,t){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),E=new i.a("AuthError"),C=function(e){function t(n){var r=this,i=k[n],o=i.message,a=i.log;return(r=e.call(this,o)||this).constructor=t,Object.setPrototypeOf(r,t.prototype),r.name="AuthError",r.log=a||o,E.error(r.log),r}return j(t,e),t}(Error),O=function(e){function t(n){var r=e.call(this,n)||this;return r.constructor=t,Object.setPrototypeOf(r,t.prototype),r.name="NoUserPoolError",r}return j(t,e),t}(C),k={noConfig:{message:A.a.DEFAULT_MSG,log:"\n Error: Amplify has not been configured correctly.\n This error is typically caused by one of the following scenarios:\n\n 1. Make sure you're passing the awsconfig object to Amplify.configure() in your app's entry point\n See https://aws-amplify.github.io/docs/js/authentication#configure-your-app for more information\n \n 2. There might be multiple conflicting versions of amplify packages in your node_modules.\n\t\t\t\tRefer to our docs site for help upgrading Amplify packages (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js)\n "},missingAuthConfig:{message:A.a.DEFAULT_MSG,log:"\n Error: Amplify has not been configured correctly. \n The configuration object is missing required auth properties.\n This error is typically caused by one of the following scenarios:\n\n 1. Did you run `amplify push` after adding auth via `amplify add auth`?\n See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information\n\n 2. This could also be caused by multiple conflicting versions of amplify packages, see (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) for help upgrading Amplify packages.\n "},emptyUsername:{message:A.a.EMPTY_USERNAME},invalidUsername:{message:A.a.INVALID_USERNAME},emptyPassword:{message:A.a.EMPTY_PASSWORD},emptyCode:{message:A.a.EMPTY_CODE},signUpError:{message:A.a.SIGN_UP_ERROR,log:"The first parameter should either be non-null string or object"},noMFA:{message:A.a.NO_MFA},invalidMFA:{message:A.a.INVALID_MFA},emptyChallengeResponse:{message:A.a.EMPTY_CHALLENGE},noUserSession:{message:A.a.NO_USER_SESSION},default:{message:A.a.DEFAULT_MSG}},L=function(){return(L=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},z=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},P=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},_=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},R=new i.a("AuthClass"),U="aws.cognito.signin.user.admin",B="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",Y=function(e,t,n){o.a.dispatch("auth",{event:e,data:t,message:n},"Auth",B)},F=new(function(){function e(e){var t=this;this.userPool=null,this.user=null,this.oAuthFlowInProgress=!1,this.Credentials=a.a,this.wrapRefreshSessionCallback=function(e){return function(t,n){return n?Y("tokenRefresh",void 0,"New token retrieved"):Y("tokenRefresh_failure",t,"Failed to retrieve new token"),e(t,n)}},this.configure(e),this.currentCredentials=this.currentCredentials.bind(this),this.currentUserCredentials=this.currentUserCredentials.bind(this),o.a.listen("auth",(function(e){switch(e.payload.event){case"signIn":t._storage.setItem("amplify-signin-with-hostedUI","false");break;case"signOut":t._storage.removeItem("amplify-signin-with-hostedUI");break;case"cognitoHostedUI":t._storage.setItem("amplify-signin-with-hostedUI","true")}}))}return e.prototype.getModuleName=function(){return"Auth"},e.prototype.configure=function(e){var t=this;if(!e)return this._config||{};R.debug("configure Auth");var n=Object.assign({},this._config,s.a.parseMobilehubConfig(e).Auth,e);this._config=n;var i=this._config,o=i.userPoolId,a=i.userPoolWebClientId,d=i.cookieStorage,f=i.oauth,h=i.region,g=i.identityPoolId,y=i.mandatorySignIn,v=i.refreshHandlers,m=i.identityPoolRegion,b=i.clientMetadata,M=i.endpoint;if(this._config.storage){if(!this._isValidAuthStorage(this._config.storage))throw R.error("The storage in the Auth config is not valid!"),new Error("Empty storage object");this._storage=this._config.storage}else this._storage=d?new p.i(d):e.ssr?new u.a:(new c.a).getStorage();if(this._storageSync=Promise.resolve(),"function"==typeof this._storage.sync&&(this._storageSync=this._storage.sync()),o){var I={UserPoolId:o,ClientId:a,endpoint:M};I.Storage=this._storage,this.userPool=new p.g(I,this.wrapRefreshSessionCallback)}this.Credentials.configure({mandatorySignIn:y,region:m||h,userPoolId:o,identityPoolId:g,refreshHandlers:v,storage:this._storage});var w=f?Object(r.d)(this._config.oauth)?f:f.awsCognito:void 0;if(w){var N=Object.assign({cognitoClientId:a,UserPoolId:o,domain:w.domain,scopes:w.scope,redirectSignIn:w.redirectSignIn,redirectSignOut:w.redirectSignOut,responseType:w.responseType,Storage:this._storage,urlOpener:w.urlOpener,clientMetadata:b},w.options);this._oAuthHandler=new D({scopes:N.scopes,config:N,cognitoClientId:N.cognitoClientId});var S={};!function(e){if(l.a.browserOrNode().isBrowser&&window.location)e({url:window.location.href});else if(!l.a.browserOrNode().isNode)throw new Error("Not supported")}((function(e){var n=e.url;S[n]||(S[n]=!0,t._handleAuthResponse(n))}))}return Y("configured",null,"The Auth category has been configured successfully"),this._config},e.prototype.signUp=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(!this.userPool)return this.rejectNoUserPool();var o,a=null,s=null,u=[],c=null;if(e&&"string"==typeof e){a=e,s=n?n[0]:null;var l=n?n[1]:null,d=n?n[2]:null;l&&u.push(new p.f({Name:"email",Value:l})),d&&u.push(new p.f({Name:"phone_number",Value:d}))}else{if(!e||"object"!=typeof e)return this.rejectAuthError(r.a.SignUpError);a=e.username,s=e.password,e&&e.clientMetadata?o=e.clientMetadata:this._config.clientMetadata&&(o=this._config.clientMetadata);var f=e.attributes;f&&Object.keys(f).map((function(e){u.push(new p.f({Name:e,Value:f[e]}))}));var h=e.validationData;h&&(c=[],Object.keys(h).map((function(e){c.push(new p.f({Name:e,Value:h[e]}))})))}return a?s?(R.debug("signUp attrs:",u),R.debug("signUp validation data:",c),new Promise((function(e,n){t.userPool.signUp(a,s,u,c,(function(t,r){t?(Y("signUp_failure",t,a+" failed to signup"),n(t)):(Y("signUp",r,a+" has signed up successfully"),e(r))}),o)}))):this.rejectAuthError(r.a.EmptyPassword):this.rejectAuthError(r.a.EmptyUsername)},e.prototype.confirmSignUp=function(e,t,n){if(!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(r.a.EmptyUsername);if(!t)return this.rejectAuthError(r.a.EmptyCode);var i,o=this.createCognitoUser(e),a=!n||"boolean"!=typeof n.forceAliasCreation||n.forceAliasCreation;return n&&n.clientMetadata?i=n.clientMetadata:this._config.clientMetadata&&(i=this._config.clientMetadata),new Promise((function(e,n){o.confirmRegistration(t,a,(function(t,r){t?n(t):e(r)}),i)}))},e.prototype.resendSignUp=function(e,t){if(void 0===t&&(t=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(r.a.EmptyUsername);var n=this.createCognitoUser(e);return new Promise((function(e,r){n.resendConfirmationCode((function(t,n){t?r(t):e(n)}),t)}))},e.prototype.signIn=function(e,t,n){if(void 0===n&&(n=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();var i=null,o=null,a={};if("string"==typeof e)i=e,o=t;else{if(!Object(r.g)(e))return this.rejectAuthError(r.a.InvalidUsername);void 0!==t&&R.warn("The password should be defined under the first parameter object!"),i=e.username,o=e.password,a=e.validationData}if(!i)return this.rejectAuthError(r.a.EmptyUsername);var s=new p.a({Username:i,Password:o,ValidationData:a,ClientMetadata:n});return o?this.signInWithPassword(s):this.signInWithoutPassword(s)},e.prototype.authCallbacks=function(e,t,n){var r=this,i=this;return{onSuccess:function(o){return z(r,void 0,void 0,(function(){var r,a,s,u;return P(this,(function(c){switch(c.label){case 0:R.debug(o),delete e.challengeName,delete e.challengeParam,c.label=1;case 1:return c.trys.push([1,4,5,9]),[4,this.Credentials.clear()];case 2:return c.sent(),[4,this.Credentials.set(o,"session")];case 3:return r=c.sent(),R.debug("succeed to get cognito credentials",r),[3,9];case 4:return a=c.sent(),R.debug("cannot get cognito credentials",a),[3,9];case 5:return c.trys.push([5,7,,8]),[4,this.currentUserPoolUser()];case 6:return s=c.sent(),i.user=s,Y("signIn",s,"A user "+e.getUsername()+" has been signed in"),t(s),[3,8];case 7:return u=c.sent(),R.error("Failed to get the signed in user",u),n(u),[3,8];case 8:return[7];case 9:return[2]}}))}))},onFailure:function(t){R.debug("signIn failure",t),Y("signIn_failure",t,e.getUsername()+" failed to signin"),n(t)},customChallenge:function(n){R.debug("signIn custom challenge answer required"),e.challengeName="CUSTOM_CHALLENGE",e.challengeParam=n,t(e)},mfaRequired:function(n,r){R.debug("signIn MFA required"),e.challengeName=n,e.challengeParam=r,t(e)},mfaSetup:function(n,r){R.debug("signIn mfa setup",n),e.challengeName=n,e.challengeParam=r,t(e)},newPasswordRequired:function(n,r){R.debug("signIn new password"),e.challengeName="NEW_PASSWORD_REQUIRED",e.challengeParam={userAttributes:n,requiredAttributes:r},t(e)},totpRequired:function(n,r){R.debug("signIn totpRequired"),e.challengeName=n,e.challengeParam=r,t(e)},selectMFAType:function(n,r){R.debug("signIn selectMFAType",n),e.challengeName=n,e.challengeParam=r,t(e)}}},e.prototype.signInWithPassword=function(e){var t=this;if(this.pendingSignIn)throw new Error("Pending sign-in attempt already in progress");var n=this.createCognitoUser(e.getUsername());return this.pendingSignIn=new Promise((function(r,i){n.authenticateUser(e,t.authCallbacks(n,(function(e){t.pendingSignIn=null,r(e)}),(function(e){t.pendingSignIn=null,i(e)})))})),this.pendingSignIn},e.prototype.signInWithoutPassword=function(e){var t=this,n=this.createCognitoUser(e.getUsername());return n.setAuthenticationFlowType("CUSTOM_AUTH"),new Promise((function(r,i){n.initiateAuth(e,t.authCallbacks(n,r,i))}))},e.prototype.getMFAOptions=function(e){return new Promise((function(t,n){e.getMFAOptions((function(e,r){if(e)return R.debug("get MFA Options failed",e),void n(e);R.debug("get MFA options success",r),t(r)}))}))},e.prototype.getPreferredMFA=function(e,t){var n=this,r=this;return new Promise((function(i,o){var a=n._config.clientMetadata,s=!!t&&t.bypassCache;e.getUserData((function(e,t){if(e)return R.debug("getting preferred mfa failed",e),void o(e);var n=r._getMfaTypeFromUserData(t);return n?void i(n):void o("invalid MFA Type")}),{bypassCache:s,clientMetadata:a})}))},e.prototype._getMfaTypeFromUserData=function(e){var t=null,n=e.PreferredMfaSetting;if(n)t=n;else{var r=e.UserMFASettingList;if(r)0===r.length?t="NOMFA":R.debug("invalid case for getPreferredMFA",e);else t=e.MFAOptions?"SMS_MFA":"NOMFA"}return t},e.prototype._getUserData=function(e,t){return new Promise((function(n,r){e.getUserData((function(e,t){return e?(R.debug("getting user data failed",e),void r(e)):void n(t)}),t)}))},e.prototype.setPreferredMFA=function(e,t){return z(this,void 0,void 0,(function(){var n,i,o,a,s,u;return P(this,(function(c){switch(c.label){case 0:return n=this._config.clientMetadata,[4,this._getUserData(e,{bypassCache:!0,clientMetadata:n})];case 1:switch(i=c.sent(),o=null,a=null,t){case"TOTP":return[3,2];case"SMS":return[3,3];case"NOMFA":return[3,4]}return[3,6];case 2:return a={PreferredMfa:!0,Enabled:!0},[3,7];case 3:return o={PreferredMfa:!0,Enabled:!0},[3,7];case 4:return s=i.UserMFASettingList,[4,this._getMfaTypeFromUserData(i)];case 5:if("NOMFA"===(u=c.sent()))return[2,Promise.resolve("No change for mfa type")];if("SMS_MFA"===u)o={PreferredMfa:!1,Enabled:!1};else{if("SOFTWARE_TOKEN_MFA"!==u)return[2,this.rejectAuthError(r.a.InvalidMFA)];a={PreferredMfa:!1,Enabled:!1}}return s&&0!==s.length&&s.forEach((function(e){"SMS_MFA"===e?o={PreferredMfa:!1,Enabled:!1}:"SOFTWARE_TOKEN_MFA"===e&&(a={PreferredMfa:!1,Enabled:!1})})),[3,7];case 6:return R.debug("no validmfa method provided"),[2,this.rejectAuthError(r.a.NoMFA)];case 7:return this,[2,new Promise((function(t,r){e.setUserMfaPreference(o,a,(function(i,o){if(i)return R.debug("Set user mfa preference error",i),r(i);R.debug("Set user mfa success",o),R.debug("Caching the latest user data into local"),e.getUserData((function(e,n){return e?(R.debug("getting user data failed",e),r(e)):t(o)}),{bypassCache:!0,clientMetadata:n})}))}))]}}))}))},e.prototype.disableSMS=function(e){return new Promise((function(t,n){e.disableMFA((function(e,r){if(e)return R.debug("disable mfa failed",e),void n(e);R.debug("disable mfa succeed",r),t(r)}))}))},e.prototype.enableSMS=function(e){return new Promise((function(t,n){e.enableMFA((function(e,r){if(e)return R.debug("enable mfa failed",e),void n(e);R.debug("enable mfa succeed",r),t(r)}))}))},e.prototype.setupTOTP=function(e){return new Promise((function(t,n){e.associateSoftwareToken({onFailure:function(e){R.debug("associateSoftwareToken failed",e),n(e)},associateSecretCode:function(e){R.debug("associateSoftwareToken sucess",e),t(e)}})}))},e.prototype.verifyTotpToken=function(e,t){return R.debug("verification totp token",e,t),new Promise((function(n,r){e.verifySoftwareToken(t,"My TOTP device",{onFailure:function(e){R.debug("verifyTotpToken failed",e),r(e)},onSuccess:function(t){Y("signIn",e,"A user "+e.getUsername()+" has been signed in"),R.debug("verifyTotpToken success",t),n(t)}})}))},e.prototype.confirmSignIn=function(e,t,n,i){var o=this;if(void 0===i&&(i=this._config.clientMetadata),!t)return this.rejectAuthError(r.a.EmptyCode);var a=this;return new Promise((function(r,s){e.sendMFACode(t,{onSuccess:function(t){return z(o,void 0,void 0,(function(){var n,i;return P(this,(function(o){switch(o.label){case 0:R.debug(t),o.label=1;case 1:return o.trys.push([1,4,5,6]),[4,this.Credentials.clear()];case 2:return o.sent(),[4,this.Credentials.set(t,"session")];case 3:return n=o.sent(),R.debug("succeed to get cognito credentials",n),[3,6];case 4:return i=o.sent(),R.debug("cannot get cognito credentials",i),[3,6];case 5:return a.user=e,Y("signIn",e,"A user "+e.getUsername()+" has been signed in"),r(e),[7];case 6:return[2]}}))}))},onFailure:function(e){R.debug("confirm signIn failure",e),s(e)}},n,i)}))},e.prototype.completeNewPassword=function(e,t,n,i){var o=this;if(void 0===n&&(n={}),void 0===i&&(i=this._config.clientMetadata),!t)return this.rejectAuthError(r.a.EmptyPassword);var a=this;return new Promise((function(r,s){e.completeNewPasswordChallenge(t,n,{onSuccess:function(t){return z(o,void 0,void 0,(function(){var n,i;return P(this,(function(o){switch(o.label){case 0:R.debug(t),o.label=1;case 1:return o.trys.push([1,4,5,6]),[4,this.Credentials.clear()];case 2:return o.sent(),[4,this.Credentials.set(t,"session")];case 3:return n=o.sent(),R.debug("succeed to get cognito credentials",n),[3,6];case 4:return i=o.sent(),R.debug("cannot get cognito credentials",i),[3,6];case 5:return a.user=e,Y("signIn",e,"A user "+e.getUsername()+" has been signed in"),r(e),[7];case 6:return[2]}}))}))},onFailure:function(e){R.debug("completeNewPassword failure",e),Y("completeNewPassword_failure",e,o.user+" failed to complete the new password flow"),s(e)},mfaRequired:function(t,n){R.debug("signIn MFA required"),e.challengeName=t,e.challengeParam=n,r(e)},mfaSetup:function(t,n){R.debug("signIn mfa setup",t),e.challengeName=t,e.challengeParam=n,r(e)},totpRequired:function(t,n){R.debug("signIn mfa setup",t),e.challengeName=t,e.challengeParam=n,r(e)}},i)}))},e.prototype.sendCustomChallengeAnswer=function(e,t,n){var i=this;if(void 0===n&&(n=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!t)return this.rejectAuthError(r.a.EmptyChallengeResponse);return new Promise((function(r,o){e.sendCustomChallengeAnswer(t,i.authCallbacks(e,r,o),n)}))},e.prototype.updateUserAttributes=function(e,t,n){void 0===n&&(n=this._config.clientMetadata);var r=[],i=this;return new Promise((function(o,a){i.userSession(e).then((function(i){for(var s in t)if("sub"!==s&&s.indexOf("_verified")<0){var u={Name:s,Value:t[s]};r.push(u)}e.updateAttributes(r,(function(e,t){return e?a(e):o(t)}),n)}))}))},e.prototype.userAttributes=function(e){var t=this;return new Promise((function(n,r){t.userSession(e).then((function(t){e.getUserAttributes((function(e,t){e?r(e):n(t)}))}))}))},e.prototype.verifiedContact=function(e){var t=this;return this.userAttributes(e).then((function(e){var n=t.attributesToObject(e),r={},i={};return n.email&&(n.email_verified?i.email=n.email:r.email=n.email),n.phone_number&&(n.phone_number_verified?i.phone_number=n.phone_number:r.phone_number=n.phone_number),{verified:i,unverified:r}}))},e.prototype.currentUserPoolUser=function(e){var t=this;return this.userPool?new Promise((function(n,r){t._storageSync.then((function(){return z(t,void 0,void 0,(function(){var t,i,a=this;return P(this,(function(s){switch(s.label){case 0:return this.isOAuthInProgress()?(R.debug("OAuth signIn in progress, waiting for resolution..."),[4,new Promise((function(e){var t=setTimeout((function(){R.debug("OAuth signIn in progress timeout"),o.a.remove("auth",n),e()}),1e4);function n(r){var i=r.payload.event;"cognitoHostedUI"!==i&&"cognitoHostedUI_failure"!==i||(R.debug("OAuth signIn resolved: "+i),clearTimeout(t),o.a.remove("auth",n),e())}o.a.listen("auth",n)}))]):[3,2];case 1:s.sent(),s.label=2;case 2:return(t=this.userPool.getCurrentUser())?(i=this._config.clientMetadata,t.getSession((function(i,o){return z(a,void 0,void 0,(function(){var a,s,u,c=this;return P(this,(function(l){switch(l.label){case 0:return i?(R.debug("Failed to get the user session",i),r(i),[2]):(a=!!e&&e.bypassCache)?[4,this.Credentials.clear()]:[3,2];case 1:l.sent(),l.label=2;case 2:return s=this._config.clientMetadata,u=o.getAccessToken().decodePayload().scope,(void 0===u?"":u).split(" ").includes(U)?(t.getUserData((function(e,i){if(e)return R.debug("getting user data failed",e),void("User is disabled."===e.message||"User does not exist."===e.message||"Access Token has been revoked"===e.message?r(e):n(t));for(var o=i.PreferredMfaSetting||"NOMFA",a=[],s=0;s<i.UserAttributes.length;s++){var u={Name:i.UserAttributes[s].Name,Value:i.UserAttributes[s].Value},l=new p.f(u);a.push(l)}var d=c.attributesToObject(a);return Object.assign(t,{attributes:d,preferredMFA:o}),n(t)}),{bypassCache:a,clientMetadata:s}),[2]):(R.debug("Unable to get the user data because the "+U+" is not in the scopes of the access token"),[2,n(t)])}}))}))}),{clientMetadata:i}),[2]):(R.debug("Failed to get user from user pool"),r("No current user"),[2])}}))}))})).catch((function(e){return R.debug("Failed to sync cache info into memory",e),r(e)}))})):this.rejectNoUserPool()},e.prototype.isOAuthInProgress=function(){return this.oAuthFlowInProgress},e.prototype.currentAuthenticatedUser=function(e){return z(this,void 0,void 0,(function(){var t,n,r,i,o;return P(this,(function(a){switch(a.label){case 0:R.debug("getting current authenticated user"),t=null,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this._storageSync];case 2:return a.sent(),[3,4];case 3:throw n=a.sent(),R.debug("Failed to sync cache info into memory",n),n;case 4:try{(r=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")))&&(t=L(L({},r.user),{token:r.token}))}catch(e){R.debug("cannot load federated user from auth storage")}return t?(this.user=t,R.debug("get current authenticated federated user",this.user),[2,this.user]):[3,5];case 5:R.debug("get current authenticated userpool user"),i=null,a.label=6;case 6:return a.trys.push([6,8,,9]),[4,this.currentUserPoolUser(e)];case 7:return i=a.sent(),[3,9];case 8:return"No userPool"===(o=a.sent())&&R.error("Cannot get the current user because the user pool is missing. Please make sure the Auth module is configured with a valid Cognito User Pool ID"),R.debug("The user is not authenticated by the error",o),[2,Promise.reject("The user is not authenticated")];case 9:return this.user=i,[2,this.user]}}))}))},e.prototype.currentSession=function(){var e=this;return R.debug("Getting current session"),this.userPool?new Promise((function(t,n){e.currentUserPoolUser().then((function(r){e.userSession(r).then((function(e){t(e)})).catch((function(e){R.debug("Failed to get the current session",e),n(e)}))})).catch((function(e){R.debug("Failed to get the current user",e),n(e)}))})):Promise.reject()},e.prototype.userSession=function(e){if(!e)return R.debug("the user is null"),this.rejectAuthError(r.a.NoUserSession);var t=this._config.clientMetadata;return new Promise((function(n,r){R.debug("Getting the session from this user:",e),e.getSession((function(t,i){return t?(R.debug("Failed to get the session from user",e),void r(t)):(R.debug("Succeed to get the user session",i),void n(i))}),{clientMetadata:t})}))},e.prototype.currentUserCredentials=function(){return z(this,void 0,void 0,(function(){var e,t,n=this;return P(this,(function(r){switch(r.label){case 0:R.debug("Getting current user credentials"),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this._storageSync];case 2:return r.sent(),[3,4];case 3:throw e=r.sent(),R.debug("Failed to sync cache info into memory",e),e;case 4:t=null;try{t=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo"))}catch(e){R.debug("failed to get or parse item aws-amplify-federatedInfo",e)}return t?[2,this.Credentials.refreshFederatedToken(t)]:[2,this.currentSession().then((function(e){return R.debug("getting session success",e),n.Credentials.set(e,"session")})).catch((function(e){return R.debug("getting session failed",e),n.Credentials.set(null,"guest")}))]}}))}))},e.prototype.currentCredentials=function(){return R.debug("getting current credentials"),this.Credentials.get()},e.prototype.verifyUserAttribute=function(e,t,n){return void 0===n&&(n=this._config.clientMetadata),new Promise((function(r,i){e.getAttributeVerificationCode(t,{onSuccess:function(){return r()},onFailure:function(e){return i(e)}},n)}))},e.prototype.verifyUserAttributeSubmit=function(e,t,n){return n?new Promise((function(r,i){e.verifyAttribute(t,n,{onSuccess:function(e){r(e)},onFailure:function(e){i(e)}})})):this.rejectAuthError(r.a.EmptyCode)},e.prototype.verifyCurrentUserAttribute=function(e){var t=this;return t.currentUserPoolUser().then((function(n){return t.verifyUserAttribute(n,e)}))},e.prototype.verifyCurrentUserAttributeSubmit=function(e,t){var n=this;return n.currentUserPoolUser().then((function(r){return n.verifyUserAttributeSubmit(r,e,t)}))},e.prototype.cognitoIdentitySignOut=function(e,t){return z(this,void 0,void 0,(function(){var n,r,i=this;return P(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this._storageSync];case 1:return o.sent(),[3,3];case 2:throw n=o.sent(),R.debug("Failed to sync cache info into memory",n),n;case 3:return r=this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI"),[2,new Promise((function(n,o){if(e&&e.global){R.debug("user global sign out",t);var a=i._config.clientMetadata;t.getSession((function(e,a){if(e)return R.debug("failed to get the user session",e),o(e);t.globalSignOut({onSuccess:function(e){if(R.debug("global sign out success"),!r)return n();i.oAuthSignOutRedirect(n,o)},onFailure:function(e){return R.debug("global sign out failed",e),o(e)}})}),{clientMetadata:a})}else{if(R.debug("user sign out",t),t.signOut(),!r)return n();i.oAuthSignOutRedirect(n,o)}}))]}}))}))},e.prototype.oAuthSignOutRedirect=function(e,t){l.a.browserOrNode().isBrowser?this.oAuthSignOutRedirectOrReject(t):this.oAuthSignOutAndResolve(e)},e.prototype.oAuthSignOutAndResolve=function(e){this._oAuthHandler.signOut(),e()},e.prototype.oAuthSignOutRedirectOrReject=function(e){this._oAuthHandler.signOut(),setTimeout((function(){return e("Signout timeout fail")}),3e3)},e.prototype.signOut=function(e){return z(this,void 0,void 0,(function(){var t;return P(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.cleanCachedItems()];case 1:return n.sent(),[3,3];case 2:return n.sent(),R.debug("failed to clear cached items"),[3,3];case 3:return this.userPool?(t=this.userPool.getCurrentUser())?[4,this.cognitoIdentitySignOut(e,t)]:[3,5]:[3,7];case 4:return n.sent(),[3,6];case 5:R.debug("no current Cognito user"),n.label=6;case 6:return[3,8];case 7:R.debug("no Congito User pool"),n.label=8;case 8:return Y("signOut",this.user,"A user has been signed out"),this.user=null,[2]}}))}))},e.prototype.cleanCachedItems=function(){return z(this,void 0,void 0,(function(){return P(this,(function(e){switch(e.label){case 0:return[4,this.Credentials.clear()];case 1:return e.sent(),[2]}}))}))},e.prototype.changePassword=function(e,t,n,r){var i=this;return void 0===r&&(r=this._config.clientMetadata),new Promise((function(o,a){i.userSession(e).then((function(i){e.changePassword(t,n,(function(e,t){return e?(R.debug("change password failure",e),a(e)):o(t)}),r)}))}))},e.prototype.forgotPassword=function(e,t){if(void 0===t&&(t=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(r.a.EmptyUsername);var n=this.createCognitoUser(e);return new Promise((function(r,i){n.forgotPassword({onSuccess:function(){r()},onFailure:function(t){R.debug("forgot password failure",t),Y("forgotPassword_failure",t,e+" forgotPassword failed"),i(t)},inputVerificationCode:function(t){Y("forgotPassword",n,e+" has initiated forgot password flow"),r(t)}},t)}))},e.prototype.forgotPasswordSubmit=function(e,t,n,i){if(void 0===i&&(i=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(r.a.EmptyUsername);if(!t)return this.rejectAuthError(r.a.EmptyCode);if(!n)return this.rejectAuthError(r.a.EmptyPassword);var o=this.createCognitoUser(e);return new Promise((function(r,a){o.confirmPassword(t,n,{onSuccess:function(){Y("forgotPasswordSubmit",o,e+" forgotPasswordSubmit successful"),r()},onFailure:function(t){Y("forgotPasswordSubmit_failure",t,e+" forgotPasswordSubmit failed"),a(t)}},i)}))},e.prototype.currentUserInfo=function(){return z(this,void 0,void 0,(function(){var e,t,n,r,i,o,a;return P(this,(function(s){switch(s.label){case 0:return(e=this.Credentials.getCredSource())&&"aws"!==e&&"userPool"!==e?[3,9]:[4,this.currentUserPoolUser().catch((function(e){return R.debug(e)}))];case 1:if(!(a=s.sent()))return[2,null];s.label=2;case 2:return s.trys.push([2,8,,9]),[4,this.userAttributes(a)];case 3:t=s.sent(),n=this.attributesToObject(t),r=null,s.label=4;case 4:return s.trys.push([4,6,,7]),[4,this.currentCredentials()];case 5:return r=s.sent(),[3,7];case 6:return i=s.sent(),R.debug("Failed to retrieve credentials while getting current user info",i),[3,7];case 7:return[2,{id:r?r.identityId:void 0,username:a.getUsername(),attributes:n}];case 8:return o=s.sent(),R.debug("currentUserInfo error",o),[2,{}];case 9:return"federated"===e?[2,(a=this.user)||{}]:[2]}}))}))},e.prototype.federatedSignIn=function(e,t,n){return z(this,void 0,void 0,(function(){var i,o,a,s,u,c,l,d,f,p,h;return P(this,(function(g){switch(g.label){case 0:if(!this._config.identityPoolId&&!this._config.userPoolId)throw new Error("Federation requires either a User Pool or Identity Pool in config");if(void 0===e&&this._config.identityPoolId&&!this._config.userPoolId)throw new Error("Federation with Identity Pools requires tokens passed as arguments");return Object(r.e)(e)||Object(r.f)(e)||Object(r.c)(e)||void 0===e?(i=e||{provider:r.b.Cognito},u=Object(r.e)(i)?i.provider:i.customProvider,Object(r.e)(i),o=i.customState,this._config.userPoolId&&(a=Object(r.d)(this._config.oauth)?this._config.userPoolWebClientId:this._config.oauth.clientID,s=Object(r.d)(this._config.oauth)?this._config.oauth.redirectSignIn:this._config.oauth.redirectUri,this._oAuthHandler.oauthSignIn(this._config.oauth.responseType,this._config.oauth.domain,s,a,u,o)),[3,4]):[3,1];case 1:u=e;try{(c=JSON.stringify(JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")).user))&&R.warn("There is already a signed in user: "+c+" in your app.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tYou should not call Auth.federatedSignIn method again as it may cause unexpected behavior.")}catch(e){}return l=t.token,d=t.identity_id,f=t.expires_at,[4,this.Credentials.set({provider:u,token:l,identity_id:d,user:n,expires_at:f},"federation")];case 2:return p=g.sent(),[4,this.currentAuthenticatedUser()];case 3:return h=g.sent(),Y("signIn",h,"A user "+h.username+" has been signed in"),R.debug("federated sign in credentials",p),[2,p];case 4:return[2]}}))}))},e.prototype._handleAuthResponse=function(e){return z(this,void 0,void 0,(function(){var t,n,r,i,o,a,s,u,c,d,f,g,y,v;return P(this,(function(m){switch(m.label){case 0:if(this.oAuthFlowInProgress)return R.debug("Skipping URL "+e+" current flow in progress"),[2];m.label=1;case 1:if(m.trys.push([1,,8,9]),this.oAuthFlowInProgress=!0,!this._config.userPoolId)throw new Error("OAuth responses require a User Pool defined in config");if(Y("parsingCallbackUrl",{url:e},"The callback url is being parsed"),t=e||(l.a.browserOrNode().isBrowser?window.location.href:""),n=!!(Object(h.parse)(t).query||"").split("&").map((function(e){return e.split("=")})).find((function(e){var t=_(e,1)[0];return"code"===t||"error"===t})),r=!!(Object(h.parse)(t).hash||"#").substr(1).split("&").map((function(e){return e.split("=")})).find((function(e){var t=_(e,1)[0];return"access_token"===t||"error"===t})),!n&&!r)return[3,7];this._storage.setItem("amplify-redirected-from-hosted-ui","true"),m.label=2;case 2:return m.trys.push([2,6,,7]),[4,this._oAuthHandler.handleAuthResponse(t)];case 3:return i=m.sent(),o=i.accessToken,a=i.idToken,s=i.refreshToken,u=i.state,c=new p.h({IdToken:new p.c({IdToken:a}),RefreshToken:new p.d({RefreshToken:s}),AccessToken:new p.b({AccessToken:o})}),d=void 0,this._config.identityPoolId?[4,this.Credentials.set(c,"session")]:[3,5];case 4:d=m.sent(),R.debug("AWS credentials",d),m.label=5;case 5:return f=/-/.test(u),(g=this.createCognitoUser(c.getIdToken().decodePayload()["cognito:username"])).setSignInUserSession(c),window&&void 0!==window.history&&window.history.replaceState({},null,this._config.oauth.redirectSignIn),Y("signIn",g,"A user "+g.getUsername()+" has been signed in"),Y("cognitoHostedUI",g,"A user "+g.getUsername()+" has been signed in via Cognito Hosted UI"),f&&(y=u.split("-").splice(1).join("-"),Y("customOAuthState",y.match(/.{2}/g).map((function(e){return String.fromCharCode(parseInt(e,16))})).join(""),"State for user "+g.getUsername())),[2,d];case 6:return v=m.sent(),R.debug("Error in cognito hosted auth response",v),Y("signIn_failure",v,"The OAuth response flow failed"),Y("cognitoHostedUI_failure",v,"A failure occurred when returning to the Cognito Hosted UI"),Y("customState_failure",v,"A failure occurred when returning state"),[3,7];case 7:return[3,9];case 8:return this.oAuthFlowInProgress=!1,[7];case 9:return[2]}}))}))},e.prototype.essentialCredentials=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e.prototype.attributesToObject=function(e){var t=this,n={};return e&&e.map((function(e){"email_verified"===e.Name||"phone_number_verified"===e.Name?n[e.Name]=t.isTruthyString(e.Value)||!0===e.Value:n[e.Name]=e.Value})),n},e.prototype.isTruthyString=function(e){return"function"==typeof e.toLowerCase&&"true"===e.toLowerCase()},e.prototype.createCognitoUser=function(e){var t={Username:e,Pool:this.userPool};t.Storage=this._storage;var n=this._config.authenticationFlowType,r=new p.e(t);return n&&r.setAuthenticationFlowType(n),r},e.prototype._isValidAuthStorage=function(e){return!!e&&"function"==typeof e.getItem&&"function"==typeof e.setItem&&"function"==typeof e.removeItem&&"function"==typeof e.clear},e.prototype.noUserPoolErrorHandler=function(e){return!e||e.userPoolId&&e.identityPoolId?r.a.NoConfig:r.a.MissingAuthConfig},e.prototype.rejectAuthError=function(e){return Promise.reject(new C(e))},e.prototype.rejectNoUserPool=function(){var e=this.noUserPoolErrorHandler(this._config);return Promise.reject(new O(e))},e}())(null);f.a.register(F)},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}v(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&v(e,"error",t,n)}(e,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,o,a;if(c(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=l(e))>0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,console&&console.warn}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function h(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):y(i,i.length)}function g(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function v(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)o(u,this,t);else{var c=u.length,l=y(u,c);for(n=0;n<c;++n)o(l[n],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return c(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,o,a;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";var r,i,o;Object.defineProperty(t,"__esModule",{value:!0}),t.APIPath=t.APIMethod=t.HTTPStatusCode=void 0,function(e){e[e.Success=200]="Success",e[e.Created=201]="Created",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.InternalServerError=500]="InternalServerError"}(r||(r={})),t.HTTPStatusCode=r,function(e){e.GraphQL="/graphql",e.Notebooks="/notebooks",e.NotebooksId="/notebooks/:notebookId",e.NotebooksIdPublish="/notebooks/:notebookId/publish",e.PublicNotebooksId="/public/notebooks/:notebookId",e.NotebookSubscriptions="/notebooks/subscriptions",e.NotebookSubscriptionsId="/notebooks/subscriptions/:notebookId",e.Notes="/notes",e.NotesVideosId="/notes/videos/:videoId",e.FeatureFlags="/feature-flags"}(i||(i={})),t.APIPath=i,function(e){e.Get="get",e.Post="post",e.Put="put",e.Patch="patch",e.Delete="delete"}(o||(o={})),t.APIMethod=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.default=function(e){var t=r.useState(e),n=t[0],i=t[1];return[n,function(e){void 0===e&&i(""),i("string"==typeof e?e:e.target.value)}]}},function(e,t,n){"use strict";var r={getShortNameFromUrl:function(e,t){var n="",r=Array.from(t).filter((t=>-1!=e.search(t[1].url)));return r.length&&(n=r[0][0]),n},processSelector(e){return this.replaceCommas(e,"||").split(",").reduce(((e,t)=>{var n=this.replaceSpaces(t).split(" ").slice(-1)[0];return n=n.replace("||"," "),e+(e.length?","+n:n)}),"")},replaceSpaces:function(e,t="||"){var n="";for(n=e.replace(/(\'|\")(.+?) (.+?)(\'|\")/g,"$1$2"+t+"$3$4");e!=n;)n=(e=n).replace(/(\'|\")(.+?) (.+?)(\'|\")/g,"$1$2"+t+"$3$4");return n},replaceCommas:function(e,t="||"){var n="";for(n=e.replace(/\((\'|\")(.+?),(.+?)(\'|\")\)/g,"($1$2"+t+"$3$4)");e!=n;)n=(e=n).replace(/\((\'|\")(.+?),(.+?)(\'|\")\)/g,"($1$2"+t+"$3$4)");return n},removeVNBparamsFromUrl(e){let t=e;return t=t.replace(/(&)?vnb=true/g,""),t=t.replace(/(&)?vnbtime=[0-9]*/g,""),t},wait:e=>new Promise((t=>{setTimeout((()=>{t(!0)}),e)})),stringToSet:e=>""==e?new Map:new Map(JSON.parse(e))};t.a=r},function(e,t,n){var r=n(366),i=n(369);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t,n){"use strict";n.d(t,"b",(function(){return y})),n.d(t,"a",(function(){return v}));var r=n(51),i=n(49),o=n(783),a=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},s=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},u=new r.a("CognitoCredentials"),c=new Promise((function(e,t){return Object(i.b)().isBrowser?(window.gapi&&window.gapi.auth2?window.gapi.auth2:null)?(u.debug("google api already loaded"),e()):void setTimeout((function(){return e()}),2e3):(u.debug("not in the browser, directly resolved"),e())})),l=function(){function e(){this.initialized=!1,this.refreshGoogleToken=this.refreshGoogleToken.bind(this),this._refreshGoogleTokenImpl=this._refreshGoogleTokenImpl.bind(this)}return e.prototype.refreshGoogleToken=function(){return a(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return this.initialized?[3,2]:(u.debug("need to wait for the Google SDK loaded"),[4,c]);case 1:e.sent(),this.initialized=!0,u.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshGoogleTokenImpl()]}}))}))},e.prototype._refreshGoogleTokenImpl=function(){var e=null;return Object(i.b)().isBrowser&&(e=window.gapi&&window.gapi.auth2?window.gapi.auth2:null),e?new Promise((function(t,n){e.getAuthInstance().then((function(e){e||(u.debug("google Auth undefined"),n(new o.a("google Auth undefined")));var r=e.currentUser.get();r.isSignedIn()?(u.debug("refreshing the google access token"),r.reloadAuthResponse().then((function(e){var n=e.id_token,r=e.expires_at;t({token:n,expires_at:r})})).catch((function(e){e&&"network_error"===e.error?n("Network error reloading google auth response"):n(new o.a("Failed to reload google auth response"))}))):n(new o.a("User is not signed in with Google"))})).catch((function(e){u.debug("Failed to refresh google token",e),n(new o.a("Failed to refresh google token"))}))})):(u.debug("no gapi auth2 available"),Promise.reject("no gapi auth2 available"))},e}(),d=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},f=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},p=new r.a("CognitoCredentials"),h=new Promise((function(e,t){return Object(i.b)().isBrowser?window.FB?(p.debug("FB SDK already loaded"),e()):void setTimeout((function(){return e()}),2e3):(p.debug("not in the browser, directly resolved"),e())})),g=function(){function e(){this.initialized=!1,this.refreshFacebookToken=this.refreshFacebookToken.bind(this),this._refreshFacebookTokenImpl=this._refreshFacebookTokenImpl.bind(this)}return e.prototype.refreshFacebookToken=function(){return d(this,void 0,void 0,(function(){return f(this,(function(e){switch(e.label){case 0:return this.initialized?[3,2]:(p.debug("need to wait for the Facebook SDK loaded"),[4,h]);case 1:e.sent(),this.initialized=!0,p.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshFacebookTokenImpl()]}}))}))},e.prototype._refreshFacebookTokenImpl=function(){var e=null;if(Object(i.b)().isBrowser&&(e=window.FB),!e){var t="no fb sdk available";return p.debug(t),Promise.reject(new o.a(t))}return new Promise((function(t,n){e.getLoginStatus((function(e){if(e&&e.authResponse){var r=e.authResponse,i=r.accessToken,a=1e3*r.expiresIn+(new Date).getTime();if(!i){s="the jwtToken is undefined";p.debug(s),n(new o.a(s))}t({token:i,expires_at:a})}else{var s="no response from facebook when refreshing the jwt token";p.debug(s),n(new o.a(s))}}),{scope:"public_profile,email"})}))},e}(),y=new l,v=new g},function(e,t,n){"use strict";n.r(t),n.d(t,"getSignupUrl",(function(){return s})),n.d(t,"getForgottenPwdUrl",(function(){return u})),n.d(t,"getBaseUrl",(function(){return c}));var r=n(14),i=n(71);const o=i.default.MAIN_URL+"sign-up",a=i.default.MAIN_URL+"/forgot";function s(){return o}function u(){return a}function c(){return i.default.MAIN_URL}t.default=function(e,t){return r.a.sendMessage("backendMgr."+e,t).then((e=>{var t,n;if(null!=e&&null!==(t=e.data)&&void 0!==t&&t.error)throw{message:null==e||null===(n=e.data)||void 0===n?void 0:n.error};return null!=e&&e.data?e.data:e}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2),i=n(82);function o(e){var t,n,o=[];try{for(var a=Object(r.__values)(Object.keys(e).sort()),s=a.next();!s.done;s=a.next()){var u=s.value,c=e[u];if(u=Object(i.a)(u),Array.isArray(c))for(var l=0,d=c.length;l<d;l++)o.push(u+"="+Object(i.a)(c[l]));else{var f=u;(c||"string"==typeof c)&&(f+="="+Object(i.a)(c)),o.push(f)}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o.join("&")}},function(e,t,n){var r;e.exports=(r=n(50),n(114),n(332),r.HmacSHA256)},function(e,t,n){"use strict";
/*!
* cookie
* Copyright(c) 2012-2014 Roman Shtylman
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},i=t||{},a=e.split(o),u=i.decode||r,c=0;c<a.length;c++){var l=a[c],d=l.indexOf("=");if(!(d<0)){var f=l.substr(0,d).trim(),p=l.substr(++d,l.length).trim();'"'==p[0]&&(p=p.slice(1,-1)),null==n[f]&&(n[f]=s(p,u))}}return n},t.serialize=function(e,t,n){var r=n||{},o=r.encode||i;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!a.test(e))throw new TypeError("argument name is invalid");var s=o(t);if(s&&!a.test(s))throw new TypeError("argument val is invalid");var u=e+"="+s;if(null!=r.maxAge){var c=r.maxAge-0;if(isNaN(c)||!isFinite(c))throw new TypeError("option maxAge is invalid");u+="; Max-Age="+Math.floor(c)}if(r.domain){if(!a.test(r.domain))throw new TypeError("option domain is invalid");u+="; Domain="+r.domain}if(r.path){if(!a.test(r.path))throw new TypeError("option path is invalid");u+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");u+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(u+="; HttpOnly");r.secure&&(u+="; Secure");if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return u};var r=decodeURIComponent,i=encodeURIComponent,o=/; */,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function s(e,t){try{return t(e)}catch(t){return e}}},function(e,t,n){"use strict";(function(e){n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l}));var r=n(3),i=n(4),o=n(0),a=function(t,n){return Object(r.b)(void 0,void 0,void 0,(function(){var a,s,u,c,l,d,f,p,h;return Object(r.d)(this,(function(g){switch(g.label){case 0:if(a=Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({"content-type":"application/octet-stream","x-amz-content-sha256":"UNSIGNED-PAYLOAD"},B(t.sessionAttributes)&&{"x-amz-lex-session-attributes":e.from(o.c.fromObject(t.sessionAttributes)).toString("base64")}),B(t.requestAttributes)&&{"x-amz-lex-request-attributes":e.from(o.c.fromObject(t.requestAttributes)).toString("base64")}),B(t.contentType)&&{"content-type":t.contentType}),B(t.accept)&&{accept:t.accept}),B(t.activeContexts)&&{"x-amz-lex-active-contexts":e.from(o.c.fromObject(t.activeContexts)).toString("base64")}),s="/bot/{botName}/alias/{botAlias}/user/{userId}/content",void 0===t.botName)throw new Error("No value provided for input HTTP label: botName.");if((u=t.botName).length<=0)throw new Error("Empty value provided for input HTTP label: botName.");if(s=s.replace("{botName}",Object(o.f)(u)),void 0===t.botAlias)throw new Error("No value provided for input HTTP label: botAlias.");if((u=t.botAlias).length<=0)throw new Error("Empty value provided for input HTTP label: botAlias.");if(s=s.replace("{botAlias}",Object(o.f)(u)),void 0===t.userId)throw new Error("No value provided for input HTTP label: userId.");if((u=t.userId).length<=0)throw new Error("Empty value provided for input HTTP label: userId.");return s=s.replace("{userId}",Object(o.f)(u)),void 0!==t.inputStream&&(c=t.inputStream),[4,n.endpoint()];case 1:return l=g.sent(),d=l.hostname,f=l.protocol,p=void 0===f?"https":f,h=l.port,[2,new i.a({protocol:p,hostname:d,port:h,method:"POST",headers:a,path:s,body:c})]}}))}))},s=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var n,a,s,u,c,l,d,f,p;return Object(r.d)(this,(function(h){switch(h.label){case 0:if(n={"content-type":"application/json"},a="/bot/{botName}/alias/{botAlias}/user/{userId}/text",void 0===e.botName)throw new Error("No value provided for input HTTP label: botName.");if((s=e.botName).length<=0)throw new Error("Empty value provided for input HTTP label: botName.");if(a=a.replace("{botName}",Object(o.f)(s)),void 0===e.botAlias)throw new Error("No value provided for input HTTP label: botAlias.");if((s=e.botAlias).length<=0)throw new Error("Empty value provided for input HTTP label: botAlias.");if(a=a.replace("{botAlias}",Object(o.f)(s)),void 0===e.userId)throw new Error("No value provided for input HTTP label: userId.");if((s=e.userId).length<=0)throw new Error("Empty value provided for input HTTP label: userId.");return a=a.replace("{userId}",Object(o.f)(s)),u=JSON.stringify(Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({},void 0!==e.activeContexts&&null!==e.activeContexts&&{activeContexts:S(e.activeContexts,t)}),void 0!==e.inputText&&null!==e.inputText&&{inputText:e.inputText}),void 0!==e.requestAttributes&&null!==e.requestAttributes&&{requestAttributes:T(e.requestAttributes,t)}),void 0!==e.sessionAttributes&&null!==e.sessionAttributes&&{sessionAttributes:T(e.sessionAttributes,t)})),[4,t.endpoint()];case 1:return c=h.sent(),l=c.hostname,d=c.protocol,f=void 0===d?"https":d,p=c.port,[2,new i.a({protocol:f,hostname:l,port:p,method:"POST",headers:n,path:a,body:u})]}}))}))},u=function(t,n){return Object(r.b)(void 0,void 0,void 0,(function(){var i,a;return Object(r.d)(this,(function(r){return 200!==t.statusCode&&t.statusCode>=300?[2,c(t,n)]:(i={$metadata:R(t),activeContexts:void 0,alternativeIntents:void 0,audioStream:void 0,botVersion:void 0,contentType:void 0,dialogState:void 0,inputTranscript:void 0,intentName:void 0,message:void 0,messageFormat:void 0,nluIntentConfidence:void 0,sentimentResponse:void 0,sessionAttributes:void 0,sessionId:void 0,slotToElicit:void 0,slots:void 0},void 0!==t.headers["content-type"]&&(i.contentType=t.headers["content-type"]),void 0!==t.headers["x-amz-lex-intent-name"]&&(i.intentName=t.headers["x-amz-lex-intent-name"]),void 0!==t.headers["x-amz-lex-nlu-intent-confidence"]&&(i.nluIntentConfidence=new o.c(e.from(t.headers["x-amz-lex-nlu-intent-confidence"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-alternative-intents"]&&(i.alternativeIntents=new o.c(e.from(t.headers["x-amz-lex-alternative-intents"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-slots"]&&(i.slots=new o.c(e.from(t.headers["x-amz-lex-slots"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-session-attributes"]&&(i.sessionAttributes=new o.c(e.from(t.headers["x-amz-lex-session-attributes"],"base64").toString("ascii"))),void 0!==t.headers["x-amz-lex-sentiment"]&&(i.sentimentResponse=t.headers["x-amz-lex-sentiment"]),void 0!==t.headers["x-amz-lex-message"]&&(i.message=t.headers["x-amz-lex-message"]),void 0!==t.headers["x-amz-lex-message-format"]&&(i.messageFormat=t.headers["x-amz-lex-message-format"]),void 0!==t.headers["x-amz-lex-dialog-state"]&&(i.dialogState=t.headers["x-amz-lex-dialog-state"]),void 0!==t.headers["x-amz-lex-slot-to-elicit"]&&(i.slotToElicit=t.headers["x-amz-lex-slot-to-elicit"]),void 0!==t.headers["x-amz-lex-input-transcript"]&&(i.inputTranscript=t.headers["x-amz-lex-input-transcript"]),void 0!==t.headers["x-amz-lex-bot-version"]&&(i.botVersion=t.headers["x-amz-lex-bot-version"]),void 0!==t.headers["x-amz-lex-session-id"]&&(i.sessionId=t.headers["x-amz-lex-session-id"]),void 0!==t.headers["x-amz-lex-active-contexts"]&&(i.activeContexts=new o.c(e.from(t.headers["x-amz-lex-active-contexts"],"base64").toString("ascii"))),a=t.body,i.audioStream=a,[2,Promise.resolve(i)])}))}))},c=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var n,i,o,a,s,u,c,l,d,N,S,x,T,D,A,j,E,C;return Object(r.d)(this,(function(O){switch(O.label){case 0:return i=[Object(r.a)({},e)],C={},[4,Y(e.body,t)];case 1:switch(n=r.a.apply(void 0,i.concat([(C.body=O.sent(),C)])),a="UnknownError",a=F(e,n.body),a){case"BadGatewayException":case"com.amazonaws.lexruntimeservice#BadGatewayException":return[3,2];case"BadRequestException":case"com.amazonaws.lexruntimeservice#BadRequestException":return[3,4];case"ConflictException":case"com.amazonaws.lexruntimeservice#ConflictException":return[3,6];case"DependencyFailedException":case"com.amazonaws.lexruntimeservice#DependencyFailedException":return[3,8];case"InternalFailureException":case"com.amazonaws.lexruntimeservice#InternalFailureException":return[3,10];case"LimitExceededException":case"com.amazonaws.lexruntimeservice#LimitExceededException":return[3,12];case"LoopDetectedException":case"com.amazonaws.lexruntimeservice#LoopDetectedException":return[3,14];case"NotAcceptableException":case"com.amazonaws.lexruntimeservice#NotAcceptableException":return[3,16];case"NotFoundException":case"com.amazonaws.lexruntimeservice#NotFoundException":return[3,18];case"RequestTimeoutException":case"com.amazonaws.lexruntimeservice#RequestTimeoutException":return[3,20];case"UnsupportedMediaTypeException":case"com.amazonaws.lexruntimeservice#UnsupportedMediaTypeException":return[3,22]}return[3,24];case 2:return s=[{}],[4,f(n,t)];case 3:return o=r.a.apply(void 0,[r.a.apply(void 0,s.concat([O.sent()])),{name:a,$metadata:R(e)}]),[3,25];case 4:return u=[{}],[4,p(n,t)];case 5:return o=r.a.apply(void 0,[r.a.apply(void 0,u.concat([O.sent()])),{name:a,$metadata:R(e)}]),[3,25];case 6:return c=[{}],[4,h(n,t)];case 7:return o=r.a.apply(void 0,[r.a.apply(void 0,c.concat([O.sent()])),{name:a,$metadata:R(e)}]),[3,25];case 8:return l=[{}],[4,g(n,t)];case 9:return o=r.a.apply(void 0,[r.a.apply(void 0,l.concat([O.sent()])),{name:a,$metadata:R(e)}]),[3,25];case 10:return d=[{}],[4,y(n,t)];case 11:return o=r.a.apply(void 0,[r.a.apply(void 0,d.concat([O.sent()])),{name:a,$metadata:R(e)}]),[3,25];case 12:return N=[{}],[4,v(n,t)];case 13:return o=r.a.apply(void 0,[r.a.apply(void 0,N.concat([O.sent()])),{name:a,$metadata:R(e)}]),[3,25];case 14:return S=[{}],[4,m(n,t)];case 15:return o=r.a.apply(void 0,[r.a.apply(void 0,S.concat([O.sent()])),{name:a,$metadata:R(e)}]),[3,25];case 16:return x=[{}],[4,b(n,t)];case 17:return o=r.a.apply(void 0,[r.a.apply(void 0,x.concat([O.sent()])),{name:a,$metadata:R(e)}]),[3,25];case 18:return T=[{}],[4,M(n,t)];case 19:return o=r.a.apply(void 0,[r.a.apply(void 0,T.concat([O.sent()])),{name:a,$metadata:R(e)}]),[3,25];case 20:return D=[{}],[4,I(n,t)];case 21:return o=r.a.apply(void 0,[r.a.apply(void 0,D.concat([O.sent()])),{name:a,$metadata:R(e)}]),[3,25];case 22:return A=[{}],[4,w(n,t)];case 23:return o=r.a.apply(void 0,[r.a.apply(void 0,A.concat([O.sent()])),{name:a,$metadata:R(e)}]),[3,25];case 24:j=n.body,a=j.code||j.Code||a,o=Object(r.a)(Object(r.a)({},j),{name:""+a,message:j.message||j.Message||a,$fault:"client",$metadata:R(e)}),O.label=25;case 25:return E=o.message||o.Message||a,o.message=E,delete o.Message,[2,Promise.reject(Object.assign(new Error(E),o))]}}))}))},l=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var n,i;return Object(r.d)(this,(function(r){switch(r.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,d(e,t)]:(n={$metadata:R(e),activeContexts:void 0,alternativeIntents:void 0,botVersion:void 0,dialogState:void 0,intentName:void 0,message:void 0,messageFormat:void 0,nluIntentConfidence:void 0,responseCard:void 0,sentimentResponse:void 0,sessionAttributes:void 0,sessionId:void 0,slotToElicit:void 0,slots:void 0},[4,Y(e.body,t)]);case 1:return void 0!==(i=r.sent()).activeContexts&&null!==i.activeContexts&&(n.activeContexts=A(i.activeContexts,t)),void 0!==i.alternativeIntents&&null!==i.alternativeIntents&&(n.alternativeIntents=O(i.alternativeIntents,t)),void 0!==i.botVersion&&null!==i.botVersion&&(n.botVersion=i.botVersion),void 0!==i.dialogState&&null!==i.dialogState&&(n.dialogState=i.dialogState),void 0!==i.intentName&&null!==i.intentName&&(n.intentName=i.intentName),void 0!==i.message&&null!==i.message&&(n.message=i.message),void 0!==i.messageFormat&&null!==i.messageFormat&&(n.messageFormat=i.messageFormat),void 0!==i.nluIntentConfidence&&null!==i.nluIntentConfidence&&(n.nluIntentConfidence=C(i.nluIntentConfidence,t)),void 0!==i.responseCard&&null!==i.responseCard&&(n.responseCard=z(i.responseCard,t)),void 0!==i.sentimentResponse&&null!==i.sentimentResponse&&(n.sentimentResponse=P(i.sentimentResponse,t)),void 0!==i.sessionAttributes&&null!==i.sessionAttributes&&(n.sessionAttributes=_(i.sessionAttributes,t)),void 0!==i.sessionId&&null!==i.sessionId&&(n.sessionId=i.sessionId),void 0!==i.slotToElicit&&null!==i.slotToElicit&&(n.slotToElicit=i.slotToElicit),void 0!==i.slots&&null!==i.slots&&(n.slots=_(i.slots,t)),[2,Promise.resolve(n)]}}))}))},d=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var n,i,o,a,s,u,c,l,d,b,I,w,N,S,x;return Object(r.d)(this,(function(T){switch(T.label){case 0:return i=[Object(r.a)({},e)],x={},[4,Y(e.body,t)];case 1:switch(n=r.a.apply(void 0,i.concat([(x.body=T.sent(),x)])),a="UnknownError",a=F(e,n.body),a){case"BadGatewayException":case"com.amazonaws.lexruntimeservice#BadGatewayException":return[3,2];case"BadRequestException":case"com.amazonaws.lexruntimeservice#BadRequestException":return[3,4];case"ConflictException":case"com.amazonaws.lexruntimeservice#ConflictException":return[3,6];case"DependencyFailedException":case"com.amazonaws.lexruntimeservice#DependencyFailedException":return[3,8];case"InternalFailureException":case"com.amazonaws.lexruntimeservice#InternalFailureException":return[3,10];case"LimitExceededException":case"com.amazonaws.lexruntimeservice#LimitExceededException":return[3,12];case"LoopDetectedException":case"com.amazonaws.lexruntimeservice#LoopDetectedException":return[3,14];case"NotFoundException":case"com.amazonaws.lexruntimeservice#NotFoundException":return[3,16]}return[3,18];case 2:return s=[{}],[4,f(n,t)];case 3:return o=r.a.apply(void 0,[r.a.apply(void 0,s.concat([T.sent()])),{name:a,$metadata:R(e)}]),[3,19];case 4:return u=[{}],[4,p(n,t)];case 5:return o=r.a.apply(void 0,[r.a.apply(void 0,u.concat([T.sent()])),{name:a,$metadata:R(e)}]),[3,19];case 6:return c=[{}],[4,h(n,t)];case 7:return o=r.a.apply(void 0,[r.a.apply(void 0,c.concat([T.sent()])),{name:a,$metadata:R(e)}]),[3,19];case 8:return l=[{}],[4,g(n,t)];case 9:return o=r.a.apply(void 0,[r.a.apply(void 0,l.concat([T.sent()])),{name:a,$metadata:R(e)}]),[3,19];case 10:return d=[{}],[4,y(n,t)];case 11:return o=r.a.apply(void 0,[r.a.apply(void 0,d.concat([T.sent()])),{name:a,$metadata:R(e)}]),[3,19];case 12:return b=[{}],[4,v(n,t)];case 13:return o=r.a.apply(void 0,[r.a.apply(void 0,b.concat([T.sent()])),{name:a,$metadata:R(e)}]),[3,19];case 14:return I=[{}],[4,m(n,t)];case 15:return o=r.a.apply(void 0,[r.a.apply(void 0,I.concat([T.sent()])),{name:a,$metadata:R(e)}]),[3,19];case 16:return w=[{}],[4,M(n,t)];case 17:return o=r.a.apply(void 0,[r.a.apply(void 0,w.concat([T.sent()])),{name:a,$metadata:R(e)}]),[3,19];case 18:N=n.body,a=N.code||N.Code||a,o=Object(r.a)(Object(r.a)({},N),{name:""+a,message:N.message||N.Message||a,$fault:"client",$metadata:R(e)}),T.label=19;case 19:return S=o.message||o.Message||a,o.message=S,delete o.Message,[2,Promise.reject(Object.assign(new Error(S),o))]}}))}))},f=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"BadGatewayException",$fault:"server",$metadata:R(e),Message:void 0},void 0!==(n=e.body).Message&&null!==n.Message&&(t.Message=n.Message),[2,t]}))}))},p=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"BadRequestException",$fault:"client",$metadata:R(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},h=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"ConflictException",$fault:"client",$metadata:R(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},g=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"DependencyFailedException",$fault:"client",$metadata:R(e),Message:void 0},void 0!==(n=e.body).Message&&null!==n.Message&&(t.Message=n.Message),[2,t]}))}))},y=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"InternalFailureException",$fault:"server",$metadata:R(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},v=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"LimitExceededException",$fault:"client",$metadata:R(e),message:void 0,retryAfterSeconds:void 0},void 0!==e.headers["retry-after"]&&(t.retryAfterSeconds=e.headers["retry-after"]),void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},m=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"LoopDetectedException",$fault:"server",$metadata:R(e),Message:void 0},void 0!==(n=e.body).Message&&null!==n.Message&&(t.Message=n.Message),[2,t]}))}))},b=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"NotAcceptableException",$fault:"client",$metadata:R(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},M=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"NotFoundException",$fault:"client",$metadata:R(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},I=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"RequestTimeoutException",$fault:"client",$metadata:R(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},w=function(e,t){return Object(r.b)(void 0,void 0,void 0,(function(){var t,n;return Object(r.d)(this,(function(r){return t={name:"UnsupportedMediaTypeException",$fault:"client",$metadata:R(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},N=function(e,t){return Object.entries(e).reduce((function(e,t){var n,i=Object(r.e)(t,2),o=i[0],a=i[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[o]=a,n))}),{})},S=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return Object(r.a)(Object(r.a)(Object(r.a)({},void 0!==e.name&&null!==e.name&&{name:e.name}),void 0!==e.parameters&&null!==e.parameters&&{parameters:N(e.parameters,t)}),void 0!==e.timeToLive&&null!==e.timeToLive&&{timeToLive:x(e.timeToLive,t)})}(e,t)}))},x=function(e,t){return Object(r.a)(Object(r.a)({},void 0!==e.timeToLiveInSeconds&&null!==e.timeToLiveInSeconds&&{timeToLiveInSeconds:e.timeToLiveInSeconds}),void 0!==e.turnsToLive&&null!==e.turnsToLive&&{turnsToLive:e.turnsToLive})},T=function(e,t){return Object.entries(e).reduce((function(e,t){var n,i=Object(r.e)(t,2),o=i[0],a=i[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[o]=a,n))}),{})},D=function(e,t){return Object.entries(e).reduce((function(e,t){var n,i=Object(r.e)(t,2),o=i[0],a=i[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[o]=a,n))}),{})},A=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{name:void 0!==e.name&&null!==e.name?e.name:void 0,parameters:void 0!==e.parameters&&null!==e.parameters?D(e.parameters,t):void 0,timeToLive:void 0!==e.timeToLive&&null!==e.timeToLive?j(e.timeToLive,t):void 0}}(e,t)}))},j=function(e,t){return{timeToLiveInSeconds:void 0!==e.timeToLiveInSeconds&&null!==e.timeToLiveInSeconds?e.timeToLiveInSeconds:void 0,turnsToLive:void 0!==e.turnsToLive&&null!==e.turnsToLive?e.turnsToLive:void 0}},E=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{attachmentLinkUrl:void 0!==e.attachmentLinkUrl&&null!==e.attachmentLinkUrl?e.attachmentLinkUrl:void 0,buttons:void 0!==e.buttons&&null!==e.buttons?k(e.buttons,t):void 0,imageUrl:void 0!==e.imageUrl&&null!==e.imageUrl?e.imageUrl:void 0,subTitle:void 0!==e.subTitle&&null!==e.subTitle?e.subTitle:void 0,title:void 0!==e.title&&null!==e.title?e.title:void 0}}(e,t)}))},C=function(e,t){return{score:void 0!==e.score&&null!==e.score?e.score:void 0}},O=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:L(e,t)}))},k=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{text:void 0!==e.text&&null!==e.text?e.text:void 0,value:void 0!==e.value&&null!==e.value?e.value:void 0}}(e)}))},L=function(e,t){return{intentName:void 0!==e.intentName&&null!==e.intentName?e.intentName:void 0,nluIntentConfidence:void 0!==e.nluIntentConfidence&&null!==e.nluIntentConfidence?C(e.nluIntentConfidence,t):void 0,slots:void 0!==e.slots&&null!==e.slots?_(e.slots,t):void 0}},z=function(e,t){return{contentType:void 0!==e.contentType&&null!==e.contentType?e.contentType:void 0,genericAttachments:void 0!==e.genericAttachments&&null!==e.genericAttachments?E(e.genericAttachments,t):void 0,version:void 0!==e.version&&null!==e.version?e.version:void 0}},P=function(e,t){return{sentimentLabel:void 0!==e.sentimentLabel&&null!==e.sentimentLabel?e.sentimentLabel:void 0,sentimentScore:void 0!==e.sentimentScore&&null!==e.sentimentScore?e.sentimentScore:void 0}},_=function(e,t){return Object.entries(e).reduce((function(e,t){var n,i=Object(r.e)(t,2),o=i[0],a=i[1];return null===a?e:Object(r.a)(Object(r.a)({},e),((n={})[o]=a,n))}),{})},R=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},U=function(e,t){return function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)}(e,t).then((function(e){return t.utf8Encoder(e)}))},B=function(e){return!(null==e||""===e||Object.getOwnPropertyNames(e).includes("length")&&0==e.length||Object.getOwnPropertyNames(e).includes("size")&&0==e.size)},Y=function(e,t){return U(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},F=function(e,t){var n,r,i=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},o=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==o?i(e.headers[o]):void 0!==t.code?i(t.code):void 0!==t.__type?i(t.__type):""}}).call(this,n(19).Buffer)},function(e,t,n){var r,i;
/*!
* JavaScript Cookie v2.2.1
* https://github.com/js-cookie/js-cookie
*
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
* Released under the MIT license
*/!function(o){if(void 0===(i="function"==typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=i),!0,e.exports=o(),!!0){var a=window.Cookies,s=window.Cookies=o();s.noConflict=function(){return window.Cookies=a,s}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function i(){}function o(t,n,o){if("undefined"!=typeof document){"number"==typeof(o=e({path:"/"},i.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var u in o)o[u]&&(s+="; "+u,!0!==o[u]&&(s+="="+o[u].split(";")[0]));return document.cookie=t+"="+n+s}}function a(e,n){if("undefined"!=typeof document){for(var i={},o=document.cookie?document.cookie.split("; "):[],a=0;a<o.length;a++){var s=o[a].split("="),u=s.slice(1).join("=");n||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var c=t(s[0]);if(u=(r.read||r)(u,c)||t(u),n)try{u=JSON.parse(u)}catch(e){}if(i[c]=u,e===c)break}catch(e){}}return e?i[e]:i}}return i.set=o,i.get=function(e){return a(e,!1)},i.getJSON=function(e){return a(e,!0)},i.remove=function(t,n){o(t,"",e(n,{expires:-1}))},i.defaults={},i.withConverter=n,i}((function(){}))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i={clockOffset:0,getDateWithClockOffset:function(){return i.clockOffset?new Date((new Date).getTime()+i.clockOffset):new Date},getClockOffset:function(){return i.clockOffset},getHeaderStringFromDate:function(e){return void 0===e&&(e=i.getDateWithClockOffset()),e.toISOString().replace(/[:\-]|\.\d{3}/g,"")},getDateFromHeaderString:function(e){var t=r(e.match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2}).+/),7),n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6];return new Date(Date.UTC(Number(n),Number(i)-1,Number(o),Number(a),Number(s),Number(u)))},isClockSkewed:function(e){return Math.abs(e.getTime()-i.getDateWithClockOffset().getTime())>=3e5},isClockSkewError:function(e){if(!e.response||!e.response.headers)return!1;var t=e.response.headers;return Boolean("BadRequestException"===t["x-amzn-errortype"]&&(t.date||t.Date))},setClockOffset:function(e){i.clockOffset=e}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=o(n(490)),s=n(678),u={success:function(e){return r(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,a.default(250)];case 1:return t.sent(),[2,e]}}))}))},unauthorized:function(){return r(void 0,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,a.default(250)];case 1:throw e.sent(),new s.UnauthorizedError}}))}))},forbidden:function(){return r(void 0,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,a.default(250)];case 1:throw e.sent(),new s.ForbiddenError}}))}))},notFound:function(){return r(void 0,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,a.default(250)];case 1:throw e.sent(),new s.NotFoundError}}))}))}};t.default=u},function(e,t,n){"use strict";n.r(t);var r=n(100);t.default=r.default},,function(e,t,n){var r=n(134),i=n(358),o=n(359),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(690),t),i(n(692),t)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r={},i=function(){function e(){}return e.setItem=function(e,t){return r[e]=t,r[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0},e.removeItem=function(e){return delete r[e]},e.clear=function(){return r={}},e}(),o=function(){function e(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.amplify.test-ls",1),this.storageWindow.removeItem("aws.amplify.test-ls")}catch(e){this.storageWindow=i}}return e.prototype.getStorage=function(){return this.storageWindow},e}()},function(e,t,n){var r;e.exports=(r=n(50),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[],u=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)t(r)&&(i<8&&(s[i]=n(e.pow(r,.5))),u[i]=n(e.pow(r,1/3)),i++),r++}();var c=[],l=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],d=n[6],f=n[7],p=0;p<64;p++){if(p<16)c[p]=0|e[t+p];else{var h=c[p-15],g=(h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3,y=c[p-2],v=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;c[p]=g+c[p-7]+v+c[p-16]}var m=r&i^r&o^i&o,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),M=f+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&d)+u[p]+c[p];f=d,d=l,l=s,s=a+M|0,a=o,o=i,i=r,r=M+(b+m)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+l|0,n[6]=n[6]+d|0,n[7]=n[7]+f|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(l),t.HmacSHA256=o._createHmacHelper(l)}(Math),r.SHA256)},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(51),i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},a=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e},s=new r.a("Hub"),u="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default";var c=new(function(){function e(e){this.listeners=[],this.patterns=[],this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","xr"],this.name=e}return e.prototype.remove=function(e,t){if(e instanceof RegExp){var n=this.patterns.find((function(t){return t.pattern.source===e.source}));if(!n)return void s.warn("No listeners for "+e);this.patterns=a(this.patterns.filter((function(e){return e!==n})))}else{var r=this.listeners[e];if(!r)return void s.warn("No listeners for "+e);this.listeners[e]=a(r.filter((function(e){return e.callback!==t})))}},e.prototype.dispatch=function(e,t,n,r){(void 0===n&&(n=""),this.protectedChannels.indexOf(e)>-1)&&(r===u||s.warn("WARNING: "+e+" is protected and dispatching on it can have unintended consequences"));var o={channel:e,payload:i({},t),source:n,patternInfo:[]};try{this._toListeners(o)}catch(e){s.error(e)}},e.prototype.listen=function(e,t,n){var r,i=this;if(void 0===n&&(n="noname"),function(e){return void 0!==e.onHubCapsule}(t))s.warn("WARNING onHubCapsule is Deprecated. Please pass in a callback."),r=t.onHubCapsule.bind(t);else{if("function"!=typeof t)throw new Error("No callback supplied to Hub");r=t}if(e instanceof RegExp)this.patterns.push({pattern:e,callback:r});else{var o=this.listeners[e];o||(o=[],this.listeners[e]=o),o.push({name:n,callback:r})}return function(){i.remove(e,r)}},e.prototype._toListeners=function(e){var t=e.channel,n=e.payload,r=this.listeners[t];if(r&&r.forEach((function(r){s.debug("Dispatching to "+t+" with ",n);try{r.callback(e)}catch(e){s.error(e)}})),this.patterns.length>0){if(!n.message)return void s.warn("Cannot perform pattern matching without a message key");var a=n.message;this.patterns.forEach((function(t){var n=a.match(t.pattern);if(n){var r=o(n).slice(1),u=i(i({},e),{patternInfo:r});try{t.callback(u)}catch(e){s.error(e)}}}))}},e}())("__default__")},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.FeatureFlag=void 0,function(e){e.MaintenanceMode="maintenance-mode",e.WebMaintenanceMode="web-maintenance-mode",e.ExtensionMaintenanceMode="extension-maintenance-mode",e.DesktopMaintenanceMode="desktop-maintenance-mode",e.NewOnboarding="new-onboarding-flow",e.GoogleAuth="google-auth",e.SlideCaptureDebug="slide-capture-debug"}(r||(r={})),t.FeatureFlag=r},function(e,t,n){"use strict";for(var r=n(120),i=[],o=0;o<256;++o)i.push((o+256).toString(16).substr(1));t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase();if(!Object(r.a)(n))throw TypeError("Stringified UUID is invalid");return n}},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=s(n(1)),c=a(n(8)),l=s(n(24));t.default=function(e){var t=e.position,n=e.left,r=e.bottom,i=e.content;return u.default.createElement(h,{position:t||"bottom",left:n||"0",bottom:r||"0"},i)};var d,f,p,h=c.default.div.withConfig({displayName:"Container",componentId:"sc-z23onn"})(p||(p=r(["\n position: absolute;\n padding: 5px 10px;\n max-width: 400px;\n z-index: 100;\n background: ",";\n border-radius: 5px;\n box-shadow: 0 10px 20px 0 ",";\n \n ","\n ","\n ","\n"],["\n position: absolute;\n padding: 5px 10px;\n max-width: 400px;\n z-index: 100;\n background: ",";\n border-radius: 5px;\n box-shadow: 0 10px 20px 0 ",";\n \n ","\n ","\n ","\n"])),l.default.colors.whiteBase,l.default.colors.transparentSecondary,(function(e){return"bottom"===e.position&&c.css(d||(d=r(["\n top: calc(100% + 5px);\n left: 0;\n "],["\n top: calc(100% + 5px);\n left: 0;\n "])))}),(function(e){return"\n "+("bottom"!=e.position&&"transform: translateY(-250%)")+";\n left: "+e.left+";\n "}),(function(e){return"right"===e.position&&c.css(f||(f=r(["\n top: 50%;\n transform: translateY(-50%);\n left: calc(100% + 5px);\n "],["\n top: 50%;\n transform: translateY(-50%);\n left: calc(100% + 5px);\n "])))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return _t}));var r=n(51),i=n(113),o=n(49),a=n(99),s=n(783),u=n(72),c=n(35),l=n(2),d=function(e,t){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var p=function(){return(p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function h(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function g(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Object.create;function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}var v,m,b,M,I,w,N,S,x,T,D,A,j,E,C,O,k,L,z,P,_,R,U,B,Y,F,Q,G,Z,V,H,W,J,K,q,X,$,ee,te,ne,re,ie,oe,ae,se,ue,ce,le,de,fe,pe,he,ge,ye,ve,me,be;Object.create;!function(e){e.AUTHENTICATED_ROLE="AuthenticatedRole",e.DENY="Deny"}(v||(v={})),(m||(m={})).filterSensitiveLog=function(e){return p({},e)},(b||(b={})).filterSensitiveLog=function(e){return p({},e)},(M||(M={})).filterSensitiveLog=function(e){return p({},e)},(I||(I={})).filterSensitiveLog=function(e){return p({},e)},(w||(w={})).filterSensitiveLog=function(e){return p({},e)},(N||(N={})).filterSensitiveLog=function(e){return p({},e)},(S||(S={})).filterSensitiveLog=function(e){return p({},e)},(x||(x={})).filterSensitiveLog=function(e){return p({},e)},(T||(T={})).filterSensitiveLog=function(e){return p({},e)},(D||(D={})).filterSensitiveLog=function(e){return p({},e)},function(e){e.ACCESS_DENIED="AccessDenied",e.INTERNAL_SERVER_ERROR="InternalServerError"}(A||(A={})),(j||(j={})).filterSensitiveLog=function(e){return p({},e)},(E||(E={})).filterSensitiveLog=function(e){return p({},e)},(C||(C={})).filterSensitiveLog=function(e){return p({},e)},(O||(O={})).filterSensitiveLog=function(e){return p({},e)},(k||(k={})).filterSensitiveLog=function(e){return p({},e)},(L||(L={})).filterSensitiveLog=function(e){return p({},e)},(z||(z={})).filterSensitiveLog=function(e){return p({},e)},(P||(P={})).filterSensitiveLog=function(e){return p({},e)},(_||(_={})).filterSensitiveLog=function(e){return p({},e)},(R||(R={})).filterSensitiveLog=function(e){return p({},e)},(U||(U={})).filterSensitiveLog=function(e){return p({},e)},(B||(B={})).filterSensitiveLog=function(e){return p({},e)},(Y||(Y={})).filterSensitiveLog=function(e){return p({},e)},(F||(F={})).filterSensitiveLog=function(e){return p({},e)},(Q||(Q={})).filterSensitiveLog=function(e){return p({},e)},function(e){e.CONTAINS="Contains",e.EQUALS="Equals",e.NOT_EQUAL="NotEqual",e.STARTS_WITH="StartsWith"}(G||(G={})),(Z||(Z={})).filterSensitiveLog=function(e){return p({},e)},(V||(V={})).filterSensitiveLog=function(e){return p({},e)},function(e){e.RULES="Rules",e.TOKEN="Token"}(H||(H={})),(W||(W={})).filterSensitiveLog=function(e){return p({},e)},(J||(J={})).filterSensitiveLog=function(e){return p({},e)},(K||(K={})).filterSensitiveLog=function(e){return p({},e)},(q||(q={})).filterSensitiveLog=function(e){return p({},e)},(X||(X={})).filterSensitiveLog=function(e){return p({},e)},($||($={})).filterSensitiveLog=function(e){return p({},e)},(ee||(ee={})).filterSensitiveLog=function(e){return p({},e)},(te||(te={})).filterSensitiveLog=function(e){return p({},e)},(ne||(ne={})).filterSensitiveLog=function(e){return p({},e)},(re||(re={})).filterSensitiveLog=function(e){return p({},e)},(ie||(ie={})).filterSensitiveLog=function(e){return p({},e)},(oe||(oe={})).filterSensitiveLog=function(e){return p({},e)},(ae||(ae={})).filterSensitiveLog=function(e){return p({},e)},(se||(se={})).filterSensitiveLog=function(e){return p({},e)},(ue||(ue={})).filterSensitiveLog=function(e){return p({},e)},(ce||(ce={})).filterSensitiveLog=function(e){return p({},e)},(le||(le={})).filterSensitiveLog=function(e){return p({},e)},(de||(de={})).filterSensitiveLog=function(e){return p({},e)},(fe||(fe={})).filterSensitiveLog=function(e){return p({},e)},(pe||(pe={})).filterSensitiveLog=function(e){return p({},e)},(he||(he={})).filterSensitiveLog=function(e){return p({},e)},(ge||(ge={})).filterSensitiveLog=function(e){return p({},e)},(ye||(ye={})).filterSensitiveLog=function(e){return p({},e)},(ve||(ve={})).filterSensitiveLog=function(e){return p({},e)},(me||(me={})).filterSensitiveLog=function(e){return p({},e)},(be||(be={})).filterSensitiveLog=function(e){return p({},e)};var Me=n(4),Ie=function(e,t){return h(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l,d,f,h,y,v,m;return g(this,(function(g){switch(g.label){case 0:return r=[p({},e)],m={},[4,Ke(e.body,t)];case 1:switch(n=p.apply(void 0,r.concat([(m.body=g.sent(),m)])),o="UnknownError",o=qe(e,n.body),o){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":return[3,2];case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":return[3,4];case"InvalidIdentityPoolConfigurationException":case"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException":return[3,6];case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":return[3,8];case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":return[3,10];case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":return[3,12];case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":return[3,14];case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":return[3,16]}return[3,18];case 2:return a=[{}],[4,Ne(n,t)];case 3:return i=p.apply(void 0,[p.apply(void 0,a.concat([g.sent()])),{name:o,$metadata:He(e)}]),[3,19];case 4:return s=[{}],[4,Se(n,t)];case 5:return i=p.apply(void 0,[p.apply(void 0,s.concat([g.sent()])),{name:o,$metadata:He(e)}]),[3,19];case 6:return u=[{}],[4,xe(n,t)];case 7:return i=p.apply(void 0,[p.apply(void 0,u.concat([g.sent()])),{name:o,$metadata:He(e)}]),[3,19];case 8:return c=[{}],[4,Te(n,t)];case 9:return i=p.apply(void 0,[p.apply(void 0,c.concat([g.sent()])),{name:o,$metadata:He(e)}]),[3,19];case 10:return l=[{}],[4,Ae(n,t)];case 11:return i=p.apply(void 0,[p.apply(void 0,l.concat([g.sent()])),{name:o,$metadata:He(e)}]),[3,19];case 12:return d=[{}],[4,je(n,t)];case 13:return i=p.apply(void 0,[p.apply(void 0,d.concat([g.sent()])),{name:o,$metadata:He(e)}]),[3,19];case 14:return f=[{}],[4,Ee(n,t)];case 15:return i=p.apply(void 0,[p.apply(void 0,f.concat([g.sent()])),{name:o,$metadata:He(e)}]),[3,19];case 16:return h=[{}],[4,Ce(n,t)];case 17:return i=p.apply(void 0,[p.apply(void 0,h.concat([g.sent()])),{name:o,$metadata:He(e)}]),[3,19];case 18:y=n.body,o=y.code||y.Code||o,i=p(p({},y),{name:""+o,message:y.message||y.Message||o,$fault:"client",$metadata:He(e)}),g.label=19;case 19:return v=i.message||i.Message||o,i.message=v,delete i.Message,[2,Promise.reject(Object.assign(new Error(v),i))]}}))}))},we=function(e,t){return h(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l,d,f,h,y,v,m;return g(this,(function(g){switch(g.label){case 0:return r=[p({},e)],m={},[4,Ke(e.body,t)];case 1:switch(n=p.apply(void 0,r.concat([(m.body=g.sent(),m)])),o="UnknownError",o=qe(e,n.body),o){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":return[3,2];case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":return[3,4];case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":return[3,6];case"LimitExceededException":case"com.amazonaws.cognitoidentity#LimitExceededException":return[3,8];case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":return[3,10];case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":return[3,12];case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":return[3,14];case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":return[3,16]}return[3,18];case 2:return a=[{}],[4,Ne(n,t)];case 3:return i=p.apply(void 0,[p.apply(void 0,a.concat([g.sent()])),{name:o,$metadata:He(e)}]),[3,19];case 4:return s=[{}],[4,Se(n,t)];case 5:return i=p.apply(void 0,[p.apply(void 0,s.concat([g.sent()])),{name:o,$metadata:He(e)}]),[3,19];case 6:return u=[{}],[4,Te(n,t)];case 7:return i=p.apply(void 0,[p.apply(void 0,u.concat([g.sent()])),{name:o,$metadata:He(e)}]),[3,19];case 8:return c=[{}],[4,De(n,t)];case 9:return i=p.apply(void 0,[p.apply(void 0,c.concat([g.sent()])),{name:o,$metadata:He(e)}]),[3,19];case 10:return l=[{}],[4,Ae(n,t)];case 11:return i=p.apply(void 0,[p.apply(void 0,l.concat([g.sent()])),{name:o,$metadata:He(e)}]),[3,19];case 12:return d=[{}],[4,je(n,t)];case 13:return i=p.apply(void 0,[p.apply(void 0,d.concat([g.sent()])),{name:o,$metadata:He(e)}]),[3,19];case 14:return f=[{}],[4,Ee(n,t)];case 15:return i=p.apply(void 0,[p.apply(void 0,f.concat([g.sent()])),{name:o,$metadata:He(e)}]),[3,19];case 16:return h=[{}],[4,Ce(n,t)];case 17:return i=p.apply(void 0,[p.apply(void 0,h.concat([g.sent()])),{name:o,$metadata:He(e)}]),[3,19];case 18:y=n.body,o=y.code||y.Code||o,i=p(p({},y),{name:""+o,message:y.message||y.Message||o,$fault:"client",$metadata:He(e)}),g.label=19;case 19:return v=i.message||i.Message||o,i.message=v,delete i.Message,[2,Promise.reject(Object.assign(new Error(v),i))]}}))}))},Ne=function(e,t){return h(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n=e.body,r=Pe(n,t),[2,p({name:"ExternalServiceException",$fault:"client",$metadata:He(e)},r)]}))}))},Se=function(e,t){return h(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n=e.body,r=Ue(n,t),[2,p({name:"InternalErrorException",$fault:"server",$metadata:He(e)},r)]}))}))},xe=function(e,t){return h(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n=e.body,r=Be(n,t),[2,p({name:"InvalidIdentityPoolConfigurationException",$fault:"client",$metadata:He(e)},r)]}))}))},Te=function(e,t){return h(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n=e.body,r=Ye(n,t),[2,p({name:"InvalidParameterException",$fault:"client",$metadata:He(e)},r)]}))}))},De=function(e,t){return h(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n=e.body,r=Fe(n,t),[2,p({name:"LimitExceededException",$fault:"client",$metadata:He(e)},r)]}))}))},Ae=function(e,t){return h(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n=e.body,r=Qe(n,t),[2,p({name:"NotAuthorizedException",$fault:"client",$metadata:He(e)},r)]}))}))},je=function(e,t){return h(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n=e.body,r=Ge(n,t),[2,p({name:"ResourceConflictException",$fault:"client",$metadata:He(e)},r)]}))}))},Ee=function(e,t){return h(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n=e.body,r=Ze(n,t),[2,p({name:"ResourceNotFoundException",$fault:"client",$metadata:He(e)},r)]}))}))},Ce=function(e,t){return h(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n=e.body,r=Ve(n,t),[2,p({name:"TooManyRequestsException",$fault:"client",$metadata:He(e)},r)]}))}))},Oe=function(e,t){return p(p(p({},void 0!==e.CustomRoleArn&&null!==e.CustomRoleArn&&{CustomRoleArn:e.CustomRoleArn}),void 0!==e.IdentityId&&null!==e.IdentityId&&{IdentityId:e.IdentityId}),void 0!==e.Logins&&null!==e.Logins&&{Logins:Le(e.Logins,t)})},ke=function(e,t){return p(p(p({},void 0!==e.AccountId&&null!==e.AccountId&&{AccountId:e.AccountId}),void 0!==e.IdentityPoolId&&null!==e.IdentityPoolId&&{IdentityPoolId:e.IdentityPoolId}),void 0!==e.Logins&&null!==e.Logins&&{Logins:Le(e.Logins,t)})},Le=function(e,t){return Object.entries(e).reduce((function(e,t){var n,r=y(t,2),i=r[0],o=r[1];return null===o?e:p(p({},e),((n={})[i]=o,n))}),{})},ze=function(e,t){return{AccessKeyId:void 0!==e.AccessKeyId&&null!==e.AccessKeyId?e.AccessKeyId:void 0,Expiration:void 0!==e.Expiration&&null!==e.Expiration?new Date(Math.round(1e3*e.Expiration)):void 0,SecretKey:void 0!==e.SecretKey&&null!==e.SecretKey?e.SecretKey:void 0,SessionToken:void 0!==e.SessionToken&&null!==e.SessionToken?e.SessionToken:void 0}},Pe=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},_e=function(e,t){return{Credentials:void 0!==e.Credentials&&null!==e.Credentials?ze(e.Credentials):void 0,IdentityId:void 0!==e.IdentityId&&null!==e.IdentityId?e.IdentityId:void 0}},Re=function(e,t){return{IdentityId:void 0!==e.IdentityId&&null!==e.IdentityId?e.IdentityId:void 0}},Ue=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Be=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ye=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Fe=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Qe=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ge=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ze=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ve=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},He=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},We=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},Je=function(e,t,n,r,i){return h(void 0,void 0,void 0,(function(){var o,a,s,u,c,l;return g(this,(function(d){switch(d.label){case 0:return[4,e.endpoint()];case 1:return o=d.sent(),a=o.hostname,s=o.protocol,u=void 0===s?"https":s,c=o.port,l={protocol:u,hostname:a,port:c,method:"POST",path:n,headers:t},void 0!==r&&(l.hostname=r),void 0!==i&&(l.body=i),[2,new Me.a(l)]}}))}))},Ke=function(e,t){return function(e,t){return We(e,t).then((function(e){return t.utf8Encoder(e)}))}(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},qe=function(e,t){var n,r,i=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},o=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==o?i(e.headers[o]):void 0!==t.code?i(t.code):void 0!==t.__type?i(t.__type):""},Xe=n(18),$e=n(0),et=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return f(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(Object(Xe.a)(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"CognitoIdentityClient",commandName:"GetCredentialsForIdentityCommand",inputFilterSensitiveLog:_.filterSensitiveLog,outputFilterSensitiveLog:U.filterSensitiveLog},o=t.requestHandler;return r.resolve((function(e){return o.handle(e.request,n||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return h(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"AWSCognitoIdentityService.GetCredentialsForIdentity"},r=JSON.stringify(Oe(e,t)),[2,Je(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return h(void 0,void 0,void 0,(function(){var n,r,i;return g(this,(function(o){switch(o.label){case 0:return e.statusCode>=300?[2,Ie(e,t)]:[4,Ke(e.body,t)];case 1:return n=o.sent(),r=_e(n,t),i=p({$metadata:He(e)},r),[2,Promise.resolve(i)]}}))}))}(e,t)},t}($e.b),tt=function(e){function t(t,n){void 0===n&&(n=!0);var r=e.call(this,t)||this;return r.tryNextLink=n,r}return Object(l.__extends)(t,e),t}(Error);function nt(e){return Promise.all(Object.keys(e).reduce((function(t,n){var r=e[n];return"string"==typeof r?t.push([n,r]):t.push(r().then((function(e){return[n,e]}))),t}),[])).then((function(e){return e.reduce((function(e,t){var n=Object(l.__read)(t,2),r=n[0],i=n[1];return e[r]=i,e}),{})}))}function rt(e){var t=this;return function(){return Object(l.__awaiter)(t,void 0,void 0,(function(){var t,n,r,i,o,a,s,u,c,d,f,p,h;return Object(l.__generator)(this,(function(l){switch(l.label){case 0:return d=(c=e.client).send,f=et.bind,h={CustomRoleArn:e.customRoleArn,IdentityId:e.identityId},e.logins?[4,nt(e.logins)]:[3,2];case 1:return p=l.sent(),[3,3];case 2:p=void 0,l.label=3;case 3:return[4,d.apply(c,[new(f.apply(et,[void 0,(h.Logins=p,h)]))])];case 4:return t=l.sent().Credentials,n=void 0===t?function(){throw new tt("Response from Amazon Cognito contained no credentials")}():t,r=n.AccessKeyId,i=void 0===r?function(){throw new tt("Response from Amazon Cognito contained no access key ID")}():r,o=n.Expiration,a=n.SecretKey,s=void 0===a?function(){throw new tt("Response from Amazon Cognito contained no secret key")}():a,u=n.SessionToken,[2,{identityId:e.identityId,accessKeyId:i,secretAccessKey:s,sessionToken:u,expiration:o}]}}))}))}}var it=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return f(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(Object(Xe.a)(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"CognitoIdentityClient",commandName:"GetIdCommand",inputFilterSensitiveLog:Y.filterSensitiveLog,outputFilterSensitiveLog:F.filterSensitiveLog},o=t.requestHandler;return r.resolve((function(e){return o.handle(e.request,n||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return h(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"AWSCognitoIdentityService.GetId"},r=JSON.stringify(ke(e,t)),[2,Je(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return h(void 0,void 0,void 0,(function(){var n,r,i;return g(this,(function(o){switch(o.label){case 0:return e.statusCode>=300?[2,we(e,t)]:[4,Ke(e.body,t)];case 1:return n=o.sent(),r=Re(n,t),i=p({$metadata:He(e)},r),[2,Promise.resolve(i)]}}))}))}(e,t)},t}($e.b),ot="IdentityIds",at=function(){function e(e){void 0===e&&(e="aws:cognito-identity-ids"),this.dbName=e}return e.prototype.getItem=function(e){return this.withObjectStore("readonly",(function(t){var n=t.get(e);return new Promise((function(e){n.onerror=function(){return e(null)},n.onsuccess=function(){return e(n.result?n.result.value:null)}}))})).catch((function(){return null}))},e.prototype.removeItem=function(e){return this.withObjectStore("readwrite",(function(t){var n=t.delete(e);return new Promise((function(e,t){n.onerror=function(){return t(n.error)},n.onsuccess=function(){return e()}}))}))},e.prototype.setItem=function(e,t){return this.withObjectStore("readwrite",(function(n){var r=n.put({id:e,value:t});return new Promise((function(e,t){r.onerror=function(){return t(r.error)},r.onsuccess=function(){return e()}}))}))},e.prototype.getDb=function(){var e=self.indexedDB.open(this.dbName,1);return new Promise((function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)},e.onblocked=function(){n(new Error("Unable to access DB"))},e.onupgradeneeded=function(){var t=e.result;t.onerror=function(){n(new Error("Failed to create object store"))},t.createObjectStore(ot,{keyPath:"id"})}}))},e.prototype.withObjectStore=function(e,t){return this.getDb().then((function(n){var r=n.transaction(ot,e);return r.oncomplete=function(){return n.close()},new Promise((function(e,n){r.onerror=function(){return n(r.error)},e(t(r.objectStore(ot)))})).catch((function(e){throw n.close(),e}))}))},e}(),st=new(function(){function e(e){void 0===e&&(e={}),this.store=e}return e.prototype.getItem=function(e){return e in this.store?this.store[e]:null},e.prototype.removeItem=function(e){delete this.store[e]},e.prototype.setItem=function(e,t){this.store[e]=t},e}());function ut(e){var t=this,n=e.accountId,r=e.cache,i=void 0===r?"object"==typeof self&&self.indexedDB?new at:"object"==typeof window&&window.localStorage?window.localStorage:st:r,o=e.client,a=e.customRoleArn,s=e.identityPoolId,u=e.logins,c=e.userIdentifier,d=void 0===c?u&&0!==Object.keys(u).length?void 0:"ANONYMOUS":c,f=d?"aws:cognito-identity-credentials:"+s+":"+d:void 0,p=function(){return Object(l.__awaiter)(t,void 0,void 0,(function(){var e,t,r,c,d,h,g,y,v;return Object(l.__generator)(this,(function(l){switch(l.label){case 0:return(t=f)?[4,i.getItem(f)]:[3,2];case 1:t=l.sent(),l.label=2;case 2:return(e=t)?[3,7]:(h=(d=o).send,g=it.bind,v={AccountId:n,IdentityPoolId:s},u?[4,nt(u)]:[3,4]);case 3:return y=l.sent(),[3,5];case 4:y=void 0,l.label=5;case 5:return[4,h.apply(d,[new(g.apply(it,[void 0,(v.Logins=y,v)]))])];case 6:r=l.sent().IdentityId,c=void 0===r?function(){throw new tt("Response from Amazon Cognito contained no identity ID")}():r,e=c,f&&Promise.resolve(i.setItem(f,e)).catch((function(){})),l.label=7;case 7:return[2,(p=rt({client:o,customRoleArn:a,logins:u,identityId:e}))()]}}))}))};return function(){return p().catch((function(e){return Object(l.__awaiter)(t,void 0,void 0,(function(){return Object(l.__generator)(this,(function(t){throw f&&Promise.resolve(i.removeItem(f)).catch((function(){})),e}))}))}))}}var ct=n(270),lt=n(56),dt=n(32),ft=n(59),pt=n(22),ht=n(31),gt=n(57),yt=n(58),vt=n(27),mt="cognito-identity.{region}.amazonaws.com",bt=new Set(["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),Mt=new Set(["cn-north-1","cn-northwest-1"]),It=new Set(["us-iso-east-1"]),wt=new Set(["us-isob-east-1"]),Nt=new Set(["us-gov-east-1","us-gov-west-1"]),St={apiVersion:"2014-06-30",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var n=void 0;switch(e){case"ap-northeast-1":n={hostname:"cognito-identity.ap-northeast-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-2":n={hostname:"cognito-identity.ap-northeast-2.amazonaws.com",partition:"aws"};break;case"ap-south-1":n={hostname:"cognito-identity.ap-south-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-1":n={hostname:"cognito-identity.ap-southeast-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-2":n={hostname:"cognito-identity.ap-southeast-2.amazonaws.com",partition:"aws"};break;case"ca-central-1":n={hostname:"cognito-identity.ca-central-1.amazonaws.com",partition:"aws"};break;case"cn-north-1":n={hostname:"cognito-identity.cn-north-1.amazonaws.com.cn",partition:"aws-cn"};break;case"eu-central-1":n={hostname:"cognito-identity.eu-central-1.amazonaws.com",partition:"aws"};break;case"eu-north-1":n={hostname:"cognito-identity.eu-north-1.amazonaws.com",partition:"aws"};break;case"eu-west-1":n={hostname:"cognito-identity.eu-west-1.amazonaws.com",partition:"aws"};break;case"eu-west-2":n={hostname:"cognito-identity.eu-west-2.amazonaws.com",partition:"aws"};break;case"eu-west-3":n={hostname:"cognito-identity.eu-west-3.amazonaws.com",partition:"aws"};break;case"fips-us-east-1":n={hostname:"cognito-identity-fips.us-east-1.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;case"fips-us-east-2":n={hostname:"cognito-identity-fips.us-east-2.amazonaws.com",partition:"aws",signingRegion:"us-east-2"};break;case"fips-us-gov-west-1":n={hostname:"cognito-identity-fips.us-gov-west-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-west-1"};break;case"fips-us-west-2":n={hostname:"cognito-identity-fips.us-west-2.amazonaws.com",partition:"aws",signingRegion:"us-west-2"};break;case"sa-east-1":n={hostname:"cognito-identity.sa-east-1.amazonaws.com",partition:"aws"};break;case"us-east-1":n={hostname:"cognito-identity.us-east-1.amazonaws.com",partition:"aws"};break;case"us-east-2":n={hostname:"cognito-identity.us-east-2.amazonaws.com",partition:"aws"};break;case"us-gov-west-1":n={hostname:"cognito-identity.us-gov-west-1.amazonaws.com",partition:"aws-us-gov"};break;case"us-west-1":n={hostname:"cognito-identity.us-west-1.amazonaws.com",partition:"aws"};break;case"us-west-2":n={hostname:"cognito-identity.us-west-2.amazonaws.com",partition:"aws"};break;default:bt.has(e)&&(n={hostname:mt.replace("{region}",e),partition:"aws"}),Mt.has(e)&&(n={hostname:"cognito-identity.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),It.has(e)&&(n={hostname:"cognito-identity.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),wt.has(e)&&(n={hostname:"cognito-identity.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),Nt.has(e)&&(n={hostname:"cognito-identity.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===n&&(n={hostname:mt.replace("{region}",e),partition:"aws"})}return Promise.resolve(p({signingService:"cognito-identity"},n))},serviceId:"Cognito Identity",urlParser:n(61).a},xt=p(p({},St),{runtime:"browser",base64Decoder:ht.a,base64Encoder:ht.b,bodyLengthChecker:gt.a,credentialDefaultProvider:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:Object(yt.a)({serviceId:St.serviceId,clientVersion:ct.version}),maxAttempts:pt.a,region:Object(ft.a)("Region is missing"),requestHandler:new dt.a,sha256:lt.Sha256,streamCollector:dt.b,utf8Decoder:vt.fromUtf8,utf8Encoder:vt.toUtf8}),Tt=n(39),Dt=n(55),At=n(37),jt=n(60),Et=n(42),Ct=n(38),Ot=function(e){function t(t){var n=this,r=p(p({},xt),t),i=Object(Tt.b)(r),o=Object(Tt.a)(i),a=Object(Et.b)(o),s=Object(pt.c)(a),u=Object(At.b)(s),c=Object(Ct.b)(u);return(n=e.call(this,c)||this).config=c,n.middlewareStack.use(Object(pt.b)(n.config)),n.middlewareStack.use(Object(Dt.a)(n.config)),n.middlewareStack.use(Object(At.a)(n.config)),n.middlewareStack.use(Object(jt.a)(n.config)),n.middlewareStack.use(Object(Ct.a)(n.config)),n}return f(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}($e.a),kt=function(){return(kt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Lt=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},zt=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},Pt=new r.a("Credentials"),_t=new(function(){function e(e){this._gettingCredPromise=null,this._refreshHandlers={},this.Auth=void 0,this.configure(e),this._refreshHandlers.google=a.b.refreshGoogleToken,this._refreshHandlers.facebook=a.a.refreshFacebookToken}return e.prototype.getModuleName=function(){return"Credentials"},e.prototype.getCredSource=function(){return this._credentials_source},e.prototype.configure=function(e){if(!e)return this._config||{};this._config=Object.assign({},this._config,e);var t=this._config.refreshHandlers;return t&&(this._refreshHandlers=kt(kt({},this._refreshHandlers),t)),this._storage=this._config.storage,this._storage||(this._storage=(new i.a).getStorage()),this._storageSync=Promise.resolve(),"function"==typeof this._storage.sync&&(this._storageSync=this._storage.sync()),this._config},e.prototype.get=function(){return Pt.debug("getting credentials"),this._pickupCredentials()},e.prototype._pickupCredentials=function(){return Pt.debug("picking up credentials"),this._gettingCredPromise&&this._gettingCredPromise.isPending()?Pt.debug("getting old cred promise"):(Pt.debug("getting new cred promise"),this._gettingCredPromise=Object(o.d)(this._keepAlive())),this._gettingCredPromise},e.prototype._keepAlive=function(){return Lt(this,void 0,void 0,(function(){var e,t,n,r,i,o,a;return zt(this,(function(s){switch(s.label){case 0:if(Pt.debug("checking if credentials exists and not expired"),(e=this._credentials)&&!this._isExpired(e)&&!this._isPastTTL())return Pt.debug("credentials not changed and not expired, directly return"),[2,Promise.resolve(e)];if(Pt.debug("need to get a new credential or refresh the existing one"),t=this.Auth,!(n=void 0===t?c.a.Auth:t)||"function"!=typeof n.currentUserCredentials)return[2,Promise.reject("No Auth module registered in Amplify")];if(this._isExpired(e)||!this._isPastTTL())return[3,6];Pt.debug("ttl has passed but token is not yet expired"),s.label=1;case 1:return s.trys.push([1,5,,6]),[4,n.currentUserPoolUser()];case 2:return r=s.sent(),[4,n.currentSession()];case 3:return i=s.sent(),o=i.refreshToken,[4,new Promise((function(e,t){r.refreshSession(o,(function(n,r){return n?t(n):e(r)}))}))];case 4:return s.sent(),[3,6];case 5:return a=s.sent(),Pt.debug("Error attempting to refreshing the session",a),[3,6];case 6:return[2,n.currentUserCredentials()]}}))}))},e.prototype.refreshFederatedToken=function(e){Pt.debug("Getting federated credentials");var t=e.provider,n=e.user,r=e.token,i=e.identity_id,o=e.expires_at;o=1970===new Date(o).getFullYear()?1e3*o:o;var a=this;return Pt.debug("checking if federated jwt token expired"),o>(new Date).getTime()?(Pt.debug("token not expired"),this._setCredentialsFromFederation({provider:t,token:r,user:n,identity_id:i,expires_at:o})):a._refreshHandlers[t]&&"function"==typeof a._refreshHandlers[t]?(Pt.debug("getting refreshed jwt token from federation provider"),this._providerRefreshWithRetry({refreshHandler:a._refreshHandlers[t],provider:t,user:n})):(Pt.debug("no refresh handler for provider:",t),this.clear(),Promise.reject("no refresh handler for provider"))},e.prototype._providerRefreshWithRetry=function(e){var t=this,n=e.refreshHandler,r=e.provider,i=e.user;return Object(s.b)(n,[],1e4).then((function(e){return Pt.debug("refresh federated token sucessfully",e),t._setCredentialsFromFederation({provider:r,token:e.token,user:i,identity_id:e.identity_id,expires_at:e.expires_at})})).catch((function(e){return"string"==typeof e&&0===e.toLowerCase().lastIndexOf("network error",e.length)||t.clear(),Pt.debug("refresh federated token failed",e),Promise.reject("refreshing federation token failed: "+e)}))},e.prototype._isExpired=function(e){if(!e)return Pt.debug("no credentials for expiration check"),!0;Pt.debug("are these credentials expired?",e);var t=Date.now();return e.expiration.getTime()<=t},e.prototype._isPastTTL=function(){return this._nextCredentialsRefresh<=Date.now()},e.prototype._setCredentialsForGuest=function(){return Lt(this,void 0,void 0,(function(){var e,t,n,r,i,o,a,s=this;return zt(this,(function(c){switch(c.label){case 0:if(Pt.debug("setting credentials for guest"),e=this._config,t=e.identityPoolId,n=e.region,e.mandatorySignIn)return[2,Promise.reject("cannot get guest credentials when mandatory signin enabled")];if(!t)return Pt.debug("No Cognito Identity pool provided for unauthenticated access"),[2,Promise.reject("No Cognito Identity pool provided for unauthenticated access")];if(!n)return Pt.debug("region is not configured for getting the credentials"),[2,Promise.reject("region is not configured for getting the credentials")];r=void 0,c.label=1;case 1:return c.trys.push([1,3,,4]),[4,this._storageSync];case 2:return c.sent(),r=this._storage.getItem("CognitoIdentityId-"+t),this._identityId=r,[3,4];case 3:return i=c.sent(),Pt.debug("Failed to get the cached identityId",i),[3,4];case 4:return o=new Ot({region:n,customUserAgent:Object(u.b)()}),a=void 0,a=r?rt({identityId:r,client:o})():function(){return Lt(s,void 0,void 0,(function(){var e;return zt(this,(function(n){switch(n.label){case 0:return[4,o.send(new it({IdentityPoolId:t}))];case 1:return e=n.sent().IdentityId,this._identityId=e,[2,rt({client:o,identityId:e})()]}}))}))}().catch((function(e){return Lt(s,void 0,void 0,(function(){return zt(this,(function(t){throw e}))}))})),[2,this._loadCredentials(a,"guest",!1,null).then((function(e){return e})).catch((function(e){return Lt(s,void 0,void 0,(function(){var n=this;return zt(this,(function(i){return"ResourceNotFoundException"===e.name&&e.message==="Identity '"+r+"' not found."?(Pt.debug("Failed to load guest credentials"),this._storage.removeItem("CognitoIdentityId-"+t),a=function(){return Lt(n,void 0,void 0,(function(){var e;return zt(this,(function(n){switch(n.label){case 0:return[4,o.send(new it({IdentityPoolId:t}))];case 1:return e=n.sent().IdentityId,this._identityId=e,[2,rt({client:o,identityId:e})()]}}))}))}().catch((function(e){return Lt(n,void 0,void 0,(function(){return zt(this,(function(t){throw e}))}))})),[2,this._loadCredentials(a,"guest",!1,null)]):[2,e]}))}))}))]}}))}))},e.prototype._setCredentialsFromFederation=function(e){var t=e.provider,n=e.token,r=e.identity_id,i={google:"accounts.google.com",facebook:"graph.facebook.com",amazon:"www.amazon.com",developer:"cognito-identity.amazonaws.com"}[t]||t;if(!i)return Promise.reject("You must specify a federated provider");var o={};o[i]=n;var a=this._config,s=a.identityPoolId,c=a.region;if(!s)return Pt.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");if(!c)return Pt.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var l=new Ot({region:c,customUserAgent:Object(u.b)()}),d=void 0;r?d=rt({identityId:r,logins:o,client:l})():d=ut({logins:o,identityPoolId:s,client:l})();return this._loadCredentials(d,"federated",!0,e)},e.prototype._setCredentialsFromSession=function(e){var t=this;Pt.debug("set credentials from session");var n=e.getIdToken().getJwtToken(),r=this._config,i=r.region,o=r.userPoolId,a=r.identityPoolId;if(!a)return Pt.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");if(!i)return Pt.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var s={};s["cognito-idp."+i+".amazonaws.com/"+o]=n;var c=new Ot({region:i,customUserAgent:Object(u.b)()}),l=Lt(t,void 0,void 0,(function(){var e;return zt(this,(function(t){switch(t.label){case 0:return[4,c.send(new it({IdentityPoolId:a,Logins:s}))];case 1:return e=t.sent().IdentityId,this._identityId=e,[2,rt({client:c,logins:s,identityId:e})()]}}))})).catch((function(e){return Lt(t,void 0,void 0,(function(){return zt(this,(function(t){throw e}))}))}));return this._loadCredentials(l,"userPool",!0,null)},e.prototype._loadCredentials=function(e,t,n,r){var i=this,o=this,a=this._config.identityPoolId;return new Promise((function(s,u){e.then((function(e){return Lt(i,void 0,void 0,(function(){var i,u,c,l,d,f;return zt(this,(function(p){switch(p.label){case 0:if(Pt.debug("Load credentials successfully",e),this._identityId&&!e.identityId&&(e.identityId=this._identityId),o._credentials=e,o._credentials.authenticated=n,o._credentials_source=t,o._nextCredentialsRefresh=(new Date).getTime()+3e6,"federated"===t){i=Object.assign({id:this._credentials.identityId},r.user),u=r.provider,c=r.token,l=r.expires_at,d=r.identity_id;try{this._storage.setItem("aws-amplify-federatedInfo",JSON.stringify({provider:u,token:c,user:i,expires_at:l,identity_id:d}))}catch(e){Pt.debug("Failed to put federated info into auth storage",e)}}if("guest"!==t)return[3,4];p.label=1;case 1:return p.trys.push([1,3,,4]),[4,this._storageSync];case 2:return p.sent(),this._storage.setItem("CognitoIdentityId-"+a,e.identityId),[3,4];case 3:return f=p.sent(),Pt.debug("Failed to cache identityId",f),[3,4];case 4:return s(o._credentials),[2]}}))}))})).catch((function(t){if(t)return Pt.debug("Failed to load credentials",e),Pt.debug("Error loading credentials",t),void u(t)}))}))},e.prototype.set=function(e,t){return"session"===t?this._setCredentialsFromSession(e):"federation"===t?this._setCredentialsFromFederation(e):"guest"===t?this._setCredentialsForGuest():(Pt.debug("no source specified for setting credentials"),Promise.reject("invalid source"))},e.prototype.clear=function(){return Lt(this,void 0,void 0,(function(){return zt(this,(function(e){return this._credentials=null,this._credentials_source=null,Pt.debug("removing aws-amplify-federatedInfo from storage"),this._storage.removeItem("aws-amplify-federatedInfo"),[2]}))}))},e.prototype.shear=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e}())(null);c.a.register(_t)},function(e,t,n){"use strict";var r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;t.a=function(e){return"string"==typeof e&&r.test(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s}));var r=n(77);function i(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let t=0;t<e.length;++t){var a;const s=e[t],u=o(s);u!==s.length&&(r=null!==(a=r)&&void 0!==a?a:t,i=t,0!==t&&u<n&&(n=u))}return e.map(((e,t)=>0===t?e:e.slice(n))).slice(null!==(t=r)&&void 0!==t?t:0,i+1)}function o(e){let t=0;for(;t<e.length&&Object(r.d)(e.charCodeAt(t));)++t;return t}function a(e){if(""===e)return!0;let t=!0,n=!1,r=!0,i=!1;for(let o=0;o<e.length;++o)switch(e.codePointAt(o)){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 11:case 12:case 14:case 15:case 13:return!1;case 10:if(t&&!i)return!1;i=!0,t=!0,n=!1;break;case 9:case 32:n||(n=t);break;default:r&&(r=n),t=!1}return!t&&(!r||!i)}function s(e,t){const n=e.replace(/"""/g,'\\"""'),i=n.split(/\r\n|[\n\r]/g),o=1===i.length,a=i.length>1&&i.slice(1).every((e=>0===e.length||Object(r.d)(e.charCodeAt(0)))),s=n.endsWith('\\"""'),u=e.endsWith('"')&&!s,c=e.endsWith("\\"),l=u||c,d=!(null!=t&&t.minimize)&&(!o||e.length>70||l||a||s);let f="";const p=o&&Object(r.d)(e.charCodeAt(0));return(d&&!p||a)&&(f+="\n"),f+=n,(d||l)&&(f+="\n"),'"""'+f+'"""'}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"d",(function(){return d})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return p}));var r=n(67),i=n(41),o=n(21),a=n(5),s=n(157),u=n(156),c=n(11);function l(e,t){return new h(e,t).parseDocument()}function d(e,t){const n=new h(e,t);n.expectToken(c.a.SOF);const r=n.parseValueLiteral(!1);return n.expectToken(c.a.EOF),r}function f(e,t){const n=new h(e,t);n.expectToken(c.a.SOF);const r=n.parseConstValueLiteral();return n.expectToken(c.a.EOF),r}function p(e,t){const n=new h(e,t);n.expectToken(c.a.SOF);const r=n.parseTypeReference();return n.expectToken(c.a.EOF),r}class h{constructor(e,t){const n=Object(u.b)(e)?e:new u.a(e);this._lexer=new s.a(n),this._options=t}parseName(){const e=this.expectToken(c.a.NAME);return this.node(e,{kind:a.a.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:a.a.DOCUMENT,definitions:this.many(c.a.SOF,this.parseDefinition,c.a.EOF)})}parseDefinition(){if(this.peek(c.a.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===c.a.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw Object(r.a)(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(c.a.BRACE_L))return this.node(e,{kind:a.a.OPERATION_DEFINITION,operation:i.b.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let n;return this.peek(c.a.NAME)&&(n=this.parseName()),this.node(e,{kind:a.a.OPERATION_DEFINITION,operation:t,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(c.a.NAME);switch(e.value){case"query":return i.b.QUERY;case"mutation":return i.b.MUTATION;case"subscription":return i.b.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(c.a.PAREN_L,this.parseVariableDefinition,c.a.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:a.a.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(c.a.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(c.a.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(c.a.DOLLAR),this.node(e,{kind:a.a.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:a.a.SELECTION_SET,selections:this.many(c.a.BRACE_L,this.parseSelection,c.a.BRACE_R)})}parseSelection(){return this.peek(c.a.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let n,r;return this.expectOptionalToken(c.a.COLON)?(n=t,r=this.parseName()):r=t,this.node(e,{kind:a.a.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(c.a.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(c.a.PAREN_L,t,c.a.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,n=this.parseName();return this.expectToken(c.a.COLON),this.node(t,{kind:a.a.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(c.a.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(c.a.NAME)?this.node(e,{kind:a.a.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:a.a.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){var e;const t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacyFragmentVariables)?this.node(t,{kind:a.a.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:a.a.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case c.a.BRACKET_L:return this.parseList(e);case c.a.BRACE_L:return this.parseObject(e);case c.a.INT:return this._lexer.advance(),this.node(t,{kind:a.a.INT,value:t.value});case c.a.FLOAT:return this._lexer.advance(),this.node(t,{kind:a.a.FLOAT,value:t.value});case c.a.STRING:case c.a.BLOCK_STRING:return this.parseStringLiteral();case c.a.NAME:switch(this._lexer.advance(),t.value){case"true":return this.node(t,{kind:a.a.BOOLEAN,value:!0});case"false":return this.node(t,{kind:a.a.BOOLEAN,value:!1});case"null":return this.node(t,{kind:a.a.NULL});default:return this.node(t,{kind:a.a.ENUM,value:t.value})}case c.a.DOLLAR:if(e){if(this.expectToken(c.a.DOLLAR),this._lexer.token.kind===c.a.NAME){const e=this._lexer.token.value;throw Object(r.a)(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this._lexer.advance(),this.node(e,{kind:a.a.STRING,value:e.value,block:e.kind===c.a.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:a.a.LIST,values:this.any(c.a.BRACKET_L,(()=>this.parseValueLiteral(e)),c.a.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:a.a.OBJECT,fields:this.any(c.a.BRACE_L,(()=>this.parseObjectField(e)),c.a.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,n=this.parseName();return this.expectToken(c.a.COLON),this.node(t,{kind:a.a.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(c.a.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(c.a.AT),this.node(t,{kind:a.a.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(c.a.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(c.a.BRACKET_R),t=this.node(e,{kind:a.a.LIST_TYPE,type:n})}else t=this.parseNamedType();return this.expectOptionalToken(c.a.BANG)?this.node(e,{kind:a.a.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:a.a.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(c.a.STRING)||this.peek(c.a.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.many(c.a.BRACE_L,this.parseOperationTypeDefinition,c.a.BRACE_R);return this.node(e,{kind:a.a.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(c.a.COLON);const n=this.parseNamedType();return this.node(e,{kind:a.a.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:a.a.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:a.a.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(c.a.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(c.a.BRACE_L,this.parseFieldDefinition,c.a.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(c.a.COLON);const i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:a.a.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(c.a.PAREN_L,this.parseInputValueDef,c.a.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(c.a.COLON);const r=this.parseTypeReference();let i;this.expectOptionalToken(c.a.EQUALS)&&(i=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:a.a.INPUT_VALUE_DEFINITION,description:t,name:n,type:r,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:a.a.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:a.a.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(c.a.EQUALS)?this.delimitedMany(c.a.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:a.a.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i})}parseEnumValuesDefinition(){return this.optionalMany(c.a.BRACE_L,this.parseEnumValueDefinition,c.a.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:a.a.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw Object(r.a)(this._lexer.source,this._lexer.token.start,`${g(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:a.a.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(c.a.BRACE_L,this.parseInputValueDef,c.a.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===c.a.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),n=this.optionalMany(c.a.BRACE_L,this.parseOperationTypeDefinition,c.a.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:a.a.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:a.a.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:a.a.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:a.a.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:a.a.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:a.a.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:a.a.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(c.a.AT);const n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:a.a.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(c.a.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(o.a,t.value))return t;throw this.unexpected(e)}node(e,t){var n;return!0!==(null===(n=this._options)||void 0===n?void 0:n.noLocation)&&(t.loc=new i.a(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw Object(r.a)(this._lexer.source,t.start,`Expected ${y(e)}, found ${g(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this._lexer.advance(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==c.a.NAME||t.value!==e)throw Object(r.a)(this._lexer.source,t.start,`Expected "${e}", found ${g(t)}.`);this._lexer.advance()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===c.a.NAME&&t.value===e&&(this._lexer.advance(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return Object(r.a)(this._lexer.source,t.start,`Unexpected ${g(t)}.`)}any(e,t,n){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(n));return e}return[]}many(e,t,n){this.expectToken(e);const r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}delimitedMany(e,t){this.expectOptionalToken(e);const n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}}function g(e){const t=e.value;return y(e.kind)+(null!=t?` "${t}"`:"")}function y(e){return Object(s.b)(e)?`"${e}"`:e}},function(e,t,n){var r;e.exports=(r=n(50),function(){var e=r,t=e.lib.WordArray;function n(e,n,r){for(var i=[],o=0,a=0;a<n;a++)if(a%4){var s=r[e.charCodeAt(a-1)]<<a%4*2|r[e.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return t.create(i,o)}e.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;o+=3)for(var a=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<n;s++)i.push(r.charAt(a>>>6*(3-s)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<r.length;o++)i[r.charCodeAt(o)]=o}var a=r.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return n(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),r.enc.Base64)},function(e,t,n){e.exports=n(421)},function(e,t,n){"use strict";function r(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(132),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var i=p(n);i&&i!==h&&e(t,i,r)}var a=l(n);d&&(a=a.concat(d(n)));for(var s=u(t),g=u(n),y=0;y<a.length;++y){var v=a[y];if(!(o[v]||r&&r[v]||g&&g[v]||s&&s[v])){var m=f(n,v);try{c(t,v,m)}catch(e){}}}}return t}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.deleteNotebook=t.exportNotebookById=t.editNotebook=t.addNotebook=t.fetchNotebookById=t.fetchNotebookByIdExtended=t.fetchNotebooks=t.fetchNotebooksExtended=t.fetchPublicNotebooksWithVideos=t.fetchNotebooksWithVideos=t.searchInPublicNotebook=t.searchInNotebook=void 0;var a=n(160),s=n(130);t.searchInNotebook=function(e,t){return i(void 0,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,a.apiRequest("get","/search/",void 0,{text:e,notebookId:null!=t?t:null})];case 1:return[2,n.sent().data]}}))}))};t.searchInPublicNotebook=function(e,t){return i(void 0,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,a.apiRequest("get","/public/search/"+t,void 0,{text:e})];case 1:return[2,n.sent().data]}}))}))};t.fetchNotebooksWithVideos=function(){return i(void 0,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,a.apiRequest("get","/notebooks/videos")];case 1:return[2,e.sent().data]}}))}))};t.fetchPublicNotebooksWithVideos=function(){return i(void 0,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,a.apiRequest("get","/public/"+localStorage.getItem("tmp_id")+"/notebooks/videos")];case 1:return[2,e.sent().data]}}))}))};t.fetchNotebooksExtended=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,a.apiRequest("get",e?"/public/"+localStorage.getItem("tmp_id")+"/notebooks/extended":"/notebooks/extended")];case 1:return[2,t.sent().data]}}))}))};t.fetchNotebooks=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return e?[2,{notebooks:[]}]:[4,a.apiRequest("get","/notebooks")];case 1:return[2,t.sent().data]}}))}))};t.fetchNotebookByIdExtended=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,a.apiRequest("get","/notebooks/extended/"+e)];case 1:return[2,t.sent().data]}}))}))};t.fetchNotebookById=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return e===s.NotebookId.Unfiled?[2,{id:s.NotebookId.Unfiled,name:s.NotebookName.Unfiled}]:e===s.NotebookId.Shared?[2,{id:s.NotebookId.Shared,name:s.NotebookName.Shared}]:[4,a.apiRequest("get","/notebooks/"+e)];case 1:return[2,t.sent().data]}}))}))};t.addNotebook=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,a.apiRequest("post","/notebooks",r({},e))];case 1:return[2,t.sent().data]}}))}))};t.editNotebook=function(e,t){return i(void 0,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,a.apiRequest("patch","/notebooks/"+e,r({},t))];case 1:return[2,n.sent().data]}}))}))};t.exportNotebookById=function(e){var t=e.notebookId,n=e.targetFormat;return i(void 0,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,a.apiRequest("get","/notebooks/"+t+"/export/"+n)];case 1:return[2,e.sent().data]}}))}))};t.deleteNotebook=function(e){return i(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,a.apiRequest("delete","/notebooks/"+e)];case 1:return[2,t.sent().data]}}))}))}},function(e,t,n){e.exports=n(444)},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,d=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):d=-1,c.length&&p())}function p(){if(!l){var e=s(f);l=!0;for(var t=c.length;t;){for(u=c,c=[];++d<t;)u&&u[d].run();d=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(320),t),i(n(321),t),i(n(322),t),i(n(323),t),i(n(324),t),i(n(325),t),i(n(326),t),i(n(327),t)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.generateAPIPath=void 0;var a=o(n(108)),s=function(e,t){var n=e;return t.pathParameters&&Object.entries(t.pathParameters).forEach((function(e){var t=e[0],r=e[1];n=n.replace(":"+t,r)})),n};t.generateAPIPath=s,t.default=function(e){return r(void 0,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,a.default("fetch",{url:s(e.path,e),method:e.method,data:e.data,params:e.queryStringParameters})];case 1:return[2,t.sent().data]}}))}))}},function(e,t,n){"use strict";e.exports=n(672)},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(73).Symbol;e.exports=r},function(e,t,n){var r=n(98)(Object,"create");e.exports=r},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(374),i=n(375),o=n(376),a=n(377),s=n(378);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(228);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(380);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){"use strict";const r=n(80),i=n(80).buildOptions,o=n(439);"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,r.nameRegexp);!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const a={attributeNamePrefix:"@_",attrNodeName:!1,textNodeName:"#text",ignoreAttributes:!0,ignoreNameSpace:!1,allowBooleanAttributes:!1,parseNodeValue:!0,parseAttributeValue:!1,arrayMode:!1,trimValues:!0,cdataTagName:!1,cdataPositionChar:"\\c",tagValueProcessor:function(e,t){return e},attrValueProcessor:function(e,t){return e},stopNodes:[]};t.defaultOptions=a;const s=["attributeNamePrefix","attrNodeName","textNodeName","ignoreAttributes","ignoreNameSpace","allowBooleanAttributes","parseNodeValue","parseAttributeValue","arrayMode","trimValues","cdataTagName","cdataPositionChar","tagValueProcessor","attrValueProcessor","parseTrueNumberOnly","stopNodes"];function u(e,t,n){return t&&(n.trimValues&&(t=t.trim()),t=l(t=n.tagValueProcessor(t,e),n.parseNodeValue,n.parseTrueNumberOnly)),t}function c(e,t){if(t.ignoreNameSpace){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}function l(e,t,n){if(t&&"string"==typeof e){let t;return""===e.trim()||isNaN(e)?t="true"===e||"false"!==e&&e:(-1!==e.indexOf("0x")?t=Number.parseInt(e,16):-1!==e.indexOf(".")?(t=Number.parseFloat(e),e=e.replace(/\.?0+$/,"")):t=Number.parseInt(e,10),n&&(t=String(t)===e?t:e)),t}return r.isExist(e)?e:""}t.props=s;const d=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])(.*?)\\3)?","g");function f(e,t){if(!t.ignoreAttributes&&"string"==typeof e){e=e.replace(/\r?\n/g," ");const n=r.getAllMatches(e,d),i=n.length,o={};for(let e=0;e<i;e++){const r=c(n[e][1],t);r.length&&(void 0!==n[e][4]?(t.trimValues&&(n[e][4]=n[e][4].trim()),n[e][4]=t.attrValueProcessor(n[e][4],r),o[t.attributeNamePrefix+r]=l(n[e][4],t.parseAttributeValue,t.parseTrueNumberOnly)):t.allowBooleanAttributes&&(o[t.attributeNamePrefix+r]=!0))}if(!Object.keys(o).length)return;if(t.attrNodeName){const e={};return e[t.attrNodeName]=o,e}return o}}function p(e,t){let n,r="";for(let i=t;i<e.length;i++){let t=e[i];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else{if(">"===t)return{data:r,index:i};"\t"===t&&(t=" ")}r+=t}}function h(e,t,n,r){const i=e.indexOf(t,n);if(-1===i)throw new Error(r);return i+t.length-1}t.getTraversalObj=function(e,t){e=e.replace(/\r\n?/g,"\n"),t=i(t,a,s);const n=new o("!xml");let c=n,l="";for(let n=0;n<e.length;n++){if("<"===e[n])if("/"===e[n+1]){const i=h(e,">",n,"Closing Tag is not closed.");let o=e.substring(n+2,i).trim();if(t.ignoreNameSpace){const e=o.indexOf(":");-1!==e&&(o=o.substr(e+1))}c&&(c.val?c.val=r.getValue(c.val)+""+u(o,l,t):c.val=u(o,l,t)),t.stopNodes.length&&t.stopNodes.includes(c.tagname)&&(c.child=[],null==c.attrsMap&&(c.attrsMap={}),c.val=e.substr(c.startIndex+1,n-c.startIndex-1)),c=c.parent,l="",n=i}else if("?"===e[n+1])n=h(e,"?>",n,"Pi Tag is not closed.");else if("!--"===e.substr(n+1,3))n=h(e,"--\x3e",n,"Comment is not closed.");else if("!D"===e.substr(n+1,2)){const t=h(e,">",n,"DOCTYPE is not closed.");n=e.substring(n,t).indexOf("[")>=0?e.indexOf("]>",n)+1:t}else if("!["===e.substr(n+1,2)){const i=h(e,"]]>",n,"CDATA is not closed.")-2,a=e.substring(n+9,i);if(l&&(c.val=r.getValue(c.val)+""+u(c.tagname,l,t),l=""),t.cdataTagName){const e=new o(t.cdataTagName,c,a);c.addChild(e),c.val=r.getValue(c.val)+t.cdataPositionChar,a&&(e.val=a)}else c.val=(c.val||"")+(a||"");n=i+2}else{const i=p(e,n+1);let a=i.data;const s=i.index,d=a.indexOf(" ");let h=a,g=!0;if(-1!==d&&(h=a.substr(0,d).replace(/\s\s*$/,""),a=a.substr(d+1)),t.ignoreNameSpace){const e=h.indexOf(":");-1!==e&&(h=h.substr(e+1),g=h!==i.data.substr(e+1))}if(c&&l&&"!xml"!==c.tagname&&(c.val=r.getValue(c.val)+""+u(c.tagname,l,t)),a.length>0&&a.lastIndexOf("/")===a.length-1){"/"===h[h.length-1]?(h=h.substr(0,h.length-1),a=h):a=a.substr(0,a.length-1);const e=new o(h,c,"");h!==a&&(e.attrsMap=f(a,t)),c.addChild(e)}else{const e=new o(h,c);t.stopNodes.length&&t.stopNodes.includes(e.tagname)&&(e.startIndex=s),h!==a&&g&&(e.attrsMap=f(a,t)),c.addChild(e),c=e}l="",n=s}else l+=e[n]}return n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a}));var r="undefined"!=typeof Symbol&&"function"==typeof Symbol.for,i=r?Symbol.for("INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER"):"@@INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER",o=r?Symbol.for("INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER"):"@@INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER",a="x-amz-user-agent"},function(e,t,n){"use strict";n.d(t,"a",(function(){return I}));var r=n(51),i=n(180),o=n(40),a=n(33),s=n(106),u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},l=new r.a("Signer"),d="AWS4-HMAC-SHA256",f=function(e,t){var n=new i.Sha256(e);return n.update(t),n.digestSync()},p=function(e){var t=e||"",n=new i.Sha256;return n.update(t),Object(o.b)(n.digestSync())},h=function(e){return Object.keys(e).map((function(e){return e.toLowerCase()})).sort().join(";")},g=function(e){var t,n,r=Object(a.parse)(e.url);return[e.method||"/",encodeURIComponent(r.pathname).replace(/%2F/gi,"/"),(n=r.query,n&&0!==n.length?n.split("&").map((function(e){var t=e.split("=");if(1===t.length)return e;var n=t[1].replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}));return t[0]+"="+n})).sort((function(e,t){var n=e.split("=")[0],r=t.split("=")[0];return n===r?e<t?-1:1:n<r?-1:1})).join("&"):""),(t=e.headers,t&&0!==Object.keys(t).length?Object.keys(t).map((function(e){return{key:e.toLowerCase(),value:t[e]?t[e].trim().replace(/\s+/g," "):""}})).sort((function(e,t){return e.key<t.key?-1:1})).map((function(e){return e.key+":"+e.value})).join("\n")+"\n":""),h(e.headers),p(e.data)].join("\n")},y=function(e){var t=(Object(a.parse)(e.url).host.match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com$/)||[]).slice(1,3);return"es"===t[1]&&(t=t.reverse()),{service:e.service||t[0],region:e.region||t[1]}},v=function(e,t,n){return[e,t,n,"aws4_request"].join("/")},m=function(e,t,n,r){return[e,n,r,p(t)].join("\n")},b=function(e,t,n){l.debug(n);var r=f("AWS4"+e,t),i=f(r,n.region),o=f(i,n.service);return f(o,"aws4_request")},M=function(e,t){return Object(o.b)(f(e,t))},I=function(){function e(){}return e.sign=function(e,t,n){void 0===n&&(n=null),e.headers=e.headers||{};var r=s.a.getDateWithClockOffset().toISOString().replace(/[:\-]|\.\d{3}/g,""),i=r.substr(0,8),o=Object(a.parse)(e.url);e.headers.host=o.host,e.headers["x-amz-date"]=r,t.session_token&&(e.headers["X-Amz-Security-Token"]=t.session_token);var u=g(e);l.debug(u);var c=n||y(e),f=v(i,c.region,c.service),p=m(d,u,r,f),I=b(t.secret_key,i,c),w=M(I,p),N=function(e,t,n,r,i){return[e+" Credential="+t+"/"+n,"SignedHeaders="+r,"Signature="+i].join(", ")}(d,t.access_key,f,h(e.headers),w);return e.headers.Authorization=N,e},e.signUrl=function(e,t,n,r){var i="object"==typeof e?e.url:e,o="object"==typeof e?e.method:"GET",l="object"==typeof e?e.body:void 0,f=s.a.getDateWithClockOffset().toISOString().replace(/[:\-]|\.\d{3}/g,""),p=f.substr(0,8),h=Object(a.parse)(i,!0,!0),I=(h.search,c(h,["search"])),w={host:I.host},N=n||y({url:Object(a.format)(I)}),S=N.region,x=N.service,T=v(p,S,x),D=t.session_token&&"iotdevicegateway"!==x,A=u(u(u({"X-Amz-Algorithm":d,"X-Amz-Credential":[t.access_key,T].join("/"),"X-Amz-Date":f.substr(0,16)},D?{"X-Amz-Security-Token":""+t.session_token}:{}),r?{"X-Amz-Expires":""+r}:{}),{"X-Amz-SignedHeaders":Object.keys(w).join(",")}),j=g({method:o,url:Object(a.format)(u(u({},I),{query:u(u({},I.query),A)})),headers:w,data:l}),E=m(d,j,f,T),C=b(t.secret_key,p,{region:S,service:x}),O=M(C,E),k=u({"X-Amz-Signature":O},t.session_token&&{"X-Amz-Security-Token":t.session_token});return Object(a.format)({protocol:I.protocol,slashes:!0,hostname:I.hostname,port:I.port,pathname:I.pathname,query:u(u(u({},I.query),A),k)})},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return ce}));var r,i=n(28),o=n(49),a=n(51),s=n(141),u=n(35),c=n(279),l=n(146),d=function(){return(d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},f=new a.a("AbstractPubSubProvider"),p=function(){function e(e){void 0===e&&(e={}),this._config=e}return e.prototype.configure=function(e){return void 0===e&&(e={}),this._config=d(d({},e),this._config),f.debug("configure "+this.getProviderName(),this._config),this.options},e.prototype.getCategory=function(){return"PubSub"},Object.defineProperty(e.prototype,"options",{get:function(){return d({},this._config)},enumerable:!0,configurable:!0}),e}(),h=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),g=function(){return(g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},y=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},v=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},b=new a.a("MqttOverWSProvider");var M=function(){function e(){this.promises=new Map}return e.prototype.get=function(e,t){return y(this,void 0,void 0,(function(){var n;return v(this,(function(r){return(n=this.promises.get(e))||(n=t(e),this.promises.set(e,n)),[2,n]}))}))},Object.defineProperty(e.prototype,"allClients",{get:function(){return Array.from(this.promises.keys())},enumerable:!0,configurable:!0}),e.prototype.remove=function(e){this.promises.delete(e)},e}(),I="undefined"!=typeof Symbol?Symbol("topic"):"@@topic",w=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,g(g({},t),{clientId:t.clientId||Object(l.v4)()}))||this;return n._clientsQueue=new M,n._topicObservers=new Map,n._clientIdObservers=new Map,n}return h(t,e),Object.defineProperty(t.prototype,"clientId",{get:function(){return this.options.clientId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"endpoint",{get:function(){return this.options.aws_pubsub_endpoint},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clientsQueue",{get:function(){return this._clientsQueue},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSSLEnabled",{get:function(){return!this.options.aws_appsync_dangerously_connect_to_http_endpoint_for_testing},enumerable:!0,configurable:!0}),t.prototype.getTopicForValue=function(e){return"object"==typeof e&&e[I]},t.prototype.getProviderName=function(){return"MqttOverWSProvider"},t.prototype.onDisconnect=function(e){var t=this,n=e.clientId,r=e.errorCode,i=m(e,["clientId","errorCode"]);if(0!==r){b.warn(n,JSON.stringify(g({errorCode:r},i),null,2));var o=[],a=this._clientIdObservers.get(n);if(!a)return;a.forEach((function(e){e.error("Disconnected, error code: "+r),t._topicObservers.forEach((function(t,n){t.delete(e),0===t.size&&o.push(n)}))})),this._clientIdObservers.delete(n),o.forEach((function(e){t._topicObservers.delete(e)}))}},t.prototype.newClient=function(e){var t=e.url,n=e.clientId;return y(this,void 0,void 0,(function(){var e,r=this;return v(this,(function(i){switch(i.label){case 0:return b.debug("Creating new MQTT client",n),(e=new c.Client(t,n)).onMessageArrived=function(e){var t=e.destinationName,n=e.payloadString;r._onMessage(t,n)},e.onConnectionLost=function(e){var t=e.errorCode,i=m(e,["errorCode"]);r.onDisconnect(g({clientId:n,errorCode:t},i))},[4,new Promise((function(t,n){e.connect({useSSL:r.isSSLEnabled,mqttVersion:3,onSuccess:function(){return t(e)},onFailure:n})}))];case 1:return i.sent(),[2,e]}}))}))},t.prototype.connect=function(e,t){return void 0===t&&(t={}),y(this,void 0,void 0,(function(){var n=this;return v(this,(function(r){switch(r.label){case 0:return[4,this.clientsQueue.get(e,(function(e){return n.newClient(g(g({},t),{clientId:e}))}))];case 1:return[2,r.sent()]}}))}))},t.prototype.disconnect=function(e){return y(this,void 0,void 0,(function(){var t;return v(this,(function(n){switch(n.label){case 0:return[4,this.clientsQueue.get(e,(function(){return null}))];case 1:return(t=n.sent())&&t.isConnected()&&t.disconnect(),this.clientsQueue.remove(e),[2]}}))}))},t.prototype.publish=function(e,t){return y(this,void 0,void 0,(function(){var n,r,i,o;return v(this,(function(a){switch(a.label){case 0:return n=[].concat(e),r=JSON.stringify(t),[4,this.endpoint];case 1:return i=a.sent(),[4,this.connect(this.clientId,{url:i})];case 2:return o=a.sent(),b.debug("Publishing to topic(s)",n.join(","),r),n.forEach((function(e){return o.send(e,r)})),[2]}}))}))},t.prototype._onMessage=function(e,t){try{var n=[];this._topicObservers.forEach((function(t,r){(function(e,t){for(var n=e.split("/"),r=n.length,i=t.split("/"),o=0;o<r;++o){var a=n[o],s=i[o];if("#"===a)return i.length>=r;if("+"!==a&&a!==s)return!1}return r===i.length})(r,e)&&n.push(t)}));var r=JSON.parse(t);"object"==typeof r&&(r[I]=e),n.forEach((function(e){e.forEach((function(e){return e.next(r)}))}))}catch(e){b.warn("Error handling message",e,t)}},t.prototype.subscribe=function(e,t){var n=this;void 0===t&&(t={});var r=[].concat(e);return b.debug("Subscribing to topic(s)",r.join(",")),new i.a((function(e){var i;r.forEach((function(t){var r=n._topicObservers.get(t);r||(r=new Set,n._topicObservers.set(t,r)),r.add(e)}));var o=t.clientId,a=void 0===o?n.clientId:o,s=n._clientIdObservers.get(a);return s||(s=new Set),s.add(e),n._clientIdObservers.set(a,s),y(n,void 0,void 0,(function(){var n,o,s,u;return v(this,(function(c){switch(c.label){case 0:return void 0!==(n=t.url)?[3,2]:[4,this.endpoint];case 1:return s=c.sent(),[3,3];case 2:s=n,c.label=3;case 3:o=s,c.label=4;case 4:return c.trys.push([4,6,,7]),[4,this.connect(a,{url:o})];case 5:return i=c.sent(),r.forEach((function(e){i.subscribe(e)})),[3,7];case 6:return u=c.sent(),e.error(u),[3,7];case 7:return[2]}}))})),function(){return b.debug("Unsubscribing from topic(s)",r.join(",")),i&&(n._clientIdObservers.get(a).delete(e),0===n._clientIdObservers.get(a).size&&(n.disconnect(a),n._clientIdObservers.delete(a)),r.forEach((function(t){var r=n._topicObservers.get(t)||new Set;r.delete(e),0===r.size&&(n._topicObservers.delete(t),i.isConnected()&&i.unsubscribe(t))}))),null}}))},t}(p),N=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),S=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},x=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},T=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},D=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},A=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(D(arguments[t]));return e},j=new a.a("AWSAppSyncProvider"),E=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._topicClient=new Map,t._topicAlias=new Map,t}return N(t,e),Object.defineProperty(t.prototype,"endpoint",{get:function(){throw new Error("Not supported")},enumerable:!0,configurable:!0}),t.prototype.getProviderName=function(){return"AWSAppSyncProvider"},t.prototype.publish=function(e,t,n){return S(this,void 0,void 0,(function(){return x(this,(function(e){throw new Error("Operation not supported")}))}))},t.prototype._cleanUp=function(e){var t=this;Array.from(this._topicClient.entries()).filter((function(t){return D(t,2)[1].clientId===e})).map((function(e){return D(e,1)[0]})).forEach((function(e){return t._cleanUpForTopic(e)}))},t.prototype._cleanUpForTopic=function(e){this._topicClient.delete(e),this._topicAlias.delete(e)},t.prototype.onDisconnect=function(e){var t=this,n=e.clientId,r=e.errorCode,i=T(e,["clientId","errorCode"]);0!==r&&(Array.from(this._topicClient.entries()).filter((function(e){return D(e,2)[1].clientId===n})).map((function(e){return D(e,1)[0]})).forEach((function(e){t._topicObservers.has(e)&&(t._topicObservers.get(e).forEach((function(e){e.closed||e.error(i)})),t._topicObservers.delete(e))})),this._cleanUp(n))},t.prototype.disconnect=function(t){return S(this,void 0,void 0,(function(){return x(this,(function(n){switch(n.label){case 0:return[4,this.clientsQueue.get(t,(function(){return null}))];case 1:return n.sent(),[4,e.prototype.disconnect.call(this,t)];case 2:return n.sent(),this._cleanUp(t),[2]}}))}))},t.prototype.subscribe=function(e,t){var n=this;void 0===t&&(t={});var r=new i.a((function(r){var i=[].concat(e);return j.debug("Subscribing to topic(s)",i.join(",")),S(n,void 0,void 0,(function(){var e,n,o,a,s,u=this;return x(this,(function(c){switch(c.label){case 0:return i.forEach((function(e){u._topicObservers.has(e)||u._topicObservers.set(e,new Set),u._topicObservers.get(e).add(r)})),e=t.mqttConnections,n=void 0===e?[]:e,o=t.newSubscriptions,a=Object.entries(o).map((function(e){var t=D(e,2),n=t[0];return[t[1].topic,n]})),this._topicAlias=new Map(A(Array.from(this._topicAlias.entries()),a)),s=Object.entries(i.reduce((function(e,t){var r=n.find((function(e){return e.topics.indexOf(t)>-1}));if(r){var i=r.client,o=r.url;e[i]||(e[i]={url:o,topics:new Set}),e[i].topics.add(t)}return e}),{})),[4,Promise.all(s.map((function(e){var t=D(e,2),n=t[0],i=t[1],o=i.url,a=i.topics;return S(u,void 0,void 0,(function(){var e,t,i=this;return x(this,(function(s){switch(s.label){case 0:e=null,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.connect(n,{clientId:n,url:o})];case 2:return e=s.sent(),[3,4];case 3:return t=s.sent(),r.error({message:"Failed to connect",error:t}),r.complete(),[2,void 0];case 4:return a.forEach((function(t){e.isConnected()&&(e.subscribe(t),i._topicClient.set(t,e))})),[2,e]}}))}))})))];case 1:return c.sent(),[2]}}))})),function(){j.debug("Unsubscribing from topic(s)",i.join(",")),i.forEach((function(e){var t=n._topicClient.get(e);t&&t.isConnected()&&(t.unsubscribe(e),n._topicClient.delete(e),Array.from(n._topicClient.values()).some((function(e){return e===t}))||n.disconnect(t.clientId)),n._topicObservers.delete(e)}))}}));return i.a.from(r).map((function(e){var t=n.getTopicForValue(e),r=n._topicAlias.get(t);return e.data=Object.entries(e.data).reduce((function(e,t){var n=D(t,2),i=n[0],o=n[1];return e[r||i]=o,e}),{}),e}))},t}(w);function C(e,t){for(var n,r=/\r\n|[\n\r]/g,i=1,o=t+1;(n=r.exec(e.body))&&n.index<t;)i+=1,o=t+1-(n.index+n[0].length);return{line:i,column:o}}function O(e,t){var n=e.locationOffset.column-1,r=k(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=1===t.line?n:0,u=t.column+s,c=r.split(/\r\n|[\n\r]/g);return"".concat(e.name," (").concat(a,":").concat(u,")\n")+function(e){var t=e.filter((function(e){e[0];return void 0!==e[1]})),n=0,r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value[0];n=Math.max(n,u.length)}}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return t.map((function(e){var t,r=e[0],i=e[1];return k(n-(t=r).length)+t+i})).join("\n")}([["".concat(a-1,": "),c[i-1]],["".concat(a,": "),c[i]],["",k(u-1)+"^"],["".concat(a+1,": "),c[i+1]]])}function k(e){return Array(e+1).join(" ")}function L(e,t,n,r,i,o,a){var s=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,u=n;if(!u&&s){var c=s[0];u=c&&c.loc&&c.loc.source}var l,d=r;!d&&s&&(d=s.reduce((function(e,t){return t.loc&&e.push(t.loc.start),e}),[])),d&&0===d.length&&(d=void 0),r&&n?l=r.map((function(e){return C(n,e)})):s&&(l=s.reduce((function(e,t){return t.loc&&e.push(C(t.loc.source,t.loc.start)),e}),[]));var f=a||o&&o.extensions;Object.defineProperties(this,{message:{value:e,enumerable:!0,writable:!0},locations:{value:l||void 0,enumerable:Boolean(l)},path:{value:i||void 0,enumerable:Boolean(i)},nodes:{value:s||void 0},source:{value:u||void 0},positions:{value:d||void 0},originalError:{value:o},extensions:{value:f||void 0,enumerable:Boolean(f)}}),o&&o.stack?Object.defineProperty(this,"stack",{value:o.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,L):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}L.prototype=Object.create(Error.prototype,{constructor:{value:L},name:{value:"GraphQLError"},toString:{value:function(){return function(e){var t=[];if(e.nodes){var n=!0,r=!1,i=void 0;try{for(var o,a=e.nodes[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;s.loc&&t.push(O(s.loc.source,C(s.loc.source,s.loc.start)))}}catch(e){r=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}}else if(e.source&&e.locations){var u=e.source,c=!0,l=!1,d=void 0;try{for(var f,p=e.locations[Symbol.iterator]();!(c=(f=p.next()).done);c=!0){var h=f.value;t.push(O(u,h))}}catch(e){l=!0,d=e}finally{try{c||null==p.return||p.return()}finally{if(l)throw d}}}return 0===t.length?e.message:[e.message].concat(t).join("\n\n")+"\n"}(this)}}});var z,P,_,R=n(33),U=n(19),B=n(115),Y=n(13),F=n(783),Q=n(119),G=n(142),Z=n(45),V=n(47),H=n(44),W=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),J=function(){return(J=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},K=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},q=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},X=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},$=new a.a("AWSAppSyncRealTimeProvider"),ee="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",te=[400,401,403];!function(e){e.GQL_CONNECTION_INIT="connection_init",e.GQL_CONNECTION_ERROR="connection_error",e.GQL_CONNECTION_ACK="connection_ack",e.GQL_START="start",e.GQL_START_ACK="start_ack",e.GQL_DATA="data",e.GQL_CONNECTION_KEEP_ALIVE="ka",e.GQL_STOP="stop",e.GQL_COMPLETE="complete",e.GQL_ERROR="error"}(z||(z={})),function(e){e[e.PENDING=0]="PENDING",e[e.CONNECTED=1]="CONNECTED",e[e.FAILED=2]="FAILED"}(P||(P={})),function(e){e[e.CLOSED=0]="CLOSED",e[e.READY=1]="READY",e[e.CONNECTING=2]="CONNECTING"}(_||(_={}));var ne={accept:"application/json, text/javascript","content-encoding":"amz-1.0","content-type":"application/json; charset=UTF-8"},re=3e5,ie=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.socketStatus=_.CLOSED,t.keepAliveTimeout=re,t.subscriptionObserverMap=new Map,t.promiseArray=[],t}return W(t,e),t.prototype.getProviderName=function(){return"AWSAppSyncRealTimeProvider"},t.prototype.newClient=function(){throw new Error("Not used here")},t.prototype.publish=function(e,t,n){return K(this,void 0,void 0,(function(){return q(this,(function(e){throw new Error("Operation not supported")}))}))},t.prototype.subscribe=function(e,t){var n=this,r=t.appSyncGraphqlEndpoint;return new i.a((function(e){if(r){var i=Object(l.v4)();return n._startSubscriptionWithAWSAppSyncRealTime({options:t,observer:e,subscriptionId:i}).catch((function(t){e.error({errors:[J({},new L(H.a.REALTIME_SUBSCRIPTION_INIT_ERROR+": "+t))]}),e.complete()})),function(){return K(n,void 0,void 0,(function(){var e,t;return q(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,3,4]),[4,this._waitForSubscriptionToBeConnected(i)];case 1:if(n.sent(),!(e=(this.subscriptionObserverMap.get(i)||{}).subscriptionState))return[2];if(e!==P.CONNECTED)throw new Error("Subscription never connected");return this._sendUnsubscriptionMessage(i),[3,4];case 2:return t=n.sent(),$.debug("Error while unsubscribing "+t),[3,4];case 3:return this._removeSubscriptionObserver(i),[7];case 4:return[2]}}))}))}}e.error({errors:[J({},new L("Subscribe only available for AWS AppSync endpoint"))]}),e.complete()}))},Object.defineProperty(t.prototype,"isSSLEnabled",{get:function(){return!this.options.aws_appsync_dangerously_connect_to_http_endpoint_for_testing},enumerable:!0,configurable:!0}),t.prototype._startSubscriptionWithAWSAppSyncRealTime=function(e){var t=e.options,n=e.observer,r=e.subscriptionId;return K(this,void 0,void 0,(function(){var e,i,o,a,u,c,l,d,f,p,h,g,y,v,m,b,M,I,w,N,S,x,T,D,A,j,E=this;return q(this,(function(C){switch(C.label){case 0:return e=t.appSyncGraphqlEndpoint,i=t.authenticationType,o=t.query,a=t.variables,u=t.apiKey,c=t.region,l=t.graphql_headers,d=void 0===l?function(){return{}}:l,f=t.additionalHeaders,p=void 0===f?{}:f,h=P.PENDING,g={query:o,variables:a},this.subscriptionObserverMap.set(r,{observer:n,query:o,variables:a,subscriptionState:h,startAckTimeoutId:null}),y=JSON.stringify(g),m=[{}],[4,this._awsRealTimeHeaderBasedAuth({apiKey:u,appSyncGraphqlEndpoint:e,authenticationType:i,payload:y,canonicalUri:"",region:c})];case 1:return b=[J.apply(void 0,m.concat([C.sent()]))],[4,d()];case 2:v=J.apply(void 0,[J.apply(void 0,[J.apply(void 0,b.concat([C.sent()])),p]),(j={},j[s.c]=Y.a.userAgent,j)]),M={id:r,payload:{data:y,extensions:{authorization:J({},v)}},type:z.GQL_START},I=JSON.stringify(M),C.label=3;case 3:return C.trys.push([3,5,,6]),[4,this._initializeWebSocketConnection({apiKey:u,appSyncGraphqlEndpoint:e,authenticationType:i,region:c})];case 4:return C.sent(),[3,6];case 5:return w=C.sent(),$.debug({err:w}),N=w.message,S=void 0===N?"":N,n.error({errors:[J({},new L(H.a.CONNECTION_FAILED+": "+S))]}),n.complete(),"function"==typeof(x=(this.subscriptionObserverMap.get(r)||{}).subscriptionFailedCallback)&&x(),[2];case 6:return T=this.subscriptionObserverMap.get(r),D=T.subscriptionFailedCallback,A=T.subscriptionReadyCallback,this.subscriptionObserverMap.set(r,{observer:n,subscriptionState:h,variables:a,query:o,subscriptionReadyCallback:A,subscriptionFailedCallback:D,startAckTimeoutId:setTimeout((function(){E._timeoutStartSubscriptionAck.call(E,r)}),15e3)}),this.awsRealTimeSocket&&this.awsRealTimeSocket.send(I),[2]}}))}))},t.prototype._waitForSubscriptionToBeConnected=function(e){return K(this,void 0,void 0,(function(){var t=this;return q(this,(function(n){return this.subscriptionObserverMap.get(e).subscriptionState===P.PENDING?[2,new Promise((function(n,r){var i=t.subscriptionObserverMap.get(e),o=i.observer,a=i.subscriptionState,s=i.variables,u=i.query;t.subscriptionObserverMap.set(e,{observer:o,subscriptionState:a,variables:s,query:u,subscriptionReadyCallback:n,subscriptionFailedCallback:r})}))]:[2]}))}))},t.prototype._sendUnsubscriptionMessage=function(e){try{if(this.awsRealTimeSocket&&this.awsRealTimeSocket.readyState===WebSocket.OPEN&&this.socketStatus===_.READY){var t={id:e,type:z.GQL_STOP},n=JSON.stringify(t);this.awsRealTimeSocket.send(n)}}catch(e){$.debug({err:e})}},t.prototype._removeSubscriptionObserver=function(e){this.subscriptionObserverMap.delete(e),setTimeout(this._closeSocketIfRequired.bind(this),1e3)},t.prototype._closeSocketIfRequired=function(){if(!(this.subscriptionObserverMap.size>0))if(this.awsRealTimeSocket)if(this.awsRealTimeSocket.bufferedAmount>0)setTimeout(this._closeSocketIfRequired.bind(this),1e3);else{$.debug("closing WebSocket..."),clearTimeout(this.keepAliveTimeoutId);var e=this.awsRealTimeSocket;e.onclose=void 0,e.onerror=void 0,e.close(1e3),this.awsRealTimeSocket=null,this.socketStatus=_.CLOSED}else this.socketStatus=_.CLOSED},t.prototype._handleIncomingSubscriptionMessage=function(e){$.debug("subscription message from AWS AppSync RealTime: "+e.data);var t=JSON.parse(e.data),n=t.id,r=void 0===n?"":n,i=t.payload,o=t.type,a=this.subscriptionObserverMap.get(r)||{},s=a.observer,u=void 0===s?null:s,c=a.query,l=void 0===c?"":c,d=a.variables,f=void 0===d?{}:d,p=a.startAckTimeoutId,h=a.subscriptionReadyCallback,g=a.subscriptionFailedCallback;if($.debug({id:r,observer:u,query:l,variables:f}),o===z.GQL_DATA&&i&&i.data)u?u.next(i):$.debug("observer not found for id: "+r);else if(o!==z.GQL_START_ACK){if(o===z.GQL_CONNECTION_KEEP_ALIVE)return clearTimeout(this.keepAliveTimeoutId),void(this.keepAliveTimeoutId=setTimeout(this._errorDisconnect.bind(this,H.a.TIMEOUT_DISCONNECT),this.keepAliveTimeout));if(o===z.GQL_ERROR){y=P.FAILED;this.subscriptionObserverMap.set(r,{observer:u,query:l,variables:f,startAckTimeoutId:p,subscriptionReadyCallback:h,subscriptionFailedCallback:g,subscriptionState:y}),u.error({errors:[J({},new L(H.a.CONNECTION_FAILED+": "+JSON.stringify(i)))]}),clearTimeout(p),u.complete(),"function"==typeof g&&g()}}else{$.debug("subscription ready for "+JSON.stringify({query:l,variables:f})),"function"==typeof h&&h(),clearTimeout(p),function(e,t,n){B.a.dispatch("api",{event:e,data:t,message:n},"PubSub",ee)}(H.a.SUBSCRIPTION_ACK,{query:l,variables:f},"Connection established for subscription");var y=P.CONNECTED;this.subscriptionObserverMap.set(r,{observer:u,query:l,variables:f,startAckTimeoutId:null,subscriptionState:y,subscriptionReadyCallback:h,subscriptionFailedCallback:g})}},t.prototype._errorDisconnect=function(e){$.debug("Disconnect error: "+e),this.subscriptionObserverMap.forEach((function(t){var n=t.observer;n&&!n.closed&&n.error({errors:[J({},new L(e))]})})),this.subscriptionObserverMap.clear(),this.awsRealTimeSocket&&this.awsRealTimeSocket.close(),this.socketStatus=_.CLOSED},t.prototype._timeoutStartSubscriptionAck=function(e){var t=this.subscriptionObserverMap.get(e)||{},n=t.observer,r=t.query,i=t.variables;n&&(this.subscriptionObserverMap.set(e,{observer:n,query:r,variables:i,subscriptionState:P.FAILED}),n&&!n.closed&&(n.error({errors:[J({},new L("Subscription timeout "+JSON.stringify({query:r,variables:i})))]}),n.complete()),$.debug("timeoutStartSubscription",JSON.stringify({query:r,variables:i})))},t.prototype._initializeWebSocketConnection=function(e){var t=this,n=e.appSyncGraphqlEndpoint,r=e.authenticationType,i=e.apiKey,o=e.region;if(this.socketStatus!==_.READY)return new Promise((function(e,a){return K(t,void 0,void 0,(function(){var t,s,u,c,l,d,f,p,h,g;return q(this,(function(y){switch(y.label){case 0:if(this.promiseArray.push({res:e,rej:a}),this.socketStatus!==_.CLOSED)return[3,5];y.label=1;case 1:return y.trys.push([1,4,,5]),this.socketStatus=_.CONNECTING,t=this.isSSLEnabled?"wss://":"ws://",s=n.replace("https://",t).replace("http://",t).replace("appsync-api","appsync-realtime-api").replace("gogi-beta","grt-beta"),u="{}",d=(l=JSON).stringify,[4,this._awsRealTimeHeaderBasedAuth({authenticationType:r,payload:u,canonicalUri:"/connect",apiKey:i,appSyncGraphqlEndpoint:n,region:o})];case 2:return c=d.apply(l,[y.sent()]),f=U.Buffer.from(c).toString("base64"),p=U.Buffer.from(u).toString("base64"),h=s+"?header="+f+"&payload="+p,[4,this._initializeRetryableHandshake({awsRealTimeUrl:h})];case 3:return y.sent(),this.promiseArray.forEach((function(e){var t=e.res;$.debug("Notifying connection successful"),t()})),this.socketStatus=_.READY,this.promiseArray=[],[3,5];case 4:return g=y.sent(),this.promiseArray.forEach((function(e){return(0,e.rej)(g)})),this.promiseArray=[],this.awsRealTimeSocket&&this.awsRealTimeSocket.readyState===WebSocket.OPEN&&this.awsRealTimeSocket.close(3001),this.awsRealTimeSocket=null,this.socketStatus=_.CLOSED,[3,5];case 5:return[2]}}))}))}))},t.prototype._initializeRetryableHandshake=function(e){var t=e.awsRealTimeUrl;return K(this,void 0,void 0,(function(){return q(this,(function(e){switch(e.label){case 0:return $.debug("Initializaling retryable Handshake"),[4,Object(F.b)(this._initializeHandshake.bind(this),[{awsRealTimeUrl:t}],5e3)];case 1:return e.sent(),[2]}}))}))},t.prototype._initializeHandshake=function(e){var t=e.awsRealTimeUrl;return K(this,void 0,void 0,(function(){var e,n,r,i=this;return q(this,(function(o){switch(o.label){case 0:$.debug("Initializing handshake "+t),o.label=1;case 1:return o.trys.push([1,4,,5]),[4,new Promise((function(e,n){var r=new WebSocket(t,"graphql-ws");r.onerror=function(){$.debug("WebSocket connection error")},r.onclose=function(){n(new Error("Connection handshake error"))},r.onopen=function(){return i.awsRealTimeSocket=r,e()}}))];case 2:return o.sent(),[4,new Promise((function(e,t){var n=!1;i.awsRealTimeSocket.onerror=function(e){$.debug("WebSocket error "+JSON.stringify(e))},i.awsRealTimeSocket.onclose=function(e){$.debug("WebSocket closed "+e.reason),t(new Error(JSON.stringify(e)))},i.awsRealTimeSocket.onmessage=function(r){$.debug("subscription message from AWS AppSyncRealTime: "+r.data+" ");var o=JSON.parse(r.data),a=o.type,s=o.payload,u=(void 0===s?{}:s).connectionTimeoutMs,c=void 0===u?re:u;if(a===z.GQL_CONNECTION_ACK)return n=!0,i.keepAliveTimeout=c,i.awsRealTimeSocket.onmessage=i._handleIncomingSubscriptionMessage.bind(i),i.awsRealTimeSocket.onerror=function(e){$.debug(e),i._errorDisconnect(H.a.CONNECTION_CLOSED)},i.awsRealTimeSocket.onclose=function(e){$.debug("WebSocket closed "+e.reason),i._errorDisconnect(H.a.CONNECTION_CLOSED)},void e("Cool, connected to AWS AppSyncRealTime");if(a===z.GQL_CONNECTION_ERROR){var l=o.payload,d=(void 0===l?{}:l).errors,f=X(void 0===d?[]:d,1)[0],p=void 0===f?{}:f,h=p.errorType,g=void 0===h?"":h,y=p.errorCode;t({errorType:g,errorCode:void 0===y?0:y})}};var r={type:z.GQL_CONNECTION_INIT};i.awsRealTimeSocket.send(JSON.stringify(r)),setTimeout(function(){n||t(new Error("Connection timeout: ack from AWSRealTime was not received on 15000 ms"))}.bind(i),15e3)}))];case 3:return o.sent(),[3,5];case 4:throw e=o.sent(),n=e.errorType,r=e.errorCode,te.includes(r)?new F.a(n):n?new Error(n):e;case 5:return[2]}}))}))},t.prototype._awsRealTimeHeaderBasedAuth=function(e){var t=e.authenticationType,n=e.payload,r=e.canonicalUri,i=e.appSyncGraphqlEndpoint,o=e.apiKey,a=e.region;return K(this,void 0,void 0,(function(){var e,s,u;return q(this,(function(c){switch(c.label){case 0:return e={API_KEY:this._awsRealTimeApiKeyHeader.bind(this),AWS_IAM:this._awsRealTimeIAMHeader.bind(this),OPENID_CONNECT:this._awsRealTimeOPENIDHeader.bind(this),AMAZON_COGNITO_USER_POOLS:this._awsRealTimeCUPHeader.bind(this)},"function"!=typeof(s=e[t])?($.debug("Authentication type "+t+" not supported"),[2,""]):(u=R.parse(i).host,[4,s({payload:n,canonicalUri:r,appSyncGraphqlEndpoint:i,apiKey:o,region:a,host:u})]);case 1:return[2,c.sent()]}}))}))},t.prototype._awsRealTimeCUPHeader=function(e){var t=e.host;return K(this,void 0,void 0,(function(){return q(this,(function(e){switch(e.label){case 0:return[4,V.default.currentSession()];case 1:return[2,{Authorization:e.sent().getAccessToken().getJwtToken(),host:t}]}}))}))},t.prototype._awsRealTimeOPENIDHeader=function(e){var t=e.host;return K(this,void 0,void 0,(function(){var e,n,r;return q(this,(function(i){switch(i.label){case 0:return[4,Z.a.getItem("federatedInfo")];case 1:return(n=i.sent())?(e=n.token,[3,4]):[3,2];case 2:return[4,V.default.currentAuthenticatedUser()];case 3:(r=i.sent())&&(e=r.token),i.label=4;case 4:if(!e)throw new Error("No federated jwt");return[2,{Authorization:e,host:t}]}}))}))},t.prototype._awsRealTimeApiKeyHeader=function(e){var t=e.apiKey,n=e.host;return K(this,void 0,void 0,(function(){var e,r;return q(this,(function(i){return e=new Date,r=e.toISOString().replace(/[:\-]|\.\d{3}/g,""),[2,{host:n,"x-amz-date":r,"x-api-key":t}]}))}))},t.prototype._awsRealTimeIAMHeader=function(e){var t=e.payload,n=e.canonicalUri,r=e.appSyncGraphqlEndpoint,i=e.region;return K(this,void 0,void 0,(function(){var e,o,a;return q(this,(function(s){switch(s.label){case 0:return e={region:i,service:"appsync"},[4,this._ensureCredentials()];case 1:if(!s.sent())throw new Error("No credentials");return[4,Q.a.get().then((function(e){return{secret_key:e.secretAccessKey,access_key:e.accessKeyId,session_token:e.sessionToken}}))];case 2:return o=s.sent(),a={url:""+r+n,data:t,method:"POST",headers:J({},ne)},[2,G.a.sign(a,o,e).headers]}}))}))},t.prototype._ensureCredentials=function(){return Q.a.get().then((function(e){if(!e)return!1;var t=Q.a.shear(e);return $.debug("set credentials for AWSAppSyncRealTimeProvider",t),!0})).catch((function(e){return $.warn("ensure credentials error",e),!1}))},t}(p),oe=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},ae=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},se=Object(o.b)().isNode,ue=new a.a("PubSub"),ce=new(function(){function e(e){this._options=e,ue.debug("PubSub Options",this._options),this._pluggables=[],this.subscribe=this.subscribe.bind(this)}return Object.defineProperty(e.prototype,"awsAppSyncProvider",{get:function(){return this._awsAppSyncProvider||(this._awsAppSyncProvider=new E(this._options)),this._awsAppSyncProvider},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"awsAppSyncRealTimeProvider",{get:function(){return this._awsAppSyncRealTimeProvider||(this._awsAppSyncRealTimeProvider=new ie(this._options)),this._awsAppSyncRealTimeProvider},enumerable:!0,configurable:!0}),e.prototype.getModuleName=function(){return"PubSub"},e.prototype.configure=function(e){var t=this,n=e?e.PubSub||e:{};return ue.debug("configure PubSub",{opt:n}),this._options=Object.assign({},this._options,n),this._pluggables.map((function(e){return e.configure(t._options)})),this._options},e.prototype.addPluggable=function(e){return oe(this,void 0,void 0,(function(){return ae(this,(function(t){return e&&"PubSub"===e.getCategory()?(this._pluggables.push(e),[2,e.configure(this._options)]):[2]}))}))},e.prototype.getProviderByName=function(e){return e===s.a?this.awsAppSyncProvider:e===s.b?this.awsAppSyncRealTimeProvider:this._pluggables.find((function(t){return t.getProviderName()===e}))},e.prototype.getProviders=function(e){void 0===e&&(e={});var t=e.provider;if(!t)return this._pluggables;var n=this.getProviderByName(t);if(!n)throw new Error("Could not find provider named "+t);return[n]},e.prototype.publish=function(e,t,n){return oe(this,void 0,void 0,(function(){return ae(this,(function(r){return[2,Promise.all(this.getProviders(n).map((function(r){return r.publish(e,t,n)})))]}))}))},e.prototype.subscribe=function(e,t){if(se&&this._options&&this._options.ssr)throw new Error("Subscriptions are not supported for Server-Side Rendering (SSR)");ue.debug("subscribe options",t);var n=this.getProviders(t);return new i.a((function(r){var i=n.map((function(n){return{provider:n,observable:n.subscribe(e,t)}})).map((function(e){var t=e.provider;return e.observable.subscribe({start:console.error,next:function(e){return r.next({provider:t,value:e})},error:function(e){return r.error({provider:t,error:e})}})}));return function(){return i.forEach((function(e){return e.unsubscribe()}))}}))},e}())(null);u.a.register(ce)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Crc32=t.crc32=void 0;var r=n(2);t.crc32=function(e){return(new i).update(e).digest()};var i=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var i=r.__values(e),a=i.next();!a.done;a=i.next()){var s=a.value;this.checksum=this.checksum>>>8^o[255&(this.checksum^s)]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}();t.Crc32=i;var o=Uint32Array.from([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117])},function(e,t,n){var r=n(190);e.exports=function(e,t){return r(e,t)}},function(e,t,n){var r=n(462),i=n(463),o=i;o.v1=r,o.v4=i,e.exports=o},function(e,t,n){var r=n(465),i=n(466),o=i;o.v1=r,o.v4=i,e.exports=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(144),i=n(2),o=n(40),a=function(){function e(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}return e.fromNumber=function(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw new Error(t+" is too large (or, if negative, too small) to represent as an Int64");for(var n=new Uint8Array(8),r=7,i=Math.abs(Math.round(t));r>-1&&i>0;r--,i/=256)n[r]=i;return t<0&&s(n),new e(n)},e.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&s(e),parseInt(Object(o.b)(e),16)*(t?-1:1)},e.prototype.toString=function(){return String(this.valueOf())},e}();function s(e){for(var t=0;t<8;t++)e[t]^=255;for(t=7;t>-1&&(e[t]++,0===e[t]);t--);}var u,c=function(){function e(e,t){this.toUtf8=e,this.fromUtf8=t}return e.prototype.format=function(e){var t,n,r,o,a=[];try{for(var s=Object(i.__values)(Object.keys(e)),u=s.next();!u.done;u=s.next()){var c=u.value,l=this.fromUtf8(c);a.push(Uint8Array.from([l.byteLength]),l,this.formatHeaderValue(e[c]))}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}var d=new Uint8Array(a.reduce((function(e,t){return e+t.byteLength}),0)),f=0;try{for(var p=Object(i.__values)(a),h=p.next();!h.done;h=p.next()){var g=h.value;d.set(g,f),f+=g.byteLength}}catch(e){r={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}return d},e.prototype.formatHeaderValue=function(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":var t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":var n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":var r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":var i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);var s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":var u=this.fromUtf8(e.value),c=new DataView(new ArrayBuffer(3+u.byteLength));c.setUint8(0,7),c.setUint16(1,u.byteLength,!1);var l=new Uint8Array(c.buffer);return l.set(u,3),l;case"timestamp":var d=new Uint8Array(9);return d[0]=8,d.set(a.fromNumber(e.value.valueOf()).bytes,1),d;case"uuid":if(!b.test(e.value))throw new Error("Invalid UUID received: "+e.value);var f=new Uint8Array(17);return f[0]=9,f.set(Object(o.a)(e.value.replace(/\-/g,"")),1),f}},e.prototype.parse=function(e){for(var t={},n=0;n<e.byteLength;){var r=e.getUint8(n++),i=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,r));switch(n+=r,e.getUint8(n++)){case 0:t[i]={type:l,value:!0};break;case 1:t[i]={type:l,value:!1};break;case 2:t[i]={type:d,value:e.getInt8(n++)};break;case 3:t[i]={type:f,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:p,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:h,value:new a(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:var s=e.getUint16(n,!1);n+=2,t[i]={type:g,value:new Uint8Array(e.buffer,e.byteOffset+n,s)},n+=s;break;case 7:var u=e.getUint16(n,!1);n+=2,t[i]={type:y,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,u))},n+=u;break;case 8:t[i]={type:v,value:new Date(new a(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:var c=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[i]={type:m,value:Object(o.b)(c.subarray(0,4))+"-"+Object(o.b)(c.subarray(4,6))+"-"+Object(o.b)(c.subarray(6,8))+"-"+Object(o.b)(c.subarray(8,10))+"-"+Object(o.b)(c.subarray(10))};break;default:throw new Error("Unrecognized header type tag")}}return t},e}();!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(u||(u={}));var l="boolean",d="byte",f="short",p="integer",h="long",g="binary",y="string",v="timestamp",m="uuid",b=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;var M=function(){function e(e,t){this.headerMarshaller=new c(e,t)}return e.prototype.marshall=function(e){var t=e.headers,n=e.body,i=this.headerMarshaller.format(t),o=i.byteLength+n.byteLength+16,a=new Uint8Array(o),s=new DataView(a.buffer,a.byteOffset,a.byteLength),u=new r.Crc32;return s.setUint32(0,o,!1),s.setUint32(4,i.byteLength,!1),s.setUint32(8,u.update(a.subarray(0,8)).digest(),!1),a.set(i,12),a.set(n,i.byteLength+12),s.setUint32(o-4,u.update(a.subarray(8,o-4)).digest(),!1),a},e.prototype.unmarshall=function(e){var t=function(e){var t=e.byteLength,n=e.byteOffset,i=e.buffer;if(t<16)throw new Error("Provided message too short to accommodate event stream message overhead");var o=new DataView(i,n,t),a=o.getUint32(0,!1);if(t!==a)throw new Error("Reported message length does not match received message length");var s=o.getUint32(4,!1),u=o.getUint32(8,!1),c=o.getUint32(t-4,!1),l=(new r.Crc32).update(new Uint8Array(i,n,8));if(u!==l.digest())throw new Error("The prelude checksum specified in the message ("+u+") does not match the calculated CRC32 checksum ("+l.digest()+")");if(l.update(new Uint8Array(i,n+8,t-12)),c!==l.digest())throw new Error("The message checksum ("+l.digest()+") did not match the expected value of "+c);return{headers:new DataView(i,n+8+4,s),body:new Uint8Array(i,n+8+4+s,a-s-16)}}(e),n=t.headers,i=t.body;return{headers:this.headerMarshaller.parse(n),body:i}},e.prototype.formatHeaders=function(e){return this.headerMarshaller.format(e)},e}();var I=function(){function e(e){var t=e.utf8Encoder,n=e.utf8Decoder;this.eventMarshaller=new M(t,n),this.utfEncoder=t}return e.prototype.deserialize=function(e,t){var n,r,o,a,s,u,c;return function(e,t){var n;return(n={})[Symbol.asyncIterator]=function(){return Object(i.__asyncGenerator)(this,arguments,(function(){var n,r,o,a,s,u,c,l,d,f,p,h,g,y,v,m,b;return Object(i.__generator)(this,(function(M){switch(M.label){case 0:M.trys.push([0,12,13,18]),n=Object(i.__asyncValues)(e),M.label=1;case 1:return[4,Object(i.__await)(n.next())];case 2:if((r=M.sent()).done)return[3,11];if(o=r.value,a=t.eventMarshaller.unmarshall(o),"error"!==(s=a.headers[":message-type"].value))return[3,3];throw(u=new Error(a.headers[":error-message"].value||"UnknownError")).name=a.headers[":error-code"].value,u;case 3:return"exception"!==s?[3,5]:(c=a.headers[":exception-type"].value,(y={})[c]=a,l=y,[4,Object(i.__await)(t.deserializer(l))]);case 4:if((d=M.sent()).$unknown)throw(f=new Error(t.toUtf8(a.body))).name=c,f;throw d[c];case 5:return"event"!==s?[3,9]:((v={})[a.headers[":event-type"].value]=a,p=v,[4,Object(i.__await)(t.deserializer(p))]);case 6:return(h=M.sent()).$unknown?[3,10]:[4,Object(i.__await)(h)];case 7:return[4,M.sent()];case 8:return M.sent(),[3,10];case 9:throw Error("Unrecognizable event type: "+a.headers[":event-type"].value);case 10:return[3,1];case 11:return[3,18];case 12:return g=M.sent(),m={error:g},[3,18];case 13:return M.trys.push([13,,16,17]),r&&!r.done&&(b=n.return)?[4,Object(i.__await)(b.call(n))]:[3,15];case 14:M.sent(),M.label=15;case 15:return[3,17];case 16:if(m)throw m.error;return[7];case 17:return[7];case 18:return[2]}}))}))},n}((n=e,o=0,a=0,s=null,u=null,c=function(e){if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);o=e,a=4,s=new Uint8Array(e),new DataView(s.buffer).setUint32(0,e,!1)},(r={})[Symbol.asyncIterator]=function(){return Object(i.__asyncGenerator)(this,arguments,(function(){var e,t,r,l,d,f,p,h;return Object(i.__generator)(this,(function(g){switch(g.label){case 0:e=n[Symbol.asyncIterator](),g.label=1;case 1:return[4,Object(i.__await)(e.next())];case 2:return t=g.sent(),r=t.value,t.done?o?[3,4]:[4,Object(i.__await)(void 0)]:[3,10];case 3:return[2,g.sent()];case 4:return o!==a?[3,7]:[4,Object(i.__await)(s)];case 5:return[4,g.sent()];case 6:return g.sent(),[3,8];case 7:throw new Error("Truncated event message received.");case 8:return[4,Object(i.__await)(void 0)];case 9:return[2,g.sent()];case 10:l=r.length,d=0,g.label=11;case 11:if(!(d<l))return[3,15];if(!s){if(f=l-d,u||(u=new Uint8Array(4)),p=Math.min(4-a,f),u.set(r.slice(d,d+p),a),d+=p,(a+=p)<4)return[3,15];c(new DataView(u.buffer).getUint32(0,!1)),u=null}return h=Math.min(o-a,l-d),s.set(r.slice(d,d+h),a),a+=h,d+=h,o&&o===a?[4,Object(i.__await)(s)]:[3,14];case 12:return[4,g.sent()];case 13:g.sent(),s=null,o=0,a=0,g.label=14;case 14:return[3,11];case 15:return[3,1];case 16:return[2]}}))}))},r),{eventMarshaller:this.eventMarshaller,deserializer:t,toUtf8:this.utfEncoder})},e.prototype.serialize=function(e,t){var n,r=this;return(n={})[Symbol.asyncIterator]=function(){return Object(i.__asyncGenerator)(this,arguments,(function(){var n,o,a,s,u,c,l;return Object(i.__generator)(this,(function(d){switch(d.label){case 0:d.trys.push([0,7,8,13]),n=Object(i.__asyncValues)(e),d.label=1;case 1:return[4,Object(i.__await)(n.next())];case 2:return(o=d.sent()).done?[3,6]:(a=o.value,s=r.eventMarshaller.marshall(t(a)),[4,Object(i.__await)(s)]);case 3:return[4,d.sent()];case 4:d.sent(),d.label=5;case 5:return[3,1];case 6:return[3,13];case 7:return u=d.sent(),c={error:u},[3,13];case 8:return d.trys.push([8,,11,12]),o&&!o.done&&(l=n.return)?[4,Object(i.__await)(l.call(n))]:[3,10];case 9:d.sent(),d.label=10;case 10:return[3,12];case 11:if(c)throw c.error;return[7];case 12:return[7];case 13:return[4,Object(i.__await)(new Uint8Array(0))];case 14:return[4,d.sent()];case 15:return d.sent(),[2]}}))}))},n},e}(),w=function(){function e(e){var t=e.utf8Encoder,n=e.utf8Decoder;this.eventMarshaller=new M(t,n),this.universalMarshaller=new I({utf8Decoder:n,utf8Encoder:t})}return e.prototype.deserialize=function(e,t){var n,r,o=N(e)?(n=e,(r={})[Symbol.asyncIterator]=function(){return Object(i.__asyncGenerator)(this,arguments,(function(){var e,t,r,o;return Object(i.__generator)(this,(function(a){switch(a.label){case 0:e=n.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,Object(i.__await)(e.read())];case 3:return t=a.sent(),r=t.done,o=t.value,r?[4,Object(i.__await)(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Object(i.__await)(o)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}}))}))},r):e;return this.universalMarshaller.deserialize(o,t)},e.prototype.serialize=function(e,t){var n,r=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(n=r[Symbol.asyncIterator](),new ReadableStream({pull:function(e){return Object(i.__awaiter)(this,void 0,void 0,(function(){var t,r,o;return Object(i.__generator)(this,(function(i){switch(i.label){case 0:return[4,n.next()];case 1:return t=i.sent(),r=t.done,o=t.value,r?[2,e.close()]:(e.enqueue(o),[2])}}))}))}})):r},e}(),N=function(e){return"function"==typeof ReadableStream&&e instanceof ReadableStream},S=function(e){return new w(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(2),i=n(40),o="X-Amz-Date",a="X-Amz-Signature",s="X-Amz-Security-Token",u="authorization",c=o.toLowerCase(),l=[u,c,"date"],d=a.toLowerCase(),f="x-amz-content-sha256",p=s.toLowerCase(),h={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},g=/^proxy-/,y=/^sec-/,v="AWS4-HMAC-SHA256",m="AWS4-HMAC-SHA256-PAYLOAD",b="aws4_request",M={},I=[];function w(e,t,n){return e+"/"+t+"/"+n+"/"+b}function N(e,t,n){var r=new e(t);return r.update(n),r.digest()}function S(e,t,n){var i,o,a=e.headers,s={};try{for(var u=Object(r.__values)(Object.keys(a).sort()),c=u.next();!c.done;c=u.next()){var l=c.value,d=l.toLowerCase();(d in h||(null==t?void 0:t.has(d))||g.test(d)||y.test(d))&&(!n||n&&!n.has(d))||(s[d]=a[l].trim().replace(/\s+/g," "))}}catch(e){i={error:e}}finally{try{c&&!c.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}return s}var x=n(82);var T=n(268);function D(e,t){var n=e.headers,o=e.body;return Object(r.__awaiter)(this,void 0,void 0,(function(){var e,a,s,u,c,l,d;return Object(r.__generator)(this,(function(p){switch(p.label){case 0:try{for(e=Object(r.__values)(Object.keys(n)),a=e.next();!a.done;a=e.next())if((s=a.value).toLowerCase()===f)return[2,n[s]]}catch(e){l={error:e}}finally{try{a&&!a.done&&(d=e.return)&&d.call(e)}finally{if(l)throw l.error}}return null!=o?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof o||ArrayBuffer.isView(o)||Object(T.a)(o)?((u=new t).update(o),c=i.b,[4,u.digest()]):[3,3];case 2:return[2,c.apply(void 0,[p.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}}))}))}function A(e){var t=e.headers,n=e.query,i=Object(r.__rest)(e,["headers","query"]);return Object(r.__assign)(Object(r.__assign)({},i),{headers:Object(r.__assign)({},t),query:n?j(n):void 0})}function j(e){return Object.keys(e).reduce((function(t,n){var i,o=e[n];return Object(r.__assign)(Object(r.__assign)({},t),((i={})[n]=Array.isArray(o)?Object(r.__spread)(o):o,i))}),{})}function E(e){var t,n;e="function"==typeof e.clone?e.clone():A(e);try{for(var i=Object(r.__values)(Object.keys(e.headers)),o=i.next();!o.done;o=i.next()){var a=o.value;l.indexOf(a.toLowerCase())>-1&&delete e.headers[a]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return e}function C(e){return function(e){if("number"==typeof e)return new Date(1e3*e);if("string"==typeof e)return Number(e)?new Date(1e3*Number(e)):new Date(e);return e}(e).toISOString().replace(/\.\d{3}Z$/,"Z")}var O=function(){function e(e){var t=e.applyChecksum,n=e.credentials,r=e.region,i=e.service,o=e.sha256,a=e.uriEscapePath,s=void 0===a||a;this.service=i,this.sha256=o,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=z(r),this.credentialProvider=P(n)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),Object(r.__awaiter)(this,void 0,void 0,(function(){var n,i,o,u,c,l,d,f,p,h,g,y,m,b,M,I,N,x,T,j,C,O,z,P;return Object(r.__generator)(this,(function(_){switch(_.label){case 0:return n=t.signingDate,i=void 0===n?new Date:n,o=t.expiresIn,u=void 0===o?3600:o,c=t.unsignableHeaders,l=t.unhoistableHeaders,d=t.signableHeaders,f=t.signingRegion,p=t.signingService,[4,this.credentialProvider()];case 1:return h=_.sent(),null==f?[3,2]:(y=f,[3,4]);case 2:return[4,this.regionProvider()];case 3:y=_.sent(),_.label=4;case 4:return g=y,m=k(i),b=m.longDate,M=m.shortDate,u>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(I=w(M,g,null!=p?p:this.service),N=function(e,t){var n,i,o;void 0===t&&(t={});var a="function"==typeof e.clone?e.clone():A(e),s=a.headers,u=a.query,c=void 0===u?{}:u;try{for(var l=Object(r.__values)(Object.keys(s)),d=l.next();!d.done;d=l.next()){var f=d.value,p=f.toLowerCase();"x-amz-"!==p.substr(0,6)||(null===(o=t.unhoistableHeaders)||void 0===o?void 0:o.has(p))||(c[f]=s[f],delete s[f])}}catch(e){n={error:e}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return Object(r.__assign)(Object(r.__assign)({},e),{headers:s,query:c})}(E(e),{unhoistableHeaders:l}),h.sessionToken&&(N.query[s]=h.sessionToken),N.query["X-Amz-Algorithm"]=v,N.query["X-Amz-Credential"]=h.accessKeyId+"/"+I,N.query["X-Amz-Date"]=b,N.query["X-Amz-Expires"]=u.toString(10),x=S(N,c,d),N.query["X-Amz-SignedHeaders"]=L(x),T=N.query,j=a,C=this.getSignature,O=[b,I,this.getSigningKey(h,g,M,p)],z=this.createCanonicalRequest,P=[N,x],[4,D(e,this.sha256)]);case 5:return[4,C.apply(this,O.concat([z.apply(this,P.concat([_.sent()]))]))];case 6:return T[j]=_.sent(),[2,N]}}))}))},e.prototype.sign=function(e,t){return Object(r.__awaiter)(this,void 0,void 0,(function(){return Object(r.__generator)(this,(function(n){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]}))}))},e.prototype.signEvent=function(e,t){var n=e.headers,o=e.payload,a=t.signingDate,s=void 0===a?new Date:a,u=t.priorSignature,c=t.signingRegion,l=t.signingService;return Object(r.__awaiter)(this,void 0,void 0,(function(){var e,t,a,d,f,p,h,g,y,v,b;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:return null==c?[3,1]:(t=c,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=r.sent(),r.label=3;case 3:return e=t,a=k(s),d=a.shortDate,f=a.longDate,p=w(d,e,null!=l?l:this.service),[4,D({headers:{},body:o},this.sha256)];case 4:return h=r.sent(),(g=new this.sha256).update(n),v=i.b,[4,g.digest()];case 5:return y=v.apply(void 0,[r.sent()]),b=[m,f,p,u,y,h].join("\n"),[2,this.signString(b,{signingDate:s,signingRegion:e,signingService:l})]}}))}))},e.prototype.signString=function(e,t){var n=void 0===t?{}:t,o=n.signingDate,a=void 0===o?new Date:o,s=n.signingRegion,u=n.signingService;return Object(r.__awaiter)(this,void 0,void 0,(function(){var t,n,o,c,l,d,f,p;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:return[4,this.credentialProvider()];case 1:return t=r.sent(),null==s?[3,2]:(o=s,[3,4]);case 2:return[4,this.regionProvider()];case 3:o=r.sent(),r.label=4;case 4:return n=o,c=k(a).shortDate,f=(d=this.sha256).bind,[4,this.getSigningKey(t,n,c,u)];case 5:return(l=new(f.apply(d,[void 0,r.sent()]))).update(e),p=i.b,[4,l.digest()];case 6:return[2,p.apply(void 0,[r.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var n=void 0===t?{}:t,i=n.signingDate,o=void 0===i?new Date:i,a=n.signableHeaders,s=n.unsignableHeaders,l=n.signingRegion,d=n.signingService;return Object(r.__awaiter)(this,void 0,void 0,(function(){var t,n,i,h,g,y,v,m,b,M,I;return Object(r.__generator)(this,(function(N){switch(N.label){case 0:return[4,this.credentialProvider()];case 1:return t=N.sent(),null==l?[3,2]:(i=l,[3,4]);case 2:return[4,this.regionProvider()];case 3:i=N.sent(),N.label=4;case 4:return n=i,h=E(e),g=k(o),y=g.longDate,v=g.shortDate,m=w(v,n,null!=d?d:this.service),h.headers[c]=y,t.sessionToken&&(h.headers[p]=t.sessionToken),[4,D(h,this.sha256)];case 5:return b=N.sent(),!function(e,t){var n,i;e=e.toLowerCase();try{for(var o=Object(r.__values)(Object.keys(t)),a=o.next();!a.done;a=o.next())if(e===a.value.toLowerCase())return!0}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return!1}(f,h.headers)&&this.applyChecksum&&(h.headers[f]=b),M=S(h,s,a),[4,this.getSignature(y,m,this.getSigningKey(t,n,v,d),this.createCanonicalRequest(h,M,b))];case 6:return I=N.sent(),h.headers[u]="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+m+", SignedHeaders="+L(M)+", Signature="+I,[2,h]}}))}))},e.prototype.createCanonicalRequest=function(e,t,n){var i=Object.keys(t).sort();return e.method+"\n"+this.getCanonicalPath(e)+"\n"+function(e){var t,n,i=e.query,o=void 0===i?{}:i,a=[],s={},u=function(e){if(e.toLowerCase()===d)return"continue";a.push(e);var t=o[e];"string"==typeof t?s[e]=Object(x.a)(e)+"="+Object(x.a)(t):Array.isArray(t)&&(s[e]=t.slice(0).sort().reduce((function(t,n){return t.concat([Object(x.a)(e)+"="+Object(x.a)(n)])}),[]).join("&"))};try{for(var c=Object(r.__values)(Object.keys(o).sort()),l=c.next();!l.done;l=c.next())u(l.value)}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}return a.map((function(e){return s[e]})).filter((function(e){return e})).join("&")}(e)+"\n"+i.map((function(e){return e+":"+t[e]})).join("\n")+"\n\n"+i.join(";")+"\n"+n},e.prototype.createStringToSign=function(e,t,n){return Object(r.__awaiter)(this,void 0,void 0,(function(){var o,a;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:return(o=new this.sha256).update(n),[4,o.digest()];case 1:return a=r.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+Object(i.b)(a)]}}))}))},e.prototype.getCanonicalPath=function(e){var t=e.path;return this.uriEscapePath?"/"+encodeURIComponent(t.replace(/^\//,"")).replace(/%2F/g,"/"):t},e.prototype.getSignature=function(e,t,n,o){return Object(r.__awaiter)(this,void 0,void 0,(function(){var a,s,u,c,l;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:return[4,this.createStringToSign(e,t,o)];case 1:return a=r.sent(),c=(u=this.sha256).bind,[4,n];case 2:return(s=new(c.apply(u,[void 0,r.sent()]))).update(a),l=i.b,[4,s.digest()];case 3:return[2,l.apply(void 0,[r.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,n,o){return function(e,t,n,o,a){return Object(r.__awaiter)(void 0,void 0,void 0,(function(){var s,u,c,l,d,f,p,h,g;return Object(r.__generator)(this,(function(y){switch(y.label){case 0:return[4,N(e,t.secretAccessKey,t.accessKeyId)];case 1:if(s=y.sent(),(u=n+":"+o+":"+a+":"+Object(i.b)(s)+":"+t.sessionToken)in M)return[2,M[u]];for(I.push(u);I.length>50;)delete M[I.shift()];c="AWS4"+t.secretAccessKey,y.label=2;case 2:y.trys.push([2,7,8,9]),l=Object(r.__values)([n,o,a,b]),d=l.next(),y.label=3;case 3:return d.done?[3,6]:(f=d.value,[4,N(e,c,f)]);case 4:c=y.sent(),y.label=5;case 5:return d=l.next(),[3,3];case 6:return[3,9];case 7:return p=y.sent(),h={error:p},[3,9];case 8:try{d&&!d.done&&(g=l.return)&&g.call(l)}finally{if(h)throw h.error}return[7];case 9:return[2,M[u]=c]}}))}))}(this.sha256,e,n,t,o||this.service)},e}(),k=function(e){var t=C(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},L=function(e){return Object.keys(e).sort().join(";")},z=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},P=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2),i=function(e){return Object(r.__assign)(Object(r.__assign)({},e),{eventStreamMarshaller:e.eventStreamSerdeProvider(e)})}},function(e,t,n){var r=n(110),i=n(111);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.letHighlight=t.stopPropagation=t.onBackspace=t.onEscape=t.onEnter=t.events=void 0;t.events=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){e.forEach((function(e){return e(t)}))}};t.onEnter=function(e){return function(t){"Enter"===t.key&&e(t)}};t.onEscape=function(e){return function(t){"Escape"===t.key&&e(t)}};t.onBackspace=function(e){return function(t){"Backspace"===t.key&&e(t)}};t.stopPropagation=function(e){return function(t){t.stopPropagation(),e(t)}};t.letHighlight=function(e){return function(t){var n=window.getSelection();n&&n.toString().length<=0&&e(t)}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.mockNotebookWithCounts=t.mockNotebook=void 0;var o=i(n(168)),a=function(e){return r({id:o.default.uuid(),name:o.default.sentence(2,4),isPublic:o.default.boolean()},null!=e?e:{})};t.mockNotebook=a;t.mockNotebookWithCounts=function(e){return r(r(r({},a()),{videosCount:o.default.number(3,7),notesCount:o.default.number(20,40),captionsCount:o.default.number(50,100)}),null!=e?e:{})}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=r(n(298));t.default=function(e){var t,n=i.useState(null!==(t=o.default.get())&&void 0!==t?t:null),r=n[0],a=n[1];return i.useEffect((function(){return o.default.subscribe(a),function(){o.default.unsubscribe(a)}}),[]),null==r?void 0:r[e]}},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useIsMounted=void 0;var l=a(n(1)),d=n(170),f=a(n(8)),p=c(n(92)),h=c(n(24));function g(){var e=l.useRef(!0),t=l.useCallback((function(){return e.current}),[]);return l.useEffect((function(){return function(){e.current=!1}}),[]),t}t.useIsMounted=g;t.default=function(e){var t=e.onClick,n=e.link,r=e.children,i=e.width,o=void 0===i?"auto":i,a=e.height,c=void 0===a?"40px":a,d=e.type,f=void 0===d?"primary":d,h=e.loading,y=void 0!==h&&h,v=e.disabled,m=void 0!==v&&v,b=e.leftIcon,M=e.rightIcon,I=e.iconMargin,w=void 0===I?"15px":I,N=e.lineHeight,S=e.className,x=l.useState(y),T=x[0],D=x[1],C=g();function O(e){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:if(y||m)return[2];D(!0),n.label=1;case 1:return n.trys.push([1,,4,5]),t?[4,t(e)]:[3,3];case 2:return[2,n.sent()];case 3:return[3,5];case 4:return C()&&D(!1),[7];case 5:return[2]}}))}))}l.useEffect((function(){D(y)}),[y]);var k=function(){return l.default.createElement(l.default.Fragment,null,T?l.default.createElement(p.default,null):l.default.createElement(l.default.Fragment,null,b&&l.default.createElement(E,{side:"left",margin:w},b),r,M&&l.default.createElement(E,{side:"right",margin:w},M)))},L=function(e){13==e.keyCode&&e.preventDefault()};return n?l.default.createElement(j,{width:o,height:c,type:f,loading:y?"true":"false",disabled:m,to:n,onClick:O},k()):l.default.createElement(A,{type:f,width:o,height:c,lineHeight:N,loading:y?"true":"false",disabled:m,className:S,onClick:O,onKeyPress:L,onKeyDown:L},k())};var y,v,m,b,M,I,w,N,S,x,T,D,A=f.default.button.withConfig({displayName:"ButtonContainer",componentId:"sc-1eabuu8"})(I||(I=r(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n border: none;\n outline: none;\n height: ",";\n line-height: ",";\n font-size: 14px;\n font-weight: 500;\n padding: 0 10px;\n width: ",";\n cursor: pointer;\n transition-property: background-color, color, opacity;\n transition-duration: 0.2s;\n \n ","\n \n ","\n \n ","\n \n ","\n \n ","\n"],["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n border: none;\n outline: none;\n height: ",";\n line-height: ",";\n font-size: 14px;\n font-weight: 500;\n padding: 0 10px;\n width: ",";\n cursor: pointer;\n transition-property: background-color, color, opacity;\n transition-duration: 0.2s;\n \n ","\n \n ","\n \n ","\n \n ","\n \n ","\n"])),(function(e){return e.height}),(function(e){var t=e.lineHeight;return t||"40px"}),(function(e){return e.width}),(function(e){return"primary"===e.type&&f.css(y||(y=r(["\n background-color: ",";\n color: ",";\n\n &:hover,\n &:active,\n &:focus {\n background-color: ",";\n }\n "],["\n background-color: ",";\n color: ",";\n\n &:hover,\n &:active,\n &:focus {\n background-color: ",";\n }\n "])),h.default.colors.secondary,h.default.colors.whiteBase,h.default.colors.primary)}),(function(e){return"secondary"===e.type&&f.css(v||(v=r(["\n background-color: ",";\n color: ",";\n\n &:hover,\n &:active,\n &:focus {\n background-color: ",";\n }\n "],["\n background-color: ",";\n color: ",";\n\n &:hover,\n &:active,\n &:focus {\n background-color: ",";\n }\n "])),h.default.colors.transparentSecondary,h.default.colors.secondary,h.default.colors.transparentSecondary2)}),(function(e){return"tertiary"===e.type&&f.css(m||(m=r(["\n background-color: ",";\n color: ",";\n\n &:hover,\n &:active,\n &:focus {\n background-color: ",";\n }\n "],["\n background-color: ",";\n color: ",";\n\n &:hover,\n &:active,\n &:focus {\n background-color: ",";\n }\n "])),h.default.colors.tertiary,h.default.colors.secondary,h.default.colors.background)}),(function(e){return"true"===e.loading&&f.css(b||(b=r(["\n cursor: default;\n "],["\n cursor: default;\n "])))}),(function(e){return e.disabled&&f.css(M||(M=r(["\n background-color: ",";\n color: ",";\n border: 1px solid ",";\n opacity: 0.2;\n cursor: default;\n\n &:hover,\n &:active,\n &:focus {\n background-color: ",";\n }\n "],["\n background-color: ",";\n color: ",";\n border: 1px solid ",";\n opacity: 0.2;\n cursor: default;\n\n &:hover,\n &:active,\n &:focus {\n background-color: ",";\n }\n "])),h.default.colors.whiteBase,h.default.colors.secondary,h.default.colors.secondary,h.default.colors.whiteBase)})),j=f.default(d.Link).withConfig({displayName:"LinkContainer",componentId:"sc-1jxtjjw"})(T||(T=r(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n border: none;\n outline: none;\n height: ",";\n line-height: 40px;\n font-size: 14px;\n font-weight: 500;\n padding: 0 10px;\n width: ",";\n cursor: pointer;\n text-decoration: none;\n transition-property: background-color, color, opacity;\n transition-duration: 0.2s;\n \n ","\n \n ","\n \n ","\n \n ","\n"],["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n border: none;\n outline: none;\n height: ",";\n line-height: 40px;\n font-size: 14px;\n font-weight: 500;\n padding: 0 10px;\n width: ",";\n cursor: pointer;\n text-decoration: none;\n transition-property: background-color, color, opacity;\n transition-duration: 0.2s;\n \n ","\n \n ","\n \n ","\n \n ","\n"])),(function(e){return e.height}),(function(e){return e.width}),(function(e){return"primary"===e.type&&f.css(w||(w=r(["\n background-color: ",";\n color: ",";\n\n &:hover,\n &:active,\n &:focus {\n background-color: ",";\n }\n "],["\n background-color: ",";\n color: ",";\n\n &:hover,\n &:active,\n &:focus {\n background-color: ",";\n }\n "])),h.default.colors.secondary,h.default.colors.whiteBase,h.default.colors.primary)}),(function(e){return"secondary"===e.type&&f.css(N||(N=r(["\n background-color: ",";\n color: ",";\n\n &:hover,\n &:active,\n &:focus {\n background-color: ",";\n }\n "],["\n background-color: ",";\n color: ",";\n\n &:hover,\n &:active,\n &:focus {\n background-color: ",";\n }\n "])),h.default.colors.transparentSecondary,h.default.colors.secondary,h.default.colors.transparentSecondary2)}),(function(e){return e.loading&&f.css(S||(S=r(["\n cursor: default;\n "],["\n cursor: default;\n "])))}),(function(e){return e.disabled&&f.css(x||(x=r(["\n background-color: ",";\n color: ",";\n border: 1px solid ",";\n opacity: 0.2;\n cursor: default;\n\n &:hover,\n &:active,\n &:focus {\n background-color: ",";\n }\n "],["\n background-color: ",";\n color: ",";\n border: 1px solid ",";\n opacity: 0.2;\n cursor: default;\n\n &:hover,\n &:active,\n &:focus {\n background-color: ",";\n }\n "])),h.default.colors.whiteBase,h.default.colors.secondary,h.default.colors.secondary,h.default.colors.whiteBase)})),E=f.default.div.withConfig({displayName:"IconWrapper",componentId:"sc-1yn45je"})(D||(D=r(["\n display: inline-flex;\n margin-left: ",";\n margin-right: ",";\n"],["\n display: inline-flex;\n margin-left: ",";\n margin-right: ",";\n"])),(function(e){var t=e.side,n=e.margin;return"right"===t?n:"0"}),(function(e){var t=e.side,n=e.margin;return"left"===t?n:"0"}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(20),i=n(7),o=n(76);class a{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||Object(r.a)(!1,`Body must be a string. Received: ${Object(i.a)(e)}.`),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||Object(r.a)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Object(r.a)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function s(e){return Object(o.a)(e,a)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return c}));var r=n(67),i=n(41),o=n(121),a=n(77),s=n(11);class u{constructor(e){const t=new i.d(s.a.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){this.lastToken=this.token;return this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==s.a.EOF)do{if(e.next)e=e.next;else{const t=y(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===s.a.COMMENT);return e}}function c(e){return e===s.a.BANG||e===s.a.DOLLAR||e===s.a.AMP||e===s.a.PAREN_L||e===s.a.PAREN_R||e===s.a.SPREAD||e===s.a.COLON||e===s.a.EQUALS||e===s.a.AT||e===s.a.BRACKET_L||e===s.a.BRACKET_R||e===s.a.BRACE_L||e===s.a.PIPE||e===s.a.BRACE_R}function l(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function d(e,t){return f(e.charCodeAt(t))&&p(e.charCodeAt(t+1))}function f(e){return e>=55296&&e<=56319}function p(e){return e>=56320&&e<=57343}function h(e,t){const n=e.source.body.codePointAt(t);if(void 0===n)return s.a.EOF;if(n>=32&&n<=126){const e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function g(e,t,n,r,o){const a=e.line,s=1+n-e.lineStart;return new i.d(t,n,r,a,s,o)}function y(e,t){const n=e.source.body,i=n.length;let o=t;for(;o<i;){const t=n.charCodeAt(o);switch(t){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++e.line,e.lineStart=o;continue;case 13:10===n.charCodeAt(o+1)?o+=2:++o,++e.line,e.lineStart=o;continue;case 35:return v(e,o);case 33:return g(e,s.a.BANG,o,o+1);case 36:return g(e,s.a.DOLLAR,o,o+1);case 38:return g(e,s.a.AMP,o,o+1);case 40:return g(e,s.a.PAREN_L,o,o+1);case 41:return g(e,s.a.PAREN_R,o,o+1);case 46:if(46===n.charCodeAt(o+1)&&46===n.charCodeAt(o+2))return g(e,s.a.SPREAD,o,o+3);break;case 58:return g(e,s.a.COLON,o,o+1);case 61:return g(e,s.a.EQUALS,o,o+1);case 64:return g(e,s.a.AT,o,o+1);case 91:return g(e,s.a.BRACKET_L,o,o+1);case 93:return g(e,s.a.BRACKET_R,o,o+1);case 123:return g(e,s.a.BRACE_L,o,o+1);case 124:return g(e,s.a.PIPE,o,o+1);case 125:return g(e,s.a.BRACE_R,o,o+1);case 34:return 34===n.charCodeAt(o+1)&&34===n.charCodeAt(o+2)?T(e,o):M(e,o)}if(Object(a.a)(t)||45===t)return m(e,o,t);if(Object(a.c)(t))return D(e,o);throw Object(r.a)(e.source,o,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":l(t)||d(n,o)?`Unexpected character: ${h(e,o)}.`:`Invalid character: ${h(e,o)}.`)}return g(e,s.a.EOF,i,i)}function v(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const e=n.charCodeAt(i);if(10===e||13===e)break;if(l(e))++i;else{if(!d(n,i))break;i+=2}}return g(e,s.a.COMMENT,t,i,n.slice(t+1,i))}function m(e,t,n){const i=e.source.body;let o=t,u=n,c=!1;if(45===u&&(u=i.charCodeAt(++o)),48===u){if(u=i.charCodeAt(++o),Object(a.a)(u))throw Object(r.a)(e.source,o,`Invalid number, unexpected digit after 0: ${h(e,o)}.`)}else o=b(e,o,u),u=i.charCodeAt(o);if(46===u&&(c=!0,u=i.charCodeAt(++o),o=b(e,o,u),u=i.charCodeAt(o)),69!==u&&101!==u||(c=!0,u=i.charCodeAt(++o),43!==u&&45!==u||(u=i.charCodeAt(++o)),o=b(e,o,u),u=i.charCodeAt(o)),46===u||Object(a.c)(u))throw Object(r.a)(e.source,o,`Invalid number, expected digit but got: ${h(e,o)}.`);return g(e,c?s.a.FLOAT:s.a.INT,t,o,i.slice(t,o))}function b(e,t,n){if(!Object(a.a)(n))throw Object(r.a)(e.source,t,`Invalid number, expected digit but got: ${h(e,t)}.`);const i=e.source.body;let o=t+1;for(;Object(a.a)(i.charCodeAt(o));)++o;return o}function M(e,t){const n=e.source.body,i=n.length;let o=t+1,a=o,u="";for(;o<i;){const i=n.charCodeAt(o);if(34===i)return u+=n.slice(a,o),g(e,s.a.STRING,t,o+1,u);if(92!==i){if(10===i||13===i)break;if(l(i))++o;else{if(!d(n,o))throw Object(r.a)(e.source,o,`Invalid character within String: ${h(e,o)}.`);o+=2}}else{u+=n.slice(a,o);const t=117===n.charCodeAt(o+1)?123===n.charCodeAt(o+2)?I(e,o):w(e,o):x(e,o);u+=t.value,o+=t.size,a=o}}throw Object(r.a)(e.source,o,"Unterminated string.")}function I(e,t){const n=e.source.body;let i=0,o=3;for(;o<12;){const e=n.charCodeAt(t+o++);if(125===e){if(o<5||!l(i))break;return{value:String.fromCodePoint(i),size:o}}if(i=i<<4|S(e),i<0)break}throw Object(r.a)(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+o)}".`)}function w(e,t){const n=e.source.body,i=N(n,t+2);if(l(i))return{value:String.fromCodePoint(i),size:6};if(f(i)&&92===n.charCodeAt(t+6)&&117===n.charCodeAt(t+7)){const e=N(n,t+8);if(p(e))return{value:String.fromCodePoint(i,e),size:12}}throw Object(r.a)(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function N(e,t){return S(e.charCodeAt(t))<<12|S(e.charCodeAt(t+1))<<8|S(e.charCodeAt(t+2))<<4|S(e.charCodeAt(t+3))}function S(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function x(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw Object(r.a)(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function T(e,t){const n=e.source.body,i=n.length;let a=e.lineStart,u=t+3,c=u,f="";const p=[];for(;u<i;){const i=n.charCodeAt(u);if(34===i&&34===n.charCodeAt(u+1)&&34===n.charCodeAt(u+2)){f+=n.slice(c,u),p.push(f);const r=g(e,s.a.BLOCK_STRING,t,u+3,Object(o.a)(p).join("\n"));return e.line+=p.length-1,e.lineStart=a,r}if(92!==i||34!==n.charCodeAt(u+1)||34!==n.charCodeAt(u+2)||34!==n.charCodeAt(u+3))if(10!==i&&13!==i)if(l(i))++u;else{if(!d(n,u))throw Object(r.a)(e.source,u,`Invalid character within String: ${h(e,u)}.`);u+=2}else f+=n.slice(c,u),p.push(f),13===i&&10===n.charCodeAt(u+1)?u+=2:++u,f="",c=u,a=u;else f+=n.slice(c,u),c=u+1,u+=4}throw Object(r.a)(e.source,u,"Unterminated string.")}function D(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const e=n.charCodeAt(i);if(!Object(a.b)(e))break;++i}return g(e,s.a.NAME,t,i,n.slice(t,i))}},function(e,t,n){"use strict";var r=this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return a(t,e),t},u=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=c(n(1)),d=s(n(8)),f=c(n(24));t.default=function(e){var t=e.innerRef,n=e.className,r=e.width,o=void 0===r?"100%":r,a=e.white,s=void 0!==a&&a,c=e.error,d=void 0!==c&&c,f=u(e,["innerRef","className","width","white","error"]);return l.default.createElement(g,i({ref:t,className:n,width:o,white:s,error:d},f))};var p,h,g=d.default.input.withConfig({displayName:"InputStyled",componentId:"sc-p09h7"})(h||(h=r(["\n width: ",";\n height: 40px;\n padding: 0 15px;\n border: 1px solid transparent;\n border-radius: 6px;\n background-color: ",";\n caret-color: ",";\n outline: none;\n transition-property: background-color, border-color;\n transition-duration: ",";\n\n &:focus,\n &:active {\n background-color: ",";\n border: 1px solid ",";\n }\n\n ","\n"],["\n width: ",";\n height: 40px;\n padding: 0 15px;\n border: 1px solid transparent;\n border-radius: 6px;\n background-color: ",";\n caret-color: ",";\n outline: none;\n transition-property: background-color, border-color;\n transition-duration: ",";\n\n &:focus,\n &:active {\n background-color: ",";\n border: 1px solid ",";\n }\n\n ","\n"])),(function(e){return e.width}),(function(e){return e.white?f.default.colors.whiteBase:f.default.colors.grey}),f.default.colors.primary,f.default.transitionDuration,f.default.colors.whiteBase,f.default.colors.secondary,(function(e){return e.error&&d.css(p||(p=r(["\n color: ",";\n background-color: ",";\n "],["\n color: ",";\n background-color: ",";\n "])),f.default.colors.red,f.default.colors.redBackground)}))},function(e,t,n){"use strict";t.a={CLIENT_ID:"310771188277-phs37hhltl8i582akgdtkuqb53a682n4.apps.googleusercontent.com",CLIENT_SECRET:"MDWB_HcvpMv1vH_yjs35z3oe",AUTH_URL:"https://accounts.google.com/o/oauth2/v2/auth",TOKEN_URL:"https://www.googleapis.com/oauth2/v4/token",SCOPE:"https://www.googleapis.com/auth/drive.metadata.readonly"}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.apiRequest=void 0;var i=r(n(108));t.apiRequest=function(e,t,n,r){return i.default("fetch",{method:e,url:t,data:n,params:r})}},function(e,t,n){var r=n(226),i=n(186);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"locateWindow",(function(){return i}));var r={};function i(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:r}},function(e,t,n){var r=n(363),i=n(379),o=n(381),a=n(382),s=n(383);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(98)(n(73),"Map");e.exports=r},function(e,t,n){var r=n(151);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},function(e,t,n){(function(e){var r=n(73),i=n(393),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;e.exports=u}).call(this,n(133)(e))},function(e,t,n){var r=n(394),i=n(395),o=n(396),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(195),i=["James","Robert","John","Michael","William","Mary","Patricia","Jennifer","Linda","Elizabeth"],o=["Smith","Johnson","Williams","Brown","Jones","Garcia","Miller","Davis","Rodriguez","Martinez"],a=["Lorem","Ipsum","Dolor","Sit","Amet","Consectetur","Adipiscing","Elit","Proin","Et","Pulvinar","Velit","Praesent","Fringilla","Massa","Metus","Vitae","Dapibus","Augue","Pulvinar","Eget"],s=["Lorem ipsum dolor sit amet, consectetur adipiscing elit.","Proin et pulvinar velit.","Praesent fringilla massa metus, vitae dapibus augue pulvinar eget.","Nulla tempus felis non dui ultrices, maximus pulvinar nisl ultricies.","Nam viverra cursus turpis, congue ullamcorper felis dapibus vel.","Sed lacus magna, elementum sit amet tempus maximus, tincidunt ac dui.","Aenean in pharetra nibh, et mollis leo.","Vivamus ac metus eu magna fermentum viverra."],u={array:function(e,t,n){for(var r=void 0===n?t:u.number(t,n),i=[],o=0;o<r;o++)i.push("function"==typeof e?e():e);return i},uuid:function(){return r.v4()},number:function(e,t){return Math.floor(Math.random()*(t-e+1))+e},boolean:function(){return Math.random()>=.5},date:function(e,t){var n={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5},r=function(e,t){var r=(new Date).getTime();return"now"===e?r:r+e.value*n[e.measure]*t},i=r(e,-1),o=r(t,1);return new Date(u.number(i,o)).toISOString()},word:function(){return u.arrayItem(a)},sentence:function(e,t){for(var n=u.number(e,t),r=[],i=0;i<n;i++)r.push(u.word());return r.join(" ")},text:function(e,t){for(var n=u.number(e,t),r=[],i=0;i<n;i++)r.push(u.arrayItem(s));return r.join(" ")},firstName:function(){return u.arrayItem(i)},lastName:function(){return u.arrayItem(o)},name:function(){return u.firstName()+" "+u.lastName()},username:function(){return u.firstName().toLowerCase()+"-"+u.number(1e4,99999)},email:function(){return""+u.firstName().toLowerCase()+u.number(100,999)+"@gmail.com"},objectItem:function(e){return u.arrayItem(Object.values(e))},arrayItem:function(e){return e[u.number(0,e.length-1)]},image:function(e,t,n){var r=document.createElement("canvas");r.width=e,r.height=t;var i=r.getContext("2d");if(!i)return"";for(var o=0;o*n<e;o++)for(var a=0;a*n<t;a++)i.fillStyle=u.color(),i.fillRect(o*n,a*n,n,n);return r.toDataURL("image/jpeg",80)},color:function(){return"#"+Math.floor(16777215*Math.random()).toString(16)}};t.default=u},function(e,t,n){"use strict";n.d(t,"a",(function(){return ds})),n.d(t,"b",(function(){return as}));var r=n(51),i=n(221),o=n(115),a=n(119),s=n(72),u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var l=function(){return(l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function d(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Object.create;Object.create;var p,h,g,y,v,m,b,M,I,w,N,S,x,T,D,A,j,E,C,O,k,L,z,P,_,R,U,B,Y,F,Q,G,Z,V,H,W,J,K,q,X,$,ee,te,ne,re,ie,oe,ae,se,ue,ce,le,de,fe,pe,he,ge,ye,ve,me,be,Me,Ie,we,Ne,Se,xe,Te,De,Ae,je,Ee,Ce,Oe,ke,Le,ze,Pe,_e,Re,Ue,Be,Ye,Fe,Qe,Ge,Ze,Ve,He,We,Je,Ke,qe,Xe,$e,et,tt,nt,rt,it,ot,at,st,ut,ct,lt,dt,ft,pt,ht,gt,yt,vt,mt,bt,Mt,It,wt,Nt,St,xt,Tt,Dt,At,jt,Et,Ct,Ot,kt,Lt,zt,Pt,_t,Rt,Ut,Bt,Yt,Ft,Qt,Gt,Zt,Vt,Ht,Wt,Jt,Kt,qt,Xt,$t,en,tn,nn,rn,on,an,sn,un,cn,ln,dn,fn,pn,hn,gn,yn,vn,mn,bn,Mn,In,wn,Nn,Sn,xn,Tn,Dn,An,jn,En,Cn,On,kn,Ln,zn,Pn,_n,Rn,Un,Bn,Yn,Fn,Qn,Gn,Zn,Vn,Hn,Wn,Jn,Kn,qn,Xn,$n,er,tr,nr,rr,ir,or,ar,sr,ur,cr,lr,dr,fr,pr,hr,gr,yr,vr,mr,br,Mr,Ir,wr,Nr,Sr,xr,Tr,Dr,Ar,jr,Er,Cr,Or,kr,Lr,zr,Pr,_r,Rr,Ur,Br,Yr,Fr,Qr,Gr,Zr,Vr,Hr,Wr,Jr=n(0);(p||(p={})).filterSensitiveLog=function(e){return l({},e)},(h||(h={})).filterSensitiveLog=function(e){return l({},e)},(g||(g={})).filterSensitiveLog=function(e){return l({},e)},(y||(y={})).filterSensitiveLog=function(e){return l({},e)},(v||(v={})).filterSensitiveLog=function(e){return l({},e)},(m||(m={})).filterSensitiveLog=function(e){return l({},e)},(b||(b={})).filterSensitiveLog=function(e){return l({},e)},(M||(M={})).filterSensitiveLog=function(e){return l({},e)},(I||(I={})).filterSensitiveLog=function(e){return l({},e)},(w||(w={})).filterSensitiveLog=function(e){return l({},e)},(N||(N={})).filterSensitiveLog=function(e){return l(l({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:Jr.d})},(S||(S={})).filterSensitiveLog=function(e){return l({},e)},(x||(x={})).filterSensitiveLog=function(e){return l({},e)},(T||(T={})).filterSensitiveLog=function(e){return l({},e)},(D||(D={})).filterSensitiveLog=function(e){return l({},e)},(A||(A={})).filterSensitiveLog=function(e){return l(l(l({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:Jr.d}),e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Jr.d})},(j||(j={})).filterSensitiveLog=function(e){return l(l(l(l(l({},e),e.SSECustomerKey&&{SSECustomerKey:Jr.d}),e.SSEKMSKeyId&&{SSEKMSKeyId:Jr.d}),e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Jr.d}),e.CopySourceSSECustomerKey&&{CopySourceSSECustomerKey:Jr.d})},(E||(E={})).filterSensitiveLog=function(e){return l({},e)},(C||(C={})).filterSensitiveLog=function(e){return l({},e)},(O||(O={})).filterSensitiveLog=function(e){return l({},e)},(k||(k={})).filterSensitiveLog=function(e){return l({},e)},(L||(L={})).filterSensitiveLog=function(e){return l({},e)},(z||(z={})).filterSensitiveLog=function(e){return l({},e)},(P||(P={})).filterSensitiveLog=function(e){return l(l(l({},e),e.SSEKMSKeyId&&{SSEKMSKeyId:Jr.d}),e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Jr.d})},(_||(_={})).filterSensitiveLog=function(e){return l(l(l(l({},e),e.SSECustomerKey&&{SSECustomerKey:Jr.d}),e.SSEKMSKeyId&&{SSEKMSKeyId:Jr.d}),e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Jr.d})},(R||(R={})).filterSensitiveLog=function(e){return l({},e)},(U||(U={})).filterSensitiveLog=function(e){return l({},e)},(B||(B={})).filterSensitiveLog=function(e){return l({},e)},(Y||(Y={})).filterSensitiveLog=function(e){return l({},e)},(F||(F={})).filterSensitiveLog=function(e){return l({},e)},(Q||(Q={})).filterSensitiveLog=function(e){return l({},e)},(G||(G={})).filterSensitiveLog=function(e){return l({},e)},(Z||(Z={})).filterSensitiveLog=function(e){return l({},e)},(V||(V={})).filterSensitiveLog=function(e){return l({},e)},(H||(H={})).filterSensitiveLog=function(e){return l({},e)},(W||(W={})).filterSensitiveLog=function(e){return l({},e)},(J||(J={})).filterSensitiveLog=function(e){return l({},e)},(K||(K={})).filterSensitiveLog=function(e){return l({},e)},(q||(q={})).filterSensitiveLog=function(e){return l({},e)},(X||(X={})).filterSensitiveLog=function(e){return l({},e)},($||($={})).filterSensitiveLog=function(e){return l({},e)},(ee||(ee={})).filterSensitiveLog=function(e){return l({},e)},(te||(te={})).filterSensitiveLog=function(e){return l({},e)},(ne||(ne={})).filterSensitiveLog=function(e){return l({},e)},(re||(re={})).filterSensitiveLog=function(e){return l({},e)},(ie||(ie={})).filterSensitiveLog=function(e){return l({},e)},(oe||(oe={})).filterSensitiveLog=function(e){return l({},e)},(ae||(ae={})).filterSensitiveLog=function(e){return l({},e)},(se||(se={})).filterSensitiveLog=function(e){return l({},e)},(ue||(ue={})).filterSensitiveLog=function(e){return l({},e)},(ce||(ce={})).filterSensitiveLog=function(e){return l({},e)},(le||(le={})).filterSensitiveLog=function(e){return l({},e)},(de||(de={})).filterSensitiveLog=function(e){return l({},e)},(fe||(fe={})).filterSensitiveLog=function(e){return l({},e)},(pe||(pe={})).filterSensitiveLog=function(e){return l({},e)},function(e){e.visit=function(e,t){return void 0!==e.Prefix?t.Prefix(e.Prefix):void 0!==e.Tag?t.Tag(e.Tag):void 0!==e.And?t.And(e.And):t._(e.$unknown[0],e.$unknown[1])},e.filterSensitiveLog=function(e){var t;return void 0!==e.Prefix?{Prefix:e.Prefix}:void 0!==e.Tag?{Tag:fe.filterSensitiveLog(e.Tag)}:void 0!==e.And?{And:pe.filterSensitiveLog(e.And)}:void 0!==e.$unknown?((t={})[e.$unknown[0]]="UNKNOWN",t):void 0}}(he||(he={})),(ge||(ge={})).filterSensitiveLog=function(e){return l({},e)},(ye||(ye={})).filterSensitiveLog=function(e){return l({},e)},(ve||(ve={})).filterSensitiveLog=function(e){return l({},e)},(me||(me={})).filterSensitiveLog=function(e){return l({},e)},(be||(be={})).filterSensitiveLog=function(e){return l(l({},e),e.Filter&&{Filter:he.filterSensitiveLog(e.Filter)})},(Me||(Me={})).filterSensitiveLog=function(e){return l(l({},e),e.AnalyticsConfiguration&&{AnalyticsConfiguration:be.filterSensitiveLog(e.AnalyticsConfiguration)})},(Ie||(Ie={})).filterSensitiveLog=function(e){return l({},e)},(we||(we={})).filterSensitiveLog=function(e){return l({},e)},(Ne||(Ne={})).filterSensitiveLog=function(e){return l({},e)},(Se||(Se={})).filterSensitiveLog=function(e){return l({},e)},(xe||(xe={})).filterSensitiveLog=function(e){return l(l({},e),e.KMSMasterKeyID&&{KMSMasterKeyID:Jr.d})},(Te||(Te={})).filterSensitiveLog=function(e){return l(l({},e),e.ApplyServerSideEncryptionByDefault&&{ApplyServerSideEncryptionByDefault:xe.filterSensitiveLog(e.ApplyServerSideEncryptionByDefault)})},(De||(De={})).filterSensitiveLog=function(e){return l(l({},e),e.Rules&&{Rules:e.Rules.map((function(e){return Te.filterSensitiveLog(e)}))})},(Ae||(Ae={})).filterSensitiveLog=function(e){return l(l({},e),e.ServerSideEncryptionConfiguration&&{ServerSideEncryptionConfiguration:De.filterSensitiveLog(e.ServerSideEncryptionConfiguration)})},(je||(je={})).filterSensitiveLog=function(e){return l({},e)},(Ee||(Ee={})).filterSensitiveLog=function(e){return l({},e)},(Ce||(Ce={})).filterSensitiveLog=function(e){return l({},e)},(Oe||(Oe={})).filterSensitiveLog=function(e){return l({},e)},(ke||(ke={})).filterSensitiveLog=function(e){return l({},e)},(Le||(Le={})).filterSensitiveLog=function(e){return l({},e)},(ze||(ze={})).filterSensitiveLog=function(e){return l({},e)},(Pe||(Pe={})).filterSensitiveLog=function(e){return l(l({},e),e.KeyId&&{KeyId:Jr.d})},(_e||(_e={})).filterSensitiveLog=function(e){return l({},e)},(Re||(Re={})).filterSensitiveLog=function(e){return l(l({},e),e.SSEKMS&&{SSEKMS:Pe.filterSensitiveLog(e.SSEKMS)})},(Ue||(Ue={})).filterSensitiveLog=function(e){return l(l({},e),e.Encryption&&{Encryption:Re.filterSensitiveLog(e.Encryption)})},(Be||(Be={})).filterSensitiveLog=function(e){return l(l({},e),e.S3BucketDestination&&{S3BucketDestination:Ue.filterSensitiveLog(e.S3BucketDestination)})},(Ye||(Ye={})).filterSensitiveLog=function(e){return l({},e)},(Fe||(Fe={})).filterSensitiveLog=function(e){return l({},e)},(Qe||(Qe={})).filterSensitiveLog=function(e){return l(l({},e),e.Destination&&{Destination:Be.filterSensitiveLog(e.Destination)})},(Ge||(Ge={})).filterSensitiveLog=function(e){return l(l({},e),e.InventoryConfiguration&&{InventoryConfiguration:Qe.filterSensitiveLog(e.InventoryConfiguration)})},(Ze||(Ze={})).filterSensitiveLog=function(e){return l({},e)},(Ve||(Ve={})).filterSensitiveLog=function(e){return l({},e)},(He||(He={})).filterSensitiveLog=function(e){return l({},e)},function(e){e.visit=function(e,t){return void 0!==e.Prefix?t.Prefix(e.Prefix):void 0!==e.Tag?t.Tag(e.Tag):void 0!==e.And?t.And(e.And):t._(e.$unknown[0],e.$unknown[1])},e.filterSensitiveLog=function(e){var t;return void 0!==e.Prefix?{Prefix:e.Prefix}:void 0!==e.Tag?{Tag:fe.filterSensitiveLog(e.Tag)}:void 0!==e.And?{And:He.filterSensitiveLog(e.And)}:void 0!==e.$unknown?((t={})[e.$unknown[0]]="UNKNOWN",t):void 0}}(We||(We={})),(Je||(Je={})).filterSensitiveLog=function(e){return l({},e)},(Ke||(Ke={})).filterSensitiveLog=function(e){return l({},e)},(qe||(qe={})).filterSensitiveLog=function(e){return l({},e)},(Xe||(Xe={})).filterSensitiveLog=f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment