hexsha string | size int64 | ext string | lang string | max_stars_repo_path string | max_stars_repo_name string | max_stars_repo_head_hexsha string | max_stars_repo_licenses list | max_stars_count int64 | max_stars_repo_stars_event_min_datetime string | max_stars_repo_stars_event_max_datetime string | max_issues_repo_path string | max_issues_repo_name string | max_issues_repo_head_hexsha string | max_issues_repo_licenses list | max_issues_count int64 | max_issues_repo_issues_event_min_datetime string | max_issues_repo_issues_event_max_datetime string | max_forks_repo_path string | max_forks_repo_name string | max_forks_repo_head_hexsha string | max_forks_repo_licenses list | max_forks_count int64 | max_forks_repo_forks_event_min_datetime string | max_forks_repo_forks_event_max_datetime string | content string | avg_line_length float64 | max_line_length int64 | alphanum_fraction float64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
de08fccab6ed61c233d4e63dcfcbb5cf98dab4d9 | 22,120 | js | JavaScript | Source/dom/models/Document.js | lucastobrazil/SketchAPI | e47828e8d760276b68161a04fe02ac175d94e6ce | [
"MIT"
] | 1 | 2020-04-05T10:27:07.000Z | 2020-04-05T10:27:07.000Z | Source/dom/models/Document.js | doc22940/SketchAPI | e47828e8d760276b68161a04fe02ac175d94e6ce | [
"MIT"
] | null | null | null | Source/dom/models/Document.js | doc22940/SketchAPI | e47828e8d760276b68161a04fe02ac175d94e6ce | [
"MIT"
] | null | null | null | import { toArray, isNativeObject } from 'util'
import { WrappedObject, DefinedPropertiesKey } from '../WrappedObject'
// eslint-disable-next-line import/no-cycle
import { Page } from '../layers/Page'
import { Selection } from './Selection'
import { getURLFromPath, isWrappedObject } from '../utils'
import { wrapObject } from '../wrapNativeObject'
import { Types } from '../enums'
import { Factory } from '../Factory'
import { StyleType } from '../style/Style'
import { ColorAsset, GradientAsset } from '../assets'
import { SharedStyle } from './SharedStyle'
export const SaveModeType = {
Save: NSSaveOperation,
SaveTo: NSSaveToOperation,
SaveAs: NSSaveAsOperation,
}
export const ColorSpaceMap = {
Unmanaged: 0,
sRGB: 1,
P3: 2,
}
export const ColorSpace = {
Unmanaged: 'Unmanaged',
sRGB: 'sRGB',
P3: 'P3',
}
/* eslint-disable no-use-before-define, typescript/no-use-before-define */
export function getDocuments() {
return toArray(NSApp.orderedDocuments())
.filter(doc => doc.isKindOfClass(MSDocument))
.map(Document.fromNative.bind(Document))
}
export function getSelectedDocument() {
let nativeDocument
if (!nativeDocument) {
const app = NSDocumentController.sharedDocumentController()
nativeDocument = app.currentDocument()
}
// skpm will define context as a global so let's use that if available
if (!nativeDocument && typeof context !== 'undefined') {
/* eslint-disable no-undef */
nativeDocument =
context.actionContext && context.actionContext.document
? context.actionContext.document
: context.document
/* eslint-enable no-undef */
}
// if there is no current document, let's just try to pick the first one
if (!nativeDocument) {
const documents = toArray(
NSApplication.sharedApplication().orderedDocuments()
).filter(d => d.isKindOfClass(MSDocument.class()))
// eslint-disable-next-line prefer-destructuring
nativeDocument = documents[0]
}
if (!nativeDocument) {
return undefined
}
return Document.fromNative(nativeDocument)
}
/* eslint-enable */
/**
* A Sketch document.
*/
export class Document extends WrappedObject {
/**
* Make a new document object.
*
* @param [Object] properties - The properties to set on the object as a JSON object.
* If `sketchObject` is provided, will wrap it.
* Otherwise, creates a new native object.
*/
constructor(document = {}) {
if (!document.sketchObject) {
const app = NSDocumentController.sharedDocumentController()
const error = MOPointer.alloc().init()
// eslint-disable-next-line no-param-reassign
document.sketchObject = app.openUntitledDocumentAndDisplay_error(
true,
error
)
if (error.value() !== null) {
throw new Error(error.value())
}
if (!document.sketchObject) {
throw new Error('could not create a new Document')
}
}
super(document)
}
_getMSDocument() {
let msdocument = this._object
if (msdocument && msdocument.isKindOfClass(MSDocumentData)) {
// we only have an MSDocumentData instead of a MSDocument
// let's try to get back to the MSDocument
msdocument = msdocument.delegate()
}
return msdocument
}
_getMSDocumentData() {
const msdocument = this._object
if (
msdocument &&
(msdocument.isKindOfClass(MSDocumentData) ||
msdocument.isKindOfClass(MSImmutableDocumentData))
) {
return msdocument
}
return msdocument.documentData()
}
static getDocuments() {
return getDocuments()
}
static getSelectedDocument() {
return getSelectedDocument()
}
/**
* Find the first layer in this document which has the given id.
*
* @return {Layer} A layer object, if one was found.
*/
getLayerWithID(layerId) {
const documentData = this._getMSDocumentData()
const layer = documentData.layerWithID(layerId)
if (layer) {
return wrapObject(layer)
}
return undefined
}
/**
* Find all the layers in this document which has the given name.
*/
getLayersNamed(layerName) {
// search all pages
let filteredArray = NSArray.array()
const loopPages = this._object.pages().objectEnumerator()
let page = loopPages.nextObject()
const predicate = NSPredicate.predicateWithFormat('name == %@', layerName)
while (page) {
const scope = page.children()
filteredArray = filteredArray.arrayByAddingObjectsFromArray(
scope.filteredArrayUsingPredicate(predicate)
)
page = loopPages.nextObject()
}
return toArray(filteredArray).map(wrapObject)
}
/**
* Find the first symbol master in this document which has the given id.
*
* @return {SymbolMaster} A symbol master object, if one was found.
*/
getSymbolMasterWithID(symbolId) {
const documentData = this._getMSDocumentData()
const symbol = documentData.symbolWithID(symbolId)
if (symbol) {
return wrapObject(symbol)
}
return undefined
}
getSymbols() {
const documentData = this._getMSDocumentData()
return toArray(documentData.allSymbols()).map(wrapObject)
}
_getSharedStyleWithIdAndType(sharedId, type) {
const documentData = this._getMSDocumentData()
const sharedStyle = documentData[
type === StyleType.Layer ? 'layerStyleWithID' : 'textStyleWithID'
](sharedId)
if (sharedStyle) {
return wrapObject(sharedStyle)
}
return undefined
}
getSharedLayerStyleWithID(sharedId) {
return this._getSharedStyleWithIdAndType(sharedId, StyleType.Layer)
}
getSharedLayerStyles() {
console.warn(
`\`document.getSharedLayerStyles()\` is deprecated. Use \`document.sharedLayerStyles\` instead.`
)
const documentData = this._getMSDocumentData()
return toArray(documentData.allLayerStyles()).map(wrapObject)
}
getSharedTextStyleWithID(sharedId) {
return this._getSharedStyleWithIdAndType(sharedId, StyleType.Text)
}
getSharedTextStyles() {
console.warn(
`\`document.getSharedTextStyles()\` is deprecated. Use \`document.sharedTextStyles\` instead.`
)
const documentData = this._getMSDocumentData()
return toArray(documentData.allTextStyles()).map(wrapObject)
}
/**
* Center the view of the document window on a given layer.
*
* @param {Layer} layer The layer to center on.
*/
centerOnLayer(layer) {
if (this.isImmutable()) {
return
}
const wrappedLayer = wrapObject(layer)
this._object
.contentDrawView()
.centerRect_(wrappedLayer.sketchObject.absoluteRect().rect())
}
static open(path, callback) {
if (typeof path === 'function') {
/* eslint-disable no-param-reassign */
callback = path
path = undefined
/* eslint-enable */
}
const app = NSDocumentController.sharedDocumentController()
if (!path) {
const dialog = NSOpenPanel.openPanel()
dialog.allowedFileTypes = ['sketch']
dialog.canChooseFiles = true
dialog.canChooseDirectories = false
dialog.allowsMultipleSelection = false
const buttonClicked = dialog.runModal()
if (buttonClicked != NSOKButton) {
if (callback) callback(null, undefined)
return undefined
}
const url = dialog.URLs()[0]
const fiber = coscript.createFiber()
app.openDocumentWithContentsOfURL_display_context_callback(
url,
true,
coscript,
(_document, documentWasAlreadyOpen, err) => {
try {
if (callback) {
if (err && !err.isEqual(NSNull.null())) {
callback(new Error(err.description()))
} else {
callback(null, Document.fromNative(_document))
}
}
fiber.cleanup()
} catch (error) {
fiber.cleanup()
throw error
}
}
)
// return the current document to maintain backward compatibility
// but that's not the right document...
const document = app.currentDocument()
return Document.fromNative(document)
}
let document
const url = getURLFromPath(path)
if (app.documentForURL(url)) {
document = Document.fromNative(app.documentForURL(url))
if (callback) callback(null, document)
return document
}
const error = MOPointer.alloc().init()
document = app.openDocumentWithContentsOfURL_display_error(url, true, error)
if (error.value() !== null) {
throw new Error(error.value())
}
document = Document.fromNative(document)
if (callback) callback(null, document)
return document
}
save(path, options, callback) {
/* eslint-disable no-param-reassign */
if (typeof options === 'function') {
callback = options
options = {}
} else if (typeof path === 'function') {
callback = path
options = {}
path = undefined
}
/* eslint-enable */
const msdocument = this._getMSDocument()
const saveMethod = 'saveToURL_ofType_forSaveOperation_completionHandler'
if (!msdocument || !msdocument[saveMethod]) {
if (callback) callback(new Error('Cannot save this document'), this)
return
}
if (!path && !this._tempURL) {
try {
msdocument.saveDocument(null)
if (callback) callback(null, this)
} catch (err) {
if (callback) callback(err, this)
}
return
}
const url = getURLFromPath(path) || this._tempURL
const { saveMode, iKnowThatImOverwritingAFolder } = options || {}
if (
(!url.pathExtension() || !String(url.pathExtension())) &&
!iKnowThatImOverwritingAFolder
) {
throw new Error(
'Attempting to overwrite a folder! If you really mean to do that, set the `iKnowThatImOverwritingAFolder` option to `true`'
)
}
const fiber = coscript.createFiber()
const nativeSaveMode =
SaveModeType[saveMode] || saveMode || NSSaveAsOperation
const that = this
msdocument.saveDocumentToURL_saveMode_context_callback(
url,
nativeSaveMode,
coscript,
err => {
try {
if (callback) {
if (err && !err.isEqual(NSNull.null())) {
callback(new Error(err.description()), that)
} else {
callback(null, that)
}
}
fiber.cleanup()
} catch (error) {
fiber.cleanup()
throw error
}
}
)
}
close() {
const msdocument = this._getMSDocument()
if (!msdocument || !msdocument.close) {
throw new Error('Cannot close this document')
}
msdocument.close()
}
changeColorSpace(colorSpace, convert = false) {
if (this.isImmutable()) {
return
}
const targetColorSpace = ColorSpaceMap[colorSpace]
const currColorSpace = this._getMSDocumentData().colorSpace()
if (typeof targetColorSpace === 'undefined') {
throw new Error(`Invalid colorSpace ${colorSpace}`)
}
// If the current colorSpace is unmanaged then we always assign
if (!convert || currColorSpace === ColorSpaceMap.Unmanaged) {
this._getMSDocumentData().assignColorSpace(targetColorSpace)
} else {
this._getMSDocumentData().convertToColorSpace(targetColorSpace)
}
}
}
Document.type = Types.Document
Document[DefinedPropertiesKey] = {
...WrappedObject[DefinedPropertiesKey],
}
Factory.registerClass(Document, MSDocumentData)
Factory.registerClass(Document, MSImmutableDocumentData)
// also register MSDocument if it exists
if (typeof MSDocument !== 'undefined') {
Factory.registerClass(Document, MSDocument)
}
Document.SaveMode = SaveModeType
Document.ColorSpace = ColorSpace
// override getting the id to make sure it's fine if we have an MSDocument
Document.define('id', {
exportable: true,
importable: false,
get() {
if (!this._object) {
return undefined
}
if (!this._object.objectID) {
return String(this._object.documentData().objectID())
}
return String(this._object.objectID())
},
})
Document.define('colorSpace', {
importable: true,
exportable: true,
get() {
if (!this._object) {
return undefined
}
const colorSpace = this._getMSDocumentData().colorSpace()
return (
Object.keys(ColorSpaceMap).find(
key => ColorSpaceMap[key] === colorSpace
) || colorSpace
)
},
set(colorSpace) {
if (this.isImmutable()) {
return
}
const targetColorSpace = ColorSpaceMap[colorSpace]
if (typeof targetColorSpace === 'undefined') {
throw new Error(`Invalid colorSpace ${colorSpace}`)
}
this._getMSDocumentData().assignColorSpace(targetColorSpace)
},
})
Document.define('pages', {
array: true,
get() {
if (!this._object) {
return []
}
const pages = toArray(this._object.pages())
return pages.map(page => Page.fromNative(page))
},
set(pages) {
if (this.isImmutable()) {
return
}
const pagesToRemove = this.pages.reduce((prev, p) => {
prev[p.id] = p.sketchObject // eslint-disable-line
return prev
}, {})
toArray(pages)
.map(p => wrapObject(p, Types.Page))
.forEach(page => {
page.parent = this // eslint-disable-line
delete pagesToRemove[page.id]
})
// remove the previous pages
this._getMSDocumentData().removePages_detachInstances(
Object.keys(pagesToRemove).map(id => pagesToRemove[id]),
true
)
},
insertItem(item, index) {
if (this.isImmutable()) {
return undefined
}
const wrapped = wrapObject(item, Types.Page)
if (wrapped._object.documentData()) {
wrapped._object
.documentData()
.removePages_detachInstances([wrapped._object], false)
}
this._getMSDocumentData().insertPage_atIndex(wrapped._object, index)
return wrapped
},
removeItem(index) {
if (this.isImmutable()) {
return undefined
}
const removed = this._object.pages()[index]
this._getMSDocumentData().removePages_detachInstances([removed], true)
return Page.fromNative(removed)
},
})
/**
* The layers that the user has selected in the currently selected page.
*
* @return {Selection} A selection object representing the layers that the user has selected in the currently selected page.
*/
Document.define('selectedLayers', {
enumerable: false,
exportable: false,
importable: false,
get() {
return new Selection(this.selectedPage)
},
set(layers) {
this.selectedPage.sketchObject.changeSelectionBySelectingLayers(
(layers.layers || layers || []).map(l => wrapObject(l).sketchObject)
)
},
})
/**
* The current page that the user has selected.
*
* @return {Page} A page object representing the page that the user is currently viewing.
*/
Document.define('selectedPage', {
enumerable: false,
exportable: false,
importable: false,
get() {
return Page.fromNative(this._object.currentPage())
},
set(page) {
const wrapped = wrapObject(page, Types.Page)
if (
wrapped._object.documentData() &&
String(wrapped._object.documentData().objectID()) !== this.id
) {
wrapped._object
.documentData()
.removePages_detachInstances([wrapped._object], false)
wrapped.parent = this
}
wrapped.selected = true
},
})
Document.define('path', {
get() {
let url = this._tempURL
if (!url) {
const msDocument = this._getMSDocument()
if (msDocument && msDocument.fileURL) {
url = msDocument.fileURL()
}
}
if (url) {
return String(url.absoluteString()).replace('file://', '')
}
return undefined
},
set(path) {
if (this.isImmutable()) {
return
}
const url = getURLFromPath(path)
Object.defineProperty(this, '_tempURL', {
enumerable: false,
value: url,
})
},
})
/**
* A list of document colors
*
* @return {Array<ColorAsset>} A mutable array of color assets defined in the document
*/
Document.define('colors', {
array: true,
get() {
if (!this._object) {
return []
}
const documentData = this._getMSDocumentData()
return toArray(documentData.assets().colorAssets()).map(a =>
ColorAsset.fromNative(a)
)
},
set(colors) {
if (this.isImmutable()) {
return
}
const assets = this._getMSDocumentData().assets()
assets.removeAllColorAssets()
toArray(colors)
.map(c => ColorAsset.from(c))
.forEach(c => {
assets.addColorAsset(c._object)
})
},
insertItem(color, index) {
if (this.isImmutable()) {
return undefined
}
const assets = this._getMSDocumentData().assets()
const wrapped = ColorAsset.from(color)
assets.insertColorAsset_atIndex(wrapped._object, index)
return wrapped
},
removeItem(index) {
if (this.isImmutable()) {
return undefined
}
const documentData = this._getMSDocumentData()
return documentData.assets().removeColorAssetAtIndex(index)
},
})
/**
* A list of document gradients
*
* @return {Array<GradientAsset>} A mutable array of gradient assets defined in the document
*/
Document.define('gradients', {
array: true,
get() {
if (!this._object) {
return []
}
const documentData = this._getMSDocumentData()
return toArray(documentData.assets().gradientAssets()).map(a =>
GradientAsset.fromNative(a)
)
},
set(gradients) {
if (this.isImmutable()) {
return
}
const assets = this._getMSDocumentData().assets()
assets.removeAllGradientAssets()
toArray(gradients)
.map(c => GradientAsset.from(c))
.forEach(c => {
assets.addGradientAsset(c._object)
})
},
insertItem(gradient, index) {
if (this.isImmutable()) {
return undefined
}
const assets = this._getMSDocumentData().assets()
const wrapped = GradientAsset.from(gradient)
assets.insertGradientAsset_atIndex(wrapped._object, index)
return wrapped
},
removeItem(index) {
if (this.isImmutable()) {
return undefined
}
const documentData = this._getMSDocumentData()
return documentData.assets().removeGradientAssetAtIndex(index)
},
})
function isLocalSharedStyle(libraryController) {
return item => {
if (isWrappedObject(item)) {
return (
!libraryController.libraryForShareableObject(item.sketchObject) &&
!item.sketchObject.foreignObject()
)
}
if (isNativeObject(item)) {
return (
!!libraryController.libraryForShareableObject(item) &&
!!item.foreignObject()
)
}
return true
}
}
function sharedStyleDescriptor(type) {
const config = {
localStyles: type === 'layer' ? 'layerStyles' : 'layerTextStyles',
foreignStyles:
type === 'layer' ? 'foreignLayerStyles' : 'foreignTextStyles',
type: type === 'layer' ? 1 : 2,
}
return {
array: true,
get() {
if (!this._object) {
return []
}
const documentData = this._getMSDocumentData()
const localStyles = toArray(documentData[config.localStyles]().objects())
const foreignStyles = toArray(documentData[config.foreignStyles]()).map(
foreign => foreign.localSharedStyle()
)
return foreignStyles.concat(localStyles).map(wrapObject)
},
set(sharedLayerStyles) {
if (this.isImmutable()) {
return
}
const documentData = this._getMSDocumentData()
const container = documentData.sharedObjectContainerOfType(config.type)
// remove the existing shared styles
container.removeAllSharedObjects()
const libraryController = AppController.sharedInstance().librariesController()
container.addSharedObjects(
toArray(sharedLayerStyles)
.filter(isLocalSharedStyle(libraryController))
.map(item => {
let sharedStyle
if (isWrappedObject(item)) {
sharedStyle = item.sketchObject
} else if (isNativeObject(item)) {
sharedStyle = item
} else {
const wrappedStyle = wrapObject(item.style, Types.Style)
sharedStyle = MSSharedStyle.alloc().initWithName_style(
item.name,
wrappedStyle.sketchObject
)
}
return sharedStyle
})
)
},
insertItem(item, index) {
if (this.isImmutable()) {
return undefined
}
const documentData = this._getMSDocumentData()
const realIndex = Math.max(
index - documentData[config.foreignStyles]().length,
0
)
let sharedStyle
if (isWrappedObject(item)) {
sharedStyle = item.sketchObject
} else if (isNativeObject(item)) {
sharedStyle = item
} else {
const wrappedStyle = wrapObject(item.style, Types.Style)
sharedStyle = MSSharedStyle.alloc().initWithName_style(
item.name,
wrappedStyle.sketchObject
)
}
const container = documentData.sharedObjectContainerOfType(config.type)
container.insertSharedObject_atIndex(sharedStyle, realIndex)
return new SharedStyle({ sketchObject: sharedStyle })
},
removeItem(index) {
if (this.isImmutable()) {
return undefined
}
const documentData = this._getMSDocumentData()
const realIndex = index - documentData[config.foreignStyles]().length
if (realIndex < 0) {
console.log('Cannot remove a foreign shared style')
return undefined
}
const container = documentData.sharedObjectContainerOfType(config.type)
const removed = container.objects()[realIndex]
container.removeSharedObjectAtIndex(realIndex)
return wrapObject(removed, Types.SharedStyle)
},
}
}
Document.define('sharedLayerStyles', sharedStyleDescriptor('layer'))
Document.define('sharedTextStyles', sharedStyleDescriptor('text'))
| 26.942753 | 131 | 0.642993 |
de0932a77e758b4ace68d1da39db82a13e0f60e3 | 6,829 | js | JavaScript | src/model/DiscordAPIRequest.js | simonrenger/gauthbot | 86d4a2e6ebbdf1eaeadf02d34a0a843da0fa43ea | [
"Apache-2.0"
] | null | null | null | src/model/DiscordAPIRequest.js | simonrenger/gauthbot | 86d4a2e6ebbdf1eaeadf02d34a0a843da0fa43ea | [
"Apache-2.0"
] | 3 | 2019-09-07T16:52:16.000Z | 2019-09-10T10:12:17.000Z | src/model/DiscordAPIRequest.js | simonrenger/gauthbot | 86d4a2e6ebbdf1eaeadf02d34a0a843da0fa43ea | [
"Apache-2.0"
] | null | null | null | /*
* Copyright (C) 2019 Simon Renger
*
* 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.
*/
//external packages:
const request = require("request");
const Discord = require("discord.js");
//internal packages:
const Logger = require("./Logger");
const DatabaseWriter = require("./DatabaseWriter");
const settings = require("./Settings").discord;
const messages = require("./Messages").discord;
/**
* API Headers in order to get the Auth0 Token: (For USER operations)
* @see https://discordapp.com/developers/docs/topics/oauth2
*/
var headers = {
"Content-Type": "application/x-www-form-urlencoded"
};
var options = {
url: "https://discordapp.com/api/oauth2/token",
method: "POST",
headers: headers,
form: settings.api
};
/**
* @param {*} code API Code
* @param {*} res HTTP response
* @param {*} IdData IdData
* @param {*} successCallback<userData,token> on success callback
*/
module.exports.DiscordAPIRequest = function (
code,
res,
IdData,
successCallback
) {
options.form.code = code;
if (code) {
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
var content = JSON.parse(body);
//user request:
var headers = {
"Content-Type": "application/x-www-form-urlencoded",
Authorization: "Bearer " + content.access_token
};
var options = {
url: "https://discordapp.com/api/users/@me",
method: "GET",
headers: headers
};
//request token:
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
const userData = JSON.parse(body);
Logger.info(body);
successCallback(userData, content.access_token);
} else {
var html = IdData.html;
html = html.replace("[protocol]", "");
html = html.replace(
"[error]",
IdData.alerts.danger(messages.auth_went_wrong)
);
Logger.error(
"[Discord REST-API] http request status:" + response.statusCode
);
Logger.error(body);
res.end(html);
}
});
} else {
var html = IdData.html;
html = html.replace("[protocol]", "");
html = html.replace(
"[error]",
IdData.alerts.danger(messages.auth_code_expired)
);
Logger.error(
"[Discord REST-API] http request status:" + response.statusCode
);
Logger.error(body);
res.end(html);
}
});
} else {
var html = IdData.html;
html = html.replace("[protocol]", "");
html = html.replace(
"[error]",
IdData.alerts.danger(messages.session_expired)
);
Logger.error("[Discord REST-API] code is expired");
Logger.error(code);
res.end(html);
}
};
/**
* checks if a user is on the server by quiering the server API through Discord.js.client
* On success it calls the callback with true as argument otherweise false
* @see Client
*/
module.exports.IsUserOnServer = function (userId, callback) {
if (userId !== null && userId !== undefined) {
const client = new Discord.Client();
client.on("error", Logger.error);
client.login(settings.bot_token).then(() => {
var guild = client.guilds.get(settings.guild_id);
var member = guild.members.find(m => m.user.id === userId);
if (member == null) {
callback(false);
} else {
callback(true);
}
});
} else {
callback(true);
}
};
/**
* Adds the Usere to the Server via the discord client.
* @see Client
*/
module.exports.AddUserToServer = function (token, userData, res, IdData) {
const client = new Discord.Client();
client.on("error", Logger.error);
client.login(settings.bot_token).then(() => {
var guild = client.guilds.get(settings.guild_id);
DatabaseWriter.DB.addStudent(userData, status => {
if (status) {
DatabaseWriter.DB.updateStudent(userData, status => {
if (status) {
guild
.addMember(new Discord.User(client, { id: userData.discord }), {
accessToken: token
})
.then((guildMember) => {
Logger.info(
"[DiscordAPI] added User was succesful " +
JSON.stringify(userData)
);
var html = IdData.html;
html = html.replace("[protocol]", "");
html = html.replace(
"[error]",
IdData.alerts.success(messages.user_added_to_server)
);
res.end(html);
client.destroy();
})
.catch(e => {
DatabaseWriter.DB.delete(userData.discord, () => { }); // delete if something goes wrong!
Logger.warn(
"[DiscordAPI] API Error: " +
JSON.stringify(e) +
" user:" +
JSON.stringify(userData)
);
Logger.info(messages.wrong_api_code + e.code);
var html = IdData.html;
html = html.replace("[protocol]", "");
html = html.replace(
"[error]",
IdData.alerts.warning(messages.wrong_api_code + " " + e.code + "")
);
res.end(html);
client.destroy();
});
} else {
Logger.warn(
"[DiscordAPI] could not add User status:false updateStudent"
);
var html = IdData.html;
html = html.replace("[protocol]", "");
html = html.replace(
"[error]",
IdData.alerts.danger(messages.could_not_find_user)
);
res.end(html);
client.destroy();
}
});
} else {
Logger.warn("[DiscordAPI] could not add User addStudent: status:false");
var html = IdData.html;
html = html.replace("[protocol]", "");
html = html.replace(
"[error]",
IdData.alerts.danger(messages.could_not_find_user)
);
res.end(html);
client.destroy();
}
});
});
};
| 32.061033 | 105 | 0.552057 |
de097dd49f5dbf48fd6a31fe062aee8f22b50ace | 6,223 | js | JavaScript | cli.js | MickeJohannesson/C4-Builder | d317e1c4d6b631ddb7dea53c841d67d544d40986 | [
"MIT"
] | null | null | null | cli.js | MickeJohannesson/C4-Builder | d317e1c4d6b631ddb7dea53c841d67d544d40986 | [
"MIT"
] | null | null | null | cli.js | MickeJohannesson/C4-Builder | d317e1c4d6b631ddb7dea53c841d67d544d40986 | [
"MIT"
] | null | null | null | const figlet = require('figlet');
const program = require('commander');
const package = require('./package.json');
const chalk = require('chalk');
const path = require('path');
const Configstore = require('configstore');
const cmdHelp = require('./cli.help');
const cmdNewProject = require('./cli.new');
const cmdList = require('./cli.list');
const cmdSite = require('./cli.site');
const cmdCollect = require('./cli.collect');
const { build } = require('./build');
const watch = require('node-watch');
const { clearConsole } = require('./utils.js');
const intro = () => {
console.log(chalk.blue(figlet.textSync('c4builder')));
console.log(chalk.gray('Blow up your software documentation writing skills'));
};
const getOptions = (conf) => {
return {
PLANTUML_VERSION: conf.get('plantumlVersion'),
GENERATE_MD: conf.get('generateMD'),
GENERATE_PDF: conf.get('generatePDF'),
GENERATE_WEBSITE: conf.get('generateWEB'),
GENERATE_COMPLETE_MD_FILE: conf.get('generateCompleteMD'),
GENERATE_COMPLETE_PDF_FILE: conf.get('generateCompletePDF'),
GENERATE_LOCAL_IMAGES: conf.get('generateLocalImages'),
EMBED_DIAGRAM: conf.get('embedDiagram'),
ROOT_FOLDER: conf.get('rootFolder'),
DIST_FOLDER: conf.get('distFolder'),
PROJECT_NAME: conf.get('projectName'),
REPO_NAME: conf.get('repoUrl'),
HOMEPAGE_NAME: conf.get('homepageName'),
WEB_THEME: conf.get('webTheme'),
DOCSIFY_TEMPLATE: conf.get('docsifyTemplate'),
INCLUDE_NAVIGATION: conf.get('includeNavigation'),
INCLUDE_BREADCRUMBS: conf.get('includeBreadcrumbs'),
INCLUDE_TABLE_OF_CONTENTS: conf.get('includeTableOfContents'),
INCLUDE_LINK_TO_DIAGRAM: conf.get('includeLinkToDiagram'),
PDF_CSS: conf.get('pdfCss') || path.join(__dirname, 'pdf.css'),
DIAGRAMS_ON_TOP: conf.get('diagramsOnTop'),
CHARSET: conf.get('charset'),
WEB_PORT: conf.get('webPort'),
HAS_RUN: conf.get('hasRun'),
PLANTUML_SERVER_URL: conf.get('plantumlServerUrl'),
DIAGRAM_FORMAT: conf.get('diagramFormat'),
MD_FILE_NAME: 'README',
WEB_FILE_NAME: 'HOME',
SUPPORT_SEARCH: conf.get('supportSearch')
};
};
module.exports = async () => {
program
.version(package.version)
.option('new', 'create a new project from template')
.option('config', 'change configuration for the current directory')
.option('list', 'display the current configuration')
.option('reset', 'clear all configuration')
.option('site', 'serve the generated site')
.option('-w, --watch', 'watch for changes and rebuild')
.option('docs', 'a brief explanation for the available configuration options')
.option('-p, --port <n>', 'port used for serving the generated site', parseInt)
.parse(process.argv);
let conf = { get: () => {} };
if (!program.new)
conf = new Configstore(
process.cwd().split(path.sep).splice(1).join('_'),
{},
{ configPath: path.join(process.cwd(), '.c4builder') }
);
if (program.docs) return cmdHelp();
//initial options
let options = getOptions(conf);
if (program.new || program.config || !options.HAS_RUN) clearConsole();
intro();
if (!options.HAS_RUN && !program.new) {
console.log(
`\nif you created the project using the 'c4model new' command you can just press enter and go with the default options to get a basic idea of how it works.\n`
);
console.log(`you can always change the configuration by running > c4builder config\n`);
}
if (program.new) return cmdNewProject();
if (program.list) return cmdList(options);
if (program.reset) {
conf.clear();
console.log(`configuration was reset`);
return;
}
await cmdCollect(options, conf, program);
if (!program.config) {
conf.set('hasRun', true);
let isBuilding = false;
let attemptedWatchBuild = false;
//get options after wizard
options = getOptions(conf);
if (program.watch) {
//watch warning
if (options.GENERATE_PDF || options.GENERATE_COMPLETE_PDF_FILE || options.GENERATE_LOCAL_IMAGES) {
console.log(chalk.bold(chalk.yellow('\nWARNING:')));
console.log(
chalk.bold(
chalk.yellow(
'Rebuilding with pdf or local image generation enabled will take a long time'
)
)
);
}
watch(options.ROOT_FOLDER, { recursive: true }, async (evt, name) => {
// clearConsole();
// intro();
console.log(chalk.gray(`\n${name} changed. Rebuilding...`));
if (isBuilding) {
attemptedWatchBuild = true;
if (
options.GENERATE_PDF ||
options.GENERATE_COMPLETE_PDF_FILE ||
options.GENERATE_LOCAL_IMAGES
)
console.log(
chalk.bold(
chalk.yellow(
'Build already in progress, consider disabling pdf or local image generation '
)
)
);
return;
}
isBuilding = true;
await build(options);
while (attemptedWatchBuild) {
attemptedWatchBuild = false;
await build(options);
}
isBuilding = false;
});
}
isBuilding = true;
await build(options);
isBuilding = false;
if (program.site) return await cmdSite(options, program);
if (options.GENERATE_WEBSITE && !program.watch) {
console.log(chalk.gray('\nto view the generated website run'));
console.log(`> c4builder site`);
}
}
};
| 36.822485 | 170 | 0.566286 |
de09cd717fee9990142ec7fbf14922c8440bbc0c | 7,234 | js | JavaScript | public/js/app.5ea48c1f.js | davidreyg/facturacionMVC | ffc62adb14407d5e62ecf4ece3e10754995835a0 | [
"MIT"
] | null | null | null | public/js/app.5ea48c1f.js | davidreyg/facturacionMVC | ffc62adb14407d5e62ecf4ece3e10754995835a0 | [
"MIT"
] | 6 | 2021-02-02T19:27:58.000Z | 2022-02-27T06:09:43.000Z | public/js/app.5ea48c1f.js | davidreyg/facturacionMVC | ffc62adb14407d5e62ecf4ece3e10754995835a0 | [
"MIT"
] | null | null | null | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[1],{0:function(e,t,n){e.exports=n("2f39")},"0047":function(e,t,n){},"2f39":function(e,t,n){"use strict";n.r(t);var a={};n.r(a),n.d(a,"isAppLoaded",(function(){return k}));var r=n("967e"),o=n.n(r),c=(n("a481"),n("96cf"),n("fa84")),s=n.n(c),i=(n("7d6e"),n("e54f"),n("44391"),n("4605"),n("f580"),n("5b2b"),n("8753"),n("2967"),n("7e67"),n("d770"),n("dd82"),n("922c"),n("d7fb"),n("a533"),n("c32e"),n("a151"),n("8bc7"),n("e80f"),n("5fec"),n("e42f"),n("57fc"),n("d67f"),n("880e"),n("1c10"),n("9482"),n("e797"),n("4848"),n("53d0"),n("63b1"),n("e9fd"),n("195c"),n("64e9"),n("33c5"),n("4f62"),n("0dbc"),n("7c38"),n("0756"),n("4953"),n("81db"),n("2e52"),n("22485"),n("7797"),n("12a1"),n("ce96"),n("70ca"),n("2318"),n("24bd"),n("8f27"),n("3064"),n("c9a2"),n("8767"),n("4a8e"),n("b828"),n("3c1c"),n("21cb"),n("c00e"),n("e4a8"),n("e4d3"),n("f4d9"),n("fffd"),n("f645"),n("639e"),n("34ee"),n("b794"),n("af24"),n("7c9c"),n("7bb2"),n("64f7"),n("c382"),n("053c"),n("c48f"),n("f5d1"),n("3cec"),n("c00ee"),n("d450"),n("ca07"),n("14e3"),n("9393"),n("9227"),n("1dba"),n("674a"),n("de26"),n("6721"),n("9cb5"),n("ed9b"),n("fc83"),n("98e5"),n("605a"),n("ba60"),n("df07"),n("7903"),n("e046"),n("58af"),n("7713"),n("0571"),n("3e27"),n("6837"),n("3fc9"),n("0693"),n("bf41"),n("985d"),n("0047"),n("2b0e")),u=n("1f91"),l=n("42d2"),p=n("b05d");i["a"].use(p["a"],{config:{},lang:u["a"],iconSet:l["a"]});var f=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"q-app"}},[n("router-view")],1)},d=[],b={name:"App"},h=b,m=n("2877"),w=Object(m["a"])(h,f,d,!1,null,null,null),v=w.exports,y=n("2f62"),k=function(e){return e.isAppLoaded},x=n("c47a"),g=n.n(x),q="UPDATE_APP_LOADING_STATUS",_=g()({},q,(function(e,t){e.isAppLoaded=t})),A=(n("551c"),n("06db"),{bootstrap:function(e){e.commit,e.dispatch,e.state;return new Promise((function(e,t){window.axios.get("/api/bootstrap").then((function(t){e(t)})).catch((function(e){t(e)}))}))}});i["a"].use(y["a"]);var C={isAppLoaded:!1},L=function(){var e=new y["a"].Store({state:C,getters:a,mutations:_,actions:A,modules:{},strict:!1});return e},B=n("8c4f"),P=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("router-view")],1)},S=[],E={name:"LayoutWizard",mounted:function(){this.setLayoutBackground()},destroyed:function(){document.body.style.backgroundColor="#EBF1FA"},methods:{setLayoutBackground:function(){document.body.style.backgroundColor="#f9fbff"}}},O=E,Q=Object(m["a"])(O,P,S,!1,null,null,null),$=Q.exports,F=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"q-pa-md"},[n("q-btn",{staticClass:"q-mb-md",attrs:{label:"Reset",push:"",color:"white","text-color":"primary"},on:{click:function(t){e.step=1}}}),n("q-stepper",{ref:"stepper",attrs:{"header-nav":"",color:"primary",animated:""},model:{value:e.step,callback:function(t){e.step=t},expression:"step"}},[n("q-step",{attrs:{name:1,icon:"settings",done:e.step>1,"header-nav":e.step>1}},[e._v("\n For each ad campaign that you create, you can control how much you're\n willing to spend on clicks and conversions, which networks and\n geographical locations you want your ads to show on, and more.\n\n "),n("q-stepper-navigation",[n("q-btn",{attrs:{color:"primary",label:"Continue"},on:{click:function(){e.done1=!0,e.step=2}}})],1)],1),n("q-step",{attrs:{name:2,caption:"Optional",icon:"create_new_folder",done:e.step>2,"header-nav":e.step>2}},[e._v("\n An ad group contains one or more ads which target a shared set of\n keywords.\n\n "),n("q-stepper-navigation",[n("q-btn",{attrs:{color:"primary",label:"Continue"},on:{click:function(){e.done2=!0,e.step=3}}}),n("q-btn",{staticClass:"q-ml-sm",attrs:{flat:"",color:"primary",label:"Back"},on:{click:function(t){e.step=1}}})],1)],1),n("q-step",{attrs:{name:3,title:"Create an ad",icon:"add_comment","header-nav":e.step>3}},[e._v("\n Try out different ad text to see what brings in the most customers, and\n learn how to enhance your ads using features like ad extensions. If you\n run into any problems with your ads, find out how to tell if they're\n running and how to resolve approval issues.\n\n "),n("q-stepper-navigation",[n("q-btn",{attrs:{color:"primary",label:"Finish"},on:{click:function(t){e.done3=!0}}}),n("q-btn",{staticClass:"q-ml-sm",attrs:{flat:"",color:"primary",label:"Back"},on:{click:function(t){e.step=2}}})],1)],1)],1)],1)},T=[],j={data:function(){return{step:1}}},V=j,z=n("9c40"),D=n("f531"),I=n("87fe"),J=n("b19c"),N=n("eebe"),U=n.n(N),G=Object(m["a"])(V,F,T,!1,null,null,null),R=G.exports;U()(G,"components",{QBtn:z["a"],QStepper:D["a"],QStep:I["a"],QStepperNavigation:J["a"]});var W=[{path:"/",component:function(){return Promise.all([n.e(0),n.e(5)]).then(n.bind(null,"713b"))},children:[{path:"",component:function(){return Promise.all([n.e(0),n.e(4)]).then(n.bind(null,"8b24"))}}]},{path:"/on-boarding",component:$,children:[{path:"/",component:R,name:"wizard"}]}];W.push({path:"*",component:function(){return n.e(3).then(n.bind(null,"e51e"))}});var H=W;i["a"].use(B["a"]);var K=function(){var e=new B["a"]({scrollBehavior:function(){return{x:0,y:0}},routes:H,mode:"history",base:"/"});return e},M=function(){return X.apply(this,arguments)};function X(){return X=s()(o.a.mark((function e(){var t,n,a;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("function"!==typeof L){e.next=6;break}return e.next=3,L({Vue:i["a"]});case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=L;case 7:if(t=e.t0,"function"!==typeof K){e.next=14;break}return e.next=11,K({Vue:i["a"],store:t});case 11:e.t1=e.sent,e.next=15;break;case 14:e.t1=K;case 15:return n=e.t1,t.$router=n,a={router:n,store:t,render:function(e){return e(v)}},a.el="#q-app",e.abrupt("return",{app:a,store:t,router:n});case 20:case"end":return e.stop()}}),e)}))),X.apply(this,arguments)}var Y=n("a925"),Z={failed:"Action failed",success:"Action was successful"},ee={"en-us":Z};i["a"].use(Y["a"]);var te=new Y["a"]({locale:"en-us",fallbackLocale:"en-us",messages:ee}),ne=function(e){var t=e.app;t.i18n=te},ae=n("bc3a"),re=n.n(ae);function oe(){return ce.apply(this,arguments)}function ce(){return ce=s()(o.a.mark((function e(){var t,n,a,r,c,s,u,l,p;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:t=e.sent,n=t.app,a=t.store,r=t.router,c=!0,s=function(e){c=!1,window.location.href=e},u=window.location.href.replace(window.location.origin,""),l=[ne,void 0],p=0;case 11:if(!(!0===c&&p<l.length)){e.next=29;break}if("function"===typeof l[p]){e.next=14;break}return e.abrupt("continue",26);case 14:return e.prev=14,e.next=17,l[p]({app:n,router:r,store:a,Vue:i["a"],ssrContext:null,redirect:s,urlPath:u});case 17:e.next=26;break;case 19:if(e.prev=19,e.t0=e["catch"](14),!e.t0||!e.t0.url){e.next=24;break}return window.location.href=e.t0.url,e.abrupt("return");case 24:return console.error("[Quasar] boot error:",e.t0),e.abrupt("return");case 26:p++,e.next=11;break;case 29:if(!1!==c){e.next=31;break}return e.abrupt("return");case 31:new i["a"](n);case 32:case"end":return e.stop()}}),e,null,[[14,19]])}))),ce.apply(this,arguments)}i["a"].prototype.$axios=re.a,oe()}},[[0,2,0]]]); | 7,234 | 7,234 | 0.635195 |
de09f486e559739b16054982f30dd3240d52103e | 10,489 | js | JavaScript | payload/gameOverride.js | jayden123sayshi/jayden | 9337a1ab988b189078ed6fee72405132e26c9ccc | [
"CC0-1.0"
] | null | null | null | payload/gameOverride.js | jayden123sayshi/jayden | 9337a1ab988b189078ed6fee72405132e26c9ccc | [
"CC0-1.0"
] | null | null | null | payload/gameOverride.js | jayden123sayshi/jayden | 9337a1ab988b189078ed6fee72405132e26c9ccc | [
"CC0-1.0"
] | null | null | null | window.gameFunctions = window.gameFunctions || {};
window.gameFunctions.gameOverride = function(){
this.override = true;
// ZOOM
var baseCameraTargetZoom = this[obfuscate.camera][obfuscate.targetZoom];
this[obfuscate.camera].__defineSetter__(obfuscate.targetZoom, function(val){
baseCameraTargetZoom = val;
});
this[obfuscate.camera].__defineGetter__(obfuscate.targetZoom, function(){
if(window.gameVars && window.menu && window.menu.UserSetting.look.zoomEnabled)
return window.gameVars.ZoomLevel;
return baseCameraTargetZoom;
});
var baseZoomFast = this[obfuscate.activePlayer].zoomFast;
this[obfuscate.activePlayer].__defineSetter__("zoomFast", function(val){
baseZoomFast = val;
});
this[obfuscate.activePlayer].__defineGetter__("zoomFast", function(){
if(window.menu && window.menu.UserSetting.look.zoomEnabled)
return true;
return baseZoomFast;
});
// this[obfuscate.activePlayer][obfuscate.localData].inventory.soda = 1;
// console.log(this[obfuscate.activePlayer][obfuscate.localData].inventory);
// INPUT
var inpt = this[obfuscate.input];
this[obfuscate.input].mouseButton = !1;
this[obfuscate.input].mouseButtonOld = !1;
this[obfuscate.input].rightMouseButton = !1;
this[obfuscate.input].rightMouseButtonOld = !1
// console.log(inpt);
var processInput = function(bind, down){
if(window.gameVars.Input.GlobalHookCallback) {
if(bind.code == 27) {
window.gameVars.Input.GlobalHookCallback.call(this, {code: 0, shift: false, ctrl: false, alt: false});
} else if(((bind.code == 16) || (bind.code == 17) || (bind.code == 18)) &&
(window.gameVars.Input.Keyboard.AnythingElsePressed == 0)) {
if(down)
return
if(bind.code == 16) bind.shift = false;
if(bind.code == 17) bind.ctrl = false;
if(bind.code == 18) bind.alt = false;
window.gameVars.Input.GlobalHookCallback.call(this, bind);
} else if(down){
window.gameVars.Input.GlobalHookCallback.call(this, bind);
}
return;
}
// always pass Esc
if(bind.code == 27) return keyboardEvent(27, down);
var opt = window.menu.UserSetting.binds;
if(checkBind(opt.autoAim, bind)) {
window.gameVars.Input.Cheat.AutoAimPressed = down;
}else if(checkBind(opt.switchMainWeapon, bind)) {
window.gameVars.Input.Cheat.SwitchWeaponFirst = down;
}else if(checkBind(opt.zoomIn, bind)) {
window.gameVars.Input.Cheat.ZoomDelta += 1;
}else if(checkBind(opt.zoomOut, bind)) {
window.gameVars.Input.Cheat.ZoomDelta -= 1;
}else if(checkBind(opt.displayNames, bind)) {
window.gameVars.Input.Cheat.ShowNamesPressed = down;
// }else if(checkBind(opt.streamerMode, bind)) {
}else if(checkBind(opt.goUp, bind)) {
keyboardEvent(87, down);
}else if(checkBind(opt.goLeft, bind)) {
keyboardEvent(65, down);
}else if(checkBind(opt.goDown, bind)) {
keyboardEvent(83, down);
}else if(checkBind(opt.goRight, bind)) {
keyboardEvent(68, down);
}else if(checkBind(opt.shoot, bind)) {
mouseButtonEvent(0, down);
}else if(checkBind(opt.reload, bind)) {
keyboardEvent(82, down);
}else if(checkBind(opt.interact, bind)) {
keyboardEvent(70, down);
}else if(checkBind(opt.cancelAction, bind)) {
keyboardEvent(88, down);
}else if(checkBind(opt.teamPing, bind)) {
triggerPing(down);
}else if(checkBind(opt.emotes, bind)) {
triggerEmote(down);
}else if(checkBind(opt.toggleMap, bind)) {
keyboardEvent(77, down);
}else if(checkBind(opt.toggleMiniMap, bind)) {
keyboardEvent(86, down);
}else if(checkBind(opt.equipLast, bind)) {
keyboardEvent(81, down);
}else if(checkBind(opt.equipNext, bind)) {
mouseWheelEvent(1);
}else if(checkBind(opt.equipPrev, bind)) {
mouseWheelEvent(-1);
}else if(checkBind(opt.equipWeapon1, bind)) {
keyboardEvent(49, down);
}else if(checkBind(opt.equipWeapon2, bind)) {
keyboardEvent(50, down);
}else if(checkBind(opt.equipWeapon3, bind)) {
keyboardEvent(51, down);
}else if(checkBind(opt.equipWeapon4, bind)) {
keyboardEvent(52, down);
}else if(checkBind(opt.useMedical7, bind)) {
keyboardEvent(55, down);
}else if(checkBind(opt.useMedical8, bind)) {
keyboardEvent(56, down);
}else if(checkBind(opt.useMedical9, bind)) {
keyboardEvent(57, down);
}else if(checkBind(opt.useMedical0, bind)) {
keyboardEvent(48, down);
}
}
var checkBind = function(ref, bind){
try {
return ref.code == bind.code &&
!(ref.shift && !bind.shift) &&
!(ref.ctrl && !bind.ctrl) &&
!(ref.alt && !bind.alt);
} catch (err) {
return false;
}
}
document.addEventListener('mousedown', function(e) {
// console.log(e.button);
if((e.button == 2) || (window.gameVars.Input.GlobalHookCallback && (e.button == 0))){
processInput({code: e.button * -1 - 1, shift: e.shiftKey, ctrl: e.ctrlKey, alt: e.altKey}, true);
}
if(window.gameVars && window.gameVars.Menu)
e.stopPropagation();
if(e.button == 0) {
inpt.mouseButton = true;
}
if(e.button == 1) {
e.preventDefault();
}
});
document.addEventListener('mouseup', function(e) {
if (e.button == 0) {
inpt.mouseButton = false;
} else if (e.button == 2) {
processInput({code: e.button * -1 - 1, shift: e.shiftKey, ctrl: e.ctrlKey, alt: e.altKey}, false);
}
});
var keyboardEvent = function(code, down){
// console.log(down);
down ? onKeyDownBase.call(inpt, {keyCode: code}) : onKeyUpBase.call(inpt, {keyCode: code});
}
var mouseButtonEvent = function(buttonCode, down){
down ? onMouseDownBase.call(inpt, {button: buttonCode}) : onMouseUpBase.call(inpt, {button: buttonCode});
if(buttonCode == 0) {
window.gameVars.Input.Cheat.FirePressed = down;
}
}
var mouseWheelEvent = function(delta){
onMouseWheelBase.call(inpt, {deltaY: delta});
}
var triggerEmote = function(down) {
if(window.Pings && window.Pings.EmoteTrigger)
window.Pings.EmoteTrigger(down)
}
var triggerPing = function(down) {
if(window.Pings && window.Pings.PingTrigger)
window.Pings.PingTrigger(down)
}
// keyboard
var onKeyDownBase = function (e) {
this.keys[e.keyCode] = !0,
this.shiftKey |= e.shiftKey
}
// console.log(onKeyDownBase);
this[obfuscate.input].onKeyDown = function(e){
// console.log("Key down!");
processInput({code: e.keyCode, shift: e.shiftKey, ctrl: e.ctrlKey, alt: e.altKey}, true);
if(e.keyCode == 16) return window.gameVars.Input.Keyboard.ShiftPressed = true;
if(e.keyCode == 17) return window.gameVars.Input.Keyboard.CtrlPressed = true;
if(e.keyCode == 18) return window.gameVars.Input.Keyboard.AltPressed = true;
window.gameVars.Input.Keyboard.AnythingElsePressed += 1;
};
var onKeyUpBase = function (e) {
delete this.keys[e.keyCode]
};
this[obfuscate.input].onKeyUp = function(e){
processInput({code: e.keyCode, shift: e.shiftKey, ctrl: e.ctrlKey, alt: e.altKey}, false);
if(e.keyCode == 16) return window.gameVars.Input.Keyboard.ShiftPressed = false;
if(e.keyCode == 17) return window.gameVars.Input.Keyboard.CtrlPressed = false;
if(e.keyCode == 18) return window.gameVars.Input.Keyboard.AltPressed = false;
window.gameVars.Input.Keyboard.AnythingElsePressed -= 1;
if(window.gameVars.Input.Keyboard.AnythingElsePressed < 0)
window.gameVars.Input.Keyboard.AnythingElsePressed = 0;
};
window.addEventListener("focus", function(event)
{
window.gameVars.Input.Keyboard.ShiftPressed = false;
window.gameVars.Input.Keyboard.CtrlPressed = false;
window.gameVars.Input.Keyboard.AltPressed = false;
window.gameVars.Input.Keyboard.AnythingElsePressed = 0;
}, false);
// mouse
var onMouseMoveBase = this[obfuscate.input].onMouseMove;
this[obfuscate.input].onMouseMove = function(e){
if(window.gameVars){
window.gameVars.Input.Mouse.Pos.x = e.clientX;
window.gameVars.Input.Mouse.Pos.y = e.clientY;
if(window.gameVars.Input.Mouse.AimActive) {
// e.clientX = window.gameVars.Input.Mouse.AimPos.x;
// e.clientY = window.gameVars.Input.Mouse.AimPos.y;
e = {
clientX: window.gameVars.Input.Mouse.AimPos.x,
clientY: window.gameVars.Input.Mouse.AimPos.y
}
}
}
onMouseMoveBase.call(inpt, e);
};
var onMouseDownBase = function(e) {
this.mouseButton = this.mouseButton || 0 === e.button,
this.rightMouseButton = this.rightMouseButton || 2 === e.button
};
// console.log(onMouseDownBase);
onMouseDownBase = function(e){
processInput({code: e.button * -1 - 1, shift: e.shiftKey, ctrl: e.ctrlKey, alt: e.altKey}, true);
};
var onMouseUpBase = function (e) {
this.mouseButton = 0 !== e.button && this.mouseButton,
this.rightMouseButton = 2 !== e.button && this.rightMouseButton
};
onMouseUpBase = function(e){
processInput({code: e.button * -1 - 1, shift: e.shiftKey, ctrl: e.ctrlKey, alt: e.altKey}, false);
};
var onMouseWheelBase = this[obfuscate.input].onMouseWheel;
if (window.menu.UserSetting.look.zoomEnabled) {
this[obfuscate.input].onMouseWheel = function(e){
e.stopPropagation();
if(window.gameVars && window.gameVars.Menu && !(window.gameVars.Input.GlobalHookCallback))
return;
processInput({
code: e.deltaY < 0 ? -4 : -5,
shift: window.gameVars.Input.Keyboard.ShiftPressed,
ctrl: window.gameVars.Input.Keyboard.CtrlPressed,
alt: window.gameVars.Input.Keyboard.AltPressed
}, true);
}
} else {
this[obfuscate.input].onMouseWheel = onMouseWheelBase;
}
var inputKeyPressedBase = this[obfuscate.input][obfuscate.keyPressed];
// console.log(inputKeyPressedBase);
this[obfuscate.input][obfuscate.keyPressed] = function(e){
if(window.gameVars)
{
if(window.gameVars.Input.Cheat.RepeatInteraction && e == 70)
return true;
}
return inputKeyPressedBase.call(inpt, e);
};
var mousePressedFunc = function () {
return !this.mouseButtonOld && this.mouseButton
}
var inputMousePressedBase = this[obfuscate.input][obfuscate.mouseDown];
this[obfuscate.input][obfuscate.mouseDown] = function(){
if(window.gameVars && window.gameVars.Input.Cheat.RepeatFire)
return false;
return inputMousePressedBase.call(inpt);
};
var zHelper = function (e) {
return void 0 !== this.keys[e]
}
var mouseDownFunc = function (e) {
return this.keysOld[e] && !this.zHelper(e)
}
var inputMouseDownBase = this[obfuscate.input][obfuscate.mousePressed];
this[obfuscate.input][obfuscate.mousePressed] = function(){
if(window.gameVars && window.gameVars.Input.Cheat.RepeatFire)
return true;
return inputMouseDownBase.call(inpt);
};
} | 33.511182 | 107 | 0.69406 |
de09f6af7b30f2d4a890535fe3432f08590273b4 | 2,190 | js | JavaScript | pages/api/cycles/start.js | saturninoabril/automation-dashboard | 225ae8608a7e25e290f32bd54afc3c8d65c0d2c2 | [
"Apache-2.0"
] | 3 | 2021-05-23T14:31:37.000Z | 2022-02-25T06:14:19.000Z | pages/api/cycles/start.js | saturninoabril/automation-dashboard | 225ae8608a7e25e290f32bd54afc3c8d65c0d2c2 | [
"Apache-2.0"
] | null | null | null | pages/api/cycles/start.js | saturninoabril/automation-dashboard | 225ae8608a7e25e290f32bd54afc3c8d65c0d2c2 | [
"Apache-2.0"
] | null | null | null | import nextConnect from 'next-connect';
import { getKnex } from '../../../knex';
import Cycle from '../../../lib/schema/cycle';
import SpecExecution from '../../../lib/schema/spec_execution';
import auth from '../../../middleware/auth';
async function startCycle(req, res) {
try {
const {
body: { branch, build, repo, files = [] },
} = req;
const { value, error } = Cycle.schema.validate({
branch,
build,
repo,
specs_registered: files.length,
});
if (error) {
return res.status(400).json({ error: true, message: `Invalid cycle patch: ${error}` });
}
const knex = await getKnex();
const started = await knex.transaction(async (trx) => {
const cycle = await knex('cycles')
.transacting(trx)
.insert({
branch: value.branch,
build: value.build,
repo: value.repo,
specs_registered: value.specs_registered,
})
.returning('*');
let executions;
if (files.length > 0) {
const chunkSize = 30;
const newExecutions = files
.map((f) => {
return {
file: f.file,
sort_weight: f.sortWeight,
cycle_id: cycle[0].id,
};
})
.map((ne) => {
const { value } = SpecExecution.schema.validate(ne);
return value;
});
executions = await knex
.batchInsert('spec_executions', newExecutions, chunkSize)
.transacting(trx)
.returning('*');
}
return { cycle, executions };
});
return res.status(201).json(started);
} catch (e) {
return res.status(501).json({ error: true });
}
}
const handler = nextConnect();
handler.use(auth).post(startCycle);
export default handler;
| 30.84507 | 99 | 0.450228 |
de0a978b721274f1ac387790eb6912d8cbdf205b | 2,327 | js | JavaScript | node_modules/hotkeys-js/doc/static/js/214.0066e7d1.chunk.js | kristinyanah/imageseach | 62e06f8d09ed178d942768f96cd50eeab1166029 | [
"MIT"
] | 1 | 2021-01-13T22:59:39.000Z | 2021-01-13T22:59:39.000Z | node_modules/hotkeys-js/doc/static/js/214.0066e7d1.chunk.js | kristinyanah/imageseach | 62e06f8d09ed178d942768f96cd50eeab1166029 | [
"MIT"
] | 1 | 2022-01-21T08:38:31.000Z | 2022-01-21T08:38:31.000Z | node_modules/hotkeys-js/doc/static/js/214.0066e7d1.chunk.js | kristinyanah/imageseach | 62e06f8d09ed178d942768f96cd50eeab1166029 | [
"MIT"
] | 1 | 2021-01-13T23:08:25.000Z | 2021-01-13T23:08:25.000Z | (this["webpackJsonphotkeys-js"]=this["webpackJsonphotkeys-js"]||[]).push([[214],{251:function(t,n){!function(t){var n=t.util.clone(t.languages.javascript);t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=/<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:$-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i,t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},t.languages.jsx.tag),t.languages.insertBefore("inside","attr-value",{script:{pattern:/=(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:t.languages.jsx},alias:"language-javascript"}},t.languages.jsx.tag);var e=function t(n){return n?"string"===typeof n?n:"string"===typeof n.content?n.content:n.content.map(t).join(""):""};t.hooks.add("after-tokenize",(function(n){"jsx"!==n.language&&"tsx"!==n.language||function n(a){for(var s=[],g=0;g<a.length;g++){var i=a[g],o=!1;if("string"!==typeof i&&("tag"===i.type&&i.content[0]&&"tag"===i.content[0].type?"</"===i.content[0].content[0].content?s.length>0&&s[s.length-1].tagName===e(i.content[0].content[1])&&s.pop():"/>"===i.content[i.content.length-1].content||s.push({tagName:e(i.content[0].content[1]),openedBraces:0}):s.length>0&&"punctuation"===i.type&&"{"===i.content?s[s.length-1].openedBraces++:s.length>0&&s[s.length-1].openedBraces>0&&"punctuation"===i.type&&"}"===i.content?s[s.length-1].openedBraces--:o=!0),(o||"string"===typeof i)&&s.length>0&&0===s[s.length-1].openedBraces){var p=e(i);g<a.length-1&&("string"===typeof a[g+1]||"plain-text"===a[g+1].type)&&(p+=e(a[g+1]),a.splice(g+1,1)),g>0&&("string"===typeof a[g-1]||"plain-text"===a[g-1].type)&&(p=e(a[g-1])+p,a.splice(g-1,1),g--),a[g]=new t.Token("plain-text",p,null,p)}i.content&&"string"!==typeof i.content&&n(i.content)}}(n.tokens)}))}(Prism)}}]);
//# sourceMappingURL=214.0066e7d1.chunk.js.map | 1,163.5 | 2,280 | 0.5737 |
de0ae7b130648911122d26cf9f7630c0e64dfcac | 18,305 | js | JavaScript | ui/static/js/fortio_chart.js | louygan/fortio | db57bfe7c87a4beb72200ef43085d45122bdb61a | [
"Apache-2.0"
] | null | null | null | ui/static/js/fortio_chart.js | louygan/fortio | db57bfe7c87a4beb72200ef43085d45122bdb61a | [
"Apache-2.0"
] | null | null | null | ui/static/js/fortio_chart.js | louygan/fortio | db57bfe7c87a4beb72200ef43085d45122bdb61a | [
"Apache-2.0"
] | null | null | null | // Copyright 2017 Istio Authors.
//
// 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.
// TODO: object-ify
var linearXAxe = {
type: 'linear',
scaleLabel: {
display: true,
labelString: 'Response time in ms',
ticks: {
min: 0,
beginAtZero: true
}
}
}
var logXAxe = {
type: 'logarithmic',
scaleLabel: {
display: true,
labelString: 'Response time in ms (log scale)'
},
ticks: {
// min: dataH[0].x, // newer chart.js are ok with 0 on x axis too
callback: function (tick, index, ticks) {
return tick.toLocaleString()
}
}
}
var linearYAxe = {
id: 'H',
type: 'linear',
ticks: {
beginAtZero: true
},
scaleLabel: {
display: true,
labelString: 'Count'
}
}
var logYAxe = {
id: 'H',
type: 'logarithmic',
display: true,
ticks: {
// min: 1, // log mode works even with 0s
// Needed to not get scientific notation display:
callback: function (tick, index, ticks) {
return tick.toString()
}
},
scaleLabel: {
display: true,
labelString: 'Count (log scale)'
}
}
var chart = {}
var overlayChart = {}
var mchart = {}
function myRound (v, digits = 6) {
var p = Math.pow(10, digits)
return Math.round(v * p) / p
}
function pad (n) {
return (n < 10) ? ('0' + n) : n
}
function formatDate (dStr) {
var d = new Date(dStr)
return d.getFullYear() + '-' + pad(d.getMonth() + 1) + '-' + pad(d.getDate()) + ' ' +
pad(d.getHours()) + ':' + pad(d.getMinutes()) + ':' + pad(d.getSeconds())
}
function makeTitle (res) {
var title = []
if (res.Labels !== '') {
if (res.URL) { // http results
title.push(res.Labels + ' - ' + res.URL + ' - ' + formatDate(res.StartTime))
} else { // grpc results
title.push(res.Labels + ' - ' + res.Destination + ' - ' + formatDate(res.StartTime))
}
}
var percStr = 'min ' + myRound(1000.0 * res.DurationHistogram.Min, 3) + ' ms, average ' + myRound(1000.0 * res.DurationHistogram.Avg, 3) + ' ms'
if (res.DurationHistogram.Percentiles) {
for (var i = 0; i < res.DurationHistogram.Percentiles.length; i++) {
var p = res.DurationHistogram.Percentiles[i]
percStr += ', p' + p.Percentile + ' ' + myRound(1000 * p.Value, 2) + ' ms'
}
}
percStr += ', max ' + myRound(1000.0 * res.DurationHistogram.Max, 3) + ' ms'
var statusOk = res.RetCodes[200]
if (!statusOk) { // grpc results
statusOk = res.RetCodes[1]
}
var total = res.DurationHistogram.Count
var errStr = 'no error'
if (statusOk !== total) {
if (statusOk) {
errStr = myRound(100.0 * (total - statusOk) / total, 2) + '% errors'
} else {
errStr = '100% errors!'
}
}
title.push('Response time histogram at ' + res.RequestedQPS + ' target qps (' +
myRound(res.ActualQPS, 1) + ' actual) ' + res.NumThreads + ' connections for ' +
res.RequestedDuration + ' (actual time ' + myRound(res.ActualDuration / 1e9, 1) + 's), ' +
errStr)
title.push(percStr)
return title
}
function fortioResultToJsChartData (res) {
var dataP = [{
x: 0.0,
y: 0.0
}]
var len = res.DurationHistogram.Data.length
var prevX = 0.0
var prevY = 0.0
for (var i = 0; i < len; i++) {
var it = res.DurationHistogram.Data[i]
var x = myRound(1000.0 * it.Start)
if (i === 0) {
// Extra point, 1/N at min itself
dataP.push({
x: x,
y: myRound(100.0 / res.DurationHistogram.Count, 3)
})
} else {
if (prevX !== x) {
dataP.push({
x: x,
y: prevY
})
}
}
x = myRound(1000.0 * it.End)
var y = myRound(it.Percent, 3)
dataP.push({
x: x,
y: y
})
prevX = x
prevY = y
}
var dataH = []
var prev = 1000.0 * res.DurationHistogram.Data[0].Start
for (i = 0; i < len; i++) {
it = res.DurationHistogram.Data[i]
var startX = 1000.0 * it.Start
var endX = 1000.0 * it.End
if (startX !== prev) {
dataH.push({
x: myRound(prev),
y: 0
}, {
x: myRound(startX),
y: 0
})
}
dataH.push({
x: myRound(startX),
y: it.Count
}, {
x: myRound(endX),
y: it.Count
})
prev = endX
}
return {
title: makeTitle(res),
dataP: dataP,
dataH: dataH
}
}
function showChart (data) {
makeChart(data)
// Load configuration (min, max, isLogarithmic, ...) from the update form.
updateChartOptions(chart)
toggleVisibility()
}
function toggleVisibility () {
document.getElementById('running').style.display = 'none'
document.getElementById('cc1').style.display = 'block'
document.getElementById('update').style.visibility = 'visible'
}
function makeOverlayChartTitle (titleA, titleB) {
// Each string in the array is a separate line
return [
'A: ' + titleA[0], titleA[1], // Skip 3rd line.
'',
'B: ' + titleB[0], titleB[1], // Skip 3rd line.
]
}
function makeOverlayChart (dataA, dataB) {
var chartEl = document.getElementById('chart1')
chartEl.style.visibility = 'visible'
if (Object.keys(overlayChart).length !== 0) {
return
}
deleteSingleChart()
deleteMultiChart()
var ctx = chartEl.getContext('2d')
var title = makeOverlayChartTitle(dataA.title, dataB.title)
overlayChart = new Chart(ctx, {
type: 'line',
data: {
// "Cumulative %" datasets are listed first so they are drawn on top of the histograms.
datasets: [{
label: 'A: Cumulative %',
data: dataA.dataP,
fill: false,
yAxisID: 'P',
stepped: true,
backgroundColor: 'rgba(134, 87, 167, 1)',
borderColor: 'rgba(134, 87, 167, 1)',
cubicInterpolationMode: 'monotone'
}, {
label: 'B: Cumulative %',
data: dataB.dataP,
fill: false,
yAxisID: 'P',
stepped: true,
backgroundColor: 'rgba(204, 102, 0)',
borderColor: 'rgba(204, 102, 0)',
cubicInterpolationMode: 'monotone'
}, {
label: 'A: Histogram: Count',
data: dataA.dataH,
yAxisID: 'H',
pointStyle: 'rect',
radius: 1,
borderColor: 'rgba(87, 167, 134, .9)',
backgroundColor: 'rgba(87, 167, 134, .75)',
lineTension: 0
}, {
label: 'B: Histogram: Count',
data: dataB.dataH,
yAxisID: 'H',
pointStyle: 'rect',
radius: 1,
borderColor: 'rgba(36, 64, 238, .9)',
backgroundColor: 'rgba(36, 64, 238, .75)',
lineTension: 0
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
title: {
display: true,
fontStyle: 'normal',
text: title
},
scales: {
xAxes: [
linearXAxe
],
yAxes: [{
id: 'P',
position: 'right',
ticks: {
beginAtZero: true,
max: 100
},
scaleLabel: {
display: true,
labelString: '%'
}
},
linearYAxe
]
}
}
})
updateChart(overlayChart)
}
function makeChart (data) {
var chartEl = document.getElementById('chart1')
chartEl.style.visibility = 'visible'
if (Object.keys(chart).length === 0) {
deleteOverlayChart()
deleteMultiChart()
// Creation (first or switch) time
var ctx = chartEl.getContext('2d')
chart = new Chart(ctx, {
type: 'line',
data: {
datasets: [{
label: 'Cumulative %',
data: data.dataP,
fill: false,
yAxisID: 'P',
stepped: true,
backgroundColor: 'rgba(134, 87, 167, 1)',
borderColor: 'rgba(134, 87, 167, 1)',
cubicInterpolationMode: 'monotone'
},
{
label: 'Histogram: Count',
data: data.dataH,
yAxisID: 'H',
pointStyle: 'rect',
radius: 1,
borderColor: 'rgba(87, 167, 134, .9)',
backgroundColor: 'rgba(87, 167, 134, .75)',
lineTension: 0
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
title: {
display: true,
fontStyle: 'normal',
text: data.title
},
scales: {
xAxes: [
linearXAxe
],
yAxes: [{
id: 'P',
position: 'right',
ticks: {
beginAtZero: true,
max: 100
},
scaleLabel: {
display: true,
labelString: '%'
}
},
linearYAxe
]
}
}
})
// TODO may need updateChart() if we persist settings even the first time
} else {
chart.data.datasets[0].data = data.dataP
chart.data.datasets[1].data = data.dataH
chart.options.title.text = data.title
updateChart(chart)
}
}
function getUpdateForm () {
var form = document.getElementById('updtForm')
var xMin = form.xmin.value.trim()
var xMax = form.xmax.value.trim()
var xIsLogarithmic = form.xlog.checked
var yIsLogarithmic = form.ylog.checked
return { xMin, xMax, xIsLogarithmic, yIsLogarithmic }
}
function getSelectedResults () {
// Undefined if on "graph-only" page
var select = document.getElementById('files')
var selectedResults
if (select) {
var selectedOptions = select.selectedOptions
selectedResults = []
for (var option of selectedOptions) {
selectedResults.push(option.text)
}
} else {
selectedResults = undefined
}
return selectedResults
}
function updateQueryString () {
var location = document.location
var params = new URLSearchParams(location.search)
var form = getUpdateForm()
params.set('xMin', form.xMin)
params.set('xMax', form.xMax)
params.set('xLog', form.xIsLogarithmic)
params.set('yLog', form.yIsLogarithmic)
var selectedResults = getSelectedResults()
params.delete('sel')
if (selectedResults) {
for (var result of selectedResults) {
params.append('sel', result)
}
}
window.history.replaceState({}, '', `${location.pathname}?${params}`)
}
function updateChartOptions (chart) {
var form = getUpdateForm()
var scales = chart.config.options.scales
var newXMin = parseFloat(form.xMin)
var newXAxis = form.xIsLogarithmic ? logXAxe : linearXAxe
var newYAxis = form.yIsLogarithmic ? logYAxe : linearYAxe
chart.config.options.scales = {
xAxes: [newXAxis],
yAxes: [scales.yAxes[0], newYAxis]
}
chart.update() // needed for scales.xAxes[0] to exist
var newNewXAxis = chart.config.options.scales.xAxes[0]
newNewXAxis.ticks.min = form.xMin === '' ? undefined : newXMin
var formXMax = form.xMax
newNewXAxis.ticks.max = formXMax === '' || formXMax === 'max' ?
undefined :
parseFloat(formXMax)
chart.update()
}
function objHasProps (obj) {
return Object.keys(obj).length > 0
}
function getCurrentChart () {
var currentChart
if (objHasProps(chart)) {
currentChart = chart
} else if (objHasProps(overlayChart)) {
currentChart = overlayChart
} else if (objHasProps(mchart)) {
currentChart = mchart
} else {
currentChart = undefined
}
return currentChart
}
var timeoutID = 0
function updateChart (chart = getCurrentChart()) {
updateChartOptions(chart)
if (timeoutID > 0) {
clearTimeout(timeoutID)
}
timeoutID = setTimeout("updateQueryString()", 750)
}
function multiLabel (res) {
var l = formatDate(res.StartTime)
if (res.Labels !== '') {
l += ' - ' + res.Labels
}
return l
}
function findData (slot, idx, res, p) {
// Not very efficient but there are only a handful of percentiles
var pA = res.DurationHistogram.Percentiles
if (!pA) {
// console.log('No percentiles in res', res)
return
}
var pN = Number(p)
for (var i = 0; i < pA.length; i++) {
if (pA[i].Percentile === pN) {
mchart.data.datasets[slot].data[idx] = 1000.0 * pA[i].Value
return
}
}
console.log('Not Found', p, pN, pA)
// not found, not set
}
function fortioAddToMultiResult (i, res) {
mchart.data.labels[i] = multiLabel(res)
mchart.data.datasets[0].data[i] = 1000.0 * res.DurationHistogram.Min
findData(1, i, res, '50')
mchart.data.datasets[2].data[i] = 1000.0 * res.DurationHistogram.Avg
findData(3, i, res, '75')
findData(4, i, res, '90')
findData(5, i, res, '99')
findData(6, i, res, '99.9')
mchart.data.datasets[7].data[i] = 1000.0 * res.DurationHistogram.Max
mchart.data.datasets[8].data[i] = res.ActualQPS
}
function endMultiChart (len) {
mchart.data.labels = mchart.data.labels.slice(0, len)
for (var i = 0; i < mchart.data.datasets.length; i++) {
mchart.data.datasets[i].data = mchart.data.datasets[i].data.slice(0, len)
}
mchart.update()
}
function deleteOverlayChart () {
if (Object.keys(overlayChart).length === 0) {
return
}
overlayChart.destroy()
overlayChart = {}
}
function deleteMultiChart () {
if (Object.keys(mchart).length === 0) {
return
}
mchart.destroy()
mchart = {}
}
function deleteSingleChart () {
if (Object.keys(chart).length === 0) {
return
}
chart.destroy()
chart = {}
}
function makeMultiChart () {
document.getElementById('running').style.display = 'none'
document.getElementById('update').style.visibility = 'hidden'
var chartEl = document.getElementById('chart1')
chartEl.style.visibility = 'visible'
if (Object.keys(mchart).length !== 0) {
return
}
deleteSingleChart()
deleteOverlayChart()
var ctx = chartEl.getContext('2d')
mchart = new Chart(ctx, {
type: 'line',
data: {
labels: [],
datasets: [
{
label: 'Min',
fill: false,
stepped: true,
borderColor: 'hsla(111, 100%, 40%, .8)',
backgroundColor: 'hsla(111, 100%, 40%, .8)'
},
{
label: 'Median',
fill: false,
stepped: true,
borderDash: [5, 5],
borderColor: 'hsla(220, 100%, 40%, .8)',
backgroundColor: 'hsla(220, 100%, 40%, .8)'
},
{
label: 'Avg',
fill: false,
stepped: true,
backgroundColor: 'hsla(266, 100%, 40%, .8)',
borderColor: 'hsla(266, 100%, 40%, .8)'
},
{
label: 'p75',
fill: false,
stepped: true,
backgroundColor: 'hsla(60, 100%, 40%, .8)',
borderColor: 'hsla(60, 100%, 40%, .8)'
},
{
label: 'p90',
fill: false,
stepped: true,
backgroundColor: 'hsla(45, 100%, 40%, .8)',
borderColor: 'hsla(45, 100%, 40%, .8)'
},
{
label: 'p99',
fill: false,
stepped: true,
backgroundColor: 'hsla(30, 100%, 40%, .8)',
borderColor: 'hsla(30, 100%, 40%, .8)'
},
{
label: 'p99.9',
fill: false,
stepped: true,
backgroundColor: 'hsla(15, 100%, 40%, .8)',
borderColor: 'hsla(15, 100%, 40%, .8)'
},
{
label: 'Max',
fill: false,
stepped: true,
borderColor: 'hsla(0, 100%, 40%, .8)',
backgroundColor: 'hsla(0, 100%, 40%, .8)'
},
{
label: 'QPS',
yAxisID: 'qps',
fill: false,
stepped: true,
borderColor: 'rgba(0, 0, 0, .8)',
backgroundColor: 'rgba(0, 0, 0, .8)'
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
title: {
display: true,
fontStyle: 'normal',
text: ['Latency in milliseconds']
},
elements: {
line: {
tension: 0 // disables bezier curves
}
},
scales: {
yAxes: [{
id: 'ms',
ticks: {
beginAtZero: true
},
scaleLabel: {
display: true,
labelString: 'ms'
}
}, {
id: 'qps',
position: 'right',
ticks: {
beginAtZero: true
},
scaleLabel: {
display: true,
labelString: 'QPS'
}
}]
}
}
})
// Hide QPS axis on clicking QPS dataset.
mchart.options.legend.onClick = (event, legendItem) => {
// Toggle dataset hidden (default behavior).
var dataset = mchart.data.datasets[legendItem.datasetIndex]
dataset.hidden = !dataset.hidden
if (dataset.label === 'QPS') {
// Toggle QPS y-axis.
var qpsYAxis = mchart.options.scales.yAxes[1]
qpsYAxis.display = !qpsYAxis.display
}
mchart.update()
}
}
function runTestForDuration (durationInSeconds) {
var progressBar = document.getElementById('progressBar')
if (durationInSeconds <= 0) {
// infinite case
progressBar.removeAttribute('value')
return
}
var startTimeMillis = Date.now()
var updatePercentage = function () {
var barPercentage = Math.min(100, (Date.now() - startTimeMillis) / (10 * durationInSeconds))
progressBar.value = barPercentage
if (barPercentage < 100) {
setTimeout(updatePercentage, 50 /* milliseconds */) // 20fps
}
}
updatePercentage()
}
var lastDuration = ''
function toggleDuration (el) {
var d = document.getElementById('duration')
if (el.checked) {
lastDuration = d.value
d.value = ''
} else {
d.value = lastDuration
}
}
let customHeaderElement = '<input type=\"text\" name=\"H\" size=40 value=\"\" /> <br />';
function addCustomHeader() {
let customHeaderElements = document.getElementsByName("H");
let lastElement = customHeaderElements[customHeaderElements.length - 1];
lastElement.nextElementSibling.insertAdjacentHTML('afterend', customHeaderElement)
}
| 26.112696 | 146 | 0.567277 |
de0b3814b1cb518cb7364320718b4b2b81b4c12b | 7,420 | js | JavaScript | modules/csvupload/server/controllers/csvuploadform.server.controller.js | sangaArun/admin-san | 9203b6da2491ec30709d7765dffb1804032eefe3 | [
"MIT"
] | null | null | null | modules/csvupload/server/controllers/csvuploadform.server.controller.js | sangaArun/admin-san | 9203b6da2491ec30709d7765dffb1804032eefe3 | [
"MIT"
] | null | null | null | modules/csvupload/server/controllers/csvuploadform.server.controller.js | sangaArun/admin-san | 9203b6da2491ec30709d7765dffb1804032eefe3 | [
"MIT"
] | null | null | null | 'use strict';
/**
* Module dependencies
*/
var path = require('path'),
mongoose = require('mongoose'),
csv = require("fast-csv"),
fs = require("fs"),
multer = require('multer'),
DeviceList = mongoose.model('DeviceList'),
config = require(path.resolve('./config/config')),
errorHandler = require(path.resolve('./modules/core/server/controllers/errors.server.controller'));
/**
* Create an article
*/
exports.uploadCsv = function(req, res) {
var upload = multer(config.uploads.profileUpload).single('file');
//var upload = multer.single('device-list1')
var deviceList = [];
upload(req, res, function(err) {
if (err) {
console.log(err); // An error occurred when uploading
return;
}
var file = req.file;
var stream = fs.createReadStream(req.file.path);
csv.fromStream(stream, {
headers: ['ip', 'snmp_version', 'snmpv2_community', 'snmpv3_user', 'snmpv3_auth', 'snmpv3_auth_key', 'snmpv3_privacy', 'snmpv3_privacy_key']
})
.on('data', function(data) {
console.log(data);
if(data.ip != 'ip'){
console.log(data.ip);
if(data.ip.indexOf('-') > -1){
var dataArr = data.ip.split('-');
var lowData = dataArr[0];
var lowDataArr = lowData.split('.');
var lwRange = parseInt(lowDataArr[3]);
var highData = dataArr[1];
var highDataArr = highData.split('.');
var hgRange = parseInt(highDataArr[3]);
for(var i = lwRange; i <= hgRange;i++){
var pData = data;
pData.ip = lowDataArr[0]+"."+lowDataArr[1]+"."+lowDataArr[2]+"."+i;
console.log(pData);
var devices = new DeviceList(pData);
var now = new Date();
devices.set('company', req.user.company);
var created_by = req.user.firstName + " " + req.user.lastName;
devices.set('created_by', created_by);
devices.set('created_date', now);
devices.save(function(err, data) {
if (err) {
//console.log(err);
} else {
//console.log('saved *****', data);
}
});
}
}else{
var devices = new DeviceList(data);
var now = new Date();
devices.set('company', req.user.company);
var created_by = req.user.firstName + " " + req.user.lastName;
devices.set('created_by', created_by);
devices.set('created_date', now);
// console.log(devices, '***********');
devices.save(function(err, data) {
if (err) {
//console.log(err);
} else {
//console.log('saved *****', data);
}
});
}
}
})
.on('end', function() {
console.log('done sanga');
DeviceList.find({
company: req.user.company
}).exec(function(err, devices) {
if (err) {
console.log(err);
} else {
deviceList = devices;
console.log("query after upload");
console.log(deviceList);
console.log("query after fetch");
fs.unlink(req.file.path);
res.json({
error_code: 0,
err_desc: null,
respDeviceList: deviceList
});
}
});
});
console.log('before querying all devicelist');
});
};
exports.fetchDeviceList = function(req, res) {
DeviceList.find({
company: req.user.company
}).exec(function(err, devices) {
if (err) {
console.log(err);
console.log('error');
} else {
res.json(devices)
}
});
};
exports.saveDevice = function(req, res) {
var query = {
'id': req.body._id
};
var dev = req.body;
var device = new DeviceList(req.body);
if (dev._id) {
var updatedVal = {
ip: dev.ip,
snmp_version: dev.snmp_version,
snmpv3_user: dev.snmpv3_user,
snmpv3_auth: dev.snmpv3_auth,
snmpv3_auth_key: dev.snmpv3_auth_key,
snmpv3_privacy: dev.snmpv3_privacy,
snmpv3_privacy_key: dev.snmpv3_privacy_key,
company: dev.company,
created_by: dev.created_by,
created_date: dev.created_date
};
console.log(dev._id);
DeviceList.findById(dev._id, function(err, devc) {
if (err) throw err;
// change the users location
devc.ip = dev.ip,
devc.snmp_version = dev.snmp_version,
devc.snmpv3_user = dev.snmpv3_user,
devc.snmpv3_auth = dev.snmpv3_auth,
devc.snmpv3_auth_key = dev.snmpv3_auth_key,
devc.snmpv3_privacy = dev.snmpv3_privacy,
devc.snmpv3_privacy_key = dev.snmpv3_privacy_key,
devc.company = dev.company,
devc.created_by = dev.created_by,
devc.created_date = dev.created_date
var now = new Date();
var modified_by = req.user.firstName + " " + req.user.lastName;
devc.set('modified_by', created_by);
devc.set('modified_date', now);
// save the user
devc.save(function(err) {
if (err) throw err;
console.log('device successfully updated!');
return res.json(devc);
});
});
} else {
var now = new Date();
device.set('company', req.user.company);
var created_by = req.user.firstName + " " + req.user.lastName;
device.set('created_by', created_by);
device.set('created_date', now);
device.save(function(err, data) {
if (err) {
console.log(err);
} else {
console.log('saved *****', data);
return res.json(device);
}
});
}
/*var upsertData = device.toObject();
delete upsertData._id;
DeviceList.update({_id: device.id}, upsertData, {upsert: true}, function(err,device){
if(err){
console.log(err);
}
console.log(device);
});*/
};
exports.removeDevice = function(req, res) {
var id = req.body.id;
DeviceList.remove({
'_id': id
}, function(result) {
console.log('record deleted succeffully')
return res.json({
"message": "record deleted successfully"
});
});
};
| 35.502392 | 156 | 0.462264 |
de0ba2cd3c29443df62f758aaa89624210efc400 | 69 | js | JavaScript | dist/tests/testHelpers/testStructures/general/TypePropertyTestStructure.js | 700software/ts-code-generator | c3862c2219ba8a802144e6f3e60b3e26b359ecf8 | [
"MIT"
] | null | null | null | dist/tests/testHelpers/testStructures/general/TypePropertyTestStructure.js | 700software/ts-code-generator | c3862c2219ba8a802144e6f3e60b3e26b359ecf8 | [
"MIT"
] | null | null | null | dist/tests/testHelpers/testStructures/general/TypePropertyTestStructure.js | 700software/ts-code-generator | c3862c2219ba8a802144e6f3e60b3e26b359ecf8 | [
"MIT"
] | null | null | null | "use strict";
//# sourceMappingURL=TypePropertyTestStructure.js.map
| 17.25 | 53 | 0.797101 |
de0bcaed950f15a51b53469709adbbdfb2d270ec | 12,653 | js | JavaScript | source/components/DatePicker/DateRangeBasePicker.js | fossabot/ppfish-components | e146343ac6849bbf082b0833725bf79c53e61641 | [
"MIT"
] | null | null | null | source/components/DatePicker/DateRangeBasePicker.js | fossabot/ppfish-components | e146343ac6849bbf082b0833725bf79c53e61641 | [
"MIT"
] | null | null | null | source/components/DatePicker/DateRangeBasePicker.js | fossabot/ppfish-components | e146343ac6849bbf082b0833725bf79c53e61641 | [
"MIT"
] | null | null | null | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Input from '../Input/index.tsx';
import Icon from '../Icon/index.tsx';
import Trigger from 'rc-trigger';
import {polyfill} from 'react-lifecycles-compat';
import {HAVE_TRIGGER_TYPES, TYPE_VALUE_RESOLVER_MAP, DEFAULT_FORMATS} from './constants';
import {Errors, require_condition} from './libs/utils';
import KEYCODE from '../../utils/KeyCode';
import {isValidValue, isValidValueArr, equalDateArr} from '../../utils/date';
import placements from './placements';
import isEqual from 'lodash/isEqual';
const haveTriggerType = (type) => {
return HAVE_TRIGGER_TYPES.indexOf(type) !== -1;
};
const isInputValid = (text, date) => {
if (text.trim() === '' || !isValidValue(date)) return false;
return true;
};
const $type = Symbol('type');
class DateRangeBasePicker extends React.Component {
static get propTypes() {
return {
className: PropTypes.string,
startPlaceholder: PropTypes.string,
endPlaceholder: PropTypes.string,
separator: PropTypes.string,
format: PropTypes.string,
placement: PropTypes.oneOf(['bottomLeft', 'bottomCenter', 'bottomRight', 'topLeft', 'topCenter', 'topRight']),
prefixCls: PropTypes.string,
getPopupContainer: PropTypes.func,
showTrigger: PropTypes.bool,
allowClear: PropTypes.bool,
disabled: PropTypes.bool,
esc: PropTypes.bool,
value: PropTypes.arrayOf(PropTypes.instanceOf(Date)),
onFocus: PropTypes.func,
onBlur: PropTypes.func,
onChange: PropTypes.func,
onVisibleChange: PropTypes.func,
style: PropTypes.object
};
}
static get defaultProps() {
return {
startPlaceholder: '开始日期',
endPlaceholder: '结束日期',
separator: '至',
placement: 'bottomLeft',
prefixCls: 'fishd',
showTrigger: true,
allowClear: true,
disabled: false,
esc: true,
onFocus: () => {},
onBlur: () => {},
onChange: () => {},
onVisibleChange: () => {}
};
}
static dateToStr(date, type, format, separator) {
if (!date || !isValidValue(date)) return '';
const tdate = date;
const formatter = (
TYPE_VALUE_RESOLVER_MAP['date']
).formatter;
const result = formatter(tdate, format || DEFAULT_FORMATS[type], separator);
return result;
}
static propToState({ value,format,separator },state) {
const type = state[$type];
return {
value: value && isValidValueArr(value) ? value : null,
text:
value && isValidValueArr(value)
? [
DateRangeBasePicker.dateToStr(value[0], type, format, separator),
DateRangeBasePicker.dateToStr(value[1], type, format, separator)
]
: "",
confirmValue: value && isValidValueArr(value) ? value : null
};
}
static getDerivedStateFromProps(nextProps, prevState) {
// 只 value 受控
if ('value' in nextProps && !isEqual(prevState.prevPropValue, nextProps.value)) {
let state = DateRangeBasePicker.propToState(nextProps, prevState);
state.prevPropValue = nextProps.value;
return state;
}
return null;
}
constructor(props, _type, state) {
require_condition(typeof _type === 'string');
super(props);
this.type = _type;
this.inputClick = false;
this.state = {
pickerVisible: false,
value: props.value && isValidValueArr(props.value) ? props.value : null,
text: (
props.value && isValidValueArr(props.value) ?
[this.dateToStr(props.value[0]), this.dateToStr(props.value[1])] : ''
),
// 增加一个confirmValue记录每次确定的值,当点击"取消"或者空白处时,恢复这个值
confirmValue: props.value && isValidValueArr(props.value) ? props.value : null
};
}
isDateValid(date) {
return date === null || isValidValueArr(date);
}
pickerPanel(state, props) {
throw new Errors.MethodImplementationRequiredError(props);
}
getFormatSeparator() {
return undefined;
}
onError() {
return undefined;
}
onPicked = (value, isKeepPannel = false, isConfirmValue = true) => {
// 当为日期范围选择面板时,把结束时间默认设置为23:59:59:999
if(this.type == 'daterange' && value && value.length === 2) {
value[1] = new Date(value[1].setHours(23,59,59,999));
}
this.setState({
pickerVisible: isKeepPannel,
value,
text: value && value.length === 2 ? [this.dateToStr(value[0]), this.dateToStr(value[1])] : '',
}, ()=> {
this.props.onVisibleChange(isKeepPannel);
});
if (isConfirmValue) {
this.setState({
confirmValue: value
});
this.props.onChange(value);
}
}
onCancelPicked = () => {
this.setState({
pickerVisible: false,
value: this.state.confirmValue && this.state.confirmValue.length === 2 ? this.state.confirmValue : null,
text: (
this.state.confirmValue && this.state.confirmValue.length === 2 ?
[this.dateToStr(new Date(this.state.confirmValue[0])), this.dateToStr(new Date(this.state.confirmValue[1]))] : ''
)
}, ()=> {
this.props.onVisibleChange(false);
});
}
getFormat() {
return this.props.format || DEFAULT_FORMATS[this.type];
}
dateToStr = (date) => {
return DateRangeBasePicker.dateToStr(date, this.type, this.getFormat(), this.getFormatSeparator());
}
parseDate = (dateStr) => {
if (!dateStr) return null;
const type = this.type;
const parser = (
TYPE_VALUE_RESOLVER_MAP['date']
).parser;
return parser(dateStr, this.getFormat(), this.getFormatSeparator());
}
togglePickerVisible() {
this.setState({
pickerVisible: !this.state.pickerVisible
}, ()=> {
this.props.onVisibleChange(!this.state.pickerVisible);
});
}
// 聚焦
handleFocus = (e) => {
this.props.onFocus(e);
}
// 失焦
handleBlur = (e) => {
this.props.onBlur(e);
}
// 键盘事件
handleKeydown = (evt) => {
const keyCode = evt.keyCode;
// esc
if (this.props.esc && keyCode === KEYCODE.ESC) {
this.setState({
pickerVisible: false
}, ()=> {
this.props.onVisibleChange(false);
});
this.refInputRoot.blur();
evt.stopPropagation();
}
// enter
if (keyCode === KEYCODE.ENTER) {
this.setState({
pickerVisible: false
}, ()=>{
this.saveValidInputValue();
});
this.refInputRoot.blur();
}
}
// 点击清空图标
handleClickCloseIcon = (e) => {
e && e.stopPropagation();
const {disabled, allowClear} = this.props;
const {text} = this.state;
if (disabled || !allowClear) return;
if (!text) {
this.togglePickerVisible();
} else {
this.setState({
text: '',
value: null,
pickerVisible: false,
confirmValue: null
},()=> {
this.props.onVisibleChange(false);
this.props.onChange(null);
});
}
}
// 面板打开或关闭的回调
onVisibleChange = (visible) => {
if(this.inputClick && !visible){
this.inputClick = false;
return;
}
this.inputClick = false;
this.setState({
pickerVisible: visible,
}, () => {
if(!visible) {
this.saveValidInputValue();
}else{
this.props.onVisibleChange(visible);
}
});
}
// 保存合法的输入值
saveValidInputValue = () => {
const {value, confirmValue} = this.state;
if(value && value.length === 2 && this.onError) {
const error = this.onError([value[0], value[1]]);
if(error) {
this.setState({
pickerVisible: error,
});
return;
}
}
if (this.isDateValid(value) && !equalDateArr(value, confirmValue)) {
this.onPicked(value, false, true);
}else{
this.onCancelPicked();
}
}
render() {
const {
startPlaceholder,
endPlaceholder,
separator,
showTrigger,
allowClear,
disabled,
className,
placement,
prefixCls,
getPopupContainer,
style
} = this.props;
const {pickerVisible, value, text} = this.state;
const calcIsShowTrigger = () => {
if (showTrigger !== null) {
return !!showTrigger;
} else {
return haveTriggerType(this.type);
}
};
const triggerClass = () => {
return this.type.includes('date') || this.type.includes('week') ? 'date-line' : 'time-line';
};
// 前缀图标
const prefixIcon = () => {
if (calcIsShowTrigger()) {
return (
<Icon
className={classNames(`${prefixCls}-date-picker-icon`, 'prefix-iconfont')}
type={triggerClass()}
/>
);
} else {
return null;
}
};
// 后缀图标
const suffixIcon = () => {
if (text && allowClear) {
return (
<Icon
className={classNames(`${prefixCls}-date-picker-icon`, 'suffix-iconfont')}
type="close-circle-fill"
onClick={this.handleClickCloseIcon}
/>
);
} else {
return null;
}
};
// 下拉面板
const getPickerPanel = () => {
return this.pickerPanel(this.state);
};
// 选择框
const getInputPanel = () => {
return (
<span
className={classNames(`${prefixCls}-date-editor`, className, {
'is-have-trigger': calcIsShowTrigger(),
'is-active': pickerVisible,
'is-filled': !!value,
'is-disable': disabled
})}
style={{...style}}
onClick={() => this.inputClick = true}
>
<div className={classNames(`${prefixCls}-date-editor--${this.type}`, {
'is-active': pickerVisible,
'disabled': disabled
})}>
<Input
disabled={disabled}
type="text"
placeholder={startPlaceholder}
onFocus={this.handleFocus}
onBlur={this.handleBlur}
onKeyDown={this.handleKeydown}
onChange={e => {
const inputValue = e.target.value;
const ndate = this.parseDate(inputValue);
if (!isInputValid(inputValue, ndate)) {
this.setState({
text: [inputValue, this.state.text[1]],
pickerVisible: true
});
} else {//only set value on a valid date input
this.setState({
text: [inputValue, this.state.text[1]],
value: [ndate, this.state.value[1]],
pickerVisible: true
});
}
}}
ref={e => this.refInputRoot = e}
value={text && text.length == 2 ? text[0] : ''}
prefix={prefixIcon()}
/>
<span className={classNames("range-separator", {'disabled': disabled})}>{separator}</span>
<Input
className={`${prefixCls}-date-range-picker-second-input`}
disabled={disabled}
type="text"
placeholder={endPlaceholder}
onFocus={this.handleFocus}
onBlur={this.handleBlur}
onKeyDown={this.handleKeydown}
onChange={e => {
const inputValue = e.target.value;
const ndate = this.parseDate(inputValue);
if (!isInputValid(inputValue, ndate)) {
this.setState({
text: [this.state.text[0], inputValue],
pickerVisible: true
});
} else {//only set value on a valid date input
this.setState({
text: [this.state.text[0], inputValue],
value: [this.state.value[0], ndate],
pickerVisible: true
});
}
}}
value={text && text.length == 2 ? text[1] : ''}
suffix={suffixIcon()}
/>
</div>
</span>
);
};
return (
<Trigger
action={disabled ? [] : ['click']}
builtinPlacements={placements}
ref={node => this.trigger = node}
getPopupContainer={getPopupContainer}
onPopupVisibleChange={this.onVisibleChange}
popup={getPickerPanel()}
popupPlacement={placement}
popupVisible={pickerVisible}
prefixCls={`${prefixCls}-date-time-picker-popup`}
destroyPopupOnHide={true}
>
{getInputPanel()}
</Trigger>
);
}
}
polyfill(DateRangeBasePicker);
export default DateRangeBasePicker;
| 27.808791 | 121 | 0.559393 |
de0bd6abb6a8e9b1c14233430cefc46d05f9d1e4 | 222 | js | JavaScript | next.config.js | miacona96/Client-Connect | 4819e53cdbb843b0ae7b4d24ce3f3a1ff2f012b7 | [
"Unlicense"
] | 6 | 2018-12-18T19:34:42.000Z | 2021-04-15T04:12:24.000Z | next.config.js | miacona96/Client-Connect | 4819e53cdbb843b0ae7b4d24ce3f3a1ff2f012b7 | [
"Unlicense"
] | 11 | 2018-11-25T17:56:31.000Z | 2018-12-16T17:03:31.000Z | next.config.js | miacona96/Client-Connect | 4819e53cdbb843b0ae7b4d24ce3f3a1ff2f012b7 | [
"Unlicense"
] | 2 | 2018-12-13T23:38:24.000Z | 2019-01-11T21:16:50.000Z | const withImages = require('next-images')
const withSass = require('@zeit/next-sass')
module.exports = withImages(withSass({
webpack: function(config) {
config.externals.push('fs')
return config;
}
}))
| 24.666667 | 43 | 0.671171 |
de0bea27b8f0cbfdf90ecec7d443c2c14f70e6d7 | 1,297 | js | JavaScript | javascript/test/input/sample.js | anag004/piranha | f25f538f6414ce5e2dcc46bcbd864dbba4da28cf | [
"Apache-2.0"
] | null | null | null | javascript/test/input/sample.js | anag004/piranha | f25f538f6414ce5e2dcc46bcbd864dbba4da28cf | [
"Apache-2.0"
] | null | null | null | javascript/test/input/sample.js | anag004/piranha | f25f538f6414ce5e2dcc46bcbd864dbba4da28cf | [
"Apache-2.0"
] | null | null | null | /**
* Copyright (c) 2019 Uber Technologies, Inc.
*
* <p>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
*
* <p>http://www.apache.org/licenses/LICENSE-2.0
*
* <p>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.
*/
// Simple flag cleanup in conditional
if (isFlagTreated(featureFlag)) {
f1();
} else {
f2();
}
// ---------------------------------
// Assignment cleanup
var a = isToggleDisabled(featureFlag);
if (a) {
f1();
} else {
f2();
}
// ----------------------------------
// function cleanup
function b() {
return isFlagTreated(featureFlag);
}
if (b() || f1()) {
f1();
} else {
f2();
}
// ----------------------------------
// Complex cleanup
var c = isToggleDisabled(featureFlag)
? f1()
: isToggleDisabled(featureFlag)
? f2()
: isFlagTreated(featureFlag)
? f3()
: f4();
// Literal conversion
console.log(isFlagTreated(featureFlag));
| 22.362069 | 99 | 0.614495 |
de0c370bf078e8de1a164d5f02e48d4d129823ab | 128 | js | JavaScript | tests/baselines/reference/sourceMap-Comment1.js | panagosg7/TypeScript-1.0.1.0 | 3bb96d217c8f23596aa86679a70056b58e953464 | [
"Apache-2.0"
] | null | null | null | tests/baselines/reference/sourceMap-Comment1.js | panagosg7/TypeScript-1.0.1.0 | 3bb96d217c8f23596aa86679a70056b58e953464 | [
"Apache-2.0"
] | null | null | null | tests/baselines/reference/sourceMap-Comment1.js | panagosg7/TypeScript-1.0.1.0 | 3bb96d217c8f23596aa86679a70056b58e953464 | [
"Apache-2.0"
] | null | null | null | //// [sourceMap-Comment1.ts]
// Comment
//// [sourceMap-Comment1.js]
// Comment
//# sourceMappingURL=sourceMap-Comment1.js.map
| 18.285714 | 46 | 0.703125 |
de0d101bfbd72d33ae6191a22298b7ce50491407 | 118 | js | JavaScript | src/ex4_js-objects-part2/task-05.js | Mego27/external-courses | 39b5c3f30886742dcab7d7f820cc0358b5755a57 | [
"MIT"
] | null | null | null | src/ex4_js-objects-part2/task-05.js | Mego27/external-courses | 39b5c3f30886742dcab7d7f820cc0358b5755a57 | [
"MIT"
] | 3 | 2020-03-19T20:09:38.000Z | 2020-04-16T09:39:08.000Z | src/ex4_js-objects-part2/task-05.js | Mego27/external-courses | 39b5c3f30886742dcab7d7f820cc0358b5755a57 | [
"MIT"
] | null | null | null | function searchSubString(string, subString){
return string.includes(subString);
}
module.exports = searchSubString; | 29.5 | 45 | 0.805085 |
de0d2c0363e612064caf084e29093a0a55d988b0 | 1,404 | js | JavaScript | src/pages/chart/Chart.js | xiaomaolv-company/xiaomaolv | c57468affd854288f710042f3454496d4ef62723 | [
"MIT"
] | null | null | null | src/pages/chart/Chart.js | xiaomaolv-company/xiaomaolv | c57468affd854288f710042f3454496d4ef62723 | [
"MIT"
] | null | null | null | src/pages/chart/Chart.js | xiaomaolv-company/xiaomaolv | c57468affd854288f710042f3454496d4ef62723 | [
"MIT"
] | null | null | null | import React, {useState, useEffect} from 'react';
import './Chart.less';
import {Button, InputItem, List} from "antd-mobile";
import io from 'socket.io-client';
import * as urlConfig from '../../utils/urlConfig';
function Chart() {
const [chartData, setChartData] = useState([]);
const [inputValue, setInputValue] = useState("");
const socket = io.connect(urlConfig.realTimeUrl);
useEffect(() => {
console.log("执行effect函数了")
socket.emit("realTime");
socket.on("realTime", data => {
console.log(data, 'nodejs返回的数据')
if (data.flag === 0) {
setChartData(data.data);
}
});
}, []);
function handle() {
socket.emit("addData", {name: inputValue});
socket.on("addData", data => {
if (data.flag === 0) {
console.log(data.data, `${data.message}`)
}
})
// socket.emit("realTime");
}
return (
<div className="Chart">
<List>
<InputItem
onChange={(value) => {
setInputValue(value)
}}
clear
placeholder="请输入文本"
value={inputValue}
>人员:</InputItem>
</List>
<Button type="primary" onClick={() => {
handle();
}}>添加人员</Button>
{
chartData.map(item => {
return (
<div key={item.id}>{item.name}</div>
)
})
}
</div>
)
}
export default Chart; | 21.272727 | 52 | 0.530627 |
de0d453f397efab2fba12b382200e11fc2095ba9 | 590 | js | JavaScript | node_modules/mkdirp/test/clobber.min.js | laderma/S-theticHair | 0758789cf1fdc0ebc00f6d207ddb351b0058d6b5 | [
"MIT"
] | null | null | null | node_modules/mkdirp/test/clobber.min.js | laderma/S-theticHair | 0758789cf1fdc0ebc00f6d207ddb351b0058d6b5 | [
"MIT"
] | null | null | null | node_modules/mkdirp/test/clobber.min.js | laderma/S-theticHair | 0758789cf1fdc0ebc00f6d207ddb351b0058d6b5 | [
"MIT"
] | null | null | null | for(var mkdirp=require("../").mkdirp,path=require("path"),fs=require("fs"),test=require("tap").test,ps=["","tmp"],i=0;25>i;i++){var dir=Math.floor(Math.random()*Math.pow(16,4)).toString(16);ps.push(dir)}var file=ps.join("/"),itw=ps.slice(0,3).join("/");test("clobber-pre",function(n){console.error("about to write to "+itw),fs.writeFileSync(itw,"I AM IN THE WAY, THE TRUTH, AND THE LIGHT."),fs.stat(itw,function(e,t){n.ifError(e),n.ok(t&&t.isFile(),"should be file"),n.end()})}),test("clobber",function(n){n.plan(2),mkdirp(file,493,function(e){n.ok(e),n.equal(e.code,"ENOTDIR"),n.end()})}); | 590 | 590 | 0.664407 |
de0d4c190eae613abe90e209bf3c9db0118dd33d | 1,386 | js | JavaScript | x-pack/plugins/canvas/public/components/app/index.js | rightedges/kibana | 6ee1bf9c69c5fb7ae4b511f4b03f6060d6f1e892 | [
"Apache-2.0"
] | null | null | null | x-pack/plugins/canvas/public/components/app/index.js | rightedges/kibana | 6ee1bf9c69c5fb7ae4b511f4b03f6060d6f1e892 | [
"Apache-2.0"
] | null | null | null | x-pack/plugins/canvas/public/components/app/index.js | rightedges/kibana | 6ee1bf9c69c5fb7ae4b511f4b03f6060d6f1e892 | [
"Apache-2.0"
] | null | null | null | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { connect } from 'react-redux';
import { compose, withProps } from 'recompose';
import { getAppReady, getBasePath } from '../../state/selectors/app';
import { appReady, appError } from '../../state/actions/app';
import { App as Component } from './app';
const mapStateToProps = state => {
// appReady could be an error object
const appState = getAppReady(state);
return {
appState: typeof appState === 'object' ? appState : { ready: appState },
basePath: getBasePath(state),
};
};
const mapDispatchToProps = dispatch => ({
setAppReady: () => async () => {
try {
// set app state to ready
dispatch(appReady());
} catch (e) {
dispatch(appError(e));
}
},
setAppError: payload => dispatch(appError(payload)),
});
const mergeProps = (stateProps, dispatchProps, ownProps) => {
return {
...ownProps,
...stateProps,
...dispatchProps,
setAppReady: dispatchProps.setAppReady(stateProps.basePath),
};
};
export const App = compose(
connect(mapStateToProps, mapDispatchToProps, mergeProps),
withProps(() => ({
onRouteChange: () => undefined,
}))
)(Component);
| 27.176471 | 79 | 0.663781 |
de0d8a4daf488835250ffdb8ca5d1b9042cea06b | 948 | js | JavaScript | lnd_gateway/subscribe_to_response.js | hsjoberg/lightning-1 | 4dcde09a9442fcbb11ada0cbb08cd32014fa9f6c | [
"MIT"
] | null | null | null | lnd_gateway/subscribe_to_response.js | hsjoberg/lightning-1 | 4dcde09a9442fcbb11ada0cbb08cd32014fa9f6c | [
"MIT"
] | null | null | null | lnd_gateway/subscribe_to_response.js | hsjoberg/lightning-1 | 4dcde09a9442fcbb11ada0cbb08cd32014fa9f6c | [
"MIT"
] | 1 | 2021-06-03T23:59:06.000Z | 2021-06-03T23:59:06.000Z | const {encodeAsync} = require('cbor');
/** Make a request to LND that returns subscription events
{
lnd: <LND gRPC API Object>
method: <LND Method Name String>
params: <Method Arguments Object>
server: <LND RPC Server Name String>
ws: {
on: <Websocket Attach Listener Function>
send: <Send Response Function>
}
}
@returns
{
cancel: <Cancel Request Function>
}
*/
module.exports = ({lnd, method, params, server, ws}) => {
const sub = lnd[server][method](params);
const sendResponse = async (ws, event, data) => {
return ws.send(await encodeAsync({data, event}));
};
sub.on('data', data => sendResponse(ws, 'data', data));
sub.on('end', () => sendResponse(ws, 'end'));
sub.on('status', s => sendResponse(ws, 'status', s));
sub.on('error', err => sendResponse(ws, 'error', {
details: err.details,
message: err.message,
}));
return {cancel: () => sub.cancel()};
};
| 24.307692 | 58 | 0.611814 |
de0f24d8ca49f0f838656f2a1098d052cb089271 | 151 | js | JavaScript | .eslintrc.js | abstracter-io/atomic-release | ab50fd943ac759363a07c657d3df9aa593f57f25 | [
"MIT"
] | 13 | 2021-11-09T10:02:20.000Z | 2022-03-12T12:35:33.000Z | .eslintrc.js | abstracter-io/atomic-release | ab50fd943ac759363a07c657d3df9aa593f57f25 | [
"MIT"
] | 5 | 2021-11-25T21:04:22.000Z | 2022-01-04T21:14:27.000Z | .eslintrc.js | abstracter-io/atomic-release | ab50fd943ac759363a07c657d3df9aa593f57f25 | [
"MIT"
] | null | null | null | const config = {
extends: [
"@abstracter/eslint-config/jest",
"@abstracter/eslint-config/typescript-node",
],
};
module.exports = config;
| 16.777778 | 48 | 0.655629 |
de108ffdb004f2cdd655614da0a5da0f95469c16 | 850 | js | JavaScript | executer/commands/Genel/link.js | mehmetsss/aaaaaaaaaaaaaa | cc07153e0579f6c6610f06e9d799f6abfee763f0 | [
"MIT"
] | null | null | null | executer/commands/Genel/link.js | mehmetsss/aaaaaaaaaaaaaa | cc07153e0579f6c6610f06e9d799f6abfee763f0 | [
"MIT"
] | null | null | null | executer/commands/Genel/link.js | mehmetsss/aaaaaaaaaaaaaa | cc07153e0579f6c6610f06e9d799f6abfee763f0 | [
"MIT"
] | null | null | null | const Discord = require('discord.js');
const ayarlar = require('../../../inventory/helpers/config');
const Command = require("../../../inventory/base/Command");
class Call extends Command {
constructor(client) {
super(client, {
name: "link",
description: "sunucunun linkini gönderir",
usage: "link",
examples: ["link"],
aliases: [],
permLvl: [],
cooldown: 300000,
enabled: true,
adminOnly: false,
ownerOnly: false,
onTest: false,
rootOnly: false,
dmCmd: false
});
}
async run(client, message, args, data) {
if (!message.guild.vanityURLCode) return;
message.channel.send(`discord.gg/${message.guild.vanityURLCode}`);
}
}
module.exports = Call; | 27.419355 | 74 | 0.535294 |
de11c553648acc07f2b61f2dfa4b427dbfbe9826 | 411 | js | JavaScript | test/serializer/abstract/object-assign11.js | himanshiLt/prepack | 185bc0208b0ab98950f45b8dc33307209b6f21ac | [
"BSD-3-Clause"
] | 15,477 | 2017-05-03T17:07:59.000Z | 2022-02-11T15:50:02.000Z | test/serializer/abstract/object-assign11.js | himanshiLt/prepack | 185bc0208b0ab98950f45b8dc33307209b6f21ac | [
"BSD-3-Clause"
] | 1,419 | 2017-05-03T17:40:19.000Z | 2022-02-10T16:38:28.000Z | test/serializer/abstract/object-assign11.js | himanshiLt/prepack | 185bc0208b0ab98950f45b8dc33307209b6f21ac | [
"BSD-3-Clause"
] | 609 | 2017-05-03T17:12:43.000Z | 2022-01-25T06:55:55.000Z | var obj =
global.__abstract && global.__makePartial && global.__makeSimple
? __makeSimple(__makePartial(__abstract({}, "({foo:1})")))
: { foo: 1 };
var copyOfObj = {};
var y = 0;
Object.assign(copyOfObj, obj);
var proto = {};
Object.defineProperty(proto, "foo", {
enumerable: true,
set() {
y = 42;
},
});
copyOfObj.__proto__ = proto;
inspect = function() {
return JSON.stringify(y);
};
| 18.681818 | 66 | 0.625304 |
de11db1efa9fa0c035807e017c3477d822fd34bb | 2,409 | js | JavaScript | test/helpers/sign.js | animocabrands/f1dt-ethereum-contracts | 67457e866758d9ae49fe7627a28bd4b456181aa9 | [
"MIT"
] | 3 | 2021-05-19T16:04:39.000Z | 2022-03-15T15:26:50.000Z | test/helpers/sign.js | animocabrands/f1dt-ethereum-contracts | 67457e866758d9ae49fe7627a28bd4b456181aa9 | [
"MIT"
] | null | null | null | test/helpers/sign.js | animocabrands/f1dt-ethereum-contracts | 67457e866758d9ae49fe7627a28bd4b456181aa9 | [
"MIT"
] | 1 | 2021-04-13T14:04:11.000Z | 2021-04-13T14:04:11.000Z | function toEthSignedMessageHash(messageHex) {
const messageBuffer = Buffer.from(messageHex.substring(2), 'hex');
const prefix = Buffer.from(`\u0019Ethereum Signed Message:\n${messageBuffer.length}`);
return web3.utils.sha3(Buffer.concat([prefix, messageBuffer]));
}
function fixSignature(signature) {
// in geth its always 27/28, in ganache its 0/1. Change to 27/28 to prevent
// signature malleability if version is 0/1
// see https://github.com/ethereum/go-ethereum/blob/v1.8.23/internal/ethapi/api.go#L465
let v = parseInt(signature.slice(130, 132), 16);
if (v < 27) {
v += 27;
}
const vHex = v.toString(16);
return signature.slice(0, 130) + vHex;
}
// signs message in node (ganache auto-applies "Ethereum Signed Message" prefix)
async function signMessage(signer, messageHex = '0x') {
return fixSignature(await web3.eth.sign(messageHex, signer));
}
/**
* Create a signer between a contract and a signer for a voucher of method, args, and redeemer
* Note that `method` is the web3 method, not the truffle-contract method
* @param contract TruffleContract
* @param signer address
* @param redeemer address
* @param methodName string
* @param methodArgs any[]
*/
const getSignFor = (contract, signer) => (redeemer, methodName, methodArgs = []) => {
const parts = [contract.address, redeemer];
const REAL_SIGNATURE_SIZE = 2 * 65; // 65 bytes in hexadecimal string length
const PADDED_SIGNATURE_SIZE = 2 * 96; // 96 bytes in hexadecimal string length
const DUMMY_SIGNATURE = `0x${web3.utils.padLeft('', REAL_SIGNATURE_SIZE)}`;
// if we have a method, add it to the parts that we're signing
if (methodName) {
if (methodArgs.length > 0) {
parts.push(
contract.contract.methods[methodName](...methodArgs.concat([DUMMY_SIGNATURE]))
.encodeABI()
.slice(0, -1 * PADDED_SIGNATURE_SIZE)
);
} else {
const abi = contract.abi.find((abi) => abi.name === methodName);
parts.push(abi.signature);
}
}
// return the signature of the "Ethereum Signed Message" hash of the hash of `parts`
const messageHex = web3.utils.soliditySha3(...parts);
return signMessage(signer, messageHex);
};
module.exports = {
signMessage,
toEthSignedMessageHash,
fixSignature,
getSignFor,
};
| 37.061538 | 94 | 0.663346 |
de1271561495bebbb9313afa63337c2c30162c5d | 844 | js | JavaScript | tesseract.js-overload/lang.js | rosogon/node-red-contrib-tesseract | be5c8932d69dbf84643b122b6829b8f6a2898aff | [
"Apache-2.0"
] | 5 | 2019-09-17T17:48:38.000Z | 2021-12-18T08:15:07.000Z | tesseract.js-overload/lang.js | rosogon/node-red-contrib-tesseract | be5c8932d69dbf84643b122b6829b8f6a2898aff | [
"Apache-2.0"
] | 4 | 2021-06-11T01:05:40.000Z | 2021-06-11T01:05:43.000Z | tesseract.js-overload/lang.js | macleodconstruction/node-red-contrib-tesseract-mac | 34abe4229b2e5a8b1f657a0c3df120ffd563d35f | [
"Apache-2.0"
] | 9 | 2018-07-03T13:19:31.000Z | 2021-12-14T22:26:33.000Z | const request = require("request"),
zlib = require("zlib"),
fs = require("fs"),
path = require("path");
var langdata = require('../../tesseract.js/src/common/langdata.json')
function getLanguageData(req, res, cb){
var lang = req.options.lang;
var langfile = lang + '.traineddata.gz';
var url = req.workerOptions.langPath + langfile;
fs.readFile(path.join(__dirname, '../langs/') + lang + '.traineddata', function (err, data) {
if(!err) return cb(new Uint8Array(data));
request(url, {encoding: null}, function (error, response, body) {
zlib.gunzip(body, function(err, dezipped) {
fs.writeFile(path.join(__dirname, '../langs/') + lang + '.traineddata', dezipped, "binary",function(err) {
getLanguageData(req, res, cb);
});
});
});
});
}
module.exports = getLanguageData; | 33.76 | 111 | 0.629147 |
de12bfeb7e22655c06ded82e676f26bf7e98d47d | 1,731 | js | JavaScript | study/controller/layout.client.controller.js | zwmei/NXQS | 92114c854581a99454a51ae580d67f0696ce7db2 | [
"MIT"
] | null | null | null | study/controller/layout.client.controller.js | zwmei/NXQS | 92114c854581a99454a51ae580d67f0696ce7db2 | [
"MIT"
] | null | null | null | study/controller/layout.client.controller.js | zwmei/NXQS | 92114c854581a99454a51ae580d67f0696ce7db2 | [
"MIT"
] | null | null | null | /**
* Created by wayne on 16/7/26.
*/
$(function () {
$('.more-button').click(function () {
//已经展开
if ($(this).hasClass('more')) {
$('.text-container').addClass('close');
$(this).removeClass('more');
$(this).text('查看更多');
}
else {
$('.text-container').removeClass('close');
$(this).addClass('more');
$(this).text('收起');
}
});
var isStopTimer = false;
function getRandomNumber() {
return Math.round((Math.random() * 8)) + 1;
}
function repeatSth(startTime, totalTime, eachCallback, endCallback) {
setTimeout(function () {
startTime += 50;
if (startTime === totalTime || isStopTimer) {
return endCallback();
}
eachCallback();
repeatSth(startTime, totalTime, eachCallback, endCallback);
}, 50);
}
$('.winner-number .do-button').click(function () {
var button = $(this);
if (button.hasClass('busy')) {
return isStopTimer = true;
}
isStopTimer = false;
button.addClass('busy');
repeatSth(0, 5*1000, function () {
$('.winner-number .number').text(getRandomNumber());
}, function () {
button.removeClass('busy');
});
});
Qiniu.domain = 'https://dn-agilepops.qbox.me/';
var imgLink = Qiniu.watermark({
mode: 2, // 文字水印
text: '2016/08/18 14:03', // 水印文字,mode = 2时,必需
dissolve: 90, // 透明度,取值范围1-100,非必需,下同
gravity: 'SouthEast', // 水印位置,同上
fontsize: 500, // 字体大小,单位:缇
font : '黑体', // 水印文字字体
dx: 35, // 横轴边距,单位:像素(px)
dy: 25, // 纵轴边距,单位:像素(px)
fill: '#FF6666' // 水印文字颜色,RGB格式,可以是颜色名称
}, 'android1057b157b1201608151751190931');
$('.water-maker').attr('src', imgLink);
}); | 23.391892 | 71 | 0.551704 |
de130cdbf1e36a683b470142a0dd8d9a40aad68c | 391,792 | js | JavaScript | lib/angularJS-material/angular-material.min.js | giuliobosco/implement-ui | 69be2d951cb1ee24755e5f37435dd7a6ff02b39c | [
"MIT"
] | 2 | 2019-05-09T14:04:30.000Z | 2019-05-10T07:29:07.000Z | lib/angularJS-material/angular-material.min.js | giuliobosco/implement-ui | 69be2d951cb1ee24755e5f37435dd7a6ff02b39c | [
"MIT"
] | null | null | null | lib/angularJS-material/angular-material.min.js | giuliobosco/implement-ui | 69be2d951cb1ee24755e5f37435dd7a6ff02b39c | [
"MIT"
] | 1 | 2018-05-29T20:49:50.000Z | 2018-05-29T20:49:50.000Z | /*!
* AngularJS Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.8
*/
!function(e,t,n){"use strict";!function(){t.module("ngMaterial",["ng","ngAnimate","ngAria","material.core","material.core.gestures","material.core.interaction","material.core.layout","material.core.meta","material.core.theming.palette","material.core.theming","material.core.animate","material.components.autocomplete","material.components.backdrop","material.components.bottomSheet","material.components.button","material.components.card","material.components.checkbox","material.components.chips","material.components.colors","material.components.content","material.components.datepicker","material.components.dialog","material.components.divider","material.components.fabActions","material.components.fabShared","material.components.fabSpeedDial","material.components.fabToolbar","material.components.gridList","material.components.icon","material.components.input","material.components.list","material.components.menu","material.components.menuBar","material.components.navBar","material.components.panel","material.components.progressCircular","material.components.progressLinear","material.components.radioButton","material.components.showHide","material.components.select","material.components.sidenav","material.components.slider","material.components.sticky","material.components.subheader","material.components.swipe","material.components.switch","material.components.tabs","material.components.toast","material.components.toolbar","material.components.tooltip","material.components.truncate","material.components.virtualRepeat","material.components.whiteframe"])}(),function(){function e(e,t){if(t.has("$swipe")){var n="You are using the ngTouch module. \nAngularJS Material already has mobile click, tap, and swipe support... \nngTouch is not supported with AngularJS Material!";e.warn(n)}}function n(e,t){e.decorator("$$rAF",["$delegate",o]),e.decorator("$q",["$delegate",i]),t.theme("default").primaryPalette("indigo").accentPalette("pink").warnPalette("deep-orange").backgroundPalette("grey")}function o(e){return e.throttle=function(t){var n,o,i,r;return function(){n=arguments,r=this,i=t,o||(o=!0,e(function(){i.apply(r,Array.prototype.slice.call(n)),o=!1}))}},e}function i(e){return e.resolve||(e.resolve=e.when),e}e.$inject=["$log","$injector"],n.$inject=["$provide","$mdThemingProvider"],o.$inject=["$delegate"],i.$inject=["$delegate"],t.module("material.core",["ngAnimate","material.core.animate","material.core.layout","material.core.interaction","material.core.gestures","material.core.theming"]).config(n).run(e)}(),function(){function e(e){function n(n,o,i){function r(e){t.isUndefined(e)&&(e=!0),o.toggleClass("md-autofocus",!!e)}var a=i.mdAutoFocus||i.mdAutofocus||i.mdSidenavFocus;r(e(a)(n)),a&&n.$watch(a,r)}return{restrict:"A",link:{pre:n}}}e.$inject=["$parse"],t.module("material.core").directive("mdAutofocus",e).directive("mdAutoFocus",e).directive("mdSidenavFocus",e)}(),function(){function e(){function e(e){var t="#"===e[0]?e.substr(1):e,n=t.length/3,o=t.substr(0,n),i=t.substr(n,n),r=t.substr(2*n);return 1===n&&(o+=o,i+=i,r+=r),"rgba("+parseInt(o,16)+","+parseInt(i,16)+","+parseInt(r,16)+",0.1)"}function t(e){e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);var t=e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):"";return t.toUpperCase()}function n(e){return e.replace(")",", 0.1)").replace("(","a(")}function o(e){return e?e.replace("rgba","rgb").replace(/,[^),]+\)/,")"):"rgb(0,0,0)"}return{rgbaToHex:t,hexToRgba:e,rgbToRgba:n,rgbaToRgb:o}}t.module("material.core").factory("$mdColorUtil",e)}(),function(){function e(){function e(e){var t=a+"-"+e,i=o(t),d=i.charAt(0).toLowerCase()+i.substring(1);return n(r,e)?e:n(r,i)?i:n(r,d)?d:e}function n(e,n){return t.isDefined(e.style[n])}function o(e){return e.replace(s,function(e,t,n,o){return o?n.toUpperCase():n})}function i(e){var t,n,o=/^(Moz|webkit|ms)(?=[A-Z])/;for(t in e.style)if(n=o.exec(t))return n[0]}var r=document.createElement("div"),a=i(r),d=/webkit/i.test(a),s=/([:\-_]+(.))/g,c={isInputKey:function(e){return e.keyCode>=31&&e.keyCode<=90},isNumPadKey:function(e){return 3===e.location&&e.keyCode>=97&&e.keyCode<=105},isMetaKey:function(e){return e.keyCode>=91&&e.keyCode<=93},isFnLockKey:function(e){return e.keyCode>=112&&e.keyCode<=145},isNavigationKey:function(e){var t=c.KEY_CODE,n=[t.SPACE,t.ENTER,t.UP_ARROW,t.DOWN_ARROW];return n.indexOf(e.keyCode)!=-1},hasModifierKey:function(e){return e.ctrlKey||e.metaKey||e.altKey},ELEMENT_MAX_PIXELS:1533917,BEFORE_NG_ARIA:210,KEY_CODE:{COMMA:188,SEMICOLON:186,ENTER:13,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,TAB:9,BACKSPACE:8,DELETE:46},CSS:{TRANSITIONEND:"transitionend"+(d?" webkitTransitionEnd":""),ANIMATIONEND:"animationend"+(d?" webkitAnimationEnd":""),TRANSFORM:e("transform"),TRANSFORM_ORIGIN:e("transformOrigin"),TRANSITION:e("transition"),TRANSITION_DURATION:e("transitionDuration"),ANIMATION_PLAY_STATE:e("animationPlayState"),ANIMATION_DURATION:e("animationDuration"),ANIMATION_NAME:e("animationName"),ANIMATION_TIMING:e("animationTimingFunction"),ANIMATION_DIRECTION:e("animationDirection")},MEDIA:{xs:"(max-width: 599px)","gt-xs":"(min-width: 600px)",sm:"(min-width: 600px) and (max-width: 959px)","gt-sm":"(min-width: 960px)",md:"(min-width: 960px) and (max-width: 1279px)","gt-md":"(min-width: 1280px)",lg:"(min-width: 1280px) and (max-width: 1919px)","gt-lg":"(min-width: 1920px)",xl:"(min-width: 1920px)",landscape:"(orientation: landscape)",portrait:"(orientation: portrait)",print:"print"},MEDIA_PRIORITY:["xl","gt-lg","lg","gt-md","md","gt-sm","sm","gt-xs","xs","landscape","portrait","print"]};return c}t.module("material.core").factory("$mdConstant",e)}(),function(){function e(e,n){function o(){return[].concat(v)}function i(){return v.length}function r(e){return v.length&&e>-1&&e<v.length}function a(e){return!!e&&r(u(e)+1)}function d(e){return!!e&&r(u(e)-1)}function s(e){return r(e)?v[e]:null}function c(e,t){return v.filter(function(n){return n[e]===t})}function l(e,n){return e?(t.isNumber(n)||(n=v.length),v.splice(n,0,e),u(e)):-1}function m(e){p(e)&&v.splice(u(e),1)}function u(e){return v.indexOf(e)}function p(e){return e&&u(e)>-1}function h(){return v.length?v[0]:null}function f(){return v.length?v[v.length-1]:null}function g(e,o,i,a){i=i||b;for(var d=u(o);;){if(!r(d))return null;var s=d+(e?-1:1),c=null;if(r(s)?c=v[s]:n&&(c=e?f():h(),s=u(c)),null===c||s===a)return null;if(i(c))return c;t.isUndefined(a)&&(a=s),d=s}}var b=function(){return!0};e&&!t.isArray(e)&&(e=Array.prototype.slice.call(e)),n=!!n;var v=e||[];return{items:o,count:i,inRange:r,contains:p,indexOf:u,itemAt:s,findBy:c,add:l,remove:m,first:h,last:f,next:t.bind(null,g,!1),previous:t.bind(null,g,!0),hasPrevious:d,hasNext:a}}t.module("material.core").config(["$provide",function(t){t.decorator("$mdUtil",["$delegate",function(t){return t.iterator=e,t}])}])}(),function(){function e(e,n,o){function i(e){var n=u[e];t.isUndefined(n)&&(n=u[e]=r(e));var o=h[n];return t.isUndefined(o)&&(o=a(n)),o}function r(t){return e.MEDIA[t]||("("!==t.charAt(0)?"("+t+")":t)}function a(e){var t=p[e];return t||(t=p[e]=o.matchMedia(e)),t.addListener(d),h[t.media]=!!t.matches}function d(e){n.$evalAsync(function(){h[e.media]=!!e.matches})}function s(e){return p[e]}function c(t,n){for(var o=0;o<e.MEDIA_PRIORITY.length;o++){var i=e.MEDIA_PRIORITY[o];if(p[u[i]].matches){var r=m(t,n+"-"+i);if(t[r])return t[r]}}return t[m(t,n)]}function l(n,o,i){var r=[];return n.forEach(function(n){var a=m(o,n);t.isDefined(o[a])&&r.push(o.$observe(a,t.bind(void 0,i,null)));for(var d in e.MEDIA)a=m(o,n+"-"+d),t.isDefined(o[a])&&r.push(o.$observe(a,t.bind(void 0,i,d)))}),function(){r.forEach(function(e){e()})}}function m(e,t){return f[t]||(f[t]=e.$normalize(t))}var u={},p={},h={},f={};return i.getResponsiveAttribute=c,i.getQuery=s,i.watchResponsiveAttributes=l,i}e.$inject=["$mdConstant","$rootScope","$window"],t.module("material.core").factory("$mdMedia",e)}(),function(){function e(e,n){function o(e){return e=t.isArray(e)?e:[e],e.forEach(function(t){s.forEach(function(n){e.push(n+"-"+t)})}),e}function i(e){return e=t.isArray(e)?e:[e],o(e).map(function(e){return"["+e+"]"}).join(",")}function r(e,t){if(e=d(e),!e)return!1;for(var n=o(t),i=0;i<n.length;i++)if(e.hasAttribute(n[i]))return!0;return!1}function a(e,t){e=d(e),e&&o(t).forEach(function(t){e.removeAttribute(t)})}function d(e){if(e=e[0]||e,e.nodeType)return e}var s=["data","x"];return e?n?i(e):o(e):{buildList:o,buildSelector:i,hasAttribute:r,removeAttribute:a}}t.module("material.core").config(["$provide",function(t){t.decorator("$mdUtil",["$delegate",function(t){return t.prefixer=e,t}])}])}(),function(){function o(o,r,a,d,s,c,l,m,u,p){function h(e){return e?f(e)||g(e)?e:e+"px":"0"}function f(e){return String(e).indexOf("px")>-1}function g(e){return String(e).indexOf("%")>-1}function b(e){return e[0]||e}var v=c.startSymbol(),E=c.endSymbol(),$="{{"===v&&"}}"===E,y=function(e,n,o){var i=!1;if(e&&e.length){var r=u.getComputedStyle(e[0]);i=t.isDefined(r[n])&&(!o||r[n]==o)}return i},C={dom:{},now:e.performance&&e.performance.now?t.bind(e.performance,e.performance.now):Date.now||function(){return(new Date).getTime()},getModelOption:function(e,t){if(e.$options){var n=e.$options;return n.getOption?n.getOption(t):n[t]}},bidi:function(e,n,i,r){var a=!("rtl"==o[0].dir||"rtl"==o[0].body.dir);if(0==arguments.length)return a?"ltr":"rtl";var d=t.element(e);a&&t.isDefined(i)?d.css(n,h(i)):!a&&t.isDefined(r)&&d.css(n,h(r))},bidiProperty:function(e,n,i,r){var a=!("rtl"==o[0].dir||"rtl"==o[0].body.dir),d=t.element(e);a&&t.isDefined(n)?(d.css(n,h(r)),d.css(i,"")):!a&&t.isDefined(i)&&(d.css(i,h(r)),d.css(n,""))},clientRect:function(e,t,n){var o=b(e);t=b(t||o.offsetParent||document.body);var i=o.getBoundingClientRect(),r=n?t.getBoundingClientRect():{left:0,top:0,width:0,height:0};return{left:i.left-r.left,top:i.top-r.top,width:i.width,height:i.height}},offsetRect:function(e,t){return C.clientRect(e,t,!0)},nodesToArray:function(e){e=e||[];for(var t=[],n=0;n<e.length;++n)t.push(e.item(n));return t},getViewportTop:function(){return e.scrollY||e.pageYOffset||0},findFocusTarget:function(e,n){function o(e,n){var o,i=e[0].querySelectorAll(n);return i&&i.length&&i.length&&t.forEach(i,function(e){e=t.element(e);var n=e.hasClass("md-autofocus");n&&(o=e)}),o}var i,r=this.prefixer("md-autofocus",!0);return i=o(e,n||r),i||n==r||(i=o(e,this.prefixer("md-auto-focus",!0)),i||(i=o(e,r))),i},disableScrollAround:function(e,n,i){function r(e){function n(e){e.preventDefault()}e=t.element(e||d);var o;return i.disableScrollMask?o=e:(o=t.element('<div class="md-scroll-mask"> <div class="md-scroll-mask-bar"></div></div>'),e.append(o)),o.on("wheel",n),o.on("touchmove",n),function(){o.off("wheel"),o.off("touchmove"),!i.disableScrollMask&&o[0].parentNode&&o[0].parentNode.removeChild(o[0])}}function a(){var e=o[0].documentElement,n=e.style.cssText||"",i=d.style.cssText||"",r=C.getViewportTop(),a=d.clientWidth,s=d.scrollHeight>d.clientHeight+1,c=e.scrollTop>0?e:d;return s&&t.element(d).css({position:"fixed",width:"100%",top:-r+"px"}),d.clientWidth<a&&(d.style.overflow="hidden"),s&&(e.style.overflowY="scroll"),function(){d.style.cssText=i,e.style.cssText=n,c.scrollTop=r}}if(i=i||{},C.disableScrollAround._count=Math.max(0,C.disableScrollAround._count||0),C.disableScrollAround._count++,C.disableScrollAround._restoreScroll)return C.disableScrollAround._restoreScroll;var d=o[0].body,s=a(),c=r(n);return C.disableScrollAround._restoreScroll=function(){--C.disableScrollAround._count<=0&&(s(),c(),delete C.disableScrollAround._restoreScroll)}},enableScrolling:function(){var e=this.disableScrollAround._restoreScroll;e&&e()},floatingScrollbars:function(){if(this.floatingScrollbars.cached===n){var e=t.element("<div><div></div></div>").css({width:"100%","z-index":-1,position:"absolute",height:"35px","overflow-y":"scroll"});e.children().css("height","60px"),o[0].body.appendChild(e[0]),this.floatingScrollbars.cached=e[0].offsetWidth==e[0].childNodes[0].offsetWidth,e.remove()}return this.floatingScrollbars.cached},forceFocus:function(t){var n=t[0]||t;document.addEventListener("click",function i(e){e.target===n&&e.$focus&&(n.focus(),e.stopImmediatePropagation(),e.preventDefault(),n.removeEventListener("click",i))},!0);var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!1,!0,e,{},0,0,0,0,!1,!1,!1,!1,0,null),o.$material=!0,o.$focus=!0,n.dispatchEvent(o)},createBackdrop:function(e,t){return a(C.supplant('<md-backdrop class="{0}">',[t]))(e)},supplant:function(e,t,n){return n=n||/\{([^{}]*)\}/g,e.replace(n,function(e,n){var o=n.split("."),i=t;try{for(var r in o)o.hasOwnProperty(r)&&(i=i[o[r]])}catch(a){i=e}return"string"==typeof i||"number"==typeof i?i:e})},fakeNgModel:function(){return{$fake:!0,$setTouched:t.noop,$setViewValue:function(e){this.$viewValue=e,this.$render(e),this.$viewChangeListeners.forEach(function(e){e()})},$isEmpty:function(e){return 0===(""+e).length},$parsers:[],$formatters:[],$viewChangeListeners:[],$render:t.noop}},debounce:function(e,t,o,i){var a;return function(){var d=o,s=Array.prototype.slice.call(arguments);r.cancel(a),a=r(function(){a=n,e.apply(d,s)},t||10,i)}},throttle:function(e,t){var n;return function(){var o=this,i=arguments,r=C.now();(!n||r-n>t)&&(e.apply(o,i),n=r)}},time:function(e){var t=C.now();return e(),C.now()-t},valueOnUse:function(e,t,n){var o=null,i=Array.prototype.slice.call(arguments),r=i.length>3?i.slice(3):[];Object.defineProperty(e,t,{get:function(){return null===o&&(o=n.apply(e,r)),o}})},nextUid:function(){return""+i++},disconnectScope:function(e){if(e&&e.$root!==e&&!e.$$destroyed){var t=e.$parent;e.$$disconnected=!0,t.$$childHead===e&&(t.$$childHead=e.$$nextSibling),t.$$childTail===e&&(t.$$childTail=e.$$prevSibling),e.$$prevSibling&&(e.$$prevSibling.$$nextSibling=e.$$nextSibling),e.$$nextSibling&&(e.$$nextSibling.$$prevSibling=e.$$prevSibling),e.$$nextSibling=e.$$prevSibling=null}},reconnectScope:function(e){if(e&&e.$root!==e&&e.$$disconnected){var t=e,n=t.$parent;t.$$disconnected=!1,t.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=t,n.$$childTail=t):n.$$childHead=n.$$childTail=t}},getClosest:function(e,n,o){if(t.isString(n)){var i=n.toUpperCase();n=function(e){return e.nodeName.toUpperCase()===i}}if(e instanceof t.element&&(e=e[0]),o&&(e=e.parentNode),!e)return null;do if(n(e))return e;while(e=e.parentNode);return null},elementContains:function(n,o){var i=e.Node&&e.Node.prototype&&Node.prototype.contains,r=i?t.bind(n,n.contains):t.bind(n,function(e){return n===o||!!(16&this.compareDocumentPosition(e))});return r(o)},extractElementByName:function(e,n,o,i){function r(e){return a(e)||(o?d(e):null)}function a(e){if(e)for(var t=0,o=e.length;t<o;t++)if(e[t].nodeName.toLowerCase()===n)return e[t];return null}function d(e){var t;if(e)for(var n=0,o=e.length;n<o;n++){var i=e[n];if(!t)for(var a=0,d=i.childNodes.length;a<d;a++)t=t||r([i.childNodes[a]])}return t}var s=r(e);return!s&&i&&l.warn(C.supplant("Unable to find node '{0}' in element '{1}'.",[n,e[0].outerHTML])),t.element(s||e)},initOptionalProperties:function(e,n,o){o=o||{},t.forEach(e.$$isolateBindings,function(i,r){if(i.optional&&t.isUndefined(e[r])){var a=t.isDefined(n[i.attrName]);e[r]=t.isDefined(o[r])?o[r]:a}})},nextTick:function(e,t,n){function o(){var e=i.queue,t=i.digest;i.queue=[],i.timeout=null,i.digest=!1,e.forEach(function(e){var t=e.scope&&e.scope.$$destroyed;t||e.callback()}),t&&d.$digest()}var i=C.nextTick,a=i.timeout,s=i.queue||[];return s.push({scope:n,callback:e}),null==t&&(t=!0),i.digest=i.digest||t,i.queue=s,a||(i.timeout=r(o,0,!1))},processTemplate:function(e){return $?e:e&&t.isString(e)?e.replace(/\{\{/g,v).replace(/}}/g,E):e},getParentWithPointerEvents:function(e){for(var t=e.parent();y(t,"pointer-events","none");)t=t.parent();return t},getNearestContentElement:function(e){for(var t=e.parent()[0];t&&t!==m[0]&&t!==document.body&&"MD-CONTENT"!==t.nodeName.toUpperCase();)t=t.parentNode;return t},checkStickySupport:function(){var e,n=t.element("<div>");o[0].body.appendChild(n[0]);for(var i=["sticky","-webkit-sticky"],r=0;r<i.length;++r)if(n.css({position:i[r],top:0,"z-index":2}),n.css("position")==i[r]){e=i[r];break}return n.remove(),e},parseAttributeBoolean:function(e,t){return""===e||!!e&&(t===!1||"false"!==e&&"0"!==e)},hasComputedStyle:y,isParentFormSubmitted:function(e){var n=C.getClosest(e,"form"),o=n?t.element(n).controller("form"):null;return!!o&&o.$submitted},animateScrollTo:function(e,t,n){function o(){var n=i();e.scrollTop=n,(s?n<t:n>t)&&p(o)}function i(){var e=n||1e3,t=C.now()-c;return r(t,a,d,e)}function r(e,t,n,o){if(e>o)return t+n;var i=(e/=o)*e,r=i*e;return t+n*(-2*r+3*i)}var a=e.scrollTop,d=t-a,s=a<t,c=C.now();p(o)},uniq:function(e){if(e)return e.filter(function(e,t,n){return n.indexOf(e)===t})}};return C.dom.animator=s(C),C}o.$inject=["$document","$timeout","$compile","$rootScope","$$mdAnimate","$interpolate","$log","$rootElement","$window","$$rAF"];var i=0;t.module("material.core").factory("$mdUtil",o),t.element.prototype.focus=t.element.prototype.focus||function(){return this.length&&this[0].focus(),this},t.element.prototype.blur=t.element.prototype.blur||function(){return this.length&&this[0].blur(),this}}(),function(){function e(){function e(){t.showWarnings=!1}var t={showWarnings:!0};return{disableWarnings:e,$get:["$$rAF","$log","$window","$interpolate",function(e,o,i,r){return n.apply(t,arguments)}]}}function n(e,n,o,i){function r(e,o,i){var r=t.element(e)[0]||e;!r||r.hasAttribute(o)&&0!==r.getAttribute(o).length||l(r,o)||(i=t.isString(i)?i.trim():"",i.length?e.attr(o,i):p&&n.warn('ARIA: Attribute "',o,'", required for accessibility, is missing on node:',r))}function a(t,n,o){e(function(){r(t,n,o())})}function d(e,t){var n=c(e)||"",o=n.indexOf(i.startSymbol())>-1;o?a(e,t,function(){return c(e)}):r(e,t,n)}function s(e,t){var n=c(e),o=n.indexOf(i.startSymbol())>-1;o||n||r(e,t,n)}function c(e){function t(t){for(;t.parentNode&&(t=t.parentNode)!==e;)if(t.getAttribute&&"true"===t.getAttribute("aria-hidden"))return!0}e=e[0]||e;for(var n,o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null,!1),i="";n=o.nextNode();)t(n)||(i+=n.textContent);return i.trim()||""}function l(e,t){function n(e){var t=e.currentStyle?e.currentStyle:o.getComputedStyle(e);return"none"===t.display}var i=e.hasChildNodes(),r=!1;if(i)for(var a=e.childNodes,d=0;d<a.length;d++){var s=a[d];1===s.nodeType&&s.hasAttribute(t)&&(n(s)||(r=!0))}return r}function m(e){var n=t.element(e)[0]||e;return!!n.hasAttribute&&(n.hasAttribute("aria-label")||n.hasAttribute("aria-labelledby")||n.hasAttribute("aria-describedby"))}function u(e,n){function o(e){if(!m(e))return!1;if(e.hasAttribute("role"))switch(e.getAttribute("role").toLowerCase()){case"command":case"definition":case"directory":case"grid":case"list":case"listitem":case"log":case"marquee":case"menu":case"menubar":case"note":case"presentation":case"separator":case"scrollbar":case"status":case"tablist":return!1}switch(e.tagName.toLowerCase()){case"abbr":case"acronym":case"address":case"applet":case"audio":case"b":case"bdi":case"bdo":case"big":case"blockquote":case"br":case"canvas":case"caption":case"center":case"cite":case"code":case"col":case"data":case"dd":case"del":case"dfn":case"dir":case"div":case"dl":case"em":case"embed":case"fieldset":case"figcaption":case"font":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":case"hgroup":case"html":case"i":case"ins":case"isindex":case"kbd":case"keygen":case"label":case"legend":case"li":case"map":case"mark":case"menu":case"object":case"ol":case"output":case"pre":case"presentation":case"q":case"rt":case"ruby":case"samp":case"small":case"source":case"span":case"status":case"strike":case"strong":case"sub":case"sup":case"svg":case"tbody":case"td":case"th":case"thead":case"time":case"tr":case"track":case"tt":case"ul":case"var":return!1}return!0}n=n||1;var i=t.element(e)[0]||e;return!!i.parentNode&&(!!o(i.parentNode)||(n--,!!n&&u(i.parentNode,n)))}var p=this.showWarnings;return{expect:r,expectAsync:a,expectWithText:d,expectWithoutText:s,getText:c,hasAriaLabel:m,parentHasAriaLabel:u}}n.$inject=["$$rAF","$log","$window","$interpolate"],t.module("material.core").provider("$mdAria",e)}(),function(){function e(e){function n(){return!i||("function"==typeof e.preAssignBindingsEnabled?e.preAssignBindingsEnabled():1===t.version.major&&t.version.minor<6)}function o(e,t,n,o,i){this.$q=e,this.$templateRequest=t,this.$injector=n,this.$compile=o,this.$controller=i}var i=!1;this.respectPreAssignBindingsEnabled=function(e){return t.isDefined(e)?(i=e,this):i},this.$get=["$q","$templateRequest","$injector","$compile","$controller",function(e,t,n,i,r){return new o(e,t,n,i,r)}],o.prototype.compile=function(e){return e.contentElement?this._prepareContentElement(e):this._compileTemplate(e)},o.prototype._prepareContentElement=function(e){var t=this._fetchContentElement(e);return this.$q.resolve({element:t.element,cleanup:t.restore,locals:{},link:function(){return t.element}})},o.prototype._compileTemplate=function(e){var n=this,o=e.templateUrl,i=e.template||"",r=t.extend({},e.resolve),a=t.extend({},e.locals),d=e.transformTemplate||t.identity;return t.forEach(r,function(e,o){t.isString(e)?r[o]=n.$injector.get(e):r[o]=n.$injector.invoke(e)}),t.extend(r,a),o?r.$$ngTemplate=this.$templateRequest(o):r.$$ngTemplate=this.$q.when(i),this.$q.all(r).then(function(o){var i=d(o.$$ngTemplate,e),r=e.element||t.element("<div>").html(i.trim()).contents();return n._compileElement(o,r,e)})},o.prototype._compileElement=function(e,n,o){function i(i){if(e.$scope=i,o.controller){var s=t.extend({},e,{$element:n}),c=r._createController(o,s,e);n.data("$ngControllerController",c),n.children().data("$ngControllerController",c),d.controller=c}return a(i)}var r=this,a=this.$compile(n),d={element:n,cleanup:n.remove.bind(n),locals:e,link:i};return d},o.prototype._createController=function(e,o,i){var r=this.$controller(e.controller,o,!0,e.controllerAs);n()&&e.bindToController&&t.extend(r.instance,i);var a=r();return!n()&&e.bindToController&&t.extend(a,i),t.isFunction(a.$onInit)&&a.$onInit(),a},o.prototype._fetchContentElement=function(e){function n(e){var t=e.parentNode,n=e.nextElementSibling;return function(){n?t.insertBefore(e,n):t.appendChild(e)}}var o=e.contentElement,i=null;return t.isString(o)?(o=document.querySelector(o),i=n(o)):(o=o[0]||o,i=document.contains(o)?n(o):function(){o.parentNode&&o.parentNode.removeChild(o)}),{element:t.element(o),restore:i}}}t.module("material.core").provider("$mdCompiler",e),e.$inject=["$compileProvider"]}(),function(){function n(){}function o(n,o,i){function r(e){return function(t,n){n.distance<this.state.options.maxDistance&&this.dispatchEvent(t,e,n)}}function a(e,t,n){var o=f[t.replace(/^\$md./,"")];if(!o)throw new Error("Failed to register element with handler "+t+". Available handlers: "+Object.keys(f).join(", "));return o.registerElement(e,n)}function s(e,o){var i=new n(e);return t.extend(i,o),f[e]=i,$}function c(){for(var e=document.createElement("div"),n=["","webkit","Moz","MS","ms","o"],o=0;o<n.length;o++){var i=n[o],r=i?i+"TouchAction":"touchAction";if(t.isDefined(e.style[r]))return r}}var m=navigator.userAgent||navigator.vendor||e.opera,p=m.match(/ipad|iphone|ipod/i),h=m.match(/android/i),v=c(),E="undefined"!=typeof e.jQuery&&t.element===e.jQuery,$={handler:s,register:a,isAndroid:h,isIos:p,isHijackingClicks:(p||h)&&!E&&!g};return $.isHijackingClicks&&($.handler("click",{options:{maxDistance:b},onEnd:r("click")}),$.handler("focus",{options:{maxDistance:b},onEnd:function(e,t){t.distance<this.state.options.maxDistance&&u(e.target)&&(this.dispatchEvent(e,"focus",t),e.target.focus())}}),$.handler("mouseup",{options:{maxDistance:b},onEnd:r("mouseup")}),$.handler("mousedown",{onStart:function(e){this.dispatchEvent(e,"mousedown")}})),$.handler("press",{onStart:function(e,t){this.dispatchEvent(e,"$md.pressdown")},onEnd:function(e,t){this.dispatchEvent(e,"$md.pressup")}}).handler("hold",{options:{maxDistance:6,delay:500},onCancel:function(){i.cancel(this.state.timeout)},onStart:function(e,n){return this.state.registeredParent?(this.state.pos={x:n.x,y:n.y},void(this.state.timeout=i(t.bind(this,function(){this.dispatchEvent(e,"$md.hold"),this.cancel()}),this.state.options.delay,!1))):this.cancel()},onMove:function(e,t){v||"touchmove"!==e.type||e.preventDefault();var n=this.state.pos.x-t.x,o=this.state.pos.y-t.y;Math.sqrt(n*n+o*o)>this.options.maxDistance&&this.cancel()},onEnd:function(){this.onCancel()}}).handler("drag",{options:{minDistance:6,horizontal:!0,cancelMultiplier:1.5},onSetup:function(e,t){v&&(this.oldTouchAction=e[0].style[v],e[0].style[v]=t.horizontal?"pan-y":"pan-x")},onCleanup:function(e){this.oldTouchAction&&(e[0].style[v]=this.oldTouchAction)},onStart:function(e){this.state.registeredParent||this.cancel()},onMove:function(e,t){var n,o;v||"touchmove"!==e.type||e.preventDefault(),this.state.dragPointer?this.dispatchDragMove(e):(this.state.options.horizontal?(n=Math.abs(t.distanceX)>this.state.options.minDistance,o=Math.abs(t.distanceY)>this.state.options.minDistance*this.state.options.cancelMultiplier):(n=Math.abs(t.distanceY)>this.state.options.minDistance,o=Math.abs(t.distanceX)>this.state.options.minDistance*this.state.options.cancelMultiplier),n?(this.state.dragPointer=d(e),l(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragstart",this.state.dragPointer)):o&&this.cancel())},dispatchDragMove:o.throttle(function(e){this.state.isRunning&&(l(e,this.state.dragPointer),this.dispatchEvent(e,"$md.drag",this.state.dragPointer))}),onEnd:function(e,t){this.state.dragPointer&&(l(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragend",this.state.dragPointer))}}).handler("swipe",{options:{minVelocity:.65,minDistance:10},onEnd:function(e,t){var n;Math.abs(t.velocityX)>this.state.options.minVelocity&&Math.abs(t.distanceX)>this.state.options.minDistance?(n="left"==t.directionX?"$md.swipeleft":"$md.swiperight",this.dispatchEvent(e,n)):Math.abs(t.velocityY)>this.state.options.minVelocity&&Math.abs(t.distanceY)>this.state.options.minDistance&&(n="up"==t.directionY?"$md.swipeup":"$md.swipedown",this.dispatchEvent(e,n))}})}function i(e){this.name=e,this.state={}}function r(){function n(e,n,o){o=o||p;var i=new t.element.Event(n);i.$material=!0,i.pointer=o,i.srcEvent=e,t.extend(i,{clientX:o.x,clientY:o.y,screenX:o.x,screenY:o.y,pageX:o.x,pageY:o.y,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey}),t.element(o.target).trigger(i)}function o(t,n,o){o=o||p;var i;"click"===n||"mouseup"==n||"mousedown"==n?(i=document.createEvent("MouseEvents"),i.initMouseEvent(n,!0,!0,e,t.detail,o.x,o.y,o.x,o.y,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget||null)):(i=document.createEvent("CustomEvent"),i.initCustomEvent(n,!0,!0,{})),i.$material=!0,i.pointer=o,i.srcEvent=t,o.target.dispatchEvent(i)}var r="undefined"!=typeof e.jQuery&&t.element===e.jQuery;return i.prototype={options:{},dispatchEvent:r?n:o,onSetup:t.noop,onCleanup:t.noop,onStart:t.noop,onMove:t.noop,onEnd:t.noop,onCancel:t.noop,start:function(e,n){if(!this.state.isRunning){var o=this.getNearestParent(e.target),i=o&&o.$mdGesture[this.name]||{};this.state={isRunning:!0,options:t.extend({},this.options,i),registeredParent:o},this.onStart(e,n)}},move:function(e,t){this.state.isRunning&&this.onMove(e,t)},end:function(e,t){this.state.isRunning&&(this.onEnd(e,t),this.state.isRunning=!1)},cancel:function(e,t){this.onCancel(e,t),this.state={}},getNearestParent:function(e){for(var t=e;t;){if((t.$mdGesture||{})[this.name])return t;t=t.parentNode}return null},registerElement:function(e,t){function n(){delete e[0].$mdGesture[o.name],e.off("$destroy",n),o.onCleanup(e,t||{})}var o=this;return e[0].$mdGesture=e[0].$mdGesture||{},e[0].$mdGesture[this.name]=t||{},e.on("$destroy",n),o.onSetup(e,t||{}),n}},i}function a(e,n){function o(e){var t=!e.clientX&&!e.clientY;t||e.$material||e.isIonicTap||c(e)||"mousedown"===e.type&&(u(e.target)||u(document.activeElement))||(e.preventDefault(),e.stopPropagation())}function i(e){var t=0===e.clientX&&0===e.clientY,n=e.target&&"submit"===e.target.type;t||e.$material||e.isIonicTap||c(e)||n?(v=null,"label"==e.target.tagName.toLowerCase()&&(v={x:e.x,y:e.y})):(e.preventDefault(),e.stopPropagation(),v=null)}function r(e,t){var o;for(var i in f)o=f[i],o instanceof n&&("start"===e&&o.cancel(),o[e](t,p))}function a(e){if(!p){var t=+Date.now();h&&!s(e,h)&&t-h.endTime<1500||(p=d(e),r("start",e))}}function m(e){p&&s(e,p)&&(l(e,p),r("move",e))}function g(e){p&&s(e,p)&&(l(e,p),p.endTime=+Date.now(),"pointercancel"!==e.type&&r("end",e),h=p,p=null)}document.contains||(document.contains=function(e){return document.body.contains(e)}),!E&&e.isHijackingClicks&&(document.addEventListener("click",i,!0),document.addEventListener("mouseup",o,!0),document.addEventListener("mousedown",o,!0),document.addEventListener("focus",o,!0),E=!0);var b="mousedown touchstart pointerdown",$="mousemove touchmove pointermove",y="mouseup mouseleave touchend touchcancel pointerup pointercancel";t.element(document).on(b,a).on($,m).on(y,g).on("$$mdGestureReset",function(){h=p=null})}function d(e){var t=m(e),n={startTime:+Date.now(),target:e.target,type:e.type.charAt(0)};return n.startX=n.x=t.pageX,n.startY=n.y=t.pageY,n}function s(e,t){return e&&t&&e.type.charAt(0)===t.type}function c(e){return v&&v.x==e.x&&v.y==e.y}function l(e,t){var n=m(e),o=t.x=n.pageX,i=t.y=n.pageY;t.distanceX=o-t.startX,t.distanceY=i-t.startY,t.distance=Math.sqrt(t.distanceX*t.distanceX+t.distanceY*t.distanceY),t.directionX=t.distanceX>0?"right":t.distanceX<0?"left":"",t.directionY=t.distanceY>0?"down":t.distanceY<0?"up":"",t.duration=+Date.now()-t.startTime,t.velocityX=t.distanceX/t.duration,t.velocityY=t.distanceY/t.duration}function m(e){return e=e.originalEvent||e,e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0]||e}function u(e){return!!e&&"-1"!=e.getAttribute("tabindex")&&!e.hasAttribute("disabled")&&(e.hasAttribute("tabindex")||e.hasAttribute("href")||e.isContentEditable||["INPUT","SELECT","BUTTON","TEXTAREA","VIDEO","AUDIO"].indexOf(e.nodeName)!=-1)}o.$inject=["$$MdGestureHandler","$$rAF","$timeout"],a.$inject=["$mdGesture","$$MdGestureHandler"];var p,h,f={},g=!1,b=6,v=null,E=!1;t.module("material.core.gestures",[]).provider("$mdGesture",n).factory("$$MdGestureHandler",r).run(a),n.prototype={skipClickHijack:function(){return g=!0},setMaxClickDistance:function(e){b=parseInt(e)},$get:["$$MdGestureHandler","$$rAF","$timeout",function(e,t,n){return new o(e,t,n)}]}}(),function(){function n(e,n){this.$timeout=e,this.$mdUtil=n,this.bodyElement=t.element(document.body),this.isBuffering=!1,this.bufferTimeout=null,this.lastInteractionType=null,this.lastInteractionTime=null,this.inputEventMap={keydown:"keyboard",mousedown:"mouse",mouseenter:"mouse",touchstart:"touch",pointerdown:"pointer",MSPointerDown:"pointer"},this.iePointerMap={2:"touch",3:"touch",4:"mouse"},this.initializeEvents()}n.$inject=["$timeout","$mdUtil"],t.module("material.core.interaction",[]).service("$mdInteraction",n),n.prototype.initializeEvents=function(){var t="MSPointerEvent"in e?"MSPointerDown":"PointerEvent"in e?"pointerdown":null;this.bodyElement.on("keydown mousedown",this.onInputEvent.bind(this)),"ontouchstart"in document.documentElement&&this.bodyElement.on("touchstart",this.onBufferInputEvent.bind(this)),t&&this.bodyElement.on(t,this.onInputEvent.bind(this))},n.prototype.onInputEvent=function(e){if(!this.isBuffering){var t=this.inputEventMap[e.type];"pointer"===t&&(t=this.iePointerMap[e.pointerType]||e.pointerType),this.lastInteractionType=t,this.lastInteractionTime=this.$mdUtil.now()}},n.prototype.onBufferInputEvent=function(e){this.$timeout.cancel(this.bufferTimeout),this.onInputEvent(e),this.isBuffering=!0,this.bufferTimeout=this.$timeout(function(){this.isBuffering=!1}.bind(this),650,!1);
},n.prototype.getLastInteractionType=function(){return this.lastInteractionType},n.prototype.isUserInvoked=function(e){var n=t.isNumber(e)?e:15;return this.lastInteractionTime>=this.$mdUtil.now()-n}}(),function(){function e(){function e(e){function n(e){return s.optionsFactory=e.options,s.methods=(e.methods||[]).concat(a),c}function o(e,t){return d[e]=t,c}function i(t,n){if(n=n||{},n.methods=n.methods||[],n.options=n.options||function(){return{}},/^cancel|hide|show$/.test(t))throw new Error("Preset '"+t+"' in "+e+" is reserved!");if(n.methods.indexOf("_options")>-1)throw new Error("Method '_options' in "+e+" is reserved!");return s.presets[t]={methods:n.methods.concat(a),optionsFactory:n.options,argOption:n.argOption},c}function r(n,o){function i(e){return e=e||{},e._options&&(e=e._options),m.show(t.extend({},l,e))}function r(e){return m.destroy(e)}function a(t,n){var i={};return i[e]=u,o.invoke(t||function(){return n},{},i)}var c,l,m=n(),u={hide:m.hide,cancel:m.cancel,show:i,destroy:r};return c=s.methods||[],l=a(s.optionsFactory,{}),t.forEach(d,function(e,t){u[t]=e}),t.forEach(s.presets,function(e,n){function o(e){this._options=t.extend({},i,e)}var i=a(e.optionsFactory,{}),r=(e.methods||[]).concat(c);if(t.extend(i,{$type:n}),t.forEach(r,function(e){o.prototype[e]=function(t){return this._options[e]=t,this}}),e.argOption){var d="show"+n.charAt(0).toUpperCase()+n.slice(1);u[d]=function(e){var t=u[n](e);return u.show(t)}}u[n]=function(n){return arguments.length&&e.argOption&&!t.isObject(n)&&!t.isArray(n)?(new o)[e.argOption](n):new o(n)}}),u}r.$inject=["$$interimElement","$injector"];var a=["onHide","onShow","onRemove"],d={},s={presets:{}},c={setDefaults:n,addPreset:i,addMethod:o,$get:r};return c.addPreset("build",{methods:["controller","controllerAs","resolve","multiple","template","templateUrl","themable","transformTemplate","parent","contentElement"]}),c}function o(e,o,i,r,a,d,s,c,l,m,u){return function(){function p(e){e=e||{};var t=new v(e||{}),n=e.multiple?o.resolve():o.all(y);e.multiple||(n=n.then(function(){var e=C.concat(M.map(E.cancel));return o.all(e)}));var i=n.then(function(){return t.show()["catch"](function(e){return e})["finally"](function(){y.splice(y.indexOf(i),1),M.push(t)})});return y.push(i),t.deferred.promise["catch"](function(e){return e instanceof Error&&u(e),e}),t.deferred.promise}function h(e,t){function i(n){var o=n.remove(e,!1,t||{})["catch"](function(e){return e})["finally"](function(){C.splice(C.indexOf(o),1)});return M.splice(M.indexOf(n),1),C.push(o),n.deferred.promise}return t=t||{},t.closeAll?o.all(M.slice().reverse().map(i)):t.closeTo!==n?o.all(M.slice(t.closeTo).map(i)):i(M[M.length-1])}function f(e,n){var i=M.pop();if(!i)return o.when(e);var r=i.remove(e,!0,n||{})["catch"](function(e){return e})["finally"](function(){C.splice(C.indexOf(r),1)});return C.push(r),i.deferred.promise["catch"](t.noop)}function g(e){return function(){var t=arguments;return M.length?e.apply(E,t):y.length?y[0]["finally"](function(){return e.apply(E,t)}):o.when("No interim elements currently showing up.")}}function b(e){var n=e?null:M.shift(),i=t.element(e).length&&t.element(e)[0].parentNode;if(i){var r=M.filter(function(e){return e.options.element[0]===i});r.length&&(n=r[0],M.splice(M.indexOf(n),1))}return n?n.remove($,!1,{$destroy:!0}):o.when($)}function v(m){function u(){return o(function(e,t){function n(e){C.deferred.reject(e),t(e)}m.onCompiling&&m.onCompiling(m),f(m).then(function(t){M=g(t,m),m.cleanupElement=t.cleanup,T=$(M,m,t.controller).then(e,n)})["catch"](n)})}function p(e,n,i){function r(e){C.deferred.resolve(e)}function a(e){C.deferred.reject(e)}return M?(m=t.extend(m||{},i||{}),m.cancelAutoHide&&m.cancelAutoHide(),m.element.triggerHandler("$mdInterimElementRemove"),m.$destroy===!0?y(m.element,m).then(function(){n&&a(e)||r(e)}):(o.when(T)["finally"](function(){y(m.element,m).then(function(){n?a(e):r(e)},a)}),C.deferred.promise)):o.when(!1)}function h(e){return e=e||{},e.template&&(e.template=s.processTemplate(e.template)),t.extend({preserveScope:!1,cancelAutoHide:t.noop,scope:e.scope||i.$new(e.isolateScope),onShow:function(e,t,n){return d.enter(t,n.parent)},onRemove:function(e,t){return t&&d.leave(t)||o.when()}},e)}function f(e){var t=e.skipCompile?null:c.compile(e);return t||o(function(t){t({locals:{},link:function(){return e.element}})})}function g(e,n){t.extend(e.locals,n);var o=e.link(n.scope);return n.element=o,n.parent=b(o,n),n.themable&&l(o),o}function b(n,o){var i=o.parent;if(i=t.isFunction(i)?i(o.scope,n,o):t.isString(i)?t.element(e[0].querySelector(i)):t.element(i),!(i||{}).length){var r;return a[0]&&a[0].querySelector&&(r=a[0].querySelector(":not(svg) > body")),r||(r=a[0]),"#comment"==r.nodeName&&(r=e[0].body),t.element(r)}return i}function v(){var e,o=t.noop;m.hideDelay&&(e=r(E.hide,m.hideDelay),o=function(){r.cancel(e)}),m.cancelAutoHide=function(){o(),m.cancelAutoHide=n}}function $(e,n,i){var r=n.onShowing||t.noop,a=n.onComplete||t.noop;try{r(n.scope,e,n,i)}catch(d){return o.reject(d)}return o(function(t,r){try{o.when(n.onShow(n.scope,e,n,i)).then(function(){a(n.scope,e,n),v(),t(e)},r)}catch(d){r(d.message)}})}function y(e,n){var i=n.onRemoving||t.noop;return o(function(t,r){try{var a=o.when(n.onRemove(n.scope,e,n)||!0);i(e,a),n.$destroy?(t(e),!n.preserveScope&&n.scope&&a.then(function(){n.scope.$destroy()})):a.then(function(){!n.preserveScope&&n.scope&&n.scope.$destroy(),t(e)},r)}catch(d){r(d.message)}})}var C,M,T=o.when(!0);return m=h(m),C={options:m,deferred:o.defer(),show:u,remove:p}}var E,$=!1,y=[],C=[],M=[];return E={show:p,hide:g(h),cancel:g(f),destroy:b,$injector_:m}}}return o.$inject=["$document","$q","$rootScope","$timeout","$rootElement","$animate","$mdUtil","$mdCompiler","$mdTheming","$injector","$exceptionHandler"],e.$get=o,e}t.module("material.core").provider("$$interimElement",e)}(),function(){!function(){function e(e){function d(e){return e.replace(m,"").replace(u,function(e,t,n,o){return o?n.toUpperCase():n})}var m=/^((?:x|data)[:\-_])/i,u=/([:\-_]+(.))/g,p=["","xs","gt-xs","sm","gt-sm","md","gt-md","lg","gt-lg","xl","print"],h=["layout","flex","flex-order","flex-offset","layout-align"],f=["show","hide","layout-padding","layout-margin"];t.forEach(p,function(n){t.forEach(h,function(t){var o=n?t+"-"+n:t;e.directive(d(o),r(o))}),t.forEach(f,function(t){var o=n?t+"-"+n:t;e.directive(d(o),a(o))})}),e.provider("$$mdLayout",function(){return{$get:t.noop,validateAttributeValue:l,validateAttributeUsage:c,disableLayouts:function(e){A.enabled=e!==!0}}}).directive("mdLayoutCss",o).directive("ngCloak",i("ng-cloak")).directive("layoutWrap",a("layout-wrap")).directive("layoutNowrap",a("layout-nowrap")).directive("layoutNoWrap",a("layout-no-wrap")).directive("layoutFill",a("layout-fill")).directive("layoutLtMd",s("layout-lt-md",!0)).directive("layoutLtLg",s("layout-lt-lg",!0)).directive("flexLtMd",s("flex-lt-md",!0)).directive("flexLtLg",s("flex-lt-lg",!0)).directive("layoutAlignLtMd",s("layout-align-lt-md")).directive("layoutAlignLtLg",s("layout-align-lt-lg")).directive("flexOrderLtMd",s("flex-order-lt-md")).directive("flexOrderLtLg",s("flex-order-lt-lg")).directive("offsetLtMd",s("flex-offset-lt-md")).directive("offsetLtLg",s("flex-offset-lt-lg")).directive("hideLtMd",s("hide-lt-md")).directive("hideLtLg",s("hide-lt-lg")).directive("showLtMd",s("show-lt-md")).directive("showLtLg",s("show-lt-lg")).config(n)}function n(){var e=!!document.querySelector("[md-layouts-disabled]");A.enabled=!e}function o(){return A.enabled=!1,{restrict:"A",priority:"900"}}function i(e){return["$timeout",function(n){return{restrict:"A",priority:-10,compile:function(o){return A.enabled?(o.addClass(e),function(t,o){n(function(){o.removeClass(e)},10,!1)}):t.noop}}}]}function r(e){function n(t,n,o){var i=d(n,e,o),r=o.$observe(o.$normalize(e),i);i(p(e,o,"")),t.$on("$destroy",function(){r()})}return["$mdUtil","$interpolate","$log",function(o,i,r){return g=o,b=i,v=r,{restrict:"A",compile:function(o,i){var r;return A.enabled&&(c(e,i,o,v),l(e,p(e,i,""),m(o,e,i)),r=n),r||t.noop}}}]}function a(e){function n(t,n){n.addClass(e)}return["$mdUtil","$interpolate","$log",function(o,i,r){return g=o,b=i,v=r,{restrict:"A",compile:function(o,i){var r;return A.enabled&&(l(e,p(e,i,""),m(o,e,i)),n(null,o),r=n),r||t.noop}}}]}function d(e,n){var o;return function(i){var r=l(n,i||"");t.isDefined(r)&&(o&&e.removeClass(o),o=r?n+"-"+r.trim().replace($,"-"):n,e.addClass(o))}}function s(e){var n=e.split("-");return["$log",function(o){return o.warn(e+"has been deprecated. Please use a `"+n[0]+"-gt-<xxx>` variant."),t.noop}]}function c(e,t,n,o){var i,r,a,d=n[0].nodeName.toLowerCase();switch(e.replace(E,"")){case"flex":"md-button"!=d&&"fieldset"!=d||(r="<"+d+" "+e+"></"+d+">",a="https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers",i="Markup '{0}' may not work as expected in IE Browsers. Consult '{1}' for details.",o.warn(g.supplant(i,[r,a])))}}function l(e,n,o){var i;if(!u(n)){switch(e.replace(E,"")){case"layout":h(n,C)||(n=C[0]);break;case"flex":h(n,y)||isNaN(n)&&(n="");break;case"flex-offset":case"flex-order":n&&!isNaN(+n)||(n="0");break;case"layout-align":var r=f(n);n=g.supplant("{main}-{cross}",r);break;case"layout-padding":case"layout-margin":case"layout-fill":case"layout-wrap":case"layout-nowrap":n=""}n!=i&&(o||t.noop)(n)}return n?n.trim():""}function m(e,t,n){return function(e){u(e)||(n[n.$normalize(t)]=e)}}function u(e){return(e||"").indexOf(b.startSymbol())>-1}function p(e,t,n){var o=t.$normalize(e);return t[o]?t[o].trim().replace($,"-"):n||null}function h(e,t,n){e=n&&e?e.replace($,n):e;var o=!1;return e&&t.forEach(function(t){t=n?t.replace($,n):t,o=o||t===e}),o}function f(e){var t,n={main:"start",cross:"stretch"};return e=e||"",0!==e.indexOf("-")&&0!==e.indexOf(" ")||(e="none"+e),t=e.toLowerCase().trim().replace($,"-").split("-"),t.length&&"space"===t[0]&&(t=[t[0]+"-"+t[1],t[2]]),t.length>0&&(n.main=t[0]||n.main),t.length>1&&(n.cross=t[1]||n.cross),M.indexOf(n.main)<0&&(n.main="start"),T.indexOf(n.cross)<0&&(n.cross="stretch"),n}var g,b,v,E=/(-gt)?-(sm|md|lg|print)/g,$=/\s+/g,y=["grow","initial","auto","none","noshrink","nogrow"],C=["row","column"],M=["","start","center","end","stretch","space-around","space-between"],T=["","start","center","end","stretch"],A={enabled:!0,breakpoints:[]};e(t.module("material.core.layout",["ng"]))}()}(),function(){function e(e){this._$timeout=e,this._liveElement=this._createLiveElement(),this._announceTimeout=100}e.$inject=["$timeout"],t.module("material.core").service("$mdLiveAnnouncer",e),e.prototype.announce=function(e,t){t||(t="polite");var n=this;n._liveElement.textContent="",n._liveElement.setAttribute("aria-live",t),n._$timeout(function(){n._liveElement.textContent=e},n._announceTimeout,!1)},e.prototype._createLiveElement=function(){var e=document.createElement("div");return e.classList.add("md-visually-hidden"),e.setAttribute("role","status"),e.setAttribute("aria-atomic","true"),e.setAttribute("aria-live","polite"),document.body.appendChild(e),e}}(),function(){t.module("material.core.meta",[]).provider("$$mdMeta",function(){function e(e){if(r[e])return!0;var n=document.getElementsByName(e)[0];return!!n&&(r[e]=t.element(n),!0)}function n(n,o){if(e(n),r[n])r[n].attr("content",o);else{var a=t.element('<meta name="'+n+'" content="'+o+'"/>');i.append(a),r[n]=a}return function(){r[n].attr("content",""),r[n].remove(),delete r[n]}}function o(t){if(!e(t))throw Error("$$mdMeta: could not find a meta tag with the name '"+t+"'");return r[t].attr("content")}var i=t.element(document.head),r={},a={setMeta:n,getMeta:o};return t.extend({},a,{$get:function(){return a}})})}(),function(){function e(e,o){function i(e){return e&&""!==e}var r,a=[],d={};return r={notFoundError:function(t,n){e.error((n||"")+"No instance found for handle",t)},getInstances:function(){return a},get:function(e){if(!i(e))return null;var t,n,o;for(t=0,n=a.length;t<n;t++)if(o=a[t],o.$$mdHandle===e)return o;return null},register:function(e,n){function o(){var t=a.indexOf(e);t!==-1&&a.splice(t,1)}function i(){var t=d[n];t&&(t.forEach(function(t){t.resolve(e)}),delete d[n])}return n?(e.$$mdHandle=n,a.push(e),i(),o):t.noop},when:function(e){if(i(e)){var t=o.defer(),a=r.get(e);return a?t.resolve(a):(d[e]===n&&(d[e]=[]),d[e].push(t)),t.promise}return o.reject("Invalid `md-component-id` value.")}}}e.$inject=["$log","$q"],t.module("material.core").factory("$mdComponentRegistry",e)}(),function(){!function(){function e(e){function n(e){return e.hasClass("md-icon-button")?{isMenuItem:e.hasClass("md-menu-item"),fitRipple:!0,center:!0}:{isMenuItem:e.hasClass("md-menu-item"),dimBackground:!0}}return{attach:function(o,i,r){return r=t.extend(n(i),r),e.attach(o,i,r)}}}e.$inject=["$mdInkRipple"],t.module("material.core").factory("$mdButtonInkRipple",e)}()}(),function(){!function(){function e(e){function n(n,o,i){return e.attach(n,o,t.extend({center:!0,dimBackground:!1,fitRipple:!0},i))}return{attach:n}}e.$inject=["$mdInkRipple"],t.module("material.core").factory("$mdCheckboxInkRipple",e)}()}(),function(){!function(){function e(e){function n(n,o,i){return e.attach(n,o,t.extend({center:!1,dimBackground:!0,outline:!1,rippleSize:"full"},i))}return{attach:n}}e.$inject=["$mdInkRipple"],t.module("material.core").factory("$mdListInkRipple",e)}()}(),function(){function e(e,n){return{controller:t.noop,link:function(t,o,i){i.hasOwnProperty("mdInkRippleCheckbox")?n.attach(t,o):e.attach(t,o)}}}function n(){function e(){n=!0}var n=!1;return{disableInkRipple:e,$get:["$injector",function(e){function i(i,r,a){return n||r.controller("mdNoInk")?t.noop:e.instantiate(o,{$scope:i,$element:r,rippleOptions:a})}return{attach:i}}]}}function o(e,n,o,i,r,a,d){this.$window=i,this.$timeout=r,this.$mdUtil=a,this.$mdColorUtil=d,this.$scope=e,this.$element=n,this.options=o,this.mousedown=!1,this.ripples=[],this.timeout=null,this.lastRipple=null,a.valueOnUse(this,"container",this.createContainer),this.$element.addClass("md-ink-ripple"),(n.controller("mdInkRipple")||{}).createRipple=t.bind(this,this.createRipple),(n.controller("mdInkRipple")||{}).setColor=t.bind(this,this.color),this.bindEvents()}function i(e,n){(e.mousedown||e.lastRipple)&&(e.mousedown=!1,e.$mdUtil.nextTick(t.bind(e,n),!1))}function r(){return{controller:t.noop}}o.$inject=["$scope","$element","rippleOptions","$window","$timeout","$mdUtil","$mdColorUtil"],e.$inject=["$mdButtonInkRipple","$mdCheckboxInkRipple"],t.module("material.core").provider("$mdInkRipple",n).directive("mdInkRipple",e).directive("mdNoInk",r).directive("mdNoBar",r).directive("mdNoStretch",r);var a=450;o.prototype.color=function(e){function n(){var e=o.options&&o.options.colorElement?o.options.colorElement:[],t=e.length?e[0]:o.$element[0];return t?o.$window.getComputedStyle(t).color:"rgb(0,0,0)"}var o=this;return t.isDefined(e)&&(o._color=o._parseColor(e)),o._color||o._parseColor(o.inkRipple())||o._parseColor(n())},o.prototype.calculateColor=function(){return this.color()},o.prototype._parseColor=function(e,t){t=t||1;var n=this.$mdColorUtil;if(e)return 0===e.indexOf("rgba")?e.replace(/\d?\.?\d*\s*\)\s*$/,(.1*t).toString()+")"):0===e.indexOf("rgb")?n.rgbToRgba(e):0===e.indexOf("#")?n.hexToRgba(e):void 0},o.prototype.bindEvents=function(){this.$element.on("mousedown",t.bind(this,this.handleMousedown)),this.$element.on("mouseup touchend",t.bind(this,this.handleMouseup)),this.$element.on("mouseleave",t.bind(this,this.handleMouseup)),this.$element.on("touchmove",t.bind(this,this.handleTouchmove))},o.prototype.handleMousedown=function(e){if(!this.mousedown)if(e.hasOwnProperty("originalEvent")&&(e=e.originalEvent),this.mousedown=!0,this.options.center)this.createRipple(this.container.prop("clientWidth")/2,this.container.prop("clientWidth")/2);else if(e.srcElement!==this.$element[0]){var t=this.$element[0].getBoundingClientRect(),n=e.clientX-t.left,o=e.clientY-t.top;this.createRipple(n,o)}else this.createRipple(e.offsetX,e.offsetY)},o.prototype.handleMouseup=function(){i(this,this.clearRipples)},o.prototype.handleTouchmove=function(){i(this,this.deleteRipples)},o.prototype.deleteRipples=function(){for(var e=0;e<this.ripples.length;e++)this.ripples[e].remove()},o.prototype.clearRipples=function(){for(var e=0;e<this.ripples.length;e++)this.fadeInComplete(this.ripples[e])},o.prototype.createContainer=function(){var e=t.element('<div class="md-ripple-container"></div>');return this.$element.append(e),e},o.prototype.clearTimeout=function(){this.timeout&&(this.$timeout.cancel(this.timeout),this.timeout=null)},o.prototype.isRippleAllowed=function(){var e=this.$element[0];do{if(!e.tagName||"BODY"===e.tagName)break;if(e&&t.isFunction(e.hasAttribute)){if(e.hasAttribute("disabled"))return!1;if("false"===this.inkRipple()||"0"===this.inkRipple())return!1}}while(e=e.parentNode);return!0},o.prototype.inkRipple=function(){return this.$element.attr("md-ink-ripple")},o.prototype.createRipple=function(e,n){function o(e,t,n){return e?Math.max(t,n):Math.sqrt(Math.pow(t,2)+Math.pow(n,2))}if(this.isRippleAllowed()){var i=this,r=i.$mdColorUtil,d=t.element('<div class="md-ripple"></div>'),s=this.$element.prop("clientWidth"),c=this.$element.prop("clientHeight"),l=2*Math.max(Math.abs(s-e),e),m=2*Math.max(Math.abs(c-n),n),u=o(this.options.fitRipple,l,m),p=this.calculateColor();d.css({left:e+"px",top:n+"px",background:"black",width:u+"px",height:u+"px",backgroundColor:r.rgbaToRgb(p),borderColor:r.rgbaToRgb(p)}),this.lastRipple=d,this.clearTimeout(),this.timeout=this.$timeout(function(){i.clearTimeout(),i.mousedown||i.fadeInComplete(d)},.35*a,!1),this.options.dimBackground&&this.container.css({backgroundColor:p}),this.container.append(d),this.ripples.push(d),d.addClass("md-ripple-placed"),this.$mdUtil.nextTick(function(){d.addClass("md-ripple-scaled md-ripple-active"),i.$timeout(function(){i.clearRipples()},a,!1)},!1)}},o.prototype.fadeInComplete=function(e){this.lastRipple===e?this.timeout||this.mousedown||this.removeRipple(e):this.removeRipple(e)},o.prototype.removeRipple=function(e){var t=this,n=this.ripples.indexOf(e);n<0||(this.ripples.splice(this.ripples.indexOf(e),1),e.removeClass("md-ripple-active"),e.addClass("md-ripple-remove"),0===this.ripples.length&&this.container.css({backgroundColor:""}),this.$timeout(function(){t.fadeOutComplete(e)},a,!1))},o.prototype.fadeOutComplete=function(e){e.remove(),this.lastRipple=null}}(),function(){!function(){function e(e){function n(n,o,i){return e.attach(n,o,t.extend({center:!1,dimBackground:!0,outline:!1,rippleSize:"full"},i))}return{attach:n}}e.$inject=["$mdInkRipple"],t.module("material.core").factory("$mdTabInkRipple",e)}()}(),function(){t.module("material.core.theming.palette",[]).constant("$mdColorPalette",{red:{50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 A100",contrastStrongLightColors:"400 500 600 700 A200 A400 A700"},pink:{50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"500 600 A200 A400 A700"},purple:{50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200 A400 A700"},"deep-purple":{50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200"},indigo:{50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200 A400"},blue:{50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 A100",contrastStrongLightColors:"500 600 700 A200 A400 A700"},"light-blue":{50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea",contrastDefaultColor:"dark",contrastLightColors:"600 700 800 900 A700",contrastStrongLightColors:"600 700 800 A700"},cyan:{50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4",contrastDefaultColor:"dark",contrastLightColors:"700 800 900",contrastStrongLightColors:"700 800 900"},teal:{50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5",contrastDefaultColor:"dark",contrastLightColors:"500 600 700 800 900",contrastStrongLightColors:"500 600 700"},green:{50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853",contrastDefaultColor:"dark",contrastLightColors:"500 600 700 800 900",contrastStrongLightColors:"500 600 700"},"light-green":{50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17",contrastDefaultColor:"dark",contrastLightColors:"700 800 900",contrastStrongLightColors:"700 800 900"},lime:{50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00",contrastDefaultColor:"dark",contrastLightColors:"900",contrastStrongLightColors:"900"},yellow:{50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600",contrastDefaultColor:"dark"},amber:{50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00",contrastDefaultColor:"dark"},orange:{50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00",contrastDefaultColor:"dark",contrastLightColors:"800 900",contrastStrongLightColors:"800 900"},"deep-orange":{50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 A100 A200",contrastStrongLightColors:"500 600 700 800 900 A400 A700"},brown:{50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100 A200",contrastStrongLightColors:"300 400"},grey:{50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#ffffff",A200:"#000000",A400:"#303030",A700:"#616161",contrastDefaultColor:"dark",contrastLightColors:"600 700 800 900 A200 A400 A700"},"blue-grey":{50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 A100 A200",contrastStrongLightColors:"400 500 700"}})}(),function(){!function(e){function t(e){var t=!!document.querySelector("[md-themes-disabled]");e.disableTheming(t)}function o(t,o){function i(e,t){return t=t||{},p[e]=a(e,t),h}function r(t,n){return a(t,e.extend({},p[t]||{},n))}function a(e,t){var n=w.filter(function(e){return!t[e]});if(n.length)throw new Error("Missing colors %1 in palette %2!".replace("%1",n.join(", ")).replace("%2",e));return t}function s(t,n){if(E[t])return E[t];n=n||"default";var o="string"==typeof n?E[n]:n,i=new l(t);return o&&e.forEach(o.colors,function(t,n){i.colors[n]={name:t.name,hues:e.extend({},t.hues)}}),E[t]=i,i}function l(t){function n(t){if(t=0===arguments.length||!!t,t!==o.isDark){o.isDark=t,o.foregroundPalette=o.isDark?g:f,o.foregroundShadow=o.isDark?b:v;var n=o.isDark?A:T,i=o.isDark?T:A;return e.forEach(n,function(e,t){var n=o.colors[t],r=i[t];if(n)for(var a in n.hues)n.hues[a]===r[a]&&(n.hues[a]=e[a])}),o}}var o=this;o.name=t,o.colors={},o.dark=n,n(!1),C.forEach(function(t){var n=(o.isDark?A:T)[t];o[t+"Palette"]=function(i,r){var a=o.colors[t]={name:i,hues:e.extend({},n,r)};return Object.keys(a.hues).forEach(function(e){if(!n[e])throw new Error("Invalid hue name '%1' in theme %2's %3 color %4. Available hue names: %4".replace("%1",e).replace("%2",o.name).replace("%3",i).replace("%4",Object.keys(n).join(", ")))}),Object.keys(a.hues).map(function(e){return a.hues[e]}).forEach(function(e){if(w.indexOf(e)==-1)throw new Error("Invalid hue value '%1' in theme %2's %3 color %4. Available hue values: %5".replace("%1",e).replace("%2",o.name).replace("%3",t).replace("%4",i).replace("%5",w.join(", ")))}),o},o[t+"Color"]=function(){var e=Array.prototype.slice.call(arguments);return console.warn("$mdThemingProviderTheme."+t+"Color() has been deprecated. Use $mdThemingProviderTheme."+t+"Palette() instead."),o[t+"Palette"].apply(o,e)}})}function m(t,o,i,r){function a(e){return e===n||""===e||l.THEMES[e]!==n}function d(e,t){function n(){return d&&d.$mdTheme||("default"==y?"":y)}function i(t){if(t){a(t)||r.warn("Attempted to use unregistered theme '"+t+"'. Register it with $mdThemingProvider.theme().");var n=e.data("$mdThemeName");n&&e.removeClass("md-"+n+"-theme"),e.addClass("md-"+t+"-theme"),e.data("$mdThemeName",t),d&&e.data("$mdThemeController",d)}}var d=t.controller("mdTheme")||e.data("$mdThemeController");if(i(n()),d)var s=$||d.$shouldWatch||o.parseAttributeBoolean(e.attr("md-theme-watch")),c=d.registerChanges(function(t){i(t),s?e.on("$destroy",c):c()})}var l=function(e,o){o===n&&(o=e,e=n),e===n&&(e=t),l.inherit(o,o)};return Object.defineProperty(l,"THEMES",{get:function(){return e.extend({},E)}}),Object.defineProperty(l,"PALETTES",{get:function(){return e.extend({},p)}}),Object.defineProperty(l,"ALWAYS_WATCH",{get:function(){return $}}),l.inherit=d,l.registered=a,l.defaultTheme=function(){return y},l.generateTheme=function(e){c(E[e],e,k.nonce)},l.defineTheme=function(e,t){t=t||{};var n=s(e);return t.primary&&n.primaryPalette(t.primary),t.accent&&n.accentPalette(t.accent),t.warn&&n.warnPalette(t.warn),t.background&&n.backgroundPalette(t.background),t.dark&&n.dark(),this.generateTheme(e),i.resolve(e)},l.setBrowserColor=_,l}m.$inject=["$rootScope","$mdUtil","$q","$log"],p={};var h,E={},$=!1,y="default";e.extend(p,t);var M=function(e){var t=o.setMeta("theme-color",e),n=o.setMeta("msapplication-navbutton-color",e);return function(){t(),n()}},_=function(t){t=e.isObject(t)?t:{};var n=t.theme||"default",o=t.hue||"800",i=p[t.palette]||p[E[n].colors[t.palette||"primary"].name],r=e.isObject(i[o])?i[o].hex:i[o];return M(r)};return h={definePalette:i,extendPalette:r,theme:s,configuration:function(){return e.extend({},k,{defaultTheme:y,alwaysWatchTheme:$,registeredStyles:[].concat(k.registeredStyles)})},disableTheming:function(t){k.disableTheming=e.isUndefined(t)||!!t},registerStyles:function(e){k.registeredStyles.push(e)},setNonce:function(e){k.nonce=e},generateThemesOnDemand:function(e){k.generateOnDemand=e},setDefaultTheme:function(e){y=e},alwaysWatchTheme:function(e){$=e},enableBrowserColor:_,$get:m,_LIGHT_DEFAULT_HUES:T,_DARK_DEFAULT_HUES:A,_PALETTES:p,_THEMES:E,_parseRules:d,_rgba:u}}function i(t,n,o,i,r,a){return{priority:101,link:{pre:function(d,s,c){var l=[],m=n.startSymbol(),u=n.endSymbol(),p=c.mdTheme.trim(),h=p.substr(0,m.length)===m&&p.lastIndexOf(u)===p.length-u.length,f="::",g=c.mdTheme.split(m).join("").split(u).join("").trim().substr(0,f.length)===f,b={registerChanges:function(t,n){return n&&(t=e.bind(n,t)),l.push(t),function(){var e=l.indexOf(t);e>-1&&l.splice(e,1)}},$setTheme:function(e){t.registered(e)||a.warn("attempted to use unregistered theme '"+e+"'"),b.$mdTheme=e;for(var n=l.length;n--;)l[n](e)},$shouldWatch:i.parseAttributeBoolean(s.attr("md-theme-watch"))||t.ALWAYS_WATCH||h&&!g};s.data("$mdThemeController",b);var v=function(){var e=n(c.mdTheme)(d);return o(e)(d)||e},E=function(t){return"string"==typeof t?b.$setTheme(t):void r.when(e.isFunction(t)?t():t).then(function(e){b.$setTheme(e)})};E(v());var $=d.$watch(v,function(e){e&&(E(e),b.$shouldWatch||$())})}}}}function r(){return k.disableTheming=!0,{restrict:"A",priority:"900"}}function a(e){return e}function d(t,n,o){l(t,n),o=o.replace(/THEME_NAME/g,t.name);var i=new RegExp("\\.md-"+t.name+"-theme","g"),r=/'?"?\{\{\s*([a-zA-Z]+)-(A?\d+|hue-[0-3]|shadow|default)-?(\d\.?\d*)?(contrast)?\s*\}\}'?"?/g;o=o.replace(r,function(e,n,o,i,r){return"foreground"===n?"shadow"==o?t.foregroundShadow:t.foregroundPalette[o]||t.foregroundPalette[1]:(0!==o.indexOf("hue")&&"default"!==o||(o=t.colors[n].hues[o]),u((p[t.colors[n].name][o]||"")[r?"contrast":"value"],i))});var a=new RegExp("('|\")?{{\\s*([a-zA-Z]+)-(color|contrast)-?(\\d\\.?\\d*)?\\s*}}(\"|')?","g"),d=[];return e.forEach(["default","hue-1","hue-2","hue-3"],function(e){var n=o.replace(a,function(n,o,i,r,a){var d=t.colors[i],s=p[d.name],c=d.hues[e];return u(s[c]["color"===r?"value":"contrast"],a)});if("default"!==e&&(n=n.replace(i,".md-"+t.name+"-theme.md-"+e)),"default"==t.name){var r=/((?:\s|>|\.|\w|-|:|\(|\)|\[|\]|"|'|=)*)\.md-default-theme((?:\s|>|\.|\w|-|:|\(|\)|\[|\]|"|'|=)*)/g;n=n.replace(r,function(e,t,n){return e+", "+t+n})}d.push(n)}),d}function s(t,n){function o(t,n){var o=t.contrastDefaultColor,i=t.contrastLightColors||[],r=t.contrastStrongLightColors||[],a=t.contrastDarkColors||[];"string"==typeof i&&(i=i.split(" ")),"string"==typeof r&&(r=r.split(" ")),"string"==typeof a&&(a=a.split(" ")),delete t.contrastDefaultColor,delete t.contrastLightColors,delete t.contrastStrongLightColors,delete t.contrastDarkColors,e.forEach(t,function(n,d){function s(){return"light"===o?a.indexOf(d)>-1?E:r.indexOf(d)>-1?y:$:i.indexOf(d)>-1?r.indexOf(d)>-1?y:$:E}if(!e.isObject(n)){var c=m(n);if(!c)throw new Error("Color %1, in palette %2's hue %3, is invalid. Hex or rgb(a) color expected.".replace("%1",n).replace("%2",t.name).replace("%3",d));t[d]={hex:t[d],value:c,contrast:s()}}})}var i=document.head,r=i?i.firstElementChild:null,a=!k.disableTheming&&t.has("$MD_THEME_CSS")?t.get("$MD_THEME_CSS"):"";if(a+=k.registeredStyles.join(""),r&&0!==a.length){e.forEach(p,o);var d=a.split(/\}(?!(\}|'|"|;))/).filter(function(e){return e&&e.trim().length}).map(function(e){return e.trim()+"}"});C.forEach(function(e){_[e]=""}),d.forEach(function(e){for(var t,n=0;t=C[n];n++)if(e.indexOf(".md-"+t)>-1)return _[t]+=e;for(n=0;t=C[n];n++)if(e.indexOf(t)>-1)return _[t]+=e;return _[M]+=e}),k.generateOnDemand||e.forEach(n.THEMES,function(e){h[e.name]||"default"!==n.defaultTheme()&&"default"===e.name||c(e,e.name,k.nonce);
})}}function c(e,t,n){var o=document.head,i=o?o.firstElementChild:null;h[t]||(C.forEach(function(t){for(var r=d(e,t,_[t]);r.length;){var a=r.shift();if(a){var s=document.createElement("style");s.setAttribute("md-theme-style",""),n&&s.setAttribute("nonce",n),s.appendChild(document.createTextNode(a)),o.insertBefore(s,i)}}}),h[e.name]=!0)}function l(e,t){if(!p[(e.colors[t]||{}).name])throw new Error("You supplied an invalid color palette for theme %1's %2 palette. Available palettes: %3".replace("%1",e.name).replace("%2",t).replace("%3",Object.keys(p).join(", ")))}function m(t){if(e.isArray(t)&&3==t.length)return t;if(/^rgb/.test(t))return t.replace(/(^\s*rgba?\(|\)\s*$)/g,"").split(",").map(function(e,t){return 3==t?parseFloat(e,10):parseInt(e,10)});if("#"==t.charAt(0)&&(t=t.substring(1)),/^([a-fA-F0-9]{3}){1,2}$/g.test(t)){var n=t.length/3,o=t.substr(0,n),i=t.substr(n,n),r=t.substr(2*n);return 1===n&&(o+=o,i+=i,r+=r),[parseInt(o,16),parseInt(i,16),parseInt(r,16)]}}function u(t,n){return t?(4==t.length&&(t=e.copy(t),n?t.pop():n=t.pop()),n&&("number"==typeof n||"string"==typeof n&&n.length)?"rgba("+t.join(",")+","+n+")":"rgb("+t.join(",")+")"):"rgb('0,0,0')"}t.$inject=["$mdThemingProvider"],i.$inject=["$mdTheming","$interpolate","$parse","$mdUtil","$q","$log"],a.$inject=["$mdTheming"],o.$inject=["$mdColorPalette","$$mdMetaProvider"],s.$inject=["$injector","$mdTheming"],e.module("material.core.theming",["material.core.theming.palette","material.core.meta"]).directive("mdTheme",i).directive("mdThemable",a).directive("mdThemesDisabled",r).provider("$mdTheming",o).config(t).run(s);var p,h={},f={name:"dark",1:"rgba(0,0,0,0.87)",2:"rgba(0,0,0,0.54)",3:"rgba(0,0,0,0.38)",4:"rgba(0,0,0,0.12)"},g={name:"light",1:"rgba(255,255,255,1.0)",2:"rgba(255,255,255,0.7)",3:"rgba(255,255,255,0.5)",4:"rgba(255,255,255,0.12)"},b="1px 1px 0px rgba(0,0,0,0.4), -1px -1px 0px rgba(0,0,0,0.4)",v="",E=m("rgba(0,0,0,0.87)"),$=m("rgba(255,255,255,0.87)"),y=m("rgb(255,255,255)"),C=["primary","accent","warn","background"],M="primary",T={accent:{"default":"A200","hue-1":"A100","hue-2":"A400","hue-3":"A700"},background:{"default":"50","hue-1":"A100","hue-2":"100","hue-3":"300"}},A={background:{"default":"A400","hue-1":"800","hue-2":"900","hue-3":"A200"}};C.forEach(function(e){var t={"default":"500","hue-1":"300","hue-2":"800","hue-3":"A100"};T[e]||(T[e]=t),A[e]||(A[e]=t)});var w=["50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700"],k={disableTheming:!1,generateOnDemand:!1,registeredStyles:[],nonce:null},_={}}(e.angular)}(),function(){function n(n,o,i,r,a){var d;return d={translate3d:function(e,t,n,o){function i(n){return a(e,{to:n||t,addClass:o.transitionOutClass,removeClass:o.transitionInClass,duration:o.duration}).start()}return a(e,{from:t,to:n,addClass:o.transitionInClass,removeClass:o.transitionOutClass,duration:o.duration}).start().then(function(){return i})},waitTransitionEnd:function(t,n){var a=3e3;return o(function(o,d){function s(e){e&&e.target!==t[0]||(e&&i.cancel(l),t.off(r.CSS.TRANSITIONEND,s),o())}function c(n){return n=n||e.getComputedStyle(t[0]),"0s"==n.transitionDuration||!n.transition&&!n.transitionProperty}n=n||{},c(n.cachedTransitionStyles)&&(a=0);var l=i(s,n.timeout||a);t.on(r.CSS.TRANSITIONEND,s)})},calculateTransformValues:function(e,t){function n(){var t=e?e.parent():null,n=t?t.parent():null;return n?d.clientRect(n):null}var o=t.element,i=t.bounds;if(o||i){var r=o?d.clientRect(o)||n():d.copyRect(i),a=d.copyRect(e[0].getBoundingClientRect()),s=d.centerPointFor(a),c=d.centerPointFor(r);return{centerX:c.x-s.x,centerY:c.y-s.y,scaleX:Math.round(100*Math.min(.5,r.width/a.width))/100,scaleY:Math.round(100*Math.min(.5,r.height/a.height))/100}}return{centerX:0,centerY:0,scaleX:.5,scaleY:.5}},calculateZoomToOrigin:function(e,o){var i="translate3d( {centerX}px, {centerY}px, 0 ) scale( {scaleX}, {scaleY} )",r=t.bind(null,n.supplant,i);return r(d.calculateTransformValues(e,o))},calculateSlideToOrigin:function(e,o){var i="translate3d( {centerX}px, {centerY}px, 0 )",r=t.bind(null,n.supplant,i);return r(d.calculateTransformValues(e,o))},toCss:function(e){function n(e,n,i){t.forEach(n.split(" "),function(e){o[e]=i})}var o={},i="left top right bottom width height x y min-width min-height max-width max-height";return t.forEach(e,function(e,a){if(!t.isUndefined(e))if(i.indexOf(a)>=0)o[a]=e+"px";else switch(a){case"transition":n(a,r.CSS.TRANSITION,e);break;case"transform":n(a,r.CSS.TRANSFORM,e);break;case"transformOrigin":n(a,r.CSS.TRANSFORM_ORIGIN,e);break;case"font-size":o["font-size"]=e}}),o},toTransformCss:function(e,n,o){var i={};return t.forEach(r.CSS.TRANSFORM.split(" "),function(t){i[t]=e}),n&&(o=o||"all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important",i.transition=o),i},copyRect:function(e,n){return e?(n=n||{},t.forEach("left top right bottom width height".split(" "),function(t){n[t]=Math.round(e[t])}),n.width=n.width||n.right-n.left,n.height=n.height||n.bottom-n.top,n):null},clientRect:function(e){var n=t.element(e)[0].getBoundingClientRect(),o=function(e){return e&&e.width>0&&e.height>0};return o(n)?d.copyRect(n):null},centerPointFor:function(e){return e?{x:Math.round(e.left+e.width/2),y:Math.round(e.top+e.height/2)}:{x:0,y:0}}}}t.module("material.core").factory("$$mdAnimate",["$q","$timeout","$mdConstant","$animateCss",function(e,t,o,i){return function(r){return n(r,e,t,o,i)}}])}(),function(){t.version.minor>=4?t.module("material.core.animate",[]):!function(){function e(e){return e.replace(/-[a-z]/g,function(e){return e.charAt(1).toUpperCase()})}var n=t.forEach,o=t.isDefined(document.documentElement.style.WebkitAppearance),i=o?"-webkit-":"",r=(o?"webkitTransitionEnd ":"")+"transitionend",a=(o?"webkitAnimationEnd ":"")+"animationend",d=["$document",function(e){return function(){return e[0].body.clientWidth+1}}],s=["$$rAF",function(e){return function(){var t=!1;return e(function(){t=!0}),function(n){t?n():e(n)}}}],c=["$q","$$rAFMutex",function(e,o){function i(e){this.setHost(e),this._doneCallbacks=[],this._runInAnimationFrame=o(),this._state=0}var r=0,a=1,d=2;return i.prototype={setHost:function(e){this.host=e||{}},done:function(e){this._state===d?e():this._doneCallbacks.push(e)},progress:t.noop,getPromise:function(){if(!this.promise){var t=this;this.promise=e(function(e,n){t.done(function(t){t===!1?n():e()})})}return this.promise},then:function(e,t){return this.getPromise().then(e,t)},"catch":function(e){return this.getPromise()["catch"](e)},"finally":function(e){return this.getPromise()["finally"](e)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(e){var t=this;t._state===r&&(t._state=a,t._runInAnimationFrame(function(){t._resolve(e)}))},_resolve:function(e){this._state!==d&&(n(this._doneCallbacks,function(t){t(e)}),this._doneCallbacks.length=0,this._state=d)}},i.all=function(e,t){function o(n){r=r&&n,++i===e.length&&t(r)}var i=0,r=!0;n(e,function(e){e.done(o)})},i}];t.module("material.core.animate",[]).factory("$$forceReflow",d).factory("$$AnimateRunner",c).factory("$$rAFMutex",s).factory("$animateCss",["$window","$$rAF","$$AnimateRunner","$$forceReflow","$$jqLite","$timeout","$animate",function(t,d,s,c,l,m,u){function p(o,d){var c=[],l=y(o),p=l&&u.enabled(),g=!1,M=!1;p&&(d.transitionStyle&&c.push([i+"transition",d.transitionStyle]),d.keyframeStyle&&c.push([i+"animation",d.keyframeStyle]),d.delay&&c.push([i+"transition-delay",d.delay+"s"]),d.duration&&c.push([i+"transition-duration",d.duration+"s"]),g=d.keyframeStyle||d.to&&(d.duration>0||d.transitionStyle),M=!!d.addClass||!!d.removeClass,C(o,!0));var T=p&&(g||M);E(o,d);var A,w,k=!1;return{close:t.close,start:function(){function t(){if(!k)return k=!0,A&&w&&o.off(A,w),h(o,d),v(o,d),n(c,function(t){l.style[e(t[0])]=""}),u.complete(!0),u}var u=new s;return b(function(){if(C(o,!1),!T)return t();n(c,function(t){var n=t[0],o=t[1];l.style[e(n)]=o}),h(o,d);var s=f(o);if(0===s.duration)return t();var u=[];d.easing&&(s.transitionDuration&&u.push([i+"transition-timing-function",d.easing]),s.animationDuration&&u.push([i+"animation-timing-function",d.easing])),d.delay&&s.animationDelay&&u.push([i+"animation-delay",d.delay+"s"]),d.duration&&s.animationDuration&&u.push([i+"animation-duration",d.duration+"s"]),n(u,function(t){var n=t[0],o=t[1];l.style[e(n)]=o,c.push(t)});var p=s.delay,g=1e3*p,b=s.duration,v=1e3*b,E=Date.now();A=[],s.transitionDuration&&A.push(r),s.animationDuration&&A.push(a),A=A.join(" "),w=function(e){e.stopPropagation();var n=e.originalEvent||e,o=n.timeStamp||Date.now(),i=parseFloat(n.elapsedTime.toFixed(3));Math.max(o-E,0)>=g&&i>=b&&t()},o.on(A,w),$(o,d),m(t,g+1.5*v,!1)}),u}}}function h(e,t){t.addClass&&(l.addClass(e,t.addClass),t.addClass=null),t.removeClass&&(l.removeClass(e,t.removeClass),t.removeClass=null)}function f(e){function n(e){return o?"Webkit"+e.charAt(0).toUpperCase()+e.substr(1):e}var i=y(e),r=t.getComputedStyle(i),a=g(r[n("transitionDuration")]),d=g(r[n("animationDuration")]),s=g(r[n("transitionDelay")]),c=g(r[n("animationDelay")]);d*=parseInt(r[n("animationIterationCount")],10)||1;var l=Math.max(d,a),m=Math.max(c,s);return{duration:l,delay:m,animationDuration:d,transitionDuration:a,animationDelay:c,transitionDelay:s}}function g(e){var t=0,o=(e||"").split(/\s*,\s*/);return n(o,function(e){"s"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1)),e=parseFloat(e)||0,t=t?Math.max(e,t):e}),t}function b(e){M&&M(),T.push(e),M=d(function(){M=null;for(var e=c(),t=0;t<T.length;t++)T[t](e);T.length=0})}function v(e,t){E(e,t),$(e,t)}function E(e,t){t.from&&(e.css(t.from),t.from=null)}function $(e,t){t.to&&(e.css(t.to),t.to=null)}function y(e){for(var t=0;t<e.length;t++)if(1===e[t].nodeType)return e[t]}function C(t,n){var o=y(t),r=e(i+"transition-delay");o.style[r]=n?"-9999s":""}var M,T=[];return p}])}()}(),function(){t.module("material.components.autocomplete",["material.core","material.components.icon","material.components.virtualRepeat"])}(),function(){t.module("material.components.backdrop",["material.core"]).directive("mdBackdrop",["$mdTheming","$mdUtil","$animate","$rootElement","$window","$log","$$rAF","$document",function(e,n,o,i,r,a,d,s){function c(c,m,u){function p(){var e=parseInt(h.height,10)+Math.abs(parseInt(h.top,10));m.css("height",e+"px")}o.pin&&o.pin(m,i);var h;d(function(){if(h=r.getComputedStyle(s[0].body),"fixed"===h.position){var o=n.debounce(function(){h=r.getComputedStyle(s[0].body),p()},60,null,!1);p(),t.element(r).on("resize",o),c.$on("$destroy",function(){t.element(r).off("resize",o)})}var i=m.parent();if(i.length){"BODY"===i[0].nodeName&&m.css("position","fixed");var d=r.getComputedStyle(i[0]);"static"===d.position&&a.warn(l),e.inherit(m,i)}})}var l="<md-backdrop> may not work properly in a scrolled, static-positioned parent container.";return{restrict:"E",link:c}}])}(),function(){function e(e){return{restrict:"E",link:function(t,n){n.addClass("_md"),t.$on("$destroy",function(){e.destroy()})}}}function n(e){function n(e,n,r,a,d,s,c,l){function m(o,i,c,m){if(i=r.extractElementByName(i,"md-bottom-sheet"),i.attr("tabindex","-1"),i.hasClass("ng-cloak")){var u="$mdBottomSheet: using `<md-bottom-sheet ng-cloak >` will affect the bottom-sheet opening animations.";l.warn(u,i[0])}c.disableBackdrop||(h=r.createBackdrop(o,"md-bottom-sheet-backdrop md-opaque"),h[0].tabIndex=-1,c.clickOutsideToClose&&h.on("click",function(){r.nextTick(d.cancel,!0)}),a.inherit(h,c.parent),e.enter(h,c.parent,null));var f=new p(i,c.parent);return c.bottomSheet=f,a.inherit(f.element,c.parent),c.disableParentScroll&&(c.restoreScroll=r.disableScrollAround(f.element,c.parent)),e.enter(f.element,c.parent,h).then(function(){var e=r.findFocusTarget(i)||t.element(i[0].querySelector("button")||i[0].querySelector("a")||i[0].querySelector(r.prefixer("ng-click",!0)))||h;c.escapeToClose&&(c.rootElementKeyupCallback=function(e){e.keyCode===n.KEY_CODE.ESCAPE&&r.nextTick(d.cancel,!0)},s.on("keyup",c.rootElementKeyupCallback),e&&e.focus())})}function u(t,n,o){var i=o.bottomSheet;return o.disableBackdrop||e.leave(h),e.leave(i.element).then(function(){o.disableParentScroll&&(o.restoreScroll(),delete o.restoreScroll),i.cleanup()})}function p(e,t){function a(t){e.css(n.CSS.TRANSITION_DURATION,"0ms")}function s(t){var o=t.pointer.distanceY;o<5&&(o=Math.max(-i,o/2)),e.css(n.CSS.TRANSFORM,"translate3d(0,"+(i+o)+"px,0)")}function l(t){if(t.pointer.distanceY>0&&(t.pointer.distanceY>20||Math.abs(t.pointer.velocityY)>o)){var i=e.prop("offsetHeight")-t.pointer.distanceY,a=Math.min(i/t.pointer.velocityY*.75,500);e.css(n.CSS.TRANSITION_DURATION,a+"ms"),r.nextTick(d.cancel,!0)}else e.css(n.CSS.TRANSITION_DURATION,""),e.css(n.CSS.TRANSFORM,"")}var m=c.register(t,"drag",{horizontal:!1});return t.on("$md.dragstart",a).on("$md.drag",s).on("$md.dragend",l),{element:e,cleanup:function(){m(),t.off("$md.dragstart",a),t.off("$md.drag",s),t.off("$md.dragend",l)}}}var h;return{themable:!0,onShow:m,onRemove:u,disableBackdrop:!1,escapeToClose:!0,clickOutsideToClose:!0,disableParentScroll:!0}}n.$inject=["$animate","$mdConstant","$mdUtil","$mdTheming","$mdBottomSheet","$rootElement","$mdGesture","$log"];var o=.5,i=80;return e("$mdBottomSheet").setDefaults({methods:["disableParentScroll","escapeToClose","clickOutsideToClose"],options:n})}e.$inject=["$mdBottomSheet"],n.$inject=["$$interimElementProvider"],t.module("material.components.bottomSheet",["material.core","material.components.backdrop"]).directive("mdBottomSheet",e).provider("$mdBottomSheet",n)}(),function(){function e(e){return{restrict:"E",link:function(t,n){e(n)}}}function n(e,n,o,i){function r(e){return t.isDefined(e.href)||t.isDefined(e.ngHref)||t.isDefined(e.ngLink)||t.isDefined(e.uiSref)}function a(e,t){if(r(t))return'<a class="md-button" ng-transclude></a>';var n="undefined"==typeof t.type?"button":t.type;return'<button class="md-button" type="'+n+'" ng-transclude></button>'}function d(a,d,s){n(d),e.attach(a,d),o.expectWithoutText(d,"aria-label"),r(s)&&t.isDefined(s.ngDisabled)&&a.$watch(s.ngDisabled,function(e){d.attr("tabindex",e?-1:0)}),d.on("click",function(e){s.disabled===!0&&(e.preventDefault(),e.stopImmediatePropagation())}),d.hasClass("md-no-focus")||(d.on("focus",function(){i.isUserInvoked()&&"keyboard"!==i.getLastInteractionType()||d.addClass("md-focused")}),d.on("blur",function(){d.removeClass("md-focused")}))}return{restrict:"EA",replace:!0,transclude:!0,template:a,link:d}}n.$inject=["$mdButtonInkRipple","$mdTheming","$mdAria","$mdInteraction"],e.$inject=["$mdTheming"],t.module("material.components.button",["material.core"]).directive("mdButton",n).directive("a",e)}(),function(){function e(e){return{restrict:"E",link:function(t,n,o){n.addClass("_md"),e(n)}}}e.$inject=["$mdTheming"],t.module("material.components.card",["material.core"]).directive("mdCard",e)}(),function(){function e(e,n,o,i,r,a){function d(d,s){function c(d,s,c,l){function m(e,t,n){c[e]&&d.$watch(c[e],function(e){n[e]&&s.attr(t,n[e])})}function u(e){var t=e.which||e.keyCode;t!==o.KEY_CODE.SPACE&&t!==o.KEY_CODE.ENTER||(e.preventDefault(),s.addClass("md-focused"),p(e))}function p(e){s[0].hasAttribute("disabled")||d.skipToggle||d.$apply(function(){var t=c.ngChecked&&c.ngClick?c.checked:!v.$viewValue;v.$setViewValue(t,e&&e.type),v.$render()})}function h(){s.toggleClass("md-checked",!!v.$viewValue&&!g)}function f(e){g=e!==!1,g&&s.attr("aria-checked","mixed"),s.toggleClass("md-indeterminate",g)}var g,b=l[0],v=l[1]||r.fakeNgModel(),E=l[2];if(b){var $=b.isErrorGetter||function(){return v.$invalid&&(v.$touched||E&&E.$submitted)};b.input=s,d.$watch($,b.setInvalid)}i(s),s.children().on("focus",function(){s.focus()}),r.parseAttributeBoolean(c.mdIndeterminate)&&(f(),d.$watch(c.mdIndeterminate,f)),c.ngChecked&&d.$watch(d.$eval.bind(d,c.ngChecked),function(e){v.$setViewValue(e),v.$render()}),m("ngDisabled","tabindex",{"true":"-1","false":c.tabindex}),n.expectWithText(s,"aria-label"),e.link.pre(d,{on:t.noop,0:{}},c,[v]),s.on("click",p).on("keypress",u).on("focus",function(){"keyboard"===a.getLastInteractionType()&&s.addClass("md-focused")}).on("blur",function(){s.removeClass("md-focused")}),v.$render=h}return s.$set("tabindex",s.tabindex||"0"),s.$set("type","checkbox"),s.$set("role",s.type),{pre:function(e,t){t.on("click",function(e){this.hasAttribute("disabled")&&e.stopImmediatePropagation()})},post:c}}return e=e[0],{restrict:"E",transclude:!0,require:["^?mdInputContainer","?ngModel","?^form"],priority:o.BEFORE_NG_ARIA,template:'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox><div class="md-icon"></div></div><div ng-transclude class="md-label"></div>',compile:d}}e.$inject=["inputDirective","$mdAria","$mdConstant","$mdTheming","$mdUtil","$mdInteraction"],t.module("material.components.checkbox",["material.core"]).directive("mdCheckbox",e)}(),function(){t.module("material.components.chips",["material.core","material.components.autocomplete"])}(),function(){!function(){function e(e,n,o){function r(e,t){try{t&&e.css(s(t))}catch(n){o.error(n.message)}}function a(e){var t=l(e);return d(t)}function d(t,o){o=o||!1;var i=e.PALETTES[t.palette][t.hue];return i=o?i.contrast:i.value,n.supplant("rgba({0}, {1}, {2}, {3})",[i[0],i[1],i[2],i[3]||t.opacity])}function s(e){var n={},o=e.hasOwnProperty("color");return t.forEach(e,function(e,t){var i=l(e),r=t.indexOf("background")>-1;n[t]=d(i),r&&!o&&(n.color=d(i,!0))}),n}function c(n){return t.isDefined(e.THEMES[n.split("-")[0]])}function l(n){var o=n.split("-"),i=t.isDefined(e.THEMES[o[0]]),r=i?o.splice(0,1)[0]:e.defaultTheme();return{theme:r,palette:m(o,r),hue:u(o,r),opacity:o[2]||1}}function m(t,o){var r=t.length>1&&i.indexOf(t[1])!==-1,a=t[0].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();if(r&&(a=t[0]+"-"+t.splice(1,1)),i.indexOf(a)===-1){var d=e.THEMES[o].colors[a];if(!d)throw new Error(n.supplant("mdColors: couldn't find '{palette}' in the palettes.",{palette:a}));a=d.name}return a}function u(t,o){var i=e.THEMES[o].colors;if("hue"===t[1]){var r=parseInt(t.splice(2,1)[0],10);if(r<1||r>3)throw new Error(n.supplant("mdColors: 'hue-{hueNumber}' is not a valid hue, can be only 'hue-1', 'hue-2' and 'hue-3'",{hueNumber:r}));if(t[1]="hue-"+r,!(t[0]in i))throw new Error(n.supplant("mdColors: 'hue-x' can only be used with [{availableThemes}], but was used with '{usedTheme}'",{availableThemes:Object.keys(i).join(", "),usedTheme:t[0]}));return i[t[0]].hues[t[1]]}return t[1]||i[t[0]in i?t[0]:"primary"].hues["default"]}return i=i||Object.keys(e.PALETTES),{applyThemeColors:r,getThemeColor:a,hasTheme:c}}function n(e,n,i,r){return{restrict:"A",require:["^?mdTheme"],compile:function(a,d){function s(){var e=d.mdColors,i=e.indexOf("::")>-1,r=!!i||o.test(d.mdColors);d.mdColors=e.replace("::","");var a=t.isDefined(d.mdColorsWatch);return!i&&!r&&(!a||n.parseAttributeBoolean(d.mdColorsWatch))}var c=s();return function(n,o,a,d){var s=d[0],l={},m=function(t){"string"!=typeof t&&(t=""),a.mdColors||(a.mdColors="{}");var o=r(a.mdColors)(n);return s&&Object.keys(o).forEach(function(n){var i=o[n];e.hasTheme(i)||(o[n]=(t||s.$mdTheme)+"-"+i)}),u(o),o},u=function(e){if(!t.equals(e,l)){var n=Object.keys(l);l.background&&!n.color&&n.push("color"),n.forEach(function(e){o.css(e,"")})}l=e},p=t.noop;s&&(p=s.registerChanges(function(t){e.applyThemeColors(o,m(t))})),n.$on("$destroy",function(){p()});try{c?n.$watch(m,t.bind(this,e.applyThemeColors,o),!0):e.applyThemeColors(o,m())}catch(h){i.error(h.message)}}}}}n.$inject=["$mdColors","$mdUtil","$log","$parse"],e.$inject=["$mdTheming","$mdUtil","$log"];var o=/^{((\s|,)*?["'a-zA-Z-]+?\s*?:\s*?('|")[a-zA-Z0-9-.]*('|"))+\s*}$/,i=null;t.module("material.components.colors",["material.core"]).directive("mdColors",n).service("$mdColors",e)}()}(),function(){function e(e){function t(e,t){this.$scope=e,this.$element=t}return{restrict:"E",controller:["$scope","$element",t],link:function(t,o){o.addClass("_md"),e(o),t.$broadcast("$mdContentLoaded",o),n(o[0])}}}function n(e){t.element(e).on("$md.pressdown",function(t){"t"===t.pointer.type&&(t.$materialScrollFixed||(t.$materialScrollFixed=!0,0===e.scrollTop?e.scrollTop=1:e.scrollHeight===e.scrollTop+e.offsetHeight&&(e.scrollTop-=1)))})}e.$inject=["$mdTheming"],t.module("material.components.content",["material.core"]).directive("mdContent",e)}(),function(){t.module("material.components.datepicker",["material.core","material.components.icon","material.components.virtualRepeat"])}(),function(){function e(e,n,o){return{restrict:"E",link:function(i,r){r.addClass("_md"),n(r),e(function(){function e(){r.toggleClass("md-content-overflow",a.scrollHeight>a.clientHeight)}var n,a=r[0].querySelector("md-dialog-content");a&&(n=a.getElementsByTagName("img"),e(),t.element(n).on("load",e)),i.$on("$destroy",function(){o.destroy(r)})})}}}function o(e){function o(){return{template:['<md-dialog md-theme="{{ dialog.theme || dialog.defaultTheme }}" aria-label="{{ dialog.ariaLabel }}" ng-class="dialog.css">',' <md-dialog-content class="md-dialog-content" role="document" tabIndex="-1">',' <h2 class="md-title">{{ dialog.title }}</h2>',' <div ng-if="::dialog.mdHtmlContent" class="md-dialog-content-body" ',' ng-bind-html="::dialog.mdHtmlContent"></div>',' <div ng-if="::!dialog.mdHtmlContent" class="md-dialog-content-body">'," <p>{{::dialog.mdTextContent}}</p>"," </div>",' <md-input-container md-no-float ng-if="::dialog.$type == \'prompt\'" class="md-prompt-input-container">',' <input ng-keypress="dialog.keypress($event)" md-autofocus ng-model="dialog.result" placeholder="{{::dialog.placeholder}}" ng-required="dialog.required">'," </md-input-container>"," </md-dialog-content>"," <md-dialog-actions>",' <md-button ng-if="dialog.$type === \'confirm\' || dialog.$type === \'prompt\'" ng-click="dialog.abort()" class="md-primary md-cancel-button">'," {{ dialog.cancel }}"," </md-button>",' <md-button ng-click="dialog.hide()" class="md-primary md-confirm-button" md-autofocus="dialog.$type===\'alert\'" ng-disabled="dialog.required && !dialog.result">'," {{ dialog.ok }}"," </md-button>"," </md-dialog-actions>","</md-dialog>"].join("").replace(/\s\s+/g,""),controller:i,controllerAs:"dialog",bindToController:!0}}function i(e,n){this.$onInit=function(){var o="prompt"==this.$type;o&&this.initialValue&&(this.result=this.initialValue),this.hide=function(){e.hide(!o||this.result)},this.abort=function(){e.cancel()},this.keypress=function(i){var r=o&&this.required&&!t.isDefined(this.result);i.keyCode!==n.KEY_CODE.ENTER||r||e.hide(this.result)}}}function r(e,o,i,r,s,c,l,m,u,p,h,f,g){function b(e){e.defaultTheme=h.defaultTheme(),y(e)}function v(e,t,n,o){if(o){var i=o.htmlContent||n.htmlContent||"",r=o.textContent||n.textContent||o.content||n.content||"";if(i&&!p.has("$sanitize"))throw Error("The ngSanitize module must be loaded in order to use htmlContent.");if(i&&r)throw Error("md-dialog cannot have both `htmlContent` and `textContent`");o.mdHtmlContent=i,o.mdTextContent=r}}function E(e,n,o,r){function a(){n[0].querySelector(".md-actions")&&u.warn("Using a class of md-actions is deprecated, please use <md-dialog-actions>.")}function d(){function e(){return n[0].querySelector(".dialog-close, md-dialog-actions button:last-child")}if(o.focusOnOpen){var t=i.findFocusTarget(n)||e()||s;t.focus()}}t.element(c[0].body).addClass("md-dialog-is-showing");var s=n.find("md-dialog");if(s.hasClass("ng-cloak")){var l="$mdDialog: using `<md-dialog ng-cloak>` will affect the dialog opening animations.";u.warn(l,n[0])}return C(o),A(s,o),T(e,n,o),M(n,o),_(n,o).then(function(){w(n,o),a(),d()})}function $(e,n,o){function i(){return x(n,o)}function r(){t.element(c[0].body).removeClass("md-dialog-is-showing"),o.contentElement&&o.reverseContainerStretch(),o.cleanupElement(),o.$destroy||"keyboard"!==o.originInteraction||o.origin.focus()}return o.deactivateListeners(),o.unlockScreenReader(),o.hideBackdrop(o.$destroy),a&&a.parentNode&&a.parentNode.removeChild(a),d&&d.parentNode&&d.parentNode.removeChild(d),o.$destroy?r():i().then(r)}function y(e){var n;e.targetEvent&&e.targetEvent.target&&(n=t.element(e.targetEvent.target));var o=n&&n.controller("mdTheme");if(e.hasTheme=!!o,e.hasTheme){e.themeWatch=o.$shouldWatch;var i=e.theme||o.$mdTheme;i&&(e.scope.theme=i);var r=o.registerChanges(function(t){e.scope.theme=t,e.themeWatch||r()})}}function C(e){function o(e,o){var i=t.element(e||{});if(i&&i.length){var r={top:0,left:0,height:0,width:0},a=t.isFunction(i[0].getBoundingClientRect);return t.extend(o||{},{element:a?i:n,bounds:a?i[0].getBoundingClientRect():t.extend({},r,i[0]),focus:t.bind(i,i.focus)})}}function i(e,n){return t.isString(e)&&(e=c[0].querySelector(e)),t.element(e||n)}e.origin=t.extend({element:null,bounds:null,focus:t.noop},e.origin||{}),e.parent=i(e.parent,m),e.closeTo=o(i(e.closeTo)),e.openFrom=o(i(e.openFrom)),e.targetEvent&&(e.origin=o(e.targetEvent.target,e.origin),e.originInteraction=g.getLastInteractionType())}function M(n,o){var a=t.element(l),d=i.debounce(function(){k(n,o)},60),s=[],c=function(){var t="alert"==o.$type?e.hide:e.cancel;i.nextTick(t,!0)};if(o.escapeToClose){var m=o.parent,u=function(e){e.keyCode===r.KEY_CODE.ESCAPE&&(e.stopPropagation(),e.preventDefault(),c())};n.on("keydown",u),m.on("keydown",u),s.push(function(){n.off("keydown",u),m.off("keydown",u)})}if(a.on("resize",d),s.push(function(){a.off("resize",d)}),o.clickOutsideToClose){var p,h=n,f=function(e){p=e.target},g=function(e){p===h[0]&&e.target===h[0]&&(e.stopPropagation(),e.preventDefault(),c())};h.on("mousedown",f),h.on("mouseup",g),s.push(function(){h.off("mousedown",f),h.off("mouseup",g)})}o.deactivateListeners=function(){s.forEach(function(e){e()}),o.deactivateListeners=null}}function T(e,t,n){n.disableParentScroll&&(n.restoreScroll=i.disableScrollAround(t,n.parent)),n.hasBackdrop&&(n.backdrop=i.createBackdrop(e,"md-dialog-backdrop md-opaque"),s.enter(n.backdrop,n.parent)),n.hideBackdrop=function(e){n.backdrop&&(e?n.backdrop.remove():s.leave(n.backdrop)),n.disableParentScroll&&(n.restoreScroll&&n.restoreScroll(),delete n.restoreScroll),n.hideBackdrop=null}}function A(e,t){var n="alert"===t.$type?"alertdialog":"dialog",r=e.find("md-dialog-content"),s=e.attr("id"),c="dialogContent_"+(s||i.nextUid());e.attr({role:n,tabIndex:"-1"}),0===r.length&&(r=e,s&&(c=s)),r.attr("id",c),e.attr("aria-describedby",c),t.ariaLabel?o.expect(e,"aria-label",t.ariaLabel):o.expectAsync(e,"aria-label",function(){if(t.title)return t.title;var e=r.text().split(/\s+/);return e.length>3&&(e=e.slice(0,3).concat("...")),e.join(" ")}),a=document.createElement("div"),a.classList.add("md-dialog-focus-trap"),a.tabIndex=0,d=a.cloneNode(!1);var l=function(){e.focus()};a.addEventListener("focus",l),d.addEventListener("focus",l),e[0].parentNode.insertBefore(a,e[0]),e.after(d)}function w(e,t){function n(e){for(;e.parentNode;){if(e===document.body)return;for(var t=e.parentNode.children,i=0;i<t.length;i++)e===t[i]||N(t[i],["SCRIPT","STYLE"])||t[i].hasAttribute("aria-live")||t[i].setAttribute("aria-hidden",o);n(e=e.parentNode)}}var o=!0;n(e[0]),t.unlockScreenReader=function(){o=!1,n(e[0]),t.unlockScreenReader=null}}function k(e,t){var n="fixed"==l.getComputedStyle(c[0].body).position,o=t.backdrop?l.getComputedStyle(t.backdrop[0]):null,i=o?Math.min(c[0].body.clientHeight,Math.ceil(Math.abs(parseInt(o.height,10)))):0,r={top:e.css("top"),height:e.css("height")},a=Math.abs(t.parent[0].getBoundingClientRect().top);return e.css({top:(n?a:0)+"px",height:i?i+"px":"100%"}),function(){e.css(r)}}function _(e,t){t.parent.append(e),t.reverseContainerStretch=k(e,t);var n=e.find("md-dialog"),o=i.dom.animator,r=o.calculateZoomToOrigin,a={transitionInClass:"md-transition-in",transitionOutClass:"md-transition-out"},d=o.toTransformCss(r(n,t.openFrom||t.origin)),s=o.toTransformCss("");return n.toggleClass("md-dialog-fullscreen",!!t.fullscreen),o.translate3d(n,d,s,a).then(function(e){return t.reverseAnimate=function(){return delete t.reverseAnimate,t.closeTo?(a={transitionInClass:"md-transition-out",transitionOutClass:"md-transition-in"},d=s,s=o.toTransformCss(r(n,t.closeTo)),o.translate3d(n,d,s,a)):e(s=o.toTransformCss(r(n,t.origin)))},t.clearAnimate=function(){return delete t.clearAnimate,n.removeClass([a.transitionOutClass,a.transitionInClass].join(" ")),o.translate3d(n,s,o.toTransformCss(""),{})},!0})}function x(e,t){return t.reverseAnimate().then(function(){t.contentElement&&t.clearAnimate()})}function N(e,t){if(t.indexOf(e.nodeName)!==-1)return!0}return{hasBackdrop:!0,isolateScope:!0,onCompiling:b,onShow:E,onShowing:v,onRemove:$,clickOutsideToClose:!1,escapeToClose:!0,targetEvent:null,closeTo:null,openFrom:null,focusOnOpen:!0,disableParentScroll:!0,autoWrap:!0,fullscreen:!1,transformTemplate:function(e,t){function n(e){return t.autoWrap&&!/<\/md-dialog>/g.test(e)?"<md-dialog>"+(e||"")+"</md-dialog>":e||""}var o=f.startSymbol(),i=f.endSymbol(),r=o+(t.themeWatch?"":"::")+"theme"+i,a=t.hasTheme?'md-theme="'+r+'"':"";return'<div class="md-dialog-container" tabindex="-1" '+a+">"+n(e)+"</div>"}}}i.$inject=["$mdDialog","$mdConstant"],r.$inject=["$mdDialog","$mdAria","$mdUtil","$mdConstant","$animate","$document","$window","$rootElement","$log","$injector","$mdTheming","$interpolate","$mdInteraction"];var a,d;return e("$mdDialog").setDefaults({methods:["disableParentScroll","hasBackdrop","clickOutsideToClose","escapeToClose","targetEvent","closeTo","openFrom","parent","fullscreen","multiple"],options:r}).addPreset("alert",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","theme","css"],options:o}).addPreset("confirm",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","cancel","theme","css"],options:o}).addPreset("prompt",{methods:["title","htmlContent","textContent","initialValue","content","placeholder","ariaLabel","ok","cancel","theme","css","required"],options:o})}e.$inject=["$$rAF","$mdTheming","$mdDialog"],o.$inject=["$$interimElementProvider"],t.module("material.components.dialog",["material.core","material.components.backdrop"]).directive("mdDialog",e).provider("$mdDialog",o)}(),function(){function e(e){return{restrict:"E",link:e}}e.$inject=["$mdTheming"],t.module("material.components.divider",["material.core"]).directive("mdDivider",e)}(),function(){!function(){function e(e){return{restrict:"E",require:["^?mdFabSpeedDial","^?mdFabToolbar"],compile:function(t,n){var o=t.children(),i=e.prefixer().hasAttribute(o,"ng-repeat");i?o.addClass("md-fab-action-item"):o.wrap('<div class="md-fab-action-item">')}}}e.$inject=["$mdUtil"],t.module("material.components.fabActions",["material.core"]).directive("mdFabActions",e)}()}(),function(){!function(){function e(e,n,o,i,r,a){function d(){N.direction=N.direction||"down",N.isOpen=N.isOpen||!1,l(),n.addClass("md-animations-waiting")}function s(){var o=["click","focusin","focusout"];t.forEach(o,function(e){n.on(e,c)}),e.$on("$destroy",function(){t.forEach(o,function(e){n.off(e,c)}),h()})}function c(e){"click"==e.type&&k(e),"focusout"!=e.type||D||(D=a(function(){N.close()},100,!1)),"focusin"==e.type&&D&&(a.cancel(D),D=null)}function l(){N.currentActionIndex=-1}function m(){e.$watch("vm.direction",function(e,t){o.removeClass(n,"md-"+t),o.addClass(n,"md-"+e),l()});var t,i;e.$watch("vm.isOpen",function(e){l(),t&&i||(t=_(),i=x()),e?p():h();var r=e?"md-is-open":"",a=e?"":"md-is-open";t.attr("aria-haspopup",!0),t.attr("aria-expanded",e),i.attr("aria-hidden",!e),o.setClass(n,r,a)})}function u(){n[0].scrollHeight>0?o.addClass(n,"_md-animations-ready").then(function(){n.removeClass("md-animations-waiting")}):S<10&&(a(u,100),S+=1)}function p(){n.on("keydown",g),i.nextTick(function(){t.element(document).on("click touchend",f)})}function h(){n.off("keydown",g),t.element(document).off("click touchend",f)}function f(e){if(e.target){var t=i.getClosest(e.target,"md-fab-trigger"),n=i.getClosest(e.target,"md-fab-actions");
t||n||N.close()}}function g(e){switch(e.which){case r.KEY_CODE.ESCAPE:return N.close(),e.preventDefault(),!1;case r.KEY_CODE.LEFT_ARROW:return y(e),!1;case r.KEY_CODE.UP_ARROW:return C(e),!1;case r.KEY_CODE.RIGHT_ARROW:return M(e),!1;case r.KEY_CODE.DOWN_ARROW:return T(e),!1}}function b(e){E(e,-1)}function v(e){E(e,1)}function E(e,n){var o=$();N.currentActionIndex=N.currentActionIndex+n,N.currentActionIndex=Math.min(o.length-1,N.currentActionIndex),N.currentActionIndex=Math.max(0,N.currentActionIndex);var i=t.element(o[N.currentActionIndex]).children()[0];t.element(i).attr("tabindex",0),i.focus(),e.preventDefault(),e.stopImmediatePropagation()}function $(){var e=x()[0].querySelectorAll(".md-fab-action-item");return t.forEach(e,function(e){t.element(t.element(e).children()[0]).attr("tabindex",-1)}),e}function y(e){"left"===N.direction?v(e):b(e)}function C(e){"down"===N.direction?b(e):v(e)}function M(e){"left"===N.direction?b(e):v(e)}function T(e){"up"===N.direction?b(e):v(e)}function A(e){return i.getClosest(e,"md-fab-trigger")}function w(e){return i.getClosest(e,"md-fab-actions")}function k(e){A(e.target)&&N.toggle(),w(e.target)&&N.close()}function _(){return n.find("md-fab-trigger")}function x(){return n.find("md-fab-actions")}var N=this,S=0;N.open=function(){e.$evalAsync("vm.isOpen = true")},N.close=function(){e.$evalAsync("vm.isOpen = false"),n.find("md-fab-trigger")[0].focus()},N.toggle=function(){e.$evalAsync("vm.isOpen = !vm.isOpen")},N.$onInit=function(){d(),s(),m(),u()},1===t.version.major&&t.version.minor<=4&&this.$onInit();var D}e.$inject=["$scope","$element","$animate","$mdUtil","$mdConstant","$timeout"],t.module("material.components.fabShared",["material.core"]).controller("MdFabController",e)}()}(),function(){!function(){function n(){function e(e,t){t.prepend('<div class="_md-css-variables"></div>')}return{restrict:"E",scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:e}}function o(n){function o(e){n(e,r,!1)}function i(n){if(!n.hasClass("md-animations-waiting")||n.hasClass("_md-animations-ready")){var o=n[0],i=n.controller("mdFabSpeedDial"),r=o.querySelectorAll(".md-fab-action-item"),a=o.querySelector("md-fab-trigger"),d=o.querySelector("._md-css-variables"),s=parseInt(e.getComputedStyle(d).zIndex);t.forEach(r,function(e,t){var n=e.style;n.transform=n.webkitTransform="",n.transitionDelay="",n.opacity=1,n.zIndex=r.length-t+s}),a.style.zIndex=s+r.length+1,i.isOpen||t.forEach(r,function(e,t){var n,o,r=e.style,d=(a.clientHeight-e.clientHeight)/2,s=(a.clientWidth-e.clientWidth)/2;switch(i.direction){case"up":n=e.scrollHeight*(t+1)+d,o="Y";break;case"down":n=-(e.scrollHeight*(t+1)+d),o="Y";break;case"left":n=e.scrollWidth*(t+1)+s,o="X";break;case"right":n=-(e.scrollWidth*(t+1)+s),o="X"}var c="translate"+o+"("+n+"px)";r.transform=r.webkitTransform=c})}}return{addClass:function(e,t,n){e.hasClass("md-fling")?(i(e),o(n)):n()},removeClass:function(e,t,n){i(e),o(n)}}}function i(n){function o(e){n(e,r,!1)}function i(n){var o=n[0],i=n.controller("mdFabSpeedDial"),r=o.querySelectorAll(".md-fab-action-item"),d=o.querySelector("._md-css-variables"),s=parseInt(e.getComputedStyle(d).zIndex);t.forEach(r,function(e,t){var n=e.style,o=t*a;n.opacity=i.isOpen?1:0,n.transform=n.webkitTransform=i.isOpen?"scale(1)":"scale(0)",n.transitionDelay=(i.isOpen?o:r.length-o)+"ms",n.zIndex=r.length-t+s})}var a=65;return{addClass:function(e,t,n){i(e),o(n)},removeClass:function(e,t,n){i(e),o(n)}}}o.$inject=["$timeout"],i.$inject=["$timeout"];var r=300;t.module("material.components.fabSpeedDial",["material.core","material.components.fabShared","material.components.fabActions"]).directive("mdFabSpeedDial",n).animation(".md-fling",o).animation(".md-scale",i).service("mdFabSpeedDialFlingAnimation",o).service("mdFabSpeedDialScaleAnimation",i)}()}(),function(){!function(){function n(){function e(e,t,n){t.addClass("md-fab-toolbar"),t.find("md-fab-trigger").find("button").prepend('<div class="md-fab-toolbar-background"></div>')}return{restrict:"E",transclude:!0,template:'<div class="md-fab-toolbar-wrapper"> <div class="md-fab-toolbar-content" ng-transclude></div></div>',scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:e}}function o(){function n(n,o,i){if(o){var r=n[0],a=n.controller("mdFabToolbar"),d=r.querySelector(".md-fab-toolbar-background"),s=r.querySelector("md-fab-trigger button"),c=r.querySelector("md-toolbar"),l=r.querySelector("md-fab-trigger button md-icon"),m=n.find("md-fab-actions").children();if(s&&d){var u=e.getComputedStyle(s).getPropertyValue("background-color"),p=r.offsetWidth,h=(r.offsetHeight,2*(p/s.offsetWidth));d.style.backgroundColor=u,d.style.borderRadius=p+"px",a.isOpen?(c.style.pointerEvents="inherit",d.style.width=s.offsetWidth+"px",d.style.height=s.offsetHeight+"px",d.style.transform="scale("+h+")",d.style.transitionDelay="0ms",l&&(l.style.transitionDelay=".3s"),t.forEach(m,function(e,t){e.style.transitionDelay=25*(m.length-t)+"ms"})):(c.style.pointerEvents="none",d.style.transform="scale(1)",d.style.top="0",n.hasClass("md-right")&&(d.style.left="0",d.style.right=null),n.hasClass("md-left")&&(d.style.right="0",d.style.left=null),d.style.transitionDelay="200ms",l&&(l.style.transitionDelay="0ms"),t.forEach(m,function(e,t){e.style.transitionDelay=200+25*t+"ms"}))}}}return{addClass:function(e,t,o){n(e,t,o),o()},removeClass:function(e,t,o){n(e,t,o),o()}}}t.module("material.components.fabToolbar",["material.core","material.components.fabShared","material.components.fabActions"]).directive("mdFabToolbar",n).animation(".md-fab-toolbar",o).service("mdFabToolbarAnimation",o)}()}(),function(){function e(e,o,i,r){function a(n,a,d,s){function c(){for(var e in o.MEDIA)r(e),r.getQuery(o.MEDIA[e]).addListener(M);return r.watchResponsiveAttributes(["md-cols","md-row-height","md-gutter"],d,m)}function l(){s.layoutDelegate=t.noop,T();for(var e in o.MEDIA)r.getQuery(o.MEDIA[e]).removeListener(M)}function m(e){null==e?s.invalidateLayout():r(e)&&s.invalidateLayout()}function u(e){var o=g(),r={tileSpans:b(o),colCount:v(),rowMode:y(),rowHeight:$(),gutter:E()};if(e||!t.equals(r,A)){var d=i(r.colCount,r.tileSpans,o).map(function(e,n){return{grid:{element:a,style:f(r.colCount,n,r.gutter,r.rowMode,r.rowHeight)},tiles:e.map(function(e,i){return{element:t.element(o[i]),style:h(e.position,e.spans,r.colCount,n,r.gutter,r.rowMode,r.rowHeight)}})}}).reflow().performance();n.mdOnLayout({$event:{performance:d}}),A=r}}function p(e){return w+e+k}function h(e,t,n,o,i,r,a){var d=1/n*100,s=(n-1)/n,c=_({share:d,gutterShare:s,gutter:i}),l="rtl"!=document.dir&&"rtl"!=document.body.dir,m=l?{left:x({unit:c,offset:e.col,gutter:i}),width:N({unit:c,span:t.col,gutter:i}),paddingTop:"",marginTop:"",top:"",height:""}:{right:x({unit:c,offset:e.col,gutter:i}),width:N({unit:c,span:t.col,gutter:i}),paddingTop:"",marginTop:"",top:"",height:""};switch(r){case"fixed":m.top=x({unit:a,offset:e.row,gutter:i}),m.height=N({unit:a,span:t.row,gutter:i});break;case"ratio":var u=d/a,p=_({share:u,gutterShare:s,gutter:i});m.paddingTop=N({unit:p,span:t.row,gutter:i}),m.marginTop=x({unit:p,offset:e.row,gutter:i});break;case"fit":var h=(o-1)/o;u=1/o*100,p=_({share:u,gutterShare:h,gutter:i}),m.top=x({unit:p,offset:e.row,gutter:i}),m.height=N({unit:p,span:t.row,gutter:i})}return m}function f(e,t,n,o,i){var r={};switch(o){case"fixed":r.height=N({unit:i,span:t,gutter:n}),r.paddingBottom="";break;case"ratio":var a=1===e?0:(e-1)/e,d=1/e*100,s=d*(1/i),c=_({share:s,gutterShare:a,gutter:n});r.height="",r.paddingBottom=N({unit:c,span:t,gutter:n});break;case"fit":}return r}function g(){return[].filter.call(a.children(),function(e){return"MD-GRID-TILE"==e.tagName&&!e.$$mdDestroyed})}function b(e){return[].map.call(e,function(e){var n=t.element(e).controller("mdGridTile");return{row:parseInt(r.getResponsiveAttribute(n.$attrs,"md-rowspan"),10)||1,col:parseInt(r.getResponsiveAttribute(n.$attrs,"md-colspan"),10)||1}})}function v(){var e=parseInt(r.getResponsiveAttribute(d,"md-cols"),10);if(isNaN(e))throw"md-grid-list: md-cols attribute was not found, or contained a non-numeric value";return e}function E(){return C(r.getResponsiveAttribute(d,"md-gutter")||1)}function $(){var e=r.getResponsiveAttribute(d,"md-row-height");if(!e)throw"md-grid-list: md-row-height attribute was not found";switch(y()){case"fixed":return C(e);case"ratio":var t=e.split(":");return parseFloat(t[0])/parseFloat(t[1]);case"fit":return 0}}function y(){var e=r.getResponsiveAttribute(d,"md-row-height");if(!e)throw"md-grid-list: md-row-height attribute was not found";return"fit"==e?"fit":e.indexOf(":")!==-1?"ratio":"fixed"}function C(e){return/\D$/.test(e)?e:e+"px"}a.addClass("_md"),a.attr("role","list"),s.layoutDelegate=u;var M=t.bind(s,s.invalidateLayout),T=c();n.$on("$destroy",l);var A,w=e.startSymbol(),k=e.endSymbol(),_=e(p("share")+"% - ("+p("gutter")+" * "+p("gutterShare")+")"),x=e("calc(("+p("unit")+" + "+p("gutter")+") * "+p("offset")+")"),N=e("calc(("+p("unit")+") * "+p("span")+" + ("+p("span")+" - 1) * "+p("gutter")+")")}return{restrict:"E",controller:n,scope:{mdOnLayout:"&"},link:a}}function n(e){this.layoutInvalidated=!1,this.tilesInvalidated=!1,this.$timeout_=e.nextTick,this.layoutDelegate=t.noop}function o(e){function n(t,n){var o,a,d,s,c,l;return s=e.time(function(){a=i(t,n)}),o={layoutInfo:function(){return a},map:function(t){return c=e.time(function(){var e=o.layoutInfo();d=t(e.positioning,e.rowCount)}),o},reflow:function(t){return l=e.time(function(){var e=t||r;e(d.grid,d.tiles)}),o},performance:function(){return{tileCount:n.length,layoutTime:s,mapTime:c,reflowTime:l,totalTime:s+c+l}}}}function o(e,t){e.element.css(e.style),t.forEach(function(e){e.element.css(e.style)})}function i(e,t){function n(t,n){if(t.col>e)throw"md-grid-list: Tile at position "+n+" has a colspan ("+t.col+") that exceeds the column count ("+e+")";for(var a=0,l=0;l-a<t.col;)d>=e?o():(a=c.indexOf(0,d),a!==-1&&(l=r(a+1))!==-1?d=l+1:(a=l=0,o()));return i(a,t.col,t.row),d=a+t.col,{col:a,row:s}}function o(){d=0,s++,i(0,e,-1)}function i(e,t,n){for(var o=e;o<e+t;o++)c[o]=Math.max(c[o]+n,0)}function r(e){var t;for(t=e;t<c.length;t++)if(0!==c[t])return t;if(t===c.length)return t}function a(){for(var t=[],n=0;n<e;n++)t.push(0);return t}var d=0,s=0,c=a();return{positioning:t.map(function(e,t){return{spans:e,position:n(e,t)}}),rowCount:s+Math.max.apply(Math,c)}}var r=o;return n.animateWith=function(e){r=t.isFunction(e)?e:o},n}function i(e){function n(n,o,i,r){o.attr("role","listitem");var a=e.watchResponsiveAttributes(["md-colspan","md-rowspan"],i,t.bind(r,r.invalidateLayout));r.invalidateTiles(),n.$on("$destroy",function(){o[0].$$mdDestroyed=!0,a(),r.invalidateLayout()}),t.isDefined(n.$parent.$index)&&n.$watch(function(){return n.$parent.$index},function(e,t){e!==t&&r.invalidateTiles()})}return{restrict:"E",require:"^mdGridList",template:"<figure ng-transclude></figure>",transclude:!0,scope:{},controller:["$attrs",function(e){this.$attrs=e}],link:n}}function r(){return{template:"<figcaption ng-transclude></figcaption>",transclude:!0}}n.$inject=["$mdUtil"],o.$inject=["$mdUtil"],e.$inject=["$interpolate","$mdConstant","$mdGridLayout","$mdMedia"],i.$inject=["$mdMedia"],t.module("material.components.gridList",["material.core"]).directive("mdGridList",e).directive("mdGridTile",i).directive("mdGridTileFooter",r).directive("mdGridTileHeader",r).factory("$mdGridLayout",o),n.prototype={invalidateTiles:function(){this.tilesInvalidated=!0,this.invalidateLayout()},invalidateLayout:function(){this.layoutInvalidated||(this.layoutInvalidated=!0,this.$timeout_(t.bind(this,this.layout)))},layout:function(){try{this.layoutDelegate(this.tilesInvalidated)}finally{this.layoutInvalidated=!1,this.tilesInvalidated=!1}}}}(),function(){t.module("material.components.icon",["material.core"])}(),function(){function n(e,t){function n(t){var n=t[0].querySelector(r),o=t[0].querySelector(a);return n&&t.addClass("md-icon-left"),o&&t.addClass("md-icon-right"),function(t,n){e(n)}}function o(e,n,o,i){var r=this;r.isErrorGetter=o.mdIsError&&t(o.mdIsError),r.delegateClick=function(){r.input.focus()},r.element=n,r.setFocused=function(e){n.toggleClass("md-input-focused",!!e)},r.setHasValue=function(e){n.toggleClass("md-input-has-value",!!e)},r.setHasPlaceholder=function(e){n.toggleClass("md-input-has-placeholder",!!e)},r.setInvalid=function(e){e?i.addClass(n,"md-input-invalid"):i.removeClass(n,"md-input-invalid")},e.$watch(function(){return r.label&&r.input},function(e){e&&!r.label.attr("for")&&r.label.attr("for",r.input.attr("id"))})}o.$inject=["$scope","$element","$attrs","$animate"];var i=["INPUT","TEXTAREA","SELECT","MD-SELECT"],r=i.reduce(function(e,t){return e.concat(["md-icon ~ "+t,".md-icon ~ "+t])},[]).join(","),a=i.reduce(function(e,t){return e.concat([t+" ~ md-icon",t+" ~ .md-icon"])},[]).join(",");return{restrict:"E",compile:n,controller:o}}function o(){return{restrict:"E",require:"^?mdInputContainer",link:function(e,t,n,o){!o||n.mdNoFloat||t.hasClass("md-container-ignore")||(o.label=t,e.$on("$destroy",function(){o.label=null}))}}}function i(e,n,o,i,r){function a(a,d,s,c){function l(e){return h.setHasValue(!g.$isEmpty(e)),e}function m(){h.label&&s.$observe("required",function(e){h.label.toggleClass("md-required",e&&!E)})}function u(){h.setHasValue(d.val().length>0||(d[0].validity||{}).badInput)}function p(){function o(){d.attr("rows",1).css("height","auto").addClass("md-no-flex");var e=c();if(!$){var t=d[0].style.padding||"";$=d.css("padding",0).prop("offsetHeight"),d[0].style.padding=t}if(b&&$&&(e=Math.max(e,$*b)),v&&$){var n=$*v;n<e?(d.attr("md-no-autogrow",""),e=n):d.removeAttr("md-no-autogrow")}$&&d.attr("rows",Math.round(e/$)),d.css("height",e+"px").removeClass("md-no-flex")}function c(){var e=y.offsetHeight,t=y.scrollHeight-e;return e+Math.max(t,0)}function l(t){return e.nextTick(o),t}function m(){if(p&&(p=!1,t.element(n).off("resize",o),E&&E(),d.attr("md-no-autogrow","").off("input",o),f)){var e=g.$formatters.indexOf(l);e>-1&&g.$formatters.splice(e,1)}}function u(){function e(e){e.preventDefault(),l=!0,u=e.clientY,p=parseFloat(d.css("height"))||d.prop("offsetHeight")}function n(e){l&&(e.preventDefault(),m(),f.addClass("md-input-resized"))}function o(e){l&&d.css("height",p+e.pointer.distanceY+"px")}function i(e){l&&(l=!1,f.removeClass("md-input-resized"))}if(!s.hasOwnProperty("mdNoResize")){var c=t.element('<div class="md-resize-handle"></div>'),l=!1,u=null,p=0,f=h.element,g=r.register(c,"drag",{horizontal:!1});d.wrap('<div class="md-resize-wrapper">').after(c),c.on("mousedown",e),f.on("$md.dragstart",n).on("$md.drag",o).on("$md.dragend",i),a.$on("$destroy",function(){c.off("mousedown",e).remove(),f.off("$md.dragstart",n).off("$md.drag",o).off("$md.dragend",i),g(),c=null,f=null,g=null})}}var p=!s.hasOwnProperty("mdNoAutogrow");if(u(),p){var b=s.hasOwnProperty("rows")?parseInt(s.rows):NaN,v=s.hasOwnProperty("maxRows")?parseInt(s.maxRows):NaN,E=a.$on("md-resize-textarea",o),$=null,y=d[0];if(i(function(){e.nextTick(o)},10,!1),d.on("input",o),f&&g.$formatters.push(l),b||d.attr("rows",1),t.element(n).on("resize",o),a.$on("$destroy",m),s.hasOwnProperty("mdDetectHidden")){var C=function(){var e=!1;return function(){var t=0===y.offsetHeight;t===!1&&e===!0&&o(),e=t}}();a.$watch(function(){return e.nextTick(C,!1),!0})}}}var h=c[0],f=!!c[1],g=c[1]||e.fakeNgModel(),b=c[2],v=t.isDefined(s.readonly),E=e.parseAttributeBoolean(s.mdNoAsterisk),$=d[0].tagName.toLowerCase();if(h){if("hidden"===s.type)return void d.attr("aria-hidden","true");if(h.input){if(h.input[0].contains(d[0]))return;throw new Error("<md-input-container> can only have *one* <input>, <textarea> or <md-select> child element!")}h.input=d,m();var y=t.element('<div class="md-errors-spacer">');d.after(y);var C=t.isString(s.placeholder)?s.placeholder.trim():"";h.label||C.length||o.expect(d,"aria-label"),d.addClass("md-input"),d.attr("id")||d.attr("id","input_"+e.nextUid()),"input"===$&&"number"===s.type&&s.min&&s.max&&!s.step?d.attr("step","any"):"textarea"===$&&p(),f||u();var M=h.isErrorGetter||function(){return g.$invalid&&(g.$touched||b&&b.$submitted)};a.$watch(M,h.setInvalid),s.ngValue&&s.$observe("value",u),g.$parsers.push(l),g.$formatters.push(l),d.on("input",u),v||d.on("focus",function(t){e.nextTick(function(){h.setFocused(!0)})}).on("blur",function(t){e.nextTick(function(){h.setFocused(!1),u()})}),a.$on("$destroy",function(){h.setFocused(!1),h.setHasValue(!1),h.input=null})}}return{restrict:"E",require:["^?mdInputContainer","?ngModel","?^form"],link:a}}function r(e,n){function o(o,i,r,a){function d(e){return c&&c.parent?(c.text(String(i.val()||e||"").length+" / "+s),e):e}var s=parseInt(r.mdMaxlength);isNaN(s)&&(s=-1);var c,l,m=a[0],u=a[1];m.$validators["md-maxlength"]=function(e,n){return!t.isNumber(s)||s<0||(d(),(e||i.val()||n||"").length<=s)},n.nextTick(function(){l=t.element(u.element[0].querySelector(".md-errors-spacer")),c=t.element('<div class="md-char-counter">'),l.append(c),r.$set("ngTrim","false"),o.$watch(r.mdMaxlength,function(n){s=n,t.isNumber(n)&&n>0?(c.parent().length||e.enter(c,l),d()):e.leave(c)})})}return{restrict:"A",require:["ngModel","^mdInputContainer"],link:o}}function a(e){function n(n,o,i,r){if(r){var a=r.element.find("label"),d=r.element.attr("md-no-float");if(a&&a.length||""===d||n.$eval(d))return void r.setHasPlaceholder(!0);if("MD-SELECT"!=o[0].nodeName){var s=t.element('<label ng-click="delegateClick()" tabindex="-1">'+i.placeholder+"</label>");i.$set("placeholder",null),r.element.addClass("md-icon-float").prepend(s),e(s)(n)}}}return{restrict:"A",require:"^^?mdInputContainer",priority:200,link:{pre:n}}}function d(e,t){function n(n,o,i){function r(){d=!0,t(function(){e[0].activeElement===o[0]&&o[0].select(),d=!1},1,!1)}function a(e){d&&e.preventDefault()}if("INPUT"===o[0].nodeName||"TEXTAREA"===o[0].nodeName){var d=!1;o.on("focus",r).on("mouseup",a),n.$on("$destroy",function(){o.off("focus",r).off("mouseup",a)})}}return{restrict:"A",link:n}}function s(){function e(e,n,o,i){i&&(n.toggleClass("md-input-messages-animation",!0),n.toggleClass("md-auto-hide",!0),("false"==o.mdAutoHide||t(o))&&n.toggleClass("md-auto-hide",!1))}function t(e){return A.some(function(t){return e[t]})}return{restrict:"EA",link:e,require:"^^?mdInputContainer"}}function c(e){function t(t){function n(){for(var e=t[0];e=e.parentNode;)if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!0;return!1}function o(t){return!!e.getClosest(t,"md-input-container")}function i(e){e.toggleClass("md-input-message-animation",!0)}if(o(t))i(t);else if(n())return function(e,n){o(n)&&i(t)}}return{restrict:"EA",compile:t,priority:100}}function l(e,t,n,o){return E(e,t,n,o),{addClass:function(e,t,n){p(e,n)}}}function m(e,t,n,o){return E(e,t,n,o),{enter:function(e,t){p(e,t)},leave:function(e,t){h(e,t)},addClass:function(e,t,n){"ng-hide"==t?h(e,n):n()},removeClass:function(e,t,n){"ng-hide"==t?p(e,n):n()}}}function u(e,t,n,o){return E(e,t,n,o),{enter:function(e,t){var n=f(e);n.start().done(t)},leave:function(e,t){var n=g(e);n.start().done(t)}}}function p(e,n){var o,i=[],r=v(e),a=r.children();return 0==r.length||0==a.length?(T.warn("mdInput messages show animation called on invalid messages element: ",e),void n()):(t.forEach(a,function(e){o=f(t.element(e)),i.push(o.start())}),void y.all(i,n))}function h(e,n){var o,i=[],r=v(e),a=r.children();return 0==r.length||0==a.length?(T.warn("mdInput messages hide animation called on invalid messages element: ",e),void n()):(t.forEach(a,function(e){o=g(t.element(e)),i.push(o.start())}),void y.all(i,n))}function f(t){var n=parseInt(e.getComputedStyle(t[0]).height),o=parseInt(e.getComputedStyle(t[0]).marginTop),i=v(t),r=b(t),a=o>-n;return a||i.hasClass("md-auto-hide")&&!r.hasClass("md-input-invalid")?C(t,{}):C(t,{event:"enter",structural:!0,from:{opacity:0,"margin-top":-n+"px"},to:{opacity:1,"margin-top":"0"},duration:.3})}function g(t){var n=t[0].offsetHeight,o=e.getComputedStyle(t[0]);return 0===parseInt(o.opacity)?C(t,{}):C(t,{event:"leave",structural:!0,from:{opacity:1,"margin-top":0},to:{opacity:0,"margin-top":-n+"px"},duration:.3})}function b(e){var t=e.controller("mdInputContainer");return t.element}function v(e){return e.hasClass("md-input-messages-animation")?e:e.hasClass("md-input-message-animation")?t.element(M.getClosest(e,function(e){return e.classList.contains("md-input-messages-animation")})):t.element(e[0].querySelector(".md-input-messages-animation"))}function E(e,t,n,o){y=e,C=t,M=n,T=o}n.$inject=["$mdTheming","$parse"],i.$inject=["$mdUtil","$window","$mdAria","$timeout","$mdGesture"],r.$inject=["$animate","$mdUtil"],a.$inject=["$compile"],c.$inject=["$mdUtil"],d.$inject=["$document","$timeout"],l.$inject=["$$AnimateRunner","$animateCss","$mdUtil","$log"],m.$inject=["$$AnimateRunner","$animateCss","$mdUtil","$log"],u.$inject=["$$AnimateRunner","$animateCss","$mdUtil","$log"];var $=t.module("material.components.input",["material.core"]).directive("mdInputContainer",n).directive("label",o).directive("input",i).directive("textarea",i).directive("mdMaxlength",r).directive("placeholder",a).directive("ngMessages",s).directive("ngMessage",c).directive("ngMessageExp",c).directive("mdSelectOnFocus",d).animation(".md-input-invalid",l).animation(".md-input-messages-animation",m).animation(".md-input-message-animation",u);e._mdMocksIncluded&&$.service("$$mdInput",function(){return{messages:{show:p,hide:h,getElement:v}}}).service("mdInputInvalidAnimation",l).service("mdInputMessagesAnimation",m).service("mdInputMessageAnimation",u);var y,C,M,T,A=["ngIf","ngShow","ngHide","ngSwitchWhen","ngSwitchDefault"]}(),function(){function e(e){return{restrict:"E",compile:function(t){return t[0].setAttribute("role","list"),e}}}function n(e,n,o,i){var r=["md-checkbox","md-switch","md-menu"];return{restrict:"E",controller:"MdListController",compile:function(a,d){function s(){for(var e,t,n=["md-switch","md-checkbox"],o=0;t=n[o];++o)if((e=a.find(t)[0])&&!e.hasAttribute("aria-label")){var i=a.find("p")[0];if(!i)return;e.setAttribute("aria-label","Toggle "+i.textContent)}}function c(){var e=t.element(E),n=e.parent().hasClass("md-secondary-container")||E.parentNode.firstElementChild!==E,o="left";n&&(o="right"),e.attr("md-position-mode")||e.attr("md-position-mode",o+" target");var i=e.children().eq(0);g(i[0])||i.attr("ng-click","$mdMenu.open($event)"),i.attr("aria-label")||i.attr("aria-label","Open List Menu")}function l(n){if("div"==n)y=t.element('<div class="md-no-style md-list-item-inner">'),y.append(a.contents()),a.addClass("md-proxy-focus");else{y=t.element('<div class="md-button md-no-style"> <div class="md-list-item-inner"></div></div>');var o=t.element('<md-button class="md-no-style"></md-button>');p(a[0],o[0]),o.attr("aria-label")||o.attr("aria-label",e.getText(a)),a.hasClass("md-no-focus")&&o.addClass("md-no-focus"),y.prepend(o),y.children().eq(1).append(a.contents()),a.addClass("_md-button-wrap")}a[0].setAttribute("tabindex","-1"),a.append(y)}function m(){var e=t.element('<div class="md-secondary-container">');t.forEach($,function(t){u(t,e)}),y.append(e)}function u(n,o){if(n&&!f(n)&&n.hasAttribute("ng-click")){e.expect(n,"aria-label");var i=t.element('<md-button class="md-secondary md-icon-button">');p(n,i[0],["ng-if","ng-hide","ng-show"]),n.setAttribute("tabindex","-1"),i.append(n),n=i[0]}n&&(!g(n)||!d.ngClick&&h(n))&&t.element(n).removeClass("md-secondary"),a.addClass("md-with-secondary"),o.append(n)}function p(e,n,i){var r=o.prefixer(["ng-if","ng-click","ng-dblclick","aria-label","ng-disabled","ui-sref","href","ng-href","rel","target","ng-attr-ui-sref","ui-sref-opts","download"]);i&&(r=r.concat(o.prefixer(i))),t.forEach(r,function(t){e.hasAttribute(t)&&(n.setAttribute(t,e.getAttribute(t)),e.removeAttribute(t))})}function h(e){return r.indexOf(e.nodeName.toLowerCase())!=-1}function f(e){var t=e.nodeName.toUpperCase();return"MD-BUTTON"==t||"BUTTON"==t}function g(e){for(var t=e.attributes,n=0;n<t.length;n++)if("ngClick"===d.$normalize(t[n].name))return!0;return!1}function b(e,a,d,s){function c(){p&&p.children&&!b&&!v&&t.forEach(r,function(e){t.forEach(p.querySelectorAll(e+":not(.md-secondary)"),function(e){u.push(e)})})}function l(){(1==u.length||b)&&(a.addClass("md-clickable"),b||s.attachRipple(e,t.element(a[0].querySelector(".md-no-style"))))}function m(e){var t=["md-slider"];if(!e.path)return t.indexOf(e.target.tagName.toLowerCase())!==-1;for(var n=e.path.indexOf(a.children()[0]),o=0;o<n;o++)if(t.indexOf(e.path[o].tagName.toLowerCase())!==-1)return!0}a.addClass("_md");var u=[],p=a[0].firstElementChild,h=a.hasClass("_md-button-wrap"),f=h?p.firstElementChild:p,b=f&&g(f),v=a.hasClass("md-no-proxy");c(),l(),u.length&&t.forEach(u,function(n){n=t.element(n),e.mouseActive=!1,n.on("mousedown",function(){e.mouseActive=!0,i(function(){e.mouseActive=!1},100)}).on("focus",function(){e.mouseActive===!1&&a.addClass("md-focused"),n.on("blur",function t(){a.removeClass("md-focused"),n.off("blur",t)})})});var E=function(e){if("INPUT"!=e.target.nodeName&&"TEXTAREA"!=e.target.nodeName&&!e.target.isContentEditable){var t=e.which||e.keyCode;t==n.KEY_CODE.SPACE&&f&&(f.click(),e.preventDefault(),e.stopPropagation())}};b||u.length||f&&f.addEventListener("keypress",E),a.off("click"),a.off("keypress"),1==u.length&&f&&a.children().eq(0).on("click",function(e){if(!m(e)){var n=o.getClosest(e.target,"BUTTON");!n&&f.contains(e.target)&&t.forEach(u,function(n){e.target===n||n.contains(e.target)||("MD-MENU"===n.nodeName&&(n=n.children[0]),t.element(n).triggerHandler("click"))})}}),e.$on("$destroy",function(){f&&f.removeEventListener("keypress",E)})}var v,E,$=a[0].querySelectorAll(".md-secondary"),y=a;if(a[0].setAttribute("role","listitem"),d.ngClick||d.ngDblclick||d.ngHref||d.href||d.uiSref||d.ngAttrUiSref)l("button");else if(!a.hasClass("md-no-proxy")){for(var C,M=0;C=r[M];++M)if(E=a[0].querySelector(C)){v=!0;break}v?l("div"):a.addClass("md-no-proxy")}return m(),s(),v&&"MD-MENU"===E.nodeName&&c(),b}}}function o(e,t,n){function o(e,t){var o={};n.attach(e,t,o)}var i=this;i.attachRipple=o}o.$inject=["$scope","$element","$mdListInkRipple"],e.$inject=["$mdTheming"],n.$inject=["$mdAria","$mdConstant","$mdUtil","$timeout"],t.module("material.components.list",["material.core"]).controller("MdListController",o).directive("mdList",e).directive("mdListItem",n)}(),function(){t.module("material.components.menu",["material.core","material.components.backdrop"])}(),function(){t.module("material.components.menuBar",["material.core","material.components.icon","material.components.menu"])}(),function(){function e(e,n){return{restrict:"E",transclude:!0,controller:o,controllerAs:"ctrl",bindToController:!0,scope:{mdSelectedNavItem:"=?",mdNoInkBar:"=?",navBarAriaLabel:"@?"},template:'<div class="md-nav-bar"><nav role="navigation"><ul class="_md-nav-bar-list" ng-transclude role="listbox"tabindex="0"ng-focus="ctrl.onFocus()"ng-keydown="ctrl.onKeydown($event)"aria-label="{{ctrl.navBarAriaLabel}}"></ul></nav><md-nav-ink-bar ng-hide="ctrl.mdNoInkBar"></md-nav-ink-bar></div>',link:function(o,i,r,a){n(i),a.navBarAriaLabel||e.expectAsync(i,"aria-label",t.noop)}}}function o(e,t,n,o){this._$timeout=n,this._$scope=t,this._$mdConstant=o,this.mdSelectedNavItem,this.navBarAriaLabel,this._navBarEl=e[0],this._inkbar;var i=this,r=this._$scope.$watch(function(){return i._navBarEl.querySelectorAll("._md-nav-button").length},function(e){e>0&&(i._initTabs(),r())})}function i(e,n,o,i){return{restrict:"E",require:["mdNavItem","^mdNavBar"],controller:r,bindToController:!0,controllerAs:"ctrl",replace:!0,transclude:!0,template:function(e,t){var n,o,i,r=t.mdNavClick,a=t.mdNavHref,d=t.mdNavSref,s=t.srefOpts;if((r?1:0)+(a?1:0)+(d?1:0)>1)throw Error("Must not specify more than one of the md-nav-click, md-nav-href, or md-nav-sref attributes per nav-item directive.");return r?n='ng-click="ctrl.mdNavClick()"':a?n='ng-href="{{ctrl.mdNavHref}}"':d&&(n='ui-sref="{{ctrl.mdNavSref}}"'),o=s?'ui-sref-opts="{{ctrl.srefOpts}}" ':"",n&&(i='<md-button class="_md-nav-button md-accent" ng-class="ctrl.getNgClassMap()" ng-blur="ctrl.setFocused(false)" ng-disabled="ctrl.disabled"tabindex="-1" '+o+n+'><span ng-transclude class="_md-nav-button-text"></span></md-button>'),'<li class="md-nav-item" role="option" aria-selected="{{ctrl.isSelected()}}">'+(i||"")+"</li>"},scope:{mdNavClick:"&?",mdNavHref:"@?",mdNavSref:"@?",srefOpts:"=?",name:"@"},link:function(r,a,d,s){var c;n(function(){var n=s[0],l=s[1],m=t.element(a[0].querySelector("._md-nav-button"));if(n.name||(n.name=t.element(a[0].querySelector("._md-nav-button-text")).text().trim()),m.on("click",function(){l.mdSelectedNavItem=n.name,r.$apply()}),"MutationObserver"in i){var u={attributes:!0,attributeFilter:["disabled"]},p=a[0],h=function(e){o.nextTick(function(){n.disabled=o.parseAttributeBoolean(d[e[0].attributeName],!1)})},f=new MutationObserver(h);f.observe(p,u),c=f.disconnect.bind(f)}else d.$observe("disabled",function(e){n.disabled=o.parseAttributeBoolean(e,!1)});e.expectWithText(a,"aria-label")}),r.$on("destroy",function(){c()})}}}function r(e){this._$element=e,this.mdNavClick,this.mdNavHref,this.mdNavSref,this.srefOpts,this.name,this._selected=!1,this._focused=!1}o.$inject=["$element","$scope","$timeout","$mdConstant"],i.$inject=["$mdAria","$$rAF","$mdUtil","$window"],r.$inject=["$element"],e.$inject=["$mdAria","$mdTheming"],t.module("material.components.navBar",["material.core"]).controller("MdNavBarController",o).directive("mdNavBar",e).controller("MdNavItemController",r).directive("mdNavItem",i),o.prototype._initTabs=function(){this._inkbar=t.element(this._navBarEl.querySelector("md-nav-ink-bar"));var e=this;this._$timeout(function(){e._updateTabs(e.mdSelectedNavItem,n)}),this._$scope.$watch("ctrl.mdSelectedNavItem",function(t,n){e._$timeout(function(){e._updateTabs(t,n)})})},o.prototype._updateTabs=function(e,t){var n=this,o=this._getTabs();if(o){var i=-1,r=-1,a=this._getTabByName(e),d=this._getTabByName(t);d&&(d.setSelected(!1),i=o.indexOf(d)),a&&(a.setSelected(!0),r=o.indexOf(a)),this._$timeout(function(){n._updateInkBarStyles(a,r,i)})}},o.prototype._updateInkBarStyles=function(e,t,n){if(this._inkbar.toggleClass("_md-left",t<n).toggleClass("_md-right",t>n),this._inkbar.css({display:t<0?"none":""}),e){var o=e.getButtonEl(),i=o.offsetLeft;this._inkbar.css({left:i+"px",width:o.offsetWidth+"px"})}},o.prototype._getTabs=function(){var e=Array.prototype.slice.call(this._navBarEl.querySelectorAll(".md-nav-item")).map(function(e){return t.element(e).controller("mdNavItem")});return e.indexOf(n)?e:null},o.prototype._getTabByName=function(e){return this._findTab(function(t){return t.getName()==e})},o.prototype._getSelectedTab=function(){return this._findTab(function(e){return e.isSelected()})},o.prototype.getFocusedTab=function(){return this._findTab(function(e){return e.hasFocus()})},o.prototype._findTab=function(e){for(var t=this._getTabs(),n=0;n<t.length;n++)if(e(t[n]))return t[n];return null},o.prototype.onFocus=function(){var e=this._getSelectedTab();e&&e.setFocused(!0)},o.prototype._moveFocus=function(e,t){e.setFocused(!1),t.setFocused(!0)},o.prototype.onKeydown=function(e){var t=this._$mdConstant.KEY_CODE,n=this._getTabs(),o=this.getFocusedTab();if(o){var i=n.indexOf(o);switch(e.keyCode){case t.UP_ARROW:case t.LEFT_ARROW:i>0&&this._moveFocus(o,n[i-1]);break;case t.DOWN_ARROW:case t.RIGHT_ARROW:i<n.length-1&&this._moveFocus(o,n[i+1]);break;case t.SPACE:case t.ENTER:this._$timeout(function(){o.getButtonEl().click()})}}},r.prototype.getNgClassMap=function(){return{"md-active":this._selected,"md-primary":this._selected,"md-unselected":!this._selected,"md-focused":this._focused}},r.prototype.getName=function(){return this.name},r.prototype.getButtonEl=function(){return this._$element[0].querySelector("._md-nav-button")},r.prototype.setSelected=function(e){this._selected=e},r.prototype.isSelected=function(){return this._selected},r.prototype.setFocused=function(e){this._focused=e,e&&this.getButtonEl().focus();
},r.prototype.hasFocus=function(){return this._focused}}(),function(){function e(){return{definePreset:o,getAllPresets:i,clearPresets:r,$get:a()}}function o(e,t){if(!e||!t)throw new Error("mdPanelProvider: The panel preset definition is malformed. The name and preset object are required.");if(b.hasOwnProperty(e))throw new Error("mdPanelProvider: The panel preset you have requested has already been defined.");delete t.id,delete t.position,delete t.animation,b[e]=t}function i(){return t.copy(b)}function r(){b={}}function a(){return["$rootElement","$rootScope","$injector","$window",function(e,t,n,o){return new d(b,e,t,n,o)}]}function d(e,n,o,i,r){this._defaultConfigOptions={bindToController:!0,clickOutsideToClose:!1,disableParentScroll:!1,escapeToClose:!1,focusOnOpen:!0,fullscreen:!1,hasBackdrop:!1,propagateContainerEvents:!1,transformTemplate:t.bind(this,this._wrapTemplate),trapFocus:!1,zIndex:h},this._config={},this._presets=e,this._$rootElement=n,this._$rootScope=o,this._$injector=i,this._$window=r,this._$mdUtil=this._$injector.get("$mdUtil"),this._trackedPanels={},this._groups=Object.create(null),this.animation=l.animation,this.xPosition=c.xPosition,this.yPosition=c.yPosition,this.interceptorTypes=s.interceptorTypes,this.closeReasons=s.closeReasons,this.absPosition=c.absPosition}function s(e,t){this._$q=t.get("$q"),this._$mdCompiler=t.get("$mdCompiler"),this._$mdConstant=t.get("$mdConstant"),this._$mdUtil=t.get("$mdUtil"),this._$mdTheming=t.get("$mdTheming"),this._$rootScope=t.get("$rootScope"),this._$animate=t.get("$animate"),this._$mdPanel=t.get("$mdPanel"),this._$log=t.get("$log"),this._$window=t.get("$window"),this._$$rAF=t.get("$$rAF"),this.id=e.id,this.config=e,this.panelContainer,this.panelEl,this.isAttached=!1,this._removeListeners=[],this._topFocusTrap,this._bottomFocusTrap,this._backdropRef,this._restoreScroll=null,this._interceptors=Object.create(null),this._compilerCleanup=null,this._restoreCache={styles:"",classes:""}}function c(e){this._$window=e.get("$window"),this._isRTL="rtl"===e.get("$mdUtil").bidi(),this._$mdConstant=e.get("$mdConstant"),this._absolute=!1,this._relativeToEl,this._top="",this._bottom="",this._left="",this._right="",this._translateX=[],this._translateY=[],this._positions=[],this._actualPosition}function l(e){this._$mdUtil=e.get("$mdUtil"),this._openFrom,this._closeTo,this._animationClass="",this._openDuration,this._closeDuration,this._rawDuration}function m(e){var n=t.isString(e)?document.querySelector(e):e;return t.element(n)}function u(e,t){var n=getComputedStyle(e[0]||e)[t],o=n.indexOf("("),i=n.lastIndexOf(")"),r={x:0,y:0};if(o>-1&&i>-1){var a=n.substring(o+1,i).split(", ").slice(-2);r.x=parseInt(a[0]),r.y=parseInt(a[1])}return r}function p(e){return t.isNumber(e)?e+"px":e}d.$inject=["presets","$rootElement","$rootScope","$injector","$window"],t.module("material.components.panel",["material.core","material.components.backdrop"]).provider("$mdPanel",e);var h=80,f="_md-panel-hidden",g=t.element('<div class="_md-panel-focus-trap" tabindex="0"></div>'),b={};d.prototype.create=function(e,n){if("string"==typeof e?e=this._getPresetByName(e):"object"!=typeof e||!t.isUndefined(n)&&n||(n=e,e={}),e=e||{},n=n||{},t.isDefined(n.id)&&this._trackedPanels[n.id]){var o=this._trackedPanels[n.id];return t.extend(o.config,n),o}this._config=t.extend({id:n.id||"panel_"+this._$mdUtil.nextUid(),scope:this._$rootScope.$new(!0),attachTo:this._$rootElement},this._defaultConfigOptions,n,e);var i=new s(this._config,this._$injector);return this._trackedPanels[n.id]=i,this._config.groupName&&(t.isString(this._config.groupName)&&(this._config.groupName=[this._config.groupName]),t.forEach(this._config.groupName,function(e){i.addToGroup(e)})),this._config.scope.$on("$destroy",t.bind(i,i.detach)),i},d.prototype.open=function(e,t){var n=this.create(e,t);return n.open().then(function(){return n})},d.prototype._getPresetByName=function(e){if(!this._presets[e])throw new Error("mdPanel: The panel preset configuration that you requested does not exist. Use the $mdPanelProvider to create a preset before requesting one.");return this._presets[e]},d.prototype.newPanelPosition=function(){return new c(this._$injector)},d.prototype.newPanelAnimation=function(){return new l(this._$injector)},d.prototype.newPanelGroup=function(e,t){if(!this._groups[e]){t=t||{};var n={panels:[],openPanels:[],maxOpen:t.maxOpen>0?t.maxOpen:1/0};this._groups[e]=n}return this._groups[e]},d.prototype.setGroupMaxOpen=function(e,t){if(!this._groups[e])throw new Error("mdPanel: Group does not exist yet. Call newPanelGroup().");this._groups[e].maxOpen=t},d.prototype._openCountExceedsMaxOpen=function(e){if(this._groups[e]){var t=this._groups[e];return t.maxOpen>0&&t.openPanels.length>t.maxOpen}return!1},d.prototype._closeFirstOpenedPanel=function(e){this._groups[e].openPanels[0].close()},d.prototype._wrapTemplate=function(e){var t=e||"";return'<div class="md-panel-outer-wrapper"> <div class="md-panel _md-panel-offscreen">'+t+"</div></div>"},d.prototype._wrapContentElement=function(e){var n=t.element('<div class="md-panel-outer-wrapper">');return e.addClass("md-panel _md-panel-offscreen"),n.append(e),n},s.interceptorTypes={CLOSE:"onClose"},s.prototype.open=function(){var e=this;return this._$q(function(n,o){var i=e._done(n,e),r=e._simpleBind(e.show,e),a=function(){e.config.groupName&&t.forEach(e.config.groupName,function(t){e._$mdPanel._openCountExceedsMaxOpen(t)&&e._$mdPanel._closeFirstOpenedPanel(t)})};e.attach().then(r).then(a).then(i)["catch"](o)})},s.prototype.close=function(e){var n=this;return this._$q(function(o,i){n._callInterceptors(s.interceptorTypes.CLOSE).then(function(){var r=n._done(o,n),a=n._simpleBind(n.detach,n),d=n.config.onCloseSuccess||t.noop;d=t.bind(n,d,n,e),n.hide().then(a).then(r).then(d)["catch"](i)},i)})},s.prototype.attach=function(){if(this.isAttached&&this.panelEl)return this._$q.when(this);var e=this;return this._$q(function(n,o){var i=e._done(n,e),r=e.config.onDomAdded||t.noop,a=function(t){return e.isAttached=!0,e._addEventListeners(),t};e._$q.all([e._createBackdrop(),e._createPanel().then(a)["catch"](o)]).then(r).then(i)["catch"](o)})},s.prototype.detach=function(){if(!this.isAttached)return this._$q.when(this);var e=this,n=e.config.onDomRemoved||t.noop,o=function(){return e._removeEventListeners(),e._topFocusTrap&&e._topFocusTrap.parentNode&&e._topFocusTrap.parentNode.removeChild(e._topFocusTrap),e._bottomFocusTrap&&e._bottomFocusTrap.parentNode&&e._bottomFocusTrap.parentNode.removeChild(e._bottomFocusTrap),e._restoreCache.classes&&(e.panelEl[0].className=e._restoreCache.classes),e.panelEl[0].style.cssText=e._restoreCache.styles||"",e._compilerCleanup(),e.panelContainer.remove(),e.isAttached=!1,e._$q.when(e)};return this._restoreScroll&&(this._restoreScroll(),this._restoreScroll=null),this._$q(function(t,i){var r=e._done(t,e);e._$q.all([o(),!e._backdropRef||e._backdropRef.detach()]).then(n).then(r)["catch"](i)})},s.prototype.destroy=function(){var e=this;this.config.groupName&&t.forEach(this.config.groupName,function(t){e.removeFromGroup(t)}),this.config.scope.$destroy(),this.config.locals=null,this.config.onDomAdded=null,this.config.onDomRemoved=null,this.config.onRemoving=null,this.config.onOpenComplete=null,this._interceptors=null},s.prototype.show=function(){if(!this.panelContainer)return this._$q(function(e,t){t("mdPanel: Panel does not exist yet. Call open() or attach().")});if(!this.panelContainer.hasClass(f))return this._$q.when(this);var e=this,n=function(){return e.panelContainer.removeClass(f),e._animateOpen()};return this._$q(function(o,i){var r=e._done(o,e),a=e.config.onOpenComplete||t.noop,d=function(){e.config.groupName&&t.forEach(e.config.groupName,function(t){e._$mdPanel._groups[t].openPanels.push(e)})};e._$q.all([e._backdropRef?e._backdropRef.show():e,n().then(function(){e._focusOnOpen()},i)]).then(a).then(d).then(r)["catch"](i)})},s.prototype.hide=function(){if(!this.panelContainer)return this._$q(function(e,t){t("mdPanel: Panel does not exist yet. Call open() or attach().")});if(this.panelContainer.hasClass(f))return this._$q.when(this);var e=this;return this._$q(function(n,o){var i=e._done(n,e),r=e.config.onRemoving||t.noop,a=function(){e.panelContainer.addClass(f)},d=function(){if(e.config.groupName){var n;t.forEach(e.config.groupName,function(t){t=e._$mdPanel._groups[t],n=t.openPanels.indexOf(e),n>-1&&t.openPanels.splice(n,1)})}},s=function(){var t=e.config.origin;t&&m(t).focus()};e._$q.all([e._backdropRef?e._backdropRef.hide():e,e._animateClose().then(r).then(a).then(d).then(s)["catch"](o)]).then(i,o)})},s.prototype.addClass=function(e,t){if(this._$log.warn("mdPanel: The addClass method is in the process of being deprecated. Full deprecation is scheduled for the AngularJS Material 1.2 release. To achieve the same results, use the panelContainer or panelEl JQLite elements that are referenced in MdPanelRef."),!this.panelContainer)throw new Error("mdPanel: Panel does not exist yet. Call open() or attach().");t||this.panelContainer.hasClass(e)?t&&!this.panelEl.hasClass(e)&&this.panelEl.addClass(e):this.panelContainer.addClass(e)},s.prototype.removeClass=function(e,t){if(this._$log.warn("mdPanel: The removeClass method is in the process of being deprecated. Full deprecation is scheduled for the AngularJS Material 1.2 release. To achieve the same results, use the panelContainer or panelEl JQLite elements that are referenced in MdPanelRef."),!this.panelContainer)throw new Error("mdPanel: Panel does not exist yet. Call open() or attach().");!t&&this.panelContainer.hasClass(e)?this.panelContainer.removeClass(e):t&&this.panelEl.hasClass(e)&&this.panelEl.removeClass(e)},s.prototype.toggleClass=function(e,t){if(this._$log.warn("mdPanel: The toggleClass method is in the process of being deprecated. Full deprecation is scheduled for the AngularJS Material 1.2 release. To achieve the same results, use the panelContainer or panelEl JQLite elements that are referenced in MdPanelRef."),!this.panelContainer)throw new Error("mdPanel: Panel does not exist yet. Call open() or attach().");t?this.panelEl.toggleClass(e):this.panelContainer.toggleClass(e)},s.prototype._compile=function(){var e=this;return e._$mdCompiler.compile(e.config).then(function(n){var o=e.config;if(o.contentElement){var i=n.element;e._restoreCache.styles=i[0].style.cssText,e._restoreCache.classes=i[0].className,e.panelContainer=e._$mdPanel._wrapContentElement(i),e.panelEl=i}else e.panelContainer=n.link(o.scope),e.panelEl=t.element(e.panelContainer[0].querySelector(".md-panel"));return e._compilerCleanup=n.cleanup,m(e.config.attachTo).append(e.panelContainer),e})},s.prototype._createPanel=function(){var e=this;return this._$q(function(t,n){e.config.locals||(e.config.locals={}),e.config.locals.mdPanelRef=e,e._compile().then(function(){e.config.disableParentScroll&&(e._restoreScroll=e._$mdUtil.disableScrollAround(null,e.panelContainer,{disableScrollMask:!0})),e.config.panelClass&&e.panelEl.addClass(e.config.panelClass),e.config.propagateContainerEvents&&(e.panelContainer.css("pointer-events","none"),e.panelEl.css("pointer-events","all")),e._$animate.pin&&e._$animate.pin(e.panelContainer,m(e.config.attachTo)),e._configureTrapFocus(),e._addStyles().then(function(){t(e)},n)},n)})},s.prototype._addStyles=function(){var e=this;return this._$q(function(t){e.panelContainer.css("z-index",e.config.zIndex),e.panelEl.css("z-index",e.config.zIndex+1);var n=function(){e._setTheming(),e.panelEl.removeClass("_md-panel-offscreen"),e.panelContainer.addClass(f),t(e)};if(e.config.fullscreen)return e.panelEl.addClass("_md-panel-fullscreen"),void n();var o=e.config.position;return o?void e._$rootScope.$$postDigest(function(){e._updatePosition(!0),e._setTheming(),t(e)}):void n()})},s.prototype._setTheming=function(){this._$mdTheming(this.panelEl),this._$mdTheming(this.panelContainer)},s.prototype.updatePosition=function(e){if(!this.panelContainer)throw new Error("mdPanel: Panel does not exist yet. Call open() or attach().");this.config.position=e,this._updatePosition()},s.prototype._updatePosition=function(e){var t=this.config.position;t&&(t._setPanelPosition(this.panelEl),e&&(this.panelEl.removeClass("_md-panel-offscreen"),this.panelContainer.addClass(f)),this.panelEl.css(c.absPosition.TOP,t.getTop()),this.panelEl.css(c.absPosition.BOTTOM,t.getBottom()),this.panelEl.css(c.absPosition.LEFT,t.getLeft()),this.panelEl.css(c.absPosition.RIGHT,t.getRight()))},s.prototype._focusOnOpen=function(){if(this.config.focusOnOpen){var e=this;this._$rootScope.$$postDigest(function(){var t=e._$mdUtil.findFocusTarget(e.panelEl)||e.panelEl;t.focus()})}},s.prototype._createBackdrop=function(){if(this.config.hasBackdrop){if(!this._backdropRef){var e=this._$mdPanel.newPanelAnimation().openFrom(this.config.attachTo).withAnimation({open:"_md-opaque-enter",close:"_md-opaque-leave"});this.config.animation&&e.duration(this.config.animation._rawDuration);var t={animation:e,attachTo:this.config.attachTo,focusOnOpen:!1,panelClass:"_md-panel-backdrop",zIndex:this.config.zIndex-1};this._backdropRef=this._$mdPanel.create(t)}if(!this._backdropRef.isAttached)return this._backdropRef.attach()}},s.prototype._addEventListeners=function(){this._configureEscapeToClose(),this._configureClickOutsideToClose(),this._configureScrollListener()},s.prototype._removeEventListeners=function(){this._removeListeners&&this._removeListeners.forEach(function(e){e()}),this._removeListeners=[]},s.prototype._configureEscapeToClose=function(){if(this.config.escapeToClose){var e=m(this.config.attachTo),t=this,n=function(e){e.keyCode===t._$mdConstant.KEY_CODE.ESCAPE&&(e.stopPropagation(),e.preventDefault(),t.close(s.closeReasons.ESCAPE))};this.panelContainer.on("keydown",n),e.on("keydown",n),this._removeListeners.push(function(){t.panelContainer.off("keydown",n),e.off("keydown",n)})}},s.prototype._configureClickOutsideToClose=function(){if(this.config.clickOutsideToClose){var e,n=this.config.propagateContainerEvents?t.element(document.body):this.panelContainer,o=function(t){e=t.target},i=this,r=function(t){i.config.propagateContainerEvents?e===i.panelEl[0]||i.panelEl[0].contains(e)||i.close():e===n[0]&&t.target===n[0]&&(t.stopPropagation(),t.preventDefault(),i.close(s.closeReasons.CLICK_OUTSIDE))};n.on("mousedown",o),n.on("mouseup",r),this._removeListeners.push(function(){n.off("mousedown",o),n.off("mouseup",r)})}},s.prototype._configureScrollListener=function(){if(!this.config.disableParentScroll){var e=t.bind(this,this._updatePosition),n=this._$$rAF.throttle(e),o=this,i=function(){n()};this._$window.addEventListener("scroll",i,!0),this._removeListeners.push(function(){o._$window.removeEventListener("scroll",i,!0)})}},s.prototype._configureTrapFocus=function(){if(this.panelEl.attr("tabIndex","-1"),this.config.trapFocus){var e=this.panelEl;this._topFocusTrap=g.clone()[0],this._bottomFocusTrap=g.clone()[0];var t=function(){e.focus()};this._topFocusTrap.addEventListener("focus",t),this._bottomFocusTrap.addEventListener("focus",t),this._removeListeners.push(this._simpleBind(function(){this._topFocusTrap.removeEventListener("focus",t),this._bottomFocusTrap.removeEventListener("focus",t)},this)),e[0].parentNode.insertBefore(this._topFocusTrap,e[0]),e.after(this._bottomFocusTrap)}},s.prototype.updateAnimation=function(e){this.config.animation=e,this._backdropRef&&this._backdropRef.config.animation.duration(e._rawDuration)},s.prototype._animateOpen=function(){this.panelContainer.addClass("md-panel-is-showing");var e=this.config.animation;if(!e)return this.panelContainer.addClass("_md-panel-shown"),this._$q.when(this);var t=this;return this._$q(function(n){var o=t._done(n,t),i=function(){t._$log.warn("mdPanel: MdPanel Animations failed. Showing panel without animating."),o()};e.animateOpen(t.panelEl).then(o,i)})},s.prototype._animateClose=function(){var e=this.config.animation;if(!e)return this.panelContainer.removeClass("md-panel-is-showing"),this.panelContainer.removeClass("_md-panel-shown"),this._$q.when(this);var t=this;return this._$q(function(n){var o=function(){t.panelContainer.removeClass("md-panel-is-showing"),n(t)},i=function(){t._$log.warn("mdPanel: MdPanel Animations failed. Hiding panel without animating."),o()};e.animateClose(t.panelEl).then(o,i)})},s.prototype.registerInterceptor=function(e,n){var o=null;if(t.isString(e)?t.isFunction(n)||(o="Interceptor callback must be a function, instead got "+typeof n):o="Interceptor type must be a string, instead got "+typeof e,o)throw new Error("MdPanel: "+o);var i=this._interceptors[e]=this._interceptors[e]||[];return i.indexOf(n)===-1&&i.push(n),this},s.prototype.removeInterceptor=function(e,t){var n=this._interceptors[e]?this._interceptors[e].indexOf(t):-1;return n>-1&&this._interceptors[e].splice(n,1),this},s.prototype.removeAllInterceptors=function(e){return e?this._interceptors[e]=[]:this._interceptors=Object.create(null),this},s.prototype._callInterceptors=function(e){var n=this,o=n._$q,i=n._interceptors&&n._interceptors[e]||[];return i.reduceRight(function(e,i){var r=i&&t.isFunction(i.then),a=r?i:null;return e.then(function(){if(!a)try{a=i(n)}catch(e){a=o.reject(e)}return a})},o.resolve(n))},s.prototype._simpleBind=function(e,t){return function(n){return e.apply(t,n)}},s.prototype._done=function(e,t){return function(){e(t)}},s.prototype.addToGroup=function(e){this._$mdPanel._groups[e]||this._$mdPanel.newPanelGroup(e);var t=this._$mdPanel._groups[e],n=t.panels.indexOf(this);n<0&&t.panels.push(this)},s.prototype.removeFromGroup=function(e){if(!this._$mdPanel._groups[e])throw new Error("mdPanel: The group "+e+" does not exist.");var t=this._$mdPanel._groups[e],n=t.panels.indexOf(this);n>-1&&t.panels.splice(n,1)},s.closeReasons={CLICK_OUTSIDE:"clickOutsideToClose",ESCAPE:"escapeToClose"},c.xPosition={CENTER:"center",ALIGN_START:"align-start",ALIGN_END:"align-end",OFFSET_START:"offset-start",OFFSET_END:"offset-end"},c.yPosition={CENTER:"center",ALIGN_TOPS:"align-tops",ALIGN_BOTTOMS:"align-bottoms",ABOVE:"above",BELOW:"below"},c.absPosition={TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},c.viewportMargin=8,c.prototype.absolute=function(){return this._absolute=!0,this},c.prototype._setPosition=function(e,n){if(e===c.absPosition.RIGHT||e===c.absPosition.LEFT)this._left=this._right="";else{if(e!==c.absPosition.BOTTOM&&e!==c.absPosition.TOP){var o=Object.keys(c.absPosition).join().toLowerCase();throw new Error("mdPanel: Position must be one of "+o+".")}this._top=this._bottom=""}return this["_"+e]=t.isString(n)?n:"0",this},c.prototype.top=function(e){return this._setPosition(c.absPosition.TOP,e)},c.prototype.bottom=function(e){return this._setPosition(c.absPosition.BOTTOM,e)},c.prototype.start=function(e){var t=this._isRTL?c.absPosition.RIGHT:c.absPosition.LEFT;return this._setPosition(t,e)},c.prototype.end=function(e){var t=this._isRTL?c.absPosition.LEFT:c.absPosition.RIGHT;return this._setPosition(t,e)},c.prototype.left=function(e){return this._setPosition(c.absPosition.LEFT,e)},c.prototype.right=function(e){return this._setPosition(c.absPosition.RIGHT,e)},c.prototype.centerHorizontally=function(){return this._left="50%",this._right="",this._translateX=["-50%"],this},c.prototype.centerVertically=function(){return this._top="50%",this._bottom="",this._translateY=["-50%"],this},c.prototype.center=function(){return this.centerHorizontally().centerVertically()},c.prototype.relativeTo=function(e){return this._absolute=!1,this._relativeToEl=m(e),this},c.prototype.addPanelPosition=function(e,t){if(!this._relativeToEl)throw new Error("mdPanel: addPanelPosition can only be used with relative positioning. Set relativeTo first.");return this._validateXPosition(e),this._validateYPosition(t),this._positions.push({x:e,y:t}),this},c.prototype._validateYPosition=function(e){if(null!=e){for(var t,n=Object.keys(c.yPosition),o=[],i=0;t=n[i];i++){var r=c.yPosition[t];if(o.push(r),r===e)return}throw new Error("mdPanel: Panel y position only accepts the following values:\n"+o.join(" | "))}},c.prototype._validateXPosition=function(e){if(null!=e){for(var t,n=Object.keys(c.xPosition),o=[],i=0;t=n[i];i++){var r=c.xPosition[t];if(o.push(r),r===e)return}throw new Error("mdPanel: Panel x Position only accepts the following values:\n"+o.join(" | "))}},c.prototype.withOffsetX=function(e){return this._translateX.push(p(e)),this},c.prototype.withOffsetY=function(e){return this._translateY.push(p(e)),this},c.prototype.getTop=function(){return this._top},c.prototype.getBottom=function(){return this._bottom},c.prototype.getLeft=function(){return this._left},c.prototype.getRight=function(){return this._right},c.prototype.getTransform=function(){var e=this._reduceTranslateValues("translateX",this._translateX),t=this._reduceTranslateValues("translateY",this._translateY);return(e+" "+t).trim()},c.prototype._setTransform=function(e){return e.css(this._$mdConstant.CSS.TRANSFORM,this.getTransform())},c.prototype._isOnscreen=function(e){var t=parseInt(this.getLeft()),n=parseInt(this.getTop());if(this._translateX.length||this._translateY.length){var o=this._$mdConstant.CSS.TRANSFORM,i=u(e,o);t+=i.x,n+=i.y}var r=t+e[0].offsetWidth,a=n+e[0].offsetHeight;return t>=0&&n>=0&&a<=this._$window.innerHeight&&r<=this._$window.innerWidth},c.prototype.getActualPosition=function(){return this._actualPosition},c.prototype._reduceTranslateValues=function(e,n){return n.map(function(n){var o=t.isFunction(n)?p(n(this)):n;return e+"("+o+")"},this).join(" ")},c.prototype._setPanelPosition=function(e){if(e.removeClass("_md-panel-position-adjusted"),this._absolute)return void this._setTransform(e);if(this._actualPosition)return this._calculatePanelPosition(e,this._actualPosition),this._setTransform(e),void this._constrainToViewport(e);for(var t=0;t<this._positions.length;t++)if(this._actualPosition=this._positions[t],this._calculatePanelPosition(e,this._actualPosition),this._setTransform(e),this._isOnscreen(e))return;this._constrainToViewport(e)},c.prototype._constrainToViewport=function(e){var t=c.viewportMargin,n=this._top,o=this._left;if(this.getTop()){var i=parseInt(this.getTop()),r=e[0].offsetHeight+i,a=this._$window.innerHeight;i<t?this._top=t+"px":r>a&&(this._top=i-(r-a+t)+"px")}if(this.getLeft()){var d=parseInt(this.getLeft()),s=e[0].offsetWidth+d,l=this._$window.innerWidth;d<t?this._left=t+"px":s>l&&(this._left=d-(s-l+t)+"px")}e.toggleClass("_md-panel-position-adjusted",this._top!==n||this._left!==o)},c.prototype._reverseXPosition=function(e){if(e===c.xPosition.CENTER)return e;var t="start",n="end";return e.indexOf(t)>-1?e.replace(t,n):e.replace(n,t)},c.prototype._bidi=function(e){return this._isRTL?this._reverseXPosition(e):e},c.prototype._calculatePanelPosition=function(e,t){var n=e[0].getBoundingClientRect(),o=Math.max(n.width,e[0].clientWidth),i=Math.max(n.height,e[0].clientHeight),r=this._relativeToEl[0].getBoundingClientRect(),a=r.left,d=r.right,s=r.width;switch(this._bidi(t.x)){case c.xPosition.OFFSET_START:this._left=a-o+"px";break;case c.xPosition.ALIGN_END:this._left=d-o+"px";break;case c.xPosition.CENTER:var l=a+.5*s-.5*o;this._left=l+"px";break;case c.xPosition.ALIGN_START:this._left=a+"px";break;case c.xPosition.OFFSET_END:this._left=d+"px"}var m=r.top,u=r.bottom,p=r.height;switch(t.y){case c.yPosition.ABOVE:this._top=m-i+"px";break;case c.yPosition.ALIGN_BOTTOMS:this._top=u-i+"px";break;case c.yPosition.CENTER:var h=m+.5*p-.5*i;this._top=h+"px";break;case c.yPosition.ALIGN_TOPS:this._top=m+"px";break;case c.yPosition.BELOW:this._top=u+"px"}},l.animation={SLIDE:"md-panel-animate-slide",SCALE:"md-panel-animate-scale",FADE:"md-panel-animate-fade"},l.prototype.openFrom=function(e){return e=e.target?e.target:e,this._openFrom=this._getPanelAnimationTarget(e),this._closeTo||(this._closeTo=this._openFrom),this},l.prototype.closeTo=function(e){return this._closeTo=this._getPanelAnimationTarget(e),this},l.prototype.duration=function(e){function n(e){if(t.isNumber(e))return e/1e3}return e&&(t.isNumber(e)?this._openDuration=this._closeDuration=n(e):t.isObject(e)&&(this._openDuration=n(e.open),this._closeDuration=n(e.close))),this._rawDuration=e,this},l.prototype._getPanelAnimationTarget=function(e){return t.isDefined(e.top)||t.isDefined(e.left)?{element:n,bounds:{top:e.top||0,left:e.left||0}}:this._getBoundingClientRect(m(e))},l.prototype.withAnimation=function(e){return this._animationClass=e,this},l.prototype.animateOpen=function(e){var n=this._$mdUtil.dom.animator;this._fixBounds(e);var o={},i=e[0].style.transform||"",r=n.toTransformCss(i),a=n.toTransformCss(i);switch(this._animationClass){case l.animation.SLIDE:e.css("opacity","1"),o={transitionInClass:"_md-panel-animate-enter"};var d=n.calculateSlideToOrigin(e,this._openFrom)||"";r=n.toTransformCss(d+" "+i);break;case l.animation.SCALE:o={transitionInClass:"_md-panel-animate-enter"};var s=n.calculateZoomToOrigin(e,this._openFrom)||"";r=n.toTransformCss(s+" "+i);break;case l.animation.FADE:o={transitionInClass:"_md-panel-animate-enter"};break;default:o=t.isString(this._animationClass)?{transitionInClass:this._animationClass}:{transitionInClass:this._animationClass.open,transitionOutClass:this._animationClass.close}}return o.duration=this._openDuration,n.translate3d(e,r,a,o)},l.prototype.animateClose=function(e){var n=this._$mdUtil.dom.animator,o={},i=e[0].style.transform||"",r=n.toTransformCss(i),a=n.toTransformCss(i);switch(this._animationClass){case l.animation.SLIDE:e.css("opacity","1"),o={transitionInClass:"_md-panel-animate-leave"};var d=n.calculateSlideToOrigin(e,this._closeTo)||"";a=n.toTransformCss(d+" "+i);break;case l.animation.SCALE:o={transitionInClass:"_md-panel-animate-scale-out _md-panel-animate-leave"};var s=n.calculateZoomToOrigin(e,this._closeTo)||"";a=n.toTransformCss(s+" "+i);break;case l.animation.FADE:o={transitionInClass:"_md-panel-animate-fade-out _md-panel-animate-leave"};break;default:o=t.isString(this._animationClass)?{transitionOutClass:this._animationClass}:{transitionInClass:this._animationClass.close,transitionOutClass:this._animationClass.open}}return o.duration=this._closeDuration,n.translate3d(e,r,a,o)},l.prototype._fixBounds=function(e){var t=e[0].offsetWidth,n=e[0].offsetHeight;this._openFrom&&null==this._openFrom.bounds.height&&(this._openFrom.bounds.height=n),this._openFrom&&null==this._openFrom.bounds.width&&(this._openFrom.bounds.width=t),this._closeTo&&null==this._closeTo.bounds.height&&(this._closeTo.bounds.height=n),this._closeTo&&null==this._closeTo.bounds.width&&(this._closeTo.bounds.width=t)},l.prototype._getBoundingClientRect=function(e){if(e instanceof t.element)return{element:e,bounds:e[0].getBoundingClientRect()}}}(),function(){t.module("material.components.progressCircular",["material.core"])}(),function(){function e(e,n,o){function i(e,t,n){return e.attr("aria-valuemin",0),e.attr("aria-valuemax",100),e.attr("role","progressbar"),r}function r(o,i,r){function u(){r.$observe("value",function(e){var t=a(e);i.attr("aria-valuenow",t),h()!=l&&f($,t)}),r.$observe("mdBufferValue",function(e){f(E,a(e))}),r.$observe("disabled",function(e){b=e===!0||e===!1?!!e:t.isDefined(e),i.toggleClass(m,b),y.toggleClass(g,!b)}),r.$observe("mdMode",function(e){switch(g&&y.removeClass(g),e){case l:case c:case d:case s:y.addClass(g="md-mode-"+e);break;default:y.addClass(g="md-mode-"+s)}})}function p(){if(t.isUndefined(r.mdMode)){var e=t.isDefined(r.value),n=e?d:s;i.attr("md-mode",n),r.mdMode=n}}function h(){var e=(r.mdMode||"").trim();if(e)switch(e){case d:case s:case c:case l:break;default:e=s}return e}function f(e,o){if(!b&&h()){var i=n.supplant("translateX({0}%) scale({1},1)",[(o-100)/2,o/100]),r=v({transform:i});t.element(e).css(r)}}e(i);var g,b=r.hasOwnProperty("disabled"),v=n.dom.animator.toCss,E=t.element(i[0].querySelector(".md-bar1")),$=t.element(i[0].querySelector(".md-bar2")),y=t.element(i[0].querySelector(".md-container"));i.attr("md-mode",h()).toggleClass(m,b),p(),u()}function a(e){return Math.max(0,Math.min(e||0,100))}var d="determinate",s="indeterminate",c="buffer",l="query",m="_md-progress-linear-disabled";return{restrict:"E",template:'<div class="md-container"><div class="md-dashed"></div><div class="md-bar md-bar1"></div><div class="md-bar md-bar2"></div></div>',compile:i}}e.$inject=["$mdTheming","$mdUtil","$log"],t.module("material.components.progressLinear",["material.core"]).directive("mdProgressLinear",e)}(),function(){function e(e,n,o,i){function r(r,a,d,s){function c(){a.hasClass("md-focused")||a.addClass("md-focused")}function l(o){var i=o.which||o.keyCode;if(i==n.KEY_CODE.ENTER||o.currentTarget==o.target)switch(i){case n.KEY_CODE.LEFT_ARROW:case n.KEY_CODE.UP_ARROW:o.preventDefault(),m.selectPrevious(),c();break;case n.KEY_CODE.RIGHT_ARROW:case n.KEY_CODE.DOWN_ARROW:o.preventDefault(),m.selectNext(),c();break;case n.KEY_CODE.ENTER:var r=t.element(e.getClosest(a[0],"form"));r.length>0&&r.triggerHandler("submit")}}a.addClass("_md"),o(a);var m=s[0],u=s[1]||e.fakeNgModel();m.init(u),r.mouseActive=!1,a.attr({role:"radiogroup",tabIndex:a.attr("tabindex")||"0"}).on("keydown",l).on("mousedown",function(e){r.mouseActive=!0,i(function(){r.mouseActive=!1},100)}).on("focus",function(){r.mouseActive===!1&&m.$element.addClass("md-focused")}).on("blur",function(){m.$element.removeClass("md-focused")})}function a(e){this._radioButtonRenderFns=[],this.$element=e}function d(){return{init:function(e){this._ngModelCtrl=e,this._ngModelCtrl.$render=t.bind(this,this.render)},add:function(e){this._radioButtonRenderFns.push(e)},remove:function(e){var t=this._radioButtonRenderFns.indexOf(e);t!==-1&&this._radioButtonRenderFns.splice(t,1)},render:function(){this._radioButtonRenderFns.forEach(function(e){e()})},setViewValue:function(e,t){this._ngModelCtrl.$setViewValue(e,t),this.render()},getViewValue:function(){return this._ngModelCtrl.$viewValue},selectNext:function(){return s(this.$element,1)},selectPrevious:function(){return s(this.$element,-1)},setActiveDescendant:function(e){this.$element.attr("aria-activedescendant",e)},isDisabled:function(){return this.$element[0].hasAttribute("disabled")}}}function s(n,o){var i=e.iterator(n[0].querySelectorAll("md-radio-button"),!0);if(i.count()){var r=function(e){return!t.element(e).attr("disabled")},a=n[0].querySelector("md-radio-button.md-checked"),d=i[o<0?"previous":"next"](a,r)||i.first();t.element(d).triggerHandler("click")}}return a.prototype=d(),{restrict:"E",controller:["$element",a],require:["mdRadioGroup","?ngModel"],link:{pre:r}}}function n(e,t,n){function o(o,r,a,d){function s(){if(!d)throw"RadioButton: No RadioGroupController could be found.";d.add(l),a.$observe("value",l),r.on("click",c).on("$destroy",function(){d.remove(l)})}function c(e){r[0].hasAttribute("disabled")||d.isDisabled()||o.$apply(function(){d.setViewValue(a.value,e&&e.type)})}function l(){var e=d.getViewValue()==a.value;e!==u&&("md-radio-group"!==r[0].parentNode.nodeName.toLowerCase()&&r.parent().toggleClass(i,e),e&&d.setActiveDescendant(r.attr("id")),u=e,r.attr("aria-checked",e).toggleClass(i,e))}function m(n,o){n.attr({id:a.id||"radio_"+t.nextUid(),role:"radio","aria-checked":"false"}),e.expectWithText(n,"aria-label")}var u;n(r),m(r,o),a.ngValue?t.nextTick(s,!1):s()}var i="md-checked";return{restrict:"E",require:"^mdRadioGroup",transclude:!0,template:'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox><div class="md-off"></div><div class="md-on"></div></div><div ng-transclude class="md-label"></div>',link:o}}e.$inject=["$mdUtil","$mdConstant","$mdTheming","$timeout"],n.$inject=["$mdAria","$mdUtil","$mdTheming"],t.module("material.components.radioButton",["material.core"]).directive("mdRadioGroup",e).directive("mdRadioButton",n)}(),function(){function e(e,t){return["$mdUtil","$window",function(n,o){return{restrict:"A",multiElement:!0,link:function(i,r,a){var d=i.$on("$md-resize-enable",function(){d();var s=r[0],c=s.nodeType===o.Node.ELEMENT_NODE?o.getComputedStyle(s):{};i.$watch(a[e],function(e){if(!!e===t){n.nextTick(function(){i.$broadcast("$md-resize")});var o={cachedTransitionStyles:c};n.dom.animator.waitTransitionEnd(r,o).then(function(){
i.$broadcast("$md-resize")})}})})}}}]}t.module("material.components.showHide",["material.core"]).directive("ngShow",e("ngShow",!0)).directive("ngHide",e("ngHide",!1))}(),function(){function o(e,o,i,r,a,d,s,l){function m(l,m){var u=t.element("<md-select-value><span></span></md-select-value>");u.append('<span class="md-select-icon" aria-hidden="true"></span>'),u.addClass("md-select-value"),u[0].hasAttribute("id")||u.attr("id","select_value_label_"+o.nextUid());var p=l.find("md-content");if(p.length||l.append(t.element("<md-content>").append(l.contents())),p.attr("role","presentation"),m.mdOnOpen&&(l.find("md-content").prepend(t.element('<div> <md-progress-circular md-mode="indeterminate" ng-if="$$loadingAsyncDone === false" md-diameter="25px"></md-progress-circular></div>')),l.find("md-option").attr("ng-show","$$loadingAsyncDone")),m.name){var h=t.element('<select class="md-visually-hidden"></select>');h.attr({name:m.name,"aria-hidden":"true",tabindex:"-1"});var f=l.find("md-option");t.forEach(f,function(e){var n=t.element("<option>"+e.innerHTML+"</option>");e.hasAttribute("ng-value")?n.attr("ng-value",e.getAttribute("ng-value")):e.hasAttribute("value")&&n.attr("value",e.getAttribute("value")),h.append(n)}),h.append('<option ng-value="'+m.ngModel+'" selected></option>'),l.parent().append(h)}var g=o.parseAttributeBoolean(m.multiple),b=g?"multiple":"",v='<div class="md-select-menu-container" aria-hidden="true" role="presentation"><md-select-menu role="presentation" {0}>{1}</md-select-menu></div>';return v=o.supplant(v,[b,l.html()]),l.empty().append(u),l.append(v),m.tabindex||m.$set("tabindex",0),function(l,m,u,p){function h(){var e=m.attr("aria-label")||m.attr("placeholder");!e&&A&&A.label&&(e=A.label.text()),M=e,a.expect(m,"aria-label",e)}function f(){I&&(O=O||I.find("md-select-menu").controller("mdSelectMenu"),w.setLabelText(O.selectedLabels()))}function b(){if(M){var e=O.selectedLabels({mode:"aria"});m.attr("aria-label",e.length?M+": "+e:M)}}function v(){A&&A.setHasValue(O.selectedLabels().length>0||(m[0].validity||{}).badInput)}function E(){if(I=t.element(m[0].querySelector(".md-select-menu-container")),H=l,u.mdContainerClass){var e=I[0].getAttribute("class")+" "+u.mdContainerClass;I[0].setAttribute("class",e)}O=I.find("md-select-menu").controller("mdSelectMenu"),O.init(k,u.ngModel),m.on("$destroy",function(){I.remove()})}function $(e){if(i.isNavigationKey(e))e.preventDefault(),y(e);else if(c(e,i)){e.preventDefault();var n=O.optNodeForKeyboardSearch(e);if(!n||n.hasAttribute("disabled"))return;var o=t.element(n).controller("mdOption");O.isMultiple||O.deselect(Object.keys(O.selected)[0]),O.select(o.hashKey,o.value),O.refreshViewValue()}}function y(){H._mdSelectIsOpen=!0,m.attr("aria-expanded","true"),e.show({scope:H,preserveScope:!0,skipCompile:!0,element:I,target:m[0],selectCtrl:w,preserveElement:!0,hasBackdrop:!0,loadingAsync:!!u.mdOnOpen&&(l.$eval(u.mdOnOpen)||!0)})["finally"](function(){H._mdSelectIsOpen=!1,m.focus(),m.attr("aria-expanded","false"),k.$setTouched()})}var C,M,T=!0,A=p[0],w=p[1],k=p[2],_=p[3],x=m.find("md-select-value"),N=t.isDefined(u.readonly),S=o.parseAttributeBoolean(u.mdNoAsterisk);if(S&&m.addClass("md-no-asterisk"),A){var D=A.isErrorGetter||function(){return k.$invalid&&(k.$touched||_&&_.$submitted)};if(A.input&&m.find("md-select-header").find("input")[0]!==A.input[0])throw new Error("<md-input-container> can only have *one* child <input>, <textarea> or <select> element!");A.input=m,A.label||a.expect(m,"aria-label",m.attr("placeholder")),l.$watch(D,A.setInvalid)}var I,H,O;E(),r(m),_&&t.isDefined(u.multiple)&&o.nextTick(function(){var e=k.$modelValue||k.$viewValue;e&&_.$setPristine()});var P=k.$render;k.$render=function(){P(),f(),b(),v()},u.$observe("placeholder",k.$render),A&&A.label&&u.$observe("required",function(e){A.label.toggleClass("md-required",e&&!S)}),w.setLabelText=function(e){w.setIsPlaceholder(!e);var t=!1;if(u.mdSelectedText&&u.mdSelectedHtml)throw Error("md-select cannot have both `md-selected-text` and `md-selected-html`");if(u.mdSelectedText||u.mdSelectedHtml)e=d(u.mdSelectedText||u.mdSelectedHtml)(l),t=!0;else if(!e){var n=u.placeholder||(A&&A.label?A.label.text():"");e=n||"",t=!0}var o=x.children().eq(0);u.mdSelectedHtml?o.html(s.getTrustedHtml(e)):t?o.text(e):o.html(e)},w.setIsPlaceholder=function(e){e?(x.addClass("md-select-placeholder"),A&&A.label&&A.label.addClass("md-placeholder")):(x.removeClass("md-select-placeholder"),A&&A.label&&A.label.removeClass("md-placeholder"))},N||(m.on("focus",function(e){A&&A.setFocused(!0)}),m.on("blur",function(e){T&&(T=!1,H._mdSelectIsOpen&&e.stopImmediatePropagation()),H._mdSelectIsOpen||(A&&A.setFocused(!1),v())})),w.triggerClose=function(){d(u.mdOnClose)(l)},l.$$postDigest(function(){h(),f(),b()}),l.$watch(function(){return O.selectedLabels()},f);var R;u.$observe("ngMultiple",function(e){R&&R();var t=d(e);R=l.$watch(function(){return t(l)},function(e,t){e===n&&t===n||(e?m.attr("multiple","multiple"):m.removeAttr("multiple"),m.attr("aria-multiselectable",e?"true":"false"),I&&(O.setMultiple(e),P=k.$render,k.$render=function(){P(),f(),b(),v()},k.$render()))})}),u.$observe("disabled",function(e){t.isString(e)&&(e=!0),C!==n&&C===e||(C=e,e?m.attr({"aria-disabled":"true"}).removeAttr("tabindex").off("click",y).off("keydown",$):m.attr({tabindex:u.tabindex,"aria-disabled":"false"}).on("click",y).on("keydown",$))}),u.hasOwnProperty("disabled")||u.hasOwnProperty("ngDisabled")||(m.attr({"aria-disabled":"false"}),m.on("click",y),m.on("keydown",$));var L={role:"listbox","aria-expanded":"false","aria-multiselectable":g&&!u.ngMultiple?"true":"false"};m[0].hasAttribute("id")||(L.id="select_"+o.nextUid());var F="select_container_"+o.nextUid();I.attr("id",F),m.find("md-select-menu").length||(L["aria-owns"]=F),m.attr(L),l.$on("$destroy",function(){e.destroy()["finally"](function(){A&&(A.setFocused(!1),A.setHasValue(!1),A.input=null),k.$setTouched()})})}}var u=i.KEY_CODE;[u.SPACE,u.ENTER,u.UP_ARROW,u.DOWN_ARROW];return{restrict:"E",require:["^?mdInputContainer","mdSelect","ngModel","?^form"],compile:m,controller:function(){}}}function i(e,o,i,r){function a(e,n,i,a){function d(e){13!=e.keyCode&&32!=e.keyCode||s(e)}function s(n){var i=o.getClosest(n.target,"md-option"),r=i&&t.element(i).data("$mdOptionController");if(i&&r){if(i.hasAttribute("disabled"))return n.stopImmediatePropagation(),!1;var a=c.hashGetter(r.value),d=t.isDefined(c.selected[a]);e.$apply(function(){c.isMultiple?d?c.deselect(a):c.select(a,r.value):d||(c.deselect(Object.keys(c.selected)[0]),c.select(a,r.value)),c.refreshViewValue()})}}var c=a[0];n.addClass("_md"),r(n),n.on("click",s),n.on("keypress",d)}function d(r,a,d){function s(){var e=l.ngModel.$modelValue||l.ngModel.$viewValue||[];if(t.isArray(e)){var n=Object.keys(l.selected),o=e.map(l.hashGetter),i=n.filter(function(e){return o.indexOf(e)===-1});i.forEach(l.deselect),o.forEach(function(t,n){l.select(t,e[n])})}}function c(){var e=l.ngModel.$viewValue||l.ngModel.$modelValue;Object.keys(l.selected).forEach(l.deselect),l.select(l.hashGetter(e),e)}var l=this;l.isMultiple=t.isDefined(a.multiple),l.selected={},l.options={},r.$watchCollection(function(){return l.options},function(){l.ngModel.$render()});var u,p;l.setMultiple=function(e){function n(e,n){return t.isArray(e||n||[])}var o=l.ngModel;p=p||o.$isEmpty,l.isMultiple=e,u&&u(),l.isMultiple?(o.$validators["md-multiple"]=n,o.$render=s,r.$watchCollection(l.modelBinding,function(e){n(e)&&s(e)}),o.$isEmpty=function(e){return!e||0===e.length}):(delete o.$validators["md-multiple"],o.$render=c)};var h,f,g,b="",v=300;l.optNodeForKeyboardSearch=function(e){h&&clearTimeout(h),h=setTimeout(function(){h=n,b="",g=n,f=n},v);var o=e.keyCode-(i.isNumPadKey(e)?48:0);b+=String.fromCharCode(o);var r=new RegExp("^"+b,"i");f||(f=d.find("md-option"),g=new Array(f.length),t.forEach(f,function(e,t){g[t]=e.textContent.trim()}));for(var a=0;a<g.length;++a)if(r.test(g[a]))return f[a]},l.init=function(n,i){l.ngModel=n,l.modelBinding=i,l.ngModel.$isEmpty=function(e){return!l.options[l.hashGetter(e)]};var a=o.getModelOption(n,"trackBy");if(a){var d={},s=e(a);l.hashGetter=function(e,t){return d.$value=e,s(t||r,d)}}else l.hashGetter=function(e){return t.isObject(e)?"object_"+(e.$$mdSelectId||(e.$$mdSelectId=++m)):e};l.setMultiple(l.isMultiple)},l.selectedLabels=function(e){e=e||{};var t=e.mode||"html",n=o.nodesToArray(d[0].querySelectorAll("md-option[selected]"));if(n.length){var i;return"html"==t?i=function(e){if(e.hasAttribute("md-option-empty"))return"";var t=e.innerHTML,n=e.querySelector(".md-ripple-container");n&&(t=t.replace(n.outerHTML,""));var o=e.querySelector(".md-container");return o&&(t=t.replace(o.outerHTML,"")),t}:"aria"==t&&(i=function(e){return e.hasAttribute("aria-label")?e.getAttribute("aria-label"):e.textContent}),o.uniq(n.map(i)).join(", ")}return""},l.select=function(e,t){var n=l.options[e];n&&n.setSelected(!0),l.selected[e]=t},l.deselect=function(e){var t=l.options[e];t&&t.setSelected(!1),delete l.selected[e]},l.addOption=function(e,n){if(t.isDefined(l.options[e]))throw new Error('Duplicate md-option values are not allowed in a select. Duplicate value "'+n.value+'" found.');l.options[e]=n,t.isDefined(l.selected[e])&&(l.select(e,n.value),t.isDefined(l.ngModel.$modelValue)&&l.hashGetter(l.ngModel.$modelValue)===e&&l.ngModel.$validate(),l.refreshViewValue())},l.removeOption=function(e){delete l.options[e]},l.refreshViewValue=function(){var e,n=[];for(var i in l.selected)(e=l.options[i])?n.push(e.value):n.push(l.selected[i]);var r=o.getModelOption(l.ngModel,"trackBy"),a=l.isMultiple?n:n[0],d=l.ngModel.$modelValue;(r?t.equals(d,a):d+""===a)||(l.ngModel.$setViewValue(a),l.ngModel.$render())}}return d.$inject=["$scope","$attrs","$element"],{restrict:"E",require:["mdSelectMenu"],scope:!1,controller:d,link:{pre:a}}}function r(e,n,o){function i(e,n){return e.append(t.element('<div class="md-text">').append(e.contents())),e.attr("tabindex",n.tabindex||"0"),r(n)||e.attr("md-option-empty",""),a}function r(e){var t=e.value,n=e.ngValue;return t||n}function a(i,r,a,d){function s(e,t,n){if(!m.hashGetter)return void(n||i.$$postDigest(function(){s(e,t,!0)}));var o=m.hashGetter(t,i),r=m.hashGetter(e,i);l.hashKey=r,l.value=e,m.removeOption(o,l),m.addOption(r,l)}function c(){var e={role:"option","aria-selected":"false"};r[0].hasAttribute("id")||(e.id="select_option_"+n.nextUid()),r.attr(e)}var l=d[0],m=d[1];o(r),m.isMultiple&&(r.addClass("md-checkbox-enabled"),r.prepend(u.clone())),t.isDefined(a.ngValue)?i.$watch(a.ngValue,s):t.isDefined(a.value)?s(a.value):i.$watch(function(){return r.text().trim()},s),a.$observe("disabled",function(e){e?r.attr("tabindex","-1"):r.attr("tabindex","0")}),i.$$postDigest(function(){a.$observe("selected",function(e){t.isDefined(e)&&("string"==typeof e&&(e=!0),e?(m.isMultiple||m.deselect(Object.keys(m.selected)[0]),m.select(l.hashKey,l.value)):m.deselect(l.hashKey),m.refreshViewValue())})}),e.attach(i,r),c(),i.$on("$destroy",function(){m.removeOption(l.hashKey,l)})}function d(e){this.selected=!1,this.setSelected=function(t){t&&!this.selected?e.attr({selected:"selected","aria-selected":"true"}):!t&&this.selected&&(e.removeAttr("selected"),e.attr("aria-selected","false")),this.selected=t}}return d.$inject=["$element"],{restrict:"E",require:["mdOption","^^mdSelectMenu"],controller:d,compile:i}}function a(){function e(e,n){function o(){return e.parent().find("md-select-header").length}function i(){var o=e.find("label");o.length||(o=t.element("<label>"),e.prepend(o)),o.addClass("md-container-ignore"),o.attr("aria-hidden","true"),n.label&&o.text(n.label)}o()||i()}return{restrict:"E",compile:e}}function d(){return{restrict:"E"}}function s(o){function i(o,i,m,u,p,h,f,g,b){function v(e,t,n){function o(){return r=f(t,{addClass:"md-leave"}),r.start()}function i(){a(),t.removeClass("md-active").attr("aria-hidden","true").css("display","none"),t.parent().find("md-select-value").removeAttr("aria-hidden"),$(n),!n.$destroy&&n.restoreFocus&&n.target.focus()}var r=null,a=e.$on("$destroy",function(){r.end()});return n=n||{},n.cleanupInteraction(),n.cleanupResizing(),n.hideBackdrop(),n.$destroy===!0?i():o().then(i)}function E(e,r,a){function d(e,t,n){return n.parent!==t.parent()&&t.parent().attr("aria-owns",t.attr("id")),t.parent().find("md-select-value").attr("aria-hidden","true"),n.parent.append(t),p(function(e,n){try{f(t,{removeClass:"md-leave",duration:0}).start().then(s).then(e)}catch(o){n(o)}})}function s(){return p(function(t){if(a.isRemoved)return p.reject(!1);var n=y(e,r,a);n.container.element.css(M.toCss(n.container.styles)),n.dropDown.element.css(M.toCss(n.dropDown.styles)),h(function(){r.addClass("md-active"),n.dropDown.element.css(M.toCss({transform:""})),t()})})}function l(e,t,n){return n.disableParentScroll&&!m.getClosest(n.target,"MD-DIALOG")?n.restoreScroll=m.disableScrollAround(n.element,n.parent):n.disableParentScroll=!1,n.hasBackdrop&&(n.backdrop=m.createBackdrop(e,"md-select-backdrop md-click-catcher"),g.enter(n.backdrop,b[0].body,null,{duration:0})),function(){n.backdrop&&n.backdrop.remove(),n.disableParentScroll&&n.restoreScroll(),delete n.restoreScroll}}function v(e){e&&!e.hasAttribute("disabled")&&e.focus()}function E(e,n){var o=r.find("md-select-menu");if(!n.target)throw new Error(m.supplant(C,[n.target]));t.extend(n,{isRemoved:!1,target:t.element(n.target),parent:t.element(n.parent),selectEl:o,contentEl:r.find("md-content"),optionNodes:o[0].getElementsByTagName("md-option")})}function $(){var n=function(e,t,n){return function(){if(!n.isRemoved){var o=y(e,t,n),i=o.container,r=o.dropDown;i.element.css(M.toCss(i.styles)),r.element.css(M.toCss(r.styles))}}}(e,r,a),o=t.element(u);return o.on("resize",n),o.on("orientationchange",n),function(){o.off("resize",n),o.off("orientationchange",n)}}function A(){a.loadingAsync&&!a.isRemoved&&(e.$$loadingAsyncDone=!1,p.when(a.loadingAsync).then(function(){e.$$loadingAsyncDone=!0,delete a.loadingAsync}).then(function(){h(s)}))}function w(){function e(e){e.preventDefault(),e.stopPropagation(),a.restoreFocus=!1,m.nextTick(o.hide,!0)}function t(e){switch(e.preventDefault(),e.stopPropagation(),e.keyCode){case T.UP_ARROW:return l();case T.DOWN_ARROW:return s();case T.SPACE:case T.ENTER:var t=m.getClosest(e.target,"md-option");t&&(p.triggerHandler({type:"click",target:t}),e.preventDefault()),u(e);break;case T.TAB:case T.ESCAPE:e.stopPropagation(),e.preventDefault(),a.restoreFocus=!0,m.nextTick(o.hide,!0);break;default:if(c(e,i)){var n=p.controller("mdSelectMenu").optNodeForKeyboardSearch(e);a.focusedNode=n||a.focusedNode,n&&n.focus()}}}function d(e){var t,o=m.nodesToArray(a.optionNodes),i=o.indexOf(a.focusedNode);do i===-1?i=0:"next"===e&&i<o.length-1?i++:"prev"===e&&i>0&&i--,t=o[i],t.hasAttribute("disabled")&&(t=n);while(!t&&i<o.length-1&&i>0);t&&t.focus(),a.focusedNode=t}function s(){d("next")}function l(){d("prev")}function u(e){function t(){var t=!1;if(e&&e.currentTarget.children.length>0){var n=e.currentTarget.children[0],o=n.scrollHeight>n.clientHeight;if(o&&n.children.length>0){var i=e.pageX-e.currentTarget.getBoundingClientRect().left;i>n.querySelector("md-option").offsetWidth&&(t=!0)}}return t}if(!(e&&"click"==e.type&&e.currentTarget!=p[0]||t())){var n=m.getClosest(e.target,"md-option");n&&n.hasAttribute&&!n.hasAttribute("disabled")&&(e.preventDefault(),e.stopPropagation(),h.isMultiple||(a.restoreFocus=!0,m.nextTick(function(){o.hide(h.ngModel.$viewValue)},!0)))}}if(!a.isRemoved){var p=a.selectEl,h=p.controller("mdSelectMenu")||{};return r.addClass("md-clickable"),a.backdrop&&a.backdrop.on("click",e),p.on("keydown",t),p.on("click",u),function(){a.backdrop&&a.backdrop.off("click",e),p.off("keydown",t),p.off("click",u),r.removeClass("md-clickable"),a.isRemoved=!0}}}return A(),E(e,a),a.hideBackdrop=l(e,r,a),d(e,r,a).then(function(e){return r.attr("aria-hidden","false"),a.alreadyOpen=!0,a.cleanupInteraction=w(),a.cleanupResizing=$(),v(a.focusedNode),e},a.hideBackdrop)}function $(e){var t=e.selectCtrl;if(t){var n=e.selectEl.controller("mdSelectMenu");t.setLabelText(n?n.selectedLabels():""),t.triggerClose()}}function y(n,o,i){var c,p=o[0],h=i.target[0].children[0],f=b[0].body,g=i.selectEl[0],v=i.contentEl[0],E=f.getBoundingClientRect(),$=h.getBoundingClientRect(),y=!1,C={left:E.left+l,top:l,bottom:E.height-l,right:E.width-l-(m.floatingScrollbars()?16:0)},M={top:$.top-C.top,left:$.left-C.left,right:C.right-($.left+$.width),bottom:C.bottom-($.top+$.height)},T=E.width-2*l,A=g.querySelector("md-option[selected]"),w=g.getElementsByTagName("md-option"),k=g.getElementsByTagName("md-optgroup"),_=s(o,v),x=r(i.loadingAsync);c=x?v.firstElementChild||v:A?A:k.length?k[0]:w.length?w[0]:v.firstElementChild||v,v.offsetWidth>T?v.style["max-width"]=T+"px":v.style.maxWidth=null,y&&(v.style["min-width"]=$.width+"px"),_&&g.classList.add("md-overflow");var N=c;"MD-OPTGROUP"===(N.tagName||"").toUpperCase()&&(N=w[0]||v.firstElementChild||v,c=N),i.focusedNode=N,p.style.display="block";var S=g.getBoundingClientRect(),D=d(c);if(c){var I=u.getComputedStyle(c);D.paddingLeft=parseInt(I.paddingLeft,10)||0,D.paddingRight=parseInt(I.paddingRight,10)||0}if(_){var H=v.offsetHeight/2;v.scrollTop=D.top+D.height/2-H,M.top<H?v.scrollTop=Math.min(D.top,v.scrollTop+H-M.top):M.bottom<H&&(v.scrollTop=Math.max(D.top+D.height-S.height,v.scrollTop-H+M.bottom))}var O,P,R,L,F;y?(O=$.left,P=$.top+$.height,R="50% 0",P+S.height>C.bottom&&(P=$.top-S.height,R="50% 100%")):(O=$.left+D.left-D.paddingLeft+2,P=Math.floor($.top+$.height/2-D.height/2-D.top+v.scrollTop)+2,R=D.left+$.width/2+"px "+(D.top+D.height/2-v.scrollTop)+"px 0px",L=Math.min($.width+D.paddingLeft+D.paddingRight,T),F=e.getComputedStyle(h)["font-size"]);var B=p.getBoundingClientRect(),U=Math.round(100*Math.min($.width/S.width,1))/100,j=Math.round(100*Math.min($.height/S.height,1))/100;return{container:{element:t.element(p),styles:{left:Math.floor(a(C.left,O,C.right-B.width)),top:Math.floor(a(C.top,P,C.bottom-B.height)),"min-width":L,"font-size":F}},dropDown:{element:t.element(g),styles:{transformOrigin:R,transform:i.alreadyOpen?"":m.supplant("scale({0},{1})",[U,j])}}}}var C="$mdSelect.show() expected a target element in options.target but got '{0}'!",M=m.dom.animator,T=i.KEY_CODE;return{parent:"body",themable:!0,onShow:E,onRemove:v,hasBackdrop:!0,disableParentScroll:!0}}function r(e){return e&&t.isFunction(e.then)}function a(e,t,n){return Math.max(e,Math.min(t,n))}function d(e){return e?{left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}:{left:0,top:0,width:0,height:0}}function s(e,t){var n=!1;try{var o=e[0].style.display;e[0].style.display="block",n=t.scrollHeight>t.offsetHeight,e[0].style.display=o}finally{}return n}return i.$inject=["$mdSelect","$mdConstant","$mdUtil","$window","$q","$$rAF","$animateCss","$animate","$document"],o("$mdSelect").setDefaults({methods:["target"],options:i})}function c(e,t){var n=String.fromCharCode(e.keyCode),o=e.keyCode<=31;return n&&n.length&&!o&&!t.isMetaKey(e)&&!t.isFnLockKey(e)&&!t.hasModifierKey(e)}o.$inject=["$mdSelect","$mdUtil","$mdConstant","$mdTheming","$mdAria","$parse","$sce","$injector"],i.$inject=["$parse","$mdUtil","$mdConstant","$mdTheming"],r.$inject=["$mdButtonInkRipple","$mdUtil","$mdTheming"],s.$inject=["$$interimElementProvider"];var l=8,m=0,u=t.element('<div class="md-container"><div class="md-icon"></div></div>');t.module("material.components.select",["material.core","material.components.backdrop"]).directive("mdSelect",o).directive("mdSelectMenu",i).directive("mdOption",r).directive("mdOptgroup",a).directive("mdSelectHeader",d).provider("$mdSelect",s)}(),function(){function e(e,o,i,r){function a(e,n){var r=function(){return!1},a=function(){return i.when(o.supplant(c,[n||""]))};return t.extend({isLockedOpen:r,isOpen:r,toggle:a,open:a,close:a,onClose:t.noop,then:function(e){return s(n).then(e||t.noop)}},e)}function d(t,i){var a=e.get(t);return a||i?a:(r.error(o.supplant(c,[t||""])),n)}function s(t){return e.when(t)["catch"](r.error)}var c="SideNav '{0}' is not available! Did you use md-component-id='{0}'?",l={find:d,waitFor:s};return function(e,n){if(t.isUndefined(e))return l;var o=n===!0,i=l.find(e,o);return!i&&o?l.waitFor(e):!i&&t.isUndefined(n)?a(l,e):i}}function o(){return{restrict:"A",require:"^mdSidenav",link:function(e,t,n,o){}}}function i(e,o,i,r,a,d,s,c,l,m,u,p,h){function f(s,f,g,b){function v(e,t){s.isLockedOpen=e,e===t?f.toggleClass("md-locked-open",!!e):d[e?"addClass":"removeClass"](f,"md-locked-open"),w&&w.toggleClass("md-locked-open",!!e)}function E(e){var t=o.findFocusTarget(f)||o.findFocusTarget(f,"[md-sidenav-focus]")||f,n=f.parent();n[e?"on":"off"]("keydown",M),w&&w[e?"on":"off"]("click",T);var i=$(n,e);return e&&(N=u[0].activeElement,k=a.getLastInteractionType()),y(e),S=m.all([e&&w?d.enter(w,n):w?d.leave(w):m.when(!0),d[e?"removeClass":"addClass"](f,"md-closed")]).then(function(){s.isOpen&&(h(function(){I.triggerHandler("resize")}),t&&t.focus()),i&&i()})}function $(e,t){var n=f[0],o=e[0].scrollTop;if(t&&o){_={top:n.style.top,bottom:n.style.bottom,height:n.style.height};var i={top:o+"px",bottom:"auto",height:e[0].clientHeight+"px"};f.css(i),w.css(i)}if(!t&&_)return function(){n.style.top=_.top,n.style.bottom=_.bottom,n.style.height=_.height,w[0].style.top=null,w[0].style.bottom=null,w[0].style.height=null,_=null}}function y(e){e&&!A?(A=x.css("overflow"),x.css("overflow","hidden")):t.isDefined(A)&&(x.css("overflow",A),A=n)}function C(e){return s.isOpen==e?m.when(!0):(s.isOpen&&b.onCloseCb&&b.onCloseCb(),m(function(t){s.isOpen=e,o.nextTick(function(){S.then(function(e){!s.isOpen&&N&&"keyboard"===k&&(N.focus(),N=null),t(e)})})}))}function M(e){var t=e.keyCode===i.KEY_CODE.ESCAPE;return t?T(e):m.when(!0)}function T(e){return e.preventDefault(),b.close()}var A,w,k,_,x=null,N=null,S=m.when(!0),D=c(g.mdIsLockedOpen),I=t.element(p),H=function(){return D(s.$parent,{$media:function(t){return l.warn("$media is deprecated for is-locked-open. Use $mdMedia instead."),e(t)},$mdMedia:e})};g.mdDisableScrollTarget&&(x=u[0].querySelector(g.mdDisableScrollTarget),x?x=t.element(x):l.warn(o.supplant('mdSidenav: couldn\'t find element matching selector "{selector}". Falling back to parent.',{selector:g.mdDisableScrollTarget}))),x||(x=f.parent()),g.hasOwnProperty("mdDisableBackdrop")||(w=o.createBackdrop(s,"md-sidenav-backdrop md-opaque ng-enter")),f.addClass("_md"),r(f),w&&r.inherit(w,f),f.on("$destroy",function(){w&&w.remove(),b.destroy()}),s.$on("$destroy",function(){w&&w.remove()}),s.$watch(H,v),s.$watch("isOpen",E),b.$toggleOpen=C}return{restrict:"E",scope:{isOpen:"=?mdIsOpen"},controller:"$mdSidenavController",compile:function(e){return e.addClass("md-closed").attr("tabIndex","-1"),f}}}function r(e,t,n,o,i){var r=this;r.isOpen=function(){return!!e.isOpen},r.isLockedOpen=function(){return!!e.isLockedOpen},r.onClose=function(e){return r.onCloseCb=e,r},r.open=function(){return r.$toggleOpen(!0)},r.close=function(){return r.$toggleOpen(!1)},r.toggle=function(){return r.$toggleOpen(!e.isOpen)},r.$toggleOpen=function(t){return o.when(e.isOpen=t)};var a=t.mdComponentId,d=a&&a.indexOf(i.startSymbol())>-1,s=d?i(a)(e.$parent):a;r.destroy=n.register(r,s),d&&t.$observe("mdComponentId",function(e){e&&e!==r.$$mdHandle&&(r.destroy(),r.destroy=n.register(r,e))})}e.$inject=["$mdComponentRegistry","$mdUtil","$q","$log"],i.$inject=["$mdMedia","$mdUtil","$mdConstant","$mdTheming","$mdInteraction","$animate","$compile","$parse","$log","$q","$document","$window","$$rAF"],r.$inject=["$scope","$attrs","$mdComponentRegistry","$q","$interpolate"],t.module("material.components.sidenav",["material.core","material.components.backdrop"]).factory("$mdSidenav",e).directive("mdSidenav",i).directive("mdSidenavFocus",o).controller("$mdSidenavController",r)}(),function(){function e(){return{controller:function(){},compile:function(e){var o=e.find("md-slider");if(o){var i=o.attr("md-vertical");return i!==n&&e.attr("md-vertical",""),o.attr("flex")||o.attr("flex",""),function(e,n,o,i){function r(e){n.children().attr("disabled",e),n.find("input").attr("disabled",e)}n.addClass("_md");var a=t.noop;o.disabled?r(!0):o.ngDisabled&&(a=e.$watch(o.ngDisabled,function(e){r(e)})),e.$on("$destroy",function(){a()});var d;i.fitInputWidthToTextLength=function(e){var t=n[0].querySelector("md-input-container");if(t){var o=getComputedStyle(t),i=parseInt(o.minWidth),r=2*parseInt(o.padding);d=d||parseInt(o.maxWidth);var a=Math.max(d,i+r+i/2*e);t.style.maxWidth=a+"px"}}}}}}}function o(e,n,o,i,r,a,d,s,c,l){function m(e,n){var i=t.element(e[0].getElementsByClassName("md-slider-wrapper")),r=n.tabindex||0;return i.attr("tabindex",r),(n.disabled||n.ngDisabled)&&i.attr("tabindex",-1),e.attr("role","slider"),o.expect(e,"aria-label"),u}function u(o,m,u,p){function h(){C(),x()}function f(e){se=parseFloat(e),m.attr("aria-valuemin",e),h()}function g(e){ce=parseFloat(e),m.attr("aria-valuemax",e),h()}function b(e){le=parseFloat(e)}function v(e){me=N(parseInt(e),0,6)}function E(){m.attr("aria-disabled",!!Y())}function $(){if(ie&&!Y()&&!t.isUndefined(le)){if(le<=0){var e="Slider step value must be greater than zero when in discrete mode";throw c.error(e),new Error(e)}var o=Math.floor((ce-se)/le);ue||(ue=t.element("<canvas>").css("position","absolute"),J.append(ue),pe=ue[0].getContext("2d"));var i=M();!i||i.height||i.width||(C(),i=he),ue[0].width=i.width,ue[0].height=i.height;for(var r,a=0;a<=o;a++){var d=n.getComputedStyle(J[0]);pe.fillStyle=d.color||"black",r=Math.floor((oe?i.height:i.width)*(a/o)),pe.fillRect(oe?0:r-1,oe?r-1:0,oe?i.width:2,oe?2:i.height)}}}function y(){if(ue&&pe){var e=M();pe.clearRect(0,0,e.width,e.height)}}function C(){he=Q[0].getBoundingClientRect()}function M(){return te(),he}function T(e){if(!Y()){var t;(oe?e.keyCode===r.KEY_CODE.DOWN_ARROW:e.keyCode===r.KEY_CODE.LEFT_ARROW)?t=-le:(oe?e.keyCode===r.KEY_CODE.UP_ARROW:e.keyCode===r.KEY_CODE.RIGHT_ARROW)&&(t=le),t=re?-t:t,t&&((e.metaKey||e.ctrlKey||e.altKey)&&(t*=4),e.preventDefault(),e.stopPropagation(),o.$evalAsync(function(){_(W.$viewValue+t)}))}}function A(){$(),o.mouseActive=!0,ee.removeClass("md-focused"),l(function(){o.mouseActive=!1},100)}function w(){o.mouseActive===!1&&ee.addClass("md-focused")}function k(){ee.removeClass("md-focused"),m.removeClass("md-active"),y()}function _(e){W.$setViewValue(N(S(e)))}function x(){isNaN(W.$viewValue)&&(W.$viewValue=W.$modelValue),W.$viewValue=N(W.$viewValue);var e=z(W.$viewValue);o.modelValue=W.$viewValue,m.attr("aria-valuenow",W.$viewValue),D(e),G.text(W.$viewValue)}function N(e,n,o){if(t.isNumber(e))return n=t.isNumber(n)?n:se,o=t.isNumber(o)?o:ce,Math.max(n,Math.min(o,e))}function S(e){if(t.isNumber(e)){var n=Math.round((e-se)/le)*le+se;return n=Math.round(n*Math.pow(10,me))/Math.pow(10,me),V&&V.fitInputWidthToTextLength&&i.debounce(function(){V.fitInputWidthToTextLength(n.toString().length)},100)(),n}}function D(e){e=U(e);var t=100*e+"%",n=re?100*(1-e)+"%":t;oe?X.css("bottom",t):i.bidiProperty(X,"left","right",t),Z.css(oe?"height":"width",n),m.toggleClass(re?"md-max":"md-min",0===e),m.toggleClass(re?"md-min":"md-max",1===e)}function I(e){if(!Y()){m.addClass("md-active"),m[0].focus(),C();var t=q(j(oe?e.pointer.y:e.pointer.x)),n=N(S(t));o.$apply(function(){_(n),D(z(n))})}}function H(e){if(!Y()){m.removeClass("md-dragging");var t=q(j(oe?e.pointer.y:e.pointer.x)),n=N(S(t));o.$apply(function(){_(n),x()})}}function O(e){Y()||(fe=!0,e.stopPropagation(),m.addClass("md-dragging"),L(e))}function P(e){fe&&(e.stopPropagation(),L(e))}function R(e){fe&&(e.stopPropagation(),fe=!1)}function L(e){ie?B(oe?e.pointer.y:e.pointer.x):F(oe?e.pointer.y:e.pointer.x)}function F(e){o.$evalAsync(function(){_(q(j(e)))})}function B(e){var t=q(j(e)),n=N(S(t));D(j(e)),G.text(n)}function U(e){return Math.max(0,Math.min(e||0,1))}function j(e){var t=oe?he.top:he.left,n=oe?he.height:he.width,o=(e-t)/n;return oe||"rtl"!==i.bidi()||(o=1-o),Math.max(0,Math.min(1,oe?1-o:o))}function q(e){var t=re?1-e:e;return se+t*(ce-se)}function z(e){var t=(e-se)/(ce-se);return re?1-t:t}a(m);var W=p[0]||{$setViewValue:function(e){this.$viewValue=e,this.$viewChangeListeners.forEach(function(e){e()})},$parsers:[],$formatters:[],$viewChangeListeners:[]},V=p[1],Y=(t.element(i.getClosest(m,"_md-slider-container",!0)),u.ngDisabled?t.bind(null,s(u.ngDisabled),o.$parent):function(){return m[0].hasAttribute("disabled")}),K=t.element(m[0].querySelector(".md-thumb")),G=t.element(m[0].querySelector(".md-thumb-text")),X=K.parent(),Q=t.element(m[0].querySelector(".md-track-container")),Z=t.element(m[0].querySelector(".md-track-fill")),J=t.element(m[0].querySelector(".md-track-ticks")),ee=t.element(m[0].getElementsByClassName("md-slider-wrapper")),te=(t.element(m[0].getElementsByClassName("md-slider-content")),i.throttle(C,5e3)),ne=3,oe=t.isDefined(u.mdVertical),ie=t.isDefined(u.mdDiscrete),re=t.isDefined(u.mdInvert);t.isDefined(u.min)?u.$observe("min",f):f(0),t.isDefined(u.max)?u.$observe("max",g):g(100),t.isDefined(u.step)?u.$observe("step",b):b(1),t.isDefined(u.round)?u.$observe("round",v):v(ne);var ae=t.noop;u.ngDisabled&&(ae=o.$parent.$watch(u.ngDisabled,E)),d.register(ee,"drag",{horizontal:!oe}),o.mouseActive=!1,ee.on("keydown",T).on("mousedown",A).on("focus",w).on("blur",k).on("$md.pressdown",I).on("$md.pressup",H).on("$md.dragstart",O).on("$md.drag",P).on("$md.dragend",R),setTimeout(h,0);var de=e.throttle(h);t.element(n).on("resize",de),o.$on("$destroy",function(){t.element(n).off("resize",de)}),W.$render=x,W.$viewChangeListeners.push(x),W.$formatters.push(N),W.$formatters.push(S);var se,ce,le,me,ue,pe,he={};C();var fe=!1}return{scope:{},require:["?ngModel","?^mdSliderContainer"],template:'<div class="md-slider-wrapper"><div class="md-slider-content"><div class="md-track-container"><div class="md-track"></div><div class="md-track md-track-fill"></div><div class="md-track-ticks"></div></div><div class="md-thumb-container"><div class="md-thumb"></div><div class="md-focus-thumb"></div><div class="md-focus-ring"></div><div class="md-sign"><span class="md-thumb-text"></span></div><div class="md-disabled-thumb"></div></div></div></div>',compile:m}}o.$inject=["$$rAF","$window","$mdAria","$mdUtil","$mdConstant","$mdTheming","$mdGesture","$parse","$log","$timeout"],t.module("material.components.slider",["material.core"]).directive("mdSlider",o).directive("mdSliderContainer",e)}(),function(){function e(e,t,o,i){function r(i){function r(e,t){t.addClass("md-sticky-clone");var n={element:e,clone:t};return f.items.push(n),o.nextTick(function(){p.prepend(n.clone)}),h(),function(){f.items.forEach(function(t,n){t.element[0]===e[0]&&(f.items.splice(n,1),t.clone.remove())}),h()}}function d(){f.items.forEach(s),f.items=f.items.sort(function(e,t){return e.top<t.top?-1:1});for(var e,t=p.prop("scrollTop"),n=f.items.length-1;n>=0;n--)if(t>f.items[n].top){e=f.items[n];break}l(e)}function s(e){var t=e.element[0];for(e.top=0,e.left=0,e.right=0;t&&t!==p[0];)e.top+=t.offsetTop,e.left+=t.offsetLeft,t.offsetParent&&(e.right+=t.offsetParent.offsetWidth-t.offsetWidth-t.offsetLeft),t=t.offsetParent;e.height=e.element.prop("offsetHeight");var i=o.floatingScrollbars()?"0":n;o.bidi(e.clone,"margin-left",e.left,i),o.bidi(e.clone,"margin-right",i,e.right)}function c(){var e=p.prop("scrollTop"),t=e>(c.prevScrollTop||0);if(c.prevScrollTop=e,0===e)return void l(null);if(t){if(f.next&&f.next.top<=e)return void l(f.next);if(f.current&&f.next&&f.next.top-e<=f.next.height)return void u(f.current,e+(f.next.top-f.next.height-e))}if(!t){if(f.current&&f.prev&&e<f.current.top)return void l(f.prev);if(f.next&&f.current&&e>=f.next.top-f.current.height)return void u(f.current,e+(f.next.top-e-f.current.height))}f.current&&u(f.current,e)}function l(e){if(f.current!==e){f.current&&(u(f.current,null),m(f.current,null)),e&&m(e,"active"),f.current=e;var t=f.items.indexOf(e);f.next=f.items[t+1],f.prev=f.items[t-1],m(f.next,"next"),m(f.prev,"prev")}}function m(e,t){e&&e.state!==t&&(e.state&&(e.clone.attr("sticky-prev-state",e.state),e.element.attr("sticky-prev-state",e.state)),e.clone.attr("sticky-state",t),
e.element.attr("sticky-state",t),e.state=t)}function u(t,i){t&&(null===i||i===n?t.translateY&&(t.translateY=null,t.clone.css(e.CSS.TRANSFORM,"")):(t.translateY=i,o.bidi(t.clone,e.CSS.TRANSFORM,"translate3d("+t.left+"px,"+i+"px,0)","translateY("+i+"px)")))}var p=i.$element,h=t.throttle(d);a(p),p.on("$scrollstart",h),p.on("$scroll",c);var f;return f={prev:null,current:null,next:null,items:[],add:r,refreshElements:d}}function a(e){function n(){+o.now()-r>a?(i=!1,e.triggerHandler("$scrollend")):(e.triggerHandler("$scroll"),t.throttle(n))}var i,r,a=200;e.on("scroll touchmove",function(){i||(i=!0,t.throttle(n),e.triggerHandler("$scrollstart")),e.triggerHandler("$scroll"),r=+o.now()})}var d=o.checkStickySupport();return function(e,t,n){var o=t.controller("mdContent");if(o)if(d)t.css({position:d,top:0,"z-index":2});else{var a=o.$element.data("$$sticky");a||(a=r(o),o.$element.data("$$sticky",a));var s=n||i(t.clone())(e),c=a.add(t,s);e.$on("$destroy",c)}}}e.$inject=["$mdConstant","$$rAF","$mdUtil","$compile"],t.module("material.components.sticky",["material.core","material.components.content"]).factory("$mdSticky",e)}(),function(){function e(e,n,o,i,r){return{restrict:"E",replace:!0,transclude:!0,template:'<div class="md-subheader _md"> <div class="md-subheader-inner"> <div class="md-subheader-content"></div> </div></div>',link:function(a,d,s,c,l){function m(e){return t.element(e[0].querySelector(".md-subheader-content"))}o(d),d.addClass("_md"),i.prefixer().removeAttribute(d,"ng-repeat");var u=d[0].outerHTML;s.$set("role","heading"),r.expect(d,"aria-level","2"),l(a,function(e){m(d).append(e)}),d.hasClass("md-no-sticky")||l(a,function(t){var o=n('<div class="md-subheader-wrapper" aria-hidden="true">'+u+"</div>")(a);i.nextTick(function(){m(o).append(t)}),e(a,d,o)})}}}e.$inject=["$mdSticky","$compile","$mdTheming","$mdUtil","$mdAria"],t.module("material.components.subheader",["material.core","material.components.sticky"]).directive("mdSubheader",e)}(),function(){function e(e){function t(e){function t(t,i,r){var a=e(r[n]);i.on(o,function(e){var n=e.currentTarget;t.$applyAsync(function(){a(t,{$event:e,$target:{current:n}})})})}return{restrict:"A",link:t}}t.$inject=["$parse"];var n="md"+e,o="$md."+e.toLowerCase();return t}t.module("material.components.swipe",["material.core"]).directive("mdSwipeLeft",e("SwipeLeft")).directive("mdSwipeRight",e("SwipeRight")).directive("mdSwipeUp",e("SwipeUp")).directive("mdSwipeDown",e("SwipeDown"))}(),function(){function e(e,n,o,i,r,a,d){function s(e,s){var l=c.compile(e,s).post;return e.addClass("md-dragging"),function(e,s,c,m){function u(t){b&&b(e)||(t.stopPropagation(),s.addClass("md-dragging"),y={width:v.prop("offsetWidth")})}function p(e){if(y){e.stopPropagation(),e.srcEvent&&e.srcEvent.preventDefault();var t=e.pointer.distanceX/y.width,n=g.$viewValue?1+t:t;n=Math.max(0,Math.min(1,n)),v.css(o.CSS.TRANSFORM,"translate3d("+100*n+"%,0,0)"),y.translate=n}}function h(t){if(y){t.stopPropagation(),s.removeClass("md-dragging"),v.css(o.CSS.TRANSFORM,"");var n=g.$viewValue?y.translate<.5:y.translate>.5;n&&f(!g.$viewValue),y=null,e.skipToggle=!0,d(function(){e.skipToggle=!1},1)}}function f(t){e.$apply(function(){g.$setViewValue(t),g.$render()})}var g=(m[0],m[1]||n.fakeNgModel()),b=(m[2],null);null!=c.disabled?b=function(){return!0}:c.ngDisabled&&(b=i(c.ngDisabled));var v=t.element(s[0].querySelector(".md-thumb-container")),E=t.element(s[0].querySelector(".md-container")),$=t.element(s[0].querySelector(".md-label"));r(function(){s.removeClass("md-dragging")}),l(e,s,c,m),b&&e.$watch(b,function(e){s.attr("tabindex",e?-1:0)}),c.$observe("mdInvert",function(e){var t=n.parseAttributeBoolean(e);t?s.prepend($):s.prepend(E),s.toggleClass("md-inverted",t)}),a.register(E,"drag"),E.on("$md.dragstart",u).on("$md.drag",p).on("$md.dragend",h);var y}}var c=e[0];return{restrict:"E",priority:o.BEFORE_NG_ARIA,transclude:!0,template:'<div class="md-container"><div class="md-bar"></div><div class="md-thumb-container"><div class="md-thumb" md-ink-ripple md-ink-ripple-checkbox></div></div></div><div ng-transclude class="md-label"></div>',require:["^?mdInputContainer","?ngModel","?^form"],compile:s}}e.$inject=["mdCheckboxDirective","$mdUtil","$mdConstant","$parse","$$rAF","$mdGesture","$timeout"],t.module("material.components.switch",["material.core","material.components.checkbox"]).directive("mdSwitch",e)}(),function(){t.module("material.components.tabs",["material.core","material.components.icon"])}(),function(){function e(){function e(e,t){var o,i,r=e.canvas,a=n(e);for(o=0;o<a.length;o++)if(a[o]>=t){i=a[o];break}return Math.max(0,i-r.clientWidth)}function t(e,t){var i,r,a=e.canvas,d=o(e)-a.clientWidth,s=n(e);for(i=0;i<s.length,s[i]<=t+a.clientWidth;i++)r=s[i];return Math.min(d,r)}function n(e){var t,n,o=0,i=[];for(t=0;t<e.tabs.length;t++)n=e.tabs[t],i.push(o),o+=n.offsetWidth;return i}function o(e){var t,n,o=0;for(t=0;t<e.tabs.length;t++)n=e.tabs[t],o+=n.offsetWidth;return o}return{decreasePageOffset:e,increasePageOffset:t,getTabOffsets:n,getTotalTabsWidth:o}}t.module("material.components.tabs").service("MdTabsPaginationService",e)}(),function(){function e(e){return{restrict:"E",link:function(t,n){n.addClass("_md"),t.$on("$destroy",function(){e.destroy()})}}}function n(e){function n(e){r=e}function o(e,t){this.$onInit=function(){var n=this;n.highlightAction&&(t.highlightClasses=["md-highlight",n.highlightClass]),t.$watch(function(){return r},function(){n.content=r}),this.resolve=function(){e.hide(a)}}}function i(e,n,o,i){function a(t,a,d){r=d.textContent||d.content;var l=!i("gt-sm");return a=o.extractElementByName(a,"md-toast",!0),d.element=a,d.onSwipe=function(e,t){var i=e.type.replace("$md.",""),r=i.replace("swipe","");"down"===r&&d.position.indexOf("top")!=-1&&!l||"up"===r&&(d.position.indexOf("bottom")!=-1||l)||("left"!==r&&"right"!==r||!l)&&(a.addClass("md-"+i),o.nextTick(n.cancel))},d.openClass=s(d.position),a.addClass(d.toastClass),d.parent.addClass(d.openClass),o.hasComputedStyle(d.parent,"position","static")&&d.parent.css("position","relative"),a.on(c,d.onSwipe),a.addClass(l?"md-bottom":d.position.split(" ").map(function(e){return"md-"+e}).join(" ")),d.parent&&d.parent.addClass("md-toast-animating"),e.enter(a,d.parent).then(function(){d.parent&&d.parent.removeClass("md-toast-animating")})}function d(t,n,i){return n.off(c,i.onSwipe),i.parent&&i.parent.addClass("md-toast-animating"),i.openClass&&i.parent.removeClass(i.openClass),(1==i.$destroy?n.remove():e.leave(n)).then(function(){i.parent&&i.parent.removeClass("md-toast-animating"),o.hasComputedStyle(i.parent,"position","static")&&i.parent.css("position","")})}function s(e){return i("gt-xs")?"md-toast-open-"+(e.indexOf("top")>-1?"top":"bottom"):"md-toast-open-bottom"}var c="$md.swipeleft $md.swiperight $md.swipeup $md.swipedown";return{onShow:a,onRemove:d,toastClass:"",position:"bottom left",themable:!0,hideDelay:3e3,autoWrap:!0,transformTemplate:function(e,n){var o=n.autoWrap&&e&&!/md-toast-content/g.test(e);if(o){var i=document.createElement("md-template");i.innerHTML=e;for(var r=0;r<i.children.length;r++)if("MD-TOAST"===i.children[r].nodeName){var a=t.element('<div class="md-toast-content">');a.append(t.element(i.children[r].childNodes)),i.children[r].appendChild(a[0])}return i.innerHTML}return e||""}}}o.$inject=["$mdToast","$scope"],i.$inject=["$animate","$mdToast","$mdUtil","$mdMedia"];var r,a="ok",d=e("$mdToast").setDefaults({methods:["position","hideDelay","capsule","parent","position","toastClass"],options:i}).addPreset("simple",{argOption:"textContent",methods:["textContent","content","action","highlightAction","highlightClass","theme","parent"],options:["$mdToast","$mdTheming",function(e,t){return{template:'<md-toast md-theme="{{ toast.theme }}" ng-class="{\'md-capsule\': toast.capsule}"> <div class="md-toast-content"> <span class="md-toast-text" role="alert" aria-relevant="all" aria-atomic="true"> {{ toast.content }} </span> <md-button class="md-action" ng-if="toast.action" ng-click="toast.resolve()" ng-class="highlightClasses"> {{ toast.action }} </md-button> </div></md-toast>',controller:o,theme:t.defaultTheme(),controllerAs:"toast",bindToController:!0}}]}).addMethod("updateTextContent",n).addMethod("updateContent",n);return d}e.$inject=["$mdToast"],n.$inject=["$$interimElementProvider"],t.module("material.components.toast",["material.core","material.components.button"]).directive("mdToast",e).provider("$mdToast",n)}(),function(){function e(e,n,o,i,r){var a=t.bind(null,o.supplant,"translate3d(0,{0}px,0)");return{template:"",restrict:"E",link:function(d,s,c){function l(){function i(e){var t=s.parent().find("md-content");!f&&t.length&&l(null,t),e=d.$eval(e),e===!1?g():g=u()}function l(e,t){t&&s.parent()[0]===t.parent()[0]&&(f&&f.off("scroll",$),f=t,g=u())}function m(e){var t=e?e.target.scrollTop:v;y(),b=Math.min(h/E,Math.max(0,b+t-v)),s.css(n.CSS.TRANSFORM,a([-b*E])),f.css(n.CSS.TRANSFORM,a([(h-b)*E])),v=t,o.nextTick(function(){var e=s.hasClass("md-whiteframe-z1");e&&!b?r.removeClass(s,"md-whiteframe-z1"):!e&&b&&r.addClass(s,"md-whiteframe-z1")})}function u(){return f?(f.on("scroll",$),f.attr("scroll-shrink","true"),o.nextTick(p,!1),function(){f.off("scroll",$),f.attr("scroll-shrink","false"),p()}):t.noop}function p(){h=s.prop("offsetHeight");var e=-h*E+"px";f.css({"margin-top":e,"margin-bottom":e}),m()}var h,f,g=t.noop,b=0,v=0,E=c.mdShrinkSpeedFactor||.5,$=e.throttle(m),y=o.debounce(p,5e3);d.$on("$mdContentLoaded",l),c.$observe("mdScrollShrink",i),c.ngShow&&d.$watch(c.ngShow,p),c.ngHide&&d.$watch(c.ngHide,p),d.$on("$destroy",g)}s.addClass("_md"),i(s),o.nextTick(function(){s.addClass("_md-toolbar-transitions")},!1),t.isDefined(c.mdScrollShrink)&&l()}}}e.$inject=["$$rAF","$mdConstant","$mdUtil","$mdTheming","$animate"],t.module("material.components.toolbar",["material.core","material.components.content"]).directive("mdToolbar",e)}(),function(){function n(e,n,o,i,r,a,d,s){function c(c,g,b){function v(){c.mdZIndex=c.mdZIndex||u,c.mdDelay=c.mdDelay||p,f[c.mdDirection]||(c.mdDirection=h)}function E(e){var t=e||r(g.text().trim())(c.$parent);(!H.attr("aria-label")&&!H.attr("aria-labelledby")||H.attr("md-labeled-by-tooltip"))&&(H.attr("aria-label",t),H.attr("md-labeled-by-tooltip")||H.attr("md-labeled-by-tooltip",I))}function $(){v(),N&&N.panelEl&&N.panelEl.removeClass(k),k="md-origin-"+c.mdDirection,_=f[c.mdDirection],x=d.newPanelPosition().relativeTo(H).addPanelPosition(_.x,_.y),N&&N.panelEl&&(N.panelEl.addClass(k),N.updatePosition(x))}function y(){function t(e){return e.some(function(e){return"disabled"===e.attributeName&&H[0].disabled}),!1}function o(){M(!1)}function r(){R=document.activeElement===H[0]}function d(e){"focus"===e.type&&R?R=!1:c.mdVisible||(H.on(m,u),M(!0),"touchstart"===e.type&&H.one("touchend",function(){a.nextTick(function(){i.one("touchend",u)},!1)}))}function u(){S=c.hasOwnProperty("mdAutohide")?c.mdAutohide:b.hasOwnProperty("mdAutohide"),(S||P||i[0].activeElement!==H[0])&&(D&&(e.cancel(D),M.queued=!1,D=null),H.off(m,u),H.triggerHandler("blur"),M(!1)),P=!1}function p(){P=!0}function h(){s.deregister("scroll",o,!0),s.deregister("blur",r),s.deregister("resize",O),H.off(l,d).off(m,u).off("mousedown",p),u(),f&&f.disconnect()}if(H[0]&&"MutationObserver"in n){var f=new MutationObserver(function(e){t(e)&&a.nextTick(function(){M(!1)})});f.observe(H[0],{attributes:!0})}R=!1,s.register("scroll",o,!0),s.register("blur",r),s.register("resize",O),c.$on("$destroy",h),H.on("mousedown",p),H.on(l,d)}function C(){function e(){c.$destroy()}if(g[0]&&"MutationObserver"in n){var t=new MutationObserver(function(e){e.forEach(function(e){"md-visible"!==e.attributeName||c.visibleWatcher||(c.visibleWatcher=c.$watch("mdVisible",T))})});t.observe(g[0],{attributes:!0}),b.hasOwnProperty("mdVisible")&&(c.visibleWatcher=c.$watch("mdVisible",T))}else c.visibleWatcher=c.$watch("mdVisible",T);c.$watch("mdDirection",$),g.one("$destroy",e),H.one("$destroy",e),c.$on("$destroy",function(){M(!1),N&&N.destroy(),t&&t.disconnect(),g.remove()}),g.text().indexOf(r.startSymbol())>-1&&c.$watch(function(){return g.text().trim()},E)}function M(t){M.queued&&M.value===!!t||!M.queued&&c.mdVisible===!!t||(M.value=!!t,M.queued||(t?(M.queued=!0,D=e(function(){c.mdVisible=M.value,M.queued=!1,D=null,c.visibleWatcher||T(c.mdVisible)},c.mdDelay)):a.nextTick(function(){c.mdVisible=!1,c.visibleWatcher||T(!1)})))}function T(e){e?A():w()}function A(){if(!g[0].textContent.trim())throw new Error("Text for the tooltip has not been provided. Please include text within the mdTooltip element.");if(!N){var e=t.element(document.body),n=d.newPanelAnimation().openFrom(H).closeTo(H).withAnimation({open:"md-show",close:"md-hide"}),o={id:I,attachTo:e,contentElement:g,propagateContainerEvents:!0,panelClass:"md-tooltip",animation:n,position:x,zIndex:c.mdZIndex,focusOnOpen:!1,onDomAdded:function(){N.panelEl.addClass(k)}};N=d.create(o)}N.open().then(function(){N.panelEl.attr("role","tooltip")})}function w(){N&&N.close()}var k,_,x,N,S,D,I="md-tooltip-"+a.nextUid(),H=a.getParentWithPointerEvents(g),O=o.throttle($),P=!1,R=null;v(),E(),g.detach(),$(),y(),C()}var l="focus touchstart mouseenter",m="blur touchcancel mouseleave",u=100,p=0,h="bottom",f={top:{x:d.xPosition.CENTER,y:d.yPosition.ABOVE},right:{x:d.xPosition.OFFSET_END,y:d.yPosition.CENTER},bottom:{x:d.xPosition.CENTER,y:d.yPosition.BELOW},left:{x:d.xPosition.OFFSET_START,y:d.yPosition.CENTER}};return{restrict:"E",priority:210,scope:{mdZIndex:"=?mdZIndex",mdDelay:"=?mdDelay",mdVisible:"=?mdVisible",mdAutohide:"=?mdAutohide",mdDirection:"@?mdDirection"},link:c}}function o(){function n(e){r[e.type]&&r[e.type].forEach(function(t){t.call(this,e)},this)}function o(t,o,i){var d=r[t]=r[t]||[];d.length||(i?e.addEventListener(t,n,!0):a.on(t,n)),d.indexOf(o)===-1&&d.push(o)}function i(t,o,i){var d=r[t],s=d?d.indexOf(o):-1;s>-1&&(d.splice(s,1),0===d.length&&(i?e.removeEventListener(t,n,!0):a.off(t,n)))}var r={},a=t.element(e);return{register:o,deregister:i}}n.$inject=["$timeout","$window","$$rAF","$document","$interpolate","$mdUtil","$mdPanel","$$mdTooltipRegistry"],t.module("material.components.tooltip",["material.core","material.components.panel"]).directive("mdTooltip",n).service("$$mdTooltipRegistry",o)}(),function(){function e(){return{restrict:"AE",controller:n}}function n(e){e.addClass("md-truncate")}n.$inject=["$element"],t.module("material.components.truncate",["material.core"]).directive("mdTruncate",e)}(),function(){function e(){return{controller:o,template:n,compile:function(e,t){e.addClass("md-virtual-repeat-container").addClass(t.hasOwnProperty("mdOrientHorizontal")?"md-orient-horizontal":"md-orient-vertical")}}}function n(e){return'<div class="md-virtual-repeat-scroller" role="presentation"><div class="md-virtual-repeat-sizer" role="presentation"></div><div class="md-virtual-repeat-offsetter" role="presentation">'+e[0].innerHTML+"</div></div>"}function o(e,n,o,i,r,a,d,s,c){this.$rootScope=r,this.$scope=d,this.$element=s,this.$attrs=c,this.size=0,this.scrollSize=0,this.scrollOffset=0,this.horizontal=this.$attrs.hasOwnProperty("mdOrientHorizontal"),this.repeater=null,this.autoShrink=this.$attrs.hasOwnProperty("mdAutoShrink"),this.autoShrinkMin=parseInt(this.$attrs.mdAutoShrinkMin,10)||0,this.originalSize=null,this.offsetSize=parseInt(this.$attrs.mdOffsetSize,10)||0,this.oldElementSize=null,this.maxElementPixels=o.ELEMENT_MAX_PIXELS,this.$attrs.mdTopIndex?(this.bindTopIndex=i(this.$attrs.mdTopIndex),this.topIndex=this.bindTopIndex(this.$scope),t.isDefined(this.topIndex)||(this.topIndex=0,this.bindTopIndex.assign(this.$scope,0)),this.$scope.$watch(this.bindTopIndex,t.bind(this,function(e){e!==this.topIndex&&this.scrollToIndex(e)}))):this.topIndex=0,this.scroller=s[0].querySelector(".md-virtual-repeat-scroller"),this.sizer=this.scroller.querySelector(".md-virtual-repeat-sizer"),this.offsetter=this.scroller.querySelector(".md-virtual-repeat-offsetter");var l=t.bind(this,this.updateSize);e(t.bind(this,function(){l();var e=n.debounce(l,10,null,!1),o=t.element(a);this.size||e(),o.on("resize",e),d.$on("$destroy",function(){o.off("resize",e)}),d.$emit("$md-resize-enable"),d.$on("$md-resize",l)}))}function i(e){return{controller:r,priority:1e3,require:["mdVirtualRepeat","^^mdVirtualRepeatContainer"],restrict:"A",terminal:!0,transclude:"element",compile:function(t,n){var o=n.mdVirtualRepeat,i=o.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)\s*$/),r=i[1],a=e(i[2]),d=n.mdExtraName&&e(n.mdExtraName);return function(e,t,n,o,i){o[0].link_(o[1],i,r,a,d)}}}}function r(e,n,o,i,r,a,d,s){this.$scope=e,this.$element=n,this.$attrs=o,this.$browser=i,this.$document=r,this.$mdUtil=s,this.$rootScope=a,this.$$rAF=d,this.onDemand=s.parseAttributeBoolean(o.mdOnDemand),this.browserCheckUrlChange=i.$$checkUrlChange,this.newStartIndex=0,this.newEndIndex=0,this.newVisibleEnd=0,this.startIndex=0,this.endIndex=0,this.itemSize=e.$eval(o.mdItemSize)||null,this.isFirstRender=!0,this.isVirtualRepeatUpdating_=!1,this.itemsLength=0,this.unwatchItemSize_=t.noop,this.blocks={},this.pooledBlocks=[],e.$on("$destroy",t.bind(this,this.cleanupBlocks_))}function a(e){if(!t.isFunction(e.getItemAtIndex)||!t.isFunction(e.getLength))throw Error("When md-on-demand is enabled, the Object passed to md-virtual-repeat must implement functions getItemAtIndex() and getLength() ");this.model=e}function d(e){return{restrict:"A",link:function(e,t,n){var o=e.$eval(n.mdForceHeight)||null;o&&t&&(t[0].style.height=o)}}}o.$inject=["$$rAF","$mdUtil","$mdConstant","$parse","$rootScope","$window","$scope","$element","$attrs"],r.$inject=["$scope","$element","$attrs","$browser","$document","$rootScope","$$rAF","$mdUtil"],i.$inject=["$parse"],t.module("material.components.virtualRepeat",["material.core","material.components.showHide"]).directive("mdVirtualRepeatContainer",e).directive("mdVirtualRepeat",i).directive("mdForceHeight",d);var s=3;o.prototype.register=function(e){this.repeater=e,t.element(this.scroller).on("scroll wheel touchmove touchend",t.bind(this,this.handleScroll_))},o.prototype.isHorizontal=function(){return this.horizontal},o.prototype.getSize=function(){return this.size},o.prototype.setSize_=function(e){var t=this.getDimensionName_();this.size=e,this.$element[0].style[t]=e+"px"},o.prototype.unsetSize_=function(){this.$element[0].style[this.getDimensionName_()]=this.oldElementSize,this.oldElementSize=null},o.prototype.updateSize=function(){this.originalSize||(this.size=this.isHorizontal()?this.$element[0].clientWidth:this.$element[0].clientHeight,this.handleScroll_(),this.repeater&&this.repeater.containerUpdated())},o.prototype.getScrollSize=function(){return this.scrollSize},o.prototype.getDimensionName_=function(){return this.isHorizontal()?"width":"height"},o.prototype.sizeScroller_=function(e){var t=this.getDimensionName_(),n=this.isHorizontal()?"height":"width";if(this.sizer.innerHTML="",e<this.maxElementPixels)this.sizer.style[t]=e+"px";else{this.sizer.style[t]="auto",this.sizer.style[n]="auto";var o=Math.floor(e/this.maxElementPixels),i=document.createElement("div");i.style[t]=this.maxElementPixels+"px",i.style[n]="1px";for(var r=0;r<o;r++)this.sizer.appendChild(i.cloneNode(!1));i.style[t]=e-o*this.maxElementPixels+"px",this.sizer.appendChild(i)}},o.prototype.autoShrink_=function(e){var t=Math.max(e,this.autoShrinkMin*this.repeater.getItemSize());if(this.autoShrink&&t!==this.size){null===this.oldElementSize&&(this.oldElementSize=this.$element[0].style[this.getDimensionName_()]);var n=this.originalSize||this.size;if(!n||t<n)this.originalSize||(this.originalSize=this.size),this.setSize_(t);else if(null!==this.originalSize){this.unsetSize_();var o=this.originalSize;this.originalSize=null,o||this.updateSize(),this.setSize_(o||this.size)}this.repeater.containerUpdated()}},o.prototype.setScrollSize=function(e){var t=e+this.offsetSize;this.scrollSize!==t&&(this.sizeScroller_(t),this.autoShrink_(t),this.scrollSize=t)},o.prototype.getScrollOffset=function(){return this.scrollOffset},o.prototype.scrollTo=function(e){this.scroller[this.isHorizontal()?"scrollLeft":"scrollTop"]=e,this.handleScroll_()},o.prototype.scrollToIndex=function(e){var t=this.repeater.getItemSize(),n=this.repeater.itemsLength;e>n&&(e=n-1),this.scrollTo(t*e)},o.prototype.resetScroll=function(){this.scrollTo(0)},o.prototype.handleScroll_=function(){var e="rtl"!=document.dir&&"rtl"!=document.body.dir;e||this.maxSize||(this.scroller.scrollLeft=this.scrollSize,this.maxSize=this.scroller.scrollLeft);var t=this.isHorizontal()?e?this.scroller.scrollLeft:this.maxSize-this.scroller.scrollLeft:this.scroller.scrollTop;if(!(t===this.scrollOffset||t>this.scrollSize-this.size)){var n=this.repeater.getItemSize();if(n){var o=Math.max(0,Math.floor(t/n)-s),i=(this.isHorizontal()?"translateX(":"translateY(")+(!this.isHorizontal()||e?o*n:-(o*n))+"px)";if(this.scrollOffset=t,this.offsetter.style.webkitTransform=i,this.offsetter.style.transform=i,this.bindTopIndex){var r=Math.floor(t/n);r!==this.topIndex&&r<this.repeater.getItemCount()&&(this.topIndex=r,this.bindTopIndex.assign(this.$scope,r),this.$rootScope.$$phase||this.$scope.$digest())}this.repeater.containerUpdated()}}},r.Block,r.prototype.link_=function(e,n,o,i,r){this.container=e,this.transclude=n,this.repeatName=o,this.rawRepeatListExpression=i,this.extraName=r,this.sized=!1,this.repeatListExpression=t.bind(this,this.repeatListExpression_),this.container.register(this)},r.prototype.cleanupBlocks_=function(){t.forEach(this.pooledBlocks,function(e){e.element.remove()})},r.prototype.readItemSize_=function(){if(!this.itemSize){this.items=this.repeatListExpression(this.$scope),this.parentNode=this.$element[0].parentNode;var e=this.getBlock_(0);e.element[0].parentNode||this.parentNode.appendChild(e.element[0]),this.itemSize=e.element[0][this.container.isHorizontal()?"offsetWidth":"offsetHeight"]||null,this.blocks[0]=e,this.poolBlock_(0),this.itemSize&&this.containerUpdated()}},r.prototype.repeatListExpression_=function(e){var t=this.rawRepeatListExpression(e);if(this.onDemand&&t){var n=new a(t);return n.$$includeIndexes(this.newStartIndex,this.newVisibleEnd),n}return t},r.prototype.containerUpdated=function(){return this.itemSize?(this.sized||(this.items=this.repeatListExpression(this.$scope)),this.sized||(this.unwatchItemSize_(),this.sized=!0,this.$scope.$watchCollection(this.repeatListExpression,t.bind(this,function(e,t){this.isVirtualRepeatUpdating_||this.virtualRepeatUpdate_(e,t)}))),this.updateIndexes_(),void((this.newStartIndex!==this.startIndex||this.newEndIndex!==this.endIndex||this.container.getScrollOffset()>this.container.getScrollSize())&&(this.items instanceof a&&this.items.$$includeIndexes(this.newStartIndex,this.newEndIndex),this.virtualRepeatUpdate_(this.items,this.items)))):(this.unwatchItemSize_&&this.unwatchItemSize_!==t.noop&&this.unwatchItemSize_(),this.unwatchItemSize_=this.$scope.$watchCollection(this.repeatListExpression,t.bind(this,function(e){e&&e.length&&this.readItemSize_()})),void(this.$rootScope.$$phase||this.$scope.$digest()))},r.prototype.getItemSize=function(){return this.itemSize},r.prototype.getItemCount=function(){return this.itemsLength},r.prototype.virtualRepeatUpdate_=function(e,n){this.isVirtualRepeatUpdating_=!0;var o=e&&e.length||0,i=!1;if(this.items&&o<this.items.length&&0!==this.container.getScrollOffset()){this.items=e;var r=this.container.getScrollOffset();this.container.resetScroll(),this.container.scrollTo(r)}o!==this.itemsLength&&(i=!0,this.itemsLength=o),this.items=e,(e!==n||i)&&this.updateIndexes_(),this.parentNode=this.$element[0].parentNode,i&&this.container.setScrollSize(o*this.itemSize),Object.keys(this.blocks).forEach(function(e){var t=parseInt(e,10);(t<this.newStartIndex||t>=this.newEndIndex)&&this.poolBlock_(t)},this),this.$browser.$$checkUrlChange=t.noop;var a,d,s=[],c=[];for(a=this.newStartIndex;a<this.newEndIndex&&null==this.blocks[a];a++)d=this.getBlock_(a),this.updateBlock_(d,a),s.push(d);for(;null!=this.blocks[a];a++)this.updateBlock_(this.blocks[a],a);for(var l=a-1;a<this.newEndIndex;a++)d=this.getBlock_(a),this.updateBlock_(d,a),c.push(d);if(s.length&&this.parentNode.insertBefore(this.domFragmentFromBlocks_(s),this.$element[0].nextSibling),c.length&&this.parentNode.insertBefore(this.domFragmentFromBlocks_(c),this.blocks[l]&&this.blocks[l].element[0].nextSibling),this.$browser.$$checkUrlChange=this.browserCheckUrlChange,this.startIndex=this.newStartIndex,this.endIndex=this.newEndIndex,this.isFirstRender){this.isFirstRender=!1;var m=this.$attrs.mdStartIndex?this.$scope.$eval(this.$attrs.mdStartIndex):this.container.topIndex;this.$mdUtil.nextTick(function(){this.container.scrollToIndex(m)}.bind(this))}this.isVirtualRepeatUpdating_=!1},r.prototype.getBlock_=function(e){if(this.pooledBlocks.length)return this.pooledBlocks.pop();var n;return this.transclude(t.bind(this,function(t,o){n={element:t,"new":!0,scope:o},this.updateScope_(o,e),this.parentNode.appendChild(t[0])})),n},r.prototype.updateBlock_=function(e,t){this.blocks[t]=e,(e["new"]||e.scope.$index!==t||e.scope[this.repeatName]!==this.items[t])&&(e["new"]=!1,this.updateScope_(e.scope,t),this.$rootScope.$$phase||e.scope.$digest())},r.prototype.updateScope_=function(e,t){e.$index=t,e[this.repeatName]=this.items&&this.items[t],this.extraName&&(e[this.extraName(this.$scope)]=this.items[t])},r.prototype.poolBlock_=function(e){this.pooledBlocks.push(this.blocks[e]),this.parentNode.removeChild(this.blocks[e].element[0]),delete this.blocks[e]},r.prototype.domFragmentFromBlocks_=function(e){var t=this.$document[0].createDocumentFragment();return e.forEach(function(e){t.appendChild(e.element[0])}),t},r.prototype.updateIndexes_=function(){var e=this.items?this.items.length:0,t=Math.ceil(this.container.getSize()/this.itemSize);this.newStartIndex=Math.max(0,Math.min(e-t,Math.floor(this.container.getScrollOffset()/this.itemSize))),this.newVisibleEnd=this.newStartIndex+t+s,this.newEndIndex=Math.min(e,this.newVisibleEnd),this.newStartIndex=Math.max(0,this.newStartIndex-s)},a.prototype.$$includeIndexes=function(e,t){for(var n=e;n<t;n++)this.hasOwnProperty(n)||(this[n]=this.model.getItemAtIndex(n));this.length=this.model.getLength()},d.$inject=["$mdUtil"]}(),function(){function e(e){function t(t,a,d){var s="";d.$observe("mdWhiteframe",function(t){t=parseInt(t,10)||r,t!=n&&(t>i||t<o)&&(e.warn("md-whiteframe attribute value is invalid. It should be a number between "+o+" and "+i,a[0]),t=r);var c=t==n?"":"md-whiteframe-"+t+"dp";d.$updateClass(c,s),s=c})}var n=-1,o=1,i=24,r=4;return{link:t}}e.$inject=["$log"],t.module("material.components.whiteframe",["material.core"]).directive("mdWhiteframe",e)}(),function(){function e(e,d,s,c,l,m,u,p,h,f,g,b){function v(){s.initOptionalProperties(e,h,{searchText:"",selectedItem:null,clearButton:!1}),l(d),M(),s.nextTick(function(){w(),y(),e.autofocus&&d.on("focus",C)})}function E(){e.requireMatch&&De&&De.$setValidity("md-require-match",!!e.selectedItem||!e.searchText)}function $(){function t(){var e=0,t=d.find("md-input-container");if(t.length){var n=t.find("input");e=t.prop("offsetHeight"),e-=n.prop("offsetTop"),e-=n.prop("offsetHeight"),e+=t.prop("offsetTop")}return e}function n(){var e=Ae.scrollContainer.getBoundingClientRect(),t={};e.right>p.right-r&&(t.left=m.right-e.width+"px"),Ae.$.scrollContainer.css(t)}if(!Ae)return s.nextTick($,!1,e);var c,l=(e.dropdownItems||i)*o,m=Ae.wrap.getBoundingClientRect(),u=Ae.snap.getBoundingClientRect(),p=Ae.root.getBoundingClientRect(),f=u.bottom-p.top,g=p.bottom-u.top,b=m.left-p.left,v=m.width,E=t(),y=e.dropdownPosition;if(y||(y=f>g&&p.height-f-r<l?"top":"bottom"),h.mdFloatingLabel&&(b+=a,v-=2*a),c={left:b+"px",minWidth:v+"px",maxWidth:Math.max(m.right-p.left,p.right-m.left)-r+"px"},"top"===y)c.top="auto",c.bottom=g+"px",c.maxHeight=Math.min(l,m.top-p.top-r)+"px";else{var C=p.bottom-m.bottom-r+s.getViewportTop();c.top=f-E+"px",c.bottom="auto",c.maxHeight=Math.min(l,C)+"px"}Ae.$.scrollContainer.css(c),s.nextTick(n,!1)}function y(){Ae.$.root.length&&(l(Ae.$.scrollContainer),Ae.$.scrollContainer.detach(),Ae.$.root.append(Ae.$.scrollContainer),u.pin&&u.pin(Ae.$.scrollContainer,p))}function C(){Ae.input.focus()}function M(){var n=parseInt(e.delay,10)||0;h.$observe("disabled",function(e){Ce.isDisabled=s.parseAttributeBoolean(e,!1)}),h.$observe("required",function(e){Ce.isRequired=s.parseAttributeBoolean(e,!1)}),h.$observe("readonly",function(e){Ce.isReadonly=s.parseAttributeBoolean(e,!1)}),e.$watch("searchText",n?s.debounce(B,n):B),e.$watch("selectedItem",H),t.element(m).on("resize",Ie),e.$on("$destroy",T)}function T(){if(Ce.hidden||s.enableScrolling(),t.element(m).off("resize",Ie),Ae){var e=["ul","scroller","scrollContainer","input"];t.forEach(e,function(e){Ae.$[e].remove()})}}function A(){Ce.hidden||$()}function w(){var e=k();Ae={main:d[0],scrollContainer:d[0].querySelector(".md-virtual-repeat-container"),scroller:d[0].querySelector(".md-virtual-repeat-scroller"),ul:d.find("ul")[0],input:d.find("input")[0],wrap:e.wrap,snap:e.snap,root:document.body},Ae.li=Ae.ul.getElementsByTagName("li"),Ae.$=_(Ae),De=Ae.$.input.controller("ngModel")}function k(){var e,n;for(e=d;e.length&&(n=e.attr("md-autocomplete-snap"),!t.isDefined(n));e=e.parent());if(e.length)return{snap:e[0],wrap:"width"===n.toLowerCase()?e[0]:d.find("md-autocomplete-wrap")[0]};var o=d.find("md-autocomplete-wrap")[0];return{snap:o,wrap:o}}function _(e){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=t.element(e[o]));return n}function x(e,n){!e&&n?($(),ue(!0,He.Count|He.Selected),Ae&&(s.disableScrollAround(Ae.ul),Se=N(t.element(Ae.wrap)))):e&&!n&&(s.enableScrolling(),Se&&(Se(),Se=null))}function N(e){function t(e){e.preventDefault()}return e.on("wheel",t),e.on("touchmove",t),function(){e.off("wheel",t),e.off("touchmove",t)}}function S(){ke=!0}function D(){xe||Ce.hidden||Ae.input.focus(),ke=!1,Ce.hidden=X()}function I(){Ae.input.focus()}function H(n,o){E(),n?V(n).then(function(t){e.searchText=t,R(n,o)}):o&&e.searchText&&V(o).then(function(n){t.isString(e.searchText)&&n.toString().toLowerCase()===e.searchText.toLowerCase()&&(e.searchText="")}),n!==o&&O()}function O(){t.isFunction(e.itemChange)&&e.itemChange(Y(e.selectedItem))}function P(){t.isFunction(e.textChange)&&e.textChange()}function R(e,t){_e.forEach(function(n){n(e,t)})}function L(e){_e.indexOf(e)==-1&&_e.push(e)}function F(e){var t=_e.indexOf(e);t!=-1&&_e.splice(t,1)}function B(t,n){Ce.index=K(),t!==n&&(E(),V(e.selectedItem).then(function(o){t!==o&&(e.selectedItem=null,t!==n&&P(),re()?ve():(Ce.matches=[],G(!1),ue(!1,He.Count)))}))}function U(e){xe=!1,ke||(Ce.hidden=X(),ye("ngBlur",{$event:e}))}function j(e){e&&(ke=!1,xe=!1),Ae.input.blur()}function q(e){xe=!0,Q()&&re()&&ve(),Ce.hidden=X(),ye("ngFocus",{$event:e})}function z(t){switch(t.keyCode){case c.KEY_CODE.DOWN_ARROW:if(Ce.loading)return;t.stopPropagation(),t.preventDefault(),Ce.index=Math.min(Ce.index+1,Ce.matches.length-1),he(),ue(!1,He.Selected);break;case c.KEY_CODE.UP_ARROW:if(Ce.loading)return;t.stopPropagation(),t.preventDefault(),Ce.index=Ce.index<0?Ce.matches.length-1:Math.max(0,Ce.index-1),he(),ue(!1,He.Selected);break;case c.KEY_CODE.TAB:if(D(),Ce.hidden||Ce.loading||Ce.index<0||Ce.matches.length<1)return;de(Ce.index);break;case c.KEY_CODE.ENTER:if(Ce.hidden||Ce.loading||Ce.index<0||Ce.matches.length<1)return;if(ne())return;t.stopPropagation(),t.preventDefault(),de(Ce.index);break;case c.KEY_CODE.ESCAPE:if(t.preventDefault(),!Z())return;t.stopPropagation(),ce(),e.searchText&&J("clear")&&le(),Ce.hidden=!0,J("blur")&&j(!0)}}function W(){return t.isNumber(e.minLength)?e.minLength:1}function V(n){function o(t){return t&&e.itemText?e.itemText(Y(t)):null}return f.when(o(n)||n).then(function(e){return e&&!t.isString(e)&&g.warn("md-autocomplete: Could not resolve display value to a string. Please check the `md-item-text` attribute."),e})}function Y(e){if(!e)return n;var t={};return Ce.itemName&&(t[Ce.itemName]=e),t}function K(){return e.autoselect?0:-1}function G(e){Ce.loading!=e&&(Ce.loading=e),Ce.hidden=X()}function X(){
return!Q()||!ee()}function Q(){return!(Ce.loading&&!te())&&(!ne()&&!!xe)}function Z(){return J("blur")||!Ce.hidden||Ce.loading||J("clear")&&e.searchText}function J(t){return!e.escapeOptions||e.escapeOptions.toLowerCase().indexOf(t)!==-1}function ee(){return re()&&te()||be()}function te(){return!!Ce.matches.length}function ne(){return!!Ce.scope.selectedItem}function oe(){return Ce.loading&&!ne()}function ie(){return V(Ce.matches[Ce.index])}function re(){return(e.searchText||"").length>=W()}function ae(e,t,n){Object.defineProperty(Ce,e,{get:function(){return n},set:function(e){var o=n;n=e,t(e,o)}})}function de(t){s.nextTick(function(){V(Ce.matches[t]).then(function(e){var t=Ae.$.input.controller("ngModel");t.$setViewValue(e),t.$render()})["finally"](function(){e.selectedItem=Ce.matches[t],G(!1)})},!1)}function se(){ce(),le()}function ce(){Ce.index=0,Ce.matches=[]}function le(){G(!0),e.searchText="";var t=document.createEvent("CustomEvent");t.initCustomEvent("change",!0,!0,{value:""}),Ae.input.dispatchEvent(t),Ae.input.blur(),e.searchText="",Ae.input.focus()}function me(n){function o(t){t&&(t=f.when(t),Ne++,G(!0),s.nextTick(function(){t.then(i)["finally"](function(){0===--Ne&&G(!1)})},!0,e))}function i(t){we[a]=t,(n||"")===(e.searchText||"")&&Ee(t)}var r=e.$parent.$eval(Te),a=n.toLowerCase(),d=t.isArray(r),c=!!r.then;d?i(r):c&&o(r)}function ue(e,t){var n=e?"polite":"assertive",o=[];t&He.Selected&&Ce.index!==-1&&o.push(ie()),t&He.Count&&o.push(f.resolve(pe())),f.all(o).then(function(e){b.announce(e.join(" "),n)})}function pe(){switch(Ce.matches.length){case 0:return"There are no matches available.";case 1:return"There is 1 match available.";default:return"There are "+Ce.matches.length+" matches available."}}function he(){if(Ae.li[0]){var e=Ae.li[0].offsetHeight,t=e*Ce.index,n=t+e,o=Ae.scroller.clientHeight,i=Ae.scroller.scrollTop;t<i?ge(t):n>i+o&&ge(n-o)}}function fe(){return 0!==Ne}function ge(e){Ae.$.scrollContainer.controller("mdVirtualRepeatContainer").scrollTo(e)}function be(){var e=(Ce.scope.searchText||"").length;return Ce.hasNotFound&&!te()&&(!Ce.loading||fe())&&e>=W()&&(xe||ke)&&!ne()}function ve(){var t=e.searchText||"",n=t.toLowerCase();!e.noCache&&we[n]?Ee(we[n]):me(t),Ce.hidden=X()}function Ee(t){Ce.matches=t,Ce.hidden=X(),Ce.loading&&G(!1),e.selectOnMatch&&$e(),$(),ue(!0,He.Count)}function $e(){var t=e.searchText,n=Ce.matches,o=n[0];1===n.length&&V(o).then(function(n){var o=t==n;e.matchInsensitive&&!o&&(o=t.toLowerCase()==n.toLowerCase()),o&&de(0)})}function ye(t,n){h[t]&&e.$parent.$eval(h[t],n||{})}var Ce=this,Me=e.itemsExpr.split(/ in /i),Te=Me[1],Ae=null,we={},ke=!1,_e=[],xe=!1,Ne=0,Se=null,De=null,Ie=s.debounce(A);ae("hidden",x,!0),Ce.scope=e,Ce.parent=e.$parent,Ce.itemName=Me[0],Ce.matches=[],Ce.loading=!1,Ce.hidden=!0,Ce.index=null,Ce.id=s.nextUid(),Ce.isDisabled=null,Ce.isRequired=null,Ce.isReadonly=null,Ce.hasNotFound=!1,Ce.keydown=z,Ce.blur=U,Ce.focus=q,Ce.clear=se,Ce.select=de,Ce.listEnter=S,Ce.listLeave=D,Ce.mouseUp=I,Ce.getCurrentDisplayValue=ie,Ce.registerSelectedItemWatcher=L,Ce.unregisterSelectedItemWatcher=F,Ce.notFoundVisible=be,Ce.loadingIsVisible=oe,Ce.positionDropdown=$;var He={Count:1,Selected:2};return v()}e.$inject=["$scope","$element","$mdUtil","$mdConstant","$mdTheming","$window","$animate","$rootElement","$attrs","$q","$log","$mdLiveAnnouncer"],t.module("material.components.autocomplete").controller("MdAutocompleteCtrl",e);var o=48,i=5,r=8,a=2}(),function(){function e(e){return{controller:"MdAutocompleteCtrl",controllerAs:"$mdAutocompleteCtrl",scope:{inputName:"@mdInputName",inputMinlength:"@mdInputMinlength",inputMaxlength:"@mdInputMaxlength",searchText:"=?mdSearchText",selectedItem:"=?mdSelectedItem",itemsExpr:"@mdItems",itemText:"&mdItemText",placeholder:"@placeholder",noCache:"=?mdNoCache",requireMatch:"=?mdRequireMatch",selectOnMatch:"=?mdSelectOnMatch",matchInsensitive:"=?mdMatchCaseInsensitive",itemChange:"&?mdSelectedItemChange",textChange:"&?mdSearchTextChange",minLength:"=?mdMinLength",delay:"=?mdDelay",autofocus:"=?mdAutofocus",floatingLabel:"@?mdFloatingLabel",autoselect:"=?mdAutoselect",menuClass:"@?mdMenuClass",inputId:"@?mdInputId",escapeOptions:"@?mdEscapeOptions",dropdownItems:"=?mdDropdownItems",dropdownPosition:"@?mdDropdownPosition",clearButton:"=?mdClearButton"},compile:function(e,n){var o=["md-select-on-focus","md-no-asterisk","ng-trim","ng-pattern"],i=e.find("input");return o.forEach(function(e){var t=n[n.$normalize(e)];null!==t&&i.attr(e,t)}),function(e,n,o,i){i.hasNotFound=!!n.attr("md-has-not-found"),t.isDefined(o.mdClearButton)||e.floatingLabel||(e.clearButton=!0)}},template:function(t,n){function o(){var e=t.find("md-item-template").detach(),n=e.length?e.html():t.html();return e.length||t.empty(),"<md-autocomplete-parent-scope md-autocomplete-replace>"+n+"</md-autocomplete-parent-scope>"}function i(){var e=t.find("md-not-found").detach(),n=e.length?e.html():"";return n?'<li ng-if="$mdAutocompleteCtrl.notFoundVisible()" md-autocomplete-parent-scope>'+n+"</li>":""}function r(){return n.mdFloatingLabel?' <md-input-container ng-if="floatingLabel"> <label>{{floatingLabel}}</label> <input type="search" '+(null!=l?'tabindex="'+l+'"':"")+' id="{{ inputId || \'fl-input-\' + $mdAutocompleteCtrl.id }}" name="{{inputName}}" autocomplete="off" ng-required="$mdAutocompleteCtrl.isRequired" ng-readonly="$mdAutocompleteCtrl.isReadonly" ng-minlength="inputMinlength" ng-maxlength="inputMaxlength" ng-disabled="$mdAutocompleteCtrl.isDisabled" ng-model="$mdAutocompleteCtrl.scope.searchText" ng-model-options="{ allowInvalid: true }" ng-keydown="$mdAutocompleteCtrl.keydown($event)" ng-blur="$mdAutocompleteCtrl.blur($event)" ng-focus="$mdAutocompleteCtrl.focus($event)" aria-owns="ul-{{$mdAutocompleteCtrl.id}}" aria-label="{{floatingLabel}}" aria-autocomplete="list" role="combobox" aria-haspopup="true" aria-activedescendant="" aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/> <div md-autocomplete-parent-scope md-autocomplete-replace>'+c+"</div> </md-input-container>":' <input type="search" '+(null!=l?'tabindex="'+l+'"':"")+' id="{{ inputId || \'input-\' + $mdAutocompleteCtrl.id }}" name="{{inputName}}" ng-if="!floatingLabel" autocomplete="off" ng-required="$mdAutocompleteCtrl.isRequired" ng-disabled="$mdAutocompleteCtrl.isDisabled" ng-readonly="$mdAutocompleteCtrl.isReadonly" ng-minlength="inputMinlength" ng-maxlength="inputMaxlength" ng-model="$mdAutocompleteCtrl.scope.searchText" ng-keydown="$mdAutocompleteCtrl.keydown($event)" ng-blur="$mdAutocompleteCtrl.blur($event)" ng-focus="$mdAutocompleteCtrl.focus($event)" placeholder="{{placeholder}}" aria-owns="ul-{{$mdAutocompleteCtrl.id}}" aria-label="{{placeholder}}" aria-autocomplete="list" role="combobox" aria-haspopup="true" aria-activedescendant="" aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/>'}function a(){return'<button type="button" aria-label="Clear Input" tabindex="-1" ng-if="clearButton && $mdAutocompleteCtrl.scope.searchText" ng-click="$mdAutocompleteCtrl.clear($event)"><md-icon md-svg-src="'+e.mdClose+'"></md-icon></button>'}var d=i(),s=o(),c=t.html(),l=n.tabindex;return d&&t.attr("md-has-not-found",!0),t.attr("tabindex","-1")," <md-autocomplete-wrap ng-class=\"{ 'md-whiteframe-z1': !floatingLabel, 'md-menu-showing': !$mdAutocompleteCtrl.hidden, 'md-show-clear-button': !!clearButton }\"> "+r()+" "+a()+' <md-progress-linear class="'+(n.mdFloatingLabel?"md-inline":"")+'" ng-if="$mdAutocompleteCtrl.loadingIsVisible()" md-mode="indeterminate"></md-progress-linear> <md-virtual-repeat-container md-auto-shrink md-auto-shrink-min="1" ng-mouseenter="$mdAutocompleteCtrl.listEnter()" ng-mouseleave="$mdAutocompleteCtrl.listLeave()" ng-mouseup="$mdAutocompleteCtrl.mouseUp()" ng-hide="$mdAutocompleteCtrl.hidden" class="md-autocomplete-suggestions-container md-whiteframe-z1" ng-class="{ \'md-not-found\': $mdAutocompleteCtrl.notFoundVisible() }" role="presentation"> <ul class="md-autocomplete-suggestions" ng-class="::menuClass" id="ul-{{$mdAutocompleteCtrl.id}}"> <li md-virtual-repeat="item in $mdAutocompleteCtrl.matches" ng-class="{ selected: $index === $mdAutocompleteCtrl.index }" ng-click="$mdAutocompleteCtrl.select($index)" md-extra-name="$mdAutocompleteCtrl.itemName"> '+s+" </li>"+d+" </ul> </md-virtual-repeat-container> </md-autocomplete-wrap>"}}}e.$inject=["$$mdSvgRegistry"],t.module("material.components.autocomplete").directive("mdAutocomplete",e)}(),function(){function e(e,t){function n(e,n,o){return function(e,n,i){function r(n,o){s[o]=e[n],e.$watch(n,function(e){t.nextTick(function(){s[o]=e})})}function a(){var t=!1,n=!1;e.$watch(function(){n||t||(t=!0,e.$$postDigest(function(){n||s.$digest(),t=n=!1}))}),s.$watch(function(){n=!0})}var d=e.$mdAutocompleteCtrl,s=d.parent.$new(),c=d.itemName;r("$index","$index"),r("item",c),a(),o(s,function(e){n.after(e)})}}return{restrict:"AE",compile:n,terminal:!0,transclude:"element"}}e.$inject=["$compile","$mdUtil"],t.module("material.components.autocomplete").directive("mdAutocompleteParentScope",e)}(),function(){function e(e,t,n){this.$scope=e,this.$element=t,this.$attrs=n,this.regex=null}e.$inject=["$scope","$element","$attrs"],t.module("material.components.autocomplete").controller("MdHighlightCtrl",e),e.prototype.init=function(e,t){this.flags=this.$attrs.mdHighlightFlags||"",this.unregisterFn=this.$scope.$watch(function(n){return{term:e(n),contentText:t(n)}}.bind(this),this.onRender.bind(this),!0),this.$element.on("$destroy",this.unregisterFn)},e.prototype.onRender=function(e,t){var n=e.contentText;null!==this.regex&&e.term===t.term||(this.regex=this.createRegex(e.term,this.flags)),e.term?this.applyRegex(n):this.$element.text(n)},e.prototype.applyRegex=function(e){var n=this.resolveTokens(e);this.$element.empty(),n.forEach(function(e){if(e.isMatch){var n=t.element('<span class="highlight">').text(e.text);this.$element.append(n)}else this.$element.append(document.createTextNode(e))}.bind(this))},e.prototype.resolveTokens=function(e){function t(t,o){var i=e.slice(t,o);i&&n.push(i)}var n=[],o=0;return e.replace(this.regex,function(e,i){t(o,i),n.push({text:e,isMatch:!0}),o=i+e.length}),t(o),n},e.prototype.createRegex=function(e,t){var n="",o="",i=this.sanitizeRegex(e);return t.indexOf("^")>=0&&(n="^"),t.indexOf("$")>=0&&(o="$"),new RegExp(n+i+o,t.replace(/[$^]/g,""))},e.prototype.sanitizeRegex=function(e){return e&&e.toString().replace(/[\\^$*+?.()|{}[\]]/g,"\\$&")}}(),function(){function e(e,t){return{terminal:!0,controller:"MdHighlightCtrl",compile:function(n,o){var i=t(o.mdHighlightText),r=e(n.html());return function(e,t,n,o){o.init(i,r)}}}}e.$inject=["$interpolate","$parse"],t.module("material.components.autocomplete").directive("mdHighlightText",e)}(),function(){function o(e,t,o,i,r){this.$scope=e,this.$element=t,this.$mdConstant=o,this.$timeout=i,this.$mdUtil=r,this.isEditting=!1,this.parentController=n,this.enableChipEdit=!1}o.$inject=["$scope","$element","$mdConstant","$timeout","$mdUtil"],t.module("material.components.chips").controller("MdChipCtrl",o),o.prototype.init=function(e){this.parentController=e,this.enableChipEdit=this.parentController.enableChipEdit,this.enableChipEdit&&(this.$element.on("keydown",this.chipKeyDown.bind(this)),this.$element.on("mousedown",this.chipMouseDown.bind(this)),this.getChipContent().addClass("_md-chip-content-edit-is-enabled"))},o.prototype.getChipContent=function(){var e=this.$element[0].getElementsByClassName("md-chip-content");return t.element(e[0])},o.prototype.getContentElement=function(){return t.element(this.getChipContent().children()[0])},o.prototype.getChipIndex=function(){return parseInt(this.$element.attr("index"))},o.prototype.goOutOfEditMode=function(){if(this.isEditting){this.isEditting=!1,this.$element.removeClass("_md-chip-editing"),this.getChipContent()[0].contentEditable="false";var e=this.getChipIndex(),t=this.getContentElement().text();t?(this.parentController.updateChipContents(e,this.getContentElement().text()),this.$mdUtil.nextTick(function(){this.parentController.selectedChip===e&&this.parentController.focusChip(e)}.bind(this))):this.parentController.removeChipAndFocusInput(e)}},o.prototype.selectNodeContents=function(t){var n,o;document.body.createTextRange?(n=document.body.createTextRange(),n.moveToElementText(t),n.select()):e.getSelection&&(o=e.getSelection(),n=document.createRange(),n.selectNodeContents(t),o.removeAllRanges(),o.addRange(n))},o.prototype.goInEditMode=function(){this.isEditting=!0,this.$element.addClass("_md-chip-editing"),this.getChipContent()[0].contentEditable="true",this.getChipContent().on("blur",function(){this.goOutOfEditMode()}.bind(this)),this.selectNodeContents(this.getChipContent()[0])},o.prototype.chipKeyDown=function(e){this.isEditting||e.keyCode!==this.$mdConstant.KEY_CODE.ENTER&&e.keyCode!==this.$mdConstant.KEY_CODE.SPACE?this.isEditting&&e.keyCode===this.$mdConstant.KEY_CODE.ENTER&&(e.preventDefault(),this.goOutOfEditMode()):(e.preventDefault(),this.goInEditMode())},o.prototype.chipMouseDown=function(){this.getChipIndex()==this.parentController.selectedChip&&this.enableChipEdit&&!this.isEditting&&this.goInEditMode()}}(),function(){function e(e,o,i,r){function a(n,o,a,s){var c=s.shift(),l=s.shift(),m=t.element(o[0].querySelector(".md-chip-content"));e(o),c&&(l.init(c),m.append(i(d)(n)),m.on("blur",function(){c.resetSelectedChip(),c.$scope.$applyAsync()})),r(function(){c&&c.shouldFocusLastChip&&c.focusLastChipThenInput()})}var d=o.processTemplate(n);return{restrict:"E",require:["^?mdChips","mdChip"],link:a,controller:"MdChipCtrl"}}e.$inject=["$mdTheming","$mdUtil","$compile","$timeout"],t.module("material.components.chips").directive("mdChip",e);var n=' <span ng-if="!$mdChipsCtrl.readonly" class="md-visually-hidden"> {{$mdChipsCtrl.deleteHint}} </span>'}(),function(){function e(e){function t(t,n,o,i){n.on("click",function(e){t.$apply(function(){i.removeChip(t.$$replacedScope.$index)})}),e(function(){n.attr({tabindex:-1,"aria-hidden":!0}),n.find("button").attr("tabindex","-1")})}return{restrict:"A",require:"^mdChips",scope:!1,link:t}}e.$inject=["$timeout"],t.module("material.components.chips").directive("mdChipRemove",e)}(),function(){function e(e){function t(t,n,o){var i=t.$parent.$mdChipsCtrl,r=i.parent.$new(!1,i.parent);r.$$replacedScope=t,r.$chip=t.$chip,r.$index=t.$index,r.$mdChipsCtrl=i;var a=i.$scope.$eval(o.mdChipTransclude);n.html(a),e(n.contents())(r)}return{restrict:"EA",terminal:!0,link:t,scope:!1}}e.$inject=["$compile"],t.module("material.components.chips").directive("mdChipTransclude",e)}(),function(){function e(e,t,o,i,r,a,d){this.$timeout=a,this.$mdConstant=o,this.$scope=e,this.parent=e.$parent,this.$mdUtil=d,this.$log=i,this.$element=r,this.$attrs=t,this.ngModelCtrl=null,this.userInputNgModelCtrl=null,this.autocompleteCtrl=null,this.userInputElement=null,this.items=[],this.selectedChip=-1,this.enableChipEdit=d.parseAttributeBoolean(t.mdEnableChipEdit),this.addOnBlur=d.parseAttributeBoolean(t.mdAddOnBlur),this.inputAriaLabel="Chips input.",this.containerHint="Chips container. Use arrow keys to select chips.",this.deleteHint="Press delete to remove this chip.",this.deleteButtonLabel="Remove",this.chipBuffer="",this.useTransformChip=!1,this.useOnAdd=!1,this.useOnRemove=!1,this.wrapperId="",this.contentIds=[],this.ariaTabIndex=null,this.chipAppendDelay=n,this.deRegister=[],this.init()}e.$inject=["$scope","$attrs","$mdConstant","$log","$element","$timeout","$mdUtil"];var n=300;t.module("material.components.chips").controller("MdChipsCtrl",e),e.prototype.init=function(){var e=this;this.wrapperId="_md-chips-wrapper-"+this.$mdUtil.nextUid(),this.deRegister.push(this.$scope.$watchCollection("$mdChipsCtrl.items",function(){e.setupInputAria(),e.setupWrapperAria()})),this.deRegister.push(this.$attrs.$observe("mdChipAppendDelay",function(t){var o=parseInt(t);e.chipAppendDelay=isNaN(o)?n:o}))},e.prototype.$onDestroy=function(){for(var e;e=this.deRegister.pop();)e.call(this)},e.prototype.setupInputAria=function(){var e=this.$element.find("input");e&&(e.attr("role","textbox"),e.attr("aria-multiline",!0))},e.prototype.setupWrapperAria=function(){var e=this,t=this.$element.find("md-chips-wrap");this.items&&this.items.length?(t.attr("role","listbox"),this.contentIds=this.items.map(function(){return e.wrapperId+"-chip-"+e.$mdUtil.nextUid()}),t.attr("aria-owns",this.contentIds.join(" "))):(t.removeAttr("role"),t.removeAttr("aria-owns"))},e.prototype.inputKeydown=function(e){var t=this.getChipBuffer();if(!(this.autocompleteCtrl&&e.isDefaultPrevented&&e.isDefaultPrevented())){if(e.keyCode===this.$mdConstant.KEY_CODE.BACKSPACE){if(0!==this.getCursorPosition(e.target))return;return e.preventDefault(),e.stopPropagation(),void(this.items.length&&this.selectAndFocusChipSafe(this.items.length-1))}if((!this.separatorKeys||this.separatorKeys.length<1)&&(this.separatorKeys=[this.$mdConstant.KEY_CODE.ENTER]),this.separatorKeys.indexOf(e.keyCode)!==-1){if(this.autocompleteCtrl&&this.requireMatch||!t)return;if(e.preventDefault(),this.hasMaxChipsReached())return;return this.appendChip(t.trim()),this.resetChipBuffer(),!1}}},e.prototype.getCursorPosition=function(e){try{if(e.selectionStart===e.selectionEnd)return e.selectionStart}catch(t){if(!e.value)return 0}},e.prototype.updateChipContents=function(e,t){e>=0&&e<this.items.length&&(this.items[e]=t,this.ngModelCtrl.$setDirty())},e.prototype.isEditingChip=function(){return!!this.$element[0].querySelector("._md-chip-editing")},e.prototype.isRemovable=function(){return!!this.ngModelCtrl&&(this.readonly?this.removable:!t.isDefined(this.removable)||this.removable)},e.prototype.chipKeydown=function(e){if(!this.getChipBuffer()&&!this.isEditingChip())switch(e.keyCode){case this.$mdConstant.KEY_CODE.BACKSPACE:case this.$mdConstant.KEY_CODE.DELETE:if(this.selectedChip<0)return;if(e.preventDefault(),!this.isRemovable())return;this.removeAndSelectAdjacentChip(this.selectedChip);break;case this.$mdConstant.KEY_CODE.LEFT_ARROW:e.preventDefault(),(this.selectedChip<0||this.readonly&&0==this.selectedChip)&&(this.selectedChip=this.items.length),this.items.length&&this.selectAndFocusChipSafe(this.selectedChip-1);break;case this.$mdConstant.KEY_CODE.RIGHT_ARROW:e.preventDefault(),this.selectAndFocusChipSafe(this.selectedChip+1);break;case this.$mdConstant.KEY_CODE.ESCAPE:case this.$mdConstant.KEY_CODE.TAB:if(this.selectedChip<0)return;e.preventDefault(),this.onFocus()}},e.prototype.getPlaceholder=function(){var e=this.items&&this.items.length&&(""==this.secondaryPlaceholder||this.secondaryPlaceholder);return e?this.secondaryPlaceholder:this.placeholder},e.prototype.removeAndSelectAdjacentChip=function(e){var t=this,n=t.getAdjacentChipIndex(e);this.$element[0].querySelector("md-chips-wrap"),this.$element[0].querySelector('md-chip[index="'+e+'"]');t.removeChip(e),t.$timeout(function(){t.$timeout(function(){t.selectAndFocusChipSafe(n)})})},e.prototype.resetSelectedChip=function(){this.selectedChip=-1,this.ariaTabIndex=null},e.prototype.getAdjacentChipIndex=function(e){var t=this.items.length-1;return 0==t?-1:e==t?e-1:e},e.prototype.appendChip=function(e){if(this.shouldFocusLastChip=!0,this.useTransformChip&&this.transformChip){var n=this.transformChip({$chip:e});t.isDefined(n)&&(e=n)}if(t.isObject(e)){var o=this.items.some(function(n){return t.equals(e,n)});if(o)return}if(!(null==e||this.items.indexOf(e)+1)){var i=this.items.push(e),r=i-1;this.ngModelCtrl.$setDirty(),this.validateModel(),this.useOnAdd&&this.onAdd&&this.onAdd({$chip:e,$index:r})}},e.prototype.useTransformChipExpression=function(){this.useTransformChip=!0},e.prototype.useOnAddExpression=function(){this.useOnAdd=!0},e.prototype.useOnRemoveExpression=function(){this.useOnRemove=!0},e.prototype.useOnSelectExpression=function(){this.useOnSelect=!0},e.prototype.getChipBuffer=function(){var e=this.userInputElement?this.userInputNgModelCtrl?this.userInputNgModelCtrl.$viewValue:this.userInputElement[0].value:this.chipBuffer;return t.isString(e)?e:""},e.prototype.resetChipBuffer=function(){this.userInputElement?this.userInputNgModelCtrl?(this.userInputNgModelCtrl.$setViewValue(""),this.userInputNgModelCtrl.$render()):this.userInputElement[0].value="":this.chipBuffer=""},e.prototype.hasMaxChipsReached=function(){return t.isString(this.maxChips)&&(this.maxChips=parseInt(this.maxChips,10)||0),this.maxChips>0&&this.items.length>=this.maxChips},e.prototype.validateModel=function(){this.ngModelCtrl.$setValidity("md-max-chips",!this.hasMaxChipsReached()),this.ngModelCtrl.$validate()},e.prototype.removeChip=function(e){var t=this.items.splice(e,1);this.ngModelCtrl.$setDirty(),this.validateModel(),t&&t.length&&this.useOnRemove&&this.onRemove&&this.onRemove({$chip:t[0],$index:e})},e.prototype.removeChipAndFocusInput=function(e){this.removeChip(e),this.autocompleteCtrl?(this.autocompleteCtrl.hidden=!0,this.$mdUtil.nextTick(this.onFocus.bind(this))):this.onFocus()},e.prototype.selectAndFocusChipSafe=function(e){if(!this.items.length||e===-1)return this.focusInput();if(e>=this.items.length){if(!this.readonly)return this.onFocus();e=0}e=Math.max(e,0),e=Math.min(e,this.items.length-1),this.selectChip(e),this.focusChip(e)},e.prototype.focusLastChipThenInput=function(){var e=this;e.shouldFocusLastChip=!1,e.focusChip(this.items.length-1),e.$timeout(function(){e.focusInput()},e.chipAppendDelay)},e.prototype.focusInput=function(){this.selectChip(-1),this.onFocus()},e.prototype.selectChip=function(e){e>=-1&&e<=this.items.length?(this.selectedChip=e,this.useOnSelect&&this.onSelect&&this.onSelect({$chip:this.items[e]})):this.$log.warn("Selected Chip index out of bounds; ignoring.")},e.prototype.selectAndFocusChip=function(e){this.selectChip(e),e!=-1&&this.focusChip(e)},e.prototype.focusChip=function(e){var t=this.$element[0].querySelector('md-chip[index="'+e+'"] .md-chip-content');this.ariaTabIndex=e,t.focus()},e.prototype.configureNgModel=function(e){this.ngModelCtrl=e;var t=this;e.$isEmpty=function(e){return!e||0===e.length},e.$render=function(){t.items=t.ngModelCtrl.$viewValue}},e.prototype.onFocus=function(){var e=this.$element[0].querySelector("input");e&&e.focus(),this.resetSelectedChip()},e.prototype.onInputFocus=function(){this.inputHasFocus=!0,this.setupInputAria(),this.resetSelectedChip()},e.prototype.onInputBlur=function(){this.inputHasFocus=!1,this.shouldAddOnBlur()&&(this.appendChip(this.getChipBuffer().trim()),this.resetChipBuffer())},e.prototype.configureInput=function(e){var t=e.controller("ngModel"),n=this;t&&(this.deRegister.push(this.$scope.$watch(function(){return t.$touched},function(e){e&&n.ngModelCtrl.$setTouched()})),this.deRegister.push(this.$scope.$watch(function(){return t.$dirty},function(e){e&&n.ngModelCtrl.$setDirty()})))},e.prototype.configureUserInput=function(e){this.userInputElement=e;var n=e.controller("ngModel");n!=this.ngModelCtrl&&(this.userInputNgModelCtrl=n);var o=this.$scope,i=this,r=function(e,n){o.$evalAsync(t.bind(i,n,e))};e.attr({tabindex:0}).on("keydown",function(e){r(e,i.inputKeydown)}).on("focus",function(e){r(e,i.onInputFocus)}).on("blur",function(e){r(e,i.onInputBlur)})},e.prototype.configureAutocomplete=function(e){e&&(this.autocompleteCtrl=e,e.registerSelectedItemWatcher(t.bind(this,function(e){if(e){if(this.hasMaxChipsReached())return;this.appendChip(e),this.resetChipBuffer()}})),this.$element.find("input").on("focus",t.bind(this,this.onInputFocus)).on("blur",t.bind(this,this.onInputBlur)))},e.prototype.shouldAddOnBlur=function(){this.validateModel();var e=this.getChipBuffer().trim(),t=this.ngModelCtrl.$valid,n=this.autocompleteCtrl&&!this.autocompleteCtrl.hidden;return this.userInputNgModelCtrl&&(t=t&&this.userInputNgModelCtrl.$valid),this.addOnBlur&&!this.requireMatch&&e&&t&&!n},e.prototype.hasFocus=function(){return this.inputHasFocus||this.selectedChip>=0},e.prototype.contentIdFor=function(e){return this.contentIds[e]}}(),function(){function e(e,t,a,d,s,c){function l(n,o){function i(e){if(o.ngModel){var t=r[0].querySelector(e);return t&&t.outerHTML}}var r=o.$mdUserTemplate;o.$mdUserTemplate=null;var l=i("md-chips>md-chip-template"),m=t.prefixer().buildList("md-chip-remove").map(function(e){return"md-chips>*["+e+"]"}).join(","),p=i(m)||u.remove,h=l||u["default"],f=i("md-chips>md-autocomplete")||i("md-chips>input")||u.input,g=r.find("md-chip");return r[0].querySelector("md-chip-template>*[md-chip-remove]")&&d.warn("invalid placement of md-chip-remove within md-chip-template."),function(n,i,r,d){t.initOptionalProperties(n,o),e(i);var m=d[0];if(l&&(m.enableChipEdit=!1),m.chipContentsTemplate=h,m.chipRemoveTemplate=p,m.chipInputTemplate=f,m.mdCloseIcon=c.mdClose,i.attr({tabindex:-1}).on("focus",function(){m.onFocus()}),o.ngModel&&(m.configureNgModel(i.controller("ngModel")),r.mdTransformChip&&m.useTransformChipExpression(),r.mdOnAppend&&m.useOnAppendExpression(),r.mdOnAdd&&m.useOnAddExpression(),r.mdOnRemove&&m.useOnRemoveExpression(),r.mdOnSelect&&m.useOnSelectExpression(),f!=u.input&&n.$watch("$mdChipsCtrl.readonly",function(e){e||t.nextTick(function(){if(0===f.indexOf("<md-autocomplete")){var e=i.find("md-autocomplete");m.configureAutocomplete(e.controller("mdAutocomplete"))}m.configureUserInput(i.find("input"))})}),t.nextTick(function(){var e=i.find("input");e&&(m.configureInput(e),e.toggleClass("md-input",!0))})),g.length>0){var b=a(g.clone())(n.$parent);s(function(){i.find("md-chips-wrap").prepend(b)})}}}function m(){return{chips:t.processTemplate(n),input:t.processTemplate(o),"default":t.processTemplate(i),remove:t.processTemplate(r)}}var u=m();return{template:function(e,t){return t.$mdUserTemplate=e.clone(),u.chips},require:["mdChips"],restrict:"E",controller:"MdChipsCtrl",controllerAs:"$mdChipsCtrl",bindToController:!0,compile:l,scope:{readonly:"=readonly",removable:"=mdRemovable",placeholder:"@",secondaryPlaceholder:"@",maxChips:"@mdMaxChips",transformChip:"&mdTransformChip",onAppend:"&mdOnAppend",onAdd:"&mdOnAdd",onRemove:"&mdOnRemove",onSelect:"&mdOnSelect",inputAriaLabel:"@",containerHint:"@",deleteHint:"@",deleteButtonLabel:"@",separatorKeys:"=?mdSeparatorKeys",requireMatch:"=?mdRequireMatch",chipAppendDelayString:"@?mdChipAppendDelay"}}}e.$inject=["$mdTheming","$mdUtil","$compile","$log","$timeout","$$mdSvgRegistry"],t.module("material.components.chips").directive("mdChips",e);var n=' <md-chips-wrap id="{{$mdChipsCtrl.wrapperId}}" tabindex="{{$mdChipsCtrl.readonly ? 0 : -1}}" ng-keydown="$mdChipsCtrl.chipKeydown($event)" ng-class="{ \'md-focused\': $mdChipsCtrl.hasFocus(), \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly, \'md-removable\': $mdChipsCtrl.isRemovable() }" aria-setsize="{{$mdChipsCtrl.items.length}}" class="md-chips"> <span ng-if="$mdChipsCtrl.readonly" class="md-visually-hidden"> {{$mdChipsCtrl.containerHint}} </span> <md-chip ng-repeat="$chip in $mdChipsCtrl.items" index="{{$index}}" ng-class="{\'md-focused\': $mdChipsCtrl.selectedChip == $index, \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly}"> <div class="md-chip-content" tabindex="{{$mdChipsCtrl.ariaTabIndex == $index ? 0 : -1}}" id="{{$mdChipsCtrl.contentIdFor($index)}}" role="option" aria-selected="{{$mdChipsCtrl.selectedChip == $index}}" aria-posinset="{{$index}}" ng-click="!$mdChipsCtrl.readonly && $mdChipsCtrl.focusChip($index)" ng-focus="!$mdChipsCtrl.readonly && $mdChipsCtrl.selectChip($index)" md-chip-transclude="$mdChipsCtrl.chipContentsTemplate"></div> <div ng-if="$mdChipsCtrl.isRemovable()" class="md-chip-remove-container" tabindex="-1" md-chip-transclude="$mdChipsCtrl.chipRemoveTemplate"></div> </md-chip> <div class="md-chip-input-container" ng-if="!$mdChipsCtrl.readonly && $mdChipsCtrl.ngModelCtrl"> <div md-chip-transclude="$mdChipsCtrl.chipInputTemplate"></div> </div> </md-chips-wrap>',o=' <input class="md-input" tabindex="0" aria-label="{{$mdChipsCtrl.inputAriaLabel}}" placeholder="{{$mdChipsCtrl.getPlaceholder()}}" ng-model="$mdChipsCtrl.chipBuffer" ng-focus="$mdChipsCtrl.onInputFocus()" ng-blur="$mdChipsCtrl.onInputBlur()" ng-keydown="$mdChipsCtrl.inputKeydown($event)">',i=" <span>{{$chip}}</span>",r=' <button class="md-chip-remove" ng-if="$mdChipsCtrl.isRemovable()" ng-click="$mdChipsCtrl.removeChipAndFocusInput($$replacedScope.$index)" type="button" tabindex="-1"> <md-icon md-svg-src="{{ $mdChipsCtrl.mdCloseIcon }}"></md-icon> <span class="md-visually-hidden"> {{$mdChipsCtrl.deleteButtonLabel}} </span> </button>'}(),function(){function e(){this.selectedItem=null,this.searchText=""}t.module("material.components.chips").controller("MdContactChipsCtrl",e),e.prototype.queryContact=function(e){return this.contactQuery({$query:e})},e.prototype.itemName=function(e){return e[this.contactName]}}(),function(){function e(e,t){function o(n,o){return function(n,i,r,a){var d=a;t.initOptionalProperties(n,o),e(i),i.attr("tabindex","-1"),r.$observe("mdChipAppendDelay",function(e){d.chipAppendDelay=e})}}return{template:function(e,t){return n},restrict:"E",controller:"MdContactChipsCtrl",controllerAs:"$mdContactChipsCtrl",bindToController:!0,compile:o,scope:{contactQuery:"&mdContacts",placeholder:"@",secondaryPlaceholder:"@",contactName:"@mdContactName",contactImage:"@mdContactImage",contactEmail:"@mdContactEmail",contacts:"=ngModel",requireMatch:"=?mdRequireMatch",minLength:"=?mdMinLength",highlightFlags:"@?mdHighlightFlags",chipAppendDelay:"@?mdChipAppendDelay"}}}e.$inject=["$mdTheming","$mdUtil"],t.module("material.components.chips").directive("mdContactChips",e);var n=' <md-chips class="md-contact-chips" ng-model="$mdContactChipsCtrl.contacts" md-require-match="$mdContactChipsCtrl.requireMatch" md-chip-append-delay="{{$mdContactChipsCtrl.chipAppendDelay}}" md-autocomplete-snap> <md-autocomplete md-menu-class="md-contact-chips-suggestions" md-selected-item="$mdContactChipsCtrl.selectedItem" md-search-text="$mdContactChipsCtrl.searchText" md-items="item in $mdContactChipsCtrl.queryContact($mdContactChipsCtrl.searchText)" md-item-text="$mdContactChipsCtrl.itemName(item)" md-no-cache="true" md-min-length="$mdContactChipsCtrl.minLength" md-autoselect placeholder="{{$mdContactChipsCtrl.contacts.length == 0 ? $mdContactChipsCtrl.placeholder : $mdContactChipsCtrl.secondaryPlaceholder}}"> <div class="md-contact-suggestion"> <img ng-src="{{item[$mdContactChipsCtrl.contactImage]}}" alt="{{item[$mdContactChipsCtrl.contactName]}}" ng-if="item[$mdContactChipsCtrl.contactImage]" /> <span class="md-contact-name" md-highlight-text="$mdContactChipsCtrl.searchText" md-highlight-flags="{{$mdContactChipsCtrl.highlightFlags}}"> {{item[$mdContactChipsCtrl.contactName]}} </span> <span class="md-contact-email" >{{item[$mdContactChipsCtrl.contactEmail]}}</span> </div> </md-autocomplete> <md-chip-template> <div class="md-contact-avatar"> <img ng-src="{{$chip[$mdContactChipsCtrl.contactImage]}}" alt="{{$chip[$mdContactChipsCtrl.contactName]}}" ng-if="$chip[$mdContactChipsCtrl.contactImage]" /> </div> <div class="md-contact-name"> {{$chip[$mdContactChipsCtrl.contactName]}} </div> </md-chip-template> </md-chips>';
}(),function(){!function(){function e(){return{template:function(e,t){var n=t.hasOwnProperty("ngIf")?"":'ng-if="calendarCtrl.isInitialized"',o='<div ng-switch="calendarCtrl.currentView" '+n+'><md-calendar-year ng-switch-when="year"></md-calendar-year><md-calendar-month ng-switch-default></md-calendar-month></div>';return o},scope:{minDate:"=mdMinDate",maxDate:"=mdMaxDate",dateFilter:"=mdDateFilter",_mode:"@mdMode",_currentView:"@mdCurrentView"},require:["ngModel","mdCalendar"],controller:n,controllerAs:"calendarCtrl",bindToController:!0,link:function(e,t,n,o){var i=o[0],r=o[1];r.configureNgModel(i)}}}function n(e,n,o,r,a,d,s,c,l){d(e),this.$element=e,this.$scope=n,this.dateUtil=o,this.$mdUtil=r,this.keyCode=a.KEY_CODE,this.$$rAF=s,this.$mdDateLocale=l,this.today=this.dateUtil.createDateAtMidnight(),this.ngModelCtrl=null,this.SELECTED_DATE_CLASS="md-calendar-selected-date",this.TODAY_CLASS="md-calendar-date-today",this.FOCUSED_DATE_CLASS="md-focus",this.id=i++,this.displayDate=null,this.selectedDate=null,this.firstRenderableDate=null,this.lastRenderableDate=null,this.isInitialized=!1,this.width=0,this.scrollbarWidth=0,c.tabindex||e.attr("tabindex","-1");var m,u=t.bind(this,this.handleKeyEvent);m=e.parent().hasClass("md-datepicker-calendar")?t.element(document.body):e,m.on("keydown",u),n.$on("$destroy",function(){m.off("keydown",u)}),1===t.version.major&&t.version.minor<=4&&this.$onInit()}n.$inject=["$element","$scope","$$mdDateUtil","$mdUtil","$mdConstant","$mdTheming","$$rAF","$attrs","$mdDateLocale"],t.module("material.components.datepicker").directive("mdCalendar",e);var o=340,i=0,r={day:"month",month:"year"};n.prototype.$onInit=function(){this._mode&&r.hasOwnProperty(this._mode)?(this.currentView=r[this._mode],this.mode=this._mode):(this.currentView=this._currentView||"month",this.mode=null);var e=this.$mdDateLocale;this.minDate&&this.minDate>e.firstRenderableDate?this.firstRenderableDate=this.minDate:this.firstRenderableDate=e.firstRenderableDate,this.maxDate&&this.maxDate<e.lastRenderableDate?this.lastRenderableDate=this.maxDate:this.lastRenderableDate=e.lastRenderableDate},n.prototype.configureNgModel=function(e){var t=this;t.ngModelCtrl=e,t.$mdUtil.nextTick(function(){t.isInitialized=!0}),e.$render=function(){var e=this.$viewValue;t.$scope.$broadcast("md-calendar-parent-changed",e),t.selectedDate||(t.selectedDate=e),t.displayDate||(t.displayDate=t.selectedDate||t.today)}},n.prototype.setNgModelValue=function(e){var t=this.dateUtil.createDateAtMidnight(e);return this.focus(t),this.$scope.$emit("md-calendar-change",t),this.ngModelCtrl.$setViewValue(t),this.ngModelCtrl.$render(),t},n.prototype.setCurrentView=function(e,n){var o=this;o.$mdUtil.nextTick(function(){o.currentView=e,n&&(o.displayDate=t.isDate(n)?n:new Date(n))})},n.prototype.focus=function(e){if(this.dateUtil.isValidDate(e)){var t=this.$element[0].querySelector("."+this.FOCUSED_DATE_CLASS);t&&t.classList.remove(this.FOCUSED_DATE_CLASS);var n=this.getDateId(e,this.currentView),o=document.getElementById(n);o&&(o.classList.add(this.FOCUSED_DATE_CLASS),o.focus(),this.displayDate=e)}else{var i=this.$element[0].querySelector("[ng-switch]");i&&i.focus()}},n.prototype.changeSelectedDate=function(e){var t=this.SELECTED_DATE_CLASS,n=this.$element[0].querySelector("."+t);if(n&&(n.classList.remove(t),n.setAttribute("aria-selected","false")),e){var o=document.getElementById(this.getDateId(e,this.currentView));o&&(o.classList.add(t),o.setAttribute("aria-selected","true"))}this.selectedDate=e},n.prototype.getActionFromKeyEvent=function(e){var t=this.keyCode;switch(e.which){case t.ENTER:return"select";case t.RIGHT_ARROW:return"move-right";case t.LEFT_ARROW:return"move-left";case t.DOWN_ARROW:return e.metaKey?"move-page-down":"move-row-down";case t.UP_ARROW:return e.metaKey?"move-page-up":"move-row-up";case t.PAGE_DOWN:return"move-page-down";case t.PAGE_UP:return"move-page-up";case t.HOME:return"start";case t.END:return"end";default:return null}},n.prototype.handleKeyEvent=function(e){var t=this;this.$scope.$apply(function(){if(e.which==t.keyCode.ESCAPE||e.which==t.keyCode.TAB)return t.$scope.$emit("md-calendar-close"),void(e.which==t.keyCode.TAB&&e.preventDefault());var n=t.getActionFromKeyEvent(e);n&&(e.preventDefault(),e.stopPropagation(),t.$scope.$broadcast("md-calendar-parent-action",n))})},n.prototype.hideVerticalScrollbar=function(e){function t(){var t=n.width||o,i=n.scrollbarWidth,a=e.calendarScroller;r.style.width=t+"px",a.style.width=t+i+"px",a.style.paddingRight=i+"px"}var n=this,i=e.$element[0],r=i.querySelector(".md-calendar-scroll-mask");n.width>0?t():n.$$rAF(function(){var o=e.calendarScroller;n.scrollbarWidth=o.offsetWidth-o.clientWidth,n.width=i.querySelector("table").offsetWidth,t()})},n.prototype.getDateId=function(e,t){if(!t)throw new Error("A namespace for the date id has to be specified.");return["md",this.id,t,e.getFullYear(),e.getMonth(),e.getDate()].join("-")},n.prototype.updateVirtualRepeat=function(){var e=this.$scope,t=e.$on("$md-resize-enable",function(){e.$$phase||e.$apply(),t()})}}()}(),function(){!function(){function e(){return{template:'<table aria-hidden="true" class="md-calendar-day-header"><thead></thead></table><div class="md-calendar-scroll-mask"><md-virtual-repeat-container class="md-calendar-scroll-container" md-offset-size="'+(i-o)+'"><table role="grid" tabindex="0" class="md-calendar" aria-readonly="true"><tbody md-calendar-month-body role="rowgroup" md-virtual-repeat="i in monthCtrl.items" md-month-offset="$index" class="md-calendar-month" md-start-index="monthCtrl.getSelectedMonthIndex()" md-item-size="'+o+'"><tr aria-hidden="true" md-force-height="\''+o+"px'\"></tr></tbody></table></md-virtual-repeat-container></div>",require:["^^mdCalendar","mdCalendarMonth"],controller:n,controllerAs:"monthCtrl",bindToController:!0,link:function(e,t,n,o){var i=o[0],r=o[1];r.initialize(i)}}}function n(e,t,n,o,i,r){this.$element=e,this.$scope=t,this.$animate=n,this.$q=o,this.dateUtil=i,this.dateLocale=r,this.calendarScroller=e[0].querySelector(".md-virtual-repeat-scroller"),this.isInitialized=!1,this.isMonthTransitionInProgress=!1;var a=this;this.cellClickHandler=function(){var e=i.getTimestampFromNode(this);a.$scope.$apply(function(){a.calendarCtrl.setNgModelValue(e)})},this.headerClickHandler=function(){a.calendarCtrl.setCurrentView("year",i.getTimestampFromNode(this))}}n.$inject=["$element","$scope","$animate","$q","$$mdDateUtil","$mdDateLocale"],t.module("material.components.datepicker").directive("mdCalendarMonth",e);var o=265,i=45;n.prototype.initialize=function(e){this.items={length:this.dateUtil.getMonthDistance(e.firstRenderableDate,e.lastRenderableDate)+2},this.calendarCtrl=e,this.attachScopeListeners(),e.updateVirtualRepeat(),e.ngModelCtrl&&e.ngModelCtrl.$render()},n.prototype.getSelectedMonthIndex=function(){var e=this.calendarCtrl;return this.dateUtil.getMonthDistance(e.firstRenderableDate,e.displayDate||e.selectedDate||e.today)},n.prototype.changeDisplayDate=function(e){if(!this.isInitialized)return this.buildWeekHeader(),this.calendarCtrl.hideVerticalScrollbar(this),this.isInitialized=!0,this.$q.when();if(!this.dateUtil.isValidDate(e)||this.isMonthTransitionInProgress)return this.$q.when();this.isMonthTransitionInProgress=!0;var t=this.animateDateChange(e);this.calendarCtrl.displayDate=e;var n=this;return t.then(function(){n.isMonthTransitionInProgress=!1}),t},n.prototype.animateDateChange=function(e){if(this.dateUtil.isValidDate(e)){var t=this.dateUtil.getMonthDistance(this.calendarCtrl.firstRenderableDate,e);this.calendarScroller.scrollTop=t*o}return this.$q.when()},n.prototype.buildWeekHeader=function(){for(var e=this.dateLocale.firstDayOfWeek,t=this.dateLocale.shortDays,n=document.createElement("tr"),o=0;o<7;o++){var i=document.createElement("th");i.textContent=t[(o+e)%7],n.appendChild(i)}this.$element.find("thead").append(n)},n.prototype.attachScopeListeners=function(){var e=this;e.$scope.$on("md-calendar-parent-changed",function(t,n){e.calendarCtrl.changeSelectedDate(n),e.changeDisplayDate(n)}),e.$scope.$on("md-calendar-parent-action",t.bind(this,this.handleKeyEvent))},n.prototype.handleKeyEvent=function(e,t){var n=this.calendarCtrl,o=n.displayDate;if("select"===t)n.setNgModelValue(o);else{var i=null,r=this.dateUtil;switch(t){case"move-right":i=r.incrementDays(o,1);break;case"move-left":i=r.incrementDays(o,-1);break;case"move-page-down":i=r.incrementMonths(o,1);break;case"move-page-up":i=r.incrementMonths(o,-1);break;case"move-row-down":i=r.incrementDays(o,7);break;case"move-row-up":i=r.incrementDays(o,-7);break;case"start":i=r.getFirstDateOfMonth(o);break;case"end":i=r.getLastDateOfMonth(o)}i&&(i=this.dateUtil.clampDate(i,n.minDate,n.maxDate),this.changeDisplayDate(i).then(function(){n.focus(i)}))}}}()}(),function(){!function(){function e(e,o){var i=e('<md-icon md-svg-src="'+o.mdTabsArrow+'"></md-icon>')({})[0];return{require:["^^mdCalendar","^^mdCalendarMonth","mdCalendarMonthBody"],scope:{offset:"=mdMonthOffset"},controller:n,controllerAs:"mdMonthBodyCtrl",bindToController:!0,link:function(e,n,o,r){var a=r[0],d=r[1],s=r[2];s.calendarCtrl=a,s.monthCtrl=d,s.arrowIcon=i.cloneNode(!0),e.$watch(function(){return s.offset},function(e){t.isNumber(e)&&s.generateContent()})}}}function n(e,t,n){this.$element=e,this.dateUtil=t,this.dateLocale=n,this.monthCtrl=null,this.calendarCtrl=null,this.offset=null,this.focusAfterAppend=null}e.$inject=["$compile","$$mdSvgRegistry"],n.$inject=["$element","$$mdDateUtil","$mdDateLocale"],t.module("material.components.datepicker").directive("mdCalendarMonthBody",e),n.prototype.generateContent=function(){var e=this.dateUtil.incrementMonths(this.calendarCtrl.firstRenderableDate,this.offset);this.$element.empty().append(this.buildCalendarForMonth(e)),this.focusAfterAppend&&(this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS),this.focusAfterAppend.focus(),this.focusAfterAppend=null)},n.prototype.buildDateCell=function(e){var t=this.monthCtrl,n=this.calendarCtrl,o=document.createElement("td");if(o.tabIndex=-1,o.classList.add("md-calendar-date"),o.setAttribute("role","gridcell"),e){o.setAttribute("tabindex","-1"),o.setAttribute("aria-label",this.dateLocale.longDateFormatter(e)),o.id=n.getDateId(e,"month"),o.setAttribute("data-timestamp",e.getTime()),this.dateUtil.isSameDay(e,n.today)&&o.classList.add(n.TODAY_CLASS),this.dateUtil.isValidDate(n.selectedDate)&&this.dateUtil.isSameDay(e,n.selectedDate)&&(o.classList.add(n.SELECTED_DATE_CLASS),o.setAttribute("aria-selected","true"));var i=this.dateLocale.dates[e.getDate()];if(this.isDateEnabled(e)){var r=document.createElement("span");r.classList.add("md-calendar-date-selection-indicator"),r.textContent=i,o.appendChild(r),o.addEventListener("click",t.cellClickHandler),n.displayDate&&this.dateUtil.isSameDay(e,n.displayDate)&&(this.focusAfterAppend=o)}else o.classList.add("md-calendar-date-disabled"),o.textContent=i}return o},n.prototype.isDateEnabled=function(e){return this.dateUtil.isDateWithinRange(e,this.calendarCtrl.minDate,this.calendarCtrl.maxDate)&&(!t.isFunction(this.calendarCtrl.dateFilter)||this.calendarCtrl.dateFilter(e))},n.prototype.buildDateRow=function(e){var t=document.createElement("tr");return t.setAttribute("role","row"),t.setAttribute("aria-label",this.dateLocale.weekNumberFormatter(e)),t},n.prototype.buildCalendarForMonth=function(e){var t=this.dateUtil.isValidDate(e)?e:new Date,n=this.dateUtil.getFirstDateOfMonth(t),o=this.getLocaleDay_(n),i=this.dateUtil.getNumberOfDaysInMonth(t),r=document.createDocumentFragment(),a=1,d=this.buildDateRow(a);r.appendChild(d);var s=this.offset===this.monthCtrl.items.length-1,c=0,l=document.createElement("td"),m=document.createElement("span"),u=this.calendarCtrl;if(m.textContent=this.dateLocale.monthHeaderFormatter(t),l.appendChild(m),l.classList.add("md-calendar-month-label"),u.maxDate&&n>u.maxDate?l.classList.add("md-calendar-month-label-disabled"):u.mode||(l.addEventListener("click",this.monthCtrl.headerClickHandler),l.setAttribute("data-timestamp",n.getTime()),l.setAttribute("aria-label",this.dateLocale.monthFormatter(t)),l.classList.add("md-calendar-label-clickable"),l.appendChild(this.arrowIcon.cloneNode(!0))),o<=2){l.setAttribute("colspan","7");var p=this.buildDateRow();if(p.appendChild(l),r.insertBefore(p,d),s)return r}else c=3,l.setAttribute("colspan","3"),d.appendChild(l);for(var h=c;h<o;h++)d.appendChild(this.buildDateCell());for(var f=o,g=n,b=1;b<=i;b++){if(7===f){if(s)return r;f=0,a++,d=this.buildDateRow(a),r.appendChild(d)}g.setDate(b);var v=this.buildDateCell(g);d.appendChild(v),f++}for(;d.childNodes.length<7;)d.appendChild(this.buildDateCell());for(;r.childNodes.length<6;){for(var E=this.buildDateRow(),$=0;$<7;$++)E.appendChild(this.buildDateCell());r.appendChild(E)}return r},n.prototype.getLocaleDay_=function(e){return(e.getDay()+(7-this.dateLocale.firstDayOfWeek))%7}}()}(),function(){!function(){function e(){return{template:'<div class="md-calendar-scroll-mask"><md-virtual-repeat-container class="md-calendar-scroll-container"><table role="grid" tabindex="0" class="md-calendar" aria-readonly="true"><tbody md-calendar-year-body role="rowgroup" md-virtual-repeat="i in yearCtrl.items" md-year-offset="$index" class="md-calendar-year" md-start-index="yearCtrl.getFocusedYearIndex()" md-item-size="'+o+'"><tr aria-hidden="true" md-force-height="\''+o+"px'\"></tr></tbody></table></md-virtual-repeat-container></div>",require:["^^mdCalendar","mdCalendarYear"],controller:n,controllerAs:"yearCtrl",bindToController:!0,link:function(e,t,n,o){var i=o[0],r=o[1];r.initialize(i)}}}function n(e,t,n,o,i,r){this.$element=e,this.$scope=t,this.$animate=n,this.$q=o,this.dateUtil=i,this.calendarScroller=e[0].querySelector(".md-virtual-repeat-scroller"),this.isInitialized=!1,this.isMonthTransitionInProgress=!1,this.$mdUtil=r;var a=this;this.cellClickHandler=function(){a.onTimestampSelected(i.getTimestampFromNode(this))}}n.$inject=["$element","$scope","$animate","$q","$$mdDateUtil","$mdUtil"],t.module("material.components.datepicker").directive("mdCalendarYear",e);var o=88;n.prototype.initialize=function(e){this.items={length:this.dateUtil.getYearDistance(e.firstRenderableDate,e.lastRenderableDate)+1},this.calendarCtrl=e,this.attachScopeListeners(),e.updateVirtualRepeat(),e.ngModelCtrl&&e.ngModelCtrl.$render()},n.prototype.getFocusedYearIndex=function(){var e=this.calendarCtrl;return this.dateUtil.getYearDistance(e.firstRenderableDate,e.displayDate||e.selectedDate||e.today)},n.prototype.changeDate=function(e){if(!this.isInitialized)return this.calendarCtrl.hideVerticalScrollbar(this),this.isInitialized=!0,this.$q.when();if(this.dateUtil.isValidDate(e)&&!this.isMonthTransitionInProgress){var t=this,n=this.animateDateChange(e);return t.isMonthTransitionInProgress=!0,t.calendarCtrl.displayDate=e,n.then(function(){t.isMonthTransitionInProgress=!1})}},n.prototype.animateDateChange=function(e){if(this.dateUtil.isValidDate(e)){var t=this.dateUtil.getYearDistance(this.calendarCtrl.firstRenderableDate,e);this.calendarScroller.scrollTop=t*o}return this.$q.when()},n.prototype.handleKeyEvent=function(e,t){var n=this,o=n.calendarCtrl,i=o.displayDate;if("select"===t)n.changeDate(i).then(function(){n.onTimestampSelected(i)});else{var r=null,a=n.dateUtil;switch(t){case"move-right":r=a.incrementMonths(i,1);break;case"move-left":r=a.incrementMonths(i,-1);break;case"move-row-down":r=a.incrementMonths(i,6);break;case"move-row-up":r=a.incrementMonths(i,-6)}if(r){var d=o.minDate?a.getFirstDateOfMonth(o.minDate):null,s=o.maxDate?a.getFirstDateOfMonth(o.maxDate):null;r=a.getFirstDateOfMonth(n.dateUtil.clampDate(r,d,s)),n.changeDate(r).then(function(){o.focus(r)})}}},n.prototype.attachScopeListeners=function(){var e=this;e.$scope.$on("md-calendar-parent-changed",function(t,n){e.calendarCtrl.changeSelectedDate(n?e.dateUtil.getFirstDateOfMonth(n):n),e.changeDate(n)}),e.$scope.$on("md-calendar-parent-action",t.bind(e,e.handleKeyEvent))},n.prototype.onTimestampSelected=function(e){var t=this.calendarCtrl;t.mode?this.$mdUtil.nextTick(function(){t.setNgModelValue(e)}):t.setCurrentView("month",e)}}()}(),function(){!function(){function e(){return{require:["^^mdCalendar","^^mdCalendarYear","mdCalendarYearBody"],scope:{offset:"=mdYearOffset"},controller:n,controllerAs:"mdYearBodyCtrl",bindToController:!0,link:function(e,n,o,i){var r=i[0],a=i[1],d=i[2];d.calendarCtrl=r,d.yearCtrl=a,e.$watch(function(){return d.offset},function(e){t.isNumber(e)&&d.generateContent()})}}}function n(e,t,n){this.$element=e,this.dateUtil=t,this.dateLocale=n,this.calendarCtrl=null,this.yearCtrl=null,this.offset=null,this.focusAfterAppend=null}n.$inject=["$element","$$mdDateUtil","$mdDateLocale"],t.module("material.components.datepicker").directive("mdCalendarYearBody",e),n.prototype.generateContent=function(){var e=this.dateUtil.incrementYears(this.calendarCtrl.firstRenderableDate,this.offset);this.$element.empty().append(this.buildCalendarForYear(e)),this.focusAfterAppend&&(this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS),this.focusAfterAppend.focus(),this.focusAfterAppend=null)},n.prototype.buildMonthCell=function(e,t){var n=this.calendarCtrl,o=this.yearCtrl,i=this.buildBlankCell(),r=new Date(e,t,1);i.setAttribute("aria-label",this.dateLocale.monthFormatter(r)),i.id=n.getDateId(r,"year"),i.setAttribute("data-timestamp",r.getTime()),this.dateUtil.isSameMonthAndYear(r,n.today)&&i.classList.add(n.TODAY_CLASS),this.dateUtil.isValidDate(n.selectedDate)&&this.dateUtil.isSameMonthAndYear(r,n.selectedDate)&&(i.classList.add(n.SELECTED_DATE_CLASS),i.setAttribute("aria-selected","true"));var a=this.dateLocale.shortMonths[t];if(this.dateUtil.isMonthWithinRange(r,n.minDate,n.maxDate)){var d=document.createElement("span");d.classList.add("md-calendar-date-selection-indicator"),d.textContent=a,i.appendChild(d),i.addEventListener("click",o.cellClickHandler),n.displayDate&&this.dateUtil.isSameMonthAndYear(r,n.displayDate)&&(this.focusAfterAppend=i)}else i.classList.add("md-calendar-date-disabled"),i.textContent=a;return i},n.prototype.buildBlankCell=function(){var e=document.createElement("td");return e.tabIndex=-1,e.classList.add("md-calendar-date"),e.setAttribute("role","gridcell"),e.setAttribute("tabindex","-1"),e},n.prototype.buildCalendarForYear=function(e){var t,n=e.getFullYear(),o=document.createDocumentFragment(),i=document.createElement("tr"),r=document.createElement("td");for(r.className="md-calendar-month-label",r.textContent=n,i.appendChild(r),t=0;t<6;t++)i.appendChild(this.buildMonthCell(n,t));o.appendChild(i);var a=document.createElement("tr");for(a.appendChild(this.buildBlankCell()),t=6;t<12;t++)a.appendChild(this.buildMonthCell(n,t));return o.appendChild(a),o}}()}(),function(){!function(){t.module("material.components.datepicker").config(["$provide",function(e){function t(){this.months=null,this.shortMonths=null,this.days=null,this.shortDays=null,this.dates=null,this.firstDayOfWeek=0,this.formatDate=null,this.parseDate=null,this.monthHeaderFormatter=null,this.weekNumberFormatter=null,this.longDateFormatter=null,this.msgCalendar="",this.msgOpenCalendar=""}t.prototype.$get=function(e,t){function n(e,n){if(!e)return"";var o=e.toLocaleTimeString(),i=e;return 0!==e.getHours()||o.indexOf("11:")===-1&&o.indexOf("23:")===-1||(i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),1,0,0)),t("date")(i,"M/d/yyyy",n)}function o(e){return new Date(e)}function i(e){e=e.trim();var t=/^(([a-zA-Z]{3,}|[0-9]{1,4})([ .,]+|[\/-])){2}([a-zA-Z]{3,}|[0-9]{1,4})$/;return t.test(e)}function r(e){return g.shortMonths[e.getMonth()]+" "+e.getFullYear()}function a(e){return g.months[e.getMonth()]+" "+e.getFullYear()}function d(e){return"Week "+e}function s(e){return[g.days[e.getDay()],g.months[e.getMonth()],g.dates[e.getDate()],e.getFullYear()].join(" ")}for(var c=e.DATETIME_FORMATS.SHORTDAY.map(function(e){return e.substring(0,1)}),l=Array(32),m=1;m<=31;m++)l[m]=m;var u="Calendar",p="Open calendar",h=new Date(1880,0,1),f=new Date(h.getFullYear()+250,0,1),g={months:this.months||e.DATETIME_FORMATS.MONTH,shortMonths:this.shortMonths||e.DATETIME_FORMATS.SHORTMONTH,days:this.days||e.DATETIME_FORMATS.DAY,shortDays:this.shortDays||c,dates:this.dates||l,firstDayOfWeek:this.firstDayOfWeek||0,formatDate:this.formatDate||n,parseDate:this.parseDate||o,isDateComplete:this.isDateComplete||i,monthHeaderFormatter:this.monthHeaderFormatter||r,monthFormatter:this.monthFormatter||a,weekNumberFormatter:this.weekNumberFormatter||d,longDateFormatter:this.longDateFormatter||s,msgCalendar:this.msgCalendar||u,msgOpenCalendar:this.msgOpenCalendar||p,firstRenderableDate:this.firstRenderableDate||h,lastRenderableDate:this.lastRenderableDate||f};return g},t.prototype.$get.$inject=["$locale","$filter"],e.provider("$mdDateLocale",new t)}])}()}(),function(){!function(){t.module("material.components.datepicker").factory("$$mdDateUtil",function(){function e(e){return new Date(e.getFullYear(),e.getMonth(),1)}function n(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function o(e){return new Date(e.getFullYear(),e.getMonth()+1,1)}function i(e){return new Date(e.getFullYear(),e.getMonth()-1,1)}function r(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function a(e,t){return e.getDate()==t.getDate()&&r(e,t)}function d(e,t){var n=o(e);return r(n,t)}function s(e,t){var n=i(e);return r(t,n)}function c(e,t){return b((e.getTime()+t.getTime())/2)}function l(t){var n=e(t);return Math.floor((n.getDay()+t.getDate()-1)/7)}function m(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)}function u(e,t){var o=new Date(e.getFullYear(),e.getMonth()+t,1),i=n(o);return i<e.getDate()?o.setDate(i):o.setDate(e.getDate()),o}function p(e,t){return 12*(t.getFullYear()-e.getFullYear())+(t.getMonth()-e.getMonth())}function h(e){return new Date(e.getFullYear(),e.getMonth(),n(e))}function f(e){return e&&e.getTime&&!isNaN(e.getTime())}function g(e){f(e)&&e.setHours(0,0,0,0)}function b(e){var n;return n=t.isUndefined(e)?new Date:new Date(e),g(n),n}function v(e,t,n){var o=b(e),i=f(t)?b(t):null,r=f(n)?b(n):null;return(!i||i<=o)&&(!r||r>=o)}function E(e,t){return u(e,12*t)}function $(e,t){return t.getFullYear()-e.getFullYear()}function y(e,t,n){var o=e;return t&&e<t&&(o=new Date(t.getTime())),n&&e>n&&(o=new Date(n.getTime())),o}function C(e){if(e&&e.hasAttribute("data-timestamp"))return Number(e.getAttribute("data-timestamp"))}function M(e,t,n){var o=e.getMonth(),i=e.getFullYear();return(!t||t.getFullYear()<i||t.getMonth()<=o)&&(!n||n.getFullYear()>i||n.getMonth()>=o)}return{getFirstDateOfMonth:e,getNumberOfDaysInMonth:n,getDateInNextMonth:o,getDateInPreviousMonth:i,isInNextMonth:d,isInPreviousMonth:s,getDateMidpoint:c,isSameMonthAndYear:r,getWeekOfMonth:l,incrementDays:m,incrementMonths:u,getLastDateOfMonth:h,isSameDay:a,getMonthDistance:p,isValidDate:f,setDateTimeToMidnight:g,createDateAtMidnight:b,isDateWithinRange:v,incrementYears:E,getYearDistance:$,clampDate:y,getTimestampFromNode:C,isMonthWithinRange:M}})}()}(),function(){!function(){function n(e,n,i,r){return{template:function(t,n){var o=n.mdHideIcons,i=n.ariaLabel||n.mdPlaceholder,r="all"===o||"calendar"===o?"":'<md-button class="md-datepicker-button md-icon-button" type="button" tabindex="-1" aria-hidden="true" ng-click="ctrl.openCalendarPane($event)"><md-icon class="md-datepicker-calendar-icon" aria-label="md-calendar" md-svg-src="'+e.mdCalendar+'"></md-icon></md-button>',a="";return"all"!==o&&"triangle"!==o&&(a='<md-button type="button" md-no-ink class="md-datepicker-triangle-button md-icon-button" ng-click="ctrl.openCalendarPane($event)" aria-label="{{::ctrl.locale.msgOpenCalendar}}"><div class="md-datepicker-expand-triangle"></div></md-button>',t.addClass(c)),r+'<div class="md-datepicker-input-container" ng-class="{\'md-datepicker-focused\': ctrl.isFocused}"><input '+(i?'aria-label="'+i+'" ':"")+'class="md-datepicker-input" aria-haspopup="true" aria-expanded="{{ctrl.isCalendarOpen}}" ng-focus="ctrl.setFocused(true)" ng-blur="ctrl.setFocused(false)"> '+a+'</div><div class="md-datepicker-calendar-pane md-whiteframe-z1" id="{{::ctrl.calendarPaneId}}"><div class="md-datepicker-input-mask"><div class="md-datepicker-input-mask-opaque"></div></div><div class="md-datepicker-calendar"><md-calendar role="dialog" aria-label="{{::ctrl.locale.msgCalendar}}" md-current-view="{{::ctrl.currentView}}"md-mode="{{::ctrl.mode}}"md-min-date="ctrl.minDate"md-max-date="ctrl.maxDate"md-date-filter="ctrl.dateFilter"ng-model="ctrl.date" ng-if="ctrl.isCalendarOpen"></md-calendar></div></div>'},require:["ngModel","mdDatepicker","?^mdInputContainer","?^form"],scope:{minDate:"=mdMinDate",maxDate:"=mdMaxDate",placeholder:"@mdPlaceholder",currentView:"@mdCurrentView",mode:"@mdMode",dateFilter:"=mdDateFilter",isOpen:"=?mdIsOpen",debounceInterval:"=mdDebounceInterval",dateLocale:"=mdDateLocale"},controller:o,controllerAs:"ctrl",bindToController:!0,link:function(e,o,a,c){var l=c[0],m=c[1],u=c[2],p=c[3],h=n.parseAttributeBoolean(a.mdNoAsterisk);if(m.configureNgModel(l,u,r),u){var f=o[0].querySelector(".md-errors-spacer");f&&o.after(t.element("<div>").append(f)),u.setHasPlaceholder(a.mdPlaceholder),u.input=o,u.element.addClass(d).toggleClass(s,"calendar"!==a.mdHideIcons&&"all"!==a.mdHideIcons),u.label?h||a.$observe("required",function(e){u.label.toggleClass("md-required",!!e)}):i.expect(o,"aria-label",a.mdPlaceholder),e.$watch(u.isErrorGetter||function(){return l.$invalid&&(l.$touched||p&&p.$submitted)},u.setInvalid)}else if(p)var g=e.$watch(function(){return p.$submitted},function(e){e&&(m.updateErrorState(),g())})}}}function o(n,o,i,r,a,d,s,c,l,m,u){this.$window=r,this.dateUtil=l,this.$mdConstant=a,this.$mdUtil=s,this.$$rAF=m,this.$mdDateLocale=c,this.documentElement=t.element(document.documentElement),this.ngModelCtrl=null,this.inputElement=o[0].querySelector("input"),this.ngInputElement=t.element(this.inputElement),this.inputContainer=o[0].querySelector(".md-datepicker-input-container"),this.calendarPane=o[0].querySelector(".md-datepicker-calendar-pane"),this.calendarButton=o[0].querySelector(".md-datepicker-button"),this.inputMask=t.element(o[0].querySelector(".md-datepicker-input-mask-opaque")),this.$element=o,this.$attrs=i,this.$scope=n,this.date=null,this.isFocused=!1,this.isDisabled,this.setDisabled(o[0].disabled||t.isString(i.disabled)),this.isCalendarOpen=!1,this.openOnFocus=i.hasOwnProperty("mdOpenOnFocus"),this.mdInputContainer=null,this.calendarPaneOpenedFrom=null,this.calendarPaneId="md-date-pane-"+s.nextUid(),this.bodyClickHandler=t.bind(this,this.handleBodyClick),this.windowEventName=p.test(navigator.userAgent||navigator.vendor||e.opera)?"orientationchange":"resize",this.windowEventHandler=s.debounce(t.bind(this,this.closeCalendarPane),100),this.windowBlurHandler=t.bind(this,this.handleWindowBlur),this.ngDateFilter=u("date"),this.leftMargin=20,this.topMargin=null,i.tabindex?(this.ngInputElement.attr("tabindex",i.tabindex),i.$set("tabindex",null)):i.$set("tabindex","-1"),i.$set("aria-owns",this.calendarPaneId),d(o),d(t.element(this.calendarPane));var h=this;n.$on("$destroy",function(){h.detachCalendarPane()}),i.mdIsOpen&&n.$watch("ctrl.isOpen",function(e){e?h.openCalendarPane({target:h.inputElement}):h.closeCalendarPane()}),1===t.version.major&&t.version.minor<=4&&this.$onInit()}o.$inject=["$scope","$element","$attrs","$window","$mdConstant","$mdTheming","$mdUtil","$mdDateLocale","$$mdDateUtil","$$rAF","$filter"],n.$inject=["$$mdSvgRegistry","$mdUtil","$mdAria","inputDirective"],t.module("material.components.datepicker").directive("mdDatepicker",n);var i=3,r="md-datepicker-invalid",a="md-datepicker-open",d="_md-datepicker-floating-label",s="_md-datepicker-has-calendar-icon",c="_md-datepicker-has-triangle-icon",l=500,m=368,u=360,p=/ipad|iphone|ipod|android/i;o.prototype.$onInit=function(){this.locale=this.dateLocale?t.extend({},this.$mdDateLocale,this.dateLocale):this.$mdDateLocale,this.installPropertyInterceptors(),this.attachChangeListeners(),this.attachInteractionListeners()},o.prototype.configureNgModel=function(e,n,o){this.ngModelCtrl=e,this.mdInputContainer=n,this.$attrs.$set("type","date"),o[0].link.pre(this.$scope,{on:t.noop,val:t.noop,0:{}},this.$attrs,[e]);var i=this;i.ngModelCtrl.$formatters.push(function(e){var n=t.isDefined(e)?e:null;if(!(e instanceof Date)&&(n=Date.parse(e),!isNaN(n)&&t.isNumber(n)&&(e=new Date(n)),e&&!(e instanceof Date)))throw Error("The ng-model for md-datepicker must be a Date instance or a value that can be parsed into a date. Currently the model is of type: "+typeof e);return i.onExternalChange(e),e}),e.$viewChangeListeners.unshift(t.bind(this,this.updateErrorState));var r=i.$mdUtil.getModelOption(e,"updateOn");r&&this.ngInputElement.on(r,t.bind(this.$element,this.$element.triggerHandler,r))},o.prototype.attachChangeListeners=function(){var e=this;e.$scope.$on("md-calendar-change",function(t,n){e.setModelValue(n),e.onExternalChange(n),e.closeCalendarPane()}),e.ngInputElement.on("input",t.bind(e,e.resizeInputElement));var n=t.isDefined(this.debounceInterval)?this.debounceInterval:l;e.ngInputElement.on("input",e.$mdUtil.debounce(e.handleInputEvent,n,e))},o.prototype.attachInteractionListeners=function(){var e=this,n=this.$scope,o=this.$mdConstant.KEY_CODE;e.ngInputElement.on("keydown",function(t){t.altKey&&t.keyCode==o.DOWN_ARROW&&(e.openCalendarPane(t),n.$digest())}),e.openOnFocus&&(e.ngInputElement.on("focus",t.bind(e,e.openCalendarPane)),t.element(e.$window).on("blur",e.windowBlurHandler),n.$on("$destroy",function(){t.element(e.$window).off("blur",e.windowBlurHandler)})),n.$on("md-calendar-close",function(){e.closeCalendarPane()})},o.prototype.installPropertyInterceptors=function(){var e=this;if(this.$attrs.ngDisabled){var t=this.$scope.$parent;t&&t.$watch(this.$attrs.ngDisabled,function(t){e.setDisabled(t)})}Object.defineProperty(this,"placeholder",{get:function(){return e.inputElement.placeholder},set:function(t){e.inputElement.placeholder=t||""}})},o.prototype.setDisabled=function(e){this.isDisabled=e,this.inputElement.disabled=e,this.calendarButton&&(this.calendarButton.disabled=e)},o.prototype.updateErrorState=function(e){var n=e||this.date;if(this.clearErrorState(),this.dateUtil.isValidDate(n)){if(n=this.dateUtil.createDateAtMidnight(n),this.dateUtil.isValidDate(this.minDate)){var o=this.dateUtil.createDateAtMidnight(this.minDate);this.ngModelCtrl.$setValidity("mindate",n>=o)}if(this.dateUtil.isValidDate(this.maxDate)){var i=this.dateUtil.createDateAtMidnight(this.maxDate);this.ngModelCtrl.$setValidity("maxdate",n<=i)}t.isFunction(this.dateFilter)&&this.ngModelCtrl.$setValidity("filtered",this.dateFilter(n))}else this.ngModelCtrl.$setValidity("valid",null==n);t.element(this.inputContainer).toggleClass(r,!this.ngModelCtrl.$valid)},o.prototype.clearErrorState=function(){this.inputContainer.classList.remove(r),["mindate","maxdate","filtered","valid"].forEach(function(e){this.ngModelCtrl.$setValidity(e,!0)},this)},o.prototype.resizeInputElement=function(){this.inputElement.size=this.inputElement.value.length+i},o.prototype.handleInputEvent=function(){var e=this.inputElement.value,t=e?this.locale.parseDate(e):null;this.dateUtil.setDateTimeToMidnight(t);var n=""==e||this.dateUtil.isValidDate(t)&&this.locale.isDateComplete(e)&&this.isDateEnabled(t);n&&(this.setModelValue(t),this.date=t),this.updateErrorState(t)},o.prototype.isDateEnabled=function(e){return this.dateUtil.isDateWithinRange(e,this.minDate,this.maxDate)&&(!t.isFunction(this.dateFilter)||this.dateFilter(e))},o.prototype.attachCalendarPane=function(){var e=this.calendarPane,n=document.body;e.style.transform="",this.$element.addClass(a),this.mdInputContainer&&this.mdInputContainer.element.addClass(a),t.element(n).addClass("md-datepicker-is-showing");var o=this.inputContainer.getBoundingClientRect(),i=n.getBoundingClientRect();(!this.topMargin||this.topMargin<0)&&(this.topMargin=(this.inputMask.parent().prop("clientHeight")-this.ngInputElement.prop("clientHeight"))/2);var r=o.top-i.top-this.topMargin,d=o.left-i.left-this.leftMargin,s=i.top<0&&0==document.body.scrollTop?-i.top:document.body.scrollTop,c=i.left<0&&0==document.body.scrollLeft?-i.left:document.body.scrollLeft,l=s+this.$window.innerHeight,p=c+this.$window.innerWidth;
if(this.inputMask.css({position:"absolute",left:this.leftMargin+"px",top:this.topMargin+"px",width:o.width-1+"px",height:o.height-2+"px"}),d+u>p){if(p-u>0)d=p-u;else{d=c;var h=this.$window.innerWidth/u;e.style.transform="scale("+h+")"}e.classList.add("md-datepicker-pos-adjusted")}r+m>l&&l-m>s&&(r=l-m,e.classList.add("md-datepicker-pos-adjusted")),e.style.left=d+"px",e.style.top=r+"px",document.body.appendChild(e),this.$$rAF(function(){e.classList.add("md-pane-open")})},o.prototype.detachCalendarPane=function(){this.$element.removeClass(a),this.mdInputContainer&&this.mdInputContainer.element.removeClass(a),t.element(document.body).removeClass("md-datepicker-is-showing"),this.calendarPane.classList.remove("md-pane-open"),this.calendarPane.classList.remove("md-datepicker-pos-adjusted"),this.isCalendarOpen&&this.$mdUtil.enableScrolling(),this.calendarPane.parentNode&&this.calendarPane.parentNode.removeChild(this.calendarPane)},o.prototype.openCalendarPane=function(t){if(!this.isCalendarOpen&&!this.isDisabled&&!this.inputFocusedOnWindowBlur){this.isCalendarOpen=this.isOpen=!0,this.calendarPaneOpenedFrom=t.target,this.$mdUtil.disableScrollAround(this.calendarPane),this.attachCalendarPane(),this.focusCalendar(),this.evalAttr("ngFocus");var n=this;this.$mdUtil.nextTick(function(){n.documentElement.on("click touchstart",n.bodyClickHandler)},!1),e.addEventListener(this.windowEventName,this.windowEventHandler)}},o.prototype.closeCalendarPane=function(){function t(){n.isCalendarOpen=n.isOpen=!1}if(this.isCalendarOpen){var n=this;n.detachCalendarPane(),n.ngModelCtrl.$setTouched(),n.evalAttr("ngBlur"),n.documentElement.off("click touchstart",n.bodyClickHandler),e.removeEventListener(n.windowEventName,n.windowEventHandler),n.calendarPaneOpenedFrom.focus(),n.calendarPaneOpenedFrom=null,n.openOnFocus?n.$mdUtil.nextTick(t):t()}},o.prototype.getCalendarCtrl=function(){return t.element(this.calendarPane.querySelector("md-calendar")).controller("mdCalendar")},o.prototype.focusCalendar=function(){var e=this;this.$mdUtil.nextTick(function(){e.getCalendarCtrl().focus()},!1)},o.prototype.setFocused=function(e){e||this.ngModelCtrl.$setTouched(),this.openOnFocus||this.evalAttr(e?"ngFocus":"ngBlur"),this.isFocused=e},o.prototype.handleBodyClick=function(e){if(this.isCalendarOpen){var t=this.$mdUtil.getClosest(e.target,"md-calendar");t||this.closeCalendarPane(),this.$scope.$digest()}},o.prototype.handleWindowBlur=function(){this.inputFocusedOnWindowBlur=document.activeElement===this.inputElement},o.prototype.evalAttr=function(e){this.$attrs[e]&&this.$scope.$parent.$eval(this.$attrs[e])},o.prototype.setModelValue=function(e){var t=this.$mdUtil.getModelOption(this.ngModelCtrl,"timezone");this.ngModelCtrl.$setViewValue(this.ngDateFilter(e,"yyyy-MM-dd",t))},o.prototype.onExternalChange=function(e){var t=this.$mdUtil.getModelOption(this.ngModelCtrl,"timezone");this.date=e,this.inputElement.value=this.locale.formatDate(e,t),this.mdInputContainer&&this.mdInputContainer.setHasValue(!!e),this.resizeInputElement(),this.updateErrorState()}}()}(),function(){function e(e,t,n,o){function i(o,i,r){function a(){r.mdSvgIcon||r.mdSvgSrc||(r.mdFontIcon&&i.addClass("md-font "+r.mdFontIcon),i.addClass(c))}function d(){if(!r.mdSvgIcon&&!r.mdSvgSrc){r.mdFontIcon&&(i.removeClass(s),i.addClass(r.mdFontIcon),s=r.mdFontIcon);var t=e.fontSet(r.mdFontSet);c!==t&&(i.removeClass(c),i.addClass(t),c=t)}}t(i);var s=r.mdFontIcon,c=e.fontSet(r.mdFontSet);a(),r.$observe("mdFontIcon",d),r.$observe("mdFontSet",d);var l=(i[0].getAttribute(r.$attr.mdSvgSrc),r.$normalize(r.$attr.mdSvgIcon||r.$attr.mdSvgSrc||""));if(r.role||(n.expect(i,"role","img"),r.role="img"),"img"===r.role&&!r.ariaHidden&&!n.hasAriaLabel(i)){var m;r.alt?n.expect(i,"aria-label",r.alt):n.parentHasAriaLabel(i,2)?n.expect(i,"aria-hidden","true"):(m=r.mdFontIcon||r.mdSvgIcon||i.text())?n.expect(i,"aria-label",m):n.expect(i,"aria-hidden","true")}l&&r.$observe(l,function(t){i.empty(),t&&e(t).then(function(e){i.empty(),i.append(e)})})}return{restrict:"E",link:i}}t.module("material.components.icon").directive("mdIcon",["$mdIcon","$mdTheming","$mdAria","$sce",e])}(),function(){function n(){}function o(e,t){this.url=e,this.viewBoxSize=t||r.defaultViewBoxSize}function i(n,o,i,r,a,d){function s(e){if(e=e||"",t.isString(e)||(e=d.getTrustedUrl(e)),E[e])return i.when(l(E[e]));if(y.test(e)||C.test(e))return h(e).then(m(e));e.indexOf(":")==-1&&(e="$default:"+e);var o=n[e]?u:p;return o(e).then(m(e))}function c(e){var o=t.isUndefined(e)||!(e&&e.length);if(o)return n.defaultFontSet;var i=e;return t.forEach(n.fontSets,function(t){t.alias==e&&(i=t.fontSet||i)}),i}function l(e){var n=e.clone(),o="_cache"+a.nextUid();return n.id&&(n.id+=o),t.forEach(n.querySelectorAll("[id]"),function(e){e.id+=o}),n}function m(e){return function(t){return E[e]=f(t)?t:new g(t,n[e]),E[e].clone()}}function u(e){var t=n[e];return h(t.url).then(function(e){return new g(e,t)})}function p(e){function t(t){var n=e.slice(e.lastIndexOf(":")+1),i=t.querySelector("#"+n);return i?new g(i,d):o(e)}function o(e){var t="icon "+e+" not found";return r.warn(t),i.reject(t||e)}var a=e.substring(0,e.lastIndexOf(":"))||"$default",d=n[a];return d?h(d.url).then(t):o(e)}function h(n){function a(n){var o=C.exec(n),r=/base64/i.test(n),a=r?e.atob(o[2]):o[2];return i.when(t.element(a)[0])}function d(e){return i(function(n,i){var a=function(e){var n=t.isString(e)?e:e.message||e.data||e.statusText;r.warn(n),i(e)},d=function(o){$[e]||($[e]=t.element("<div>").append(o)[0].querySelector("svg")),n($[e])};o(e,!0).then(d,a)})}return C.test(n)?a(n):d(n)}function f(e){return t.isDefined(e.element)&&t.isDefined(e.config)}function g(e,n){e&&"svg"!=e.tagName&&(e=t.element('<svg xmlns="http://www.w3.org/2000/svg">').append(e.cloneNode(!0))[0]),e.getAttribute("xmlns")||e.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.element=e,this.config=n,this.prepare()}function b(){var e=this.config?this.config.viewBoxSize:n.defaultViewBoxSize;t.forEach({fit:"",height:"100%",width:"100%",preserveAspectRatio:"xMidYMid meet",viewBox:this.element.getAttribute("viewBox")||"0 0 "+e+" "+e,focusable:!1},function(e,t){this.element.setAttribute(t,e)},this)}function v(){return this.element.cloneNode(!0)}var E={},$={},y=/[-\w@:%+.~#?&\/\/=]{2,}\.[a-z]{2,4}\b(\/[-\w@:%+.~#?&\/\/=]*)?/i,C=/^data:image\/svg\+xml[\s*;\w\-=]*?(base64)?,(.*)$/i;return g.prototype={clone:v,prepare:b},s.fontSet=c,s}i.$inject=["config","$templateRequest","$q","$log","$mdUtil","$sce"],t.module("material.components.icon").constant("$$mdSvgRegistry",{mdTabsArrow:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4=",mdClose:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik0xOSA2LjQxbC0xLjQxLTEuNDEtNS41OSA1LjU5LTUuNTktNS41OS0xLjQxIDEuNDEgNS41OSA1LjU5LTUuNTkgNS41OSAxLjQxIDEuNDEgNS41OS01LjU5IDUuNTkgNS41OSAxLjQxLTEuNDEtNS41OS01LjU5eiIvPjwvZz48L3N2Zz4=",mdCancel:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik0xMiAyYy01LjUzIDAtMTAgNC40Ny0xMCAxMHM0LjQ3IDEwIDEwIDEwIDEwLTQuNDcgMTAtMTAtNC40Ny0xMC0xMC0xMHptNSAxMy41OWwtMS40MSAxLjQxLTMuNTktMy41OS0zLjU5IDMuNTktMS40MS0xLjQxIDMuNTktMy41OS0zLjU5LTMuNTkgMS40MS0xLjQxIDMuNTkgMy41OSAzLjU5LTMuNTkgMS40MSAxLjQxLTMuNTkgMy41OSAzLjU5IDMuNTl6Ii8+PC9nPjwvc3ZnPg==",mdMenu:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0zLDZIMjFWOEgzVjZNMywxMUgyMVYxM0gzVjExTTMsMTZIMjFWMThIM1YxNloiIC8+PC9zdmc+",mdToggleArrow:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDggNDgiPjxwYXRoIGQ9Ik0yNCAxNmwtMTIgMTIgMi44MyAyLjgzIDkuMTctOS4xNyA5LjE3IDkuMTcgMi44My0yLjgzeiIvPjxwYXRoIGQ9Ik0wIDBoNDh2NDhoLTQ4eiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==",mdCalendar:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgM2gtMVYxaC0ydjJIOFYxSDZ2Mkg1Yy0xLjExIDAtMS45OS45LTEuOTkgMkwzIDE5YzAgMS4xLjg5IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0yVjVjMC0xLjEtLjktMi0yLTJ6bTAgMTZINVY4aDE0djExek03IDEwaDV2NUg3eiIvPjwvc3ZnPg==",mdChecked:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik05IDE2LjE3TDQuODMgMTJsLTEuNDIgMS40MUw5IDE5IDIxIDdsLTEuNDEtMS40MXoiLz48L2c+PC9zdmc+"}).provider("$mdIcon",n);var r={defaultViewBoxSize:24,defaultFontSet:"material-icons",fontSets:[]};n.prototype={icon:function(e,t,n){return e.indexOf(":")==-1&&(e="$default:"+e),r[e]=new o(t,n),this},iconSet:function(e,t,n){return r[e]=new o(t,n),this},defaultIconSet:function(e,t){var n="$default";return r[n]||(r[n]=new o(e,t)),r[n].viewBoxSize=t||r.defaultViewBoxSize,this},defaultViewBoxSize:function(e){return r.defaultViewBoxSize=e,this},fontSet:function(e,t){return r.fontSets.push({alias:e,fontSet:t||e}),this},defaultFontSet:function(e){return r.defaultFontSet=e?e:"",this},defaultIconSize:function(e){return r.defaultIconSize=e,this},$get:["$templateRequest","$q","$log","$mdUtil","$sce",function(e,t,n,o,a){return i(r,e,t,n,o,a)}]}}(),function(){function e(e,o,i,r,a,d,s,c,l){var m,u,p=a.prefixer(),h=this;this.nestLevel=parseInt(o.mdNestLevel,10)||0,this.init=function(n,o){o=o||{},m=n,u=i[0].querySelector(p.buildSelector(["ng-click","ng-mouseenter"])),u.setAttribute("aria-expanded","false"),this.isInMenuBar=o.isInMenuBar,this.nestedMenus=a.nodesToArray(m[0].querySelectorAll(".md-nested-menu")),m.on("$mdInterimElementRemove",function(){h.isOpen=!1,a.nextTick(function(){h.onIsOpenChanged(h.isOpen)})}),a.nextTick(function(){h.onIsOpenChanged(h.isOpen)});var d="menu_container_"+a.nextUid();m.attr("id",d),t.element(u).attr({"aria-owns":d,"aria-haspopup":"true"}),r.$on("$destroy",t.bind(this,function(){this.disableHoverListener(),e.destroy()})),m.on("$destroy",function(){e.destroy()})};var f,g,b=[];this.enableHoverListener=function(){b.push(s.$on("$mdMenuOpen",function(e,t){m[0].contains(t[0])&&(h.currentlyOpenMenu=t.controller("mdMenu"),h.isAlreadyOpening=!1,h.currentlyOpenMenu.registerContainerProxy(h.triggerContainerProxy.bind(h)))})),b.push(s.$on("$mdMenuClose",function(e,t){m[0].contains(t[0])&&(h.currentlyOpenMenu=n)})),g=t.element(a.nodesToArray(m[0].children[0].children)),g.on("mouseenter",h.handleMenuItemHover),g.on("mouseleave",h.handleMenuItemMouseLeave)},this.disableHoverListener=function(){for(;b.length;)b.shift()();g&&g.off("mouseenter",h.handleMenuItemHover),g&&g.off("mouseleave",h.handleMenuItemMouseLeave)},this.handleMenuItemHover=function(e){if(!h.isAlreadyOpening){var n=e.target.querySelector("md-menu")||a.getClosest(e.target,"MD-MENU");f=d(function(){if(n&&(n=t.element(n).controller("mdMenu")),h.currentlyOpenMenu&&h.currentlyOpenMenu!=n){var e=h.nestLevel+1;h.currentlyOpenMenu.close(!0,{closeTo:e}),h.isAlreadyOpening=!!n,n&&n.open()}else n&&!n.isOpen&&n.open&&(h.isAlreadyOpening=!!n,n&&n.open())},n?100:250);var o=e.currentTarget.querySelector(".md-button:not([disabled])");o&&o.focus()}},this.handleMenuItemMouseLeave=function(){f&&(d.cancel(f),f=n)},this.open=function(t){t&&t.stopPropagation(),t&&t.preventDefault(),h.isOpen||(h.enableHoverListener(),h.isOpen=!0,a.nextTick(function(){h.onIsOpenChanged(h.isOpen)}),u=u||(t?t.target:i[0]),u.setAttribute("aria-expanded","true"),r.$emit("$mdMenuOpen",i),e.show({scope:r,mdMenuCtrl:h,nestLevel:h.nestLevel,element:m,target:u,preserveElement:!0,parent:"body"})["finally"](function(){u.setAttribute("aria-expanded","false"),h.disableHoverListener()}))},this.onIsOpenChanged=function(e){e?(m.attr("aria-hidden","false"),i[0].classList.add("md-open"),t.forEach(h.nestedMenus,function(e){e.classList.remove("md-open")})):(m.attr("aria-hidden","true"),i[0].classList.remove("md-open")),r.$mdMenuIsOpen=h.isOpen},this.focusMenuContainer=function(){var e=m[0].querySelector(p.buildSelector(["md-menu-focus-target","md-autofocus"]));e||(e=m[0].querySelector(".md-button:not([disabled])")),e.focus()},this.registerContainerProxy=function(e){this.containerProxy=e},this.triggerContainerProxy=function(e){this.containerProxy&&this.containerProxy(e)},this.destroy=function(){return h.isOpen?e.destroy():c.when(!1)},this.close=function(n,o){if(h.isOpen){h.isOpen=!1,a.nextTick(function(){h.onIsOpenChanged(h.isOpen)});var d=t.extend({},o,{skipFocus:n});if(r.$emit("$mdMenuClose",i,d),e.hide(null,o),!n){var s=h.restoreFocusTo||i.find("button")[0];s instanceof t.element&&(s=s[0]),s&&s.focus()}}},this.positionMode=function(){var e=(o.mdPositionMode||"target").split(" ");return 1==e.length&&e.push(e[0]),{left:e[0],top:e[1]}},this.offsets=function(){var e=(o.mdOffset||"0 0").split(" ").map(parseFloat);if(2==e.length)return{left:e[0],top:e[1]};if(1==e.length)return{top:e[0],left:e[0]};throw Error("Invalid offsets specified. Please follow format <x, y> or <n>")},r.$mdMenu={open:this.open,close:this.close},r.$mdOpenMenu=t.bind(this,function(){return l.warn("mdMenu: The $mdOpenMenu method is deprecated. Please use `$mdMenu.open`."),this.open.apply(this,arguments)})}e.$inject=["$mdMenu","$attrs","$element","$scope","$mdUtil","$timeout","$rootScope","$q","$log"],t.module("material.components.menu").controller("mdMenuCtrl",e)}(),function(){function e(e){function n(n){n.addClass("md-menu");var r=n.children()[0],a=e.prefixer();a.hasAttribute(r,"ng-click")||(r=r.querySelector(a.buildSelector(["ng-click","ng-mouseenter"]))||r);var d="MD-BUTTON"===r.nodeName||"BUTTON"===r.nodeName;if(r&&d&&!r.hasAttribute("type")&&r.setAttribute("type","button"),!r)throw Error(i+"Expected the menu to have a trigger element.");if(2!==n.children().length)throw Error(i+"Expected two children elements. The second element must have a `md-menu-content` element.");r&&r.setAttribute("aria-haspopup","true");var s=n[0].querySelectorAll("md-menu"),c=parseInt(n[0].getAttribute("md-nest-level"),10)||0;return s&&t.forEach(e.nodesToArray(s),function(e){e.hasAttribute("md-position-mode")||e.setAttribute("md-position-mode","cascade"),e.classList.add("_md-nested-menu"),e.setAttribute("md-nest-level",c+1)}),o}function o(e,n,o,i){var r=i[0],a=!!i[1],d=t.element('<div class="_md md-open-menu-container md-whiteframe-z2"></div>'),s=n.children()[1];n.addClass("_md"),s.hasAttribute("role")||s.setAttribute("role","menu"),d.append(s),n.on("$destroy",function(){d.remove()}),n.append(d),d[0].style.display="none",r.init(d,{isInMenuBar:a})}var i="Invalid HTML for md-menu: ";return{restrict:"E",require:["mdMenu","?^mdMenuBar"],controller:"mdMenuCtrl",scope:!0,compile:n}}e.$inject=["$mdUtil"],t.module("material.components.menu").directive("mdMenu",e)}(),function(){function e(e){function o(e,o,a,d,s,c,l,m,u,p){function h(n,o,i){return i.nestLevel?t.noop:(i.disableParentScroll&&!e.getClosest(i.target,"MD-DIALOG")?i.restoreScroll=e.disableScrollAround(i.element,i.parent):i.disableParentScroll=!1,i.hasBackdrop&&(i.backdrop=e.createBackdrop(n,"md-menu-backdrop md-click-catcher"),u.enter(i.backdrop,d[0].body)),function(){i.backdrop&&i.backdrop.remove(),i.disableParentScroll&&i.restoreScroll()})}function f(e,t,n){function o(){return m(t,{addClass:"md-leave"}).start()}function i(){t.removeClass("md-active"),E(t,n),n.alreadyOpen=!1}return n.cleanupInteraction(),n.cleanupBackdrop(),n.cleanupResizing(),n.hideBackdrop(),t.removeClass("md-clickable"),n.$destroy===!0?i():o().then(i)}function g(n,i,r){function d(){return r.parent.append(i),i[0].style.display="",c(function(e){var t=$(i,r);i.removeClass("md-leave"),m(i,{addClass:"md-active",from:C.toCss(t),to:C.toCss({transform:""})}).start().then(e)})}function u(){if(!r.target)throw Error("$mdMenu.show() expected a target to animate from in options.target");t.extend(r,{alreadyOpen:!1,isRemoved:!1,target:t.element(r.target),parent:t.element(r.parent),menuContentEl:t.element(i[0].querySelector("md-menu-content"))})}function f(){var e=function(e,t){return l.throttle(function(){if(!r.isRemoved){var n=$(e,t);e.css(C.toCss(n))}})}(i,r);return s.addEventListener("resize",e),s.addEventListener("orientationchange",e),function(){s.removeEventListener("resize",e),s.removeEventListener("orientationchange",e)}}function g(){return r.backdrop?(r.backdrop.on("click",v),function(){r.backdrop.off("click",v)}):t.noop}function v(e){e.preventDefault(),e.stopPropagation(),n.$apply(function(){r.mdMenuCtrl.close(!0,{closeAll:!0})})}function E(){function o(t){var n;switch(t.keyCode){case a.KEY_CODE.ESCAPE:r.mdMenuCtrl.close(!1,{closeAll:!0}),n=!0;break;case a.KEY_CODE.TAB:r.mdMenuCtrl.close(!1,{closeAll:!0}),n=!1;break;case a.KEY_CODE.UP_ARROW:b(t,r.menuContentEl,r,-1)||r.nestLevel||r.mdMenuCtrl.triggerContainerProxy(t),n=!0;break;case a.KEY_CODE.DOWN_ARROW:b(t,r.menuContentEl,r,1)||r.nestLevel||r.mdMenuCtrl.triggerContainerProxy(t),n=!0;break;case a.KEY_CODE.LEFT_ARROW:r.nestLevel?r.mdMenuCtrl.close():r.mdMenuCtrl.triggerContainerProxy(t),n=!0;break;case a.KEY_CODE.RIGHT_ARROW:var o=e.getClosest(t.target,"MD-MENU");o&&o!=r.parent[0]?t.target.click():r.mdMenuCtrl.triggerContainerProxy(t),n=!0}n&&(t.preventDefault(),t.stopImmediatePropagation())}function i(t){function o(){n.$apply(function(){r.mdMenuCtrl.close(!0,{closeAll:!0})})}function i(e,t){if(!e)return!1;for(var n,o=0;n=t[o];++o)if(y.hasAttribute(e,n))return!0;return!1}var a=t.target;do{if(a==r.menuContentEl[0])return;if((i(a,["ng-click","ng-href","ui-sref"])||"BUTTON"==a.nodeName||"MD-BUTTON"==a.nodeName)&&!i(a,["md-prevent-menu-close"])){var d=e.getClosest(a,"MD-MENU");a.hasAttribute("disabled")||d&&d!=r.parent[0]||o();break}}while(a=a.parentNode)}if(!r.menuContentEl[0])return t.noop;r.menuContentEl.on("keydown",o),r.menuContentEl[0].addEventListener("click",i,!0);var d=r.menuContentEl[0].querySelector(y.buildSelector(["md-menu-focus-target","md-autofocus"]));if(!d)for(var s=r.menuContentEl[0].children.length,c=0;c<s;c++){var l=r.menuContentEl[0].children[c];if(d=l.querySelector(".md-button:not([disabled])"))break;if(l.firstElementChild&&!l.firstElementChild.disabled){d=l.firstElementChild;break}}return d&&d.focus(),function(){r.menuContentEl.off("keydown",o),r.menuContentEl[0].removeEventListener("click",i,!0)}}return u(r),r.menuContentEl[0]?o.inherit(r.menuContentEl,r.target):p.warn("$mdMenu: Menu elements should always contain a `md-menu-content` element,otherwise interactivity features will not work properly.",i),r.cleanupResizing=f(),r.hideBackdrop=h(n,i,r),d().then(function(e){return r.alreadyOpen=!0,r.cleanupInteraction=E(),r.cleanupBackdrop=g(),i.addClass("md-clickable"),e})}function b(t,n,o,i){for(var r,a=e.getClosest(t.target,"MD-MENU-ITEM"),d=e.nodesToArray(n[0].children),s=d.indexOf(a),c=s+i;c>=0&&c<d.length;c+=i){var l=d[c].querySelector(".md-button");if(r=v(l))break}return r}function v(e){if(e&&e.getAttribute("tabindex")!=-1)return e.focus(),d[0].activeElement==e}function E(e,t){t.preserveElement?i(e).style.display="none":i(e).parentNode===i(t.parent)&&i(t.parent).removeChild(i(e))}function $(t,o){function i(e){e.top=Math.max(Math.min(e.top,v.bottom-l.offsetHeight),v.top),e.left=Math.max(Math.min(e.left,v.right-l.offsetWidth),v.left)}function a(){for(var e=0;e<m.children.length;++e)if("none"!=s.getComputedStyle(m.children[e]).display)return m.children[e]}var c,l=t[0],m=t[0].firstElementChild,u=m.getBoundingClientRect(),p=d[0].body,h=p.getBoundingClientRect(),f=s.getComputedStyle(m),g=o.target[0].querySelector(y.buildSelector("md-menu-origin"))||o.target[0],b=g.getBoundingClientRect(),v={left:h.left+r,top:Math.max(h.top,0)+r,bottom:Math.max(h.bottom,Math.max(h.top,0)+h.height)-r,right:h.right-r},E={top:0,left:0,right:0,bottom:0},$={top:0,left:0,right:0,bottom:0},C=o.mdMenuCtrl.positionMode();"target"!=C.top&&"target"!=C.left&&"target-right"!=C.left||(c=a(),c&&(c=c.firstElementChild||c,c=c.querySelector(y.buildSelector("md-menu-align-target"))||c,E=c.getBoundingClientRect(),$={top:parseFloat(l.style.top||0),left:parseFloat(l.style.left||0)}));var M={},T="top ";switch(C.top){case"target":M.top=$.top+b.top-E.top;break;case"cascade":M.top=b.top-parseFloat(f.paddingTop)-g.style.top;break;case"bottom":M.top=b.top+b.height;break;default:throw new Error('Invalid target mode "'+C.top+'" specified for md-menu on Y axis.')}var A="rtl"==e.bidi();switch(C.left){case"target":M.left=$.left+b.left-E.left,T+=A?"right":"left";break;case"target-left":M.left=b.left,T+="left";break;case"target-right":M.left=b.right-u.width+(u.right-E.right),T+="right";break;case"cascade":var w=A?b.left-u.width<v.left:b.right+u.width<v.right;M.left=w?b.right-g.style.left:b.left-g.style.left-u.width,T+=w?"left":"right";break;case"right":A?(M.left=b.right-b.width,T+="left"):(M.left=b.right-u.width,T+="right");break;case"left":A?(M.left=b.right-u.width,T+="right"):(M.left=b.left,T+="left");break;default:throw new Error('Invalid target mode "'+C.left+'" specified for md-menu on X axis.')}var k=o.mdMenuCtrl.offsets();M.top+=k.top,M.left+=k.left,i(M);var _=Math.round(100*Math.min(b.width/l.offsetWidth,1))/100,x=Math.round(100*Math.min(b.height/l.offsetHeight,1))/100;return{top:Math.round(M.top),left:Math.round(M.left),transform:o.alreadyOpen?n:e.supplant("scale({0},{1})",[_,x]),transformOrigin:T}}var y=e.prefixer(),C=e.dom.animator;return{parent:"body",onShow:g,onRemove:f,hasBackdrop:!0,disableParentScroll:!0,skipCompile:!0,preserveScope:!0,multiple:!0,themable:!0}}function i(e){return e instanceof t.element&&(e=e[0]),e}o.$inject=["$mdUtil","$mdTheming","$mdConstant","$document","$window","$q","$$rAF","$animateCss","$animate","$log"];var r=8;return e("$mdMenu").setDefaults({methods:["target"],options:o})}e.$inject=["$$interimElementProvider"],t.module("material.components.menu").provider("$mdMenu",e)}(),function(){function e(e,n,i,r,a,d,s,c){this.$element=i,this.$attrs=r,this.$mdConstant=a,this.$mdUtil=s,this.$document=d,this.$scope=e,this.$rootScope=n,this.$timeout=c;var l=this;t.forEach(o,function(e){l[e]=t.bind(l,l[e])})}e.$inject=["$scope","$rootScope","$element","$attrs","$mdConstant","$document","$mdUtil","$timeout"],t.module("material.components.menuBar").controller("MenuBarController",e);var o=["handleKeyDown","handleMenuHover","scheduleOpenHoveredMenu","cancelScheduledOpen"];e.prototype.init=function(){var e=this.$element,t=this.$mdUtil,o=this.$scope,i=this,r=[];e.on("keydown",this.handleKeyDown),this.parentToolbar=t.getClosest(e,"MD-TOOLBAR"),r.push(this.$rootScope.$on("$mdMenuOpen",function(t,n){i.getMenus().indexOf(n[0])!=-1&&(e[0].classList.add("md-open"),n[0].classList.add("md-open"),i.currentlyOpenMenu=n.controller("mdMenu"),i.currentlyOpenMenu.registerContainerProxy(i.handleKeyDown),i.enableOpenOnHover())})),r.push(this.$rootScope.$on("$mdMenuClose",function(o,r,a){var d=i.getMenus();if(d.indexOf(r[0])!=-1&&(e[0].classList.remove("md-open"),r[0].classList.remove("md-open")),e[0].contains(r[0])){for(var s=r[0];s&&d.indexOf(s)==-1;)s=t.getClosest(s,"MD-MENU",!0);s&&(a.skipFocus||s.querySelector("button:not([disabled])").focus(),i.currentlyOpenMenu=n,i.disableOpenOnHover(),i.setKeyboardMode(!0))}})),o.$on("$destroy",function(){for(i.disableOpenOnHover();r.length;)r.shift()()}),this.setKeyboardMode(!0)},e.prototype.setKeyboardMode=function(e){e?this.$element[0].classList.add("md-keyboard-mode"):this.$element[0].classList.remove("md-keyboard-mode")},e.prototype.enableOpenOnHover=function(){if(!this.openOnHoverEnabled){var e=this;e.openOnHoverEnabled=!0,e.parentToolbar&&(e.parentToolbar.classList.add("md-has-open-menu"),e.$mdUtil.nextTick(function(){t.element(e.parentToolbar).on("click",e.handleParentClick)},!1)),t.element(e.getMenus()).on("mouseenter",e.handleMenuHover)}},e.prototype.handleMenuHover=function(e){this.setKeyboardMode(!1),this.openOnHoverEnabled&&this.scheduleOpenHoveredMenu(e)},e.prototype.disableOpenOnHover=function(){this.openOnHoverEnabled&&(this.openOnHoverEnabled=!1,this.parentToolbar&&(this.parentToolbar.classList.remove("md-has-open-menu"),t.element(this.parentToolbar).off("click",this.handleParentClick)),t.element(this.getMenus()).off("mouseenter",this.handleMenuHover))},e.prototype.scheduleOpenHoveredMenu=function(e){var n=t.element(e.currentTarget),o=n.controller("mdMenu");this.setKeyboardMode(!1),this.scheduleOpenMenu(o)},e.prototype.scheduleOpenMenu=function(e){var t=this,o=this.$timeout;e!=t.currentlyOpenMenu&&(o.cancel(t.pendingMenuOpen),t.pendingMenuOpen=o(function(){t.pendingMenuOpen=n,t.currentlyOpenMenu&&t.currentlyOpenMenu.close(!0,{closeAll:!0}),e.open()},200,!1))},e.prototype.handleKeyDown=function(e){var n=this.$mdConstant.KEY_CODE,o=this.currentlyOpenMenu,i=o&&o.isOpen;this.setKeyboardMode(!0);var r,a,d;switch(e.keyCode){case n.DOWN_ARROW:o?o.focusMenuContainer():this.openFocusedMenu(),r=!0;break;case n.UP_ARROW:o&&o.close(),r=!0;break;case n.LEFT_ARROW:a=this.focusMenu(-1),i&&(d=t.element(a).controller("mdMenu"),this.scheduleOpenMenu(d)),r=!0;break;case n.RIGHT_ARROW:a=this.focusMenu(1),i&&(d=t.element(a).controller("mdMenu"),this.scheduleOpenMenu(d)),r=!0}r&&(e&&e.preventDefault&&e.preventDefault(),e&&e.stopImmediatePropagation&&e.stopImmediatePropagation())},e.prototype.focusMenu=function(e){var t=this.getMenus(),n=this.getFocusedMenuIndex();n==-1&&(n=this.getOpenMenuIndex());var o=!1;if(n==-1?(n=0,o=!0):(e<0&&n>0||e>0&&n<t.length-e)&&(n+=e,o=!0),o)return t[n].querySelector("button").focus(),t[n]},e.prototype.openFocusedMenu=function(){var e=this.getFocusedMenu();e&&t.element(e).controller("mdMenu").open()},e.prototype.getMenus=function(){var e=this.$element;return this.$mdUtil.nodesToArray(e[0].children).filter(function(e){return"MD-MENU"==e.nodeName})},e.prototype.getFocusedMenu=function(){return this.getMenus()[this.getFocusedMenuIndex()]},e.prototype.getFocusedMenuIndex=function(){var e=this.$mdUtil,t=e.getClosest(this.$document[0].activeElement,"MD-MENU");if(!t)return-1;var n=this.getMenus().indexOf(t);return n},e.prototype.getOpenMenuIndex=function(){for(var e=this.getMenus(),t=0;t<e.length;++t)if(e[t].classList.contains("md-open"))return t;return-1},e.prototype.handleParentClick=function(e){var n=this.querySelector("md-menu.md-open");n&&!n.contains(e.target)&&t.element(n).controller("mdMenu").close(!0,{closeAll:!0})}}(),function(){function e(e,n){return{restrict:"E",require:"mdMenuBar",controller:"MenuBarController",compile:function(o,i){return i.ariaRole||o[0].setAttribute("role","menubar"),t.forEach(o[0].children,function(n){if("MD-MENU"==n.nodeName){n.hasAttribute("md-position-mode")||(n.setAttribute("md-position-mode","left bottom"),n.querySelector("button, a, md-button").setAttribute("role","menuitem"));var o=e.nodesToArray(n.querySelectorAll("md-menu-content"));t.forEach(o,function(e){e.classList.add("md-menu-bar-menu"),e.classList.add("md-dense"),e.hasAttribute("width")||e.setAttribute("width",5)})}}),o.find("md-menu-item").addClass("md-in-menu-bar"),function(e,t,o,i){t.addClass("_md"),n(e,t),i.init()}}}}e.$inject=["$mdUtil","$mdTheming"],t.module("material.components.menuBar").directive("mdMenuBar",e)}(),function(){function e(){return{restrict:"E",compile:function(e,t){t.role||e[0].setAttribute("role","separator")}}}t.module("material.components.menuBar").directive("mdMenuDivider",e)}(),function(){function e(e,t,n){this.$element=t,this.$attrs=n,this.$scope=e}e.$inject=["$scope","$element","$attrs"],t.module("material.components.menuBar").controller("MenuItemController",e),e.prototype.init=function(e){var t=this.$element,n=this.$attrs;this.ngModel=e,"checkbox"!=n.type&&"radio"!=n.type||(this.mode=n.type,this.iconEl=t[0].children[0],this.buttonEl=t[0].children[1],e&&this.initClickListeners())},e.prototype.clearNgAria=function(){var e=this.$element[0],n=["role","tabindex","aria-invalid","aria-checked"];t.forEach(n,function(t){e.removeAttribute(t)})},e.prototype.initClickListeners=function(){function e(){if("radio"==d){var e=a.ngValue?r.$eval(a.ngValue):a.value;return i.$modelValue==e}return i.$modelValue}function n(e){e?c.off("click",l):c.on("click",l)}var o=this,i=this.ngModel,r=this.$scope,a=this.$attrs,d=(this.$element,this.mode);this.handleClick=t.bind(this,this.handleClick);var s=this.iconEl,c=t.element(this.buttonEl),l=this.handleClick;a.$observe("disabled",n),n(a.disabled),i.$render=function(){o.clearNgAria(),e()?(s.style.display="",c.attr("aria-checked","true")):(s.style.display="none",c.attr("aria-checked","false"))},r.$$postDigest(i.$render)},e.prototype.handleClick=function(e){var t,n=this.mode,o=this.ngModel,i=this.$attrs;"checkbox"==n?t=!o.$modelValue:"radio"==n&&(t=i.ngValue?this.$scope.$eval(i.ngValue):i.value),o.$setViewValue(t),o.$render()}}(),function(){function e(e,n,o){return{controller:"MenuItemController",require:["mdMenuItem","?ngModel"],priority:n.BEFORE_NG_ARIA,compile:function(n,i){function r(e,o,i){i=i||n,i instanceof t.element&&(i=i[0]),i.hasAttribute(e)||i.setAttribute(e,o)}function a(o){var i=e.prefixer(o);t.forEach(i,function(e){if(n[0].hasAttribute(e)){var t=n[0].getAttribute(e);l[0].setAttribute(e,t),n[0].removeAttribute(e)}})}var d=i.type,s="md-in-menu-bar";if("checkbox"!=d&&"radio"!=d||!n.hasClass(s))r("role","menuitem",n[0].querySelector("md-button, button, a"));else{var c=n[0].textContent,l=t.element('<md-button type="button"></md-button>'),m='<md-icon md-svg-src="'+o.mdChecked+'"></md-icon>';l.html(c),l.attr("tabindex","0"),n.html(""),n.append(t.element(m)),n.append(l),n.addClass("md-indent").removeClass(s),r("role","checkbox"==d?"menuitemcheckbox":"menuitemradio",l),a("ng-disabled")}return function(e,t,n,o){var i=o[0],r=o[1];i.init(r)}}}}e.$inject=["$mdUtil","$mdConstant","$$mdSvgRegistry"],t.module("material.components.menuBar").directive("mdMenuItem",e)}(),function(){function e(e,n,o,i,r,a){function d(a,d,E){function $(t,o,r,d,s,l){function h(e){_.attr("stroke-dashoffset",c(v,E,e,M)),_.attr("transform","rotate("+C+" "+v/2+" "+v/2+")")}var f=++D,g=i.now(),b=o-t,v=m(a.mdDiameter),E=u(v),$=r||n.easeFn,y=d||n.duration,C=-90*(s||0),M=l||100;o===t?h(o):T=p(function A(){var n=e.Math.max(0,e.Math.min(i.now()-g,y));h($(n,t,b,y)),f===D&&n<y&&(T=p(A))})}function y(){$(x,N,n.easeFnIndeterminate,n.durationIndeterminate,S,75),S=++S%4}function C(){A||(A=r(y,n.durationIndeterminate,0,!1),y(),d.addClass(v).removeAttr("aria-valuenow"))}function M(){A&&(r.cancel(A),A=null,d.removeClass(v))}var T,A,w=d[0],k=t.element(w.querySelector("svg")),_=t.element(w.querySelector("path")),x=n.startIndeterminate,N=n.endIndeterminate,S=0,D=0;o(d),d.toggleClass(b,E.hasOwnProperty("disabled")),a.mdMode===g&&C(),a.$on("$destroy",function(){M(),T&&h(T)}),a.$watchGroup(["value","mdMode",function(){var e=w.disabled;return e===!0||e===!1?e:t.isDefined(d.attr("disabled"))}],function(e,t){var n=e[1],o=e[2],i=t[2];if(o!==i&&d.toggleClass(b,!!o),o)M();else if(n!==f&&n!==g&&(n=g,E.$set("mdMode",n)),n===g)C();else{var r=l(e[0]);M(),d.attr("aria-valuenow",r),$(l(t[0]),r)}}),a.$watch("mdDiameter",function(t){var n=m(t),o=u(n),i=l(a.value),r=n/2+"px",p={width:n+"px",height:n+"px"};k[0].setAttribute("viewBox","0 0 "+n+" "+n),k.css(p).css("transform-origin",r+" "+r+" "+r),d.css(p),_.attr("stroke-width",o),_.attr("stroke-linecap","square"),a.mdMode==g?(_.attr("d",s(n,o,!0)),_.attr("stroke-dasharray",(n-o)*e.Math.PI*.75),_.attr("stroke-dashoffset",c(n,o,1,75))):(_.attr("d",s(n,o,!1)),_.attr("stroke-dasharray",(n-o)*e.Math.PI),_.attr("stroke-dashoffset",c(n,o,0,100)),$(i,i))})}function s(e,t,n){var o=e/2,i=t/2,r=o+","+i,a=i+","+o,d=o-i;return"M"+r+"A"+d+","+d+" 0 1 1 "+a+(n?"":"A"+d+","+d+" 0 0 1 "+r)}function c(t,n,o,i){return(t-n)*e.Math.PI*(3*(i||100)/100-o/100)}function l(t){return e.Math.max(0,e.Math.min(t||0,100))}function m(e){var t=n.progressSize;if(e){var o=parseFloat(e);return e.lastIndexOf("%")===e.length-1&&(o=o/100*t),o}return t}function u(e){return n.strokeWidth/100*e}var p=e.requestAnimationFrame||e.webkitRequestAnimationFrame||t.noop,h=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame||t.noop,f="determinate",g="indeterminate",b="_md-progress-circular-disabled",v="md-mode-indeterminate";
return{restrict:"E",scope:{value:"@",mdDiameter:"@",mdMode:"@"},template:'<svg xmlns="http://www.w3.org/2000/svg"><path fill="none"/></svg>',compile:function(e,n){if(e.attr({"aria-valuemin":0,"aria-valuemax":100,role:"progressbar"}),t.isUndefined(n.mdMode)){var o=n.hasOwnProperty("value")?f:g;n.$set("mdMode",o)}else n.$set("mdMode",n.mdMode.trim());return d}}}e.$inject=["$window","$mdProgressCircular","$mdTheming","$mdUtil","$interval","$log"],t.module("material.components.progressCircular").directive("mdProgressCircular",e)}(),function(){function e(){function e(e,t,n,o){return n*e/o+t}function n(e,t,n,o){var i=(e/=o)*e,r=i*e;return t+n*(6*r*i+-15*i*i+10*r)}var o={progressSize:50,strokeWidth:10,duration:100,easeFn:e,durationIndeterminate:1333,startIndeterminate:1,endIndeterminate:149,easeFnIndeterminate:n,easingPresets:{linearEase:e,materialEase:n}};return{configure:function(e){return o=t.extend(o,e||{})},$get:function(){return o}}}t.module("material.components.progressCircular").provider("$mdProgressCircular",e)}(),function(){function e(){function e(e,o,i,r){if(r){var a=r.getTabElementIndex(o),d=n(o,"md-tab-body").remove(),s=n(o,"md-tab-label").remove(),c=r.insertTab({scope:e,parent:e.$parent,index:a,element:o,template:d.html(),label:s.html()},a);e.select=e.select||t.noop,e.deselect=e.deselect||t.noop,e.$watch("active",function(e){e&&r.select(c.getIndex(),!0)}),e.$watch("disabled",function(){r.refreshIndex()}),e.$watch(function(){return r.getTabElementIndex(o)},function(e){c.index=e,r.updateTabOrder()}),e.$on("$destroy",function(){r.removeTab(c)})}}function n(e,n){for(var o=e[0].children,i=0,r=o.length;i<r;i++){var a=o[i];if(a.tagName===n.toUpperCase())return t.element(a)}return t.element()}return{require:"^?mdTabs",terminal:!0,compile:function(o,i){var r=n(o,"md-tab-label"),a=n(o,"md-tab-body");if(0===r.length&&(r=t.element("<md-tab-label></md-tab-label>"),i.label?r.text(i.label):r.append(o.contents()),0===a.length)){var d=o.contents().detach();a=t.element("<md-tab-body></md-tab-body>"),a.append(d)}return o.append(r),a.html()&&o.append(a),e},scope:{active:"=?mdActive",disabled:"=?ngDisabled",select:"&?mdOnSelect",deselect:"&?mdOnDeselect"}}}t.module("material.components.tabs").directive("mdTab",e)}(),function(){function e(){return{require:"^?mdTabs",link:function(e,t,n,o){o&&o.attachRipple(e,t)}}}t.module("material.components.tabs").directive("mdTabItem",e)}(),function(){function e(){return{terminal:!0}}t.module("material.components.tabs").directive("mdTabLabel",e)}(),function(){function e(e){return{restrict:"A",compile:function(t,n){var o=e(n.mdTabScroll,null,!0);return function(e,t){t.on("mousewheel",function(t){e.$apply(function(){o(e,{$event:t})})})}}}}e.$inject=["$parse"],t.module("material.components.tabs").directive("mdTabScroll",e)}(),function(){function e(e,o,i,r,a,d,s,c,l,m,u,p){function h(){E("stretchTabs",C),X("focusIndex",_,he.selectedIndex||0),X("offsetLeft",k,0),X("hasContent",w,!1),X("maxTabWidth",T,J()),X("shouldPaginate",A,!1),$("noInkBar",L),$("dynamicHeight",F),$("noPagination"),$("swipeContent"),$("noDisconnect"),$("autoselect"),$("noSelectClick"),$("centerTabs",M,!1),$("enableDisconnect"),he.scope=e,he.parent=e.$parent,he.tabs=[],he.lastSelectedIndex=null,he.hasFocus=!1,he.styleTabItemFocus=!1,he.shouldCenterTabs=Y(),he.tabContentPrefix="tab-content-",f()}function f(){he.selectedIndex=he.selectedIndex||0,g(),v(),b(),m(o),d.nextTick(function(){ge=j(),de(),oe(),se(),he.tabs[he.selectedIndex]&&he.tabs[he.selectedIndex].scope.select(),Ee=!0,Q()})}function g(){var e=c.$mdTabsTemplate,n=t.element(o[0].querySelector("md-tab-data"));n.html(e),l(n.contents())(he.parent),delete c.$mdTabsTemplate}function b(){t.element(i).on("resize",R),e.$on("$destroy",y)}function v(){e.$watch("$mdTabsCtrl.selectedIndex",x)}function E(e,t){var n=c.$normalize("md-"+e);t&&X(e,t),c.$observe(n,function(t){he[e]=t})}function $(e,t){function n(t){he[e]="false"!==t}var o=c.$normalize("md-"+e);t&&X(e,t),c.hasOwnProperty(o)&&n(c[o]),c.$observe(o,n)}function y(){ve=!0,t.element(i).off("resize",R)}function C(e){var n=j();t.element(n.wrapper).toggleClass("md-stretch-tabs",V()),se()}function M(e){he.shouldCenterTabs=Y()}function T(e,n){if(e!==n){var o=j();t.forEach(o.tabs,function(t){t.style.maxWidth=e+"px"}),t.forEach(o.dummies,function(t){t.style.maxWidth=e+"px"}),d.nextTick(he.updateInkBarStyles)}}function A(e,t){e!==t&&(he.maxTabWidth=J(),he.shouldCenterTabs=Y(),d.nextTick(function(){he.maxTabWidth=J(),oe(he.selectedIndex)}))}function w(e){o[e?"removeClass":"addClass"]("md-no-tab-content")}function k(n){var o=j(),i=(he.shouldCenterTabs||pe()?"":"-")+n+"px";i=i.replace("--",""),t.element(o.paging).css(r.CSS.TRANSFORM,"translate3d("+i+", 0, 0)"),e.$broadcast("$mdTabsPaginationChanged")}function _(e,t){e!==t&&j().tabs[e]&&(oe(),ne())}function x(t,n){t!==n&&(he.selectedIndex=G(t),he.lastSelectedIndex=n,he.updateInkBarStyles(),de(),oe(t),e.$broadcast("$mdTabsChanged"),he.tabs[n]&&he.tabs[n].scope.deselect(),he.tabs[t]&&he.tabs[t].scope.select())}function N(e){var t=o[0].getElementsByTagName("md-tab");return Array.prototype.indexOf.call(t,e[0])}function S(){S.watcher||(S.watcher=e.$watch(function(){d.nextTick(function(){S.watcher&&o.prop("offsetParent")&&(S.watcher(),S.watcher=null,R())},!1)}))}function D(e){switch(e.keyCode){case r.KEY_CODE.LEFT_ARROW:e.preventDefault(),te(-1,!0);break;case r.KEY_CODE.RIGHT_ARROW:e.preventDefault(),te(1,!0);break;case r.KEY_CODE.SPACE:case r.KEY_CODE.ENTER:e.preventDefault(),fe||I(he.focusIndex);break;case r.KEY_CODE.TAB:he.focusIndex!==he.selectedIndex&&(he.focusIndex=he.selectedIndex)}}function I(e,t){fe||(he.focusIndex=he.selectedIndex=e),t&&he.noSelectClick||d.nextTick(function(){he.tabs[e].element.triggerHandler("click")},!1)}function H(e){he.shouldPaginate&&(e.preventDefault(),he.offsetLeft=le(he.offsetLeft-e.wheelDelta))}function O(){if(he.canPageForward()){var e=p.increasePageOffset(j(),he.offsetLeft);he.offsetLeft=le(e)}}function P(){if(he.canPageBack()){var e=p.decreasePageOffset(j(),he.offsetLeft);he.offsetLeft=le(e)}}function R(){he.lastSelectedIndex=he.selectedIndex,he.offsetLeft=le(he.offsetLeft),d.nextTick(function(){he.updateInkBarStyles(),Q()})}function L(e){t.element(j().inkBar).toggleClass("ng-hide",e)}function F(e){o.toggleClass("md-dynamic-height",e)}function B(e){if(!ve){var t=he.selectedIndex,n=he.tabs.splice(e.getIndex(),1)[0];ae(),he.selectedIndex===t&&(n.scope.deselect(),he.tabs[he.selectedIndex]&&he.tabs[he.selectedIndex].scope.select()),d.nextTick(function(){Q(),he.offsetLeft=le(he.offsetLeft)})}}function U(e,n){var o=Ee,i={getIndex:function(){return he.tabs.indexOf(r)},isActive:function(){return this.getIndex()===he.selectedIndex},isLeft:function(){return this.getIndex()<he.selectedIndex},isRight:function(){return this.getIndex()>he.selectedIndex},shouldRender:function(){return!he.noDisconnect||this.isActive()},hasFocus:function(){return he.styleTabItemFocus&&he.hasFocus&&this.getIndex()===he.focusIndex},id:d.nextUid(),hasContent:!(!e.template||!e.template.trim())},r=t.extend(i,e);return t.isDefined(n)?he.tabs.splice(n,0,r):he.tabs.push(r),ie(),re(),d.nextTick(function(){Q(),ue(r),o&&he.autoselect&&d.nextTick(function(){d.nextTick(function(){I(he.tabs.indexOf(r))})})}),r}function j(){var e={},t=o[0];return e.wrapper=t.querySelector("md-tabs-wrapper"),e.canvas=e.wrapper.querySelector("md-tabs-canvas"),e.paging=e.canvas.querySelector("md-pagination-wrapper"),e.inkBar=e.paging.querySelector("md-ink-bar"),e.nextButton=t.querySelector("md-next-button"),e.prevButton=t.querySelector("md-prev-button"),e.contents=t.querySelectorAll("md-tabs-content-wrapper > md-tab-content"),e.tabs=e.paging.querySelectorAll("md-tab-item"),e.dummies=e.canvas.querySelectorAll("md-dummy-tab"),e}function q(){return he.offsetLeft>0}function z(){var e=j(),t=e.tabs[e.tabs.length-1];return pe()?he.offsetLeft<e.paging.offsetWidth-e.canvas.offsetWidth:t&&t.offsetLeft+t.offsetWidth>e.canvas.clientWidth+he.offsetLeft}function W(){var e=he.tabs[he.focusIndex];return e&&e.id?"tab-item-"+e.id:null}function V(){switch(he.stretchTabs){case"always":return!0;case"never":return!1;default:return!he.shouldPaginate&&i.matchMedia("(max-width: 600px)").matches}}function Y(){return he.centerTabs&&!he.shouldPaginate}function K(){if(he.noPagination||!Ee)return!1;var e=o.prop("clientWidth");return t.forEach(j().tabs,function(t){e-=t.offsetWidth}),e<0}function G(e){if(e===-1)return-1;var t,n,o=Math.max(he.tabs.length-e,e);for(t=0;t<=o;t++){if(n=he.tabs[e+t],n&&n.scope.disabled!==!0)return n.getIndex();if(n=he.tabs[e-t],n&&n.scope.disabled!==!0)return n.getIndex()}return e}function X(e,t,n){Object.defineProperty(he,e,{get:function(){return n},set:function(e){var o=n;n=e,t&&t(e,o)}})}function Q(){he.maxTabWidth=J(),he.shouldPaginate=K()}function Z(e){var n=0;return t.forEach(e,function(e){n+=Math.max(e.offsetWidth,e.getBoundingClientRect().width)}),Math.ceil(n)}function J(){var e=j(),t=e.canvas.clientWidth,n=264;return Math.max(0,Math.min(t-1,n))}function ee(){var e=he.tabs[he.selectedIndex],t=he.tabs[he.focusIndex];he.tabs=he.tabs.sort(function(e,t){return e.index-t.index}),he.selectedIndex=he.tabs.indexOf(e),he.focusIndex=he.tabs.indexOf(t)}function te(e,t){var n,o=t?"focusIndex":"selectedIndex",i=he[o];for(n=i+e;he.tabs[n]&&he.tabs[n].scope.disabled;n+=e);n=(i+e+he.tabs.length)%he.tabs.length,he.tabs[n]&&(he[o]=n)}function ne(){he.styleTabItemFocus="keyboard"===u.getLastInteractionType(),j().tabs[he.focusIndex].focus()}function oe(e){var n=j();if(t.isNumber(e)||(e=he.focusIndex),n.tabs[e]&&!he.shouldCenterTabs){var o=n.tabs[e],i=o.offsetLeft,r=o.offsetWidth+i,a=32;if(0==e)return void(he.offsetLeft=0);if(pe()){var d=Z(Array.prototype.slice.call(n.tabs,0,e)),s=Z(Array.prototype.slice.call(n.tabs,0,e+1));he.offsetLeft=Math.min(he.offsetLeft,le(d)),he.offsetLeft=Math.max(he.offsetLeft,le(s-n.canvas.clientWidth))}else he.offsetLeft=Math.max(he.offsetLeft,le(r-n.canvas.clientWidth+a)),he.offsetLeft=Math.min(he.offsetLeft,le(i))}}function ie(){be.forEach(function(e){d.nextTick(e)}),be=[]}function re(){for(var e=!1,t=0;t<he.tabs.length;t++)if(he.tabs[t].hasContent){e=!0;break}he.hasContent=e}function ae(){he.selectedIndex=G(he.selectedIndex),he.focusIndex=G(he.focusIndex)}function de(){if(!he.dynamicHeight)return o.css("height","");if(!he.tabs.length)return be.push(de);var e=j(),t=e.contents[he.selectedIndex],i=t?t.offsetHeight:0,r=e.wrapper.offsetHeight,a=i+r,c=o.prop("clientHeight");if(c!==a){"bottom"===o.attr("md-align-tabs")&&(c-=r,a-=r,o.attr("md-border-bottom")!==n&&++c),fe=!0;var l={height:c+"px"},m={height:a+"px"};o.css(l),s(o,{from:l,to:m,easing:"cubic-bezier(0.35, 0, 0.25, 1)",duration:.5}).start().done(function(){o.css({transition:"none",height:""}),d.nextTick(function(){o.css("transition","")}),fe=!1})}}function se(){var e=j();if(!e.tabs[he.selectedIndex])return void t.element(e.inkBar).css({left:"auto",right:"auto"});if(!he.tabs.length)return be.push(he.updateInkBarStyles);if(!o.prop("offsetParent"))return S();var n=he.selectedIndex,i=e.paging.offsetWidth,r=e.tabs[n],a=r.offsetLeft,s=i-a-r.offsetWidth;if(he.shouldCenterTabs){var c=Z(e.tabs);i>c&&d.nextTick(se,!1)}ce(),t.element(e.inkBar).css({left:a+"px",right:s+"px"})}function ce(){var e=j(),n=he.selectedIndex,o=he.lastSelectedIndex,i=t.element(e.inkBar);t.isNumber(o)&&i.toggleClass("md-left",n<o).toggleClass("md-right",n>o)}function le(e){var t=j();if(!t.tabs.length||!he.shouldPaginate)return 0;var n=t.tabs[t.tabs.length-1],o=n.offsetLeft+n.offsetWidth;return pe()?(e=Math.min(t.paging.offsetWidth-t.canvas.clientWidth,e),e=Math.max(0,e)):(e=Math.max(0,e),e=Math.min(o-t.canvas.clientWidth,e)),e}function me(e,n){var o=j(),i={colorElement:t.element(o.inkBar)};a.attach(e,n,i)}function ue(e){if(e.hasContent){var n=o[0].querySelectorAll('[md-tab-id="'+e.id+'"]');t.element(n).attr("aria-controls",he.tabContentPrefix+e.id)}}function pe(){return"rtl"==d.bidi()}var he=this,fe=!1,ge=j(),be=[],ve=!1,Ee=!1;he.$onInit=h,he.updatePagination=d.debounce(Q,100),he.redirectFocus=ne,he.attachRipple=me,he.insertTab=U,he.removeTab=B,he.select=I,he.scroll=H,he.nextPage=O,he.previousPage=P,he.keydown=D,he.canPageForward=z,he.canPageBack=q,he.refreshIndex=ae,he.incrementIndex=te,he.getTabElementIndex=N,he.updateInkBarStyles=d.debounce(se,100),he.updateTabOrder=d.debounce(ee,100),he.getFocusedTabId=W,1===t.version.major&&t.version.minor<=4&&this.$onInit()}e.$inject=["$scope","$element","$window","$mdConstant","$mdTabInkRipple","$mdUtil","$animateCss","$attrs","$compile","$mdTheming","$mdInteraction","MdTabsPaginationService"],t.module("material.components.tabs").controller("MdTabsController",e)}(),function(){function e(e){return{scope:{selectedIndex:"=?mdSelected"},template:function(t,n){return n.$mdTabsTemplate=t.html(),'<md-tabs-wrapper> <md-tab-data></md-tab-data> <md-prev-button tabindex="-1" role="button" aria-label="Previous Page" aria-disabled="{{!$mdTabsCtrl.canPageBack()}}" ng-class="{ \'md-disabled\': !$mdTabsCtrl.canPageBack() }" ng-if="$mdTabsCtrl.shouldPaginate" ng-click="$mdTabsCtrl.previousPage()"> <md-icon md-svg-src="'+e.mdTabsArrow+'"></md-icon> </md-prev-button> <md-next-button tabindex="-1" role="button" aria-label="Next Page" aria-disabled="{{!$mdTabsCtrl.canPageForward()}}" ng-class="{ \'md-disabled\': !$mdTabsCtrl.canPageForward() }" ng-if="$mdTabsCtrl.shouldPaginate" ng-click="$mdTabsCtrl.nextPage()"> <md-icon md-svg-src="'+e.mdTabsArrow+'"></md-icon> </md-next-button> <md-tabs-canvas ng-focus="$mdTabsCtrl.redirectFocus()" ng-class="{ \'md-paginated\': $mdTabsCtrl.shouldPaginate, \'md-center-tabs\': $mdTabsCtrl.shouldCenterTabs }" ng-keydown="$mdTabsCtrl.keydown($event)"> <md-pagination-wrapper ng-class="{ \'md-center-tabs\': $mdTabsCtrl.shouldCenterTabs }" md-tab-scroll="$mdTabsCtrl.scroll($event)" role="tablist"> <md-tab-item tabindex="{{ tab.isActive() ? 0 : -1 }}" class="md-tab" ng-repeat="tab in $mdTabsCtrl.tabs" role="tab" id="tab-item-{{::tab.id}}" md-tab-id="{{::tab.id}}"aria-selected="{{tab.isActive()}}" aria-disabled="{{tab.scope.disabled || \'false\'}}" ng-click="$mdTabsCtrl.select(tab.getIndex())" ng-focus="$mdTabsCtrl.hasFocus = true" ng-blur="$mdTabsCtrl.hasFocus = false" ng-class="{ \'md-active\': tab.isActive(), \'md-focused\': tab.hasFocus(), \'md-disabled\': tab.scope.disabled }" ng-disabled="tab.scope.disabled" md-swipe-left="$mdTabsCtrl.nextPage()" md-swipe-right="$mdTabsCtrl.previousPage()" md-tabs-template="::tab.label" md-scope="::tab.parent"></md-tab-item> <md-ink-bar></md-ink-bar> </md-pagination-wrapper> <md-tabs-dummy-wrapper aria-hidden="true" class="md-visually-hidden md-dummy-wrapper"> <md-dummy-tab class="md-tab" tabindex="-1" ng-repeat="tab in $mdTabsCtrl.tabs" md-tabs-template="::tab.label" md-scope="::tab.parent"></md-dummy-tab> </md-tabs-dummy-wrapper> </md-tabs-canvas> </md-tabs-wrapper> <md-tabs-content-wrapper ng-show="$mdTabsCtrl.hasContent && $mdTabsCtrl.selectedIndex >= 0" class="_md"> <md-tab-content id="{{:: $mdTabsCtrl.tabContentPrefix + tab.id}}" class="_md" role="tabpanel" aria-labelledby="tab-item-{{::tab.id}}" md-swipe-left="$mdTabsCtrl.swipeContent && $mdTabsCtrl.incrementIndex(1)" md-swipe-right="$mdTabsCtrl.swipeContent && $mdTabsCtrl.incrementIndex(-1)" ng-if="tab.hasContent" ng-repeat="(index, tab) in $mdTabsCtrl.tabs" ng-class="{ \'md-no-transition\': $mdTabsCtrl.lastSelectedIndex == null, \'md-active\': tab.isActive(), \'md-left\': tab.isLeft(), \'md-right\': tab.isRight(), \'md-no-scroll\': $mdTabsCtrl.dynamicHeight }"> <div md-tabs-template="::tab.template" md-connected-if="tab.isActive()" md-scope="::tab.parent" ng-if="$mdTabsCtrl.enableDisconnect || tab.shouldRender()"></div> </md-tab-content> </md-tabs-content-wrapper>'},controller:"MdTabsController",controllerAs:"$mdTabsCtrl",bindToController:!0}}e.$inject=["$$mdSvgRegistry"],t.module("material.components.tabs").directive("mdTabs",e)}(),function(){function e(e,t){return{require:"^?mdTabs",link:function(n,o,i,r){if(r){var a,d,s=function(){r.updatePagination(),r.updateInkBarStyles()};if("MutationObserver"in t){var c={childList:!0,subtree:!0,characterData:!0};a=new MutationObserver(s),a.observe(o[0],c),d=a.disconnect.bind(a)}else{var l=e.debounce(s,15,null,!1);o.on("DOMSubtreeModified",l),d=o.off.bind(o,"DOMSubtreeModified",l)}n.$on("$destroy",function(){d()})}}}}e.$inject=["$mdUtil","$window"],t.module("material.components.tabs").directive("mdTabsDummyWrapper",e)}(),function(){function e(e,t){function n(n,o,i,r){function a(){n.$watch("connected",function(e){e===!1?d():s()}),n.$on("$destroy",s)}function d(){r.enableDisconnect&&t.disconnectScope(c)}function s(){r.enableDisconnect&&t.reconnectScope(c)}if(r){var c=r.enableDisconnect?n.compileScope.$new():n.compileScope;return o.html(n.template),e(o.contents())(c),t.nextTick(a)}}return{restrict:"A",link:n,scope:{template:"=mdTabsTemplate",connected:"=?mdConnectedIf",compileScope:"=mdScope"},require:"^?mdTabs"}}e.$inject=["$compile","$mdUtil"],t.module("material.components.tabs").directive("mdTabsTemplate",e)}(),function(){t.module("material.core").constant("$MD_THEME_CSS",'md-autocomplete.md-THEME_NAME-theme{background:"{{background-A100}}"}md-autocomplete.md-THEME_NAME-theme[disabled]:not([md-floating-label]){background:"{{background-100}}"}md-autocomplete.md-THEME_NAME-theme button md-icon path{fill:"{{background-600}}"}md-autocomplete.md-THEME_NAME-theme button:after{background:"{{background-600-0.3}}"}.md-autocomplete-suggestions-container.md-THEME_NAME-theme{background:"{{background-A100}}"}.md-autocomplete-suggestions-container.md-THEME_NAME-theme li{color:"{{background-900}}"}.md-autocomplete-suggestions-container.md-THEME_NAME-theme li .highlight{color:"{{background-600}}"}.md-autocomplete-suggestions-container.md-THEME_NAME-theme li.selected,.md-autocomplete-suggestions-container.md-THEME_NAME-theme li:hover{background:"{{background-200}}"}md-backdrop{background-color:"{{background-900-0.0}}"}md-backdrop.md-opaque.md-THEME_NAME-theme{background-color:"{{background-900-1.0}}"}md-bottom-sheet.md-THEME_NAME-theme{background-color:"{{background-50}}";border-top-color:"{{background-300}}"}md-bottom-sheet.md-THEME_NAME-theme.md-list md-list-item{color:"{{foreground-1}}"}md-bottom-sheet.md-THEME_NAME-theme .md-subheader{background-color:"{{background-50}}";color:"{{foreground-1}}"}.md-button.md-THEME_NAME-theme:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme:not([disabled]):hover{background-color:"{{background-500-0.2}}"}.md-button.md-THEME_NAME-theme:not([disabled]).md-icon-button:hover{background-color:transparent}.md-button.md-THEME_NAME-theme.md-fab md-icon{color:"{{accent-contrast}}"}.md-button.md-THEME_NAME-theme.md-primary{color:"{{primary-color}}"}.md-button.md-THEME_NAME-theme.md-primary.md-fab,.md-button.md-THEME_NAME-theme.md-primary.md-raised{color:"{{primary-contrast}}";background-color:"{{primary-color}}"}.md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]) md-icon,.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]) md-icon{color:"{{primary-contrast}}"}.md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):hover,.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):hover{background-color:"{{primary-600}}"}.md-button.md-THEME_NAME-theme.md-primary:not([disabled]) md-icon{color:"{{primary-color}}"}.md-button.md-THEME_NAME-theme.md-fab{background-color:"{{accent-color}}";color:"{{accent-contrast}}"}.md-button.md-THEME_NAME-theme.md-fab:not([disabled]) .md-icon{color:"{{accent-contrast}}"}.md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover{background-color:"{{accent-A700}}"}.md-button.md-THEME_NAME-theme.md-raised{color:"{{background-900}}";background-color:"{{background-50}}"}.md-button.md-THEME_NAME-theme.md-raised:not([disabled]) md-icon{color:"{{background-900}}"}.md-button.md-THEME_NAME-theme.md-raised:not([disabled]):hover{background-color:"{{background-50}}"}.md-button.md-THEME_NAME-theme.md-raised:not([disabled]).md-focused{background-color:"{{background-200}}"}.md-button.md-THEME_NAME-theme.md-warn{color:"{{warn-color}}"}.md-button.md-THEME_NAME-theme.md-warn.md-fab,.md-button.md-THEME_NAME-theme.md-warn.md-raised{color:"{{warn-contrast}}";background-color:"{{warn-color}}"}.md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]) md-icon,.md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]) md-icon{color:"{{warn-contrast}}"}.md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]):hover,.md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]):hover{background-color:"{{warn-600}}"}.md-button.md-THEME_NAME-theme.md-warn:not([disabled]) md-icon{color:"{{warn-color}}"}.md-button.md-THEME_NAME-theme.md-accent{color:"{{accent-color}}"}.md-button.md-THEME_NAME-theme.md-accent.md-fab,.md-button.md-THEME_NAME-theme.md-accent.md-raised{color:"{{accent-contrast}}";background-color:"{{accent-color}}"}.md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]) md-icon,.md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]) md-icon{color:"{{accent-contrast}}"}.md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]):hover,.md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]).md-focused,.md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]):hover{background-color:"{{accent-A700}}"}.md-button.md-THEME_NAME-theme.md-accent:not([disabled]) md-icon{color:"{{accent-color}}"}.md-button.md-THEME_NAME-theme.md-accent[disabled],.md-button.md-THEME_NAME-theme.md-fab[disabled],.md-button.md-THEME_NAME-theme.md-raised[disabled],.md-button.md-THEME_NAME-theme.md-warn[disabled],.md-button.md-THEME_NAME-theme[disabled]{color:"{{foreground-3}}";cursor:default}.md-button.md-THEME_NAME-theme.md-accent[disabled] md-icon,.md-button.md-THEME_NAME-theme.md-fab[disabled] md-icon,.md-button.md-THEME_NAME-theme.md-raised[disabled] md-icon,.md-button.md-THEME_NAME-theme.md-warn[disabled] md-icon,.md-button.md-THEME_NAME-theme[disabled] md-icon{color:"{{foreground-3}}"}.md-button.md-THEME_NAME-theme.md-fab[disabled],.md-button.md-THEME_NAME-theme.md-raised[disabled]{background-color:"{{foreground-4}}"}.md-button.md-THEME_NAME-theme[disabled]{background-color:transparent}._md a.md-THEME_NAME-theme:not(.md-button).md-primary{color:"{{primary-color}}"}._md a.md-THEME_NAME-theme:not(.md-button).md-primary:hover{color:"{{primary-700}}"}._md a.md-THEME_NAME-theme:not(.md-button).md-accent{color:"{{accent-color}}"}._md a.md-THEME_NAME-theme:not(.md-button).md-accent:hover{color:"{{accent-A700}}"}._md a.md-THEME_NAME-theme:not(.md-button).md-warn{color:"{{warn-color}}"}._md a.md-THEME_NAME-theme:not(.md-button).md-warn:hover{color:"{{warn-700}}"}md-card.md-THEME_NAME-theme{color:"{{foreground-1}}";background-color:"{{background-hue-1}}";border-radius:2px}md-card.md-THEME_NAME-theme .md-card-image{border-radius:2px 2px 0 0}md-card.md-THEME_NAME-theme md-card-header md-card-avatar md-icon{color:"{{background-color}}";background-color:"{{foreground-3}}"}md-card.md-THEME_NAME-theme md-card-header md-card-header-text .md-subhead,md-card.md-THEME_NAME-theme md-card-title md-card-title-text:not(:only-child) .md-subhead{color:"{{foreground-2}}"}md-checkbox.md-THEME_NAME-theme .md-ripple{color:"{{accent-A700}}"}md-checkbox.md-THEME_NAME-theme.md-checked .md-ripple{color:"{{background-600}}"}md-checkbox.md-THEME_NAME-theme.md-checked.md-focused .md-container:before{background-color:"{{accent-color-0.26}}"}md-checkbox.md-THEME_NAME-theme .md-ink-ripple{color:"{{foreground-2}}"}md-checkbox.md-THEME_NAME-theme.md-checked .md-ink-ripple{color:"{{accent-color-0.87}}"}md-checkbox.md-THEME_NAME-theme:not(.md-checked) .md-icon{border-color:"{{foreground-2}}"}md-checkbox.md-THEME_NAME-theme.md-checked .md-icon{background-color:"{{accent-color-0.87}}"}md-checkbox.md-THEME_NAME-theme.md-checked .md-icon:after{border-color:"{{accent-contrast-0.87}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-ripple{color:"{{primary-600}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ripple{color:"{{background-600}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-ink-ripple{color:"{{foreground-2}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple{color:"{{primary-color-0.87}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary:not(.md-checked) .md-icon{border-color:"{{foreground-2}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon{background-color:"{{primary-color-0.87}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked.md-focused .md-container:before{background-color:"{{primary-color-0.26}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon:after{border-color:"{{primary-contrast-0.87}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-indeterminate[disabled] .md-container{color:"{{foreground-3}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-ripple{color:"{{warn-600}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-ink-ripple{color:"{{foreground-2}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple{color:"{{warn-color-0.87}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn:not(.md-checked) .md-icon{border-color:"{{foreground-2}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon{background-color:"{{warn-color-0.87}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked.md-focused:not([disabled]) .md-container:before{background-color:"{{warn-color-0.26}}"}md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon:after{border-color:"{{background-200}}"}md-checkbox.md-THEME_NAME-theme[disabled]:not(.md-checked) .md-icon{border-color:"{{foreground-3}}"}md-checkbox.md-THEME_NAME-theme[disabled].md-checked .md-icon{background-color:"{{foreground-3}}"}md-checkbox.md-THEME_NAME-theme[disabled].md-checked .md-icon:after{border-color:"{{background-200}}"}md-checkbox.md-THEME_NAME-theme[disabled] .md-icon:after{border-color:"{{foreground-3}}"}md-checkbox.md-THEME_NAME-theme[disabled] .md-label{color:"{{foreground-3}}"}md-chips.md-THEME_NAME-theme .md-chips{box-shadow:0 1px "{{foreground-4}}"}md-chips.md-THEME_NAME-theme .md-chips.md-focused{box-shadow:0 2px "{{primary-color}}"}md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input{color:"{{foreground-1}}"}md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input:-moz-placeholder,md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input::-moz-placeholder{color:"{{foreground-3}}"}md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input:-ms-input-placeholder{color:"{{foreground-3}}"}md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input::-webkit-input-placeholder{color:"{{foreground-3}}"}md-chips.md-THEME_NAME-theme md-chip{background:"{{background-300}}";color:"{{background-800}}"}md-chips.md-THEME_NAME-theme md-chip md-icon{color:"{{background-700}}"}md-chips.md-THEME_NAME-theme md-chip.md-focused{background:"{{primary-color}}";color:"{{primary-contrast}}"}md-chips.md-THEME_NAME-theme md-chip.md-focused md-icon{color:"{{primary-contrast}}"}md-chips.md-THEME_NAME-theme md-chip._md-chip-editing{background:transparent;color:"{{background-800}}"}md-chips.md-THEME_NAME-theme md-chip-remove .md-button md-icon path{fill:"{{background-500}}"}.md-contact-suggestion span.md-contact-email{color:"{{background-400}}"}md-content.md-THEME_NAME-theme{color:"{{foreground-1}}";background-color:"{{background-default}}"}.md-calendar.md-THEME_NAME-theme{background:"{{background-A100}}";color:"{{background-A200-0.87}}"}.md-calendar.md-THEME_NAME-theme tr:last-child td{border-bottom-color:"{{background-200}}"}.md-THEME_NAME-theme .md-calendar-day-header{background:"{{background-300}}";color:"{{background-A200-0.87}}"}.md-THEME_NAME-theme .md-calendar-date.md-calendar-date-today .md-calendar-date-selection-indicator{border:1px solid "{{primary-500}}"}.md-THEME_NAME-theme .md-calendar-date.md-calendar-date-today.md-calendar-date-disabled{color:"{{primary-500-0.6}}"}.md-calendar-date.md-focus .md-THEME_NAME-theme .md-calendar-date-selection-indicator,.md-THEME_NAME-theme .md-calendar-date-selection-indicator:hover{background:"{{background-300}}"}.md-THEME_NAME-theme .md-calendar-date.md-calendar-selected-date .md-calendar-date-selection-indicator,.md-THEME_NAME-theme .md-calendar-date.md-focus.md-calendar-selected-date .md-calendar-date-selection-indicator{background:"{{primary-500}}";color:"{{primary-500-contrast}}";border-color:transparent}.md-THEME_NAME-theme .md-calendar-date-disabled,.md-THEME_NAME-theme .md-calendar-month-label-disabled{color:"{{background-A200-0.435}}"}.md-THEME_NAME-theme .md-datepicker-input{color:"{{foreground-1}}"}.md-THEME_NAME-theme .md-datepicker-input:-moz-placeholder,.md-THEME_NAME-theme .md-datepicker-input::-moz-placeholder{color:"{{foreground-3}}"}.md-THEME_NAME-theme .md-datepicker-input:-ms-input-placeholder{color:"{{foreground-3}}"}.md-THEME_NAME-theme .md-datepicker-input::-webkit-input-placeholder{color:"{{foreground-3}}"}.md-THEME_NAME-theme .md-datepicker-input-container{border-bottom-color:"{{foreground-4}}"}.md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-focused{border-bottom-color:"{{primary-color}}"}.md-accent .md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-focused{border-bottom-color:"{{accent-color}}"}.md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-invalid,.md-warn .md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-focused{border-bottom-color:"{{warn-A700}}"}.md-THEME_NAME-theme .md-datepicker-calendar-pane{border-color:"{{background-hue-1}}"}.md-THEME_NAME-theme .md-datepicker-triangle-button .md-datepicker-expand-triangle{border-top-color:"{{foreground-2}}"}.md-THEME_NAME-theme .md-datepicker-open .md-datepicker-calendar-icon{color:"{{primary-color}}"}.md-accent .md-THEME_NAME-theme .md-datepicker-open .md-datepicker-calendar-icon,.md-THEME_NAME-theme .md-datepicker-open.md-accent .md-datepicker-calendar-icon{color:"{{accent-color}}"}.md-THEME_NAME-theme .md-datepicker-open.md-warn .md-datepicker-calendar-icon,.md-warn .md-THEME_NAME-theme .md-datepicker-open .md-datepicker-calendar-icon{color:"{{warn-A700}}"}.md-THEME_NAME-theme .md-datepicker-calendar{background:"{{background-A100}}"}.md-THEME_NAME-theme .md-datepicker-input-mask-opaque{box-shadow:0 0 0 9999px "{{background-hue-1}}"}.md-THEME_NAME-theme .md-datepicker-open .md-datepicker-input-container{background:"{{background-hue-1}}"}md-dialog.md-THEME_NAME-theme{border-radius:4px;background-color:"{{background-hue-1}}";color:"{{foreground-1}}"}md-dialog.md-THEME_NAME-theme.md-content-overflow .md-actions,md-dialog.md-THEME_NAME-theme.md-content-overflow md-dialog-actions,md-divider.md-THEME_NAME-theme{border-top-color:"{{foreground-4}}"}.layout-gt-lg-row>md-divider.md-THEME_NAME-theme,.layout-gt-md-row>md-divider.md-THEME_NAME-theme,.layout-gt-sm-row>md-divider.md-THEME_NAME-theme,.layout-gt-xs-row>md-divider.md-THEME_NAME-theme,.layout-lg-row>md-divider.md-THEME_NAME-theme,.layout-md-row>md-divider.md-THEME_NAME-theme,.layout-row>md-divider.md-THEME_NAME-theme,.layout-sm-row>md-divider.md-THEME_NAME-theme,.layout-xl-row>md-divider.md-THEME_NAME-theme,.layout-xs-row>md-divider.md-THEME_NAME-theme{border-right-color:"{{foreground-4}}"}md-icon.md-THEME_NAME-theme{color:"{{foreground-2}}"}md-icon.md-THEME_NAME-theme.md-primary{color:"{{primary-color}}"}md-icon.md-THEME_NAME-theme.md-accent{color:"{{accent-color}}"}md-icon.md-THEME_NAME-theme.md-warn{color:"{{warn-color}}"}md-input-container.md-THEME_NAME-theme .md-input{color:"{{foreground-1}}";border-color:"{{foreground-4}}"}md-input-container.md-THEME_NAME-theme .md-input:-moz-placeholder,md-input-container.md-THEME_NAME-theme .md-input::-moz-placeholder{color:"{{foreground-3}}"}md-input-container.md-THEME_NAME-theme .md-input:-ms-input-placeholder{color:"{{foreground-3}}"}md-input-container.md-THEME_NAME-theme .md-input::-webkit-input-placeholder{color:"{{foreground-3}}"}md-input-container.md-THEME_NAME-theme>md-icon{color:"{{foreground-1}}"}md-input-container.md-THEME_NAME-theme .md-placeholder,md-input-container.md-THEME_NAME-theme label{color:"{{foreground-3}}"}md-input-container.md-THEME_NAME-theme label.md-required:after{color:"{{warn-A700}}"}md-input-container.md-THEME_NAME-theme:not(.md-input-focused):not(.md-input-invalid) label.md-required:after{color:"{{foreground-2}}"}md-input-container.md-THEME_NAME-theme .md-input-message-animation,md-input-container.md-THEME_NAME-theme .md-input-messages-animation{color:"{{warn-A700}}"}md-input-container.md-THEME_NAME-theme .md-input-message-animation .md-char-counter,md-input-container.md-THEME_NAME-theme .md-input-messages-animation .md-char-counter{color:"{{foreground-1}}"}md-input-container.md-THEME_NAME-theme.md-input-focused .md-input:-moz-placeholder,md-input-container.md-THEME_NAME-theme.md-input-focused .md-input::-moz-placeholder{color:"{{foreground-2}}"}md-input-container.md-THEME_NAME-theme.md-input-focused .md-input:-ms-input-placeholder{color:"{{foreground-2}}"}md-input-container.md-THEME_NAME-theme.md-input-focused .md-input::-webkit-input-placeholder{color:"{{foreground-2}}"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-has-value label{color:"{{foreground-2}}"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused .md-input,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-resized .md-input{border-color:"{{primary-color}}"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused label,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused md-icon{color:"{{primary-color}}"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent .md-input{border-color:"{{accent-color}}"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent label,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent md-icon{color:"{{accent-color}}"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn .md-input{border-color:"{{warn-A700}}"}md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn label,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn md-icon{color:"{{warn-A700}}"}md-input-container.md-THEME_NAME-theme.md-input-invalid .md-input{border-color:"{{warn-A700}}"}md-input-container.md-THEME_NAME-theme.md-input-invalid .md-char-counter,md-input-container.md-THEME_NAME-theme.md-input-invalid .md-input-message-animation,md-input-container.md-THEME_NAME-theme.md-input-invalid label{color:"{{warn-A700}}"}[disabled] md-input-container.md-THEME_NAME-theme .md-input,md-input-container.md-THEME_NAME-theme .md-input[disabled]{border-bottom-color:transparent;color:"{{foreground-3}}";background-image:linear-gradient(90deg,"{{foreground-3}}" 0,"{{foreground-3}}" 33%,transparent 0);background-image:-ms-linear-gradient(left,transparent 0,"{{foreground-3}}" 100%)}md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text h3,md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text h4,md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text h3,md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text h4{color:"{{foreground-1}}"}md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text p,md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text p{color:"{{foreground-2}}"}md-list.md-THEME_NAME-theme .md-proxy-focus.md-focused div.md-no-style{background-color:"{{background-100}}"}md-list.md-THEME_NAME-theme md-list-item .md-avatar-icon{background-color:"{{foreground-3}}";color:"{{background-color}}"}md-list.md-THEME_NAME-theme md-list-item>md-icon{color:"{{foreground-2}}"}md-list.md-THEME_NAME-theme md-list-item>md-icon.md-highlight{color:"{{primary-color}}"}md-list.md-THEME_NAME-theme md-list-item>md-icon.md-highlight.md-accent{color:"{{accent-color}}"}md-menu-content.md-THEME_NAME-theme{background-color:"{{background-A100}}"}md-menu-content.md-THEME_NAME-theme md-menu-item{color:"{{background-A200-0.87}}"}md-menu-content.md-THEME_NAME-theme md-menu-item md-icon{color:"{{background-A200-0.54}}"}md-menu-content.md-THEME_NAME-theme md-menu-item .md-button[disabled],md-menu-content.md-THEME_NAME-theme md-menu-item .md-button[disabled] md-icon{color:"{{background-A200-0.25}}"}md-menu-content.md-THEME_NAME-theme md-menu-divider{background-color:"{{background-A200-0.11}}"}md-menu-bar.md-THEME_NAME-theme>button.md-button{color:"{{foreground-2}}";border-radius:2px}md-menu-bar.md-THEME_NAME-theme md-menu.md-open>button,md-menu-bar.md-THEME_NAME-theme md-menu>button:focus{outline:none;background:"{{background-200}}"}md-menu-bar.md-THEME_NAME-theme.md-open:not(.md-keyboard-mode) md-menu:hover>button{background-color:"{{ background-500-0.2}}"}md-menu-bar.md-THEME_NAME-theme:not(.md-keyboard-mode):not(.md-open) md-menu button:focus,md-menu-bar.md-THEME_NAME-theme:not(.md-keyboard-mode):not(.md-open) md-menu button:hover{background:transparent}md-menu-content.md-THEME_NAME-theme .md-menu>.md-button:after{color:"{{background-A200-0.54}}"}md-menu-content.md-THEME_NAME-theme .md-menu.md-open>.md-button{background-color:"{{ background-500-0.2}}"}md-toolbar.md-THEME_NAME-theme.md-menu-toolbar{background-color:"{{background-A100}}";color:"{{background-A200}}"}md-toolbar.md-THEME_NAME-theme.md-menu-toolbar md-toolbar-filler{background-color:"{{primary-color}}";color:"{{background-A100-0.87}}"}md-toolbar.md-THEME_NAME-theme.md-menu-toolbar md-toolbar-filler md-icon{color:"{{background-A100-0.87}}"}md-nav-bar.md-THEME_NAME-theme .md-nav-bar{background-color:transparent;border-color:"{{foreground-4}}"}md-nav-bar.md-THEME_NAME-theme .md-button._md-nav-button.md-unselected{color:"{{foreground-2}}"}md-nav-bar.md-THEME_NAME-theme md-nav-ink-bar{color:"{{accent-color}}";background:"{{accent-color}}"}md-nav-bar.md-THEME_NAME-theme.md-accent>.md-nav-bar{background-color:"{{accent-color}}"}md-nav-bar.md-THEME_NAME-theme.md-accent>.md-nav-bar .md-button._md-nav-button{color:"{{accent-A100}}"}md-nav-bar.md-THEME_NAME-theme.md-accent>.md-nav-bar .md-button._md-nav-button.md-active,md-nav-bar.md-THEME_NAME-theme.md-accent>.md-nav-bar .md-button._md-nav-button.md-focused{color:"{{accent-contrast}}"}md-nav-bar.md-THEME_NAME-theme.md-accent>.md-nav-bar .md-button._md-nav-button.md-focused{background:"{{accent-contrast-0.1}}"}md-nav-bar.md-THEME_NAME-theme.md-accent>.md-nav-bar md-nav-ink-bar{color:"{{primary-600-1}}";background:"{{primary-600-1}}"}md-nav-bar.md-THEME_NAME-theme.md-warn>.md-nav-bar{background-color:"{{warn-color}}"}md-nav-bar.md-THEME_NAME-theme.md-warn>.md-nav-bar .md-button._md-nav-button{color:"{{warn-100}}"}md-nav-bar.md-THEME_NAME-theme.md-warn>.md-nav-bar .md-button._md-nav-button.md-active,md-nav-bar.md-THEME_NAME-theme.md-warn>.md-nav-bar .md-button._md-nav-button.md-focused{color:"{{warn-contrast}}"}md-nav-bar.md-THEME_NAME-theme.md-warn>.md-nav-bar .md-button._md-nav-button.md-focused{background:"{{warn-contrast-0.1}}"}md-nav-bar.md-THEME_NAME-theme.md-primary>.md-nav-bar{background-color:"{{primary-color}}"}md-nav-bar.md-THEME_NAME-theme.md-primary>.md-nav-bar .md-button._md-nav-button{color:"{{primary-100}}"}md-nav-bar.md-THEME_NAME-theme.md-primary>.md-nav-bar .md-button._md-nav-button.md-active,md-nav-bar.md-THEME_NAME-theme.md-primary>.md-nav-bar .md-button._md-nav-button.md-focused{color:"{{primary-contrast}}"}md-nav-bar.md-THEME_NAME-theme.md-primary>.md-nav-bar .md-button._md-nav-button.md-focused{background:"{{primary-contrast-0.1}}"}md-toolbar>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar{background-color:"{{primary-color}}"}md-toolbar>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button{color:"{{primary-100}}"}md-toolbar>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-active,md-toolbar>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-focused{color:"{{primary-contrast}}"}md-toolbar>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-focused{background:"{{primary-contrast-0.1}}"}md-toolbar.md-accent>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar{background-color:"{{accent-color}}"}md-toolbar.md-accent>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button{color:"{{accent-A100}}"}md-toolbar.md-accent>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-active,md-toolbar.md-accent>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-focused{color:"{{accent-contrast}}"}md-toolbar.md-accent>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-focused{background:"{{accent-contrast-0.1}}"}md-toolbar.md-accent>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar md-nav-ink-bar{color:"{{primary-600-1}}";background:"{{primary-600-1}}"}md-toolbar.md-warn>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar{background-color:"{{warn-color}}"}md-toolbar.md-warn>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button{color:"{{warn-100}}"}md-toolbar.md-warn>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-active,md-toolbar.md-warn>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-focused{color:"{{warn-contrast}}"}md-toolbar.md-warn>md-nav-bar.md-THEME_NAME-theme>.md-nav-bar .md-button._md-nav-button.md-focused{background:"{{warn-contrast-0.1}}"}._md-panel-backdrop.md-THEME_NAME-theme{background-color:"{{background-900-1.0}}"}md-progress-circular.md-THEME_NAME-theme path{stroke:"{{primary-color}}"}md-progress-circular.md-THEME_NAME-theme.md-warn path{stroke:"{{warn-color}}"}md-progress-circular.md-THEME_NAME-theme.md-accent path{stroke:"{{accent-color}}"}md-progress-linear.md-THEME_NAME-theme .md-container{background-color:"{{primary-100}}"}md-progress-linear.md-THEME_NAME-theme .md-bar{background-color:"{{primary-color}}"}md-progress-linear.md-THEME_NAME-theme.md-warn .md-container{background-color:"{{warn-100}}"}md-progress-linear.md-THEME_NAME-theme.md-warn .md-bar{background-color:"{{warn-color}}"}md-progress-linear.md-THEME_NAME-theme.md-accent .md-container{background-color:"{{accent-100}}"}md-progress-linear.md-THEME_NAME-theme.md-accent .md-bar{background-color:"{{accent-color}}"}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-primary .md-bar1{background-color:"{{primary-100}}"}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-primary .md-dashed:before{background:radial-gradient("{{primary-100}}" 0,"{{primary-100}}" 16%,transparent 42%)}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-bar1{background-color:"{{warn-100}}"}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-dashed:before{background:radial-gradient("{{warn-100}}" 0,"{{warn-100}}" 16%,transparent 42%)}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-bar1{background-color:"{{accent-100}}"}md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-dashed:before{background:radial-gradient("{{accent-100}}" 0,"{{accent-100}}" 16%,transparent 42%)}md-radio-button.md-THEME_NAME-theme .md-off{border-color:"{{foreground-2}}"}md-radio-button.md-THEME_NAME-theme .md-on{background-color:"{{accent-color-0.87}}"}md-radio-button.md-THEME_NAME-theme.md-checked .md-off{border-color:"{{accent-color-0.87}}"}md-radio-button.md-THEME_NAME-theme.md-checked .md-ink-ripple{color:"{{accent-color-0.87}}"}md-radio-button.md-THEME_NAME-theme .md-container .md-ripple{color:"{{accent-A700}}"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-on,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-on,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-on,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-on{background-color:"{{primary-color-0.87}}"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-off{border-color:"{{primary-color-0.87}}"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-ink-ripple{color:"{{primary-color-0.87}}"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-container .md-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-container .md-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-container .md-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-container .md-ripple{color:"{{primary-600}}"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-on,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-on,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-on,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-on{background-color:"{{warn-color-0.87}}"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-off,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-off{border-color:"{{warn-color-0.87}}"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-ink-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-ink-ripple{color:"{{warn-color-0.87}}"}md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-container .md-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-container .md-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-container .md-ripple,md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-container .md-ripple{color:"{{warn-600}}"}md-radio-button.md-THEME_NAME-theme[disabled],md-radio-group.md-THEME_NAME-theme[disabled]{color:"{{foreground-3}}"}md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-off,md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-on,md-radio-group.md-THEME_NAME-theme[disabled] .md-container .md-off,md-radio-group.md-THEME_NAME-theme[disabled] .md-container .md-on{border-color:"{{foreground-3}}"}md-radio-group.md-THEME_NAME-theme .md-checked .md-ink-ripple{color:"{{accent-color-0.26}}"}md-radio-group.md-THEME_NAME-theme .md-checked:not([disabled]).md-primary .md-ink-ripple,md-radio-group.md-THEME_NAME-theme.md-primary .md-checked:not([disabled]) .md-ink-ripple{color:"{{primary-color-0.26}}"}md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked .md-container:before{background-color:"{{accent-color-0.26}}"}md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked.md-primary .md-container:before,md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty).md-primary .md-checked .md-container:before{background-color:"{{primary-color-0.26}}"}md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked.md-warn .md-container:before,md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty).md-warn .md-checked .md-container:before{background-color:"{{warn-color-0.26}}"}md-input-container md-select.md-THEME_NAME-theme .md-select-value span:first-child:after{color:"{{warn-A700}}"}md-input-container:not(.md-input-focused):not(.md-input-invalid) md-select.md-THEME_NAME-theme .md-select-value span:first-child:after{color:"{{foreground-3}}"}md-input-container.md-input-focused:not(.md-input-has-value) md-select.md-THEME_NAME-theme .md-select-value,md-input-container.md-input-focused:not(.md-input-has-value) md-select.md-THEME_NAME-theme .md-select-value.md-select-placeholder{color:"{{primary-color}}"}md-input-container.md-input-invalid md-select.md-THEME_NAME-theme .md-select-value{color:"{{warn-A700}}"!important;border-bottom-color:"{{warn-A700}}"!important}md-input-container.md-input-invalid md-select.md-THEME_NAME-theme.md-no-underline .md-select-value{border-bottom-color:transparent!important}md-select.md-THEME_NAME-theme[disabled] .md-select-value{border-bottom-color:transparent;background-image:linear-gradient(90deg,"{{foreground-3}}" 0,"{{foreground-3}}" 33%,transparent 0);background-image:-ms-linear-gradient(left,transparent 0,"{{foreground-3}}" 100%)}md-select.md-THEME_NAME-theme .md-select-value{border-bottom-color:"{{foreground-4}}"}md-select.md-THEME_NAME-theme .md-select-value.md-select-placeholder{color:"{{foreground-3}}"}md-select.md-THEME_NAME-theme .md-select-value span:first-child:after{color:"{{warn-A700}}"}md-select.md-THEME_NAME-theme.md-no-underline .md-select-value{border-bottom-color:transparent!important}md-select.md-THEME_NAME-theme.ng-invalid.ng-touched .md-select-value{color:"{{warn-A700}}"!important;border-bottom-color:"{{warn-A700}}"!important}md-select.md-THEME_NAME-theme.ng-invalid.ng-touched.md-no-underline .md-select-value{border-bottom-color:transparent!important}md-select.md-THEME_NAME-theme:not([disabled]):focus .md-select-value{border-bottom-color:"{{primary-color}}";color:"{{ foreground-1 }}"}md-select.md-THEME_NAME-theme:not([disabled]):focus .md-select-value.md-select-placeholder{color:"{{ foreground-1 }}"}md-select.md-THEME_NAME-theme:not([disabled]):focus.md-no-underline .md-select-value{border-bottom-color:transparent!important}md-select.md-THEME_NAME-theme:not([disabled]):focus.md-accent .md-select-value{border-bottom-color:"{{accent-color}}"}md-select.md-THEME_NAME-theme:not([disabled]):focus.md-warn .md-select-value{border-bottom-color:"{{warn-color}}"}md-select.md-THEME_NAME-theme[disabled] .md-select-icon,md-select.md-THEME_NAME-theme[disabled] .md-select-value,md-select.md-THEME_NAME-theme[disabled] .md-select-value.md-select-placeholder{color:"{{foreground-3}}"}md-select.md-THEME_NAME-theme .md-select-icon{color:"{{foreground-2}}"}md-select-menu.md-THEME_NAME-theme md-content{background:"{{background-A100}}"}md-select-menu.md-THEME_NAME-theme md-content md-optgroup{color:"{{background-600-0.87}}"}md-select-menu.md-THEME_NAME-theme md-content md-option{color:"{{background-900-0.87}}"}md-select-menu.md-THEME_NAME-theme md-content md-option[disabled] .md-text{color:"{{background-400-0.87}}"}md-select-menu.md-THEME_NAME-theme md-content md-option:not([disabled]):focus,md-select-menu.md-THEME_NAME-theme md-content md-option:not([disabled]):hover{background:"{{background-200}}"}md-select-menu.md-THEME_NAME-theme md-content md-option[selected]{color:"{{primary-500}}"}md-select-menu.md-THEME_NAME-theme md-content md-option[selected]:focus{color:"{{primary-600}}"}md-select-menu.md-THEME_NAME-theme md-content md-option[selected].md-accent{color:"{{accent-color}}"}md-select-menu.md-THEME_NAME-theme md-content md-option[selected].md-accent:focus{color:"{{accent-A700}}"}.md-checkbox-enabled.md-THEME_NAME-theme .md-ripple{color:"{{primary-600}}"}.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-ripple{color:"{{background-600}}"}.md-checkbox-enabled.md-THEME_NAME-theme .md-ink-ripple{color:"{{foreground-2}}"}.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-ink-ripple{color:"{{primary-color-0.87}}"}.md-checkbox-enabled.md-THEME_NAME-theme:not(.md-checked) .md-icon{border-color:"{{foreground-2}}"}.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-icon{background-color:"{{primary-color-0.87}}"}.md-checkbox-enabled.md-THEME_NAME-theme[selected].md-focused .md-container:before{background-color:"{{primary-color-0.26}}"}.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-icon:after{border-color:"{{primary-contrast-0.87}}"}.md-checkbox-enabled.md-THEME_NAME-theme .md-indeterminate[disabled] .md-container{color:"{{foreground-3}}"}.md-checkbox-enabled.md-THEME_NAME-theme md-option .md-text{color:"{{background-900-0.87}}"}md-sidenav.md-THEME_NAME-theme,md-sidenav.md-THEME_NAME-theme md-content{background-color:"{{background-hue-1}}"}md-slider.md-THEME_NAME-theme .md-track{background-color:"{{foreground-3}}"}md-slider.md-THEME_NAME-theme .md-track-ticks{color:"{{background-contrast}}"}md-slider.md-THEME_NAME-theme .md-focus-ring{background-color:"{{accent-A200-0.2}}"}md-slider.md-THEME_NAME-theme .md-disabled-thumb{border-color:"{{background-color}}";background-color:"{{background-color}}"}md-slider.md-THEME_NAME-theme.md-min .md-thumb:after{background-color:"{{background-color}}";border-color:"{{foreground-3}}"}md-slider.md-THEME_NAME-theme.md-min .md-focus-ring{background-color:"{{foreground-3-0.38}}"}md-slider.md-THEME_NAME-theme.md-min[md-discrete] .md-thumb:after{background-color:"{{background-contrast}}";border-color:transparent}md-slider.md-THEME_NAME-theme.md-min[md-discrete] .md-sign{background-color:"{{background-400}}"}md-slider.md-THEME_NAME-theme.md-min[md-discrete] .md-sign:after{border-top-color:"{{background-400}}"}md-slider.md-THEME_NAME-theme.md-min[md-discrete][md-vertical] .md-sign:after{border-top-color:transparent;border-left-color:"{{background-400}}"}md-slider.md-THEME_NAME-theme .md-track.md-track-fill{background-color:"{{accent-color}}"}md-slider.md-THEME_NAME-theme .md-thumb:after{border-color:"{{accent-color}}";background-color:"{{accent-color}}"}md-slider.md-THEME_NAME-theme .md-sign{background-color:"{{accent-color}}"}md-slider.md-THEME_NAME-theme .md-sign:after{border-top-color:"{{accent-color}}"}md-slider.md-THEME_NAME-theme[md-vertical] .md-sign:after{border-top-color:transparent;border-left-color:"{{accent-color}}"}md-slider.md-THEME_NAME-theme .md-thumb-text{color:"{{accent-contrast}}"}md-slider.md-THEME_NAME-theme.md-warn .md-focus-ring{background-color:"{{warn-200-0.38}}"}md-slider.md-THEME_NAME-theme.md-warn .md-track.md-track-fill{background-color:"{{warn-color}}"}md-slider.md-THEME_NAME-theme.md-warn .md-thumb:after{border-color:"{{warn-color}}";background-color:"{{warn-color}}"}md-slider.md-THEME_NAME-theme.md-warn .md-sign{background-color:"{{warn-color}}"}md-slider.md-THEME_NAME-theme.md-warn .md-sign:after{border-top-color:"{{warn-color}}"}md-slider.md-THEME_NAME-theme.md-warn[md-vertical] .md-sign:after{border-top-color:transparent;border-left-color:"{{warn-color}}"}md-slider.md-THEME_NAME-theme.md-warn .md-thumb-text{color:"{{warn-contrast}}"}md-slider.md-THEME_NAME-theme.md-primary .md-focus-ring{background-color:"{{primary-200-0.38}}"}md-slider.md-THEME_NAME-theme.md-primary .md-track.md-track-fill{background-color:"{{primary-color}}"}md-slider.md-THEME_NAME-theme.md-primary .md-thumb:after{border-color:"{{primary-color}}";background-color:"{{primary-color}}"}md-slider.md-THEME_NAME-theme.md-primary .md-sign{background-color:"{{primary-color}}"}md-slider.md-THEME_NAME-theme.md-primary .md-sign:after{border-top-color:"{{primary-color}}"}md-slider.md-THEME_NAME-theme.md-primary[md-vertical] .md-sign:after{border-top-color:transparent;border-left-color:"{{primary-color}}"}md-slider.md-THEME_NAME-theme.md-primary .md-thumb-text{color:"{{primary-contrast}}"}md-slider.md-THEME_NAME-theme[disabled] .md-thumb:after{border-color:transparent}md-slider.md-THEME_NAME-theme[disabled]:not(.md-min) .md-thumb:after,md-slider.md-THEME_NAME-theme[disabled][md-discrete] .md-thumb:after{background-color:"{{foreground-3}}";border-color:transparent}md-slider.md-THEME_NAME-theme[disabled][readonly] .md-sign{background-color:"{{background-400}}"}md-slider.md-THEME_NAME-theme[disabled][readonly] .md-sign:after{border-top-color:"{{background-400}}"}md-slider.md-THEME_NAME-theme[disabled][readonly][md-vertical] .md-sign:after{border-top-color:transparent;border-left-color:"{{background-400}}"}md-slider.md-THEME_NAME-theme[disabled][readonly] .md-disabled-thumb{border-color:transparent;background-color:transparent}md-slider-container[disabled]>:first-child:not(md-slider),md-slider-container[disabled]>:last-child:not(md-slider){color:"{{foreground-3}}"}.md-subheader.md-THEME_NAME-theme{color:"{{ foreground-2-0.23 }}";background-color:"{{background-default}}"}.md-subheader.md-THEME_NAME-theme.md-primary{color:"{{primary-color}}"}.md-subheader.md-THEME_NAME-theme.md-accent{color:"{{accent-color}}"}.md-subheader.md-THEME_NAME-theme.md-warn{color:"{{warn-color}}"}md-switch.md-THEME_NAME-theme .md-ink-ripple{color:"{{background-500}}"}md-switch.md-THEME_NAME-theme .md-thumb{background-color:"{{background-50}}"}md-switch.md-THEME_NAME-theme .md-bar{background-color:"{{background-500}}"}md-switch.md-THEME_NAME-theme.md-checked .md-ink-ripple{color:"{{accent-color}}"}md-switch.md-THEME_NAME-theme.md-checked .md-thumb{background-color:"{{accent-color}}"}md-switch.md-THEME_NAME-theme.md-checked .md-bar{background-color:"{{accent-color-0.5}}"}md-switch.md-THEME_NAME-theme.md-checked.md-focused .md-thumb:before{background-color:"{{accent-color-0.26}}"}md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-ink-ripple{color:"{{primary-color}}"}md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-thumb{background-color:"{{primary-color}}"}md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-bar{background-color:"{{primary-color-0.5}}"}md-switch.md-THEME_NAME-theme.md-checked.md-primary.md-focused .md-thumb:before{background-color:"{{primary-color-0.26}}"}md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-ink-ripple{color:"{{warn-color}}"}md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-thumb{background-color:"{{warn-color}}"}md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-bar{background-color:"{{warn-color-0.5}}"}md-switch.md-THEME_NAME-theme.md-checked.md-warn.md-focused .md-thumb:before{background-color:"{{warn-color-0.26}}"}md-switch.md-THEME_NAME-theme[disabled] .md-thumb{background-color:"{{background-400}}"}md-switch.md-THEME_NAME-theme[disabled] .md-bar{background-color:"{{foreground-4}}"}md-tabs.md-THEME_NAME-theme md-tabs-wrapper{background-color:transparent;border-color:"{{foreground-4}}"}md-tabs.md-THEME_NAME-theme .md-paginator md-icon{color:"{{primary-color}}"}md-tabs.md-THEME_NAME-theme md-ink-bar{color:"{{accent-color}}";background:"{{accent-color}}"}md-tabs.md-THEME_NAME-theme .md-tab{color:"{{foreground-2}}"}md-tabs.md-THEME_NAME-theme .md-tab[disabled],md-tabs.md-THEME_NAME-theme .md-tab[disabled] md-icon{color:"{{foreground-3}}"}md-tabs.md-THEME_NAME-theme .md-tab.md-active,md-tabs.md-THEME_NAME-theme .md-tab.md-active md-icon,md-tabs.md-THEME_NAME-theme .md-tab.md-focused,md-tabs.md-THEME_NAME-theme .md-tab.md-focused md-icon{color:"{{primary-color}}"}md-tabs.md-THEME_NAME-theme .md-tab.md-focused{background:"{{primary-color-0.1}}"}md-tabs.md-THEME_NAME-theme .md-tab .md-ripple-container{color:"{{accent-A100}}"}md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper{background-color:"{{accent-color}}"}md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]),md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]) md-icon{color:"{{accent-A100}}"}md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active,md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active md-icon,md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused,md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused md-icon{color:"{{accent-contrast}}"}md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused{background:"{{accent-contrast-0.1}}"}md-tabs.md-THEME_NAME-theme.md-accent>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-ink-bar{color:"{{primary-600-1}}";background:"{{primary-600-1}}"}md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper{background-color:"{{primary-color}}"}md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]),md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]) md-icon{color:"{{primary-100}}"}md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active,md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active md-icon,md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused,md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused md-icon{color:"{{primary-contrast}}"}md-tabs.md-THEME_NAME-theme.md-primary>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused{background:"{{primary-contrast-0.1}}"}md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper{background-color:"{{warn-color}}"}md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]),md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]) md-icon{color:"{{warn-100}}"}md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active,md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active md-icon,md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused,md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused md-icon{color:"{{warn-contrast}}"}md-tabs.md-THEME_NAME-theme.md-warn>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused{background:"{{warn-contrast-0.1}}"}md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper{background-color:"{{primary-color}}"}md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]),md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]) md-icon{color:"{{primary-100}}"}md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active,md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active md-icon,md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused,md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused md-icon{color:"{{primary-contrast}}"}md-toolbar>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused{background:"{{primary-contrast-0.1}}"}md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper{background-color:"{{accent-color}}"}md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]),md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]) md-icon{color:"{{accent-A100}}"}md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active,md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active md-icon,md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused,md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused md-icon{color:"{{accent-contrast}}"}md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused{background:"{{accent-contrast-0.1}}"}md-toolbar.md-accent>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-ink-bar{color:"{{primary-600-1}}";background:"{{primary-600-1}}"}md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper{background-color:"{{warn-color}}"}md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]),md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]) md-icon{color:"{{warn-100}}"}md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active,md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-active md-icon,md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused,md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused md-icon{color:"{{warn-contrast}}"}md-toolbar.md-warn>md-tabs.md-THEME_NAME-theme>md-tabs-wrapper>md-tabs-canvas>md-pagination-wrapper>md-tab-item:not([disabled]).md-focused{background:"{{warn-contrast-0.1}}"}md-toast.md-THEME_NAME-theme .md-toast-content{background-color:#323232;color:"{{background-50}}"}md-toast.md-THEME_NAME-theme .md-toast-content .md-button{color:"{{background-50}}"}md-toast.md-THEME_NAME-theme .md-toast-content .md-button.md-highlight{color:"{{accent-color}}"}md-toast.md-THEME_NAME-theme .md-toast-content .md-button.md-highlight.md-primary{color:"{{primary-color}}"}md-toast.md-THEME_NAME-theme .md-toast-content .md-button.md-highlight.md-warn{color:"{{warn-color}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar){background-color:"{{primary-color}}";color:"{{primary-contrast}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-icon{color:"{{primary-contrast}}";fill:"{{primary-contrast}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) .md-button[disabled] md-icon{color:"{{primary-contrast-0.26}}";fill:"{{primary-contrast-0.26}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent{background-color:"{{accent-color}}";color:"{{accent-contrast}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent .md-ink-ripple{color:"{{accent-contrast}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-icon{color:"{{accent-contrast}}";fill:"{{accent-contrast}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent .md-button[disabled] md-icon{color:"{{accent-contrast-0.26}}";fill:"{{accent-contrast-0.26}}"}md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn{background-color:"{{warn-color}}";color:"{{warn-contrast}}"}.md-panel.md-tooltip.md-THEME_NAME-theme{color:"{{background-700-contrast}}";background-color:"{{background-700}}"}body.md-THEME_NAME-theme,html.md-THEME_NAME-theme{color:"{{foreground-1}}";background-color:"{{background-color}}"}');
}()}(window,window.angular),window.ngMaterial={version:{full:"1.1.8"}};
| 20,620.631579 | 69,934 | 0.721434 |
de143033199447186f4a16d25cb64c6425569e3f | 266 | js | JavaScript | src/store/CartContext.js | kathesama/meals-react-hooks | fff0c4b9f700c861651f247f0037d134f345dbbd | [
"Apache-2.0"
] | null | null | null | src/store/CartContext.js | kathesama/meals-react-hooks | fff0c4b9f700c861651f247f0037d134f345dbbd | [
"Apache-2.0"
] | 2 | 2021-10-14T21:50:41.000Z | 2022-02-27T19:26:51.000Z | src/store/CartContext.js | kathesama/meals-react-hooks | fff0c4b9f700c861651f247f0037d134f345dbbd | [
"Apache-2.0"
] | null | null | null | /*
Created by: kathe
On: 06-Oct-21 : 06-Oct-21
Project: meals-order-section11
*/
import React from 'react';
const CartContext = React.createContext({
items: [],
totalAmount: 0,
addItem: (item) => {},
removeItem: (id) => {}
});
export default CartContext;
| 15.647059 | 41 | 0.654135 |
de147edff95f5881779da8b1bf43cbd871d8329a | 1,470 | js | JavaScript | node_modules/molstar/lib/mol-data/util/grouping.js | Harry-Hopkinson/VSCoding-Sequence | 0bb8a8658cb3f91d8d6dfc0467e060e415568a8a | [
"MIT"
] | 30 | 2021-11-29T17:38:12.000Z | 2022-02-11T21:59:22.000Z | node_modules/molstar/lib/mol-data/util/grouping.js | Harry-Hopkinson/VSCoding-Sequence | 0bb8a8658cb3f91d8d6dfc0467e060e415568a8a | [
"MIT"
] | 7 | 2021-11-29T22:03:21.000Z | 2022-02-15T07:51:12.000Z | node_modules/molstar/lib/mol-data/util/grouping.js | Harry-Hopkinson/VSCoding-Sequence | 0bb8a8658cb3f91d8d6dfc0467e060e415568a8a | [
"MIT"
] | 3 | 2021-12-04T20:30:29.000Z | 2022-02-11T21:59:42.000Z | /**
* Copyright (c) 2017 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author David Sehnal <david.sehnal@gmail.com>
*/
import { Column } from '../db';
var GroupingImpl = /** @class */ (function () {
function GroupingImpl(getKey) {
this.getKey = getKey;
this.map = new Map();
this.keys = [];
this.groups = [];
}
GroupingImpl.prototype.add = function (a) {
var key = this.getKey(a);
if (!!this.map.has(key)) {
var group = this.map.get(key);
group[group.length] = a;
}
else {
var group = [a];
this.map.set(key, group);
this.keys[this.keys.length] = key;
this.groups[this.groups.length] = group;
}
};
GroupingImpl.prototype.getGrouping = function () {
return { keys: this.keys, groups: this.groups, map: this.map };
};
return GroupingImpl;
}());
export function Grouper(getKey) {
return new GroupingImpl(getKey);
}
export function groupBy(values, getKey) {
var gs = Grouper(getKey);
if (Column.is(values)) {
var v = values.value;
for (var i = 0, _i = values.rowCount; i < _i; i++)
gs.add(v(i));
}
else {
for (var i = 0, _i = values.length; i < _i; i++)
gs.add(values[i]);
}
return gs.getGrouping();
}
//# sourceMappingURL=grouping.js.map | 30.625 | 93 | 0.529252 |
de1499126e280e9ede68480484298c2a7c980a3c | 243 | js | JavaScript | common/geolocator.js | daresaydigital/algenkurt | 1dbfe16fbfbadf62d71f4c3f617d3455b99b8eaa | [
"MIT"
] | null | null | null | common/geolocator.js | daresaydigital/algenkurt | 1dbfe16fbfbadf62d71f4c3f617d3455b99b8eaa | [
"MIT"
] | null | null | null | common/geolocator.js | daresaydigital/algenkurt | 1dbfe16fbfbadf62d71f4c3f617d3455b99b8eaa | [
"MIT"
] | null | null | null | module.exports = function (locationUpdated){
navigator.geolocation.getCurrentPosition(
(position) => locationUpdated(position),
(error) => alert(error.message),
{enableHighAccuracy: true, timeout: 20000, maximumAge: 1000}
);
};
| 30.375 | 64 | 0.720165 |
de15455b0bc810cb04d2252e815b42e2150328a9 | 95 | js | JavaScript | index.js | rogvold/easyrtc-client | 4c17705c84b6f97bbe7ea2b4535603e31aaf8464 | [
"BSD-2-Clause"
] | null | null | null | index.js | rogvold/easyrtc-client | 4c17705c84b6f97bbe7ea2b4535603e31aaf8464 | [
"BSD-2-Clause"
] | null | null | null | index.js | rogvold/easyrtc-client | 4c17705c84b6f97bbe7ea2b4535603e31aaf8464 | [
"BSD-2-Clause"
] | null | null | null | // The EasyRTC server files are in the lib folder
module.exports = require('./api/easyrtc');
| 31.666667 | 50 | 0.715789 |
de15a298a62f39b272ec7040b60c7ad3476eca31 | 412 | js | JavaScript | jest.config.wallaby.js | limaofeng/asany-tree | 51b01f58c72cec03bd9ed8e135aa254b2aa00c25 | [
"MIT"
] | null | null | null | jest.config.wallaby.js | limaofeng/asany-tree | 51b01f58c72cec03bd9ed8e135aa254b2aa00c25 | [
"MIT"
] | null | null | null | jest.config.wallaby.js | limaofeng/asany-tree | 51b01f58c72cec03bd9ed8e135aa254b2aa00c25 | [
"MIT"
] | null | null | null | const jestConfig = require('tsdx/dist/createJestConfig').createJestConfig(
'.',
__dirname
);
const jestConfigFromPackage = require('./package.json').jest;
jestConfig.transform = {
...jestConfigFromPackage.transform,
...jestConfig.transform,
};
jestConfig.moduleNameMapper = jestConfigFromPackage.moduleNameMapper;
jestConfig.setupFiles = jestConfigFromPackage.setupFiles;
module.exports = jestConfig;
| 25.75 | 74 | 0.786408 |
de15f45410acc207b2d8bf6ee862f173de3163cd | 4,089 | js | JavaScript | src/js/stocks/financialsAsReported.js | kaigong-iex/iexjs | dfae9b83113e895f5f26afce3e27890583c9506b | [
"Apache-2.0"
] | 53 | 2021-03-05T23:24:59.000Z | 2022-03-27T17:38:45.000Z | src/js/stocks/financialsAsReported.js | kaigong-iex/iexjs | dfae9b83113e895f5f26afce3e27890583c9506b | [
"Apache-2.0"
] | 56 | 2021-03-05T03:43:54.000Z | 2021-11-16T02:20:07.000Z | src/js/stocks/financialsAsReported.js | kaigong-iex/iexjs | dfae9b83113e895f5f26afce3e27890583c9506b | [
"Apache-2.0"
] | 18 | 2021-03-04T18:22:03.000Z | 2022-03-31T18:50:11.000Z | /* ***************************************************************************
*
* Copyright (c) 2021, the iexjs authors.
*
* This file is part of the iexjs library, distributed under the terms of
* the Apache License 2.0. The full license can be found in the LICENSE file.
*
*/
import { _raiseIfNotStr } from "../common";
import { Client } from "../client";
import { timeSeries } from "../timeseries";
/**
* Get company's 10-Q statement
*
* @param {object} options `timeseries` options
* @param {string} options.symbol company symbol
* @param {object} standardOptions
* @param {string} standardOptions.token Access token
* @param {string} standardOptions.version API version
* @param {string} standardOptions.filter https://iexcloud.io/docs/api/#filter-results
* @param {string} standardOptions.format output format
*/
export const tenQ = (options, { token, version, filter, format } = {}) => {
const { symbol } = options;
_raiseIfNotStr(symbol);
return timeSeries(
{
id: "REPORTED_FINANCIALS",
key: symbol,
subkey: "10-Q",
...(options || {}),
},
{ token, version, filter, format },
);
};
Client.prototype.tenQ = function (options, standardOptions) {
return tenQ(options, {
token: this._token,
version: this._version,
...standardOptions,
});
};
/**
* Get company's 10-K statement
*
* @param {object} options `timeseries` options
* @param {string} options.symbol company symbol
* @param {object} standardOptions
* @param {string} standardOptions.token Access token
* @param {string} standardOptions.version API version
* @param {string} standardOptions.filter https://iexcloud.io/docs/api/#filter-results
* @param {string} standardOptions.format output format
*/
export const tenK = (options, { token, version, filter, format } = {}) => {
const { symbol } = options;
_raiseIfNotStr(symbol);
return timeSeries(
{
id: "REPORTED_FINANCIALS",
key: symbol,
subkey: "10-K",
...(options || {}),
},
{ token, version, filter, format },
);
};
Client.prototype.tenK = function (options, standardOptions) {
return tenK(options, {
token: this._token,
version: this._version,
...standardOptions,
});
};
/**
* Get company's 20-F statement
*
* @param {object} options `timeseries` options
* @param {string} options.symbol company symbol
* @param {object} standardOptions
* @param {string} standardOptions.token Access token
* @param {string} standardOptions.version API version
* @param {string} standardOptions.filter https://iexcloud.io/docs/api/#filter-results
* @param {string} standardOptions.format output format
*/
export const twentyF = (options, { token, version, filter, format } = {}) => {
const { symbol } = options;
_raiseIfNotStr(symbol);
return timeSeries(
{
id: "REPORTED_FINANCIALS",
key: symbol,
subkey: "20-F",
...(options || {}),
},
{ token, version, filter, format },
);
};
Client.prototype.twentyF = function (options, standardOptions) {
return twentyF(options, {
token: this._token,
version: this._version,
...standardOptions,
});
};
/**
* Get company's 40-F statement
*
* @param {object} options `timeseries` options
* @param {string} options.symbol company symbol
* @param {object} standardOptions
* @param {string} standardOptions.token Access token
* @param {string} standardOptions.version API version
* @param {string} standardOptions.filter https://iexcloud.io/docs/api/#filter-results
* @param {string} standardOptions.format output format
*/
export const fortyF = (options, { token, version, filter, format } = {}) => {
const { symbol } = options;
_raiseIfNotStr(symbol);
return timeSeries(
{
id: "REPORTED_FINANCIALS",
key: symbol,
subkey: "40-F",
...(options || {}),
},
{ token, version, filter, format },
);
};
Client.prototype.fortyF = function (options, standardOptions) {
return fortyF(options, {
token: this._token,
version: this._version,
...standardOptions,
});
};
| 27.816327 | 86 | 0.647836 |
de16448a474eced3cca06bab4a739f19d1ccb483 | 73 | js | JavaScript | INTRadioCheckbox/app/component/INTRadioCheckbox/index.js | Intuz-production/react-native-radio-checkbox | 550e4bab3903505ed12185ad0aa025169e795278 | [
"MIT"
] | 1 | 2019-06-18T18:31:00.000Z | 2019-06-18T18:31:00.000Z | INTRadioCheckbox/app/component/INTRadioCheckbox/index.js | Intuz-production/react-native-radio-checkbox | 550e4bab3903505ed12185ad0aa025169e795278 | [
"MIT"
] | 2 | 2020-09-05T08:40:37.000Z | 2021-05-07T20:13:55.000Z | INTRadioCheckbox/app/component/INTRadioCheckbox/index.js | Intuz-production/react-native-radio-checkbox | 550e4bab3903505ed12185ad0aa025169e795278 | [
"MIT"
] | null | null | null | import RadioCheckBox from './RadioCheckBox';
export default RadioCheckBox | 36.5 | 44 | 0.849315 |
de17e2ae380e34b1c52053d2ebbe463be092c01f | 1,750 | js | JavaScript | node_modules/react-icons/lib/fa/cc.js | antarikshray/websiterudra | 7043525ac75866c829f065b63645bdd95ae98138 | [
"MIT"
] | 2 | 2020-01-14T14:00:46.000Z | 2022-01-06T04:46:01.000Z | node_modules/react-icons/lib/fa/cc.js | antarikshray/websiterudra | 7043525ac75866c829f065b63645bdd95ae98138 | [
"MIT"
] | 26 | 2020-07-21T06:38:39.000Z | 2022-03-26T23:23:58.000Z | node_modules/react-icons/lib/fa/cc.js | antarikshray/websiterudra | 7043525ac75866c829f065b63645bdd95ae98138 | [
"MIT"
] | 5 | 2018-03-30T14:14:30.000Z | 2020-10-20T21:50:21.000Z | 'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _reactIconBase = require('react-icon-base');
var _reactIconBase2 = _interopRequireDefault(_reactIconBase);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var FaCc = function FaCc(props) {
return _react2.default.createElement(
_reactIconBase2.default,
_extends({ viewBox: '0 0 40 40' }, props),
_react2.default.createElement(
'g',
null,
_react2.default.createElement('path', { d: 'm15.2 22.2h4.1q-0.3 3-2 4.8t-4.1 1.8q-3.2 0-5-2.3t-1.8-6.1q0-3.8 1.8-6.1t4.6-2.3q2.8 0 4.5 1.7t1.9 4.8h-4q-0.1-1.2-0.7-1.9t-1.6-0.7q-1.1 0-1.7 1.2t-0.6 3.4q0 1 0.1 1.7t0.4 1.3 0.7 1 1.3 0.4q1.9 0 2.1-2.7z m13.9 0h4q-0.3 3-1.9 4.8t-4.2 1.8q-3.1 0-4.9-2.3t-1.8-6.1q0-3.8 1.8-6.1t4.5-2.3q2.9 0 4.5 1.7t1.9 4.8h-4q-0.1-1.2-0.7-1.9t-1.5-0.7q-1.1 0-1.8 1.2t-0.6 3.4q0 1 0.1 1.7t0.4 1.3 0.8 1 1.2 0.4q1 0 1.5-0.8t0.7-1.9z m6.9-2.3q0-4.1-0.3-6t-1.2-3.1q-0.1-0.2-0.2-0.3t-0.4-0.3-0.3-0.2q-1.7-1.2-13.6-1.2-12.1 0-13.7 1.2-0.1 0.1-0.4 0.2t-0.4 0.3-0.3 0.3q-0.9 1.1-1.1 3.1t-0.3 6q0 4 0.3 5.9t1.1 3.1q0.1 0.2 0.3 0.3t0.4 0.3 0.3 0.2q0.9 0.7 4.7 1t9.1 0.3q11.9 0 13.6-1.3 0.1 0 0.3-0.2t0.4-0.2 0.2-0.4q0.9-1.1 1.2-3t0.3-6z m3.8-14.8v29.8h-39.8v-29.8h39.8z' })
)
);
};
exports.default = FaCc;
module.exports = exports['default']; | 54.6875 | 803 | 0.62 |
de1815bcc8a9faf2c33fead80d7bf9e23dd146b5 | 1,068 | js | JavaScript | src/components/card.js | bangoga/gatsby-blog-website | 8c12d2c64be95dd92d9eabb853b3905d30bc895a | [
"MIT"
] | null | null | null | src/components/card.js | bangoga/gatsby-blog-website | 8c12d2c64be95dd92d9eabb853b3905d30bc895a | [
"MIT"
] | null | null | null | src/components/card.js | bangoga/gatsby-blog-website | 8c12d2c64be95dd92d9eabb853b3905d30bc895a | [
"MIT"
] | null | null | null | import React from "react"
import Crd from "../components/card.module.css"
import"bootstrap/dist/css/bootstrap.css"
import { Url } from "url";
export default props => (
<div onClick ={()=>redict(props.aid,props.title,props.full,props.imgs,props.subtitle)} className={Crd.smallCard}>
<div class="card-header">
<blockquote class="blockquote mb-0">
<p style={{ color: `teal` }}>{props.title}. {props.subtitle}</p>
</blockquote>
</div>
<div class="card-body mb-0" >
<p className={Crd.pbody}>{props.body}</p>
</div>
</div>
)
function redict(aid,title,full,imgs,subtitle) {
var info = {
"aid":aid,
"title":title,
"full":full,
"imgs":imgs,
"subtitle":subtitle
};
localStorage.setItem("info", JSON.stringify(info));
var newParam = 'user='+aid;
var param = new URLSearchParams(newParam);
console.log(param.get('user'));
var fullURL = "/fullpage" + "?user="+param.get('user');
window.location=fullURL;
}
| 28.105263 | 117 | 0.583333 |
de182479541de121c46811b51b12c2e8246c964a | 2,329 | js | JavaScript | src/components/image.js | izabellewilding/work-portfolio-v2 | 0f16ce29e7c830966df1b2364f17d0182dc206c6 | [
"MIT"
] | null | null | null | src/components/image.js | izabellewilding/work-portfolio-v2 | 0f16ce29e7c830966df1b2364f17d0182dc206c6 | [
"MIT"
] | null | null | null | src/components/image.js | izabellewilding/work-portfolio-v2 | 0f16ce29e7c830966df1b2364f17d0182dc206c6 | [
"MIT"
] | null | null | null | import React from "react"
import { StaticQuery, graphql } from "gatsby"
import Img from "gatsby-image"
// Note: You can change "images" to whatever you'd like.
const Images = ({ render }) => (
<StaticQuery
query={graphql`
query {
large: allFile {
edges {
node {
relativePath
name
childImageSharp {
fluid(maxWidth: 1400, quality: 50) {
...GatsbyImageSharpFluid
}
}
}
}
}
medium: allFile {
edges {
node {
relativePath
name
childImageSharp {
fluid(maxWidth: 1000, quality: 50) {
...GatsbyImageSharpFluid
}
}
}
}
}
small: allFile {
edges {
node {
relativePath
name
childImageSharp {
fluid(maxWidth: 500, quality: 50) {
...GatsbyImageSharpFluid
}
}
}
}
}
xsmall: allFile {
edges {
node {
relativePath
name
childImageSharp {
fluid(maxWidth: 300, quality: 50) {
...GatsbyImageSharpFluid
}
}
}
}
}
}
`}
render={render}
/>
)
const Image = ({ type = "large", src = "", fileName, ...props }) => {
const imageFolderSrc =
src.split("images/").length === 2 && src.split("images/")[1]
const render = data => {
const image = data[type].edges.find(n => {
return n.node.relativePath.includes(imageFolderSrc || fileName || src)
})
// if (src.indexOf(".gif") || src.indexOf(".svg")) {
// throw new Error(
// "SVG (.svg) and GIF (.gif) filetypes are not allowed. Try using a PNG or JPG"
// )
// }
if (!image) {
throw new Error(`The src value ${src.split("images/")[1]} was not found.
Look in the src/images directory to check the filename`)
}
return <Img {...props} fluid={image.node.childImageSharp.fluid} />
}
return <Images render={render} />
}
export default Image
| 24.260417 | 88 | 0.449549 |
de18e3c7db56a5b3649ece19423cda6844e6b18a | 264 | js | JavaScript | src/requests/posts.js | steem/qwp-antd | aa611c085e85f2d89016e49fff803712608b2d80 | [
"MIT"
] | 10 | 2017-08-21T23:47:05.000Z | 2019-01-19T00:30:45.000Z | src/requests/posts.js | steem/qwp-antd | aa611c085e85f2d89016e49fff803712608b2d80 | [
"MIT"
] | null | null | null | src/requests/posts.js | steem/qwp-antd | aa611c085e85f2d89016e49fff803712608b2d80 | [
"MIT"
] | null | null | null | import { request, uri } from 'utils'
let mock = true
let baseUri = {
m: 'posts',
p: null,
mock,
}
export async function query (params) {
let ops = 'get'
return request({
url: uri.ops({ ops, ...baseUri }),
method: 'get',
data: params,
})
}
| 15.529412 | 38 | 0.57197 |
de1a352a66e333e78ae53109f4327bac72365c4b | 5,520 | js | JavaScript | node_modules/next/dist/build/webpack/loaders/next-style-loader/runtime/injectStylesIntoStyleTag.js | cwtliu/dictionary-template | a0b0215b8cd554604d7fd932acac381d2290a6c6 | [
"MIT"
] | 2 | 2021-07-29T23:19:44.000Z | 2021-11-30T08:02:04.000Z | node_modules/next/dist/build/webpack/loaders/next-style-loader/runtime/injectStylesIntoStyleTag.js | JulianaSFreitas21/Podcastr | 8931993616116c060ff4c558cd89158dca220b2d | [
"MIT"
] | 5 | 2021-02-23T14:42:17.000Z | 2021-02-24T20:28:35.000Z | node_modules/next/dist/build/webpack/loaders/next-style-loader/runtime/injectStylesIntoStyleTag.js | GustavoNapa/moveit-next | 16f3ef99f3a04563b239a1889489e1d62bdebe1a | [
"MIT"
] | 2 | 2021-05-28T05:25:01.000Z | 2021-05-28T05:54:58.000Z | "use strict";const isOldIE=function isOldIE(){let memo;return function memorize(){if(typeof memo==='undefined'){// Test for IE <= 9 as proposed by Browserhacks
// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
// Tests for existence of standard globals is to allow style-loader
// to operate correctly into non-standard environments
// @see https://github.com/webpack-contrib/style-loader/issues/177
memo=Boolean(window&&document&&document.all&&!window.atob);}return memo;};}();const getTarget=function getTarget(){const memo={};return function memorize(target){if(typeof memo[target]==='undefined'){let styleTarget=document.querySelector(target);// Special case to return head of iframe instead of iframe itself
if(window.HTMLIFrameElement&&styleTarget instanceof window.HTMLIFrameElement){try{// This will throw an exception if access to iframe is blocked
// due to cross-origin restrictions
styleTarget=styleTarget.contentDocument.head;}catch(e){// istanbul ignore next
styleTarget=null;}}memo[target]=styleTarget;}return memo[target];};}();const stylesInDom=[];function getIndexByIdentifier(identifier){let result=-1;for(let i=0;i<stylesInDom.length;i++){if(stylesInDom[i].identifier===identifier){result=i;break;}}return result;}function modulesToDom(list,options){const idCountMap={};const identifiers=[];for(let i=0;i<list.length;i++){const item=list[i];const id=options.base?item[0]+options.base:item[0];const count=idCountMap[id]||0;const identifier=`${id} ${count}`;idCountMap[id]=count+1;const index=getIndexByIdentifier(identifier);const obj={css:item[1],media:item[2],sourceMap:item[3]};if(index!==-1){stylesInDom[index].references++;stylesInDom[index].updater(obj);}else{stylesInDom.push({identifier,updater:addStyle(obj,options),references:1});}identifiers.push(identifier);}return identifiers;}function insertStyleElement(options){const style=document.createElement('style');const attributes=options.attributes||{};if(typeof attributes.nonce==='undefined'){const nonce=// eslint-disable-next-line no-undef
typeof __webpack_nonce__!=='undefined'?__webpack_nonce__:null;if(nonce){attributes.nonce=nonce;}}Object.keys(attributes).forEach(key=>{style.setAttribute(key,attributes[key]);});if(typeof options.insert==='function'){options.insert(style);}else{const target=getTarget(options.insert||'head');if(!target){throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");}target.appendChild(style);}return style;}function removeStyleElement(style){// istanbul ignore if
if(style.parentNode===null){return false;}style.parentNode.removeChild(style);}/* istanbul ignore next */const replaceText=function replaceText(){const textStore=[];return function replace(index,replacement){textStore[index]=replacement;return textStore.filter(Boolean).join('\n');};}();function applyToSingletonTag(style,index,remove,obj){const css=remove?'':obj.media?`@media ${obj.media} {${obj.css}}`:obj.css;// For old IE
/* istanbul ignore if */if(style.styleSheet){style.styleSheet.cssText=replaceText(index,css);}else{const cssNode=document.createTextNode(css);const childNodes=style.childNodes;if(childNodes[index]){style.removeChild(childNodes[index]);}if(childNodes.length){style.insertBefore(cssNode,childNodes[index]);}else{style.appendChild(cssNode);}}}function applyToTag(style,options,obj){let css=obj.css;const media=obj.media;const sourceMap=obj.sourceMap;if(media){style.setAttribute('media',media);}else{style.removeAttribute('media');}if(sourceMap&&typeof btoa!=='undefined'){css+=`\n/*# sourceMappingURL=data:application/json;base64,${btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))))} */`;}// For old IE
/* istanbul ignore if */if(style.styleSheet){style.styleSheet.cssText=css;}else{while(style.firstChild){style.removeChild(style.firstChild);}style.appendChild(document.createTextNode(css));}}let singleton=null;let singletonCounter=0;function addStyle(obj,options){let style;let update;let remove;if(options.singleton){const styleIndex=singletonCounter++;style=singleton||(singleton=insertStyleElement(options));update=applyToSingletonTag.bind(null,style,styleIndex,false);remove=applyToSingletonTag.bind(null,style,styleIndex,true);}else{style=insertStyleElement(options);update=applyToTag.bind(null,style,options);remove=()=>{removeStyleElement(style);};}update(obj);return function updateStyle(newObj){if(newObj){if(newObj.css===obj.css&&newObj.media===obj.media&&newObj.sourceMap===obj.sourceMap){return;}update(obj=newObj);}else{remove();}};}module.exports=(list,options)=>{options=options||{};// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
// tags it will allow on a page
if(!options.singleton&&typeof options.singleton!=='boolean'){options.singleton=isOldIE();}list=list||[];let lastIdentifiers=modulesToDom(list,options);return function update(newList){newList=newList||[];if(Object.prototype.toString.call(newList)!=='[object Array]'){return;}for(let i=0;i<lastIdentifiers.length;i++){const identifier=lastIdentifiers[i];const index=getIndexByIdentifier(identifier);stylesInDom[index].references--;}const newLastIdentifiers=modulesToDom(newList,options);for(let i=0;i<lastIdentifiers.length;i++){const identifier=lastIdentifiers[i];const index=getIndexByIdentifier(identifier);if(stylesInDom[index].references===0){stylesInDom[index].updater();stylesInDom.splice(index,1);}}lastIdentifiers=newLastIdentifiers;};};
//# sourceMappingURL=injectStylesIntoStyleTag.js.map | 324.705882 | 1,048 | 0.788949 |
de1b1d42d1d5fdec7f29792915068d1f9fac4dc5 | 1,633 | js | JavaScript | routes/api/email.js | redasalmi/send-email-server | ef4d4ba037d3a1c37422ac30d143192ad68bf64c | [
"MIT"
] | null | null | null | routes/api/email.js | redasalmi/send-email-server | ef4d4ba037d3a1c37422ac30d143192ad68bf64c | [
"MIT"
] | null | null | null | routes/api/email.js | redasalmi/send-email-server | ef4d4ba037d3a1c37422ac30d143192ad68bf64c | [
"MIT"
] | null | null | null | const express = require("express");
const router = express.Router();
const cors = require("cors");
const { check, validationResult } = require("express-validator");
const formErrorsMsg = require("../../utils/formErrorMsg");
const sendEmail = require("../../utils/sendEmail");
const corsOptions = {
origin: function (origin, callback) {
if (origin === process.env.CORS_ORIGIN) {
callback(null, true);
} else {
callback("Error, not allowed by CORS.");
}
},
optionsSuccessStatus: 200,
};
router.post(
"/send",
[
cors(corsOptions),
check("email")
.isEmail()
.withMessage((value, { req }) => formErrorsMsg(value, req, "email")),
check("subject")
.isLength({ min: 4 })
.withMessage((value, { req }) => formErrorsMsg(value, req, "subject")),
check("body")
.isLength({ min: 4 })
.withMessage((value, { req }) => formErrorsMsg(value, req, "body")),
],
async (req, res) => {
const errors = validationResult(req);
if (!errors.isEmpty()) {
return res.status(403).json({ msg: errors.array() });
}
const { email, subject, body, lang = "en" } = req.body;
try {
await sendEmail(email, subject, body);
} catch (err) {
console.error(err);
return res.status(500).json({
msg:
lang === "fr"
? "Erreur serveur, veuillez réessayer plus tard."
: "Server error, please try again later.",
});
}
res.json({
msg:
lang === "fr"
? "Email envoyé avec succès."
: "Email sent successfully.",
});
}
);
module.exports = router;
| 25.920635 | 77 | 0.567055 |
de1b2b4fc16b7876875c3b12d9f8035781ed2f9b | 2,591 | js | JavaScript | pages/schnorr/schnorr.js | NicolasChoukroun/blockchain-demo | 10067b76cbcda973e97a1b240e777704ace532d7 | [
"MIT"
] | 1 | 2019-02-10T12:22:46.000Z | 2019-02-10T12:22:46.000Z | pages/schnorr/schnorr.js | NicolasChoukroun/blockchain-demo | 10067b76cbcda973e97a1b240e777704ace532d7 | [
"MIT"
] | null | null | null | pages/schnorr/schnorr.js | NicolasChoukroun/blockchain-demo | 10067b76cbcda973e97a1b240e777704ace532d7 | [
"MIT"
] | null | null | null | angular
.module('app')
.component('schnorrPage', {
templateUrl: 'pages/schnorr/schnorr.html',
controller: SchnorrPageController,
controllerAs: 'vm',
bindings: {}
});
function SchnorrPageController(lodash, bitcoinNetworks) {
var vm = this;
vm.network = lodash.find(bitcoinNetworks, ['label', 'BTC (Bitcoin)']);
vm.keyPair = null;
vm.privateKey = null;
vm.publicKey = null;
vm.message = 'Schnorr Signatures are awesome!';
vm.$onInit = function () {
vm.newPrivateKey();
};
vm.newPrivateKey = function () {
vm.keyPair = bitcoin.ECPair.makeRandom();
vm.keyPair2 = bitcoin.ECPair.makeRandom();
vm.privateKey = vm.keyPair.d.toString(16);
vm.privateKey2 = vm.keyPair2.d.toString(16);
vm.publicKey = vm.keyPair.getPublicKeyBuffer().toString('hex');
vm.publicKey2 = vm.keyPair2.getPublicKeyBuffer().toString('hex');
vm.publicKeyToVerify = vm.publicKey;
vm.signMessage();
};
vm.signMessage = function () {
vm.messageHash = bitcoin.crypto.sha256(vm.message);
vm.messageHashToVerify = vm.messageHash.toString('hex');
vm.signature = bitcoin.schnorr.sign(vm.keyPair.d, bitcoin.Buffer.from(vm.messageHashToVerify, 'hex')).toString('hex');
vm.ecdsaSignature = vm.keyPair.sign(bitcoin.Buffer.from(vm.messageHashToVerify, 'hex')).toDER().toString('hex');
vm.sizeImprovement = 100 - ((vm.signature.length / vm.ecdsaSignature.length) * 100);
vm.signatureToVerify = vm.signature;
vm.verifySignature();
vm.aggregateSignatures();
};
vm.verifySignature = function () {
vm.signatureValid = false;
try {
var publicKey = bitcoin.Buffer.from(vm.publicKeyToVerify, 'hex');
var hash = bitcoin.Buffer.from(vm.messageHashToVerify, 'hex');
var signature = bitcoin.Buffer.from(vm.signatureToVerify, 'hex');
bitcoin.schnorr.verify(publicKey, hash, signature);
vm.signatureValid = true;
} catch (e) {
vm.signatureValid = false;
}
};
vm.aggregateSignatures = function () {
var pk1 = bitcoin.BigInteger.fromHex(vm.privateKey);
var pk2 = bitcoin.BigInteger.fromHex(vm.privateKey2);
var hash = bitcoin.crypto.sha256(vm.message);
vm.aggregatedSignature = bitcoin.schnorr.aggregateSignatures([pk1, pk2], hash).toString('hex');
var publicKey1 = bitcoin.Buffer.from(vm.publicKey, 'hex');
var publicKey2 = bitcoin.Buffer.from(vm.publicKey2, 'hex');
var sumPoint = bitcoin.schnorr.pubKeyToPoint(publicKey1).add(bitcoin.schnorr.pubKeyToPoint(publicKey2));
vm.sumOfPublicKeys = sumPoint.getEncoded(true).toString('hex');
};
}
| 37.014286 | 122 | 0.691625 |
de1cb230fee123fd4cdfeb89f5197207e961ef77 | 233 | js | JavaScript | src/components/Button/404-button.js | vinczun/terminal-app | c419f33241a1b65d77232641423b2d2125caeaed | [
"MIT"
] | null | null | null | src/components/Button/404-button.js | vinczun/terminal-app | c419f33241a1b65d77232641423b2d2125caeaed | [
"MIT"
] | null | null | null | src/components/Button/404-button.js | vinczun/terminal-app | c419f33241a1b65d77232641423b2d2125caeaed | [
"MIT"
] | null | null | null | import React from 'react';
import { Link } from 'gatsby';
import '../../styles/404-button.scss';
const Button4 = () => (
<Link to='/' className='button-4' role='button'>
Back to homepage
</Link>
);
export default Button4;
| 17.923077 | 50 | 0.630901 |
de1d4c642c365944967a944315b16f0be332d789 | 172 | js | JavaScript | src/sx.js | lerebear/components | a83aa5a5b034beacc0f569a4a1b1a171e6b4a78e | [
"MIT"
] | null | null | null | src/sx.js | lerebear/components | a83aa5a5b034beacc0f569a4a1b1a171e6b4a78e | [
"MIT"
] | null | null | null | src/sx.js | lerebear/components | a83aa5a5b034beacc0f569a4a1b1a171e6b4a78e | [
"MIT"
] | null | null | null | import PropTypes from 'prop-types'
import css from '@styled-system/css'
const sx = (props) => css(props.sx)
sx.propTypes = {
sx: PropTypes.object,
}
export default sx
| 15.636364 | 36 | 0.703488 |
de1d5cb3bf544ca910f5d81514e4fe8e7ee3a66d | 1,677 | js | JavaScript | client/src/Components/NightLife/NightLifeCollectionCarousal.js | anantsharma3728/Zomato-Master | 4bbe1d4b338a4b7ab02f4832c8cdcfccce82f1b9 | [
"Apache-2.0"
] | null | null | null | client/src/Components/NightLife/NightLifeCollectionCarousal.js | anantsharma3728/Zomato-Master | 4bbe1d4b338a4b7ab02f4832c8cdcfccce82f1b9 | [
"Apache-2.0"
] | null | null | null | client/src/Components/NightLife/NightLifeCollectionCarousal.js | anantsharma3728/Zomato-Master | 4bbe1d4b338a4b7ab02f4832c8cdcfccce82f1b9 | [
"Apache-2.0"
] | null | null | null | import React from "react";
import Slider from "react-slick";
import { PrevArrow, NextArrow } from "../Carousal/Arrow";
// Import css files
import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";
const CollectionCard = (props) => {
return (
<>
<div className="w-full h-30 px-2">
<img
className="w-full h-full rounded-xl"
src={props.src}
alt="Collection Image"
/>
</div>
</>
);
};
const NightLifeCollection = () => {
const settings = {
arrows: true,
infinite: false,
slidesToShow: 4,
slidesToScroll: 1,
InitialSlide: 0,
prevArrow: <PrevArrow />,
nextArrow: <NextArrow />
}
const CollectionImages = [
"https://b.zmtcdn.com/data/collections/7e296d5b75ca7b0f88e451b49e41ba99_1618208591.jpg",
"https://b.zmtcdn.com/data/collections/a160564c07aa3014066acd8fe4b4a0a5_1617950136.jpg",
"https://b.zmtcdn.com/data/collections/b22194cb38ed18a5200b387ad8f243f0_1582015782.jpg",
"https://b.zmtcdn.com/data/collections/332d70c0ff0894191d1661739ce18fbd_1605194226.jpg",
"https://b.zmtcdn.com/data/collections/eb69f5f6e70ac43c8c0923fef39fabaf_1535615947.jpg",
"https://b.zmtcdn.com/data/collections/1b8c164e8a18878468d8aabeb0b486b1_1625812715.jpg",
"https://b.zmtcdn.com/data/collections/332d70c0ff0894191d1661739ce18fbd_1605194226.jpg",
"https://b.zmtcdn.com/data/collections/9bbfe4d4a19b26430fa930295ec88bc5_1615975717.jpg"
]
return (
<>
<Slider {...settings}>
{CollectionImages.map((image) => (
<CollectionCard src={image} />
))}
</Slider>
</>
);
};
export default NightLifeCollection;
| 28.423729 | 92 | 0.689326 |
de1d7a8542cf6268c5fb4f0e128844cc2de04dcc | 1,101 | js | JavaScript | editor/IndentListCommand.js | zhutony/substance | b323546d74996909ba0e10a8299bcab9e8526039 | [
"MIT"
] | 2,981 | 2015-04-04T14:10:14.000Z | 2022-03-23T21:09:18.000Z | editor/IndentListCommand.js | michael/substance-1 | d8dab972b8e06931f03a33b33a4e3fbd53cb2a7d | [
"MIT"
] | 1,133 | 2015-04-05T07:47:17.000Z | 2022-02-14T04:50:56.000Z | editor/IndentListCommand.js | michael/substance-1 | d8dab972b8e06931f03a33b33a4e3fbd53cb2a7d | [
"MIT"
] | 183 | 2015-07-24T15:32:14.000Z | 2022-02-05T17:19:25.000Z | import Command from './Command'
export default class IndentListCommand extends Command {
getCommandState (params) {
const editorSession = params.editorSession
const doc = editorSession.getDocument()
const sel = editorSession.getSelection()
if (sel && sel.isPropertySelection()) {
const path = sel.path
const node = doc.get(path[0])
if (node) {
if (node.isListItem()) {
return {
disabled: false
}
}
}
}
return { disabled: true }
}
execute (params) {
const commandState = params.commandState
const { disabled } = commandState
if (disabled) return
const editorSession = params.editorSession
const action = this.config.spec.action
switch (action) {
case 'indent': {
editorSession.transaction((tx) => {
tx.indent()
}, { action: 'indent' })
break
}
case 'dedent': {
editorSession.transaction((tx) => {
tx.dedent()
}, { action: 'dedent' })
break
}
default:
//
}
}
}
| 22.9375 | 56 | 0.559491 |
de1db96ef5b8e7ae4aa1766e948132580390c305 | 322 | js | JavaScript | test/toBuffer.js | godod666/gm | c011c45abb43094efd4500809fef47fbf042d573 | [
"MIT",
"Unlicense"
] | 5,293 | 2015-01-02T05:39:16.000Z | 2022-03-28T17:15:33.000Z | test/toBuffer.js | JohnKimDev/gm | e715cbdaacad21504fc04f6933be5cae1812501e | [
"MIT",
"Unlicense"
] | 488 | 2015-01-10T21:44:54.000Z | 2022-03-10T13:48:55.000Z | test/toBuffer.js | JohnKimDev/gm | e715cbdaacad21504fc04f6933be5cae1812501e | [
"MIT",
"Unlicense"
] | 589 | 2015-01-04T15:55:31.000Z | 2022-02-18T01:16:07.000Z | var assert = require('assert');
var fs = require('fs');
module.exports = function (gm, dir, finish, GM) {
if (!GM.integration)
return finish();
gm
.toBuffer(function (err, buffer) {
if (err) return finish(err);
assert.ok(buffer instanceof Buffer);
assert.ok(buffer.length);
finish();
})
}
| 16.947368 | 49 | 0.621118 |
de1dbb819beb622d8fbbbcb81934a921231f2d71 | 1,825 | js | JavaScript | index.js | locaweb/smtp-locaweb-nodejs | bfdada4996d636e2b5b73e2c5233b7c0bbbb6330 | [
"MIT"
] | 10 | 2015-06-10T17:34:21.000Z | 2021-01-04T18:21:34.000Z | index.js | locaweb/smtp-locaweb-nodejs | bfdada4996d636e2b5b73e2c5233b7c0bbbb6330 | [
"MIT"
] | null | null | null | index.js | locaweb/smtp-locaweb-nodejs | bfdada4996d636e2b5b73e2c5233b7c0bbbb6330 | [
"MIT"
] | 4 | 2016-04-24T16:27:39.000Z | 2019-10-14T06:01:36.000Z | require ('dotenv').load();
// imports
var request = require ('request'),
Email = require ('./email.js'),
// request options variable
options = {
headers: {
'x-auth-token': process.env.TOKEN,
'User-Agent': 'locaweb-smtp-nodejs'
},
rejectUnauthorized: false,
url: 'https://api.smtplw.com.br/v1/messages',
json: true
},
exports = module.exports = {};
// private function to warn about limits
function checkLimits (email){
if (email.subject.length > 998) {
console.warn ('WARNING: título das mensagens não superar 998 caracteres. API vai rejeitar a sua mensagem');
};
if (email.body.length > 1048576) {
console.warn ('WARNING: o corpo da mensagem não pode superar 1M. API vai rejeitar a sua mensagem');
};
if (email.to.length > 1000) {
console.warn ('WARNING: cada mensagem não pode ter mais de do que 1000 destinatários por minuto');
};
if (Object.keys(email.headers).length > 50) {
console.warn ('WARNING: não é possível exceder 50 headers');
}
}
exports.sendMail = function (emailObject){
checkLimits (emailObject);
//compose email
var message = options;
message.body = emailObject;
// send the api resquest
request.post(message, function (err, httpResponse, body) {
if (err) { return console.error(err); }
console.log('MENSAGEM ENVIADA PARA A API...');
console.log ('HTTP Code: ' + httpResponse.statusCode);
// console.log ('Response body: ', body); //debug only
if (httpResponse.statusCode === 201) {
console.log('Location: ' + httpResponse.headers.location);
return httpResponse.headers.location;
}
});
};
exports.Email = Email; | 30.932203 | 115 | 0.603288 |
de1e7bc902071e7c64780a5fdefe91a3157cdb3a | 3,942 | js | JavaScript | js/navbar.js | ContriveStack/AML | 5635f62de3869dd150f7880a7d5a38d01ffc30af | [
"MIT"
] | 1 | 2021-02-09T00:29:26.000Z | 2021-02-09T00:29:26.000Z | js/navbar.js | ContriveStack/AML | 5635f62de3869dd150f7880a7d5a38d01ffc30af | [
"MIT"
] | null | null | null | js/navbar.js | ContriveStack/AML | 5635f62de3869dd150f7880a7d5a38d01ffc30af | [
"MIT"
] | null | null | null | Vue.component('NavigationMenu', {
template: `<div class="welcome d-flex justify-content-center flex-column">
<div class="container">
<nav class="navbar navbar-expand-lg navbar-dark pt-4 px-0">
<a class="navbar-brand mr-5" href="#" @click.prevent="$router.push('/home')">
AML | Arweave Manuals library
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown"
aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item" :class="{active: activePage == 'home'}">
<a class="nav-link" href="#" @click.prevent="$router.push('/home')">Home</a>
</li>
<li class="nav-item dropdown" :class="{active: activePage == 'browse'}">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Browse
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="#" @click.prevent="$router.push({path: '/search/contents'})">By keywords</a>
<a class="dropdown-item" href="#" @click.prevent="$router.push({path: '/search/authors'})">By author</a>
<a class="dropdown-item" href="#" @click.prevent="$router.push({path: '/search/subject'})">By Category</a>
<a class="dropdown-item" href="#" @click.prevent="$router.push({path: '/search/owner'})">By publisher</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#" @click.prevent="$router.push({path: '/search/advanced'})">Advanced search</a>
</div>
</li>
<li class="nav-item" :class="{active: activePage == 'recent'}">
<a class="nav-link" href="#recentPages" @click.prevent="$router.push('/recent')"></a>
</li>
<li class="nav-item" :class="{active: activePage == 'mypapers'}" v-if="loggedIn">
<a class="nav-link" href="#" @click.prevent="$router.push('/mypapers')">My Uploads</a>
</li>
<li class="nav-item" :class="{active: activePage == 'upload'}" v-if="loggedIn">
<a class="nav-link" href="#" @click.prevent="$router.push('/upload')">Upload</a>
</li>
</ul>
<div class="form-inline ml-auto">
<button class="btn btn-light my-2 my-sm-0" type="button" data-toggle="modal"
data-target="#exampleModal" v-if="!loggedIn">Log in</button>
<button class="btn btn-danger my-2 my-sm-0" type="button"
v-if="loggedIn" v-on:click="signout">Log out</button>
</div>
</div>
</nav>
</div>
</div>`,
props: ['activePage'],
data: function () {
return {
loggedIn: false
}
},
mounted: function () {
this.loggedIn = Boolean(localStorage.wallet);
},
methods: {
signout: function () {
localStorage.clear();
location.reload();
}
}
});
| 58.835821 | 143 | 0.470573 |
de1f44faba5cd002ba7a8cc1415ac2ff6cc85273 | 7,243 | js | JavaScript | src/directions.js | arielresma/mapbox-directions.js | 0a7ca65fa099c65127e11d358eb22dbcd4a7f911 | [
"0BSD"
] | null | null | null | src/directions.js | arielresma/mapbox-directions.js | 0a7ca65fa099c65127e11d358eb22dbcd4a7f911 | [
"0BSD"
] | null | null | null | src/directions.js | arielresma/mapbox-directions.js | 0a7ca65fa099c65127e11d358eb22dbcd4a7f911 | [
"0BSD"
] | null | null | null | 'use strict';
var request = require('./request'),
polyline = require('polyline'),
queue = require('queue-async');
var Directions = L.Class.extend({
includes: [L.Mixin.Events],
options: {
units: 'metric'
},
statics: {
URL_TEMPLATE: 'https://api.tiles.mapbox.com/v4/directions/{profile}/{waypoints}.json?instructions=html&geometry=polyline&access_token={token}',
GEOCODER_TEMPLATE: 'https://api.tiles.mapbox.com/v4/geocode/mapbox.places/{query}.json?proximity={proximity}&access_token={token}'
},
initialize: function(options) {
L.setOptions(this, options);
this._waypoints = [];
},
getOrigin: function () {
return this.origin;
},
getDestination: function () {
return this.destination;
},
setOrigin: function (origin) {
origin = this._normalizeWaypoint(origin);
this.origin = origin;
this.fire('origin', {origin: origin});
if (!origin) {
this._unload();
}
return this;
},
setDestination: function (destination) {
destination = this._normalizeWaypoint(destination);
this.destination = destination;
this.fire('destination', {destination: destination});
if (!destination) {
this._unload();
}
return this;
},
getProfile: function() {
return this.profile || this.options.profile || 'mapbox.driving';
},
setProfile: function (profile) {
this.profile = profile;
this.fire('profile', {profile: profile});
return this;
},
getWaypoints: function() {
return this._waypoints;
},
setWaypoints: function (waypoints) {
this._waypoints = waypoints.map(this._normalizeWaypoint);
return this;
},
addWaypoint: function (index, waypoint) {
this._waypoints.splice(index, 0, this._normalizeWaypoint(waypoint));
return this;
},
removeWaypoint: function (index) {
this._waypoints.splice(index, 1);
return this;
},
setWaypoint: function (index, waypoint) {
this._waypoints[index] = this._normalizeWaypoint(waypoint);
return this;
},
reverse: function () {
var o = this.origin,
d = this.destination;
this.origin = d;
this.destination = o;
this._waypoints.reverse();
this.fire('origin', {origin: this.origin})
.fire('destination', {destination: this.destination});
return this;
},
selectRoute: function (route) {
this.fire('selectRoute', {route: route});
},
highlightRoute: function (route) {
this.fire('highlightRoute', {route: route});
},
highlightStep: function (step) {
this.fire('highlightStep', {step: step});
},
queryURL: function () {
var template = Directions.URL_TEMPLATE,
token = this.options.accessToken || L.mapbox.accessToken,
profile = this.getProfile(),
points = [this.origin].concat(this._waypoints).concat([this.destination]).map(function (point) {
return point.geometry.coordinates;
}).join(';');
if (L.mapbox.feedback) {
L.mapbox.feedback.record({directions: profile + ';' + points});
}
return L.Util.template(template, {
token: token,
profile: profile,
waypoints: points
});
},
queryable: function () {
return this.getOrigin() && this.getDestination();
},
query: function (opts) {
if (!opts) opts = {};
if (!this.queryable()) return this;
if (this._query) {
this._query.abort();
}
if (this._requests && this._requests.length) this._requests.forEach(function(request) {
request.abort();
});
this._requests = [];
var q = queue();
var pts = [this.origin, this.destination].concat(this._waypoints);
for (var i in pts) {
if (!pts[i].geometry.coordinates) {
q.defer(L.bind(this._geocode, this), pts[i], opts.proximity);
}
}
q.await(L.bind(function(err) {
if (err) {
return this.fire('error', {error: err.message});
}
this._query = request(this.queryURL(), L.bind(function (err, resp) {
this._query = null;
if (err) {
return this.fire('error', {error: err.message});
}
this.directions = resp;
this.directions.routes.forEach(function (route) {
route.geometry = {
type: "LineString",
coordinates: polyline.decode(route.geometry, 6).map(function (c) { return c.reverse(); })
};
});
if (!this.origin.properties.name) {
this.origin = this.directions.origin;
} else {
this.directions.origin = this.origin;
}
if (!this.destination.properties.name) {
this.destination = this.directions.destination;
} else {
this.directions.destination = this.destination;
}
this.fire('load', this.directions);
}, this), this);
}, this));
return this;
},
_geocode: function(waypoint, proximity, cb) {
if (!this._requests) this._requests = [];
this._requests.push(request(L.Util.template(Directions.GEOCODER_TEMPLATE, {
query: waypoint.properties.query,
token: this.options.accessToken || L.mapbox.accessToken,
proximity: proximity ? [proximity.lng, proximity.lat].join(',') : ''
}), L.bind(function (err, resp) {
if (err) {
return cb(err);
}
if (!resp.features || !resp.features.length) {
return cb(new Error("No results found for query " + waypoint.properties.query));
}
waypoint.geometry.coordinates = resp.features[0].center;
waypoint.properties.name = resp.features[0].place_name;
return cb();
}, this)));
},
_unload: function () {
this._waypoints = [];
delete this.directions;
this.fire('unload');
},
_normalizeWaypoint: function (waypoint) {
if (!waypoint || waypoint.type === 'Feature') {
return waypoint;
}
var coordinates,
properties = {};
if (waypoint instanceof L.LatLng) {
waypoint = waypoint.wrap();
coordinates = properties.query = [waypoint.lng, waypoint.lat];
} else if (typeof waypoint === 'string') {
properties.query = waypoint;
}
return {
type: 'Feature',
geometry: {
type: 'Point',
coordinates: coordinates
},
properties: properties
};
}
});
module.exports = function(options) {
return new Directions(options);
};
| 27.965251 | 151 | 0.535137 |
de1f62906e851c7ad83516cf7c3c22ddb0fafbe8 | 893 | js | JavaScript | src/remoteObject.js | davecoates/value-mirror | d07233d26d8f90c3bdc8082ebe23f20369a0dfd4 | [
"MIT"
] | null | null | null | src/remoteObject.js | davecoates/value-mirror | d07233d26d8f90c3bdc8082ebe23f20369a0dfd4 | [
"MIT"
] | null | null | null | src/remoteObject.js | davecoates/value-mirror | d07233d26d8f90c3bdc8082ebe23f20369a0dfd4 | [
"MIT"
] | null | null | null | // @flow
import type { RemoteObjectId } from './types';
// Maintain a reference to an object while it is still needed (eg. not fully expanded)
const objectById = new Map();
// Store object id by object so we can reuse ID's if same value is passed again
const idByObject = new WeakMap();
let nextObjectId = 1;
export function acquireObjectId(value:any) : RemoteObjectId {
if (idByObject.has(value)) {
return idByObject.get(value);
}
const objectId = nextObjectId++;
objectById.set(objectId, value);
idByObject.set(value, objectId);
return objectId;
}
export function getObject(objectId: RemoteObjectId) : any {
return objectById.get(objectId);
}
export function releaseObject(objectId: RemoteObjectId) : boolean {
return objectById.delete(objectId);
}
export function getObjectId(value: any) : ?RemoteObjectId {
return idByObject.get(value);
}
| 27.90625 | 86 | 0.720045 |
de1fac424c61a84e608cbe6fda1100cd57d1f896 | 855 | js | JavaScript | lib/suggest.js | LinZap/node-google-suggest | 4977eef61cf65923e568680e3705d182b9438d24 | [
"MIT"
] | 4 | 2016-07-04T07:24:19.000Z | 2019-09-24T20:26:17.000Z | lib/suggest.js | LinZap/node-google-suggest | 4977eef61cf65923e568680e3705d182b9438d24 | [
"MIT"
] | null | null | null | lib/suggest.js | LinZap/node-google-suggest | 4977eef61cf65923e568680e3705d182b9438d24 | [
"MIT"
] | 4 | 2016-10-31T01:12:35.000Z | 2020-01-06T17:49:39.000Z | var request = require('request'),
options = {
url: 'http://pagerank.tw/google-suggest/result.php',
headers: {
'Accept-Language': 'zh-TW,zh;q=0.8,en-US;q=0.6,en;q=0.4',
'User-Agent':'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36',
'Accept': '*/*',
'Referer': 'http://pagerank.tw/google-suggest/',
'Cookie': 'sc_is_visitor_unique=rx8458189.1467605106.DA7C75C8094B4F2E6778F2522A64CCE2.1.1.1.1.1.1.1.1.1',
'Connection': 'keep-alive',
'Content-Type': 'text/plain; charset=utf-8'
},
qs:{
dc: 'Google.com.tw',
}
}
module.exports = function(keywords,cb){
options.qs.q = keywords;
request(options, (err,response,body)=>{
if (!err && response.statusCode == 200) {
var res = body.split('<BR>').slice(0,-1)
cb(err,res)
}
else cb(err,null)
})
}
| 28.5 | 133 | 0.638596 |
de205cb46a5d94125f04e27eb571d19c9d6a2fd3 | 153 | js | JavaScript | client/src/components/Column/index.js | Tuzosdaniel12/googleBooks | d1b525d53ab2f8a82e69c5afc438f9cae8b9fedc | [
"MIT"
] | null | null | null | client/src/components/Column/index.js | Tuzosdaniel12/googleBooks | d1b525d53ab2f8a82e69c5afc438f9cae8b9fedc | [
"MIT"
] | null | null | null | client/src/components/Column/index.js | Tuzosdaniel12/googleBooks | d1b525d53ab2f8a82e69c5afc438f9cae8b9fedc | [
"MIT"
] | null | null | null | const Column = ({children}) =>{
return(
<div className="column is-full">
{children}
</div>
)
}
export default Column | 17 | 40 | 0.51634 |
de205f8a1eddade6968070c01ab1d75fcef24d49 | 962 | js | JavaScript | src/views/construction/workflow/bpmnAssets/properties-panel/provider/activiti/parts/PropertiesProps.js | zhanglong11/cim6d-construction-thee-web | be64ac7a0ca1ddb437727392432c8d8194350f7d | [
"MIT"
] | null | null | null | src/views/construction/workflow/bpmnAssets/properties-panel/provider/activiti/parts/PropertiesProps.js | zhanglong11/cim6d-construction-thee-web | be64ac7a0ca1ddb437727392432c8d8194350f7d | [
"MIT"
] | null | null | null | src/views/construction/workflow/bpmnAssets/properties-panel/provider/activiti/parts/PropertiesProps.js | zhanglong11/cim6d-construction-thee-web | be64ac7a0ca1ddb437727392432c8d8194350f7d | [
"MIT"
] | null | null | null | 'use strict'
var properties = require('./implementation/Properties'),
elementHelper = require('../../../helper/ElementHelper'),
cmdHelper = require('../../../helper/CmdHelper')
module.exports = function (group, element, bpmnFactory, translate) {
var propertiesEntry = properties(
element,
bpmnFactory,
{
id: 'properties',
modelProperties: ['name', 'value'],
labels: [translate('Name'), translate('Value')],
getParent: function (element, node, bo) {
return bo.extensionElements
},
createParent: function (element, bo) {
var parent = elementHelper.createElement('bpmn:ExtensionElements', { values: [] }, bo, bpmnFactory)
var cmd = cmdHelper.updateBusinessObject(element, bo, { extensionElements: parent })
return {
cmd: cmd,
parent: parent
}
}
},
translate
)
if (propertiesEntry) {
group.entries.push(propertiesEntry)
}
}
| 27.485714 | 107 | 0.621622 |
de209065fc3037ee28b3c789e5648024e15a89e8 | 153 | js | JavaScript | lib/commands/index.js | u3u/qzone-cli | 7fcefacf87427d03496f8387fe2840ecb5b55f10 | [
"MIT"
] | 5 | 2018-01-12T11:38:03.000Z | 2020-05-15T15:57:57.000Z | lib/commands/index.js | u3u/qzone-cli | 7fcefacf87427d03496f8387fe2840ecb5b55f10 | [
"MIT"
] | 51 | 2018-01-19T14:14:44.000Z | 2018-07-16T19:14:23.000Z | lib/commands/index.js | u3u/qzone-cli | 7fcefacf87427d03496f8387fe2840ecb5b55f10 | [
"MIT"
] | 1 | 2018-05-27T09:44:09.000Z | 2018-05-27T09:44:09.000Z | const login = require('./login')
const logout = require('./logout')
const downlaod = require('./download')
module.exports = { login, logout, downlaod }
| 25.5 | 44 | 0.69281 |
de209b215cd880fad26ad6b94e52a4e2be0948b4 | 1,194 | js | JavaScript | twilio/serverless/functions/twilio/sync/document/fetch.protected.js | anthonywong555/Twilio-SMS-Trivia | 0eaf3dd3d4717811f915bd80b2f5281b39443dca | [
"MIT"
] | null | null | null | twilio/serverless/functions/twilio/sync/document/fetch.protected.js | anthonywong555/Twilio-SMS-Trivia | 0eaf3dd3d4717811f915bd80b2f5281b39443dca | [
"MIT"
] | 3 | 2021-10-06T19:48:39.000Z | 2022-02-27T08:05:52.000Z | twilio/serverless/functions/twilio/sync/document/fetch.protected.js | anthonywong555/Twilio-SMS-Trivia | 0eaf3dd3d4717811f915bd80b2f5281b39443dca | [
"MIT"
] | null | null | null | let serverlessHelper = null;
let twilioHelper = null;
exports.handler = async (context, event, callback) => {
try {
const twilioClient = require('twilio')(context.ACCOUNT_SID, context.AUTH_TOKEN);
await loadServerlessModules();
const result = await driver(context, event, twilioClient);
return callback(null, result);
} catch (e) {
return callback(e);
}
};
const loadServerlessModules = async () => {
try {
const functions = Runtime.getFunctions();
const serverlessHelperPath = functions['private/boilerplate/helper'].path;
serverlessHelper = require(serverlessHelperPath);
const twilioHelperPath = functions['private/twilio/index'].path;
twilioHelper = require(twilioHelperPath);
} catch (e) {
throw e;
}
}
const driver = async (serverlessContext, serverlessEvent, twilioClient) => {
try {
const {syncServiceSID, documentSID} = serverlessEvent;
const document = await twilioClient.sync
.services(syncServiceSID)
.documents(documentSID)
.fetch();
const result = document.data;
return result;
} catch (e) {
throw serverlessHelper.formatErrorMsg(serverlessContext, 'driver', e);
}
} | 25.956522 | 84 | 0.691792 |
de209ea45ed979ec320ee0aa549d6b89e17e3b49 | 3,895 | js | JavaScript | js/frontend/ide/dialogs/tools/components/GearSettings.js | ArnoVanDerVegt/MVM | 3235914243647332688b1c53bae53b23581b8f32 | [
"MIT"
] | 14 | 2017-04-21T23:38:28.000Z | 2021-12-18T06:14:11.000Z | js/frontend/ide/dialogs/tools/components/GearSettings.js | ArnoVanDerVegt/MVM | 3235914243647332688b1c53bae53b23581b8f32 | [
"MIT"
] | 2 | 2020-10-06T18:08:11.000Z | 2022-03-25T18:57:22.000Z | js/frontend/ide/dialogs/tools/components/GearSettings.js | ArnoVanDerVegt/wheel | 3235914243647332688b1c53bae53b23581b8f32 | [
"MIT"
] | null | null | null | /**
* Wheel, copyright (c) 2020 - present by Arno van der Vegt
* Distributed under an MIT license: https://arnovandervegt.github.io/wheel/license.txt
**/
const DOMNode = require('../../../../lib/dom').DOMNode;
const Dropdown = require('../../../../lib/components/input/Dropdown').Dropdown;
const Button = require('../../../../lib/components/input/Button').Button;
const getImage = require('../../../data/images').getImage;
exports.GearSettings = class extends DOMNode {
constructor(opts) {
super(opts);
this._gears = opts.gears;
this._gearByValue = opts.gearByValue;
this._ui = opts.ui;
this._uiId = opts.uiId;
this._onAdd = opts.onAdd;
this._onUpdate = opts.onUpdate;
this._from = this.getFromGears()[0].value;
this._to = this.getToGears()[0].value;
this.initDOM(opts.parentNode);
}
initDOM(parentNode) {
this.create(
parentNode,
{
className: 'abs dialog-l gear-settings',
children: [
{
type: Dropdown,
ref: this.setRef('fromGear'),
ui: this._ui,
uiId: this._uiId,
tabIndex: 256,
images: true,
getImage: getImage,
items: this.getFromGears(),
onChange: this.onChangeFrom.bind(this)
},
{
type: Dropdown,
ref: this.setRef('toGear'),
ui: this._ui,
uiId: this._uiId,
tabIndex: 257,
images: true,
getImage: getImage,
items: this.getToGears(),
onChange: this.onChangeTo.bind(this)
},
{
type: Button,
ref: this.setRef('updateButton'),
ui: this._ui,
uiId: this._uiId,
tabIndex: 258,
value: 'Update',
color: 'blue',
disabled: true,
onClick: this.onUpdate.bind(this)
},
{
type: Button,
ui: this._ui,
uiId: this._uiId,
tabIndex: 259,
value: 'Add',
color: 'blue',
onClick: this.onAdd.bind(this)
}
]
}
);
}
getFromGears() {
return JSON.parse(JSON.stringify(this._gears));
}
getToGears() {
let gears = JSON.parse(JSON.stringify(this._gears));
gears.splice(0, 1);
return gears;
}
setValues(opts) {
let refs = this._refs;
if (opts) {
refs.fromGear.setValue(opts.from.value);
refs.toGear.setValue(opts.to.value);
}
refs.updateButton.setDisabled(!opts);
}
onChangeFrom(value) {
this._from = value;
}
onChangeTo(value) {
this._to = value;
}
onAdd() {
this._onAdd({
from: this._gearByValue[this._from],
to: this._gearByValue[this._to]
});
this._refs.updateButton.setDisabled(false);
}
onUpdate() {
this._onUpdate({
from: this._gearByValue[this._from],
to: this._gearByValue[this._to]
});
}
};
| 32.731092 | 87 | 0.414634 |
de211ce28dc9bf4087163c78aceb066008ebddf1 | 826 | js | JavaScript | docs/pages/engToHex.js | secondsabre/Tales-of-Destiny-DC | f46ee1867d29b38b565ae621cd7aca74d3b7f575 | [
"Unlicense"
] | 96 | 2021-01-24T01:01:12.000Z | 2022-02-16T10:33:03.000Z | docs/pages/engToHex.js | secondsabre/Tales-of-Destiny-DC | f46ee1867d29b38b565ae621cd7aca74d3b7f575 | [
"Unlicense"
] | 74 | 2021-03-05T03:30:55.000Z | 2022-01-09T03:11:12.000Z | docs/pages/engToHex.js | secondsabre/Tales-of-Destiny-DC | f46ee1867d29b38b565ae621cd7aca74d3b7f575 | [
"Unlicense"
] | 23 | 2021-03-04T02:59:57.000Z | 2022-02-12T21:11:19.000Z | import { useState } from "react";
import { Flex } from "@chakra-ui/react";
import { ConversionBox } from "components";
import { useFetch } from "components";
export default function Page() {
const [engValue, setEngValue] = useState("");
const { loading, data: hexValue, doFetch, error } = useFetch();
const handleChange = async (e) => {
setEngValue(e.target.value);
doFetch({
url: "api/engToHex",
body: { input: e.target.value },
});
};
return (
<Flex>
<ConversionBox
mr={4}
value={engValue}
onChange={handleChange}
id="english"
label="English"
/>
<ConversionBox
isLoading={loading}
error={error}
value={hexValue}
id="hex"
label="Hex"
readOnly={true}
/>
</Flex>
);
}
| 21.736842 | 65 | 0.558111 |
de2192537264d6590da732550ab4271bccfb56d9 | 621 | js | JavaScript | src/services/blocks/blocksListener.js | rsksmart/rsk-explorer-api | b3a0c1ebe2b5275f7e685941dbf6eb7c62c21875 | [
"MIT"
] | 14 | 2018-07-24T22:34:32.000Z | 2021-09-14T10:14:33.000Z | src/services/blocks/blocksListener.js | rsksmart/rsk-explorer-api | b3a0c1ebe2b5275f7e685941dbf6eb7c62c21875 | [
"MIT"
] | 53 | 2018-05-08T14:49:45.000Z | 2022-02-26T11:47:24.000Z | src/services/blocks/blocksListener.js | rsksmart/rsk-explorer-api | b3a0c1ebe2b5275f7e685941dbf6eb7c62c21875 | [
"MIT"
] | 17 | 2018-08-02T13:18:07.000Z | 2022-03-28T21:58:55.000Z | import { createService, services, bootStrapService } from '../serviceFactory'
import { ListenBlocks } from '../classes/ListenBlocks'
const serviceConfig = services.LISTENER
const executor = ({ create }) => { create.Emitter() }
async function main () {
try {
const { log, db, initConfig } = await bootStrapService(serviceConfig)
const { service, startService } = await createService(serviceConfig, executor, { log })
await startService()
const listener = new ListenBlocks(db, { log, initConfig }, service)
listener.start()
} catch (err) {
console.error(err)
process.exit(9)
}
}
main()
| 29.571429 | 91 | 0.687601 |
de21bbf92a165d7adaa85855b4716386b8d5e483 | 588 | js | JavaScript | src/containers/UserData/messages.js | owenk165/Jom | 67468b4d51ae762b38e8e22cb3c020c7c418983a | [
"MIT"
] | 1 | 2021-08-06T15:14:46.000Z | 2021-08-06T15:14:46.000Z | src/containers/UserData/messages.js | owenk165/Jom | 67468b4d51ae762b38e8e22cb3c020c7c418983a | [
"MIT"
] | 1 | 2021-08-07T15:17:55.000Z | 2021-08-07T15:17:55.000Z | src/containers/UserData/messages.js | owenk165/Jom | 67468b4d51ae762b38e8e22cb3c020c7c418983a | [
"MIT"
] | null | null | null | /*
* FeaturePage Messages
*
* This contains all the text for the FeaturePage component.
*/
import { defineMessages } from 'react-intl';
export const scope = 'containers.userData';
export default defineMessages({
header: {
id: `${scope}.AboutPage.header`,
defaultMessage: 'About this project',
},
githubInfoTitle: {
id: `${scope}.githubInfo.title`,
defaultMessage: 'Our github!',
},
githubInfoParagraph1: {
id: `${scope}.githubInfo.paragraph1`,
defaultMessage: 'We keep the code for the web server and prediction operation in our github!',
},
});
| 24.5 | 98 | 0.681973 |
de21f56fd5e08757c4c39ee97c43566e1a29eb21 | 5,812 | js | JavaScript | Sources/Elastos/Frameworks/Droid/DevSamples/bak/Launcher/xul/chrome/tests/browser_preferences_text.js | jingcao80/Elastos | d0f39852356bdaf3a1234743b86364493a0441bc | [
"Apache-2.0"
] | 7 | 2017-07-13T10:34:54.000Z | 2021-04-16T05:40:35.000Z | Sources/Elastos/Frameworks/Droid/DevSamples/bak/Launcher/xul/chrome/tests/browser_preferences_text.js | jingcao80/Elastos | d0f39852356bdaf3a1234743b86364493a0441bc | [
"Apache-2.0"
] | null | null | null | Sources/Elastos/Frameworks/Droid/DevSamples/bak/Launcher/xul/chrome/tests/browser_preferences_text.js | jingcao80/Elastos | d0f39852356bdaf3a1234743b86364493a0441bc | [
"Apache-2.0"
] | 9 | 2017-07-13T12:33:20.000Z | 2021-06-19T02:46:48.000Z | // Bug 571866 - --browser-chrome test for fennec preferences and text values
var gTests = [];
var gCurrentTest = null;
var expected = {
"aboutButton": {"tagName": "button", "element_id": "prefs-about-button"},
"homepage": {"element_id": "prefs-homepage",
"home_page": "prefs-homepage-default",
"blank_page": "prefs-homepage-none",
"current_page": "prefs-homepage-currentpage"},
"doneButton": {"tagName": "button"},
"contentRegion": {"element_id": "prefs-content"},
"imageRegion": {"pref": "permissions.default.image", "anonid": "input", "localName": "checkbox"},
"jsRegion": {"pref": "javascript.enabled", "anonid": "input", "localName": "checkbox"},
"privacyRegion": {"element_id": "prefs-privacy" },
"cookiesRegion": {"pref": "network.cookie.cookieBehavior", "anonid": "input", "localName": "checkbox"},
"passwordsRegion": {"pref": "signon.rememberSignons", "anonid": "input", "localName": "checkbox"},
"clearDataButton": {"element_id": "prefs-clear-data", "tagName": "button"}
};
function getPreferencesElements() {
let prefElements = {};
prefElements.panelOpen = document.getElementById("tool-panel-open");
prefElements.panelContainer = document.getElementById("panel-container");
prefElements.homeButton = document.getElementById("prefs-homepage-options");
prefElements.doneButton = document.getElementById("select-buttons-done");
prefElements.homePageControl = document.getElementById("prefs-homepage");
prefElements.selectContainer = document.getElementById("menulist-container");
return prefElements;
}
function test() {
// The "runNextTest" approach is async, so we need to call "waitForExplicitFinish()"
// We call "finish()" when the tests are finished
waitForExplicitFinish();
// Start the tests
runNextTest();
}
//------------------------------------------------------------------------------
// Iterating tests by shifting test out one by one as runNextTest is called.
function runNextTest() {
// Run the next test until all tests completed
if (gTests.length > 0) {
gCurrentTest = gTests.shift();
info(gCurrentTest.desc);
gCurrentTest.run();
}
else {
// Cleanup. All tests are completed at this point
finish();
}
}
// -----------------------------------------------------------------------------------------
// Verify preferences and text
gTests.push({
desc: "Verify Preferences and Text",
run: function(){
var prefs = getPreferencesElements();
// 1.Click preferences to view prefs
prefs.panelOpen.click();
// 2. For each prefs *verify text *the button/option type *verify height of each field to be the same
is(prefs.panelContainer.hidden, false, "Preferences should be visible");
var prefsList = document.getElementById("prefs-messages");
// Check for *About page*
let about = expected.aboutButton;
var aboutRegion = document.getAnonymousElementByAttribute(prefsList, "title", "About Fennec");
var aboutButton = document.getElementById(about.element_id);
is(aboutButton.tagName, about.tagName, "The About Fennec input must be a button");
// Check for *Startpage*
let homepage = expected.homepage;
var homepageRegion = document.getElementById(homepage.element_id);
prefs.homeButton.click();
is(prefs.selectContainer.hidden, false, "Homepage select dialog must be visible");
EventUtils.synthesizeKey("VK_ESCAPE", {}, window);
is(prefs.selectContainer.hidden, true, "Homepage select dialog must be closed");
let content = expected.contentRegion;
var contentRegion = document.getElementById(content.element_id);
// Check for *Show images*
var images = expected.imageRegion;
var imageRegion = document.getAnonymousElementByAttribute(contentRegion, "pref", images.pref);
var imageButton = document.getAnonymousElementByAttribute(imageRegion, "anonid", images.anonid);
is(imageButton.localName, images.localName, "Show images checkbox check");
// Checkbox or radiobutton?
// Check for *Enable javascript*
let js = expected.jsRegion;
var jsRegion = document.getAnonymousElementByAttribute(contentRegion, "pref", js.pref);
var jsButton = document.getAnonymousElementByAttribute(jsRegion, "anonid", js.anonid);
is(jsButton.localName, js.localName, "Enable JavaScript checkbox check");
// Checkbox or radiobutton?
let privacyRegion = expected.privacyRegion;
var prefsPrivacy = document.getElementById(privacyRegion.element_id);
// Check for *Allow cookies*
let cookies = expected.cookiesRegion;
var cookiesRegion = document.getAnonymousElementByAttribute(prefsPrivacy, "pref", cookies.pref);
var cookiesButton = document.getAnonymousElementByAttribute(cookiesRegion, "anonid", cookies.anonid);
is(cookiesButton.localName, cookies.localName, "Allow cookies checkbox check");
// Checkbox or radiobutton?
// Check for *Remember password*
let passwords = expected.passwordsRegion;
var passwordsRegion = document.getAnonymousElementByAttribute(prefsPrivacy, "pref", passwords.pref);
var passwordsButton = document.getAnonymousElementByAttribute(passwordsRegion, "anonid", passwords.anonid);
is(passwordsButton.localName, passwords.localName, "Allow cookies checkbox check");
// Checkbox or radiobutton?
// Check for *Clear Private Data*
let clearData = expected.clearDataButton;
var clearDataRegion = prefsPrivacy.lastChild;
var clearDataButton = document.getElementById(clearData.element_id);
is(clearDataButton.tagName, clearData.tagName, "Check for Clear Private Data button type");
BrowserUI.hidePanel();
is(document.getElementById("panel-container").hidden, true, "Preferences panel should be closed");
runNextTest();
}
});
| 44.030303 | 111 | 0.699759 |
de2206d3b676a0f56f821b816cd3b0833e3d9b6e | 6,016 | js | JavaScript | imports/ui/components/RateButtons.js | mdekempeneer/BadmintonHealth | 78ba03225bb1c43627cd4ad23bfb2e31d30d63ea | [
"MIT"
] | null | null | null | imports/ui/components/RateButtons.js | mdekempeneer/BadmintonHealth | 78ba03225bb1c43627cd4ad23bfb2e31d30d63ea | [
"MIT"
] | null | null | null | imports/ui/components/RateButtons.js | mdekempeneer/BadmintonHealth | 78ba03225bb1c43627cd4ad23bfb2e31d30d63ea | [
"MIT"
] | null | null | null | /* NPM packages */
import React, { Component } from 'react';
import { Meteor } from 'meteor/meteor';
import TrackerReact from 'meteor/ultimatejs:tracker-react';
/* Flex grid */
import { Row, Col } from 'react-simple-flex-grid';
import 'react-simple-flex-grid/lib/main.css';
/* Material-UI componenten */
import Button from 'material-ui/Button';
/* Material-UI icons */
import SentimentVeryDissatisfied from 'material-ui-icons/SentimentVeryDissatisfied';
import SentimentDissatisfied from 'material-ui-icons/SentimentDissatisfied';
import SentimentNeutral from 'material-ui-icons/SentimentNeutral';
import SentimentSatisfied from 'material-ui-icons/SentimentSatisfied';
import SentimentVerySatisfied from 'material-ui-icons/SentimentVerySatisfied';
/* Material-UI style */
import PropTypes from 'prop-types';
import { withStyles } from 'material-ui/styles';
/* Databases */
import { SportData } from '../../api/sportdata.js';
import { levelChecker } from '../allFunctions.js';
import badgeChecker from './Badges/badgeChecker.js';
/* Language */
const T = i18n.createComponent();
/* Styles */
const styles = theme => ({
buttonVDS: {
background: '#d7191c', color: 'black', width: 65, height: 65,
},
buttonD: {
background: '#fdae61', color: 'black', width: 65, height: 65,
marginLeft: theme.spacing.unit * 0.5
},
buttonN: {
background: '#ffffbf', color: 'black', width: 65, height: 65,
marginLeft: theme.spacing.unit * 0.5
},
buttonS: {
background: '#a6d96a', color: 'black', width: 65, height: 65,
marginLeft: theme.spacing.unit * 0.5
},
buttonVS: {
background: '#1a9641', color: 'black', width: 65, height: 65,
marginLeft: theme.spacing.unit * 0.5
}
});
var check;
class RateButtons extends TrackerReact(Component) {
constructor(props) {
super(props);
const veryDis = "/images/verydissatisfied.png";
const dissati = "/images/dissatisfied.png";
const neutral = "/images/neutral.png";
const satisfi = "/images/satisfied.png";
const verysat = "/images/verysatisfied.png";
this.state = {
subscription: {
users: Meteor.subscribe('allUsers'),
clicks: Meteor.subscribe('clicks'),
sport: Meteor.subscribe('sportdata')
},
veryDissatisfiedSrc: veryDis, dissatisfiedSrc: dissati,
neutralSrc: neutral, satisfiedSrc: satisfi,
verySatisfiedSrc: verysat
}
}
componentWillUnmount() {
this.state.subscription.users.stop();
this.state.subscription.clicks.stop();
this.state.subscription.sport.stop();
}
onClick1(event){
Meteor.call('addFeeling', this.props.type, 1, 0.25, () => {
Bert.alert('Je hebt 0.25 punt verdiend.', 'success', 'fixed-bottom');
levelChecker();
badgeChecker();
});
};
onClick2(event){
Meteor.call('addFeeling', this.props.type, 2, 0.5, () => {
Bert.alert('Je hebt 0.5 punt verdiend.', 'success', 'fixed-bottom');
levelChecker();
badgeChecker();
});
}
onClick3(event){
Meteor.call('addFeeling', this.props.type, 3, 1, () => {
Bert.alert('Je hebt 1 punt verdiend.', 'success', 'fixed-bottom');
levelChecker();
badgeChecker();
});
}
onClick4(event){
Meteor.call('addFeeling', this.props.type, 4, 1.5, () => {
Bert.alert('Je hebt 1.5 punt verdiend.', 'success', 'fixed-bottom');
levelChecker();
badgeChecker();
});
}
onClick5(event){
Meteor.call('addFeeling', this.props.type, 5, 1.75, () => {
Bert.alert('Je hebt 1.75 punt verdiend.', 'success', 'fixed-bottom');
levelChecker();
badgeChecker();
});
}
render() {
if(Meteor.users.find().fetch().length < 1 || !Meteor.userId()) {
return (<div>Contacteer de administrator</div>);
}
const { classes } = this.props;
check = SportData.find({ user: Meteor.userId(),
'result.type': this.props.type,
'result.creationDate': moment().startOf('day').format('YYYY-MM-DD')
}).count();
if (check !== 0) {
return <div />;
} else {
return (
<div>
<div className='rate-button-text'>
{this.props.question}
</div>
<div className='rate-button'>
<Button className={classes.buttonVDS} onClick={this.onClick1.bind(this)} variant='fab'>
<img src={this.state.veryDissatisfiedSrc} width="50"/>
</Button>
<Button className={classes.buttonD} onClick={this.onClick2.bind(this)} variant='fab'>
<img src={this.state.dissatisfiedSrc} width="50"/>
</Button>
<Button className={classes.buttonN} onClick={this.onClick3.bind(this)} variant='fab'>
<img src={this.state.neutralSrc} width="50"/>
</Button>
<Button className={classes.buttonS} onClick={this.onClick4.bind(this)} variant='fab'>
<img src={this.state.satisfiedSrc} width="50"/>
</Button>
<Button className={classes.buttonVS} onClick={this.onClick5.bind(this)} variant='fab'>
<img src={this.state.verySatisfiedSrc} width="50"/>
</Button>
</div>
</div>
);
}
}
}
RateButtons.propTypes = {
classes: PropTypes.object.isRequired
};
export default withStyles(styles)(RateButtons);
| 34.377143 | 111 | 0.55236 |
de2351c94c8d0180143895075e6d90361caf2433 | 1,653 | js | JavaScript | assets/js/modules/optimize/datastore/error.js | szepeviktor/site-kit-wp | 8a4b930e786da76fb71fa514785257e6dad1b56b | [
"Apache-2.0"
] | null | null | null | assets/js/modules/optimize/datastore/error.js | szepeviktor/site-kit-wp | 8a4b930e786da76fb71fa514785257e6dad1b56b | [
"Apache-2.0"
] | null | null | null | assets/js/modules/optimize/datastore/error.js | szepeviktor/site-kit-wp | 8a4b930e786da76fb71fa514785257e6dad1b56b | [
"Apache-2.0"
] | null | null | null | /**
* modules/optimize Data store: error
*
* Site Kit by Google, Copyright 2020 Google LLC
*
* 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
*
* https://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.
*/
// Actions.
const RECEIVE_ERROR = 'RECEIVE_ERROR';
export const INITIAL_STATE = { error: undefined };
export const actions = {
receiveError( error ) {
return {
type: RECEIVE_ERROR,
payload: { error },
};
},
};
export const controls = {};
export const reducer = ( state, { type, payload } ) => {
if ( RECEIVE_ERROR === type ) {
const { error } = payload;
return {
...state,
error,
};
}
return { ...state };
};
export const resolvers = {};
export const selectors = {
/**
* Retrieves the error object from state.
*
* Returns `undefined` if there is no error set.
*```
* {
* code: <String>,
* message: <String>,
* data: <Object>
* }
* ```
*
* @since 1.10.0
* @private
*
* @param {Object} state Data store's state.
* @return {(Object|undefined)} Error object.
*/
getError( state ) {
const { error } = state;
return error;
},
};
export default {
INITIAL_STATE,
actions,
controls,
reducer,
resolvers,
selectors,
};
| 20.407407 | 75 | 0.646703 |
de23ba20235ac3585c4a1b752f625672f601252d | 1,380 | js | JavaScript | client/components/Table/TableNav.js | timvisee/kutt | 49ef103b31df916958b44e59070c47cbfa3865ad | [
"MIT"
] | 2 | 2022-01-05T05:52:44.000Z | 2022-01-05T10:49:47.000Z | client/components/Table/TableNav.js | sadiqmmm/kutt | 94094505fbdc3e231fb068ccff3a11712a82eafb | [
"MIT"
] | 3 | 2020-07-20T09:35:20.000Z | 2021-08-13T02:44:39.000Z | client/components/Table/TableNav.js | sadiqmmm/kutt | 94094505fbdc3e231fb068ccff3a11712a82eafb | [
"MIT"
] | null | null | null | import React from 'react';
import PropTypes from 'prop-types';
import styled, { css } from 'styled-components';
const Wrapper = styled.div`
display: flex;
align-items: center;
`;
const Nav = styled.button`
margin-left: 12px;
padding: 5px 8px 3px;
border-radius: 4px;
border: 1px solid #eee;
background-color: transparent;
box-shadow: 0 0px 10px rgba(100, 100, 100, 0.1);
transition: all 0.2s ease-out;
${({ disabled }) =>
!disabled &&
css`
background-color: white;
cursor: pointer;
`};
:hover {
${({ disabled }) =>
!disabled &&
css`
transform: translateY(-2px);
box-shadow: 0 5px 25px rgba(50, 50, 50, 0.1);
`};
}
@media only screen and (max-width: 768px) {
padding: 4px 6px 2px;
}
`;
const Icon = styled.img`
width: 14px;
height: 14px;
@media only screen and (max-width: 768px) {
width: 12px;
height: 12px;
}
`;
const TableNav = ({ handleNav, next, prev }) => (
<Wrapper>
<Nav disabled={!prev} onClick={handleNav(-1)}>
<Icon src="/images/nav-left.svg" />
</Nav>
<Nav disabled={!next} onClick={handleNav(1)}>
<Icon src="/images/nav-right.svg" />
</Nav>
</Wrapper>
);
TableNav.propTypes = {
handleNav: PropTypes.func.isRequired,
next: PropTypes.bool.isRequired,
prev: PropTypes.bool.isRequired,
};
export default TableNav;
| 20.294118 | 53 | 0.608696 |
de244752605e94c1378db404596095ab06be3518 | 6,610 | js | JavaScript | public/index.js | GMartigny/boxed-liquid | 1f31ac39be1cea3bf8b8d1fcde1a102f9b370579 | [
"MIT"
] | 1 | 2020-03-06T09:20:33.000Z | 2020-03-06T09:20:33.000Z | public/index.js | GMartigny/flow | 1f31ac39be1cea3bf8b8d1fcde1a102f9b370579 | [
"MIT"
] | null | null | null | public/index.js | GMartigny/flow | 1f31ac39be1cea3bf8b8d1fcde1a102f9b370579 | [
"MIT"
] | null | null | null | import { Scene, Container, Circle, Particles, Slider, Text, Math as M, MouseEvent } from "https://unpkg.com/pencil.js@1.15.0/dist/pencil.esm.js";
import QuadTree, { Bound } from "./quadtree.js";
import Position from "./position.js";
// Add a button asking for full-screen
const askForFullScreen = async () => new Promise((resolve) => {
const button = document.createElement("button");
button.textContent = "Start";
document.body.appendChild(button);
button.addEventListener("click", () => {
resolve(document.documentElement.requestFullscreen());
button.remove();
});
});
// Wait for next frame
const nextFrame = () => new Promise((resolve) => {
requestAnimationFrame(() => {
requestAnimationFrame(resolve);
});
});
// Apply Verlet integration to simulate movement
const friction = 0.005; // Air friction
const verlet = (component, getForces) => {
const previous = component.position.clone();
if (component.previousPosition) {
const speed = new Position(component.position.x, component.position.y)
.subtract(component.previousPosition)
.multiply(1 - friction);
const max = 10;
const speedStrength = speed.length;
if (speedStrength > max) {
speed.multiply(max / speedStrength);
}
component.position.add(speed);
component.previousPosition.set(previous);
}
else {
component.previousPosition = previous;
}
component.position.add(getForces());
};
(async () => {
// Device acceleration
const acceleration = new Position();
// Device orientation
const orientation = new Position(0, 1);
let scene;
const isHandHeld = Boolean(navigator.maxTouchPoints);
if (isHandHeld) {
const g = 9.80665;
// Read accelerometer values
const laSensor = new LinearAccelerationSensor({
frequency: 60,
});
laSensor.addEventListener("reading", () => {
acceleration.set(-laSensor.x / (g / 4), laSensor.y / (g / 4));
});
laSensor.start();
// Read gyroscope values
const accelerometer = new Accelerometer({
frequency: 60,
});
accelerometer.addEventListener("reading", () => {
orientation.set(-accelerometer.x / g, accelerometer.y / g);
});
accelerometer.start();
// Go full-screen, this is required to lock screen rotation
await askForFullScreen();
// Wait for screen size to update
await nextFrame();
// Lock screen rotation
await screen.orientation.lock("portrait-primary");
scene = new Scene();
}
else {
scene = new Scene();
scene.on(MouseEvent.events.move, () => {
const { cursorPosition, center, width, height } = scene;
orientation.set(cursorPosition.clone().subtract(center).multiply(0.5 / width, 0.5 / height));
}, true);
}
const bounce = 0.5; // Bounce strength
const gravity = 0.4; // Gravity constant
const quadTree = new QuadTree(new Bound(0, 0, scene.width, scene.height));
const nbParticles = Math.round((scene.width * scene.height) / 1000);
const base = new Circle(undefined, 6, {
fill: "#1c79ff",
});
const liquid = new Particles(undefined, base, nbParticles, () => ({
position: new Position(M.random(scene.width), M.random(scene.height)),
}), (particle) => {
verlet(particle, () => {
const forces = new Position();
forces
.add(orientation.clone().multiply(gravity))
.add(acceleration.clone().multiply(gravity));
const { position } = particle;
const { radius } = base;
const tmp = new Position();
// Bounce on walls
[
[position.x, 0, position.y], // left
[position.y, position.x, 0], // top
[scene.width - position.x, scene.width, position.y], // right
[scene.height - position.y, position.x, scene.height], // bottom
].forEach(([distance, x, y]) => {
if (distance < radius) {
forces.add(tmp.set(position)
.subtract(x, y)
.multiply(1 / distance)
.multiply((distance - radius) * (-bounce)));
}
});
// Bounce off neighbors
const neighbors = quadTree.get(new Bound(position.x - (radius * 2), position.y - (radius * 2), radius * 4, radius * 4));
neighbors.forEach((other) => {
if (other !== position) {
const distance = position.distance(other);
const field = radius * 2;
if (distance < field) {
const pushBack = tmp.set(position)
.subtract(other)
.multiply(1 / distance)
.multiply((distance - field) * (-bounce / 2));
forces.add(pushBack);
other.subtract(pushBack);
}
}
});
return forces;
});
});
// Debug
const debug = new Container([10, 10]);
const slider = new Slider(undefined, {
min: 0.3,
max: 4,
value: 1,
});
slider.on(Slider.events.change, () => {
const objective = Math.round(slider.value * nbParticles);
const diff = objective - liquid.data.length;
// Add
if (diff > 0) {
for (let i = 0; i < diff; ++i) {
liquid.data.push({
...Particles.defaultData,
position: scene.getRandomPosition(),
});
}
}
// Remove
else if (diff < 0) {
liquid.data.splice(0, -diff);
}
});
const debugText = new Text([slider.width + 10, 0]);
debug.add(debugText, slider).hide();
scene
.add(liquid, debug)
.startLoop()
.on(Scene.events.draw, () => {
const { width, height } = scene;
if (debug.options.shown) {
debugText.text = liquid.data.length;
}
quadTree.reset(new Bound(0, 0, width, height));
liquid.data.forEach(particle => quadTree.add(particle.position));
}, true)
.on("click", () => {
debug[debug.options.shown ? "hide" : "show"]();
}, true);
})();
| 32.722772 | 145 | 0.528896 |
de247b1cfeeb19b9f17d1414e25be9a779e1a95f | 434 | js | JavaScript | src/routes/workings/middleware.js | mark86092/WorkTimeSurvey-backend | 5c81a16b6654cc842ec3de580235d488555de132 | [
"MIT"
] | 28 | 2016-07-06T02:31:28.000Z | 2021-04-10T13:09:58.000Z | src/routes/workings/middleware.js | goodjoblife/WorkTimeSurvey-backend | 43de1f69090beb96c0ea65e9a1de7d801fd8709a | [
"MIT"
] | 469 | 2016-06-28T03:44:49.000Z | 2022-02-10T06:12:12.000Z | src/routes/workings/middleware.js | mark86092/WorkTimeSurvey-backend | 5c81a16b6654cc842ec3de580235d488555de132 | [
"MIT"
] | 13 | 2016-07-24T11:40:14.000Z | 2020-09-05T15:10:28.000Z | const HttpError = require("../../libs/errors").HttpError;
function pagination(req, res, next) {
const page = parseInt(req.query.page, 10) || 0;
const limit = parseInt(req.query.limit, 10) || 25;
if (isNaN(limit) || limit > 50) {
next(new HttpError("limit is not allow", 422));
return;
}
req.pagination = {
page,
limit,
};
next();
}
module.exports = {
pagination,
};
| 19.727273 | 57 | 0.559908 |
de24e8a4c6963662915e03a440ab8be0ff808332 | 3,991 | js | JavaScript | server/controllers/ticketsController.js | Just5Coders/snapdesk | 9e1a49981b79244abd52c677c329c9315c558e27 | [
"MIT"
] | 5 | 2020-02-26T03:28:31.000Z | 2020-04-20T23:14:20.000Z | server/controllers/ticketsController.js | Just5Coders/snapdesk_1 | 9e1a49981b79244abd52c677c329c9315c558e27 | [
"MIT"
] | 7 | 2020-02-22T20:50:57.000Z | 2022-02-18T20:55:15.000Z | server/controllers/ticketsController.js | team-snapdesk/snapdesk | 63b8510e8c0363e51a49777de5f19a7555a84686 | [
"MIT"
] | 15 | 2020-02-21T23:45:19.000Z | 2020-03-03T00:01:52.000Z | /**
* ************************************
*
* @author Joshua
* @date 2/21/20
* @description get tickets data from db middleware
*
* ************************************
*/
// import access to database
const db = require('../models/userModel');
const ticketsController = {};
ticketsController.getActiveTickets = (req, res, next) => {
const getActiveTickets = `
SELECT t._id, t.snaps_given, t.message, t.status, t.timestamp, t.mentee_id, t.mentor_id, u2.name as mentee_name, t.topic
FROM tickets t
FULL OUTER JOIN users u
ON u._id = t.mentor_id
INNER JOIN users u2
ON u2._id = t.mentee_id
WHERE t.status = 'active' OR status = 'pending'
ORDER BY t._id
`;
db.query(getActiveTickets)
.then(({ rows }) => {
const formatTickets = rows.map(ticket => ({
messageInput: ticket.message,
messageRating: ticket.snaps_given,
messageId: ticket._id,
menteeId: ticket.mentee_id,
mentorName: ticket.mentor_name,//added
menteeName: ticket.mentee_name,//added
timestamp: ticket.timpestamp,
status: ticket.status,
mentorId: ticket.mentor_id || '',
topic: ticket.topic,
}))
res.locals.activeTickets = formatTickets;
return next();
})
.catch(err => next({
log: `Error in middleware ticketsController.addNewTicket: ${err}`
}))
}
ticketsController.addTicket = (req, res, next) => {
const { snaps_given, mentee_id, status, message, topic } = req.body;
const addTicket = {
text: `
INSERT INTO tickets
(snaps_given, mentee_id, status, message, timestamp, topic)
VALUES
($1, $2, $3, $4, NOW(), $5)
RETURNING _id, timestamp, mentee_id, topic;
`,
values: [snaps_given, mentee_id, status, message, topic]
}
db.query(addTicket)
.then(ticket => {
res.locals.ticketId = ticket.rows[0]._id;
res.locals.timestamp = ticket.rows[0].timestamp;
res.locals.menteeId = ticket.rows[0].mentee_id;
res.locals.topic = ticket.rows[0].topic;
return next();
})
.catch(err => next({
log: `Error in middleware ticketsController.addNewTicket: ${err}`
}))
}
ticketsController.updateTicketStatus = (req, res, next) => {
const { status, ticketId } = req.body;
const updateTicket = {
text: `
UPDATE tickets
SET status = $1
WHERE _id = $2;
`,
values: [status, ticketId]
}
db.query(updateTicket)
.then(success => next())
.catch(err => next({
log: `Error in middleware ticketsController.updateTicket: ${err}`
}));
}
ticketsController.cancelTicket = (req, res, next) => {
const { status, messageId, mentorId } = req.body;
const cancelTicket = {
text: `UPDATE tickets
SET status = $1, mentor_id = $3
WHERE _id = $2;`,
values: [status, messageId, mentorId]
};
db.query(cancelTicket)
.then(data => {
return next();
})
.catch(err => next({
log: `Error in middleware ticketsController.cancelTicket: ${err}`
}));
}
ticketsController.acceptTicket = (req, res, next) => {
const { status, ticketId, mentorId } = req.body;
const acceptTicket = {
text: `
UPDATE tickets
SET status = $1, mentor_id = $3
WHERE _id = $2;
`,
values: [status, ticketId, mentorId],
}
db.query(acceptTicket)
.then((response) => {
return next();
})
.catch(err => {
console.log('Error: ', err);
return next(err)
});
};
ticketsController.resolveTicket = (req, res, next) =>{
const { status, messageId, messageRating, feedback } = req.body;
const resolveTicket = {
text: `UPDATE tickets
SET status = $1, snaps_given = $3, feedback = $4
WHERE _id = $2;`,
values: [status, messageId, messageRating, feedback]
}
db.query(resolveTicket)
.then((result) => {
return next();
})
.catch(err =>{
console.log('Error: ', err);
return next(err);
});
};
module.exports = ticketsController; | 25.915584 | 124 | 0.599349 |
de256e657d7cae3ff3d294b82162b60ad6294318 | 643,054 | js | JavaScript | dist/index.js | wally-network/turret-lib | 087524665d4dbd6a2980725a25eeaeaa885de691 | [
"MIT"
] | null | null | null | dist/index.js | wally-network/turret-lib | 087524665d4dbd6a2980725a25eeaeaa885de691 | [
"MIT"
] | null | null | null | dist/index.js | wally-network/turret-lib | 087524665d4dbd6a2980725a25eeaeaa885de691 | [
"MIT"
] | null | null | null | /*! For license information please see index.js.LICENSE.txt */
(()=>{var __webpack_modules__={"./node_modules/@iarna/toml/lib/create-date.js":(e,t,r)=>{"use strict";const n=r("./node_modules/@iarna/toml/lib/format-num.js"),o=r.g.Date;class i extends o{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${n(2,this.getUTCMonth()+1)}-${n(2,this.getUTCDate())}`}}e.exports=e=>{const t=new i(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},"./node_modules/@iarna/toml/lib/create-datetime-float.js":(e,t,r)=>{"use strict";const n=r("./node_modules/@iarna/toml/lib/format-num.js");class o extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){return`${`${this.getUTCFullYear()}-${n(2,this.getUTCMonth()+1)}-${n(2,this.getUTCDate())}`}T${`${n(2,this.getUTCHours())}:${n(2,this.getUTCMinutes())}:${n(2,this.getUTCSeconds())}.${n(3,this.getUTCMilliseconds())}`}`}}e.exports=e=>{const t=new o(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},"./node_modules/@iarna/toml/lib/create-datetime.js":e=>{"use strict";e.exports=e=>{const t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},"./node_modules/@iarna/toml/lib/create-time.js":(e,t,r)=>{"use strict";const n=r("./node_modules/@iarna/toml/lib/format-num.js");class o extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${n(2,this.getUTCHours())}:${n(2,this.getUTCMinutes())}:${n(2,this.getUTCSeconds())}.${n(3,this.getUTCMilliseconds())}`}}e.exports=e=>{const t=new o(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}},"./node_modules/@iarna/toml/lib/format-num.js":e=>{"use strict";e.exports=(e,t)=>{for(t=String(t);t.length<e;)t="0"+t;return t}},"./node_modules/@iarna/toml/lib/parser.js":e=>{"use strict";const t=1114112;class r extends Error{constructor(e,t,n){super("[ParserError] "+e,t,n),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,r)}}class n{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}}class o{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new n(this.parseStart)}parse(e){if(0===e.length||null==e.length)return;let t;for(this._buf=String(e),this.ii=-1,this.char=-1;!1===t||this.nextChar();)t=this.runOne();this._buf=null}nextChar(){return 10===this.char&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){let e;this.char=t;do{e=this.state.parser,this.runOne()}while(this.state.parser!==e);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(e){if("function"!=typeof e)throw new r("Tried to set state to non-existent state: "+JSON.stringify(e));this.state.parser=e}goto(e){return this.next(e),this.runOne()}call(e,t){t&&this.next(t),this.stack.push(this.state),this.state=new n(e)}callNow(e,t){return this.call(e,t),this.runOne()}return(e){if(0===this.stack.length)throw this.error(new r("Stack underflow"));void 0===e&&(e=this.state.buf),this.state=this.stack.pop(),this.state.returned=e}returnNow(e){return this.return(e),this.runOne()}consume(){if(this.char===t)throw this.error(new r("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(e){return e.line=this.line,e.col=this.col,e.pos=this.pos,e}parseStart(){throw new r("Must declare a parseStart method")}}o.END=t,o.Error=r,e.exports=o},"./node_modules/@iarna/toml/lib/toml-parser.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=makeParserClass(__webpack_require__("./node_modules/@iarna/toml/lib/parser.js")),module.exports.makeParserClass=makeParserClass;class TomlError extends Error{constructor(e){super(e),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,TomlError),this.fromTOML=!0,this.wrapped=null}}TomlError.wrap=e=>{const t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t},module.exports.TomlError=TomlError;const createDateTime=__webpack_require__("./node_modules/@iarna/toml/lib/create-datetime.js"),createDateTimeFloat=__webpack_require__("./node_modules/@iarna/toml/lib/create-datetime-float.js"),createDate=__webpack_require__("./node_modules/@iarna/toml/lib/create-date.js"),createTime=__webpack_require__("./node_modules/@iarna/toml/lib/create-time.js"),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:"\t",[CHAR_n]:"\n",[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}const _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){return!!hasOwnProperty.call(e,t)||("__proto__"===t&&defineProperty(e,"__proto__",descriptor),!1)}const INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_TABLE}const TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return null!==e&&"object"==typeof e&&e[_type]===TABLE}const _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_LIST}const LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return null!==e&&"object"==typeof e&&e[_type]===LIST}let _custom;try{const utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(e){}const _inspect=_custom||"inspect";class BoxedBigInt{constructor(e){try{this.value=__webpack_require__.g.BigInt.asIntN(64,e)}catch(e){this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return null===this.value}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}}const INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),__webpack_require__.g.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return null!==e&&"object"==typeof e&&e[_type]===INTEGER}const FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return null!==e&&"object"==typeof e&&e[_type]===FLOAT}function tomlType(e){const t=typeof e;if("object"===t){if(null===e)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){return class extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(e){let t=this.ctx,r=e.key.pop();for(let r of e.key){if(hasKey(t,r)&&(!isTable(t[r])||t[r][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[r]=t[r]||Table()}if(hasKey(t,r))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[r]=e.value.valueOf():t[r]=e.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(e){return this.state.resultTable?this.state.resultTable.push(e):this.state.resultTable=[e],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){return this.char===CHAR_PERIOD?this.next(this.parseAssignKeywordPostDot):this.char!==CHAR_SP&&this.char!==CTRL_I?this.goto(this.parseAssignEqual):void 0}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(e){return this.returnNow({key:this.state.resultTable,value:e})}parseComment(){do{if(this.char===e.END||this.char===CTRL_J)return this.return()}while(this.nextChar())}parseTableOrList(){if(this.char!==CHAR_LSQB)return this.goto(this.parseTable);this.next(this.parseList)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)&&(!isTable(this.ctx[e])||this.ctx[e][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[e]=this.ctx[e]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,e))if(isTable(this.ctx[e]))this.ctx=this.ctx[e];else{if(!isList(this.ctx[e]))throw this.error(new TomlError("Can't redefine existing key"));this.ctx=this.ctx[e][this.ctx[e].length-1]}else this.ctx=this.ctx[e]=Table();return this.next(this.parseTableNext)}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)||(this.ctx[e]=List()),isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(!isList(this.ctx[e]))throw this.error(new TomlError("Can't redefine an existing key"));{const t=Table();this.ctx[e].push(t),this.ctx=t}return this.next(this.parseListEnd)}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,e)){if(isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[e]))this.ctx=this.ctx[e][this.ctx[e].length-1];else{if(!isTable(this.ctx[e]))throw this.error(new TomlError("Can't redefine an existing key"));this.ctx=this.ctx[e]}}else this.ctx=this.ctx[e]=Table();return this.next(this.parseListNext)}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(e){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(e){return this.returnNow(e)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return"-"===this.state.buf?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(!isAlphaNumHyphen(this.char)){if(0===this.state.buf.length)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}this.consume()}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let e="\\u00";return this.char<16&&(e+="0"),e+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${e} instead`))}recordMultiEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(e){try{const t=parseInt(e,16);if(t>=SURROGATE_FIRST&&t<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(t))}catch(e){throw this.error(TomlError.wrap(e))}}parseSmallUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),this.state.buf.length>=4)return this.return()}parseLargeUnicode(){if(!isHexit(this.char))throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));if(this.consume(),this.state.buf.length>=8)return this.return()}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(!isDigit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberFloat):isDigit(this.char)?void this.consume():this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS)throw this.error(new TomlError("Unexpected character, expected -, + or digit"));this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent)}parseNumberExponent(){if(!isDigit(this.char))return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf));this.consume()}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder,this.parseNumberInteger):isDigit(this.char)?(this.consume(),void(this.state.buf.length>4&&this.next(this.parseNumberInteger))):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(!isHexit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseIntegerOct(){if(!isOctit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseIntegerBin(){if(!isBit(this.char)){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{const e=Integer(this.state.buf);if(e.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(e)}}this.consume()}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));this.consume()}parseTimeMin(){if(!(this.state.buf.length<2&&isDigit(this.char))){if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}this.consume()}parseTimeSec(){if(!isDigit(this.char))throw this.error(new TomlError("Incomplete datetime"));if(this.consume(),2===this.state.buf.length)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(!(this.state.buf.length<2&&isDigit(this.char))){if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}this.consume()}parseOnlyTimeSec(){if(!isDigit(this.char))throw this.error(new TomlError("Incomplete time"));if(this.consume(),2===this.state.buf.length)return this.next(this.parseOnlyTimeFractionMaybe)}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char!==CHAR_PERIOD)return this.return(createTime(this.state.result));this.state.buf="",this.next(this.parseOnlyTimeFraction)}parseOnlyTimeFraction(){if(!isDigit(this.char)){if(this.atEndOfWord()){if(0===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume()}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else{if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS){if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume(),this.next(this.parseTimeZoneHour)}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(1===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char!==CHAR_HYPHEN&&this.char!==CHAR_PLUS){if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}this.consume(),this.next(this.parseTimeZoneHour)}}parseTimeZoneHour(){if(!isDigit(this.char))throw this.error(new TomlError("Unexpected character in datetime, expected digit"));if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}parseTimeZoneSep(){if(this.char!==CHAR_COLON)throw this.error(new TomlError("Unexpected character in datetime, expected colon"));this.consume(),this.next(this.parseTimeZoneMin)}parseTimeZoneMin(){if(!isDigit(this.char))throw this.error(new TomlError("Unexpected character in datetime, expected digit"));if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}parseBoolean(){return this.char===CHAR_t?(this.consume(),this.next(this.parseTrue_r)):this.char===CHAR_f?(this.consume(),this.next(this.parseFalse_a)):void 0}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(e){if(this.state.resultArr){const t=this.state.resultArr[_contentType],r=tomlType(e);if(t!==r)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${t} and ${r}`))}else this.state.resultArr=InlineList(tomlType(e));return isFloat(e)||isInteger(e)?this.state.resultArr.push(e.valueOf()):this.state.resultArr.push(e),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(e){let t=this.state.resultTable,r=e.key.pop();for(let r of e.key){if(hasKey(t,r)&&(!isTable(t[r])||t[r][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[r]=t[r]||Table()}if(hasKey(t,r))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[r]=e.value.valueOf():t[r]=e.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}}},"./node_modules/@iarna/toml/parse-async.js":(e,t,r)=>{"use strict";e.exports=function(e,t){t||(t={});const r=t.blocksize||40960,i=new n;return new Promise(((e,t)=>{setImmediate(s,0,r,e,t)}));function s(t,r,n,a){if(t>=e.length)try{return n(i.finish())}catch(t){return a(o(t,e))}try{i.parse(e.slice(t,t+r)),setImmediate(s,t+r,r,n,a)}catch(t){a(o(t,e))}}};const n=r("./node_modules/@iarna/toml/lib/toml-parser.js"),o=r("./node_modules/@iarna/toml/parse-pretty-error.js")},"./node_modules/@iarna/toml/parse-pretty-error.js":e=>{"use strict";e.exports=function(e,t){if(null==e.pos||null==e.line)return e;let r=e.message;if(r+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:\n`,t&&t.split){const n=t.split(/\n/),o=String(Math.min(n.length,e.line+3)).length;let i=" ";for(;i.length<o;)i+=" ";for(let t=Math.max(0,e.line-1);t<Math.min(n.length,e.line+2);++t){let s=String(t+1);if(s.length<o&&(s=" "+s),e.line===t){r+=s+"> "+n[t]+"\n",r+=i+" ";for(let t=0;t<e.col;++t)r+=" ";r+="^\n"}else r+=s+": "+n[t]+"\n"}}return e.message=r+"\n",e}},"./node_modules/@iarna/toml/parse-stream.js":(e,t,r)=>{"use strict";e.exports=function(e){return e?function(e){const t=new o;return e.setEncoding("utf8"),new Promise(((r,n)=>{let o,i=!1,s=!1;function a(){if(i=!0,!o)try{r(t.finish())}catch(e){n(e)}}function u(e){s=!0,n(e)}function l(){let r;for(o=!0;null!==(r=e.read());)try{t.parse(r)}catch(e){return u(e)}if(o=!1,i)return a();s||e.once("readable",l)}e.once("end",a),e.once("error",u),l()}))}(e):function(){const e=new o;return new n.Transform({objectMode:!0,transform(t,r,n){try{e.parse(t.toString(r))}catch(e){this.emit("error",e)}n()},flush(t){try{this.push(e.finish())}catch(e){this.emit("error",e)}t()}})}()};const n=r("?bfcf"),o=r("./node_modules/@iarna/toml/lib/toml-parser.js")},"./node_modules/@iarna/toml/parse-string.js":(e,t,r)=>{"use strict";e.exports=function(e){r.g.Buffer&&r.g.Buffer.isBuffer(e)&&(e=e.toString("utf8"));const t=new n;try{return t.parse(e),t.finish()}catch(t){throw o(t,e)}};const n=r("./node_modules/@iarna/toml/lib/toml-parser.js"),o=r("./node_modules/@iarna/toml/parse-pretty-error.js")},"./node_modules/@iarna/toml/parse.js":(e,t,r)=>{"use strict";e.exports=r("./node_modules/@iarna/toml/parse-string.js"),e.exports.async=r("./node_modules/@iarna/toml/parse-async.js"),e.exports.stream=r("./node_modules/@iarna/toml/parse-stream.js"),e.exports.prettyError=r("./node_modules/@iarna/toml/parse-pretty-error.js")},"./node_modules/@iarna/toml/stringify.js":e=>{"use strict";function t(e){return new Error("Can only stringify objects, not "+e)}function r(e){return Object.keys(e).filter((t=>i(e[t])))}function n(e){let t=Array.isArray(e)?[]:Object.prototype.hasOwnProperty.call(e,"__proto__")?{["__proto__"]:void 0}:{};for(let r of Object.keys(e))e[r]&&"function"==typeof e[r].toJSON&&!("toISOString"in e[r])?t[r]=e[r].toJSON():t[r]=e[r];return t}function o(e,u,l){var d,h;d=r(l=n(l)),h=function(e){return Object.keys(e).filter((t=>!i(e[t])))}(l);var p=[],_=u||"";d.forEach((e=>{var t=s(l[e]);"undefined"!==t&&"null"!==t&&p.push(_+a(e)+" = "+c(l[e],!0))})),p.length>0&&p.push("");var m=e&&d.length>0?u+" ":"";return h.forEach((i=>{p.push(function(e,i,u,l){var c=s(l);if("array"===c)return function(e,r,i,u){f(u=n(u));var l=s(u[0]);if("table"!==l)throw t(l);var c=e+a(i),d="";return u.forEach((e=>{d.length>0&&(d+="\n"),d+=r+"[["+c+"]]\n",d+=o(c+".",r,e)})),d}(e,i,u,l);if("table"===c)return function(e,t,n,i){var s=e+a(n),u="";r(i).length>0&&(u+=t+"["+s+"]\n");return u+o(s+".",t,i)}(e,i,u,l);throw t(c)}(e,m,i,l[i]))})),p.join("\n")}function i(e){switch(s(e)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return 0===e.length||"table"!==s(e[0]);case"table":return 0===Object.keys(e).length;default:return!1}}function s(e){return void 0===e?"undefined":null===e?"null":"bigint"==typeof e||Number.isInteger(e)&&!Object.is(e,-0)?"integer":"number"==typeof e?"float":"boolean"==typeof e?"boolean":"string"==typeof e?"string":"toISOString"in e?isNaN(e)?"undefined":"datetime":Array.isArray(e)?"array":"table"}function a(e){var t=String(e);return/^[-A-Za-z0-9_]+$/.test(t)?t:u(t)}function u(e){return'"'+l(e).replace(/"/g,'\\"')+'"'}function l(e){return e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,(e=>"\\u"+function(e,t){for(;t.length<e;)t="0"+t;return t}(4,e.codePointAt(0).toString(16))))}function c(e,t){let r=s(e);return"string"===r&&(t&&/\n/.test(e)?r="string-multiline":!/[\b\t\n\f\r']/.test(e)&&/"/.test(e)&&(r="string-literal")),d(e,r)}function d(e,r){switch(r||(r=s(e)),r){case"string-multiline":return function(e){let t=e.split(/\n/).map((e=>l(e).replace(/"(?="")/g,'\\"'))).join("\n");return'"'===t.slice(-1)&&(t+="\\\n"),'"""\n'+t+'"""'}(e);case"string":return u(e);case"string-literal":return"'"+e+"'";case"integer":return h(e);case"float":return function(e){if(e===1/0)return"inf";if(e===-1/0)return"-inf";if(Object.is(e,NaN))return"nan";if(Object.is(e,-0))return"-0.0";var t=String(e).split("."),r=t[0],n=t[1]||0;return h(r)+"."+n}(e);case"boolean":return function(e){return String(e)}(e);case"datetime":return function(e){return e.toISOString()}(e);case"array":return function(e){const t=f(e=n(e));var r="[",o=e.map((e=>d(e,t)));o.join(", ").length>60||/\n/.test(o)?r+="\n "+o.join(",\n ")+"\n":r+=" "+o.join(", ")+(o.length>0?" ":"");return r+"]"}(e.filter((e=>"null"!==s(e)&&"undefined"!==s(e)&&"nan"!==s(e))));case"table":return function(e){e=n(e);var t=[];return Object.keys(e).forEach((r=>{t.push(a(r)+" = "+c(e[r],!1))})),"{ "+t.join(", ")+(t.length>0?" ":"")+"}"}(e);default:throw t(r)}}function h(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}function f(e){const t=function(e){var t=s(e[0]);return e.every((e=>s(e)===t))?t:e.every((e=>{return"float"===(t=s(e))||"integer"===t;var t}))?"float":"mixed"}(e);if("mixed"===t)throw new Error("Array values can't have mixed types");return t}e.exports=function(e){if(null===e)throw t("null");if(void 0===e)throw t("undefined");if("object"!=typeof e)throw t(typeof e);"function"==typeof e.toJSON&&(e=e.toJSON());if(null==e)return null;const r=s(e);if("table"!==r)throw t(r);return o("","",e)},e.exports.value=d},"./node_modules/@iarna/toml/toml.js":(e,t,r)=>{"use strict";t.parse=r("./node_modules/@iarna/toml/parse.js"),t.stringify=r("./node_modules/@iarna/toml/stringify.js")},"./node_modules/base32.js/base32.js":(e,t)=>{"use strict";var r=function(e,t){return t||(t={}),e.split("").forEach((function(e,r){e in t||(t[e]=r)})),t},n={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",charmap:{0:14,1:8}};n.charmap=r(n.alphabet,n.charmap);var o={alphabet:"0123456789ABCDEFGHJKMNPQRSTVWXYZ",charmap:{O:0,I:1,L:1}};o.charmap=r(o.alphabet,o.charmap);var i={alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",charmap:{}};function s(e){if(this.buf=[],this.shift=8,this.carry=0,e){switch(e.type){case"rfc4648":this.charmap=t.rfc4648.charmap;break;case"crockford":this.charmap=t.crockford.charmap;break;case"base32hex":this.charmap=t.base32hex.charmap;break;default:throw new Error("invalid type")}e.charmap&&(this.charmap=e.charmap)}}function a(e){if(this.buf="",this.shift=3,this.carry=0,e){switch(e.type){case"rfc4648":this.alphabet=t.rfc4648.alphabet;break;case"crockford":this.alphabet=t.crockford.alphabet;break;case"base32hex":this.alphabet=t.base32hex.alphabet;break;default:throw new Error("invalid type")}e.alphabet?this.alphabet=e.alphabet:e.lc&&(this.alphabet=this.alphabet.toLowerCase())}}i.charmap=r(i.alphabet,i.charmap),s.prototype.charmap=n.charmap,s.prototype.write=function(e){var t=this.charmap,r=this.buf,n=this.shift,o=this.carry;return e.toUpperCase().split("").forEach((function(e){if("="!=e){var i=255&t[e];(n-=5)>0?o|=i<<n:n<0?(r.push(o|i>>-n),o=i<<(n+=8)&255):(r.push(o|i),n=8,o=0)}})),this.shift=n,this.carry=o,this},s.prototype.finalize=function(e){return e&&this.write(e),8!==this.shift&&0!==this.carry&&(this.buf.push(this.carry),this.shift=8,this.carry=0),this.buf},a.prototype.alphabet=n.alphabet,a.prototype.write=function(e){var t,r,n,o=this.shift,i=this.carry;for(n=0;n<e.length;n++)t=i|(r=e[n])>>o,this.buf+=this.alphabet[31&t],o>5&&(t=r>>(o-=5),this.buf+=this.alphabet[31&t]),i=r<<(o=5-o),o=8-o;return this.shift=o,this.carry=i,this},a.prototype.finalize=function(e){return e&&this.write(e),3!==this.shift&&(this.buf+=this.alphabet[31&this.carry],this.shift=3,this.carry=0),this.buf},t.encode=function(e,t){return new a(t).finalize(e)},t.decode=function(e,t){return new s(t).finalize(e)},t.Decoder=s,t.Encoder=a,t.charmap=r,t.crockford=o,t.rfc4648=n,t.base32hex=i},"./node_modules/base64-js/index.js":(e,t)=>{"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=u(e),s=i[0],a=i[1],l=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),c=0,d=a>0?s-4:s;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],l[c++]=t>>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,l[c++]=255&t);1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=16383,a=0,u=n-o;a<u;a+=s)i.push(l(e,a,a+s>u?u:a+s));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=i.length;s<a;++s)r[s]=i[s],n[i.charCodeAt(s)]=s;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,n){for(var o,i,s=[],a=t;a<n;a+=3)o=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},"./node_modules/bignumber.js/bignumber.js":function(e,t,r){var n;!function(o){"use strict";var i,s=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,a=Math.ceil,u=Math.floor,l=" not a boolean or binary digit",c="rounding mode",d="number type has more than 15 significant digits",h="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",f=1e14,p=14,_=9007199254740991,m=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],y=1e7,v=1e9;function g(e){var t=0|e;return e>0||e===t?t:t-1}function b(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(t=e[n++]+"",r=p-t.length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function w(e,t){var r,n,o=e.c,i=t.c,s=e.s,a=t.s,u=e.e,l=t.e;if(!s||!a)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=u==l,!o||!i)return n?0:!o^r?1:-1;if(!n)return u>l^r?1:-1;for(a=(u=o.length)<(l=i.length)?u:l,s=0;s<a;s++)if(o[s]!=i[s])return o[s]>i[s]^r?1:-1;return u==l?0:u>l^r?1:-1}function j(e,t,r){return(e=A(e))>=t&&e<=r}function k(e){return"[object Array]"==Object.prototype.toString.call(e)}function S(e,t,r){for(var n,o,i=[0],s=0,a=e.length;s<a;){for(o=i.length;o--;i[o]*=t);for(i[n=0]+=h.indexOf(e.charAt(s++));n<i.length;n++)i[n]>r-1&&(null==i[n+1]&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function x(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function T(e,t){var r,n;if(t<0){for(n="0.";++t;n+="0");e=n+e}else if(++t>(r=e.length)){for(n="0",t-=r;--t;n+="0");e+=n}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}function A(e){return(e=parseFloat(e))<0?a(e):u(e)}i=function e(t){var r,n,o,i,E,O,R,C,P,M=0,I=z.prototype,N=new z(1),L=20,B=4,D=-7,F=21,U=-1e7,H=1e7,q=!0,V=Q,K=!1,Y=1,W=0,X={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0};function z(e,t){var r,o,i,a,l,c,f=this;if(!(f instanceof z))return q&&ee(26,"constructor call without new",e),new z(e,t);if(null!=t&&V(t,2,64,M,"base")){if(c=e+"",10==(t|=0))return te(f=new z(e instanceof z?e:c),L+f.e+1,B);if((a="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(r="["+h.slice(0,t)+"]+")+"(?:\\."+r+")?$",t<37?"i":"").test(c))return n(f,c,a,t);a?(f.s=1/e<0?(c=c.slice(1),-1):1,q&&c.replace(/^0\.0*|\./,"").length>15&&ee(M,d,e),a=!1):f.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1,c=G(c,10,t,f.s)}else{if(e instanceof z)return f.s=e.s,f.e=e.e,f.c=(e=e.c)?e.slice():e,void(M=0);if((a="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(o=0,i=e;i>=10;i/=10,o++);return f.e=o,f.c=[e],void(M=0)}c=e+""}else{if(!s.test(c=e+""))return n(f,c,a);f.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1}}for((o=c.indexOf("."))>-1&&(c=c.replace(".","")),(i=c.search(/e/i))>0?(o<0&&(o=i),o+=+c.slice(i+1),c=c.substring(0,i)):o<0&&(o=c.length),i=0;48===c.charCodeAt(i);i++);for(l=c.length;48===c.charCodeAt(--l););if(c=c.slice(i,l+1))if(l=c.length,a&&q&&l>15&&(e>_||e!==u(e))&&ee(M,d,f.s*e),(o=o-i-1)>H)f.c=f.e=null;else if(o<U)f.c=[f.e=0];else{if(f.e=o,f.c=[],i=(o+1)%p,o<0&&(i+=p),i<l){for(i&&f.c.push(+c.slice(0,i)),l-=p;i<l;)f.c.push(+c.slice(i,i+=p));c=c.slice(i),i=p-c.length}else i-=l;for(;i--;c+="0");f.c.push(+c)}else f.c=[f.e=0];M=0}function G(e,t,n,o){var i,s,a,u,l,c,d,f=e.indexOf("."),p=L,_=B;for(n<37&&(e=e.toLowerCase()),f>=0&&(a=W,W=0,e=e.replace(".",""),l=(d=new z(n)).pow(e.length-f),W=a,d.c=S(T(b(l.c),l.e),10,t),d.e=d.c.length),s=a=(c=S(e,n,t)).length;0==c[--a];c.pop());if(!c[0])return"0";if(f<0?--s:(l.c=c,l.e=s,l.s=o,c=(l=r(l,d,p,_,t)).c,u=l.r,s=l.e),f=c[i=s+p+1],a=t/2,u=u||i<0||null!=c[i+1],u=_<4?(null!=f||u)&&(0==_||_==(l.s<0?3:2)):f>a||f==a&&(4==_||u||6==_&&1&c[i-1]||_==(l.s<0?8:7)),i<1||!c[0])e=u?T("1",-p):"0";else{if(c.length=i,u)for(--t;++c[--i]>t;)c[i]=0,i||(++s,c=[1].concat(c));for(a=c.length;!c[--a];);for(f=0,e="";f<=a;e+=h.charAt(c[f++]));e=T(e,s)}return e}function $(e,t,r,n){var o,i,s,a,u;if(r=null!=r&&V(r,0,8,n,c)?0|r:B,!e.c)return e.toString();if(o=e.c[0],s=e.e,null==t)u=b(e.c),u=19==n||24==n&&s<=D?x(u,s):T(u,s);else if(i=(e=te(new z(e),t,r)).e,a=(u=b(e.c)).length,19==n||24==n&&(t<=i||i<=D)){for(;a<t;u+="0",a++);u=x(u,i)}else if(t-=s,u=T(u,i),i+1>a){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=i-a)>0)for(i+1==a&&(u+=".");t--;u+="0");return e.s<0&&o?"-"+u:u}function Z(e,t){var r,n,o=0;for(k(e[0])&&(e=e[0]),r=new z(e[0]);++o<e.length;){if(!(n=new z(e[o])).s){r=n;break}t.call(r,n)&&(r=n)}return r}function Q(e,t,r,n,o){return(e<t||e>r||e!=A(e))&&ee(n,(o||"decimal places")+(e<t||e>r?" out of range":" not an integer"),e),!0}function J(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*p-1)>H?e.c=e.e=null:r<U?e.c=[e.e=0]:(e.e=r,e.c=t),e}function ee(e,t,r){var n=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][e]+"() "+t+": "+r);throw n.name="BigNumber Error",M=0,n}function te(e,t,r,n){var o,i,s,l,c,d,h,_=e.c,y=m;if(_){e:{for(o=1,l=_[0];l>=10;l/=10,o++);if((i=t-o)<0)i+=p,s=t,h=(c=_[d=0])/y[o-s-1]%10|0;else if((d=a((i+1)/p))>=_.length){if(!n)break e;for(;_.length<=d;_.push(0));c=h=0,o=1,s=(i%=p)-p+1}else{for(c=l=_[d],o=1;l>=10;l/=10,o++);h=(s=(i%=p)-p+o)<0?0:c/y[o-s-1]%10|0}if(n=n||t<0||null!=_[d+1]||(s<0?c:c%y[o-s-1]),n=r<4?(h||n)&&(0==r||r==(e.s<0?3:2)):h>5||5==h&&(4==r||n||6==r&&(i>0?s>0?c/y[o-s]:0:_[d-1])%10&1||r==(e.s<0?8:7)),t<1||!_[0])return _.length=0,n?(t-=e.e+1,_[0]=y[(p-t%p)%p],e.e=-t||0):_[0]=e.e=0,e;if(0==i?(_.length=d,l=1,d--):(_.length=d+1,l=y[p-i],_[d]=s>0?u(c/y[o-s]%y[s])*l:0),n)for(;;){if(0==d){for(i=1,s=_[0];s>=10;s/=10,i++);for(s=_[0]+=l,l=1;s>=10;s/=10,l++);i!=l&&(e.e++,_[0]==f&&(_[0]=1));break}if(_[d]+=l,_[d]!=f)break;_[d--]=0,l=1}for(i=_.length;0===_[--i];_.pop());}e.e>H?e.c=e.e=null:e.e<U&&(e.c=[e.e=0])}return e}return z.another=e,z.ROUND_UP=0,z.ROUND_DOWN=1,z.ROUND_CEIL=2,z.ROUND_FLOOR=3,z.ROUND_HALF_UP=4,z.ROUND_HALF_DOWN=5,z.ROUND_HALF_EVEN=6,z.ROUND_HALF_CEIL=7,z.ROUND_HALF_FLOOR=8,z.EUCLID=9,z.config=z.set=function(){var e,t,r=0,n={},o=arguments,i=o[0],s=i&&"object"==typeof i?function(){if(i.hasOwnProperty(t))return null!=(e=i[t])}:function(){if(o.length>r)return null!=(e=o[r++])};return s(t="DECIMAL_PLACES")&&V(e,0,v,2,t)&&(L=0|e),n[t]=L,s(t="ROUNDING_MODE")&&V(e,0,8,2,t)&&(B=0|e),n[t]=B,s(t="EXPONENTIAL_AT")&&(k(e)?V(e[0],-v,0,2,t)&&V(e[1],0,v,2,t)&&(D=0|e[0],F=0|e[1]):V(e,-v,v,2,t)&&(D=-(F=0|(e<0?-e:e)))),n[t]=[D,F],s(t="RANGE")&&(k(e)?V(e[0],-v,-1,2,t)&&V(e[1],1,v,2,t)&&(U=0|e[0],H=0|e[1]):V(e,-v,v,2,t)&&(0|e?U=-(H=0|(e<0?-e:e)):q&&ee(2,t+" cannot be zero",e))),n[t]=[U,H],s(t="ERRORS")&&(e===!!e||1===e||0===e?(M=0,V=(q=!!e)?Q:j):q&&ee(2,t+l,e)),n[t]=q,s(t="CRYPTO")&&(!0===e||!1===e||1===e||0===e?e?!(e="undefined"==typeof crypto)&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?K=!0:q?ee(2,"crypto unavailable",e?void 0:crypto):K=!1:K=!1:q&&ee(2,t+l,e)),n[t]=K,s(t="MODULO_MODE")&&V(e,0,9,2,t)&&(Y=0|e),n[t]=Y,s(t="POW_PRECISION")&&V(e,0,v,2,t)&&(W=0|e),n[t]=W,s(t="FORMAT")&&("object"==typeof e?X=e:q&&ee(2,t+" not an object",e)),n[t]=X,n},z.max=function(){return Z(arguments,I.lt)},z.min=function(){return Z(arguments,I.gt)},z.random=(o=9007199254740992,i=Math.random()*o&2097151?function(){return u(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,s,l=0,c=[],d=new z(N);if(e=null!=e&&V(e,0,v,14)?0|e:L,o=a(e/p),K)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));l<o;)(s=131072*t[l]+(t[l+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[l]=r[0],t[l+1]=r[1]):(c.push(s%1e14),l+=2);l=o/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(o*=7);l<o;)(s=281474976710656*(31&t[l])+1099511627776*t[l+1]+4294967296*t[l+2]+16777216*t[l+3]+(t[l+4]<<16)+(t[l+5]<<8)+t[l+6])>=9e15?crypto.randomBytes(7).copy(t,l):(c.push(s%1e14),l+=7);l=o/7}else K=!1,q&&ee(14,"crypto unavailable",crypto);if(!K)for(;l<o;)(s=i())<9e15&&(c[l++]=s%1e14);for(o=c[--l],e%=p,o&&e&&(s=m[p-e],c[l]=u(o/s)*s);0===c[l];c.pop(),l--);if(l<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=p);for(l=1,s=c[0];s>=10;s/=10,l++);l<p&&(n-=p-l)}return d.e=n,d.c=c,d}),r=function(){function e(e,t,r){var n,o,i,s,a=0,u=e.length,l=t%y,c=t/y|0;for(e=e.slice();u--;)a=((o=l*(i=e[u]%y)+(n=c*i+(s=e[u]/y|0)*l)%y*y+a)/r|0)+(n/y|0)+c*s,e[u]=o%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,i,s,a){var l,c,d,h,_,m,y,v,b,w,j,k,S,x,T,A,E,O=n.s==o.s?1:-1,R=n.c,C=o.c;if(!(R&&R[0]&&C&&C[0]))return new z(n.s&&o.s&&(R?!C||R[0]!=C[0]:C)?R&&0==R[0]||!C?0*O:O/0:NaN);for(b=(v=new z(O)).c=[],O=i+(c=n.e-o.e)+1,a||(a=f,c=g(n.e/p)-g(o.e/p),O=O/p|0),d=0;C[d]==(R[d]||0);d++);if(C[d]>(R[d]||0)&&c--,O<0)b.push(1),h=!0;else{for(x=R.length,A=C.length,d=0,O+=2,(_=u(a/(C[0]+1)))>1&&(C=e(C,_,a),R=e(R,_,a),A=C.length,x=R.length),S=A,j=(w=R.slice(0,A)).length;j<A;w[j++]=0);E=C.slice(),E=[0].concat(E),T=C[0],C[1]>=a/2&&T++;do{if(_=0,(l=t(C,w,A,j))<0){if(k=w[0],A!=j&&(k=k*a+(w[1]||0)),(_=u(k/T))>1)for(_>=a&&(_=a-1),y=(m=e(C,_,a)).length,j=w.length;1==t(m,w,y,j);)_--,r(m,A<y?E:C,y,a),y=m.length,l=1;else 0==_&&(l=_=1),y=(m=C.slice()).length;if(y<j&&(m=[0].concat(m)),r(w,m,j,a),j=w.length,-1==l)for(;t(C,w,A,j)<1;)_++,r(w,A<j?E:C,j,a),j=w.length}else 0===l&&(_++,w=[0]);b[d++]=_,w[0]?w[j++]=R[S]||0:(w=[R[S]],j=1)}while((S++<x||null!=w[0])&&O--);h=null!=w[0],b[0]||b.splice(0,1)}if(a==f){for(d=1,O=b[0];O>=10;O/=10,d++);te(v,i+(v.e=d+c*p-1)+1,s,h)}else v.e=c,v.r=+h;return v}}(),E=/^(-?)0([xbo])(?=\w[\w.]*$)/i,O=/^([^.]+)\.$/,R=/^\.([^.]+)$/,C=/^-?(Infinity|NaN)$/,P=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(e,t,r,n){var o,i=r?t:t.replace(P,"");if(C.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(E,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,i=i.replace(O,"$1").replace(R,"0.$1")),t!=i))return new z(i,o);q&&ee(M,"not a"+(n?" base "+n:"")+" number",t),e.s=null}e.c=e.e=null,M=0},I.absoluteValue=I.abs=function(){var e=new z(this);return e.s<0&&(e.s=1),e},I.ceil=function(){return te(new z(this),this.e+1,2)},I.comparedTo=I.cmp=function(e,t){return M=1,w(this,new z(e,t))},I.decimalPlaces=I.dp=function(){var e,t,r=this.c;if(!r)return null;if(e=((t=r.length-1)-g(this.e/p))*p,t=r[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},I.dividedBy=I.div=function(e,t){return M=3,r(this,new z(e,t),L,B)},I.dividedToIntegerBy=I.divToInt=function(e,t){return M=4,r(this,new z(e,t),0,1)},I.equals=I.eq=function(e,t){return M=5,0===w(this,new z(e,t))},I.floor=function(){return te(new z(this),this.e+1,3)},I.greaterThan=I.gt=function(e,t){return M=6,w(this,new z(e,t))>0},I.greaterThanOrEqualTo=I.gte=function(e,t){return M=7,1===(t=w(this,new z(e,t)))||0===t},I.isFinite=function(){return!!this.c},I.isInteger=I.isInt=function(){return!!this.c&&g(this.e/p)>this.c.length-2},I.isNaN=function(){return!this.s},I.isNegative=I.isNeg=function(){return this.s<0},I.isZero=function(){return!!this.c&&0==this.c[0]},I.lessThan=I.lt=function(e,t){return M=8,w(this,new z(e,t))<0},I.lessThanOrEqualTo=I.lte=function(e,t){return M=9,-1===(t=w(this,new z(e,t)))||0===t},I.minus=I.sub=function(e,t){var r,n,o,i,s=this,a=s.s;if(M=10,t=(e=new z(e,t)).s,!a||!t)return new z(NaN);if(a!=t)return e.s=-t,s.plus(e);var u=s.e/p,l=e.e/p,c=s.c,d=e.c;if(!u||!l){if(!c||!d)return c?(e.s=-t,e):new z(d?s:NaN);if(!c[0]||!d[0])return d[0]?(e.s=-t,e):new z(c[0]?s:3==B?-0:0)}if(u=g(u),l=g(l),c=c.slice(),a=u-l){for((i=a<0)?(a=-a,o=c):(l=u,o=d),o.reverse(),t=a;t--;o.push(0));o.reverse()}else for(n=(i=(a=c.length)<(t=d.length))?a:t,a=t=0;t<n;t++)if(c[t]!=d[t]){i=c[t]<d[t];break}if(i&&(o=c,c=d,d=o,e.s=-e.s),(t=(n=d.length)-(r=c.length))>0)for(;t--;c[r++]=0);for(t=f-1;n>a;){if(c[--n]<d[n]){for(r=n;r&&!c[--r];c[r]=t);--c[r],c[n]+=f}c[n]-=d[n]}for(;0==c[0];c.splice(0,1),--l);return c[0]?J(e,c,l):(e.s=3==B?-1:1,e.c=[e.e=0],e)},I.modulo=I.mod=function(e,t){var n,o,i=this;return M=11,e=new z(e,t),!i.c||!e.s||e.c&&!e.c[0]?new z(NaN):!e.c||i.c&&!i.c[0]?new z(i):(9==Y?(o=e.s,e.s=1,n=r(i,e,0,3),e.s=o,n.s*=o):n=r(i,e,0,Y),i.minus(n.times(e)))},I.negated=I.neg=function(){var e=new z(this);return e.s=-e.s||null,e},I.plus=I.add=function(e,t){var r,n=this,o=n.s;if(M=12,t=(e=new z(e,t)).s,!o||!t)return new z(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/p,s=e.e/p,a=n.c,u=e.c;if(!i||!s){if(!a||!u)return new z(o/0);if(!a[0]||!u[0])return u[0]?e:new z(a[0]?n:0*o)}if(i=g(i),s=g(s),a=a.slice(),o=i-s){for(o>0?(s=i,r=u):(o=-o,r=a),r.reverse();o--;r.push(0));r.reverse()}for((o=a.length)-(t=u.length)<0&&(r=u,u=a,a=r,t=o),o=0;t;)o=(a[--t]=a[t]+u[t]+o)/f|0,a[t]=f===a[t]?0:a[t]%f;return o&&(a=[o].concat(a),++s),J(e,a,s)},I.precision=I.sd=function(e){var t,r,n=this,o=n.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(q&&ee(13,"argument"+l,e),e!=!!e&&(e=null)),!o)return null;if(t=(r=o.length-1)*p+1,r=o[r]){for(;r%10==0;r/=10,t--);for(r=o[0];r>=10;r/=10,t++);}return e&&n.e+1>t&&(t=n.e+1),t},I.round=function(e,t){var r=new z(this);return(null==e||V(e,0,v,15))&&te(r,~~e+this.e+1,null!=t&&V(t,0,8,15,c)?0|t:B),r},I.shift=function(e){var t=this;return V(e,-9007199254740991,_,16,"argument")?t.times("1e"+A(e)):new z(t.c&&t.c[0]&&(e<-9007199254740991||e>_)?t.s*(e<0?0:1/0):t)},I.squareRoot=I.sqrt=function(){var e,t,n,o,i,s=this,a=s.c,u=s.s,l=s.e,c=L+4,d=new z("0.5");if(1!==u||!a||!a[0])return new z(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(u=Math.sqrt(+s))||u==1/0?(((t=b(a)).length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=g((l+1)/2)-(l<0||l%2),n=new z(t=u==1/0?"1e"+l:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+l)):n=new z(u+""),n.c[0])for((u=(l=n.e)+c)<3&&(u=0);;)if(i=n,n=d.times(i.plus(r(s,i,c,1))),b(i.c).slice(0,u)===(t=b(n.c)).slice(0,u)){if(n.e<l&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(te(n,n.e+L+2,1),e=!n.times(n).eq(s));break}if(!o&&(te(i,i.e+L+2,0),i.times(i).eq(s))){n=i;break}c+=4,u+=4,o=1}return te(n,n.e+L+1,B,e)},I.times=I.mul=function(e,t){var r,n,o,i,s,a,u,l,c,d,h,_,m,v,b,w=this,j=w.c,k=(M=17,e=new z(e,t)).c;if(!(j&&k&&j[0]&&k[0]))return!w.s||!e.s||j&&!j[0]&&!k||k&&!k[0]&&!j?e.c=e.e=e.s=null:(e.s*=w.s,j&&k?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=g(w.e/p)+g(e.e/p),e.s*=w.s,(u=j.length)<(d=k.length)&&(m=j,j=k,k=m,o=u,u=d,d=o),o=u+d,m=[];o--;m.push(0));for(v=f,b=y,o=d;--o>=0;){for(r=0,h=k[o]%b,_=k[o]/b|0,i=o+(s=u);i>o;)r=((l=h*(l=j[--s]%b)+(a=_*l+(c=j[s]/b|0)*h)%b*b+m[i]+r)/v|0)+(a/b|0)+_*c,m[i--]=l%v;m[i]=r}return r?++n:m.splice(0,1),J(e,m,n)},I.toDigits=function(e,t){var r=new z(this);return e=null!=e&&V(e,1,v,18,"precision")?0|e:null,t=null!=t&&V(t,0,8,18,c)?0|t:B,e?te(r,e,t):r},I.toExponential=function(e,t){return $(this,null!=e&&V(e,0,v,19)?1+~~e:null,t,19)},I.toFixed=function(e,t){return $(this,null!=e&&V(e,0,v,20)?~~e+this.e+1:null,t,20)},I.toFormat=function(e,t){var r=$(this,null!=e&&V(e,0,v,21)?~~e+this.e+1:null,t,21);if(this.c){var n,o=r.split("."),i=+X.groupSize,s=+X.secondaryGroupSize,a=X.groupSeparator,u=o[0],l=o[1],c=this.s<0,d=c?u.slice(1):u,h=d.length;if(s&&(n=i,i=s,s=n,h-=n),i>0&&h>0){for(n=h%i||i,u=d.substr(0,n);n<h;n+=i)u+=a+d.substr(n,i);s>0&&(u+=a+d.slice(n)),c&&(u="-"+u)}r=l?u+X.decimalSeparator+((s=+X.fractionGroupSize)?l.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+X.fractionGroupSeparator):l):u}return r},I.toFraction=function(e){var t,n,o,i,s,a,u,l,c,d=q,h=this,f=h.c,_=new z(N),y=n=new z(N),v=u=new z(N);if(null!=e&&(q=!1,a=new z(e),q=d,(d=a.isInt())&&!a.lt(N)||(q&&ee(22,"max denominator "+(d?"out of range":"not an integer"),e),e=!d&&a.c&&te(a,a.e+1,1).gte(N)?a:null)),!f)return h.toString();for(c=b(f),i=_.e=c.length-h.e-1,_.c[0]=m[(s=i%p)<0?p+s:s],e=!e||a.cmp(_)>0?i>0?_:y:a,s=H,H=1/0,a=new z(c),u.c[0]=0;l=r(a,_,0,1),1!=(o=n.plus(l.times(v))).cmp(e);)n=v,v=o,y=u.plus(l.times(o=y)),u=o,_=a.minus(l.times(o=_)),a=o;return o=r(e.minus(n),v,0,1),u=u.plus(o.times(y)),n=n.plus(o.times(v)),u.s=y.s=h.s,t=r(y,v,i*=2,B).minus(h).abs().cmp(r(u,n,i,B).minus(h).abs())<1?[y.toString(),v.toString()]:[u.toString(),n.toString()],H=s,t},I.toNumber=function(){return+this},I.toPower=I.pow=function(e,t){var r,n,o,i=u(e<0?-e:+e),s=this;if(null!=t&&(M=23,t=new z(t)),!V(e,-9007199254740991,_,23,"exponent")&&(!isFinite(e)||i>_&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return r=Math.pow(+s,e),new z(t?r%t:r);for(t?e>1&&s.gt(N)&&s.isInt()&&t.gt(N)&&t.isInt()?s=s.mod(t):(o=t,t=null):W&&(r=a(W/p+2)),n=new z(N);;){if(i%2){if(!(n=n.times(s)).c)break;r?n.c.length>r&&(n.c.length=r):t&&(n=n.mod(t))}if(!(i=u(i/2)))break;s=s.times(s),r?s.c&&s.c.length>r&&(s.c.length=r):t&&(s=s.mod(t))}return t?n:(e<0&&(n=N.div(n)),o?n.mod(o):r?te(n,W,B):n)},I.toPrecision=function(e,t){return $(this,null!=e&&V(e,1,v,24,"precision")?0|e:null,t,24)},I.toString=function(e){var t,r=this,n=r.s,o=r.e;return null===o?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(t=b(r.c),t=null!=e&&V(e,2,64,25,"base")?G(T(t,o),0|e,10,n):o<=D||o>=F?x(t,o):T(t,o),n<0&&r.c[0]&&(t="-"+t)),t},I.truncated=I.trunc=function(){return te(new z(this),this.e+1,1)},I.valueOf=I.toJSON=function(){var e,t=this,r=t.e;return null===r?t.toString():(e=b(t.c),e=r<=D||r>=F?x(e,r):T(e,r),t.s<0?"-"+e:e)},I.isBigNumber=!0,null!=t&&z.config(t),z}(),i.default=i.BigNumber=i,void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)}()},"./node_modules/bluebird/js/browser/bluebird.js":(e,t,r)=>{var n=r("./src/@utils/window.ts"),o;o=function(){var e,t,o;return function e(t,r,n){function o(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof _dereq_&&_dereq_;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[s]={exports:{}};t[s][0].call(c.exports,(function(e){var r=t[s][1][e];return o(r||e)}),c,c.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof _dereq_&&_dereq_,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,t,r){"use strict";t.exports=function(e){var t=e._SomePromiseArray;function r(e){var r=new t(e),n=r.promise();return r.setHowMany(1),r.setUnwrap(),r.init(),n}e.any=function(e){return r(e)},e.prototype.any=function(){return r(this)}}},{}],2:[function(e,t,r){"use strict";var n;try{throw new Error}catch(e){n=e}var o=e("./schedule"),i=e("./queue");function s(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new i(16),this._normalQueue=new i(16),this._haveDrainedQueues=!1;var e=this;this.drainQueues=function(){e._drainQueues()},this._schedule=o}function a(e){for(;e.length()>0;)u(e)}function u(e){var t=e.shift();if("function"!=typeof t)t._settlePromises();else{var r=e.shift(),n=e.shift();t.call(r,n)}}s.prototype.setScheduler=function(e){var t=this._schedule;return this._schedule=e,this._customScheduler=!0,t},s.prototype.hasCustomScheduler=function(){return this._customScheduler},s.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},s.prototype.fatalError=function(e,t){t?(process.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+"\n"),process.exit(2)):this.throwLater(e)},s.prototype.throwLater=function(e,t){if(1===arguments.length&&(t=e,e=function(){throw t}),"undefined"!=typeof setTimeout)setTimeout((function(){e(t)}),0);else try{this._schedule((function(){e(t)}))}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},s.prototype.invokeLater=function(e,t,r){this._lateQueue.push(e,t,r),this._queueTick()},s.prototype.invoke=function(e,t,r){this._normalQueue.push(e,t,r),this._queueTick()},s.prototype.settlePromises=function(e){this._normalQueue._pushOne(e),this._queueTick()},s.prototype._drainQueues=function(){a(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,a(this._lateQueue)},s.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},s.prototype._reset=function(){this._isTickUsed=!1},t.exports=s,t.exports.firstLineError=n},{"./queue":26,"./schedule":29}],3:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var o=!1,i=function(e,t){this._reject(t)},s=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(i,i,null,this,e)},a=function(e,t){0==(50397184&this._bitField)&&this._resolveCallback(t.target)},u=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(i){o||(o=!0,e.prototype._propagateFrom=n.propagateFromFunction(),e.prototype._boundValue=n.boundValueFunction());var l=r(i),c=new e(t);c._propagateFrom(this,1);var d=this._target();if(c._setBoundTo(l),l instanceof e){var h={promiseRejectionQueued:!1,promise:c,target:d,bindingPromise:l};d._then(t,s,void 0,c,h),l._then(a,u,void 0,c,h),c._setOnCancel(l)}else c._resolveCallback(d);return c},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},e.bind=function(t,r){return e.resolve(r).bind(t)}}},{}],4:[function(e,t,r){"use strict";var n;"undefined"!=typeof Promise&&(n=Promise);var o=e("./promise")();o.noConflict=function(){try{Promise===o&&(Promise=n)}catch(e){}return o},t.exports=o},{"./promise":22}],5:[function(e,t,r){"use strict";var n=Object.create;if(n){var o=n(null),i=n(null);o[" size"]=i[" size"]=0}t.exports=function(t){var r=e("./util"),n=r.canEvaluate;function o(e){var n=function(e,n){var o;if(null!=e&&(o=e[n]),"function"!=typeof o){var i="Object "+r.classString(e)+" has no method '"+r.toString(n)+"'";throw new t.TypeError(i)}return o}(e,this.pop());return n.apply(e,this)}function i(e){return e[this]}function s(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}r.isIdentifier,t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(o,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t;if("number"==typeof e)t=s;else if(n){var r=(void 0)(e);t=null!==r?r:i}else t=i;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t,r){"use strict";t.exports=function(t,r,n,o){var i=e("./util"),s=i.tryCatch,a=i.errorObj,u=t._async;t.prototype.break=t.prototype.cancel=function(){if(!o.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var r=e._cancellationParent;if(null==r||!r._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=r}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),u.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(e,t){if(i.isArray(e))for(var r=0;r<e.length;++r)this._doInvokeOnCancel(e[r],t);else if(void 0!==e)if("function"==typeof e){if(!t){var n=s(e).call(this._boundValue());n===a&&(this._attachExtraTrace(n.e),u.throwLater(n.e))}}else e._resultCancelled(this)},t.prototype._invokeOnCancel=function(){var e=this._onCancel();this._unsetOnCancel(),u.invoke(this._doInvokeOnCancel,this,e)},t.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},t.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(e,t,r){"use strict";t.exports=function(t){var r=e("./util"),n=e("./es5").keys,o=r.tryCatch,i=r.errorObj;return function(e,s,a){return function(u){var l=a._boundValue();e:for(var c=0;c<e.length;++c){var d=e[c];if(d===Error||null!=d&&d.prototype instanceof Error){if(u instanceof d)return o(s).call(l,u)}else if("function"==typeof d){var h=o(d).call(l,u);if(h===i)return h;if(h)return o(s).call(l,u)}else if(r.isObject(u)){for(var f=n(d),p=0;p<f.length;++p){var _=f[p];if(d[_]!=u[_])continue e}return o(s).call(l,u)}}return t}}}},{"./es5":13,"./util":36}],8:[function(e,t,r){"use strict";t.exports=function(e){var t=!1,r=[];function n(){this._trace=new n.CapturedTrace(o())}function o(){var e=r.length-1;if(e>=0)return r[e]}return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var e=r.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},n.CapturedTrace=null,n.create=function(){if(t)return new n},n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=e.prototype._pushContext,i=e.prototype._popContext,s=e._peekContext,a=e.prototype._peekContext,u=e.prototype._promiseCreated;n.deactivateLongStackTraces=function(){e.prototype._pushContext=r,e.prototype._popContext=i,e._peekContext=s,e.prototype._peekContext=a,e.prototype._promiseCreated=u,t=!1},t=!0,e.prototype._pushContext=n.prototype._pushContext,e.prototype._popContext=n.prototype._popContext,e._peekContext=e.prototype._peekContext=o,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},n}},{}],9:[function(e,t,r){"use strict";t.exports=function(t,r,n,o){var i,s,a,u,l=t._async,c=e("./errors").Warning,d=e("./util"),h=e("./es5"),f=d.canAttachTrace,p=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,_=/\((?:timers\.js):\d+:\d+\)/,m=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,y=null,v=null,g=!1,b=!(0==d.env("BLUEBIRD_DEBUG")),w=!(0==d.env("BLUEBIRD_WARNINGS")||!b&&!d.env("BLUEBIRD_WARNINGS")),j=!(0==d.env("BLUEBIRD_LONG_STACK_TRACES")||!b&&!d.env("BLUEBIRD_LONG_STACK_TRACES")),k=0!=d.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(w||!!d.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){var e=[];function r(){for(var t=0;t<e.length;++t)e[t]._notifyUnhandledRejection();n()}function n(){e.length=0}u=function(t){e.push(t),setTimeout(r,1)},h.defineProperty(t,"_unhandledRejectionCheck",{value:r}),h.defineProperty(t,"_unhandledRejectionClear",{value:n})}(),t.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},t.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),u(this))},t.prototype._notifyUnhandledRejectionIsHandled=function(){X("rejectionHandled",i,void 0,this)},t.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},t.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},t.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),X("unhandledRejection",s,e,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},t.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},t.prototype._warn=function(e,t,r){return V(e,t,r||this)},t.onPossiblyUnhandledRejection=function(e){var r=t._getContext();s=d.contextBind(r,e)},t.onUnhandledRejectionHandled=function(e){var r=t._getContext();i=d.contextBind(r,e)};var S=function(){};t.longStackTraces=function(){if(l.haveItemsQueued()&&!te.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!te.longStackTraces&&G()){var e=t.prototype._captureStackTrace,n=t.prototype._attachExtraTrace,o=t.prototype._dereferenceTrace;te.longStackTraces=!0,S=function(){if(l.haveItemsQueued()&&!te.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");t.prototype._captureStackTrace=e,t.prototype._attachExtraTrace=n,t.prototype._dereferenceTrace=o,r.deactivateLongStackTraces(),te.longStackTraces=!1},t.prototype._captureStackTrace=U,t.prototype._attachExtraTrace=H,t.prototype._dereferenceTrace=q,r.activateLongStackTraces()}},t.hasLongStackTraces=function(){return te.longStackTraces&&G()};var x={unhandledrejection:{before:function(){var e=d.global.onunhandledrejection;return d.global.onunhandledrejection=null,e},after:function(e){d.global.onunhandledrejection=e}},rejectionhandled:{before:function(){var e=d.global.onrejectionhandled;return d.global.onrejectionhandled=null,e},after:function(e){d.global.onrejectionhandled=e}}},T=function(){var e=function(e,t){if(!e)return!d.global.dispatchEvent(t);var r;try{return r=e.before(),!d.global.dispatchEvent(t)}finally{e.after(r)}};try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return d.global.dispatchEvent(t),function(t,r){t=t.toLowerCase();var n=new CustomEvent(t,{detail:r,cancelable:!0});return h.defineProperty(n,"promise",{value:r.promise}),h.defineProperty(n,"reason",{value:r.reason}),e(x[t],n)}}return"function"==typeof Event?(t=new Event("CustomEvent"),d.global.dispatchEvent(t),function(t,r){t=t.toLowerCase();var n=new Event(t,{cancelable:!0});return n.detail=r,h.defineProperty(n,"promise",{value:r.promise}),h.defineProperty(n,"reason",{value:r.reason}),e(x[t],n)}):((t=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),d.global.dispatchEvent(t),function(t,r){t=t.toLowerCase();var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!0,r),e(x[t],n)})}catch(e){}return function(){return!1}}(),A=d.isNode?function(){return process.emit.apply(process,arguments)}:d.global?function(e){var t="on"+e.toLowerCase(),r=d.global[t];return!!r&&(r.apply(d.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function E(e,t){return{promise:t}}var O={promiseCreated:E,promiseFulfilled:E,promiseRejected:E,promiseResolved:E,promiseCancelled:E,promiseChained:function(e,t,r){return{promise:t,child:r}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,r){return{reason:t,promise:r}},rejectionHandled:E},R=function(e){var t=!1;try{t=A.apply(null,arguments)}catch(e){l.throwLater(e),t=!0}var r=!1;try{r=T(e,O[e].apply(null,arguments))}catch(e){l.throwLater(e),r=!0}return r||t};function C(){return!1}function P(e,t,r){var n=this;try{e(t,r,(function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+d.toString(e));n._attachCancellationCallback(e)}))}catch(e){return e}}function M(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?d.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function I(){return this._onCancelField}function N(e){this._onCancelField=e}function L(){this._cancellationParent=void 0,this._onCancelField=void 0}function B(e,t){if(0!=(1&t)){this._cancellationParent=e;var r=e._branchesRemainingToCancel;void 0===r&&(r=0),e._branchesRemainingToCancel=r+1}0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}t.config=function(e){if("longStackTraces"in(e=Object(e))&&(e.longStackTraces?t.longStackTraces():!e.longStackTraces&&t.hasLongStackTraces()&&S()),"warnings"in e){var r=e.warnings;te.warnings=!!r,k=te.warnings,d.isObject(r)&&"wForgottenReturn"in r&&(k=!!r.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!te.cancellation){if(l.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=L,t.prototype._propagateFrom=B,t.prototype._onCancel=I,t.prototype._setOnCancel=N,t.prototype._attachCancellationCallback=M,t.prototype._execute=P,D=B,te.cancellation=!0}if("monitoring"in e&&(e.monitoring&&!te.monitoring?(te.monitoring=!0,t.prototype._fireEvent=R):!e.monitoring&&te.monitoring&&(te.monitoring=!1,t.prototype._fireEvent=C)),"asyncHooks"in e&&d.nodeSupportsAsyncResource){var i=te.asyncHooks,s=!!e.asyncHooks;i!==s&&(te.asyncHooks=s,s?n():o())}return t},t.prototype._fireEvent=C,t.prototype._execute=function(e,t,r){try{e(t,r)}catch(e){return e}},t.prototype._onCancel=function(){},t.prototype._setOnCancel=function(e){},t.prototype._attachCancellationCallback=function(e){},t.prototype._captureStackTrace=function(){},t.prototype._attachExtraTrace=function(){},t.prototype._dereferenceTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(e,t){};var D=function(e,t){0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)};function F(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function U(){this._trace=new J(this._peekContext())}function H(e,t){if(f(e)){var r=this._trace;if(void 0!==r&&t&&(r=r._parent),void 0!==r)r.attachExtraTrace(e);else if(!e.__stackCleaned__){var n=Y(e);d.notEnumerableProp(e,"stack",n.message+"\n"+n.stack.join("\n")),d.notEnumerableProp(e,"__stackCleaned__",!0)}}}function q(){this._trace=void 0}function V(e,r,n){if(te.warnings){var o,i=new c(e);if(r)n._attachExtraTrace(i);else if(te.longStackTraces&&(o=t._peekContext()))o.attachExtraTrace(i);else{var s=Y(i);i.stack=s.message+"\n"+s.stack.join("\n")}R("warning",i)||W(i,"",!0)}}function K(e){for(var t=[],r=0;r<e.length;++r){var n=e[r],o=" (No stack trace)"===n||y.test(n),i=o&&$(n);o&&!i&&(g&&" "!==n.charAt(0)&&(n=" "+n),t.push(n))}return t}function Y(e){var t=e.stack,r=e.toString();return t="string"==typeof t&&t.length>0?function(e){for(var t=e.stack.replace(/\s+$/g,"").split("\n"),r=0;r<t.length;++r){var n=t[r];if(" (No stack trace)"===n||y.test(n))break}return r>0&&"SyntaxError"!=e.name&&(t=t.slice(r)),t}(e):[" (No stack trace)"],{message:r,stack:"SyntaxError"==e.name?t:K(t)}}function W(e,t,r){if("undefined"!=typeof console){var n;if(d.isObject(e)){var o=e.stack;n=t+v(o,e)}else n=t+String(e);"function"==typeof a?a(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function X(e,t,r,n){var o=!1;try{"function"==typeof t&&(o=!0,"rejectionHandled"===e?t(n):t(r,n))}catch(e){l.throwLater(e)}"unhandledRejection"===e?R(e,r,n)||o||W(r,"Unhandled rejection "):R(e,n)}function z(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{if(t=e&&"function"==typeof e.toString?e.toString():d.toString(e),/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+function(e){var t=41;return e.length<t?e:e.substr(0,t-3)+"..."}(t)+">, no stack trace)"}function G(){return"function"==typeof ee}var $=function(){return!1},Z=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Q(e){var t=e.match(Z);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function J(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);ee(this,J),t>32&&this.uncycle()}d.inherits(J,Error),r.CapturedTrace=J,J.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],r={},n=0,o=this;void 0!==o;++n)t.push(o),o=o._parent;for(n=(e=this._length=n)-1;n>=0;--n){var i=t[n].stack;void 0===r[i]&&(r[i]=n)}for(n=0;n<e;++n){var s=r[t[n].stack];if(void 0!==s&&s!==n){s>0&&(t[s-1]._parent=void 0,t[s-1]._length=1),t[n]._parent=void 0,t[n]._length=1;var a=n>0?t[n-1]:this;s<e-1?(a._parent=t[s+1],a._parent.uncycle(),a._length=a._parent._length+1):(a._parent=void 0,a._length=1);for(var u=a._length+1,l=n-2;l>=0;--l)t[l]._length=u,u++;return}}}},J.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=Y(e),r=t.message,n=[t.stack],o=this;void 0!==o;)n.push(K(o.stack.split("\n"))),o=o._parent;!function(e){for(var t=e[0],r=1;r<e.length;++r){for(var n=e[r],o=t.length-1,i=t[o],s=-1,a=n.length-1;a>=0;--a)if(n[a]===i){s=a;break}for(a=s;a>=0;--a){var u=n[a];if(t[o]!==u)break;t.pop(),o--}t=n}}(n),function(e){for(var t=0;t<e.length;++t)(0===e[t].length||t+1<e.length&&e[t][0]===e[t+1][0])&&(e.splice(t,1),t--)}(n),d.notEnumerableProp(e,"stack",function(e,t){for(var r=0;r<t.length-1;++r)t[r].push("From previous event:"),t[r]=t[r].join("\n");return r<t.length&&(t[r]=t[r].join("\n")),e+"\n"+t.join("\n")}(r,n)),d.notEnumerableProp(e,"__stackCleaned__",!0)}};var ee=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():z(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,y=e,v=t;var r=Error.captureStackTrace;return $=function(e){return p.test(e)},function(e,t){Error.stackTraceLimit+=6,r(e,t),Error.stackTraceLimit-=6}}var n,o=new Error;if("string"==typeof o.stack&&o.stack.split("\n")[0].indexOf("stackDetection@")>=0)return y=/@/,v=t,g=!0,function(e){e.stack=(new Error).stack};try{throw new Error}catch(e){n="stack"in e}return!("stack"in o)&&n&&"number"==typeof Error.stackTraceLimit?(y=e,v=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6}):(v=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?z(t):t.toString()},null)}();"undefined"!=typeof console&&void 0!==console.warn&&(a=function(e){console.warn(e)},d.isNode&&process.stderr.isTTY?a=function(e,t){var r=t?"[33m":"[31m";console.warn(r+e+"[0m\n")}:d.isNode||"string"!=typeof(new Error).stack||(a=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var te={warnings:w,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return j&&t.longStackTraces(),{asyncHooks:function(){return te.asyncHooks},longStackTraces:function(){return te.longStackTraces},warnings:function(){return te.warnings},cancellation:function(){return te.cancellation},monitoring:function(){return te.monitoring},propagateFromFunction:function(){return D},boundValueFunction:function(){return F},checkForgottenReturns:function(e,t,r,n,o){if(void 0===e&&null!==t&&k){if(void 0!==o&&o._returnedNonUndefined())return;if(0==(65535&n._bitField))return;r&&(r+=" ");var i="",s="";if(t._trace){for(var a=t._trace.stack.split("\n"),u=K(a),l=u.length-1;l>=0;--l){var c=u[l];if(!_.test(c)){var d=c.match(m);d&&(i="at "+d[1]+":"+d[2]+":"+d[3]+" ");break}}if(u.length>0){var h=u[0];for(l=0;l<a.length;++l)if(a[l]===h){l>0&&(s="\n"+a[l-1]);break}}}var f="a promise was created in a "+r+"handler "+i+"but was not returned from it, see http://goo.gl/rRqMUw"+s;n._warn(f,!0,t)}},setBounds:function(e,t){if(G()){for(var r,n,o=(e.stack||"").split("\n"),i=(t.stack||"").split("\n"),s=-1,a=-1,u=0;u<o.length;++u)if(l=Q(o[u])){r=l.fileName,s=l.line;break}for(u=0;u<i.length;++u){var l;if(l=Q(i[u])){n=l.fileName,a=l.line;break}}s<0||a<0||!r||!n||r!==n||s>=a||($=function(e){if(p.test(e))return!0;var t=Q(e);return!!(t&&t.fileName===r&&s<=t.line&&t.line<=a)})}},warn:V,deprecated:function(e,t){var r=e+" is deprecated and will be removed in a future version.";return t&&(r+=" Use "+t+" instead."),V(r)},CapturedTrace:J,fireDomEvent:T,fireGlobalEvent:A}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(e,t,r){"use strict";t.exports=function(e){function t(){return this.value}function r(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(r){return r instanceof e&&r.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:r},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(r,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:e},void 0);var t=arguments[1],n=function(){throw t};return this.caught(e,n)},e.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof e&&r.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:r},void 0);var n=arguments[1];n instanceof e&&n.suppressUnhandledRejections();var o=function(){return n};return this.caught(r,o)}}},{}],11:[function(e,t,r){"use strict";t.exports=function(e,t){var r=e.reduce,n=e.all;function o(){return n(this)}e.prototype.each=function(e){return r(this,e,t,0)._then(o,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return r(this,e,t,t)},e.each=function(e,n){return r(e,n,t,0)._then(o,void 0,void 0,e,void 0)},e.mapSeries=function(e,n){return r(e,n,t,t)}}},{}],12:[function(e,t,r){"use strict";var n,o,i=e("./es5"),s=i.freeze,a=e("./util"),u=a.inherits,l=a.notEnumerableProp;function c(e,t){function r(n){if(!(this instanceof r))return new r(n);l(this,"message","string"==typeof n?n:t),l(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return u(r,Error),r}var d=c("Warning","warning"),h=c("CancellationError","cancellation error"),f=c("TimeoutError","timeout error"),p=c("AggregateError","aggregate error");try{n=TypeError,o=RangeError}catch(e){n=c("TypeError","type error"),o=c("RangeError","range error")}for(var _="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),m=0;m<_.length;++m)"function"==typeof Array.prototype[_[m]]&&(p.prototype[_[m]]=Array.prototype[_[m]]);i.defineProperty(p.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),p.prototype.isOperational=!0;var y=0;function v(e){if(!(this instanceof v))return new v(e);l(this,"name","OperationalError"),l(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(l(this,"message",e.message),l(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}p.prototype.toString=function(){var e=Array(4*y+1).join(" "),t="\n"+e+"AggregateError of:\n";y++,e=Array(4*y+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",o=n.split("\n"),i=0;i<o.length;++i)o[i]=e+o[i];t+=(n=o.join("\n"))+"\n"}return y--,t},u(v,Error);var g=Error.__BluebirdErrorTypes__;g||(g=s({CancellationError:h,TimeoutError:f,OperationalError:v,RejectionError:v,AggregateError:p}),i.defineProperty(Error,"__BluebirdErrorTypes__",{value:g,writable:!1,enumerable:!1,configurable:!1})),t.exports={Error,TypeError:n,RangeError:o,CancellationError:g.CancellationError,OperationalError:g.OperationalError,TimeoutError:g.TimeoutError,AggregateError:g.AggregateError,Warning:d}},{"./es5":13,"./util":36}],13:[function(e,t,r){var n=function(){"use strict";return void 0===this}();if(n)t.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:n,propertyIsWritable:function(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!(r&&!r.writable&&!r.set)}};else{var o={}.hasOwnProperty,i={}.toString,s={}.constructor.prototype,a=function(e){var t=[];for(var r in e)o.call(e,r)&&t.push(r);return t};t.exports={isArray:function(e){try{return"[object Array]"===i.call(e)}catch(e){return!1}},keys:a,names:a,defineProperty:function(e,t,r){return e[t]=r.value,e},getDescriptor:function(e,t){return{value:e[t]}},freeze:function(e){return e},getPrototypeOf:function(e){try{return Object(e).constructor.prototype}catch(e){return s}},isES5:n,propertyIsWritable:function(){return!0}}}},{}],14:[function(e,t,r){"use strict";t.exports=function(e,t){var r=e.map;e.prototype.filter=function(e,n){return r(this,e,n,t)},e.filter=function(e,n,o){return r(e,n,o,t)}}},{}],15:[function(e,t,r){"use strict";t.exports=function(t,r,n){var o=e("./util"),i=t.CancellationError,s=o.errorObj,a=e("./catch_filter")(n);function u(e,t,r){this.promise=e,this.type=t,this.handler=r,this.called=!1,this.cancelPromise=null}function l(e){this.finallyHandler=e}function c(e,t){return null!=e.cancelPromise&&(arguments.length>1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function d(){return f.call(this,this.promise._target()._settledValue())}function h(e){if(!c(this,e))return s.e=e,s}function f(e){var o=this.promise,a=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?a.call(o._boundValue()):a.call(o._boundValue(),e);if(u===n)return u;if(void 0!==u){o._setReturnedNonUndefined();var f=r(u,o);if(f instanceof t){if(null!=this.cancelPromise){if(f._isCancelled()){var p=new i("late cancellation observer");return o._attachExtraTrace(p),s.e=p,s}f.isPending()&&f._attachCancellationCallback(new l(this))}return f._then(d,h,void 0,this,void 0)}}}return o.isRejected()?(c(this),s.e=e,s):(c(this),e)}return u.prototype.isFinallyHandler=function(){return 0===this.type},l.prototype._resultCancelled=function(){c(this.finallyHandler)},t.prototype._passThrough=function(e,t,r,n){return"function"!=typeof e?this.then():this._then(r,n,void 0,new u(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,f,f)},t.prototype.tap=function(e){return this._passThrough(e,1,f)},t.prototype.tapCatch=function(e){var r=arguments.length;if(1===r)return this._passThrough(e,1,void 0,f);var n,i=new Array(r-1),s=0;for(n=0;n<r-1;++n){var u=arguments[n];if(!o.isObject(u))return t.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+o.classString(u)));i[s++]=u}i.length=s;var l=arguments[n];return this._passThrough(a(i,l,this),1,void 0,f)},u}},{"./catch_filter":7,"./util":36}],16:[function(e,t,r){"use strict";t.exports=function(t,r,n,o,i,s){var a=e("./errors").TypeError,u=e("./util"),l=u.errorObj,c=u.tryCatch,d=[];function h(e,r,o,i){if(s.cancellation()){var a=new t(n),u=this._finallyPromise=new t(n);this._promise=a.lastly((function(){return u})),a._captureStackTrace(),a._setOnCancel(this)}else(this._promise=new t(n))._captureStackTrace();this._stack=i,this._generatorFunction=e,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof o?[o].concat(d):d,this._yieldedPromise=null,this._cancellationPhase=!1}u.inherits(h,i),h.prototype._isResolved=function(){return null===this._promise},h.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},h.prototype._promiseCancelled=function(){if(!this._isResolved()){var e;if(void 0!==this._generator.return)this._promise._pushContext(),e=c(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new t.CancellationError("generator .return() sentinel");t.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),e=c(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(e)}},h.prototype._promiseFulfilled=function(e){this._yieldedPromise=null,this._promise._pushContext();var t=c(this._generator.next).call(this._generator,e);this._promise._popContext(),this._continue(t)},h.prototype._promiseRejected=function(e){this._yieldedPromise=null,this._promise._attachExtraTrace(e),this._promise._pushContext();var t=c(this._generator.throw).call(this._generator,e);this._promise._popContext(),this._continue(t)},h.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof t){var e=this._yieldedPromise;this._yieldedPromise=null,e.cancel()}},h.prototype.promise=function(){return this._promise},h.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},h.prototype._continue=function(e){var r=this._promise;if(e===l)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(e.e,!1);var n=e.value;if(!0===e.done)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var i=o(n,this._promise);if(i instanceof t||(i=function(e,r,n){for(var i=0;i<r.length;++i){n._pushContext();var s=c(r[i])(e);if(n._popContext(),s===l){n._pushContext();var a=t.reject(l.e);return n._popContext(),a}var u=o(s,n);if(u instanceof t)return u}return null}(i,this._yieldHandlers,this._promise),null!==i)){var s=(i=i._target())._bitField;0==(50397184&s)?(this._yieldedPromise=i,i._proxy(this,null)):0!=(33554432&s)?t._async.invoke(this._promiseFulfilled,this,i._value()):0!=(16777216&s)?t._async.invoke(this._promiseRejected,this,i._reason()):this._promiseCancelled()}else this._promiseRejected(new a("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",String(n))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},t.coroutine=function(e,t){if("function"!=typeof e)throw new a("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(t).yieldHandler,n=h,o=(new Error).stack;return function(){var t=e.apply(this,arguments),i=new n(void 0,void 0,r,o),s=i.promise();return i._generator=t,i._promiseFulfilled(void 0),s}},t.coroutine.addYieldHandler=function(e){if("function"!=typeof e)throw new a("expecting a function but got "+u.classString(e));d.push(e)},t.spawn=function(e){if(s.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof e)return r("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=new h(e,this),o=n.promise();return n._run(t.spawn),o}}},{"./errors":12,"./util":36}],17:[function(e,t,r){"use strict";t.exports=function(t,r,n,o,i){var s=e("./util");s.canEvaluate,s.tryCatch,s.errorObj,t.join=function(){var e,t=arguments.length-1;t>0&&"function"==typeof arguments[t]&&(e=arguments[t]);var n=[].slice.call(arguments);e&&n.pop();var o=new r(n).promise();return void 0!==e?o.spread(e):o}}},{"./util":36}],18:[function(e,t,r){"use strict";t.exports=function(t,r,n,o,i,s){var a=e("./util"),u=a.tryCatch,l=a.errorObj,c=t._async;function d(e,r,n,o){this.constructor$(e),this._promise._captureStackTrace();var s=t._getContext();if(this._callback=a.contextBind(s,r),this._preservedValues=o===i?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],c.invoke(this._asyncInit,this,void 0),a.isArray(e))for(var u=0;u<e.length;++u){var l=e[u];l instanceof t&&l.suppressUnhandledRejections()}}function h(e,r,o,i){if("function"!=typeof r)return n("expecting a function but got "+a.classString(r));var s=0;if(void 0!==o){if("object"!=typeof o||null===o)return t.reject(new TypeError("options argument must be an object but it is "+a.classString(o)));if("number"!=typeof o.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+a.classString(o.concurrency)));s=o.concurrency}return new d(e,r,s="number"==typeof s&&isFinite(s)&&s>=1?s:0,i).promise()}a.inherits(d,r),d.prototype._asyncInit=function(){this._init$(void 0,-2)},d.prototype._init=function(){},d.prototype._promiseFulfilled=function(e,r){var n=this._values,i=this.length(),a=this._preservedValues,c=this._limit;if(r<0){if(n[r=-1*r-1]=e,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return n[r]=e,this._queue.push(r),!1;null!==a&&(a[r]=e);var d=this._promise,h=this._callback,f=d._boundValue();d._pushContext();var p=u(h).call(f,e,r,i),_=d._popContext();if(s.checkForgottenReturns(p,_,null!==a?"Promise.filter":"Promise.map",d),p===l)return this._reject(p.e),!0;var m=o(p,this._promise);if(m instanceof t){var y=(m=m._target())._bitField;if(0==(50397184&y))return c>=1&&this._inFlight++,n[r]=m,m._proxy(this,-1*(r+1)),!1;if(0==(33554432&y))return 0!=(16777216&y)?(this._reject(m._reason()),!0):(this._cancel(),!0);p=m._value()}n[r]=p}return++this._totalResolved>=i&&(null!==a?this._filter(n,a):this._resolve(n),!0)},d.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,r=this._values;e.length>0&&this._inFlight<t;){if(this._isResolved())return;var n=e.pop();this._promiseFulfilled(r[n],n)}},d.prototype._filter=function(e,t){for(var r=t.length,n=new Array(r),o=0,i=0;i<r;++i)e[i]&&(n[o++]=t[i]);n.length=o,this._resolve(n)},d.prototype.preservedValues=function(){return this._preservedValues},t.prototype.map=function(e,t){return h(this,e,t,null)},t.map=function(e,t,r,n){return h(e,t,r,n)}}},{"./util":36}],19:[function(e,t,r){"use strict";t.exports=function(t,r,n,o,i){var s=e("./util"),a=s.tryCatch;t.method=function(e){if("function"!=typeof e)throw new t.TypeError("expecting a function but got "+s.classString(e));return function(){var n=new t(r);n._captureStackTrace(),n._pushContext();var o=a(e).apply(this,arguments),s=n._popContext();return i.checkForgottenReturns(o,s,"Promise.method",n),n._resolveFromSyncValue(o),n}},t.attempt=t.try=function(e){if("function"!=typeof e)return o("expecting a function but got "+s.classString(e));var n,u=new t(r);if(u._captureStackTrace(),u._pushContext(),arguments.length>1){i.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],c=arguments[2];n=s.isArray(l)?a(e).apply(c,l):a(e).call(c,l)}else n=a(e)();var d=u._popContext();return i.checkForgottenReturns(n,d,"Promise.try",u),u._resolveFromSyncValue(n),u},t.prototype._resolveFromSyncValue=function(e){e===s.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":36}],20:[function(e,t,r){"use strict";var n=e("./util"),o=n.maybeWrapAsError,i=e("./errors").OperationalError,s=e("./es5"),a=/^(?:name|message|stack|cause)$/;function u(e){var t;if(function(e){return e instanceof Error&&s.getPrototypeOf(e)===Error.prototype}(e)){(t=new i(e)).name=e.name,t.message=e.message,t.stack=e.stack;for(var r=s.keys(e),o=0;o<r.length;++o){var u=r[o];a.test(u)||(t[u]=e[u])}return t}return n.markAsOriginatingFromRejection(e),e}t.exports=function(e,t){return function(r,n){if(null!==e){if(r){var i=u(o(r));e._attachExtraTrace(i),e._reject(i)}else if(t){var s=[].slice.call(arguments,1);e._fulfill(s)}else e._fulfill(n);e=null}}}},{"./errors":12,"./es5":13,"./util":36}],21:[function(e,t,r){"use strict";t.exports=function(t){var r=e("./util"),n=t._async,o=r.tryCatch,i=r.errorObj;function s(e,t){if(!r.isArray(e))return a.call(this,e,t);var s=o(t).apply(this._boundValue(),[null].concat(e));s===i&&n.throwLater(s.e)}function a(e,t){var r=this._boundValue(),s=void 0===e?o(t).call(r,null):o(t).call(r,null,e);s===i&&n.throwLater(s.e)}function u(e,t){if(!e){var r=new Error(e+"");r.cause=e,e=r}var s=o(t).call(this._boundValue(),e);s===i&&n.throwLater(s.e)}t.prototype.asCallback=t.prototype.nodeify=function(e,t){if("function"==typeof e){var r=a;void 0!==t&&Object(t).spread&&(r=s),this._then(r,u,void 0,this,e)}return this}}},{"./util":36}],22:[function(e,t,r){"use strict";t.exports=function(){var r=function(){return new y("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},n=function(){return new P.PromiseInspection(this._target())},o=function(e){return P.reject(new y(e))};function i(){}var s={},a=e("./util");a.setReflectHandler(n);var u=function(){var e=process.domain;return void 0===e?null:e},l=function(){return{domain:u(),async:null}},c=a.isNode&&a.nodeSupportsAsyncResource?e("async_hooks").AsyncResource:null,d=function(){return{domain:u(),async:new c("Bluebird::Promise")}},h=a.isNode?l:function(){return null};a.notEnumerableProp(P,"_getContext",h);var f=e("./es5"),p=e("./async"),_=new p;f.defineProperty(P,"_async",{value:_});var m=e("./errors"),y=P.TypeError=m.TypeError;P.RangeError=m.RangeError;var v=P.CancellationError=m.CancellationError;P.TimeoutError=m.TimeoutError,P.OperationalError=m.OperationalError,P.RejectionError=m.OperationalError,P.AggregateError=m.AggregateError;var g=function(){},b={},w={},j=e("./thenables")(P,g),k=e("./promise_array")(P,g,j,o,i),S=e("./context")(P),x=S.create,T=e("./debuggability")(P,S,(function(){h=d,a.notEnumerableProp(P,"_getContext",d)}),(function(){h=l,a.notEnumerableProp(P,"_getContext",l)})),A=(T.CapturedTrace,e("./finally")(P,j,w)),E=e("./catch_filter")(w),O=e("./nodeback"),R=a.errorObj,C=a.tryCatch;function P(e){e!==g&&function(e,t){if(null==e||e.constructor!==P)throw new y("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof t)throw new y("expecting a function but got "+a.classString(t))}(this,e),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(e),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function M(e){this.promise._resolveCallback(e)}function I(e){this.promise._rejectCallback(e,!1)}function N(e){var t=new P(g);t._fulfillmentHandler0=e,t._rejectionHandler0=e,t._promise0=e,t._receiver0=e}return P.prototype.toString=function(){return"[object Promise]"},P.prototype.caught=P.prototype.catch=function(e){var t=arguments.length;if(t>1){var r,n=new Array(t-1),i=0;for(r=0;r<t-1;++r){var s=arguments[r];if(!a.isObject(s))return o("Catch statement predicate: expecting an object but got "+a.classString(s));n[i++]=s}if(n.length=i,"function"!=typeof(e=arguments[r]))throw new y("The last argument to .catch() must be a function, got "+a.toString(e));return this.then(void 0,E(n,e,this))}return this.then(void 0,e)},P.prototype.reflect=function(){return this._then(n,n,void 0,this,void 0)},P.prototype.then=function(e,t){if(T.warnings()&&arguments.length>0&&"function"!=typeof e&&"function"!=typeof t){var r=".then() only accepts functions but was passed: "+a.classString(e);arguments.length>1&&(r+=", "+a.classString(t)),this._warn(r)}return this._then(e,t,void 0,void 0,void 0)},P.prototype.done=function(e,t){this._then(e,t,void 0,void 0,void 0)._setIsFinal()},P.prototype.spread=function(e){return"function"!=typeof e?o("expecting a function but got "+a.classString(e)):this.all()._then(e,void 0,void 0,b,void 0)},P.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},P.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new k(this).promise()},P.prototype.error=function(e){return this.caught(a.originatesFromRejection,e)},P.getNewLibraryCopy=t.exports,P.is=function(e){return e instanceof P},P.fromNode=P.fromCallback=function(e){var t=new P(g);t._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=C(e)(O(t,r));return n===R&&t._rejectCallback(n.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},P.all=function(e){return new k(e).promise()},P.cast=function(e){var t=j(e);return t instanceof P||((t=new P(g))._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},P.resolve=P.fulfilled=P.cast,P.reject=P.rejected=function(e){var t=new P(g);return t._captureStackTrace(),t._rejectCallback(e,!0),t},P.setScheduler=function(e){if("function"!=typeof e)throw new y("expecting a function but got "+a.classString(e));return _.setScheduler(e)},P.prototype._then=function(e,t,r,n,o){var i=void 0!==o,s=i?o:new P(g),u=this._target(),l=u._bitField;i||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===n&&0!=(2097152&this._bitField)&&(n=0!=(50397184&l)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var c=h();if(0!=(50397184&l)){var d,f,p=u._settlePromiseCtx;0!=(33554432&l)?(f=u._rejectionHandler0,d=e):0!=(16777216&l)?(f=u._fulfillmentHandler0,d=t,u._unsetRejectionIsUnhandled()):(p=u._settlePromiseLateCancellationObserver,f=new v("late cancellation observer"),u._attachExtraTrace(f),d=t),_.invoke(p,u,{handler:a.contextBind(c,d),promise:s,receiver:n,value:f})}else u._addCallbacks(e,t,s,n,c);return s},P.prototype._length=function(){return 65535&this._bitField},P.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},P.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},P.prototype._setLength=function(e){this._bitField=-65536&this._bitField|65535&e},P.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},P.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},P.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},P.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},P.prototype._isFinal=function(){return(4194304&this._bitField)>0},P.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},P.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},P.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},P.prototype._setAsyncGuaranteed=function(){if(!_.hasCustomScheduler()){var e=this._bitField;this._bitField=e|(536870912&e)>>2^134217728}},P.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&(536870912|this._bitField)},P.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==s)return void 0===t&&this._isBound()?this._boundValue():t},P.prototype._promiseAt=function(e){return this[4*e-4+2]},P.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},P.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},P.prototype._boundValue=function(){},P.prototype._migrateCallback0=function(e){e._bitField;var t=e._fulfillmentHandler0,r=e._rejectionHandler0,n=e._promise0,o=e._receiverAt(0);void 0===o&&(o=s),this._addCallbacks(t,r,n,o,null)},P.prototype._migrateCallbackAt=function(e,t){var r=e._fulfillmentHandlerAt(t),n=e._rejectionHandlerAt(t),o=e._promiseAt(t),i=e._receiverAt(t);void 0===i&&(i=s),this._addCallbacks(r,n,o,i,null)},P.prototype._addCallbacks=function(e,t,r,n,o){var i=this._length();if(i>=65531&&(i=0,this._setLength(0)),0===i)this._promise0=r,this._receiver0=n,"function"==typeof e&&(this._fulfillmentHandler0=a.contextBind(o,e)),"function"==typeof t&&(this._rejectionHandler0=a.contextBind(o,t));else{var s=4*i-4;this[s+2]=r,this[s+3]=n,"function"==typeof e&&(this[s+0]=a.contextBind(o,e)),"function"==typeof t&&(this[s+1]=a.contextBind(o,t))}return this._setLength(i+1),i},P.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},P.prototype._resolveCallback=function(e,t){if(0==(117506048&this._bitField)){if(e===this)return this._rejectCallback(r(),!1);var n=j(e,this);if(!(n instanceof P))return this._fulfill(e);t&&this._propagateFrom(n,2);var o=n._target();if(o!==this){var i=o._bitField;if(0==(50397184&i)){var s=this._length();s>0&&o._migrateCallback0(this);for(var a=1;a<s;++a)o._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(n)}else if(0!=(33554432&i))this._fulfill(o._value());else if(0!=(16777216&i))this._reject(o._reason());else{var u=new v("late cancellation observer");o._attachExtraTrace(u),this._reject(u)}}else this._reject(r())}},P.prototype._rejectCallback=function(e,t,r){var n=a.ensureErrorObject(e),o=n===e;if(!o&&!r&&T.warnings()){var i="a promise was rejected with a non-error: "+a.classString(e);this._warn(i,!0)}this._attachExtraTrace(n,!!t&&o),this._reject(e)},P.prototype._resolveFromExecutor=function(e){if(e!==g){var t=this;this._captureStackTrace(),this._pushContext();var r=!0,n=this._execute(e,(function(e){t._resolveCallback(e)}),(function(e){t._rejectCallback(e,r)}));r=!1,this._popContext(),void 0!==n&&t._rejectCallback(n,!0)}},P.prototype._settlePromiseFromHandler=function(e,t,r,n){var o=n._bitField;if(0==(65536&o)){var i;n._pushContext(),t===b?r&&"number"==typeof r.length?i=C(e).apply(this._boundValue(),r):(i=R).e=new y("cannot .spread() a non-array: "+a.classString(r)):i=C(e).call(t,r);var s=n._popContext();0==(65536&(o=n._bitField))&&(i===w?n._reject(r):i===R?n._rejectCallback(i.e,!1):(T.checkForgottenReturns(i,s,"",n,this),n._resolveCallback(i)))}},P.prototype._target=function(){for(var e=this;e._isFollowing();)e=e._followee();return e},P.prototype._followee=function(){return this._rejectionHandler0},P.prototype._setFollowee=function(e){this._rejectionHandler0=e},P.prototype._settlePromise=function(e,t,r,o){var s=e instanceof P,a=this._bitField,u=0!=(134217728&a);0!=(65536&a)?(s&&e._invokeInternalOnCancel(),r instanceof A&&r.isFinallyHandler()?(r.cancelPromise=e,C(t).call(r,o)===R&&e._reject(R.e)):t===n?e._fulfill(n.call(r)):r instanceof i?r._promiseCancelled(e):s||e instanceof k?e._cancel():r.cancel()):"function"==typeof t?s?(u&&e._setAsyncGuaranteed(),this._settlePromiseFromHandler(t,r,o,e)):t.call(r,o,e):r instanceof i?r._isResolved()||(0!=(33554432&a)?r._promiseFulfilled(o,e):r._promiseRejected(o,e)):s&&(u&&e._setAsyncGuaranteed(),0!=(33554432&a)?e._fulfill(o):e._reject(o))},P.prototype._settlePromiseLateCancellationObserver=function(e){var t=e.handler,r=e.promise,n=e.receiver,o=e.value;"function"==typeof t?r instanceof P?this._settlePromiseFromHandler(t,n,o,r):t.call(n,o,r):r instanceof P&&r._reject(o)},P.prototype._settlePromiseCtx=function(e){this._settlePromise(e.promise,e.handler,e.receiver,e.value)},P.prototype._settlePromise0=function(e,t,r){var n=this._promise0,o=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(n,e,o,t)},P.prototype._clearCallbackDataAtIndex=function(e){var t=4*e-4;this[t+2]=this[t+3]=this[t+0]=this[t+1]=void 0},P.prototype._fulfill=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(e===this){var n=r();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(0!=(134217728&t)?this._settlePromises():_.settlePromises(this),this._dereferenceTrace())}},P.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=e,this._isFinal())return _.fatalError(e,a.isNode);(65535&t)>0?_.settlePromises(this):this._ensurePossibleRejectionHandled()}},P.prototype._fulfillPromises=function(e,t){for(var r=1;r<e;r++){var n=this._fulfillmentHandlerAt(r),o=this._promiseAt(r),i=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(o,n,i,t)}},P.prototype._rejectPromises=function(e,t){for(var r=1;r<e;r++){var n=this._rejectionHandlerAt(r),o=this._promiseAt(r),i=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(o,n,i,t)}},P.prototype._settlePromises=function(){var e=this._bitField,t=65535&e;if(t>0){if(0!=(16842752&e)){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,e),this._rejectPromises(t,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,e),this._fulfillPromises(t,n)}this._setLength(0)}this._clearCancellationData()},P.prototype._settledValue=function(){var e=this._bitField;return 0!=(33554432&e)?this._rejectionHandler0:0!=(16777216&e)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&f.defineProperty(P.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),P.defer=P.pending=function(){return T.deprecated("Promise.defer","new Promise"),{promise:new P(g),resolve:M,reject:I}},a.notEnumerableProp(P,"_makeSelfResolutionError",r),e("./method")(P,g,j,o,T),e("./bind")(P,g,j,T),e("./cancel")(P,k,o,T),e("./direct_resolve")(P),e("./synchronous_inspection")(P),e("./join")(P,k,j,g,_),P.Promise=P,P.version="3.7.2",e("./call_get.js")(P),e("./generators.js")(P,o,g,j,i,T),e("./map.js")(P,k,o,j,g,T),e("./nodeify.js")(P),e("./promisify.js")(P,g),e("./props.js")(P,k,j,o),e("./race.js")(P,g,j,o),e("./reduce.js")(P,k,o,j,g,T),e("./settle.js")(P,k,T),e("./some.js")(P,k,o),e("./timers.js")(P,g,T),e("./using.js")(P,o,j,x,g,T),e("./any.js")(P),e("./each.js")(P,g),e("./filter.js")(P,g),a.toFastProperties(P),a.toFastProperties(P.prototype),N({a:1}),N({b:2}),N({c:3}),N(1),N((function(){})),N(void 0),N(!1),N(new P(g)),T.setBounds(p.firstLineError,a.lastLineError),P}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36,async_hooks:void 0}],23:[function(e,t,r){"use strict";t.exports=function(t,r,n,o,i){var s=e("./util");function a(e){var n=this._promise=new t(r);e instanceof t&&(n._propagateFrom(e,3),e.suppressUnhandledRejections()),n._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return s.isArray,s.inherits(a,i),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function e(r,i){var a=n(this._values,this._promise);if(a instanceof t){var u=(a=a._target())._bitField;if(this._values=a,0==(50397184&u))return this._promise._setAsyncGuaranteed(),a._then(e,this._reject,void 0,this,i);if(0==(33554432&u))return 0!=(16777216&u)?this._reject(a._reason()):this._cancel();a=a._value()}if(null!==(a=s.asArray(a)))0!==a.length?this._iterate(a):-5===i?this._resolveEmptyArray():this._resolve(function(e){switch(e){case-2:return[];case-3:return{};case-6:return new Map}}(i));else{var l=o("expecting an array or an iterable object but got "+s.classString(a)).reason();this._promise._rejectCallback(l,!1)}},a.prototype._iterate=function(e){var r=this.getActualLength(e.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var o=this._promise,i=!1,s=null,a=0;a<r;++a){var u=n(e[a],o);s=u instanceof t?(u=u._target())._bitField:null,i?null!==s&&u.suppressUnhandledRejections():null!==s?0==(50397184&s)?(u._proxy(this,a),this._values[a]=u):i=0!=(33554432&s)?this._promiseFulfilled(u._value(),a):0!=(16777216&s)?this._promiseRejected(u._reason(),a):this._promiseCancelled(a):i=this._promiseFulfilled(u,a)}i||o._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(e){this._values=null,this._promise._fulfill(e)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(e){this._values=null,this._promise._rejectCallback(e,!1)},a.prototype._promiseFulfilled=function(e,t){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var r=0;r<e.length;++r)e[r]instanceof t&&e[r].cancel()}},a.prototype.shouldCopyValues=function(){return!0},a.prototype.getActualLength=function(e){return e},a}},{"./util":36}],24:[function(e,t,r){"use strict";t.exports=function(t,r){var n={},o=e("./util"),i=e("./nodeback"),s=o.withAppended,a=o.maybeWrapAsError,u=o.canEvaluate,l=e("./errors").TypeError,c={__isPromisified__:!0},d=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),h=function(e){return o.isIdentifier(e)&&"_"!==e.charAt(0)&&"constructor"!==e};function f(e){return!d.test(e)}function p(e){try{return!0===e.__isPromisified__}catch(e){return!1}}function _(e,t,r){var n=o.getDataPropertyOrDefault(e,t+r,c);return!!n&&p(n)}function m(e,t,r,n){for(var i=o.inheritedDataKeys(e),s=[],a=0;a<i.length;++a){var u=i[a],c=e[u],d=n===h||h(u);"function"!=typeof c||p(c)||_(e,u,t)||!n(u,c,e,d)||s.push(u,c)}return function(e,t,r){for(var n=0;n<e.length;n+=2){var o=e[n];if(r.test(o))for(var i=o.replace(r,""),s=0;s<e.length;s+=2)if(e[s]===i)throw new l("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",t))}}(s,t,r),s}var y=u?void 0:function(e,u,l,c,d,h){var f=function(){return this}(),p=e;function _(){var o=u;u===n&&(o=this);var l=new t(r);l._captureStackTrace();var c="string"==typeof p&&this!==f?this[p]:e,d=i(l,h);try{c.apply(o,s(arguments,d))}catch(e){l._rejectCallback(a(e),!0,!0)}return l._isFateSealed()||l._setAsyncGuaranteed(),l}return"string"==typeof p&&(e=c),o.notEnumerableProp(_,"__isPromisified__",!0),_};function v(e,t,r,i,s){for(var a=new RegExp(t.replace(/([$])/,"\\$")+"$"),u=m(e,t,a,r),l=0,c=u.length;l<c;l+=2){var d=u[l],h=u[l+1],f=d+t;if(i===y)e[f]=y(d,n,d,h,t,s);else{var p=i(h,(function(){return y(d,n,d,h,t,s)}));o.notEnumerableProp(p,"__isPromisified__",!0),e[f]=p}}return o.toFastProperties(e),e}t.promisify=function(e,t){if("function"!=typeof e)throw new l("expecting a function but got "+o.classString(e));if(p(e))return e;var r=function(e,t,r){return y(e,t,void 0,e,null,r)}(e,void 0===(t=Object(t)).context?n:t.context,!!t.multiArgs);return o.copyDescriptors(e,r,f),r},t.promisifyAll=function(e,t){if("function"!=typeof e&&"object"!=typeof e)throw new l("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var r=!!(t=Object(t)).multiArgs,n=t.suffix;"string"!=typeof n&&(n="Async");var i=t.filter;"function"!=typeof i&&(i=h);var s=t.promisifier;if("function"!=typeof s&&(s=y),!o.isIdentifier(n))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var a=o.inheritedDataKeys(e),u=0;u<a.length;++u){var c=e[a[u]];"constructor"!==a[u]&&o.isClass(c)&&(v(c.prototype,n,i,s,r),v(c,n,i,s,r))}return v(e,n,i,s,r)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(e,t,r){"use strict";t.exports=function(t,r,n,o){var i,s=e("./util"),a=s.isObject,u=e("./es5");"function"==typeof Map&&(i=Map);var l=function(){var e=0,t=0;function r(r,n){this[e]=r,this[e+t]=n,e++}return function(n){t=n.size,e=0;var o=new Array(2*n.size);return n.forEach(r,o),o}}();function c(e){var t,r=!1;if(void 0!==i&&e instanceof i)t=l(e),r=!0;else{var n=u.keys(e),o=n.length;t=new Array(2*o);for(var s=0;s<o;++s){var a=n[s];t[s]=e[a],t[s+o]=a}}this.constructor$(t),this._isMap=r,this._init$(void 0,r?-6:-3)}function d(e){var r,i=n(e);return a(i)?(r=i instanceof t?i._then(t.props,void 0,void 0,void 0,void 0):new c(i).promise(),i instanceof t&&r._propagateFrom(i,2),r):o("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}s.inherits(c,r),c.prototype._init=function(){},c.prototype._promiseFulfilled=function(e,t){if(this._values[t]=e,++this._totalResolved>=this._length){var r;if(this._isMap)r=function(e){for(var t=new i,r=e.length/2|0,n=0;n<r;++n){var o=e[r+n],s=e[n];t.set(o,s)}return t}(this._values);else{r={};for(var n=this.length(),o=0,s=this.length();o<s;++o)r[this._values[o+n]]=this._values[o]}return this._resolve(r),!0}return!1},c.prototype.shouldCopyValues=function(){return!1},c.prototype.getActualLength=function(e){return e>>1},t.prototype.props=function(){return d(this)},t.props=function(e){return d(e)}}},{"./es5":13,"./util":36}],26:[function(e,t,r){"use strict";function n(e){this._capacity=e,this._length=0,this._front=0}n.prototype._willBeOverCapacity=function(e){return this._capacity<e},n.prototype._pushOne=function(e){var t=this.length();this._checkCapacity(t+1),this[this._front+t&this._capacity-1]=e,this._length=t+1},n.prototype.push=function(e,t,r){var n=this.length()+3;if(this._willBeOverCapacity(n))return this._pushOne(e),this._pushOne(t),void this._pushOne(r);var o=this._front+n-3;this._checkCapacity(n);var i=this._capacity-1;this[o+0&i]=e,this[o+1&i]=t,this[o+2&i]=r,this._length=n},n.prototype.shift=function(){var e=this._front,t=this[e];return this[e]=void 0,this._front=e+1&this._capacity-1,this._length--,t},n.prototype.length=function(){return this._length},n.prototype._checkCapacity=function(e){this._capacity<e&&this._resizeTo(this._capacity<<1)},n.prototype._resizeTo=function(e){var t=this._capacity;this._capacity=e,function(e,t,r,n,o){for(var i=0;i<o;++i)r[i+n]=e[i+t],e[i+t]=void 0}(this,0,this,t,this._front+this._length&t-1)},t.exports=n},{}],27:[function(e,t,r){"use strict";t.exports=function(t,r,n,o){var i=e("./util");function s(e,a){var u,l=n(e);if(l instanceof t)return(u=l).then((function(e){return s(e,u)}));if(null===(e=i.asArray(e)))return o("expecting an array or an iterable object but got "+i.classString(e));var c=new t(r);void 0!==a&&c._propagateFrom(a,3);for(var d=c._fulfill,h=c._reject,f=0,p=e.length;f<p;++f){var _=e[f];(void 0!==_||f in e)&&t.cast(_)._then(d,h,void 0,c,null)}return c}t.race=function(e){return s(e,void 0)},t.prototype.race=function(){return s(this,void 0)}}},{"./util":36}],28:[function(e,t,r){"use strict";t.exports=function(t,r,n,o,i,s){var a=e("./util"),u=a.tryCatch;function l(e,r,n,o){this.constructor$(e);var s=t._getContext();this._fn=a.contextBind(s,r),void 0!==n&&(n=t.resolve(n))._attachCancellationCallback(this),this._initialValue=n,this._currentCancellable=null,this._eachValues=o===i?Array(this._length):0===o?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(e,t){this.isFulfilled()?t._resolve(e):t._reject(e)}function d(e,t,r,o){return"function"!=typeof t?n("expecting a function but got "+a.classString(t)):new l(e,t,r,o).promise()}function h(e){this.accum=e,this.array._gotAccum(e);var r=o(this.value,this.array._promise);return r instanceof t?(this.array._currentCancellable=r,r._then(f,void 0,void 0,this,void 0)):f.call(this,r)}function f(e){var r,n=this.array,o=n._promise,i=u(n._fn);o._pushContext(),(r=void 0!==n._eachValues?i.call(o._boundValue(),e,this.index,this.length):i.call(o._boundValue(),this.accum,e,this.index,this.length))instanceof t&&(n._currentCancellable=r);var a=o._popContext();return s.checkForgottenReturns(r,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",o),r}a.inherits(l,r),l.prototype._gotAccum=function(e){void 0!==this._eachValues&&null!==this._eachValues&&e!==i&&this._eachValues.push(e)},l.prototype._eachComplete=function(e){return null!==this._eachValues&&this._eachValues.push(e),this._eachValues},l.prototype._init=function(){},l.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},l.prototype.shouldCopyValues=function(){return!1},l.prototype._resolve=function(e){this._promise._resolveCallback(e),this._values=null},l.prototype._resultCancelled=function(e){if(e===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof t&&this._currentCancellable.cancel(),this._initialValue instanceof t&&this._initialValue.cancel())},l.prototype._iterate=function(e){var r,n;this._values=e;var o=e.length;void 0!==this._initialValue?(r=this._initialValue,n=0):(r=t.resolve(e[0]),n=1),this._currentCancellable=r;for(var i=n;i<o;++i){var s=e[i];s instanceof t&&s.suppressUnhandledRejections()}if(!r.isRejected())for(;n<o;++n){var a={accum:null,value:e[n],index:n,length:o,array:this};r=r._then(h,void 0,void 0,a,void 0),0==(127&n)&&r._setNoAsyncGuarantee()}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(c,c,void 0,r,this)},t.prototype.reduce=function(e,t){return d(this,e,t,null)},t.reduce=function(e,t,r,n){return d(e,t,r,n)}}},{"./util":36}],29:[function(e,t,o){"use strict";var i,s,a,u,l,c=e("./util"),d=c.getNativePromise();if(c.isNode&&"undefined"==typeof MutationObserver){var h=r.g.setImmediate,f=process.nextTick;i=c.isRecentNode?function(e){h.call(r.g,e)}:function(e){f.call(process,e)}}else if("function"==typeof d&&"function"==typeof d.resolve){var p=d.resolve();i=function(e){p.then(e)}}else i="undefined"==typeof MutationObserver||void 0!==n&&n.navigator&&(n.navigator.standalone||n.cordova)||!("classList"in document.documentElement)?"undefined"!=typeof setImmediate?function(e){setImmediate(e)}:"undefined"!=typeof setTimeout?function(e){setTimeout(e,0)}:function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}:(s=document.createElement("div"),a={attributes:!0},u=!1,l=document.createElement("div"),new MutationObserver((function(){s.classList.toggle("foo"),u=!1})).observe(l,a),function(e){var t=new MutationObserver((function(){t.disconnect(),e()}));t.observe(s,a),u||(u=!0,l.classList.toggle("foo"))});t.exports=i},{"./util":36}],30:[function(e,t,r){"use strict";t.exports=function(t,r,n){var o=t.PromiseInspection;function i(e){this.constructor$(e)}e("./util").inherits(i,r),i.prototype._promiseResolved=function(e,t){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(e,t){var r=new o;return r._bitField=33554432,r._settledValueField=e,this._promiseResolved(t,r)},i.prototype._promiseRejected=function(e,t){var r=new o;return r._bitField=16777216,r._settledValueField=e,this._promiseResolved(t,r)},t.settle=function(e){return n.deprecated(".settle()",".reflect()"),new i(e).promise()},t.allSettled=function(e){return new i(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t,r){"use strict";t.exports=function(t,r,n){var o=e("./util"),i=e("./errors").RangeError,s=e("./errors").AggregateError,a=o.isArray,u={};function l(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function c(e,t){if((0|t)!==t||t<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new l(e),o=r.promise();return r.setHowMany(t),r.init(),o}o.inherits(l,r),l.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var e=a(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},l.prototype.init=function(){this._initialized=!0,this._init()},l.prototype.setUnwrap=function(){this._unwrap=!0},l.prototype.howMany=function(){return this._howMany},l.prototype.setHowMany=function(e){this._howMany=e},l.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},l.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},l.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},l.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new s,t=this.length();t<this._values.length;++t)this._values[t]!==u&&e.push(this._values[t]);return e.length>0?this._reject(e):this._cancel(),!0}return!1},l.prototype._fulfilled=function(){return this._totalResolved},l.prototype._rejected=function(){return this._values.length-this.length()},l.prototype._addRejected=function(e){this._values.push(e)},l.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},l.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},l.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new i(t)},l.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(e,t){return c(e,t)},t.prototype.some=function(e){return c(this,e)},t._SomePromiseArray=l}},{"./errors":12,"./util":36}],32:[function(e,t,r){"use strict";t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var r=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},o=t.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},i=t.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},s=t.prototype.isPending=function(){return 0==(50397184&this._bitField)},a=t.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};t.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},e.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},e.prototype._isCancelled=function(){return this._target().__isCancelled()},e.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},e.prototype.isPending=function(){return s.call(this._target())},e.prototype.isRejected=function(){return i.call(this._target())},e.prototype.isFulfilled=function(){return o.call(this._target())},e.prototype.isResolved=function(){return a.call(this._target())},e.prototype.value=function(){return r.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),n.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],33:[function(e,t,r){"use strict";t.exports=function(t,r){var n=e("./util"),o=n.errorObj,i=n.isObject,s={}.hasOwnProperty;return function(e,a){if(i(e)){if(e instanceof t)return e;var u=function(e){try{return function(e){return e.then}(e)}catch(e){return o.e=e,o}}(e);if(u===o){a&&a._pushContext();var l=t.reject(u.e);return a&&a._popContext(),l}if("function"==typeof u)return function(e){try{return s.call(e,"_promise0")}catch(e){return!1}}(e)?(l=new t(r),e._then(l._fulfill,l._reject,void 0,l,null),l):function(e,i,s){var a=new t(r),u=a;s&&s._pushContext(),a._captureStackTrace(),s&&s._popContext();var l=!0,c=n.tryCatch(i).call(e,d,h);function d(e){a&&(a._resolveCallback(e),a=null)}function h(e){a&&(a._rejectCallback(e,l,!0),a=null)}return l=!1,a&&c===o&&(a._rejectCallback(c.e,!0,!0),a=null),u}(e,u,a)}return e}}},{"./util":36}],34:[function(e,t,r){"use strict";t.exports=function(t,r,n){var o=e("./util"),i=t.TimeoutError;function s(e){this.handle=e}s.prototype._resultCancelled=function(){clearTimeout(this.handle)};var a=function(e){return u(+this).thenReturn(e)},u=t.delay=function(e,o){var i,u;return void 0!==o?(i=t.resolve(o)._then(a,null,null,e,void 0),n.cancellation()&&o instanceof t&&i._setOnCancel(o)):(i=new t(r),u=setTimeout((function(){i._fulfill()}),+e),n.cancellation()&&i._setOnCancel(new s(u)),i._captureStackTrace()),i._setAsyncGuaranteed(),i};function l(e){return clearTimeout(this.handle),e}function c(e){throw clearTimeout(this.handle),e}t.prototype.delay=function(e){return u(e,this)},t.prototype.timeout=function(e,t){var r,a;e=+e;var u=new s(setTimeout((function(){r.isPending()&&function(e,t,r){var n;n="string"!=typeof t?t instanceof Error?t:new i("operation timed out"):new i(t),o.markAsOriginatingFromRejection(n),e._attachExtraTrace(n),e._reject(n),null!=r&&r.cancel()}(r,t,a)}),e));return n.cancellation()?(a=this.then(),(r=a._then(l,c,void 0,u,void 0))._setOnCancel(u)):r=this._then(l,c,void 0,u,void 0),r}}},{"./util":36}],35:[function(e,t,r){"use strict";t.exports=function(t,r,n,o,i,s){var a=e("./util"),u=e("./errors").TypeError,l=e("./util").inherits,c=a.errorObj,d=a.tryCatch,h={};function f(e){setTimeout((function(){throw e}),0)}function p(e,r){var o=0,s=e.length,a=new t(i);return function i(){if(o>=s)return a._fulfill();var u=function(e){var t=n(e);return t!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}(e[o++]);if(u instanceof t&&u._isDisposable()){try{u=n(u._getDisposer().tryDispose(r),e.promise)}catch(e){return f(e)}if(u instanceof t)return u._then(i,f,null,null,null)}i()}(),a}function _(e,t,r){this._data=e,this._promise=t,this._context=r}function m(e,t,r){this.constructor$(e,t,r)}function y(e){return _.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function v(e){this.length=e,this.promise=null,this[e-1]=null}_.prototype.data=function(){return this._data},_.prototype.promise=function(){return this._promise},_.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():h},_.prototype.tryDispose=function(e){var t=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=t!==h?this.doDispose(t,e):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},_.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},l(m,_),m.prototype.doDispose=function(e,t){return this.data().call(e,e,t)},v.prototype._resultCancelled=function(){for(var e=this.length,r=0;r<e;++r){var n=this[r];n instanceof t&&n.cancel()}},t.using=function(){var e=arguments.length;if(e<2)return r("you must pass at least 2 arguments to Promise.using");var o,i=arguments[e-1];if("function"!=typeof i)return r("expecting a function but got "+a.classString(i));var u=!0;2===e&&Array.isArray(arguments[0])?(e=(o=arguments[0]).length,u=!1):(o=arguments,e--);for(var l=new v(e),h=0;h<e;++h){var f=o[h];if(_.isDisposer(f)){var m=f;(f=f.promise())._setDisposable(m)}else{var g=n(f);g instanceof t&&(f=g._then(y,null,null,{resources:l,index:h},void 0))}l[h]=f}var b=new Array(l.length);for(h=0;h<b.length;++h)b[h]=t.resolve(l[h]).reflect();var w=t.all(b).then((function(e){for(var t=0;t<e.length;++t){var r=e[t];if(r.isRejected())return c.e=r.error(),c;if(!r.isFulfilled())return void w.cancel();e[t]=r.value()}j._pushContext(),i=d(i);var n=u?i.apply(void 0,e):i(e),o=j._popContext();return s.checkForgottenReturns(n,o,"Promise.using",j),n})),j=w.lastly((function(){var e=new t.PromiseInspection(w);return p(l,e)}));return l.promise=j,j._setOnCancel(l),j},t.prototype._setDisposable=function(e){this._bitField=131072|this._bitField,this._disposer=e},t.prototype._isDisposable=function(){return(131072&this._bitField)>0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(e){if("function"==typeof e)return new m(e,this,o());throw new u}}},{"./errors":12,"./util":36}],36:[function(e,t,o){"use strict";var i=e("./es5"),s="undefined"==typeof navigator,a={e:{}},u,l="undefined"!=typeof self?self:void 0!==n?n:void 0!==r.g?r.g:void 0!==this?this:null;function c(){try{var e=u;return u=null,e.apply(this,arguments)}catch(e){return a.e=e,a}}function d(e){return u=e,c}var h=function(e,t){var r={}.hasOwnProperty;function n(){for(var n in this.constructor=e,this.constructor$=t,t.prototype)r.call(t.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=t.prototype[n])}return n.prototype=t.prototype,e.prototype=new n,e.prototype};function f(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function p(e){return"function"==typeof e||"object"==typeof e&&null!==e}function _(e){return f(e)?new Error(A(e)):e}function m(e,t){var r,n=e.length,o=new Array(n+1);for(r=0;r<n;++r)o[r]=e[r];return o[r]=t,o}function y(e,t,r){if(!i.isES5)return{}.hasOwnProperty.call(e,t)?e[t]:void 0;var n=Object.getOwnPropertyDescriptor(e,t);return null!=n?null==n.get&&null==n.set?n.value:r:void 0}function v(e,t,r){if(f(e))return e;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return i.defineProperty(e,t,n),e}function g(e){throw e}var b=function(){var e=[Array.prototype,Object.prototype,Function.prototype],t=function(t){for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1};if(i.isES5){var r=Object.getOwnPropertyNames;return function(e){for(var n=[],o=Object.create(null);null!=e&&!t(e);){var s;try{s=r(e)}catch(e){return n}for(var a=0;a<s.length;++a){var u=s[a];if(!o[u]){o[u]=!0;var l=Object.getOwnPropertyDescriptor(e,u);null!=l&&null==l.get&&null==l.set&&n.push(u)}}e=i.getPrototypeOf(e)}return n}}var n={}.hasOwnProperty;return function(r){if(t(r))return[];var o=[];e:for(var i in r)if(n.call(r,i))o.push(i);else{for(var s=0;s<e.length;++s)if(n.call(e[s],i))continue e;o.push(i)}return o}}(),w=/this\s*\.\s*\S+\s*=/;function j(e){try{if("function"==typeof e){var t=i.names(e.prototype),r=i.isES5&&t.length>1,n=t.length>0&&!(1===t.length&&"constructor"===t[0]),o=w.test(e+"")&&i.names(e).length>0;if(r||n||o)return!0}return!1}catch(e){return!1}}function k(e){function t(){}t.prototype=e;var r=new t;function n(){return typeof r.foo}return n(),n(),e}var S=/^[a-z$_][a-z$_0-9]*$/i;function x(e){return S.test(e)}function T(e,t,r){for(var n=new Array(e),o=0;o<e;++o)n[o]=t+o+r;return n}function A(e){try{return e+""}catch(e){return"[no string representation]"}}function E(e){return e instanceof Error||null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name}function O(e){try{v(e,"isOperational",!0)}catch(e){}}function R(e){return null!=e&&(e instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===e.isOperational)}function C(e){return E(e)&&i.propertyIsWritable(e,"stack")}var P="stack"in new Error?function(e){return C(e)?e:new Error(A(e))}:function(e){if(C(e))return e;try{throw new Error(A(e))}catch(e){return e}};function M(e){return{}.toString.call(e)}function I(e,t,r){for(var n=i.names(e),o=0;o<n.length;++o){var s=n[o];if(r(s))try{i.defineProperty(t,s,i.getDescriptor(e,s))}catch(e){}}}var N=function(e){return i.isArray(e)?e:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var L="function"==typeof Array.from?function(e){return Array.from(e)}:function(e){for(var t,r=[],n=e[Symbol.iterator]();!(t=n.next()).done;)r.push(t.value);return r};N=function(e){return i.isArray(e)?e:null!=e&&"function"==typeof e[Symbol.iterator]?L(e):null}}var B="undefined"!=typeof process&&"[object process]"===M(process).toLowerCase(),D="undefined"!=typeof process&&void 0!==process.env,F;function U(e){return D?process.env[e]:void 0}function H(){if("function"==typeof Promise)try{if("[object Promise]"===M(new Promise((function(){}))))return Promise}catch(e){}}function q(e,t){if(null===e||"function"!=typeof t||t===F)return t;null!==e.domain&&(t=e.domain.bind(t));var r=e.async;if(null!==r){var n=t;t=function(){var e=new Array(2).concat([].slice.call(arguments));return e[0]=n,e[1]=this,r.runInAsyncScope.apply(r,e)}}return t}var V={setReflectHandler:function(e){F=e},isClass:j,isIdentifier:x,inheritedDataKeys:b,getDataPropertyOrDefault:y,thrower:g,isArray:i.isArray,asArray:N,notEnumerableProp:v,isPrimitive:f,isObject:p,isError:E,canEvaluate:s,errorObj:a,tryCatch:d,inherits:h,withAppended:m,maybeWrapAsError:_,toFastProperties:k,filledRange:T,toString:A,canAttachTrace:C,ensureErrorObject:P,originatesFromRejection:R,markAsOriginatingFromRejection:O,classString:M,copyDescriptors:I,isNode:B,hasEnvVariables:D,env:U,global:l,getNativePromise:H,contextBind:q},K;V.isRecentNode=V.isNode&&(process.versions&&process.versions.node?K=process.versions.node.split(".").map(Number):process.version&&(K=process.version.split(".").map(Number)),0===K[0]&&K[1]>10||K[0]>0),V.nodeSupportsAsyncResource=V.isNode&&function(){var t=!1;try{t="function"==typeof e("async_hooks").AsyncResource.prototype.runInAsyncScope}catch(e){t=!1}return t}(),V.isNode&&V.toFastProperties(process);try{throw new Error}catch(e){V.lastLineError=e}t.exports=V},{"./es5":13,async_hooks:void 0}]},{},[4])(4)},e.exports=o(),null!=n?n.P=n.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)},"./node_modules/buffer/index.js":(e,t,r)=>{"use strict";var n=r("./node_modules/base64-js/index.js"),o=r("./node_modules/ieee754/index.js"),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50;var s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|_(e,t),n=a(r),o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(H(e,Uint8Array)){var t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(H(e,ArrayBuffer)||e&&H(e.buffer,ArrayBuffer))return f(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(H(e,SharedArrayBuffer)||e&&H(e.buffer,SharedArrayBuffer)))return f(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);var o=function(e){if(u.isBuffer(e)){var t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||q(e.length)?a(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return c(e),a(e<0?0:0|p(e))}function h(e){for(var t=e.length<0?0:0|p(e.length),r=a(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function f(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function _(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||H(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(e).length;default:if(o)return n?-1:D(e).length;t=(""+t).toLowerCase(),o=!0}}function m(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return E(this,t,r);case"latin1":case"binary":return O(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),q(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,o){var i,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var c=-1;for(i=r;i<a;i++)if(l(e,i)===l(t,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===u)return c*s}else-1!==c&&(i-=i-c),c=-1}else for(r+u>a&&(r=a-u),i=r;i>=0;i--){for(var d=!0,h=0;h<u;h++)if(l(e,i+h)!==l(t,h)){d=!1;break}if(d)return i}return-1}function b(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;n>i/2&&(n=i/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(q(a))return s;e[r+s]=a}return s}function w(e,t,r,n){return U(D(t,e.length-r),e,r,n)}function j(e,t,r,n){return U(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function k(e,t,r,n){return U(F(t),e,r,n)}function S(e,t,r,n){return U(function(e,t){for(var r,n,o,i=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,s,a,u,l=e[o],c=null,d=l>239?4:l>223?3:l>191?2:1;if(o+d<=r)switch(d){case 1:l<128&&(c=l);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&l)<<6|63&i)>127&&(c=u);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(u=(15&l)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&l)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,d=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=d}return function(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=A));return r}(n)}t.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return c(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},u.allocUnsafe=function(e){return d(e)},u.allocUnsafeSlow=function(e){return d(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(H(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),H(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?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(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var i=e[r];if(H(i,Uint8Array))o+i.length>n.length?u.from(i).copy(n,o):Uint8Array.prototype.set.call(n,i,o);else{if(!u.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o)}o+=i.length}return n},u.byteLength=_,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=this.length;return 0===e?"":0===arguments.length?T(this,0,e):m.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,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="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,o){if(H(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(i,s),l=this.slice(n,o),c=e.slice(t,r),d=0;d<a;++d)if(l[d]!==c[d]){i=l[d],s=c[d];break}return i<s?-1:s<i?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return j(this,e,t,r);case"base64":return k(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function E(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function O(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function R(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=V[e[i]];return o}function C(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length-1;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function P(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function I(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,n,i){return t=+t,r>>>=0,i||I(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,i){return t=+t,r>>>=0,i||I(e,0,r,8),o.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r=this.length;(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);var n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(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 e>>>=0,t||P(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 e>>>=0,t||P(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||M(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||M(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);M(this,e,t,r,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);M(this,e,t,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var s=u.isBuffer(e)?e:u.from(e,n),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%a]}return this};var B=/[^+/0-9A-Za-z-_]/g;function D(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function F(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function H(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function q(e){return e!=e}var V=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,o=0;o<16;++o)t[n+o]=e[r]+e[o];return t}()},"./node_modules/cfw-easy-utils/dist/cfw-easy-utils.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("./node_modules/nanoevents/index.cjs"),o=r("./node_modules/cookie/index.js");const i={jar:class{constructor(e){this.request=e,this.cookies=e?o.parse(e.headers.get("cookie")||""):{},this.futureCookies={}}get(e){return this.cookies[e]}set(e,t,r){this.futureCookies[e]={value:t,...r}}__remove(){}values(){var e=[];for(const[t,r]of Object.entries(this.futureCookies))e.push(o.serialize(t,r.value,r));return e}}};function s(e){var t="",r="0123456789abcdef";return new Uint8Array(e).forEach((e=>{t+=r[e>>4]+r[15&e]})),t}const a={uuidv4:()=>([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))),async hashPassword(e,t){var r=(t=t||{}).salt||crypto.getRandomValues(new Uint8Array(8)),n=t.iterations||45e3;"string"==typeof r&&(r=function(e){(e=e.replace(/^0x/,"")).length%2!=0&&console.log("WARNING: expecting an even number of characters in the hexString");var t=e.match(/[G-Z\s]/i);t&&console.log("WARNING: found non-hex characters",t);var r=e.match(/[\dA-F]{2}/gi).map((function(e){return parseInt(e,16)}));return new Uint8Array(r).buffer}(r));const o=new TextEncoder("utf-8").encode(e),i=await crypto.subtle.importKey("raw",o,{name:"PBKDF2"},!1,["deriveBits","deriveKey"]),a=await crypto.subtle.deriveKey({name:"PBKDF2",salt:r,iterations:n,hash:"SHA-256"},i,{name:"AES-CBC",length:256},!0,["encrypt","decrypt"]);return`$PBKDF2;h=${s(await crypto.subtle.exportKey("raw",a))};s=${s(r)};i=${n};`},async validatePassword(e,t){for(var r={salt:t.split(";s=")[1].split(";")[0],iterations:parseInt(t.split(";i=")[1].split(";")[0])},n=await this.hashPassword(e,r),o=!0,i=0;i<n.length;i++)n.charAt(i)!=t.charAt(i)&&(o=!1);return o}},u={version:"1.0.2",config:{secretKey:"password",debugHeaders:!1},accessControl:{allowOrigin:"*",allowMethods:"GET, POST, PUT",allowHeaders:"Content-Type"},request:null,_corsHeaders(){var e=this.accessControl.allowOrigin;return this.request&&(e=new URL(this.request.url).origin),{"Access-Control-Allow-Origin":e,"Access-Control-Allow-Methods":this.accessControl.allowMethods,"Access-Control-Max-Age":"1728000"}},injectCors(e,t){this._corsHeaders()},_genericResponse(e,t,r){void 0===r&&(r={});var n=r.headers||{},o=r.status||200,i=r.statusText||"OK",s=r.autoCors;void 0===r.autoCors&&(s=!0);var a=r.cookies||null,u=r.stopwatch||null,l={"Content-Type":e,...n};s&&(l={...l,...this._corsHeaders()});var c=new Response(t,{status:o,statusText:i,headers:l});return a&&a.values().forEach((e=>{c.headers.append("Set-Cookie",e)})),u&&c.headers.set("Server-Timing",u.getHeader()),this.config.debugHeaders&&c.headers.set("x-cfw-eu-version",this.version),new Promise((e=>e(c)))},cors(e){return e&&(this.request=e),new Response(null,{headers:this._corsHeaders()})},json(e,t){var r=e;return"string"!=typeof r&&(r=JSON.stringify(e)),this._genericResponse("application/json",r,t)},html(e,t){return this._genericResponse("text/html",e,t)},text(e,t){return this._genericResponse("plain/text",e,t)},fromResponse(e,t){var r={...this.headersToObject(e.headers),...t.headers||{}};"headers"in t&&delete t.headers;var n=JSON.parse(JSON.stringify(r["content-type"]));return"content-type"in r&&delete r["content-type"],this._genericResponse(n,e.body,{headers:r,...t})},async static(e,t){var r=t.baseUrl;if(!r)throw"You need to specify a baseUrl for response.static to work.";let n=new URL(e.url);var o=await fetch(`${r}${n.pathname.replace(t.routePrefix||"<>","")}`,{cf:{cacheTtl:t.ttl||600}});return this.fromResponse(o,t)},websocket:async e=>new Response(null,{status:101,webSocket:e.client}),setHeader(e,t,r){var n=new Response(e.body,e),o=r;return"function"==typeof r.values?(o=r.values()).forEach((e=>{n.headers.append(t,e)})):n.headers.append(t,o),n},headersToObject:e=>Object.fromEntries(e.entries())};t.Stopwatch=class{constructor(){this.start=new Date,this.checkpoints=[{name:"Start",dur:0,desc:"Started recording"}],this.lastCheckpointTime=new Date}mark(e,t){console.log("Last checkpoint: ",this.lastCheckpointTime),console.log(new Date),console.log("Difference: ",new Date-this.lastCheckpointTime),this.checkpoints.push({name:e,time:new Date,dur:new Date-this.lastCheckpointTime,...t}),this.lastCheckpointTime=new Date}getTotalTime(){return new Date-this.start}join(e){var t=this.checkpoints+e.checkpoints;this.checkpoints=t.sort(((e,t)=>t.time-e.time))}getHeader(){var e=[];return this.checkpoints.forEach((t=>{var r=[t.name];Object.keys(t).forEach((e=>{"name"!=e&&"time"!=e&&r.push(`${e}=${t[e]}`)})),e.push(r.join(";"))})),e.join(",")}},t.Websocket=class{constructor(e,t){this.url=e,this.options=t,this.emitter=n.createNanoEvents(),this.sendQueue=[],this.url.includes("wss:")&&(this.url=this.url.replace("wss:","https:")),this.url.includes("ws:")&&(this.url=this.url.replace("ws:","http:")),this.connect()}log(e){this.options.logger&&this.options.logger.send(e)}async connect(){var e=await fetch(this.url,{headers:{upgrade:"websocket"}});this.socket=e.webSocket,this.socket.accept(),this.socket.addEventListener("message",(e=>{this.emitter.emit("rawmessage",e);var t=e.data;try{"string"==typeof(t=JSON.parse(t))&&(t=e.data)}catch(e){}this.emitter.emit("message",t)})),this.socket.addEventListener("close",(()=>{this.emitter.emit("close")})),this.sendQueue.forEach((e=>{this.socket.send(e)})),this.sendQueue=[]}on(e,t){return this.emitter.on(e,t)}addEventListener(e,t){return"message"==e&&(e="rawmessage"),this.emitter.on(e,t)}send(e,t){var r=e;e.constructor!=Object&&e.constructor!=Array||(r=JSON.stringify(r)),this.socket?this.socket.send(r):this.sendQueue.push(r)}},t.WebsocketResponse=class{constructor(){let e=new WebSocketPair;this.socket=e[1],this.client=e[0],this.socket.accept(),this.emitter=n.createNanoEvents(),this.session={history:[],startTime:new Date,lastMessageTime:null},this.socket.addEventListener("message",(e=>{var t=e.data;try{"string"==typeof(t=JSON.stringify(t))&&(t=e.data)}catch(e){}this.session.lastMessageTime=new Date,this.emitter.emit("message",t)})),this.socket.addEventListener("close",(()=>this.emitter.emit("close")))}on(e,t){return this.emitter.on(e,t)}send(e,t){var r=e;e.constructor!=Object&&e.constructor!=Array||(r=JSON.stringify(r)),this.socket.send(r)}},t.cookies=i,t.response=u,t.secrets=a},"./node_modules/cookie/index.js":(e,t)=>{"use strict";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,l=0;l<a.length;l++){var c=a[l],d=c.indexOf("=");if(!(d<0)){var h=c.substr(0,d).trim(),f=c.substr(++d,c.length).trim();'"'==f[0]&&(f=f.slice(1,-1)),null==n[h]&&(n[h]=s(f,u))}}return n},t.serialize=function(e,t,r){var o=r||{},s=o.encode||n;if("function"!=typeof s)throw new TypeError("option encode is invalid");if(!i.test(e))throw new TypeError("argument name is invalid");var a=s(t);if(a&&!i.test(a))throw new TypeError("argument val is invalid");var u=e+"="+a;if(null!=o.maxAge){var l=o.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");u+="; Max-Age="+Math.floor(l)}if(o.domain){if(!i.test(o.domain))throw new TypeError("option domain is invalid");u+="; Domain="+o.domain}if(o.path){if(!i.test(o.path))throw new TypeError("option path is invalid");u+="; Path="+o.path}if(o.expires){if("function"!=typeof o.expires.toUTCString)throw new TypeError("option expires is invalid");u+="; Expires="+o.expires.toUTCString()}o.httpOnly&&(u+="; HttpOnly");o.secure&&(u+="; Secure");if(o.sameSite){switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:case"strict":u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return u};var r=decodeURIComponent,n=encodeURIComponent,o=/; */,i=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function s(e,t){try{return t(e)}catch(t){return e}}},"./node_modules/crc/crc1.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var n=r("./node_modules/buffer/index.js"),o=r("./node_modules/crc/create_buffer.js");const i=(0,r("./node_modules/crc/define_crc.js").default)("crc1",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));let r=~~t,i=0;for(let t=0;t<e.length;t++){i+=e[t]}return r+=i%256,r%256}))},"./node_modules/crc/crc16.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var n=r("./node_modules/buffer/index.js"),o=r("./node_modules/crc/create_buffer.js"),i=r("./node_modules/crc/define_crc.js");let s=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));const a=(0,i.default)("crc-16",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));let r=~~t;for(let t=0;t<e.length;t++){const n=e[t];r=65535&(s[255&(r^n)]^r>>8)}return r}))},"./node_modules/crc/crc16ccitt.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var n=r("./node_modules/buffer/index.js"),o=r("./node_modules/crc/create_buffer.js"),i=r("./node_modules/crc/define_crc.js");let s=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));const a=(0,i.default)("ccitt",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));let r=void 0!==t?~~t:65535;for(let t=0;t<e.length;t++){const n=e[t];r=65535&(s[255&(r>>8^n)]^r<<8)}return r}))},"./node_modules/crc/crc16kermit.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var n=r("./node_modules/buffer/index.js"),o=r("./node_modules/crc/create_buffer.js"),i=r("./node_modules/crc/define_crc.js");let s=[0,4489,8978,12955,17956,22445,25910,29887,35912,40385,44890,48851,51820,56293,59774,63735,4225,264,13203,8730,22181,18220,30135,25662,40137,36160,49115,44626,56045,52068,63999,59510,8450,12427,528,5017,26406,30383,17460,21949,44362,48323,36440,40913,60270,64231,51324,55797,12675,8202,4753,792,30631,26158,21685,17724,48587,44098,40665,36688,64495,60006,55549,51572,16900,21389,24854,28831,1056,5545,10034,14011,52812,57285,60766,64727,34920,39393,43898,47859,21125,17164,29079,24606,5281,1320,14259,9786,57037,53060,64991,60502,39145,35168,48123,43634,25350,29327,16404,20893,9506,13483,1584,6073,61262,65223,52316,56789,43370,47331,35448,39921,29575,25102,20629,16668,13731,9258,5809,1848,65487,60998,56541,52564,47595,43106,39673,35696,33800,38273,42778,46739,49708,54181,57662,61623,2112,6601,11090,15067,20068,24557,28022,31999,38025,34048,47003,42514,53933,49956,61887,57398,6337,2376,15315,10842,24293,20332,32247,27774,42250,46211,34328,38801,58158,62119,49212,53685,10562,14539,2640,7129,28518,32495,19572,24061,46475,41986,38553,34576,62383,57894,53437,49460,14787,10314,6865,2904,32743,28270,23797,19836,50700,55173,58654,62615,32808,37281,41786,45747,19012,23501,26966,30943,3168,7657,12146,16123,54925,50948,62879,58390,37033,33056,46011,41522,23237,19276,31191,26718,7393,3432,16371,11898,59150,63111,50204,54677,41258,45219,33336,37809,27462,31439,18516,23005,11618,15595,3696,8185,63375,58886,54429,50452,45483,40994,37561,33584,31687,27214,22741,18780,15843,11370,7921,3960];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));const a=(0,i.default)("kermit",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));let r=void 0!==t?~~t:0;for(let t=0;t<e.length;t++){const n=e[t];r=65535&(s[255&(r^n)]^r>>8)}return r}))},"./node_modules/crc/crc16modbus.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var n=r("./node_modules/buffer/index.js"),o=r("./node_modules/crc/create_buffer.js"),i=r("./node_modules/crc/define_crc.js");let s=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));const a=(0,i.default)("crc-16-modbus",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));let r=void 0!==t?~~t:65535;for(let t=0;t<e.length;t++){const n=e[t];r=65535&(s[255&(r^n)]^r>>8)}return r}))},"./node_modules/crc/crc16xmodem.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var n=r("./node_modules/buffer/index.js"),o=r("./node_modules/crc/create_buffer.js");const i=(0,r("./node_modules/crc/define_crc.js").default)("xmodem",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));let r=void 0!==t?~~t:0;for(let t=0;t<e.length;t++){let n=r>>>8&255;n^=255&e[t],n^=n>>>4,r=r<<8&65535,r^=n,n=n<<5&65535,r^=n,n=n<<7&65535,r^=n}return r}))},"./node_modules/crc/crc24.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var n=r("./node_modules/buffer/index.js"),o=r("./node_modules/crc/create_buffer.js"),i=r("./node_modules/crc/define_crc.js");let s=[0,8801531,9098509,825846,9692897,1419802,1651692,10452759,10584377,2608578,2839604,11344079,3303384,11807523,12104405,4128302,12930697,4391538,5217156,13227903,5679208,13690003,14450021,5910942,6606768,14844747,15604413,6837830,16197969,7431594,8256604,16494759,840169,9084178,8783076,18463,10434312,1670131,1434117,9678590,11358416,2825259,2590173,10602790,4109873,12122826,11821884,3289031,13213536,5231515,4409965,12912278,5929345,14431610,13675660,5693559,6823513,15618722,14863188,6588335,16513208,8238147,7417269,16212302,1680338,10481449,9664223,1391140,9061683,788936,36926,8838341,12067563,4091408,3340262,11844381,2868234,11372785,10555655,2579964,14478683,5939616,5650518,13661357,5180346,13190977,12967607,4428364,8219746,16457881,16234863,7468436,15633027,6866552,6578062,14816117,1405499,9649856,10463030,1698765,8819930,55329,803287,9047340,11858690,3325945,4072975,12086004,2561507,10574104,11387118,2853909,13647026,5664841,5958079,14460228,4446803,12949160,13176670,5194661,7454091,16249200,16476294,8201341,14834538,6559633,6852199,15647388,3360676,11864927,12161705,4185682,10527045,2551230,2782280,11286707,9619101,1346150,1577872,10379115,73852,8875143,9172337,899466,16124205,7357910,8182816,16421083,6680524,14918455,15678145,6911546,5736468,13747439,14507289,5968354,12873461,4334094,5159928,13170435,4167245,12180150,11879232,3346363,11301036,2767959,2532769,10545498,10360692,1596303,1360505,9604738,913813,9157998,8856728,92259,16439492,8164415,7343561,16138546,6897189,15692510,14936872,6662099,5986813,14488838,13733104,5750795,13156124,5174247,4352529,12855018,2810998,11315341,10498427,2522496,12124823,4148844,3397530,11901793,9135439,862644,110658,8912057,1606574,10407765,9590435,1317464,15706879,6940164,6651890,14889737,8145950,16384229,16161043,7394792,5123014,13133629,12910283,4370992,14535975,5997020,5707818,13718737,2504095,10516836,11329682,2796649,11916158,3383173,4130419,12143240,8893606,129117,876971,9121104,1331783,9576124,10389322,1625009,14908182,6633453,6925851,15721184,7380471,16175372,16402682,8127489,4389423,12891860,13119266,5137369,13704398,5722165,6015427,14517560];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));const a=(0,i.default)("crc-24",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));let r=void 0!==t?~~t:11994318;for(let t=0;t<e.length;t++){const n=e[t];r=16777215&(s[255&(r>>16^n)]^r<<8)}return r}))},"./node_modules/crc/crc32.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var n=r("./node_modules/buffer/index.js"),o=r("./node_modules/crc/create_buffer.js"),i=r("./node_modules/crc/define_crc.js");let s=[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];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));const a=(0,i.default)("crc-32",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));let r=0===t?0:-1^~~t;for(let t=0;t<e.length;t++){const n=e[t];r=s[255&(r^n)]^r>>>8}return-1^r}))},"./node_modules/crc/crc8.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var n=r("./node_modules/buffer/index.js"),o=r("./node_modules/crc/create_buffer.js"),i=r("./node_modules/crc/define_crc.js");let s=[0,7,14,9,28,27,18,21,56,63,54,49,36,35,42,45,112,119,126,121,108,107,98,101,72,79,70,65,84,83,90,93,224,231,238,233,252,251,242,245,216,223,214,209,196,195,202,205,144,151,158,153,140,139,130,133,168,175,166,161,180,179,186,189,199,192,201,206,219,220,213,210,255,248,241,246,227,228,237,234,183,176,185,190,171,172,165,162,143,136,129,134,147,148,157,154,39,32,41,46,59,60,53,50,31,24,17,22,3,4,13,10,87,80,89,94,75,76,69,66,111,104,97,102,115,116,125,122,137,142,135,128,149,146,155,156,177,182,191,184,173,170,163,164,249,254,247,240,229,226,235,236,193,198,207,200,221,218,211,212,105,110,103,96,117,114,123,124,81,86,95,88,77,74,67,68,25,30,23,16,5,2,11,12,33,38,47,40,61,58,51,52,78,73,64,71,82,85,92,91,118,113,120,127,106,109,100,99,62,57,48,55,34,37,44,43,6,1,8,15,26,29,20,19,174,169,160,167,178,181,188,187,150,145,152,159,138,141,132,131,222,217,208,215,194,197,204,203,230,225,232,239,250,253,244,243];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));const a=(0,i.default)("crc-8",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));let r=~~t;for(let t=0;t<e.length;t++){const n=e[t];r=255&s[255&(r^n)]}return r}))},"./node_modules/crc/crc81wire.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var n=r("./node_modules/buffer/index.js"),o=r("./node_modules/crc/create_buffer.js"),i=r("./node_modules/crc/define_crc.js");let s=[0,94,188,226,97,63,221,131,194,156,126,32,163,253,31,65,157,195,33,127,252,162,64,30,95,1,227,189,62,96,130,220,35,125,159,193,66,28,254,160,225,191,93,3,128,222,60,98,190,224,2,92,223,129,99,61,124,34,192,158,29,67,161,255,70,24,250,164,39,121,155,197,132,218,56,102,229,187,89,7,219,133,103,57,186,228,6,88,25,71,165,251,120,38,196,154,101,59,217,135,4,90,184,230,167,249,27,69,198,152,122,36,248,166,68,26,153,199,37,123,58,100,134,216,91,5,231,185,140,210,48,110,237,179,81,15,78,16,242,172,47,113,147,205,17,79,173,243,112,46,204,146,211,141,111,49,178,236,14,80,175,241,19,77,206,144,114,44,109,51,209,143,12,82,176,238,50,108,142,208,83,13,239,177,240,174,76,18,145,207,45,115,202,148,118,40,171,245,23,73,8,86,180,234,105,55,213,139,87,9,235,181,54,104,138,212,149,203,41,119,244,170,72,22,233,183,85,11,136,214,52,106,43,117,151,201,74,20,246,168,116,42,200,150,21,75,169,247,182,232,10,84,215,137,107,53];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));const a=(0,i.default)("dallas-1-wire",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));let r=~~t;for(let t=0;t<e.length;t++){const n=e[t];r=255&s[255&(r^n)]}return r}))},"./node_modules/crc/crcjam.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});var n=r("./node_modules/buffer/index.js"),o=r("./node_modules/crc/create_buffer.js"),i=r("./node_modules/crc/define_crc.js");let s=[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];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));const a=(0,i.default)("jam",(function(e,t=-1){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));let r=0===t?0:~~t;for(let t=0;t<e.length;t++){const n=e[t];r=s[255&(r^n)]^r>>>8}return r}))},"./node_modules/crc/create_buffer.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>o});var n=r("./node_modules/buffer/index.js");const o=n.Buffer.from&&n.Buffer.alloc&&n.Buffer.allocUnsafe&&n.Buffer.allocUnsafeSlow?n.Buffer.from:e=>new n.Buffer(e)},"./node_modules/crc/define_crc.js":(e,t,r)=>{"use strict";function n(e,t){const r=(e,r)=>t(e,r)>>>0;return r.signed=t,r.unsigned=r,r.model=e,r}r.r(t),r.d(t,{default:()=>n})},"./node_modules/crc/index.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{crc1:()=>n.default,crc8:()=>o.default,crc81wire:()=>i.default,crc16:()=>s.default,crc16ccitt:()=>a.default,crc16modbus:()=>u.default,crc16xmodem:()=>l.default,crc16kermit:()=>c.default,crc24:()=>d.default,crc32:()=>h.default,crcjam:()=>f.default,default:()=>p});var n=r("./node_modules/crc/crc1.js"),o=r("./node_modules/crc/crc8.js"),i=r("./node_modules/crc/crc81wire.js"),s=r("./node_modules/crc/crc16.js"),a=r("./node_modules/crc/crc16ccitt.js"),u=r("./node_modules/crc/crc16modbus.js"),l=r("./node_modules/crc/crc16xmodem.js"),c=r("./node_modules/crc/crc16kermit.js"),d=r("./node_modules/crc/crc24.js"),h=r("./node_modules/crc/crc32.js"),f=r("./node_modules/crc/crcjam.js");const p={crc1:n.default,crc8:o.default,crc81wire:i.default,crc16:s.default,crc16ccitt:a.default,crc16modbus:u.default,crc16xmodem:l.default,crc16kermit:c.default,crc24:d.default,crc32:h.default,crcjam:f.default}},"./node_modules/ieee754/index.js":(e,t)=>{t.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,u=(1<<a)-1,l=u>>1,c=-7,d=r?o-1:0,h=r?-1:1,f=e[t+d];for(d+=h,i=f&(1<<-c)-1,f>>=-c,c+=a;c>0;i=256*i+e[t+d],d+=h,c-=8);for(s=i&(1<<-c)-1,i>>=-c,c+=n;c>0;s=256*s+e[t+d],d+=h,c-=8);if(0===i)i=1-l;else{if(i===u)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,n),i-=l}return(f?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,a,u,l=8*i-o-1,c=(1<<l)-1,d=c>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,p=n?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+d>=1?h/u:h*Math.pow(2,1-d))*u>=2&&(s++,u/=2),s+d>=c?(a=0,s=c):s+d>=1?(a=(t*u-1)*Math.pow(2,o),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,o),s=0));o>=8;e[r+f]=255&a,f+=p,a/=256,o-=8);for(s=s<<o|a,l+=o;l>0;e[r+f]=255&s,f+=p,s/=256,l-=8);e[r+f-p]|=128*_}},"./node_modules/inherits/inherits_browser.js":e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},"./node_modules/js-xdr/lib/array.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Array=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=l(r("./node_modules/lodash/every.js")),i=l(r("./node_modules/lodash/each.js")),s=l(r("./node_modules/lodash/times.js")),a=l(r("./node_modules/lodash/isArray.js")),u=l(r("./node_modules/js-xdr/lib/io-mixin.js"));function l(e){return e&&e.__esModule?e:{default:e}}var c=t.Array=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._childType=t,this._length=r}return n(e,[{key:"read",value:function(e){var t=this;return(0,s.default)(this._length,(function(){return t._childType.read(e)}))}},{key:"write",value:function(e,t){var r=this;if(!(0,a.default)(e))throw new Error("XDR Write Error: value is not array");if(e.length!==this._length)throw new Error("XDR Write Error: Got array of size "+e.length+",expected "+this._length);(0,i.default)(e,(function(e){return r._childType.write(e,t)}))}},{key:"isValid",value:function(e){var t=this;return!!(0,a.default)(e)&&(e.length===this._length&&(0,o.default)(e,(function(e){return t._childType.isValid(e)})))}}]),e}();(0,u.default)(c.prototype)},"./node_modules/js-xdr/lib/bool.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bool=void 0;var n=s(r("./node_modules/lodash/isBoolean.js")),o=r("./node_modules/js-xdr/lib/int.js"),i=s(r("./node_modules/js-xdr/lib/io-mixin.js"));function s(e){return e&&e.__esModule?e:{default:e}}var a=t.Bool={read:function(e){var t=o.Int.read(e);switch(t){case 0:return!1;case 1:return!0;default:throw new Error("XDR Read Error: Got "+t+" when trying to read a bool")}},write:function(e,t){var r=e?1:0;return o.Int.write(r,t)},isValid:function(e){return(0,n.default)(e)}};(0,i.default)(a)},"./node_modules/js-xdr/lib/config.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r("./node_modules/js-xdr/lib/reference.js");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})})),t.config=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){var r=new g(t);e(r),r.resolve()}return t};var i=u(r("./node_modules/lodash/isUndefined.js")),s=u(r("./node_modules/lodash/each.js")),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r("./node_modules/js-xdr/lib/types.js"));function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(e){function t(e){l(this,t);var r=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.name=e,r}return d(t,e),n(t,[{key:"resolve",value:function(e){return e.definitions[this.name].resolve(e)}}]),t}(o.Reference),f=function(e){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];l(this,t);var o=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.childReference=e,o.length=r,o.variable=n,o}return d(t,e),n(t,[{key:"resolve",value:function(e){var t=this.childReference,r=this.length;return t instanceof o.Reference&&(t=t.resolve(e)),r instanceof o.Reference&&(r=r.resolve(e)),this.variable?new a.VarArray(t,r):new a.Array(t,r)}}]),t}(o.Reference),p=function(e){function t(e){l(this,t);var r=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.childReference=e,r.name=e.name,r}return d(t,e),n(t,[{key:"resolve",value:function(e){var t=this.childReference;return t instanceof o.Reference&&(t=t.resolve(e)),new a.Option(t)}}]),t}(o.Reference),_=function(e){function t(e,r){l(this,t);var n=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.sizedType=e,n.length=r,n}return d(t,e),n(t,[{key:"resolve",value:function(e){var t=this.length;return t instanceof o.Reference&&(t=t.resolve(e)),new this.sizedType(t)}}]),t}(o.Reference),m=function(){function e(t,r,n){l(this,e),this.constructor=t,this.name=r,this.config=n}return n(e,[{key:"resolve",value:function(e){return this.name in e.results?e.results[this.name]:this.constructor(e,this.name,this.config)}}]),e}();function y(e,t,r){return r instanceof o.Reference&&(r=r.resolve(e)),e.results[t]=r,r}function v(e,t,r){return e.results[t]=r,r}var g=function(){function e(t){l(this,e),this._destination=t,this._definitions={}}return n(e,[{key:"enum",value:function(e,t){var r=new m(a.Enum.create,e,t);this.define(e,r)}},{key:"struct",value:function(e,t){var r=new m(a.Struct.create,e,t);this.define(e,r)}},{key:"union",value:function(e,t){var r=new m(a.Union.create,e,t);this.define(e,r)}},{key:"typedef",value:function(e,t){var r=new m(y,e,t);this.define(e,r)}},{key:"const",value:function(e,t){var r=new m(v,e,t);this.define(e,r)}},{key:"void",value:function(){return a.Void}},{key:"bool",value:function(){return a.Bool}},{key:"int",value:function(){return a.Int}},{key:"hyper",value:function(){return a.Hyper}},{key:"uint",value:function(){return a.UnsignedInt}},{key:"uhyper",value:function(){return a.UnsignedHyper}},{key:"float",value:function(){return a.Float}},{key:"double",value:function(){return a.Double}},{key:"quadruple",value:function(){return a.Quadruple}},{key:"string",value:function(e){return new _(a.String,e)}},{key:"opaque",value:function(e){return new _(a.Opaque,e)}},{key:"varOpaque",value:function(e){return new _(a.VarOpaque,e)}},{key:"array",value:function(e,t){return new f(e,t)}},{key:"varArray",value:function(e,t){return new f(e,t,!0)}},{key:"option",value:function(e){return new p(e)}},{key:"define",value:function(e,t){if(!(0,i.default)(this._destination[e]))throw new Error("XDRTypes Error:"+e+" is already defined");this._definitions[e]=t}},{key:"lookup",value:function(e){return new h(e)}},{key:"resolve",value:function(){var e=this;(0,s.default)(this._definitions,(function(t){t.resolve({definitions:e._definitions,results:e._destination})}))}}]),e}()},"./node_modules/js-xdr/lib/cursor.js":(e,t,r)=>{"use strict";var n=r("./node_modules/buffer/index.js").Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Cursor=void 0;var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r("./node_modules/js-xdr/lib/util.js");var s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t instanceof n||(t="number"==typeof t?n.alloc(t):n.from(t)),this._setBuffer(t),this.rewind()}return o(e,[{key:"_setBuffer",value:function(e){this._buffer=e,this.length=e.length}},{key:"buffer",value:function(){return this._buffer}},{key:"tap",value:function(e){return e(this),this}},{key:"clone",value:function(e){var t=new this.constructor(this.buffer());return t.seek(0===arguments.length?this.tell():e),t}},{key:"tell",value:function(){return this._index}},{key:"seek",value:function(e,t){return 1===arguments.length&&(t=e,e="="),"+"===e?this._index+=t:"-"===e?this._index-=t:this._index=t,this}},{key:"rewind",value:function(){return this.seek(0)}},{key:"eof",value:function(){return this.tell()===this.buffer().length}},{key:"write",value:function(e,t,r){return this.seek("+",this.buffer().write(e,this.tell(),t,r))}},{key:"fill",value:function(e,t){return 1===arguments.length&&(t=this.buffer().length-this.tell()),this.buffer().fill(e,this.tell(),this.tell()+t),this.seek("+",t),this}},{key:"slice",value:function(e){0===arguments.length&&(e=this.length-this.tell());var t=new this.constructor(this.buffer().slice(this.tell(),this.tell()+e));return this.seek("+",e),t}},{key:"copyFrom",value:function(e){var t=e instanceof n?e:e.buffer();return t.copy(this.buffer(),this.tell(),0,t.length),this.seek("+",t.length),this}},{key:"concat",value:function(t){t.forEach((function(r,n){r instanceof e&&(t[n]=r.buffer())})),t.unshift(this.buffer());var r=n.concat(t);return this._setBuffer(r),this}},{key:"toString",value:function(e,t){0===arguments.length?(e="utf8",t=this.buffer().length-this.tell()):1===arguments.length&&(t=this.buffer().length-this.tell());var r=this.buffer().toString(e,this.tell(),this.tell()+t);return this.seek("+",t),r}},{key:"writeBufferPadded",value:function(t){var r=(0,i.calculatePadding)(t.length),o=n.alloc(r);return this.copyFrom(new e(t)).copyFrom(new e(o))}}]),e}();[[1,["readInt8","readUInt8"]],[2,["readInt16BE","readInt16LE","readUInt16BE","readUInt16LE"]],[4,["readInt32BE","readInt32LE","readUInt32BE","readUInt32LE","readFloatBE","readFloatLE"]],[8,["readDoubleBE","readDoubleLE"]]].forEach((function(e){e[1].forEach((function(t){s.prototype[t]=function(){var r=this.buffer()[t](this.tell());return this.seek("+",e[0]),r}}))})),[[1,["writeInt8","writeUInt8"]],[2,["writeInt16BE","writeInt16LE","writeUInt16BE","writeUInt16LE"]],[4,["writeInt32BE","writeInt32LE","writeUInt32BE","writeUInt32LE","writeFloatBE","writeFloatLE"]],[8,["writeDoubleBE","writeDoubleLE"]]].forEach((function(e){e[1].forEach((function(t){s.prototype[t]=function(r){return this.buffer()[t](r,this.tell()),this.seek("+",e[0]),this}}))})),t.Cursor=s},"./node_modules/js-xdr/lib/double.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Double=void 0;var n=i(r("./node_modules/lodash/isNumber.js")),o=i(r("./node_modules/js-xdr/lib/io-mixin.js"));function i(e){return e&&e.__esModule?e:{default:e}}var s=t.Double={read:function(e){return e.readDoubleBE()},write:function(e,t){if(!(0,n.default)(e))throw new Error("XDR Write Error: not a number");t.writeDoubleBE(e)},isValid:function(e){return(0,n.default)(e)}};(0,o.default)(s)},"./node_modules/js-xdr/lib/enum.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Enum=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=u(r("./node_modules/lodash/each.js")),i=u(r("./node_modules/lodash/values.js")),s=r("./node_modules/js-xdr/lib/int.js"),a=u(r("./node_modules/js-xdr/lib/io-mixin.js"));function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var d=t.Enum=function(){function e(t,r){c(this,e),this.name=t,this.value=r}return n(e,null,[{key:"read",value:function(e){var t=s.Int.read(e);if(!this._byValue.has(t))throw new Error("XDR Read Error: Unknown "+this.enumName+" member for value "+t);return this._byValue.get(t)}},{key:"write",value:function(e,t){if(!(e instanceof this))throw new Error("XDR Write Error: Unknown "+e+" is not a "+this.enumName);s.Int.write(e.value,t)}},{key:"isValid",value:function(e){return e instanceof this}},{key:"members",value:function(){return this._members}},{key:"values",value:function(){return(0,i.default)(this._members)}},{key:"fromName",value:function(e){var t=this._members[e];if(!t)throw new Error(e+" is not a member of "+this.enumName);return t}},{key:"fromValue",value:function(e){var t=this._byValue.get(e);if(!t)throw new Error(e+" is not a value of any member of "+this.enumName);return t}},{key:"create",value:function(t,r,n){var i=function(e){function t(){return c(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(e);return i.enumName=r,t.results[r]=i,i._members={},i._byValue=new Map,(0,o.default)(n,(function(e,t){var r=new i(t,e);i._members[t]=r,i._byValue.set(e,r),i[t]=function(){return r}})),i}}]),e}();(0,a.default)(d)},"./node_modules/js-xdr/lib/float.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Float=void 0;var n=i(r("./node_modules/lodash/isNumber.js")),o=i(r("./node_modules/js-xdr/lib/io-mixin.js"));function i(e){return e&&e.__esModule?e:{default:e}}var s=t.Float={read:function(e){return e.readFloatBE()},write:function(e,t){if(!(0,n.default)(e))throw new Error("XDR Write Error: not a number");t.writeFloatBE(e)},isValid:function(e){return(0,n.default)(e)}};(0,o.default)(s)},"./node_modules/js-xdr/lib/hyper.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hyper=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(n):void 0},i=a(r("./node_modules/long/dist/Long.js")),s=a(r("./node_modules/js-xdr/lib/io-mixin.js"));function a(e){return e&&e.__esModule?e:{default:e}}var u=t.Hyper=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,!1))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,null,[{key:"read",value:function(e){var t=e.readInt32BE(),r=e.readInt32BE();return this.fromBits(r,t)}},{key:"write",value:function(e,t){if(!(e instanceof this))throw new Error("XDR Write Error: "+e+" is not a Hyper");t.writeInt32BE(e.high),t.writeInt32BE(e.low)}},{key:"fromString",value:function(e){if(!/^-?\d+$/.test(e))throw new Error("Invalid hyper string: "+e);var r=o(t.__proto__||Object.getPrototypeOf(t),"fromString",this).call(this,e,!1);return new this(r.low,r.high)}},{key:"fromBits",value:function(e,r){var n=o(t.__proto__||Object.getPrototypeOf(t),"fromBits",this).call(this,e,r,!1);return new this(n.low,n.high)}},{key:"isValid",value:function(e){return e instanceof this}}]),t}(i.default);(0,s.default)(u),u.MAX_VALUE=new u(i.default.MAX_VALUE.low,i.default.MAX_VALUE.high),u.MIN_VALUE=new u(i.default.MIN_VALUE.low,i.default.MIN_VALUE.high)},"./node_modules/js-xdr/lib/index.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("./node_modules/js-xdr/lib/types.js");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r("./node_modules/js-xdr/lib/config.js");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},"./node_modules/js-xdr/lib/int.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Int=void 0;var n=i(r("./node_modules/lodash/isNumber.js")),o=i(r("./node_modules/js-xdr/lib/io-mixin.js"));function i(e){return e&&e.__esModule?e:{default:e}}var s=t.Int={read:function(e){return e.readInt32BE()},write:function(e,t){if(!(0,n.default)(e))throw new Error("XDR Write Error: not a number");if(Math.floor(e)!==e)throw new Error("XDR Write Error: not an integer");t.writeInt32BE(e)},isValid:function(e){return!!(0,n.default)(e)&&(Math.floor(e)===e&&(e>=s.MIN_VALUE&&e<=s.MAX_VALUE))}};s.MAX_VALUE=Math.pow(2,31)-1,s.MIN_VALUE=-Math.pow(2,31),(0,o.default)(s)},"./node_modules/js-xdr/lib/io-mixin.js":(e,t,r)=>{"use strict";var n=r("./node_modules/buffer/index.js").Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(e,l),(0,i.default)(e)&&(0,o.default)(e.prototype,c)};var o=a(r("./node_modules/lodash/extend.js")),i=a(r("./node_modules/lodash/isFunction.js")),s=r("./node_modules/js-xdr/lib/cursor.js");function a(e){return e&&e.__esModule?e:{default:e}}var u=Math.pow(2,16),l={toXDR:function(e){var t=new s.Cursor(u);this.write(e,t);var r=t.tell();return t.rewind(),t.slice(r).buffer()},fromXDR:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"raw",r=void 0;switch(t){case"raw":r=e;break;case"hex":r=n.from(e,"hex");break;case"base64":r=n.from(e,"base64");break;default:throw new Error("Invalid format "+t+', must be "raw", "hex", "base64"')}var o=new s.Cursor(r),i=this.read(o);return i},validateXDR:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"raw";try{return this.fromXDR(e,t),!0}catch(e){return!1}}},c={toXDR:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"raw",t=this.constructor.toXDR(this);switch(e){case"raw":return t;case"hex":return t.toString("hex");case"base64":return t.toString("base64");default:throw new Error("Invalid format "+e+', must be "raw", "hex", "base64"')}}}},"./node_modules/js-xdr/lib/opaque.js":(e,t,r)=>{"use strict";var n=r("./node_modules/buffer/index.js").Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Opaque=void 0;var o,i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r("./node_modules/js-xdr/lib/util.js"),a=r("./node_modules/js-xdr/lib/io-mixin.js"),u=(o=a)&&o.__esModule?o:{default:o};var l=t.Opaque=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._length=t,this._padding=(0,s.calculatePadding)(t)}return i(e,[{key:"read",value:function(e){var t=e.slice(this._length);return(0,s.slicePadding)(e,this._padding),t.buffer()}},{key:"write",value:function(e,t){if(e.length!==this._length)throw new Error("XDR Write Error: Got "+e.length+" bytes, expected "+this._length);t.writeBufferPadded(e)}},{key:"isValid",value:function(e){return n.isBuffer(e)&&e.length===this._length}}]),e}();(0,u.default)(l.prototype)},"./node_modules/js-xdr/lib/option.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Option=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=u(r("./node_modules/lodash/isNull.js")),i=u(r("./node_modules/lodash/isUndefined.js")),s=r("./node_modules/js-xdr/lib/bool.js"),a=u(r("./node_modules/js-xdr/lib/io-mixin.js"));function u(e){return e&&e.__esModule?e:{default:e}}var l=t.Option=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._childType=t}return n(e,[{key:"read",value:function(e){if(s.Bool.read(e))return this._childType.read(e)}},{key:"write",value:function(e,t){var r=!((0,o.default)(e)||(0,i.default)(e));s.Bool.write(r,t),r&&this._childType.write(e,t)}},{key:"isValid",value:function(e){return!!(0,o.default)(e)||(!!(0,i.default)(e)||this._childType.isValid(e))}}]),e}();(0,a.default)(l.prototype)},"./node_modules/js-xdr/lib/quadruple.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Quadruple=void 0;var n,o=r("./node_modules/js-xdr/lib/io-mixin.js"),i=(n=o)&&n.__esModule?n:{default:n};var s=t.Quadruple={read:function(){throw new Error("XDR Read Error: quadruple not supported")},write:function(){throw new Error("XDR Write Error: quadruple not supported")},isValid:function(){return!1}};(0,i.default)(s)},"./node_modules/js-xdr/lib/reference.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();t.Reference=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,[{key:"resolve",value:function(){throw new Error("implement resolve in child class")}}]),e}()},"./node_modules/js-xdr/lib/string.js":(e,t,r)=>{"use strict";var n=r("./node_modules/buffer/index.js").Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.String=void 0;var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=d(r("./node_modules/lodash/isString.js")),s=d(r("./node_modules/lodash/isArray.js")),a=r("./node_modules/js-xdr/lib/int.js"),u=r("./node_modules/js-xdr/lib/unsigned-int.js"),l=r("./node_modules/js-xdr/lib/util.js"),c=d(r("./node_modules/js-xdr/lib/io-mixin.js"));function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var f=t.String=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.UnsignedInt.MAX_VALUE;h(this,e),this._maxLength=t}return o(e,[{key:"read",value:function(e){var t=a.Int.read(e);if(t>this._maxLength)throw new Error("XDR Read Error: Saw "+t+" length String,max allowed is "+this._maxLength);var r=(0,l.calculatePadding)(t),n=e.slice(t);return(0,l.slicePadding)(e,r),n.buffer()}},{key:"readString",value:function(e){return this.read(e).toString("utf8")}},{key:"write",value:function(e,t){if(e.length>this._maxLength)throw new Error("XDR Write Error: Got "+e.length+" bytes,max allows is "+this._maxLength);var r=void 0;r=(0,i.default)(e)?n.from(e,"utf8"):n.from(e),a.Int.write(r.length,t),t.writeBufferPadded(r)}},{key:"isValid",value:function(e){var t=void 0;if((0,i.default)(e))t=n.from(e,"utf8");else{if(!(0,s.default)(e)&&!n.isBuffer(e))return!1;t=n.from(e)}return t.length<=this._maxLength}}]),e}();(0,c.default)(f.prototype)},"./node_modules/js-xdr/lib/struct.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Struct=void 0;var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=d(r("./node_modules/lodash/each.js")),s=d(r("./node_modules/lodash/map.js")),a=d(r("./node_modules/lodash/isUndefined.js")),u=d(r("./node_modules/lodash/fromPairs.js")),l=r("./node_modules/js-xdr/lib/reference.js"),c=d(r("./node_modules/js-xdr/lib/io-mixin.js"));function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=t.Struct=function(){function e(t){f(this,e),this._attributes=t||{}}return o(e,null,[{key:"read",value:function(e){var t=(0,s.default)(this._fields,(function(t){var r=n(t,2);return[r[0],r[1].read(e)]}));return new this((0,u.default)(t))}},{key:"write",value:function(e,t){if(!(e instanceof this))throw new Error("XDR Write Error: "+e+" is not a "+this.structName);(0,i.default)(this._fields,(function(r){var o=n(r,2),i=o[0],s=o[1],a=e._attributes[i];s.write(a,t)}))}},{key:"isValid",value:function(e){return e instanceof this}},{key:"create",value:function(t,r,o){var s=function(e){function t(){return f(this,t),h(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(e);return s.structName=r,t.results[r]=s,s._fields=o.map((function(e){var r=n(e,2),o=r[0],i=r[1];return i instanceof l.Reference&&(i=i.resolve(t)),[o,i]})),(0,i.default)(s._fields,(function(e){var t=n(e,1)[0];s.prototype[t]=function(e){return function(t){return(0,a.default)(t)||(this._attributes[e]=t),this._attributes[e]}}(t)})),s}}]),e}();(0,c.default)(p)},"./node_modules/js-xdr/lib/types.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("./node_modules/js-xdr/lib/int.js");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r("./node_modules/js-xdr/lib/hyper.js");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var i=r("./node_modules/js-xdr/lib/unsigned-int.js");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var s=r("./node_modules/js-xdr/lib/unsigned-hyper.js");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var a=r("./node_modules/js-xdr/lib/float.js");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var u=r("./node_modules/js-xdr/lib/double.js");Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})}));var l=r("./node_modules/js-xdr/lib/quadruple.js");Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}));var c=r("./node_modules/js-xdr/lib/bool.js");Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})}));var d=r("./node_modules/js-xdr/lib/string.js");Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}})}));var h=r("./node_modules/js-xdr/lib/opaque.js");Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}})}));var f=r("./node_modules/js-xdr/lib/var-opaque.js");Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}})}));var p=r("./node_modules/js-xdr/lib/array.js");Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}})}));var _=r("./node_modules/js-xdr/lib/var-array.js");Object.keys(_).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return _[e]}})}));var m=r("./node_modules/js-xdr/lib/option.js");Object.keys(m).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return m[e]}})}));var y=r("./node_modules/js-xdr/lib/void.js");Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}})}));var v=r("./node_modules/js-xdr/lib/enum.js");Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}})}));var g=r("./node_modules/js-xdr/lib/struct.js");Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}})}));var b=r("./node_modules/js-xdr/lib/union.js");Object.keys(b).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return b[e]}})}))},"./node_modules/js-xdr/lib/union.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Union=void 0;var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=d(r("./node_modules/lodash/each.js")),s=d(r("./node_modules/lodash/isUndefined.js")),a=d(r("./node_modules/lodash/isString.js")),u=r("./node_modules/js-xdr/lib/void.js"),l=r("./node_modules/js-xdr/lib/reference.js"),c=d(r("./node_modules/js-xdr/lib/io-mixin.js"));function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=t.Union=function(){function e(t,r){f(this,e),this.set(t,r)}return o(e,[{key:"set",value:function(e,t){(0,a.default)(e)&&(e=this.constructor._switchOn.fromName(e)),this._switch=e,this._arm=this.constructor.armForSwitch(this._switch),this._armType=this.constructor.armTypeForArm(this._arm),this._value=t}},{key:"get",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._arm;if(this._arm!==u.Void&&this._arm!==e)throw new Error(e+" not set");return this._value}},{key:"switch",value:function(){return this._switch}},{key:"arm",value:function(){return this._arm}},{key:"armType",value:function(){return this._armType}},{key:"value",value:function(){return this._value}}],[{key:"armForSwitch",value:function(e){if(this._switches.has(e))return this._switches.get(e);if(this._defaultArm)return this._defaultArm;throw new Error("Bad union switch: "+e)}},{key:"armTypeForArm",value:function(e){return e===u.Void?u.Void:this._arms[e]}},{key:"read",value:function(e){var t=this._switchOn.read(e),r=this.armForSwitch(t),n=this.armTypeForArm(r);return new this(t,(0,s.default)(n)?r.read(e):n.read(e))}},{key:"write",value:function(e,t){if(!(e instanceof this))throw new Error("XDR Write Error: "+e+" is not a "+this.unionName);this._switchOn.write(e.switch(),t),e.armType().write(e.value(),t)}},{key:"isValid",value:function(e){return e instanceof this}},{key:"create",value:function(t,r,o){var c=function(e){function t(){return f(this,t),h(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(e);c.unionName=r,t.results[r]=c,o.switchOn instanceof l.Reference?c._switchOn=o.switchOn.resolve(t):c._switchOn=o.switchOn,c._switches=new Map,c._arms={},(0,i.default)(o.arms,(function(e,r){e instanceof l.Reference&&(e=e.resolve(t)),c._arms[r]=e}));var d=o.defaultArm;return d instanceof l.Reference&&(d=d.resolve(t)),c._defaultArm=d,(0,i.default)(o.switches,(function(e){var t=n(e,2),r=t[0],o=t[1];(0,a.default)(r)&&(r=c._switchOn.fromName(r)),c._switches.set(r,o)})),(0,s.default)(c._switchOn.values)||(0,i.default)(c._switchOn.values(),(function(e){c[e.name]=function(t){return new c(e,t)},c.prototype[e.name]=function(t){return this.set(e,t)}})),(0,i.default)(c._arms,(function(e,t){e!==u.Void&&(c.prototype[t]=function(){return this.get(t)})})),c}}]),e}();(0,c.default)(p)},"./node_modules/js-xdr/lib/unsigned-hyper.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsignedHyper=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(n):void 0},i=a(r("./node_modules/long/dist/Long.js")),s=a(r("./node_modules/js-xdr/lib/io-mixin.js"));function a(e){return e&&e.__esModule?e:{default:e}}var u=t.UnsignedHyper=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,!0))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,null,[{key:"read",value:function(e){var t=e.readInt32BE(),r=e.readInt32BE();return this.fromBits(r,t)}},{key:"write",value:function(e,t){if(!(e instanceof this))throw new Error("XDR Write Error: "+e+" is not an UnsignedHyper");t.writeInt32BE(e.high),t.writeInt32BE(e.low)}},{key:"fromString",value:function(e){if(!/^\d+$/.test(e))throw new Error("Invalid hyper string: "+e);var r=o(t.__proto__||Object.getPrototypeOf(t),"fromString",this).call(this,e,!0);return new this(r.low,r.high)}},{key:"fromBits",value:function(e,r){var n=o(t.__proto__||Object.getPrototypeOf(t),"fromBits",this).call(this,e,r,!0);return new this(n.low,n.high)}},{key:"isValid",value:function(e){return e instanceof this}}]),t}(i.default);(0,s.default)(u),u.MAX_VALUE=new u(i.default.MAX_UNSIGNED_VALUE.low,i.default.MAX_UNSIGNED_VALUE.high),u.MIN_VALUE=new u(i.default.MIN_VALUE.low,i.default.MIN_VALUE.high)},"./node_modules/js-xdr/lib/unsigned-int.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsignedInt=void 0;var n=i(r("./node_modules/lodash/isNumber.js")),o=i(r("./node_modules/js-xdr/lib/io-mixin.js"));function i(e){return e&&e.__esModule?e:{default:e}}var s=t.UnsignedInt={read:function(e){return e.readUInt32BE()},write:function(e,t){if(!(0,n.default)(e))throw new Error("XDR Write Error: not a number");if(Math.floor(e)!==e)throw new Error("XDR Write Error: not an integer");if(e<0)throw new Error("XDR Write Error: negative number "+e);t.writeUInt32BE(e)},isValid:function(e){return!!(0,n.default)(e)&&(Math.floor(e)===e&&(e>=s.MIN_VALUE&&e<=s.MAX_VALUE))}};s.MAX_VALUE=Math.pow(2,32)-1,s.MIN_VALUE=0,(0,o.default)(s)},"./node_modules/js-xdr/lib/util.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculatePadding=function(e){switch(e%4){case 0:return 0;case 1:return 3;case 2:return 2;case 3:return 1;default:return null}},t.slicePadding=function(e,t){var r=e.slice(t);if(!0!==(0,i.default)(r.buffer(),(function(e){return 0===e})))throw new Error("XDR Read Error: invalid padding")};var n,o=r("./node_modules/lodash/every.js"),i=(n=o)&&n.__esModule?n:{default:n}},"./node_modules/js-xdr/lib/var-array.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VarArray=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=d(r("./node_modules/lodash/every.js")),i=d(r("./node_modules/lodash/each.js")),s=d(r("./node_modules/lodash/times.js")),a=d(r("./node_modules/lodash/isArray.js")),u=r("./node_modules/js-xdr/lib/unsigned-int.js"),l=r("./node_modules/js-xdr/lib/int.js"),c=d(r("./node_modules/js-xdr/lib/io-mixin.js"));function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var f=t.VarArray=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.UnsignedInt.MAX_VALUE;h(this,e),this._childType=t,this._maxLength=r}return n(e,[{key:"read",value:function(e){var t=this,r=l.Int.read(e);if(r>this._maxLength)throw new Error("XDR Read Error: Saw "+r+" length VarArray,max allowed is "+this._maxLength);return(0,s.default)(r,(function(){return t._childType.read(e)}))}},{key:"write",value:function(e,t){var r=this;if(!(0,a.default)(e))throw new Error("XDR Write Error: value is not array");if(e.length>this._maxLength)throw new Error("XDR Write Error: Got array of size "+e.length+",max allowed is "+this._maxLength);l.Int.write(e.length,t),(0,i.default)(e,(function(e){return r._childType.write(e,t)}))}},{key:"isValid",value:function(e){var t=this;return!!(0,a.default)(e)&&(!(e.length>this._maxLength)&&(0,o.default)(e,(function(e){return t._childType.isValid(e)})))}}]),e}();(0,c.default)(f.prototype)},"./node_modules/js-xdr/lib/var-opaque.js":(e,t,r)=>{"use strict";var n=r("./node_modules/buffer/index.js").Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.VarOpaque=void 0;var o,i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r("./node_modules/js-xdr/lib/int.js"),a=r("./node_modules/js-xdr/lib/unsigned-int.js"),u=r("./node_modules/js-xdr/lib/util.js"),l=r("./node_modules/js-xdr/lib/io-mixin.js"),c=(o=l)&&o.__esModule?o:{default:o};function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var h=t.VarOpaque=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.UnsignedInt.MAX_VALUE;d(this,e),this._maxLength=t}return i(e,[{key:"read",value:function(e){var t=s.Int.read(e);if(t>this._maxLength)throw new Error("XDR Read Error: Saw "+t+" length VarOpaque,max allowed is "+this._maxLength);var r=(0,u.calculatePadding)(t),n=e.slice(t);return(0,u.slicePadding)(e,r),n.buffer()}},{key:"write",value:function(e,t){if(e.length>this._maxLength)throw new Error("XDR Write Error: Got "+e.length+" bytes,max allows is "+this._maxLength);s.Int.write(e.length,t),t.writeBufferPadded(e)}},{key:"isValid",value:function(e){return n.isBuffer(e)&&e.length<=this._maxLength}}]),e}();(0,c.default)(h.prototype)},"./node_modules/js-xdr/lib/void.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Void=void 0;var n=i(r("./node_modules/lodash/isUndefined.js")),o=i(r("./node_modules/js-xdr/lib/io-mixin.js"));function i(e){return e&&e.__esModule?e:{default:e}}var s=t.Void={read:function(){},write:function(e){if(!(0,n.default)(e))throw new Error("XDR Write Error: trying to write value to a void slot")},isValid:function(e){return(0,n.default)(e)}};(0,o.default)(s)},"./node_modules/lodash/_DataView.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getNative.js")(r("./node_modules/lodash/_root.js"),"DataView");e.exports=n},"./node_modules/lodash/_Hash.js":(e,t,r)=>{var n=r("./node_modules/lodash/_hashClear.js"),o=r("./node_modules/lodash/_hashDelete.js"),i=r("./node_modules/lodash/_hashGet.js"),s=r("./node_modules/lodash/_hashHas.js"),a=r("./node_modules/lodash/_hashSet.js");function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=s,u.prototype.set=a,e.exports=u},"./node_modules/lodash/_ListCache.js":(e,t,r)=>{var n=r("./node_modules/lodash/_listCacheClear.js"),o=r("./node_modules/lodash/_listCacheDelete.js"),i=r("./node_modules/lodash/_listCacheGet.js"),s=r("./node_modules/lodash/_listCacheHas.js"),a=r("./node_modules/lodash/_listCacheSet.js");function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=s,u.prototype.set=a,e.exports=u},"./node_modules/lodash/_Map.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getNative.js")(r("./node_modules/lodash/_root.js"),"Map");e.exports=n},"./node_modules/lodash/_MapCache.js":(e,t,r)=>{var n=r("./node_modules/lodash/_mapCacheClear.js"),o=r("./node_modules/lodash/_mapCacheDelete.js"),i=r("./node_modules/lodash/_mapCacheGet.js"),s=r("./node_modules/lodash/_mapCacheHas.js"),a=r("./node_modules/lodash/_mapCacheSet.js");function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=s,u.prototype.set=a,e.exports=u},"./node_modules/lodash/_Promise.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getNative.js")(r("./node_modules/lodash/_root.js"),"Promise");e.exports=n},"./node_modules/lodash/_Set.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getNative.js")(r("./node_modules/lodash/_root.js"),"Set");e.exports=n},"./node_modules/lodash/_SetCache.js":(e,t,r)=>{var n=r("./node_modules/lodash/_MapCache.js"),o=r("./node_modules/lodash/_setCacheAdd.js"),i=r("./node_modules/lodash/_setCacheHas.js");function s(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}s.prototype.add=s.prototype.push=o,s.prototype.has=i,e.exports=s},"./node_modules/lodash/_Stack.js":(e,t,r)=>{var n=r("./node_modules/lodash/_ListCache.js"),o=r("./node_modules/lodash/_stackClear.js"),i=r("./node_modules/lodash/_stackDelete.js"),s=r("./node_modules/lodash/_stackGet.js"),a=r("./node_modules/lodash/_stackHas.js"),u=r("./node_modules/lodash/_stackSet.js");function l(e){var t=this.__data__=new n(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=i,l.prototype.get=s,l.prototype.has=a,l.prototype.set=u,e.exports=l},"./node_modules/lodash/_Symbol.js":(e,t,r)=>{var n=r("./node_modules/lodash/_root.js").Symbol;e.exports=n},"./node_modules/lodash/_Uint8Array.js":(e,t,r)=>{var n=r("./node_modules/lodash/_root.js").Uint8Array;e.exports=n},"./node_modules/lodash/_WeakMap.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getNative.js")(r("./node_modules/lodash/_root.js"),"WeakMap");e.exports=n},"./node_modules/lodash/_apply.js":e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},"./node_modules/lodash/_arrayEach.js":e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},"./node_modules/lodash/_arrayEvery.js":e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}},"./node_modules/lodash/_arrayFilter.js":e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i}},"./node_modules/lodash/_arrayLikeKeys.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseTimes.js"),o=r("./node_modules/lodash/isArguments.js"),i=r("./node_modules/lodash/isArray.js"),s=r("./node_modules/lodash/isBuffer.js"),a=r("./node_modules/lodash/_isIndex.js"),u=r("./node_modules/lodash/isTypedArray.js"),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=i(e),c=!r&&o(e),d=!r&&!c&&s(e),h=!r&&!c&&!d&&u(e),f=r||c||d||h,p=f?n(e.length,String):[],_=p.length;for(var m in e)!t&&!l.call(e,m)||f&&("length"==m||d&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,_))||p.push(m);return p}},"./node_modules/lodash/_arrayMap.js":e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}},"./node_modules/lodash/_arrayPush.js":e=>{e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},"./node_modules/lodash/_arraySome.js":e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},"./node_modules/lodash/_asciiSize.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseProperty.js")("length");e.exports=n},"./node_modules/lodash/_asciiToArray.js":e=>{e.exports=function(e){return e.split("")}},"./node_modules/lodash/_assignValue.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseAssignValue.js"),o=r("./node_modules/lodash/eq.js"),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var s=e[t];i.call(e,t)&&o(s,r)&&(void 0!==r||t in e)||n(e,t,r)}},"./node_modules/lodash/_assocIndexOf.js":(e,t,r)=>{var n=r("./node_modules/lodash/eq.js");e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},"./node_modules/lodash/_baseAssign.js":(e,t,r)=>{var n=r("./node_modules/lodash/_copyObject.js"),o=r("./node_modules/lodash/keys.js");e.exports=function(e,t){return e&&n(t,o(t),e)}},"./node_modules/lodash/_baseAssignIn.js":(e,t,r)=>{var n=r("./node_modules/lodash/_copyObject.js"),o=r("./node_modules/lodash/keysIn.js");e.exports=function(e,t){return e&&n(t,o(t),e)}},"./node_modules/lodash/_baseAssignValue.js":(e,t,r)=>{var n=r("./node_modules/lodash/_defineProperty.js");e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},"./node_modules/lodash/_baseClone.js":(e,t,r)=>{var n=r("./node_modules/lodash/_Stack.js"),o=r("./node_modules/lodash/_arrayEach.js"),i=r("./node_modules/lodash/_assignValue.js"),s=r("./node_modules/lodash/_baseAssign.js"),a=r("./node_modules/lodash/_baseAssignIn.js"),u=r("./node_modules/lodash/_cloneBuffer.js"),l=r("./node_modules/lodash/_copyArray.js"),c=r("./node_modules/lodash/_copySymbols.js"),d=r("./node_modules/lodash/_copySymbolsIn.js"),h=r("./node_modules/lodash/_getAllKeys.js"),f=r("./node_modules/lodash/_getAllKeysIn.js"),p=r("./node_modules/lodash/_getTag.js"),_=r("./node_modules/lodash/_initCloneArray.js"),m=r("./node_modules/lodash/_initCloneByTag.js"),y=r("./node_modules/lodash/_initCloneObject.js"),v=r("./node_modules/lodash/isArray.js"),g=r("./node_modules/lodash/isBuffer.js"),b=r("./node_modules/lodash/isMap.js"),w=r("./node_modules/lodash/isObject.js"),j=r("./node_modules/lodash/isSet.js"),k=r("./node_modules/lodash/keys.js"),S=r("./node_modules/lodash/keysIn.js"),x="[object Arguments]",T="[object Function]",A="[object Object]",E={};E[x]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E[A]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E[T]=E["[object WeakMap]"]=!1,e.exports=function e(t,r,O,R,C,P){var M,I=1&r,N=2&r,L=4&r;if(O&&(M=C?O(t,R,C,P):O(t)),void 0!==M)return M;if(!w(t))return t;var B=v(t);if(B){if(M=_(t),!I)return l(t,M)}else{var D=p(t),F=D==T||"[object GeneratorFunction]"==D;if(g(t))return u(t,I);if(D==A||D==x||F&&!C){if(M=N||F?{}:y(t),!I)return N?d(t,a(M,t)):c(t,s(M,t))}else{if(!E[D])return C?t:{};M=m(t,D,I)}}P||(P=new n);var U=P.get(t);if(U)return U;P.set(t,M),j(t)?t.forEach((function(n){M.add(e(n,r,O,n,t,P))})):b(t)&&t.forEach((function(n,o){M.set(o,e(n,r,O,o,t,P))}));var H=B?void 0:(L?N?f:h:N?S:k)(t);return o(H||t,(function(n,o){H&&(n=t[o=n]),i(M,o,e(n,r,O,o,t,P))})),M}},"./node_modules/lodash/_baseCreate.js":(e,t,r)=>{var n=r("./node_modules/lodash/isObject.js"),o=Object.create,i=function(){function e(){}return function(t){if(!n(t))return{};if(o)return o(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=i},"./node_modules/lodash/_baseEach.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseForOwn.js"),o=r("./node_modules/lodash/_createBaseEach.js")(n);e.exports=o},"./node_modules/lodash/_baseEvery.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseEach.js");e.exports=function(e,t){var r=!0;return n(e,(function(e,n,o){return r=!!t(e,n,o)})),r}},"./node_modules/lodash/_baseFindIndex.js":e=>{e.exports=function(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}},"./node_modules/lodash/_baseFor.js":(e,t,r)=>{var n=r("./node_modules/lodash/_createBaseFor.js")();e.exports=n},"./node_modules/lodash/_baseForOwn.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseFor.js"),o=r("./node_modules/lodash/keys.js");e.exports=function(e,t){return e&&n(e,t,o)}},"./node_modules/lodash/_baseGet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_castPath.js"),o=r("./node_modules/lodash/_toKey.js");e.exports=function(e,t){for(var r=0,i=(t=n(t,e)).length;null!=e&&r<i;)e=e[o(t[r++])];return r&&r==i?e:void 0}},"./node_modules/lodash/_baseGetAllKeys.js":(e,t,r)=>{var n=r("./node_modules/lodash/_arrayPush.js"),o=r("./node_modules/lodash/isArray.js");e.exports=function(e,t,r){var i=t(e);return o(e)?i:n(i,r(e))}},"./node_modules/lodash/_baseGetTag.js":(e,t,r)=>{var n=r("./node_modules/lodash/_Symbol.js"),o=r("./node_modules/lodash/_getRawTag.js"),i=r("./node_modules/lodash/_objectToString.js"),s=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?o(e):i(e)}},"./node_modules/lodash/_baseHasIn.js":e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},"./node_modules/lodash/_baseIndexOf.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseFindIndex.js"),o=r("./node_modules/lodash/_baseIsNaN.js"),i=r("./node_modules/lodash/_strictIndexOf.js");e.exports=function(e,t,r){return t==t?i(e,t,r):n(e,o,r)}},"./node_modules/lodash/_baseIsArguments.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGetTag.js"),o=r("./node_modules/lodash/isObjectLike.js");e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},"./node_modules/lodash/_baseIsEqual.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseIsEqualDeep.js"),o=r("./node_modules/lodash/isObjectLike.js");e.exports=function e(t,r,i,s,a){return t===r||(null==t||null==r||!o(t)&&!o(r)?t!=t&&r!=r:n(t,r,i,s,e,a))}},"./node_modules/lodash/_baseIsEqualDeep.js":(e,t,r)=>{var n=r("./node_modules/lodash/_Stack.js"),o=r("./node_modules/lodash/_equalArrays.js"),i=r("./node_modules/lodash/_equalByTag.js"),s=r("./node_modules/lodash/_equalObjects.js"),a=r("./node_modules/lodash/_getTag.js"),u=r("./node_modules/lodash/isArray.js"),l=r("./node_modules/lodash/isBuffer.js"),c=r("./node_modules/lodash/isTypedArray.js"),d="[object Arguments]",h="[object Array]",f="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,_,m,y){var v=u(e),g=u(t),b=v?h:a(e),w=g?h:a(t),j=(b=b==d?f:b)==f,k=(w=w==d?f:w)==f,S=b==w;if(S&&l(e)){if(!l(t))return!1;v=!0,j=!1}if(S&&!j)return y||(y=new n),v||c(e)?o(e,t,r,_,m,y):i(e,t,b,r,_,m,y);if(!(1&r)){var x=j&&p.call(e,"__wrapped__"),T=k&&p.call(t,"__wrapped__");if(x||T){var A=x?e.value():e,E=T?t.value():t;return y||(y=new n),m(A,E,r,_,y)}}return!!S&&(y||(y=new n),s(e,t,r,_,m,y))}},"./node_modules/lodash/_baseIsMap.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getTag.js"),o=r("./node_modules/lodash/isObjectLike.js");e.exports=function(e){return o(e)&&"[object Map]"==n(e)}},"./node_modules/lodash/_baseIsMatch.js":(e,t,r)=>{var n=r("./node_modules/lodash/_Stack.js"),o=r("./node_modules/lodash/_baseIsEqual.js");e.exports=function(e,t,r,i){var s=r.length,a=s,u=!i;if(null==e)return!a;for(e=Object(e);s--;){var l=r[s];if(u&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++s<a;){var c=(l=r[s])[0],d=e[c],h=l[1];if(u&&l[2]){if(void 0===d&&!(c in e))return!1}else{var f=new n;if(i)var p=i(d,h,c,e,t,f);if(!(void 0===p?o(h,d,3,i,f):p))return!1}}return!0}},"./node_modules/lodash/_baseIsNaN.js":e=>{e.exports=function(e){return e!=e}},"./node_modules/lodash/_baseIsNative.js":(e,t,r)=>{var n=r("./node_modules/lodash/isFunction.js"),o=r("./node_modules/lodash/_isMasked.js"),i=r("./node_modules/lodash/isObject.js"),s=r("./node_modules/lodash/_toSource.js"),a=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,d=l.hasOwnProperty,h=RegExp("^"+c.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?h:a).test(s(e))}},"./node_modules/lodash/_baseIsSet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getTag.js"),o=r("./node_modules/lodash/isObjectLike.js");e.exports=function(e){return o(e)&&"[object Set]"==n(e)}},"./node_modules/lodash/_baseIsTypedArray.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGetTag.js"),o=r("./node_modules/lodash/isLength.js"),i=r("./node_modules/lodash/isObjectLike.js"),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!s[n(e)]}},"./node_modules/lodash/_baseIteratee.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseMatches.js"),o=r("./node_modules/lodash/_baseMatchesProperty.js"),i=r("./node_modules/lodash/identity.js"),s=r("./node_modules/lodash/isArray.js"),a=r("./node_modules/lodash/property.js");e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?s(e)?o(e[0],e[1]):n(e):a(e)}},"./node_modules/lodash/_baseKeys.js":(e,t,r)=>{var n=r("./node_modules/lodash/_isPrototype.js"),o=r("./node_modules/lodash/_nativeKeys.js"),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=[];for(var r in Object(e))i.call(e,r)&&"constructor"!=r&&t.push(r);return t}},"./node_modules/lodash/_baseKeysIn.js":(e,t,r)=>{var n=r("./node_modules/lodash/isObject.js"),o=r("./node_modules/lodash/_isPrototype.js"),i=r("./node_modules/lodash/_nativeKeysIn.js"),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=o(e),r=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&r.push(a);return r}},"./node_modules/lodash/_baseMap.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseEach.js"),o=r("./node_modules/lodash/isArrayLike.js");e.exports=function(e,t){var r=-1,i=o(e)?Array(e.length):[];return n(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}},"./node_modules/lodash/_baseMatches.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseIsMatch.js"),o=r("./node_modules/lodash/_getMatchData.js"),i=r("./node_modules/lodash/_matchesStrictComparable.js");e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},"./node_modules/lodash/_baseMatchesProperty.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseIsEqual.js"),o=r("./node_modules/lodash/get.js"),i=r("./node_modules/lodash/hasIn.js"),s=r("./node_modules/lodash/_isKey.js"),a=r("./node_modules/lodash/_isStrictComparable.js"),u=r("./node_modules/lodash/_matchesStrictComparable.js"),l=r("./node_modules/lodash/_toKey.js");e.exports=function(e,t){return s(e)&&a(t)?u(l(e),t):function(r){var s=o(r,e);return void 0===s&&s===t?i(r,e):n(t,s,3)}}},"./node_modules/lodash/_baseProperty.js":e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},"./node_modules/lodash/_basePropertyDeep.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGet.js");e.exports=function(e){return function(t){return n(t,e)}}},"./node_modules/lodash/_baseRepeat.js":e=>{var t=Math.floor;e.exports=function(e,r){var n="";if(!e||r<1||r>9007199254740991)return n;do{r%2&&(n+=e),(r=t(r/2))&&(e+=e)}while(r);return n}},"./node_modules/lodash/_baseRest.js":(e,t,r)=>{var n=r("./node_modules/lodash/identity.js"),o=r("./node_modules/lodash/_overRest.js"),i=r("./node_modules/lodash/_setToString.js");e.exports=function(e,t){return i(o(e,t,n),e+"")}},"./node_modules/lodash/_baseSetToString.js":(e,t,r)=>{var n=r("./node_modules/lodash/constant.js"),o=r("./node_modules/lodash/_defineProperty.js"),i=r("./node_modules/lodash/identity.js"),s=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i;e.exports=s},"./node_modules/lodash/_baseSlice.js":e=>{e.exports=function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}},"./node_modules/lodash/_baseTimes.js":e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},"./node_modules/lodash/_baseToString.js":(e,t,r)=>{var n=r("./node_modules/lodash/_Symbol.js"),o=r("./node_modules/lodash/_arrayMap.js"),i=r("./node_modules/lodash/isArray.js"),s=r("./node_modules/lodash/isSymbol.js"),a=n?n.prototype:void 0,u=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(s(t))return u?u.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r}},"./node_modules/lodash/_baseTrim.js":(e,t,r)=>{var n=r("./node_modules/lodash/_trimmedEndIndex.js"),o=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(o,""):e}},"./node_modules/lodash/_baseUnary.js":e=>{e.exports=function(e){return function(t){return e(t)}}},"./node_modules/lodash/_baseValues.js":(e,t,r)=>{var n=r("./node_modules/lodash/_arrayMap.js");e.exports=function(e,t){return n(t,(function(t){return e[t]}))}},"./node_modules/lodash/_cacheHas.js":e=>{e.exports=function(e,t){return e.has(t)}},"./node_modules/lodash/_castFunction.js":(e,t,r)=>{var n=r("./node_modules/lodash/identity.js");e.exports=function(e){return"function"==typeof e?e:n}},"./node_modules/lodash/_castPath.js":(e,t,r)=>{var n=r("./node_modules/lodash/isArray.js"),o=r("./node_modules/lodash/_isKey.js"),i=r("./node_modules/lodash/_stringToPath.js"),s=r("./node_modules/lodash/toString.js");e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:i(s(e))}},"./node_modules/lodash/_castSlice.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseSlice.js");e.exports=function(e,t,r){var o=e.length;return r=void 0===r?o:r,!t&&r>=o?e:n(e,t,r)}},"./node_modules/lodash/_charsEndIndex.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseIndexOf.js");e.exports=function(e,t){for(var r=e.length;r--&&n(t,e[r],0)>-1;);return r}},"./node_modules/lodash/_cloneArrayBuffer.js":(e,t,r)=>{var n=r("./node_modules/lodash/_Uint8Array.js");e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},"./node_modules/lodash/_cloneBuffer.js":(e,t,r)=>{e=r.nmd(e);var n=r("./node_modules/lodash/_root.js"),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,s=i&&i.exports===o?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=a?a(r):new e.constructor(r);return e.copy(n),n}},"./node_modules/lodash/_cloneDataView.js":(e,t,r)=>{var n=r("./node_modules/lodash/_cloneArrayBuffer.js");e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},"./node_modules/lodash/_cloneRegExp.js":e=>{var t=/\w*$/;e.exports=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}},"./node_modules/lodash/_cloneSymbol.js":(e,t,r)=>{var n=r("./node_modules/lodash/_Symbol.js"),o=n?n.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},"./node_modules/lodash/_cloneTypedArray.js":(e,t,r)=>{var n=r("./node_modules/lodash/_cloneArrayBuffer.js");e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},"./node_modules/lodash/_copyArray.js":e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},"./node_modules/lodash/_copyObject.js":(e,t,r)=>{var n=r("./node_modules/lodash/_assignValue.js"),o=r("./node_modules/lodash/_baseAssignValue.js");e.exports=function(e,t,r,i){var s=!r;r||(r={});for(var a=-1,u=t.length;++a<u;){var l=t[a],c=i?i(r[l],e[l],l,r,e):void 0;void 0===c&&(c=e[l]),s?o(r,l,c):n(r,l,c)}return r}},"./node_modules/lodash/_copySymbols.js":(e,t,r)=>{var n=r("./node_modules/lodash/_copyObject.js"),o=r("./node_modules/lodash/_getSymbols.js");e.exports=function(e,t){return n(e,o(e),t)}},"./node_modules/lodash/_copySymbolsIn.js":(e,t,r)=>{var n=r("./node_modules/lodash/_copyObject.js"),o=r("./node_modules/lodash/_getSymbolsIn.js");e.exports=function(e,t){return n(e,o(e),t)}},"./node_modules/lodash/_coreJsData.js":(e,t,r)=>{var n=r("./node_modules/lodash/_root.js")["__core-js_shared__"];e.exports=n},"./node_modules/lodash/_createAssigner.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseRest.js"),o=r("./node_modules/lodash/_isIterateeCall.js");e.exports=function(e){return n((function(t,r){var n=-1,i=r.length,s=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(s=e.length>3&&"function"==typeof s?(i--,s):void 0,a&&o(r[0],r[1],a)&&(s=i<3?void 0:s,i=1),t=Object(t);++n<i;){var u=r[n];u&&e(t,u,n,s)}return t}))}},"./node_modules/lodash/_createBaseEach.js":(e,t,r)=>{var n=r("./node_modules/lodash/isArrayLike.js");e.exports=function(e,t){return function(r,o){if(null==r)return r;if(!n(r))return e(r,o);for(var i=r.length,s=t?i:-1,a=Object(r);(t?s--:++s<i)&&!1!==o(a[s],s,a););return r}}},"./node_modules/lodash/_createBaseFor.js":e=>{e.exports=function(e){return function(t,r,n){for(var o=-1,i=Object(t),s=n(t),a=s.length;a--;){var u=s[e?a:++o];if(!1===r(i[u],u,i))break}return t}}},"./node_modules/lodash/_createPadding.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseRepeat.js"),o=r("./node_modules/lodash/_baseToString.js"),i=r("./node_modules/lodash/_castSlice.js"),s=r("./node_modules/lodash/_hasUnicode.js"),a=r("./node_modules/lodash/_stringSize.js"),u=r("./node_modules/lodash/_stringToArray.js"),l=Math.ceil;e.exports=function(e,t){var r=(t=void 0===t?" ":o(t)).length;if(r<2)return r?n(t,e):t;var c=n(t,l(e/a(t)));return s(t)?i(u(c),0,e).join(""):c.slice(0,e)}},"./node_modules/lodash/_defineProperty.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getNative.js"),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},"./node_modules/lodash/_equalArrays.js":(e,t,r)=>{var n=r("./node_modules/lodash/_SetCache.js"),o=r("./node_modules/lodash/_arraySome.js"),i=r("./node_modules/lodash/_cacheHas.js");e.exports=function(e,t,r,s,a,u){var l=1&r,c=e.length,d=t.length;if(c!=d&&!(l&&d>c))return!1;var h=u.get(e),f=u.get(t);if(h&&f)return h==t&&f==e;var p=-1,_=!0,m=2&r?new n:void 0;for(u.set(e,t),u.set(t,e);++p<c;){var y=e[p],v=t[p];if(s)var g=l?s(v,y,p,t,e,u):s(y,v,p,e,t,u);if(void 0!==g){if(g)continue;_=!1;break}if(m){if(!o(t,(function(e,t){if(!i(m,t)&&(y===e||a(y,e,r,s,u)))return m.push(t)}))){_=!1;break}}else if(y!==v&&!a(y,v,r,s,u)){_=!1;break}}return u.delete(e),u.delete(t),_}},"./node_modules/lodash/_equalByTag.js":(e,t,r)=>{var n=r("./node_modules/lodash/_Symbol.js"),o=r("./node_modules/lodash/_Uint8Array.js"),i=r("./node_modules/lodash/eq.js"),s=r("./node_modules/lodash/_equalArrays.js"),a=r("./node_modules/lodash/_mapToArray.js"),u=r("./node_modules/lodash/_setToArray.js"),l=n?n.prototype:void 0,c=l?l.valueOf:void 0;e.exports=function(e,t,r,n,l,d,h){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var f=a;case"[object Set]":var p=1&n;if(f||(f=u),e.size!=t.size&&!p)return!1;var _=h.get(e);if(_)return _==t;n|=2,h.set(e,t);var m=s(f(e),f(t),n,l,d,h);return h.delete(e),m;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},"./node_modules/lodash/_equalObjects.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getAllKeys.js"),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,i,s,a){var u=1&r,l=n(e),c=l.length;if(c!=n(t).length&&!u)return!1;for(var d=c;d--;){var h=l[d];if(!(u?h in t:o.call(t,h)))return!1}var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var _=!0;a.set(e,t),a.set(t,e);for(var m=u;++d<c;){var y=e[h=l[d]],v=t[h];if(i)var g=u?i(v,y,h,t,e,a):i(y,v,h,e,t,a);if(!(void 0===g?y===v||s(y,v,r,i,a):g)){_=!1;break}m||(m="constructor"==h)}if(_&&!m){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(_=!1)}return a.delete(e),a.delete(t),_}},"./node_modules/lodash/_freeGlobal.js":(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},"./node_modules/lodash/_getAllKeys.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGetAllKeys.js"),o=r("./node_modules/lodash/_getSymbols.js"),i=r("./node_modules/lodash/keys.js");e.exports=function(e){return n(e,i,o)}},"./node_modules/lodash/_getAllKeysIn.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGetAllKeys.js"),o=r("./node_modules/lodash/_getSymbolsIn.js"),i=r("./node_modules/lodash/keysIn.js");e.exports=function(e){return n(e,i,o)}},"./node_modules/lodash/_getMapData.js":(e,t,r)=>{var n=r("./node_modules/lodash/_isKeyable.js");e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},"./node_modules/lodash/_getMatchData.js":(e,t,r)=>{var n=r("./node_modules/lodash/_isStrictComparable.js"),o=r("./node_modules/lodash/keys.js");e.exports=function(e){for(var t=o(e),r=t.length;r--;){var i=t[r],s=e[i];t[r]=[i,s,n(s)]}return t}},"./node_modules/lodash/_getNative.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseIsNative.js"),o=r("./node_modules/lodash/_getValue.js");e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},"./node_modules/lodash/_getPrototype.js":(e,t,r)=>{var n=r("./node_modules/lodash/_overArg.js")(Object.getPrototypeOf,Object);e.exports=n},"./node_modules/lodash/_getRawTag.js":(e,t,r)=>{var n=r("./node_modules/lodash/_Symbol.js"),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var o=s.call(e);return n&&(t?e[a]=r:delete e[a]),o}},"./node_modules/lodash/_getSymbols.js":(e,t,r)=>{var n=r("./node_modules/lodash/_arrayFilter.js"),o=r("./node_modules/lodash/stubArray.js"),i=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),n(s(e),(function(t){return i.call(e,t)})))}:o;e.exports=a},"./node_modules/lodash/_getSymbolsIn.js":(e,t,r)=>{var n=r("./node_modules/lodash/_arrayPush.js"),o=r("./node_modules/lodash/_getPrototype.js"),i=r("./node_modules/lodash/_getSymbols.js"),s=r("./node_modules/lodash/stubArray.js"),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=o(e);return t}:s;e.exports=a},"./node_modules/lodash/_getTag.js":(e,t,r)=>{var n=r("./node_modules/lodash/_DataView.js"),o=r("./node_modules/lodash/_Map.js"),i=r("./node_modules/lodash/_Promise.js"),s=r("./node_modules/lodash/_Set.js"),a=r("./node_modules/lodash/_WeakMap.js"),u=r("./node_modules/lodash/_baseGetTag.js"),l=r("./node_modules/lodash/_toSource.js"),c="[object Map]",d="[object Promise]",h="[object Set]",f="[object WeakMap]",p="[object DataView]",_=l(n),m=l(o),y=l(i),v=l(s),g=l(a),b=u;(n&&b(new n(new ArrayBuffer(1)))!=p||o&&b(new o)!=c||i&&b(i.resolve())!=d||s&&b(new s)!=h||a&&b(new a)!=f)&&(b=function(e){var t=u(e),r="[object Object]"==t?e.constructor:void 0,n=r?l(r):"";if(n)switch(n){case _:return p;case m:return c;case y:return d;case v:return h;case g:return f}return t}),e.exports=b},"./node_modules/lodash/_getValue.js":e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},"./node_modules/lodash/_hasPath.js":(e,t,r)=>{var n=r("./node_modules/lodash/_castPath.js"),o=r("./node_modules/lodash/isArguments.js"),i=r("./node_modules/lodash/isArray.js"),s=r("./node_modules/lodash/_isIndex.js"),a=r("./node_modules/lodash/isLength.js"),u=r("./node_modules/lodash/_toKey.js");e.exports=function(e,t,r){for(var l=-1,c=(t=n(t,e)).length,d=!1;++l<c;){var h=u(t[l]);if(!(d=null!=e&&r(e,h)))break;e=e[h]}return d||++l!=c?d:!!(c=null==e?0:e.length)&&a(c)&&s(h,c)&&(i(e)||o(e))}},"./node_modules/lodash/_hasUnicode.js":e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},"./node_modules/lodash/_hashClear.js":(e,t,r)=>{var n=r("./node_modules/lodash/_nativeCreate.js");e.exports=function(){this.__data__=n?n(null):{},this.size=0}},"./node_modules/lodash/_hashDelete.js":e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},"./node_modules/lodash/_hashGet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_nativeCreate.js"),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},"./node_modules/lodash/_hashHas.js":(e,t,r)=>{var n=r("./node_modules/lodash/_nativeCreate.js"),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},"./node_modules/lodash/_hashSet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_nativeCreate.js");e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},"./node_modules/lodash/_initCloneArray.js":e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var r=e.length,n=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},"./node_modules/lodash/_initCloneByTag.js":(e,t,r)=>{var n=r("./node_modules/lodash/_cloneArrayBuffer.js"),o=r("./node_modules/lodash/_cloneDataView.js"),i=r("./node_modules/lodash/_cloneRegExp.js"),s=r("./node_modules/lodash/_cloneSymbol.js"),a=r("./node_modules/lodash/_cloneTypedArray.js");e.exports=function(e,t,r){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return o(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,r);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return i(e);case"[object Symbol]":return s(e)}}},"./node_modules/lodash/_initCloneObject.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseCreate.js"),o=r("./node_modules/lodash/_getPrototype.js"),i=r("./node_modules/lodash/_isPrototype.js");e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:n(o(e))}},"./node_modules/lodash/_isIndex.js":e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},"./node_modules/lodash/_isIterateeCall.js":(e,t,r)=>{var n=r("./node_modules/lodash/eq.js"),o=r("./node_modules/lodash/isArrayLike.js"),i=r("./node_modules/lodash/_isIndex.js"),s=r("./node_modules/lodash/isObject.js");e.exports=function(e,t,r){if(!s(r))return!1;var a=typeof t;return!!("number"==a?o(r)&&i(t,r.length):"string"==a&&t in r)&&n(r[t],e)}},"./node_modules/lodash/_isKey.js":(e,t,r)=>{var n=r("./node_modules/lodash/isArray.js"),o=r("./node_modules/lodash/isSymbol.js"),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||(s.test(e)||!i.test(e)||null!=t&&e in Object(t))}},"./node_modules/lodash/_isKeyable.js":e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},"./node_modules/lodash/_isMasked.js":(e,t,r)=>{var n,o=r("./node_modules/lodash/_coreJsData.js"),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},"./node_modules/lodash/_isPrototype.js":e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},"./node_modules/lodash/_isStrictComparable.js":(e,t,r)=>{var n=r("./node_modules/lodash/isObject.js");e.exports=function(e){return e==e&&!n(e)}},"./node_modules/lodash/_listCacheClear.js":e=>{e.exports=function(){this.__data__=[],this.size=0}},"./node_modules/lodash/_listCacheDelete.js":(e,t,r)=>{var n=r("./node_modules/lodash/_assocIndexOf.js"),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},"./node_modules/lodash/_listCacheGet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_assocIndexOf.js");e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},"./node_modules/lodash/_listCacheHas.js":(e,t,r)=>{var n=r("./node_modules/lodash/_assocIndexOf.js");e.exports=function(e){return n(this.__data__,e)>-1}},"./node_modules/lodash/_listCacheSet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_assocIndexOf.js");e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},"./node_modules/lodash/_mapCacheClear.js":(e,t,r)=>{var n=r("./node_modules/lodash/_Hash.js"),o=r("./node_modules/lodash/_ListCache.js"),i=r("./node_modules/lodash/_Map.js");e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},"./node_modules/lodash/_mapCacheDelete.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getMapData.js");e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},"./node_modules/lodash/_mapCacheGet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getMapData.js");e.exports=function(e){return n(this,e).get(e)}},"./node_modules/lodash/_mapCacheHas.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getMapData.js");e.exports=function(e){return n(this,e).has(e)}},"./node_modules/lodash/_mapCacheSet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getMapData.js");e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},"./node_modules/lodash/_mapToArray.js":e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},"./node_modules/lodash/_matchesStrictComparable.js":e=>{e.exports=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}},"./node_modules/lodash/_memoizeCapped.js":(e,t,r)=>{var n=r("./node_modules/lodash/memoize.js");e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},"./node_modules/lodash/_nativeCreate.js":(e,t,r)=>{var n=r("./node_modules/lodash/_getNative.js")(Object,"create");e.exports=n},"./node_modules/lodash/_nativeKeys.js":(e,t,r)=>{var n=r("./node_modules/lodash/_overArg.js")(Object.keys,Object);e.exports=n},"./node_modules/lodash/_nativeKeysIn.js":e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},"./node_modules/lodash/_nodeUtil.js":(e,t,r)=>{e=r.nmd(e);var n=r("./node_modules/lodash/_freeGlobal.js"),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,s=i&&i.exports===o&&n.process,a=function(){try{var e=i&&i.require&&i.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},"./node_modules/lodash/_objectToString.js":e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},"./node_modules/lodash/_overArg.js":e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},"./node_modules/lodash/_overRest.js":(e,t,r)=>{var n=r("./node_modules/lodash/_apply.js"),o=Math.max;e.exports=function(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,s=-1,a=o(i.length-t,0),u=Array(a);++s<a;)u[s]=i[t+s];s=-1;for(var l=Array(t+1);++s<t;)l[s]=i[s];return l[t]=r(u),n(e,this,l)}}},"./node_modules/lodash/_root.js":(e,t,r)=>{var n=r("./node_modules/lodash/_freeGlobal.js"),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},"./node_modules/lodash/_setCacheAdd.js":e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},"./node_modules/lodash/_setCacheHas.js":e=>{e.exports=function(e){return this.__data__.has(e)}},"./node_modules/lodash/_setToArray.js":e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},"./node_modules/lodash/_setToString.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseSetToString.js"),o=r("./node_modules/lodash/_shortOut.js")(n);e.exports=o},"./node_modules/lodash/_shortOut.js":e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var o=t(),i=16-(o-n);if(n=o,i>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},"./node_modules/lodash/_stackClear.js":(e,t,r)=>{var n=r("./node_modules/lodash/_ListCache.js");e.exports=function(){this.__data__=new n,this.size=0}},"./node_modules/lodash/_stackDelete.js":e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},"./node_modules/lodash/_stackGet.js":e=>{e.exports=function(e){return this.__data__.get(e)}},"./node_modules/lodash/_stackHas.js":e=>{e.exports=function(e){return this.__data__.has(e)}},"./node_modules/lodash/_stackSet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_ListCache.js"),o=r("./node_modules/lodash/_Map.js"),i=r("./node_modules/lodash/_MapCache.js");e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var s=r.__data__;if(!o||s.length<199)return s.push([e,t]),this.size=++r.size,this;r=this.__data__=new i(s)}return r.set(e,t),this.size=r.size,this}},"./node_modules/lodash/_strictIndexOf.js":e=>{e.exports=function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}},"./node_modules/lodash/_stringSize.js":(e,t,r)=>{var n=r("./node_modules/lodash/_asciiSize.js"),o=r("./node_modules/lodash/_hasUnicode.js"),i=r("./node_modules/lodash/_unicodeSize.js");e.exports=function(e){return o(e)?i(e):n(e)}},"./node_modules/lodash/_stringToArray.js":(e,t,r)=>{var n=r("./node_modules/lodash/_asciiToArray.js"),o=r("./node_modules/lodash/_hasUnicode.js"),i=r("./node_modules/lodash/_unicodeToArray.js");e.exports=function(e){return o(e)?i(e):n(e)}},"./node_modules/lodash/_stringToPath.js":(e,t,r)=>{var n=r("./node_modules/lodash/_memoizeCapped.js"),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,s=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,r,n,o){t.push(n?o.replace(i,"$1"):r||e)})),t}));e.exports=s},"./node_modules/lodash/_toKey.js":(e,t,r)=>{var n=r("./node_modules/lodash/isSymbol.js");e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},"./node_modules/lodash/_toSource.js":e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},"./node_modules/lodash/_trimmedEndIndex.js":e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},"./node_modules/lodash/_unicodeSize.js":e=>{var t="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",a="(?:"+r+"|"+n+")"+"?",u="[\\ufe0e\\ufe0f]?",l=u+a+("(?:\\u200d(?:"+[o,i,s].join("|")+")"+u+a+")*"),c="(?:"+[o+r+"?",r,i,s,t].join("|")+")",d=RegExp(n+"(?="+n+")|"+c+l,"g");e.exports=function(e){for(var t=d.lastIndex=0;d.test(e);)++t;return t}},"./node_modules/lodash/_unicodeToArray.js":e=>{var t="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",a="(?:"+r+"|"+n+")"+"?",u="[\\ufe0e\\ufe0f]?",l=u+a+("(?:\\u200d(?:"+[o,i,s].join("|")+")"+u+a+")*"),c="(?:"+[o+r+"?",r,i,s,t].join("|")+")",d=RegExp(n+"(?="+n+")|"+c+l,"g");e.exports=function(e){return e.match(d)||[]}},"./node_modules/lodash/assignIn.js":(e,t,r)=>{var n=r("./node_modules/lodash/_copyObject.js"),o=r("./node_modules/lodash/_createAssigner.js"),i=r("./node_modules/lodash/keysIn.js"),s=o((function(e,t){n(t,i(t),e)}));e.exports=s},"./node_modules/lodash/clone.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseClone.js");e.exports=function(e){return n(e,4)}},"./node_modules/lodash/constant.js":e=>{e.exports=function(e){return function(){return e}}},"./node_modules/lodash/each.js":(e,t,r)=>{e.exports=r("./node_modules/lodash/forEach.js")},"./node_modules/lodash/eq.js":e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},"./node_modules/lodash/every.js":(e,t,r)=>{var n=r("./node_modules/lodash/_arrayEvery.js"),o=r("./node_modules/lodash/_baseEvery.js"),i=r("./node_modules/lodash/_baseIteratee.js"),s=r("./node_modules/lodash/isArray.js"),a=r("./node_modules/lodash/_isIterateeCall.js");e.exports=function(e,t,r){var u=s(e)?n:o;return r&&a(e,t,r)&&(t=void 0),u(e,i(t,3))}},"./node_modules/lodash/extend.js":(e,t,r)=>{e.exports=r("./node_modules/lodash/assignIn.js")},"./node_modules/lodash/forEach.js":(e,t,r)=>{var n=r("./node_modules/lodash/_arrayEach.js"),o=r("./node_modules/lodash/_baseEach.js"),i=r("./node_modules/lodash/_castFunction.js"),s=r("./node_modules/lodash/isArray.js");e.exports=function(e,t){return(s(e)?n:o)(e,i(t))}},"./node_modules/lodash/fromPairs.js":e=>{e.exports=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var o=e[t];n[o[0]]=o[1]}return n}},"./node_modules/lodash/get.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGet.js");e.exports=function(e,t,r){var o=null==e?void 0:n(e,t);return void 0===o?r:o}},"./node_modules/lodash/hasIn.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseHasIn.js"),o=r("./node_modules/lodash/_hasPath.js");e.exports=function(e,t){return null!=e&&o(e,t,n)}},"./node_modules/lodash/identity.js":e=>{e.exports=function(e){return e}},"./node_modules/lodash/isArguments.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseIsArguments.js"),o=r("./node_modules/lodash/isObjectLike.js"),i=Object.prototype,s=i.hasOwnProperty,a=i.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return o(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},"./node_modules/lodash/isArray.js":e=>{var t=Array.isArray;e.exports=t},"./node_modules/lodash/isArrayLike.js":(e,t,r)=>{var n=r("./node_modules/lodash/isFunction.js"),o=r("./node_modules/lodash/isLength.js");e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},"./node_modules/lodash/isBoolean.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGetTag.js"),o=r("./node_modules/lodash/isObjectLike.js");e.exports=function(e){return!0===e||!1===e||o(e)&&"[object Boolean]"==n(e)}},"./node_modules/lodash/isBuffer.js":(e,t,r)=>{e=r.nmd(e);var n=r("./node_modules/lodash/_root.js"),o=r("./node_modules/lodash/stubFalse.js"),i=t&&!t.nodeType&&t,s=i&&e&&!e.nodeType&&e,a=s&&s.exports===i?n.Buffer:void 0,u=(a?a.isBuffer:void 0)||o;e.exports=u},"./node_modules/lodash/isFinite.js":(e,t,r)=>{var n=r("./node_modules/lodash/_root.js").isFinite;e.exports=function(e){return"number"==typeof e&&n(e)}},"./node_modules/lodash/isFunction.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGetTag.js"),o=r("./node_modules/lodash/isObject.js");e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},"./node_modules/lodash/isLength.js":e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},"./node_modules/lodash/isMap.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseIsMap.js"),o=r("./node_modules/lodash/_baseUnary.js"),i=r("./node_modules/lodash/_nodeUtil.js"),s=i&&i.isMap,a=s?o(s):n;e.exports=a},"./node_modules/lodash/isNull.js":e=>{e.exports=function(e){return null===e}},"./node_modules/lodash/isNumber.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGetTag.js"),o=r("./node_modules/lodash/isObjectLike.js");e.exports=function(e){return"number"==typeof e||o(e)&&"[object Number]"==n(e)}},"./node_modules/lodash/isObject.js":e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},"./node_modules/lodash/isObjectLike.js":e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},"./node_modules/lodash/isSet.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseIsSet.js"),o=r("./node_modules/lodash/_baseUnary.js"),i=r("./node_modules/lodash/_nodeUtil.js"),s=i&&i.isSet,a=s?o(s):n;e.exports=a},"./node_modules/lodash/isString.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGetTag.js"),o=r("./node_modules/lodash/isArray.js"),i=r("./node_modules/lodash/isObjectLike.js");e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==n(e)}},"./node_modules/lodash/isSymbol.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseGetTag.js"),o=r("./node_modules/lodash/isObjectLike.js");e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},"./node_modules/lodash/isTypedArray.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseIsTypedArray.js"),o=r("./node_modules/lodash/_baseUnary.js"),i=r("./node_modules/lodash/_nodeUtil.js"),s=i&&i.isTypedArray,a=s?o(s):n;e.exports=a},"./node_modules/lodash/isUndefined.js":e=>{e.exports=function(e){return void 0===e}},"./node_modules/lodash/keys.js":(e,t,r)=>{var n=r("./node_modules/lodash/_arrayLikeKeys.js"),o=r("./node_modules/lodash/_baseKeys.js"),i=r("./node_modules/lodash/isArrayLike.js");e.exports=function(e){return i(e)?n(e):o(e)}},"./node_modules/lodash/keysIn.js":(e,t,r)=>{var n=r("./node_modules/lodash/_arrayLikeKeys.js"),o=r("./node_modules/lodash/_baseKeysIn.js"),i=r("./node_modules/lodash/isArrayLike.js");e.exports=function(e){return i(e)?n(e,!0):o(e)}},"./node_modules/lodash/lodash.js":function(e,t,r){var n;e=r.nmd(e),function(){var o,i="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=16,l=32,c=64,d=128,h=256,f=1/0,p=9007199254740991,_=NaN,m=4294967295,y=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",u],["flip",512],["partial",l],["partialRight",c],["rearg",h]],v="[object Arguments]",g="[object Array]",b="[object Boolean]",w="[object Date]",j="[object Error]",k="[object Function]",S="[object GeneratorFunction]",x="[object Map]",T="[object Number]",A="[object Object]",E="[object Promise]",O="[object RegExp]",R="[object Set]",C="[object String]",P="[object Symbol]",M="[object WeakMap]",I="[object ArrayBuffer]",N="[object DataView]",L="[object Float32Array]",B="[object Float64Array]",D="[object Int8Array]",F="[object Int16Array]",U="[object Int32Array]",H="[object Uint8Array]",q="[object Uint8ClampedArray]",V="[object Uint16Array]",K="[object Uint32Array]",Y=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,X=/(__e\(.*?\)|\b__t\)) \+\n'';/g,z=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,$=RegExp(z.source),Z=RegExp(G.source),Q=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(oe.source),se=/^\s+/,ae=/\s/,ue=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,he=/[()=,{}\[\]\/\s]/,fe=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_e=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ye=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,be=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,je=/($^)/,ke=/['\n\r\u2028\u2029\\]/g,Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xe="\\u2700-\\u27bf",Te="a-z\\xdf-\\xf6\\xf8-\\xff",Ae="A-Z\\xc0-\\xd6\\xd8-\\xde",Ee="\\ufe0e\\ufe0f",Oe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Re="['’]",Ce="[\\ud800-\\udfff]",Pe="["+Oe+"]",Me="["+Se+"]",Ie="\\d+",Ne="[\\u2700-\\u27bf]",Le="["+Te+"]",Be="[^\\ud800-\\udfff"+Oe+Ie+xe+Te+Ae+"]",De="\\ud83c[\\udffb-\\udfff]",Fe="[^\\ud800-\\udfff]",Ue="(?:\\ud83c[\\udde6-\\uddff]){2}",He="[\\ud800-\\udbff][\\udc00-\\udfff]",qe="["+Ae+"]",Ve="(?:"+Le+"|"+Be+")",Ke="(?:"+qe+"|"+Be+")",Ye="(?:['’](?:d|ll|m|re|s|t|ve))?",We="(?:['’](?:D|LL|M|RE|S|T|VE))?",Xe="(?:"+Me+"|"+De+")"+"?",ze="[\\ufe0e\\ufe0f]?",Ge=ze+Xe+("(?:\\u200d(?:"+[Fe,Ue,He].join("|")+")"+ze+Xe+")*"),$e="(?:"+[Ne,Ue,He].join("|")+")"+Ge,Ze="(?:"+[Fe+Me+"?",Me,Ue,He,Ce].join("|")+")",Qe=RegExp(Re,"g"),Je=RegExp(Me,"g"),et=RegExp(De+"(?="+De+")|"+Ze+Ge,"g"),tt=RegExp([qe+"?"+Le+"+"+Ye+"(?="+[Pe,qe,"$"].join("|")+")",Ke+"+"+We+"(?="+[Pe,qe+Ve,"$"].join("|")+")",qe+"?"+Ve+"+"+Ye,qe+"+"+We,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,$e].join("|"),"g"),rt=RegExp("[\\u200d\\ud800-\\udfff"+Se+Ee+"]"),nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ot=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],it=-1,st={};st[L]=st[B]=st[D]=st[F]=st[U]=st[H]=st[q]=st[V]=st[K]=!0,st[v]=st[g]=st[I]=st[b]=st[N]=st[w]=st[j]=st[k]=st[x]=st[T]=st[A]=st[O]=st[R]=st[C]=st[M]=!1;var at={};at[v]=at[g]=at[I]=at[N]=at[b]=at[w]=at[L]=at[B]=at[D]=at[F]=at[U]=at[x]=at[T]=at[A]=at[O]=at[R]=at[C]=at[P]=at[H]=at[q]=at[V]=at[K]=!0,at[j]=at[k]=at[M]=!1;var ut={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lt=parseFloat,ct=parseInt,dt="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,ht="object"==typeof self&&self&&self.Object===Object&&self,ft=dt||ht||Function("return this")(),pt=t&&!t.nodeType&&t,_t=pt&&e&&!e.nodeType&&e,mt=_t&&_t.exports===pt,yt=mt&&dt.process,vt=function(){try{var e=_t&&_t.require&&_t.require("util").types;return e||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),gt=vt&&vt.isArrayBuffer,bt=vt&&vt.isDate,wt=vt&&vt.isMap,jt=vt&&vt.isRegExp,kt=vt&&vt.isSet,St=vt&&vt.isTypedArray;function xt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Tt(e,t,r,n){for(var o=-1,i=null==e?0:e.length;++o<i;){var s=e[o];t(n,s,r(s),e)}return n}function At(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function Et(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Ot(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function Rt(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i}function Ct(e,t){return!!(null==e?0:e.length)&&Ht(e,t,0)>-1}function Pt(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}function Mt(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function It(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function Nt(e,t,r,n){var o=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r}function Lt(e,t,r,n){var o=null==e?0:e.length;for(n&&o&&(r=e[--o]);o--;)r=t(r,e[o],o,e);return r}function Bt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Dt=Yt("length");function Ft(e,t,r){var n;return r(e,(function(e,r,o){if(t(e,r,o))return n=r,!1})),n}function Ut(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Ht(e,t,r){return t==t?function(e,t,r){var n=r-1,o=e.length;for(;++n<o;)if(e[n]===t)return n;return-1}(e,t,r):Ut(e,Vt,r)}function qt(e,t,r,n){for(var o=r-1,i=e.length;++o<i;)if(n(e[o],t))return o;return-1}function Vt(e){return e!=e}function Kt(e,t){var r=null==e?0:e.length;return r?zt(e,t)/r:_}function Yt(e){return function(t){return null==t?o:t[e]}}function Wt(e){return function(t){return null==e?o:e[t]}}function Xt(e,t,r,n,o){return o(e,(function(e,o,i){r=n?(n=!1,e):t(r,e,o,i)})),r}function zt(e,t){for(var r,n=-1,i=e.length;++n<i;){var s=t(e[n]);s!==o&&(r=r===o?s:r+s)}return r}function Gt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function $t(e){return e?e.slice(0,pr(e)+1).replace(se,""):e}function Zt(e){return function(t){return e(t)}}function Qt(e,t){return Mt(t,(function(t){return e[t]}))}function Jt(e,t){return e.has(t)}function er(e,t){for(var r=-1,n=e.length;++r<n&&Ht(t,e[r],0)>-1;);return r}function tr(e,t){for(var r=e.length;r--&&Ht(t,e[r],0)>-1;);return r}function rr(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}var nr=Wt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),or=Wt({"&":"&","<":"<",">":">",'"':""","'":"'"});function ir(e){return"\\"+ut[e]}function sr(e){return rt.test(e)}function ar(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function ur(e,t){return function(r){return e(t(r))}}function lr(e,t){for(var r=-1,n=e.length,o=0,i=[];++r<n;){var s=e[r];s!==t&&s!==a||(e[r]=a,i[o++]=r)}return i}function cr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function dr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function hr(e){return sr(e)?function(e){var t=et.lastIndex=0;for(;et.test(e);)++t;return t}(e):Dt(e)}function fr(e){return sr(e)?function(e){return e.match(et)||[]}(e):function(e){return e.split("")}(e)}function pr(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var _r=Wt({"&":"&","<":"<",">":">",""":'"',"'":"'"});var mr=function e(t){var r,n=(t=null==t?ft:mr.defaults(ft.Object(),t,mr.pick(ft,ot))).Array,ae=t.Date,Se=t.Error,xe=t.Function,Te=t.Math,Ae=t.Object,Ee=t.RegExp,Oe=t.String,Re=t.TypeError,Ce=n.prototype,Pe=xe.prototype,Me=Ae.prototype,Ie=t["__core-js_shared__"],Ne=Pe.toString,Le=Me.hasOwnProperty,Be=0,De=(r=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Fe=Me.toString,Ue=Ne.call(Ae),He=ft._,qe=Ee("^"+Ne.call(Le).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=mt?t.Buffer:o,Ke=t.Symbol,Ye=t.Uint8Array,We=Ve?Ve.allocUnsafe:o,Xe=ur(Ae.getPrototypeOf,Ae),ze=Ae.create,Ge=Me.propertyIsEnumerable,$e=Ce.splice,Ze=Ke?Ke.isConcatSpreadable:o,et=Ke?Ke.iterator:o,rt=Ke?Ke.toStringTag:o,ut=function(){try{var e=pi(Ae,"defineProperty");return e({},"",{}),e}catch(e){}}(),dt=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ht=ae&&ae.now!==ft.Date.now&&ae.now,pt=t.setTimeout!==ft.setTimeout&&t.setTimeout,_t=Te.ceil,yt=Te.floor,vt=Ae.getOwnPropertySymbols,Dt=Ve?Ve.isBuffer:o,Wt=t.isFinite,yr=Ce.join,vr=ur(Ae.keys,Ae),gr=Te.max,br=Te.min,wr=ae.now,jr=t.parseInt,kr=Te.random,Sr=Ce.reverse,xr=pi(t,"DataView"),Tr=pi(t,"Map"),Ar=pi(t,"Promise"),Er=pi(t,"Set"),Or=pi(t,"WeakMap"),Rr=pi(Ae,"create"),Cr=Or&&new Or,Pr={},Mr=Hi(xr),Ir=Hi(Tr),Nr=Hi(Ar),Lr=Hi(Er),Br=Hi(Or),Dr=Ke?Ke.prototype:o,Fr=Dr?Dr.valueOf:o,Ur=Dr?Dr.toString:o;function Hr(e){if(oa(e)&&!Xs(e)&&!(e instanceof Yr)){if(e instanceof Kr)return e;if(Le.call(e,"__wrapped__"))return qi(e)}return new Kr(e)}var qr=function(){function e(){}return function(t){if(!na(t))return{};if(ze)return ze(t);e.prototype=t;var r=new e;return e.prototype=o,r}}();function Vr(){}function Kr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Yr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Wr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Xr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function zr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Gr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new zr;++t<r;)this.add(e[t])}function $r(e){var t=this.__data__=new Xr(e);this.size=t.size}function Zr(e,t){var r=Xs(e),n=!r&&Ws(e),o=!r&&!n&&Zs(e),i=!r&&!n&&!o&&ha(e),s=r||n||o||i,a=s?Gt(e.length,Oe):[],u=a.length;for(var l in e)!t&&!Le.call(e,l)||s&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||wi(l,u))||a.push(l);return a}function Qr(e){var t=e.length;return t?e[$n(0,t-1)]:o}function Jr(e,t){return Di(Po(e),ln(t,0,e.length))}function en(e){return Di(Po(e))}function tn(e,t,r){(r!==o&&!Vs(e[t],r)||r===o&&!(t in e))&&an(e,t,r)}function rn(e,t,r){var n=e[t];Le.call(e,t)&&Vs(n,r)&&(r!==o||t in e)||an(e,t,r)}function nn(e,t){for(var r=e.length;r--;)if(Vs(e[r][0],t))return r;return-1}function on(e,t,r,n){return pn(e,(function(e,o,i){t(n,e,r(e),i)})),n}function sn(e,t){return e&&Mo(t,Ia(t),e)}function an(e,t,r){"__proto__"==t&&ut?ut(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function un(e,t){for(var r=-1,i=t.length,s=n(i),a=null==e;++r<i;)s[r]=a?o:Oa(e,t[r]);return s}function ln(e,t,r){return e==e&&(r!==o&&(e=e<=r?e:r),t!==o&&(e=e>=t?e:t)),e}function cn(e,t,r,n,i,s){var a,u=1&t,l=2&t,c=4&t;if(r&&(a=i?r(e,n,i,s):r(e)),a!==o)return a;if(!na(e))return e;var d=Xs(e);if(d){if(a=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&Le.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!u)return Po(e,a)}else{var h=yi(e),f=h==k||h==S;if(Zs(e))return To(e,u);if(h==A||h==v||f&&!i){if(a=l||f?{}:gi(e),!u)return l?function(e,t){return Mo(e,mi(e),t)}(e,function(e,t){return e&&Mo(t,Na(t),e)}(a,e)):function(e,t){return Mo(e,_i(e),t)}(e,sn(a,e))}else{if(!at[h])return i?e:{};a=function(e,t,r){var n=e.constructor;switch(t){case I:return Ao(e);case b:case w:return new n(+e);case N:return function(e,t){var r=t?Ao(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case L:case B:case D:case F:case U:case H:case q:case V:case K:return Eo(e,r);case x:case R:return new n;case T:case C:return new n(e);case O:return function(e){var t=new e.constructor(e.source,_e.exec(e));return t.lastIndex=e.lastIndex,t}(e);case P:return o=e,Fr?Ae(Fr.call(o)):{}}var o}(e,h,u)}}s||(s=new $r);var p=s.get(e);if(p)return p;s.set(e,a),la(e)?e.forEach((function(n){a.add(cn(n,t,r,n,e,s))})):ia(e)&&e.forEach((function(n,o){a.set(o,cn(n,t,r,o,e,s))}));var _=d?o:(c?l?ai:si:l?Na:Ia)(e);return At(_||e,(function(n,o){_&&(n=e[o=n]),rn(a,o,cn(n,t,r,o,e,s))})),a}function dn(e,t,r){var n=r.length;if(null==e)return!n;for(e=Ae(e);n--;){var i=r[n],s=t[i],a=e[i];if(a===o&&!(i in e)||!s(a))return!1}return!0}function hn(e,t,r){if("function"!=typeof e)throw new Re(i);return Ii((function(){e.apply(o,r)}),t)}function fn(e,t,r,n){var o=-1,i=Ct,s=!0,a=e.length,u=[],l=t.length;if(!a)return u;r&&(t=Mt(t,Zt(r))),n?(i=Pt,s=!1):t.length>=200&&(i=Jt,s=!1,t=new Gr(t));e:for(;++o<a;){var c=e[o],d=null==r?c:r(c);if(c=n||0!==c?c:0,s&&d==d){for(var h=l;h--;)if(t[h]===d)continue e;u.push(c)}else i(t,d,n)||u.push(c)}return u}Hr.templateSettings={escape:Q,evaluate:J,interpolate:ee,variable:"",imports:{_:Hr}},Hr.prototype=Vr.prototype,Hr.prototype.constructor=Hr,Kr.prototype=qr(Vr.prototype),Kr.prototype.constructor=Kr,Yr.prototype=qr(Vr.prototype),Yr.prototype.constructor=Yr,Wr.prototype.clear=function(){this.__data__=Rr?Rr(null):{},this.size=0},Wr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wr.prototype.get=function(e){var t=this.__data__;if(Rr){var r=t[e];return r===s?o:r}return Le.call(t,e)?t[e]:o},Wr.prototype.has=function(e){var t=this.__data__;return Rr?t[e]!==o:Le.call(t,e)},Wr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Rr&&t===o?s:t,this},Xr.prototype.clear=function(){this.__data__=[],this.size=0},Xr.prototype.delete=function(e){var t=this.__data__,r=nn(t,e);return!(r<0)&&(r==t.length-1?t.pop():$e.call(t,r,1),--this.size,!0)},Xr.prototype.get=function(e){var t=this.__data__,r=nn(t,e);return r<0?o:t[r][1]},Xr.prototype.has=function(e){return nn(this.__data__,e)>-1},Xr.prototype.set=function(e,t){var r=this.__data__,n=nn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},zr.prototype.clear=function(){this.size=0,this.__data__={hash:new Wr,map:new(Tr||Xr),string:new Wr}},zr.prototype.delete=function(e){var t=hi(this,e).delete(e);return this.size-=t?1:0,t},zr.prototype.get=function(e){return hi(this,e).get(e)},zr.prototype.has=function(e){return hi(this,e).has(e)},zr.prototype.set=function(e,t){var r=hi(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Gr.prototype.add=Gr.prototype.push=function(e){return this.__data__.set(e,s),this},Gr.prototype.has=function(e){return this.__data__.has(e)},$r.prototype.clear=function(){this.__data__=new Xr,this.size=0},$r.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},$r.prototype.get=function(e){return this.__data__.get(e)},$r.prototype.has=function(e){return this.__data__.has(e)},$r.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Xr){var n=r.__data__;if(!Tr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new zr(n)}return r.set(e,t),this.size=r.size,this};var pn=Lo(jn),_n=Lo(kn,!0);function mn(e,t){var r=!0;return pn(e,(function(e,n,o){return r=!!t(e,n,o)})),r}function yn(e,t,r){for(var n=-1,i=e.length;++n<i;){var s=e[n],a=t(s);if(null!=a&&(u===o?a==a&&!da(a):r(a,u)))var u=a,l=s}return l}function vn(e,t){var r=[];return pn(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r}function gn(e,t,r,n,o){var i=-1,s=e.length;for(r||(r=bi),o||(o=[]);++i<s;){var a=e[i];t>0&&r(a)?t>1?gn(a,t-1,r,n,o):It(o,a):n||(o[o.length]=a)}return o}var bn=Bo(),wn=Bo(!0);function jn(e,t){return e&&bn(e,t,Ia)}function kn(e,t){return e&&wn(e,t,Ia)}function Sn(e,t){return Rt(t,(function(t){return ea(e[t])}))}function xn(e,t){for(var r=0,n=(t=jo(t,e)).length;null!=e&&r<n;)e=e[Ui(t[r++])];return r&&r==n?e:o}function Tn(e,t,r){var n=t(e);return Xs(e)?n:It(n,r(e))}function An(e){return null==e?e===o?"[object Undefined]":"[object Null]":rt&&rt in Ae(e)?function(e){var t=Le.call(e,rt),r=e[rt];try{e[rt]=o;var n=!0}catch(e){}var i=Fe.call(e);n&&(t?e[rt]=r:delete e[rt]);return i}(e):function(e){return Fe.call(e)}(e)}function En(e,t){return e>t}function On(e,t){return null!=e&&Le.call(e,t)}function Rn(e,t){return null!=e&&t in Ae(e)}function Cn(e,t,r){for(var i=r?Pt:Ct,s=e[0].length,a=e.length,u=a,l=n(a),c=1/0,d=[];u--;){var h=e[u];u&&t&&(h=Mt(h,Zt(t))),c=br(h.length,c),l[u]=!r&&(t||s>=120&&h.length>=120)?new Gr(u&&h):o}h=e[0];var f=-1,p=l[0];e:for(;++f<s&&d.length<c;){var _=h[f],m=t?t(_):_;if(_=r||0!==_?_:0,!(p?Jt(p,m):i(d,m,r))){for(u=a;--u;){var y=l[u];if(!(y?Jt(y,m):i(e[u],m,r)))continue e}p&&p.push(m),d.push(_)}}return d}function Pn(e,t,r){var n=null==(e=Ri(e,t=jo(t,e)))?e:e[Ui(Ji(t))];return null==n?o:xt(n,e,r)}function Mn(e){return oa(e)&&An(e)==v}function In(e,t,r,n,i){return e===t||(null==e||null==t||!oa(e)&&!oa(t)?e!=e&&t!=t:function(e,t,r,n,i,s){var a=Xs(e),u=Xs(t),l=a?g:yi(e),c=u?g:yi(t),d=(l=l==v?A:l)==A,h=(c=c==v?A:c)==A,f=l==c;if(f&&Zs(e)){if(!Zs(t))return!1;a=!0,d=!1}if(f&&!d)return s||(s=new $r),a||ha(e)?oi(e,t,r,n,i,s):function(e,t,r,n,o,i,s){switch(r){case N:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!i(new Ye(e),new Ye(t)));case b:case w:case T:return Vs(+e,+t);case j:return e.name==t.name&&e.message==t.message;case O:case C:return e==t+"";case x:var a=ar;case R:var u=1&n;if(a||(a=cr),e.size!=t.size&&!u)return!1;var l=s.get(e);if(l)return l==t;n|=2,s.set(e,t);var c=oi(a(e),a(t),n,o,i,s);return s.delete(e),c;case P:if(Fr)return Fr.call(e)==Fr.call(t)}return!1}(e,t,l,r,n,i,s);if(!(1&r)){var p=d&&Le.call(e,"__wrapped__"),_=h&&Le.call(t,"__wrapped__");if(p||_){var m=p?e.value():e,y=_?t.value():t;return s||(s=new $r),i(m,y,r,n,s)}}if(!f)return!1;return s||(s=new $r),function(e,t,r,n,i,s){var a=1&r,u=si(e),l=u.length,c=si(t).length;if(l!=c&&!a)return!1;var d=l;for(;d--;){var h=u[d];if(!(a?h in t:Le.call(t,h)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var _=!0;s.set(e,t),s.set(t,e);var m=a;for(;++d<l;){var y=e[h=u[d]],v=t[h];if(n)var g=a?n(v,y,h,t,e,s):n(y,v,h,e,t,s);if(!(g===o?y===v||i(y,v,r,n,s):g)){_=!1;break}m||(m="constructor"==h)}if(_&&!m){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(_=!1)}return s.delete(e),s.delete(t),_}(e,t,r,n,i,s)}(e,t,r,n,In,i))}function Nn(e,t,r,n){var i=r.length,s=i,a=!n;if(null==e)return!s;for(e=Ae(e);i--;){var u=r[i];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<s;){var l=(u=r[i])[0],c=e[l],d=u[1];if(a&&u[2]){if(c===o&&!(l in e))return!1}else{var h=new $r;if(n)var f=n(c,d,l,e,t,h);if(!(f===o?In(d,c,3,n,h):f))return!1}}return!0}function Ln(e){return!(!na(e)||(t=e,De&&De in t))&&(ea(e)?qe:ve).test(Hi(e));var t}function Bn(e){return"function"==typeof e?e:null==e?su:"object"==typeof e?Xs(e)?Vn(e[0],e[1]):qn(e):_u(e)}function Dn(e){if(!Ti(e))return vr(e);var t=[];for(var r in Ae(e))Le.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Fn(e){if(!na(e))return function(e){var t=[];if(null!=e)for(var r in Ae(e))t.push(r);return t}(e);var t=Ti(e),r=[];for(var n in e)("constructor"!=n||!t&&Le.call(e,n))&&r.push(n);return r}function Un(e,t){return e<t}function Hn(e,t){var r=-1,o=Gs(e)?n(e.length):[];return pn(e,(function(e,n,i){o[++r]=t(e,n,i)})),o}function qn(e){var t=fi(e);return 1==t.length&&t[0][2]?Ei(t[0][0],t[0][1]):function(r){return r===e||Nn(r,e,t)}}function Vn(e,t){return ki(e)&&Ai(t)?Ei(Ui(e),t):function(r){var n=Oa(r,e);return n===o&&n===t?Ra(r,e):In(t,n,3)}}function Kn(e,t,r,n,i){e!==t&&bn(t,(function(s,a){if(i||(i=new $r),na(s))!function(e,t,r,n,i,s,a){var u=Pi(e,r),l=Pi(t,r),c=a.get(l);if(c)return void tn(e,r,c);var d=s?s(u,l,r+"",e,t,a):o,h=d===o;if(h){var f=Xs(l),p=!f&&Zs(l),_=!f&&!p&&ha(l);d=l,f||p||_?Xs(u)?d=u:$s(u)?d=Po(u):p?(h=!1,d=To(l,!0)):_?(h=!1,d=Eo(l,!0)):d=[]:aa(l)||Ws(l)?(d=u,Ws(u)?d=ba(u):na(u)&&!ea(u)||(d=gi(l))):h=!1}h&&(a.set(l,d),i(d,l,n,s,a),a.delete(l));tn(e,r,d)}(e,t,a,r,Kn,n,i);else{var u=n?n(Pi(e,a),s,a+"",e,t,i):o;u===o&&(u=s),tn(e,a,u)}}),Na)}function Yn(e,t){var r=e.length;if(r)return wi(t+=t<0?r:0,r)?e[t]:o}function Wn(e,t,r){t=t.length?Mt(t,(function(e){return Xs(e)?function(t){return xn(t,1===e.length?e[0]:e)}:e})):[su];var n=-1;t=Mt(t,Zt(di()));var o=Hn(e,(function(e,r,o){var i=Mt(t,(function(t){return t(e)}));return{criteria:i,index:++n,value:e}}));return function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(o,(function(e,t){return function(e,t,r){var n=-1,o=e.criteria,i=t.criteria,s=o.length,a=r.length;for(;++n<s;){var u=Oo(o[n],i[n]);if(u)return n>=a?u:u*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}))}function Xn(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var s=t[n],a=xn(e,s);r(a,s)&&to(i,jo(s,e),a)}return i}function zn(e,t,r,n){var o=n?qt:Ht,i=-1,s=t.length,a=e;for(e===t&&(t=Po(t)),r&&(a=Mt(e,Zt(r)));++i<s;)for(var u=0,l=t[i],c=r?r(l):l;(u=o(a,c,u,n))>-1;)a!==e&&$e.call(a,u,1),$e.call(e,u,1);return e}function Gn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==i){var i=o;wi(o)?$e.call(e,o,1):po(e,o)}}return e}function $n(e,t){return e+yt(kr()*(t-e+1))}function Zn(e,t){var r="";if(!e||t<1||t>p)return r;do{t%2&&(r+=e),(t=yt(t/2))&&(e+=e)}while(t);return r}function Qn(e,t){return Ni(Oi(e,t,su),e+"")}function Jn(e){return Qr(Va(e))}function eo(e,t){var r=Va(e);return Di(r,ln(t,0,r.length))}function to(e,t,r,n){if(!na(e))return e;for(var i=-1,s=(t=jo(t,e)).length,a=s-1,u=e;null!=u&&++i<s;){var l=Ui(t[i]),c=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(i!=a){var d=u[l];(c=n?n(d,l,u):o)===o&&(c=na(d)?d:wi(t[i+1])?[]:{})}rn(u,l,c),u=u[l]}return e}var ro=Cr?function(e,t){return Cr.set(e,t),e}:su,no=ut?function(e,t){return ut(e,"toString",{configurable:!0,enumerable:!1,value:nu(t),writable:!0})}:su;function oo(e){return Di(Va(e))}function io(e,t,r){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=n(i);++o<i;)s[o]=e[o+t];return s}function so(e,t){var r;return pn(e,(function(e,n,o){return!(r=t(e,n,o))})),!!r}function ao(e,t,r){var n=0,o=null==e?n:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;n<o;){var i=n+o>>>1,s=e[i];null!==s&&!da(s)&&(r?s<=t:s<t)?n=i+1:o=i}return o}return uo(e,t,su,r)}function uo(e,t,r,n){var i=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=r(t))!=t,u=null===t,l=da(t),c=t===o;i<s;){var d=yt((i+s)/2),h=r(e[d]),f=h!==o,p=null===h,_=h==h,m=da(h);if(a)var y=n||_;else y=c?_&&(n||f):u?_&&f&&(n||!p):l?_&&f&&!p&&(n||!m):!p&&!m&&(n?h<=t:h<t);y?i=d+1:s=d}return br(s,4294967294)}function lo(e,t){for(var r=-1,n=e.length,o=0,i=[];++r<n;){var s=e[r],a=t?t(s):s;if(!r||!Vs(a,u)){var u=a;i[o++]=0===s?0:s}}return i}function co(e){return"number"==typeof e?e:da(e)?_:+e}function ho(e){if("string"==typeof e)return e;if(Xs(e))return Mt(e,ho)+"";if(da(e))return Ur?Ur.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function fo(e,t,r){var n=-1,o=Ct,i=e.length,s=!0,a=[],u=a;if(r)s=!1,o=Pt;else if(i>=200){var l=t?null:Qo(e);if(l)return cr(l);s=!1,o=Jt,u=new Gr}else u=t?[]:a;e:for(;++n<i;){var c=e[n],d=t?t(c):c;if(c=r||0!==c?c:0,s&&d==d){for(var h=u.length;h--;)if(u[h]===d)continue e;t&&u.push(d),a.push(c)}else o(u,d,r)||(u!==a&&u.push(d),a.push(c))}return a}function po(e,t){return null==(e=Ri(e,t=jo(t,e)))||delete e[Ui(Ji(t))]}function _o(e,t,r,n){return to(e,t,r(xn(e,t)),n)}function mo(e,t,r,n){for(var o=e.length,i=n?o:-1;(n?i--:++i<o)&&t(e[i],i,e););return r?io(e,n?0:i,n?i+1:o):io(e,n?i+1:0,n?o:i)}function yo(e,t){var r=e;return r instanceof Yr&&(r=r.value()),Nt(t,(function(e,t){return t.func.apply(t.thisArg,It([e],t.args))}),r)}function vo(e,t,r){var o=e.length;if(o<2)return o?fo(e[0]):[];for(var i=-1,s=n(o);++i<o;)for(var a=e[i],u=-1;++u<o;)u!=i&&(s[i]=fn(s[i]||a,e[u],t,r));return fo(gn(s,1),t,r)}function go(e,t,r){for(var n=-1,i=e.length,s=t.length,a={};++n<i;){var u=n<s?t[n]:o;r(a,e[n],u)}return a}function bo(e){return $s(e)?e:[]}function wo(e){return"function"==typeof e?e:su}function jo(e,t){return Xs(e)?e:ki(e,t)?[e]:Fi(wa(e))}var ko=Qn;function So(e,t,r){var n=e.length;return r=r===o?n:r,!t&&r>=n?e:io(e,t,r)}var xo=dt||function(e){return ft.clearTimeout(e)};function To(e,t){if(t)return e.slice();var r=e.length,n=We?We(r):new e.constructor(r);return e.copy(n),n}function Ao(e){var t=new e.constructor(e.byteLength);return new Ye(t).set(new Ye(e)),t}function Eo(e,t){var r=t?Ao(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Oo(e,t){if(e!==t){var r=e!==o,n=null===e,i=e==e,s=da(e),a=t!==o,u=null===t,l=t==t,c=da(t);if(!u&&!c&&!s&&e>t||s&&a&&l&&!u&&!c||n&&a&&l||!r&&l||!i)return 1;if(!n&&!s&&!c&&e<t||c&&r&&i&&!n&&!s||u&&r&&i||!a&&i||!l)return-1}return 0}function Ro(e,t,r,o){for(var i=-1,s=e.length,a=r.length,u=-1,l=t.length,c=gr(s-a,0),d=n(l+c),h=!o;++u<l;)d[u]=t[u];for(;++i<a;)(h||i<s)&&(d[r[i]]=e[i]);for(;c--;)d[u++]=e[i++];return d}function Co(e,t,r,o){for(var i=-1,s=e.length,a=-1,u=r.length,l=-1,c=t.length,d=gr(s-u,0),h=n(d+c),f=!o;++i<d;)h[i]=e[i];for(var p=i;++l<c;)h[p+l]=t[l];for(;++a<u;)(f||i<s)&&(h[p+r[a]]=e[i++]);return h}function Po(e,t){var r=-1,o=e.length;for(t||(t=n(o));++r<o;)t[r]=e[r];return t}function Mo(e,t,r,n){var i=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var u=t[s],l=n?n(r[u],e[u],u,r,e):o;l===o&&(l=e[u]),i?an(r,u,l):rn(r,u,l)}return r}function Io(e,t){return function(r,n){var o=Xs(r)?Tt:on,i=t?t():{};return o(r,e,di(n,2),i)}}function No(e){return Qn((function(t,r){var n=-1,i=r.length,s=i>1?r[i-1]:o,a=i>2?r[2]:o;for(s=e.length>3&&"function"==typeof s?(i--,s):o,a&&ji(r[0],r[1],a)&&(s=i<3?o:s,i=1),t=Ae(t);++n<i;){var u=r[n];u&&e(t,u,n,s)}return t}))}function Lo(e,t){return function(r,n){if(null==r)return r;if(!Gs(r))return e(r,n);for(var o=r.length,i=t?o:-1,s=Ae(r);(t?i--:++i<o)&&!1!==n(s[i],i,s););return r}}function Bo(e){return function(t,r,n){for(var o=-1,i=Ae(t),s=n(t),a=s.length;a--;){var u=s[e?a:++o];if(!1===r(i[u],u,i))break}return t}}function Do(e){return function(t){var r=sr(t=wa(t))?fr(t):o,n=r?r[0]:t.charAt(0),i=r?So(r,1).join(""):t.slice(1);return n[e]()+i}}function Fo(e){return function(t){return Nt(eu(Wa(t).replace(Qe,"")),e,"")}}function Uo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=qr(e.prototype),n=e.apply(r,t);return na(n)?n:r}}function Ho(e){return function(t,r,n){var i=Ae(t);if(!Gs(t)){var s=di(r,3);t=Ia(t),r=function(e){return s(i[e],e,i)}}var a=e(t,r,n);return a>-1?i[s?t[a]:a]:o}}function qo(e){return ii((function(t){var r=t.length,n=r,s=Kr.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new Re(i);if(s&&!u&&"wrapper"==li(a))var u=new Kr([],!0)}for(n=u?n:r;++n<r;){var l=li(a=t[n]),c="wrapper"==l?ui(a):o;u=c&&Si(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[li(c[0])].apply(u,c[3]):1==a.length&&Si(a)?u[l]():u.thru(a)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&Xs(n))return u.plant(n).value();for(var o=0,i=r?t[o].apply(this,e):n;++o<r;)i=t[o].call(this,i);return i}}))}function Vo(e,t,r,i,s,a,u,l,c,h){var f=t&d,p=1&t,_=2&t,m=24&t,y=512&t,v=_?o:Uo(e);return function o(){for(var d=arguments.length,g=n(d),b=d;b--;)g[b]=arguments[b];if(m)var w=ci(o),j=rr(g,w);if(i&&(g=Ro(g,i,s,m)),a&&(g=Co(g,a,u,m)),d-=j,m&&d<h){var k=lr(g,w);return $o(e,t,Vo,o.placeholder,r,g,k,l,c,h-d)}var S=p?r:this,x=_?S[e]:e;return d=g.length,l?g=Ci(g,l):y&&d>1&&g.reverse(),f&&c<d&&(g.length=c),this&&this!==ft&&this instanceof o&&(x=v||Uo(x)),x.apply(S,g)}}function Ko(e,t){return function(r,n){return function(e,t,r,n){return jn(e,(function(e,o,i){t(n,r(e),o,i)})),n}(r,e,t(n),{})}}function Yo(e,t){return function(r,n){var i;if(r===o&&n===o)return t;if(r!==o&&(i=r),n!==o){if(i===o)return n;"string"==typeof r||"string"==typeof n?(r=ho(r),n=ho(n)):(r=co(r),n=co(n)),i=e(r,n)}return i}}function Wo(e){return ii((function(t){return t=Mt(t,Zt(di())),Qn((function(r){var n=this;return e(t,(function(e){return xt(e,n,r)}))}))}))}function Xo(e,t){var r=(t=t===o?" ":ho(t)).length;if(r<2)return r?Zn(t,e):t;var n=Zn(t,_t(e/hr(t)));return sr(t)?So(fr(n),0,e).join(""):n.slice(0,e)}function zo(e){return function(t,r,i){return i&&"number"!=typeof i&&ji(t,r,i)&&(r=i=o),t=ma(t),r===o?(r=t,t=0):r=ma(r),function(e,t,r,o){for(var i=-1,s=gr(_t((t-e)/(r||1)),0),a=n(s);s--;)a[o?s:++i]=e,e+=r;return a}(t,r,i=i===o?t<r?1:-1:ma(i),e)}}function Go(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ga(t),r=ga(r)),e(t,r)}}function $o(e,t,r,n,i,s,a,u,d,h){var f=8&t;t|=f?l:c,4&(t&=~(f?c:l))||(t&=-4);var p=[e,t,i,f?s:o,f?a:o,f?o:s,f?o:a,u,d,h],_=r.apply(o,p);return Si(e)&&Mi(_,p),_.placeholder=n,Li(_,e,t)}function Zo(e){var t=Te[e];return function(e,r){if(e=ga(e),(r=null==r?0:br(ya(r),292))&&Wt(e)){var n=(wa(e)+"e").split("e");return+((n=(wa(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Qo=Er&&1/cr(new Er([,-0]))[1]==f?function(e){return new Er(e)}:du;function Jo(e){return function(t){var r=yi(t);return r==x?ar(t):r==R?dr(t):function(e,t){return Mt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function ei(e,t,r,s,f,p,_,m){var y=2&t;if(!y&&"function"!=typeof e)throw new Re(i);var v=s?s.length:0;if(v||(t&=-97,s=f=o),_=_===o?_:gr(ya(_),0),m=m===o?m:ya(m),v-=f?f.length:0,t&c){var g=s,b=f;s=f=o}var w=y?o:ui(e),j=[e,t,r,s,f,g,b,p,_,m];if(w&&function(e,t){var r=e[1],n=t[1],o=r|n,i=o<131,s=n==d&&8==r||n==d&&r==h&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!i&&!s)return e;1&n&&(e[2]=t[2],o|=1&r?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?Ro(l,u,t[4]):u,e[4]=l?lr(e[3],a):t[4]}(u=t[5])&&(l=e[5],e[5]=l?Co(l,u,t[6]):u,e[6]=l?lr(e[5],a):t[6]);(u=t[7])&&(e[7]=u);n&d&&(e[8]=null==e[8]?t[8]:br(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(j,w),e=j[0],t=j[1],r=j[2],s=j[3],f=j[4],!(m=j[9]=j[9]===o?y?0:e.length:gr(j[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)k=8==t||t==u?function(e,t,r){var i=Uo(e);return function s(){for(var a=arguments.length,u=n(a),l=a,c=ci(s);l--;)u[l]=arguments[l];var d=a<3&&u[0]!==c&&u[a-1]!==c?[]:lr(u,c);return(a-=d.length)<r?$o(e,t,Vo,s.placeholder,o,u,d,o,o,r-a):xt(this&&this!==ft&&this instanceof s?i:e,this,u)}}(e,t,m):t!=l&&33!=t||f.length?Vo.apply(o,j):function(e,t,r,o){var i=1&t,s=Uo(e);return function t(){for(var a=-1,u=arguments.length,l=-1,c=o.length,d=n(c+u),h=this&&this!==ft&&this instanceof t?s:e;++l<c;)d[l]=o[l];for(;u--;)d[l++]=arguments[++a];return xt(h,i?r:this,d)}}(e,t,r,s);else var k=function(e,t,r){var n=1&t,o=Uo(e);return function t(){return(this&&this!==ft&&this instanceof t?o:e).apply(n?r:this,arguments)}}(e,t,r);return Li((w?ro:Mi)(k,j),e,t)}function ti(e,t,r,n){return e===o||Vs(e,Me[r])&&!Le.call(n,r)?t:e}function ri(e,t,r,n,i,s){return na(e)&&na(t)&&(s.set(t,e),Kn(e,t,o,ri,s),s.delete(t)),e}function ni(e){return aa(e)?o:e}function oi(e,t,r,n,i,s){var a=1&r,u=e.length,l=t.length;if(u!=l&&!(a&&l>u))return!1;var c=s.get(e),d=s.get(t);if(c&&d)return c==t&&d==e;var h=-1,f=!0,p=2&r?new Gr:o;for(s.set(e,t),s.set(t,e);++h<u;){var _=e[h],m=t[h];if(n)var y=a?n(m,_,h,t,e,s):n(_,m,h,e,t,s);if(y!==o){if(y)continue;f=!1;break}if(p){if(!Bt(t,(function(e,t){if(!Jt(p,t)&&(_===e||i(_,e,r,n,s)))return p.push(t)}))){f=!1;break}}else if(_!==m&&!i(_,m,r,n,s)){f=!1;break}}return s.delete(e),s.delete(t),f}function ii(e){return Ni(Oi(e,o,zi),e+"")}function si(e){return Tn(e,Ia,_i)}function ai(e){return Tn(e,Na,mi)}var ui=Cr?function(e){return Cr.get(e)}:du;function li(e){for(var t=e.name+"",r=Pr[t],n=Le.call(Pr,t)?r.length:0;n--;){var o=r[n],i=o.func;if(null==i||i==e)return o.name}return t}function ci(e){return(Le.call(Hr,"placeholder")?Hr:e).placeholder}function di(){var e=Hr.iteratee||au;return e=e===au?Bn:e,arguments.length?e(arguments[0],arguments[1]):e}function hi(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function fi(e){for(var t=Ia(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Ai(o)]}return t}function pi(e,t){var r=function(e,t){return null==e?o:e[t]}(e,t);return Ln(r)?r:o}var _i=vt?function(e){return null==e?[]:(e=Ae(e),Rt(vt(e),(function(t){return Ge.call(e,t)})))}:vu,mi=vt?function(e){for(var t=[];e;)It(t,_i(e)),e=Xe(e);return t}:vu,yi=An;function vi(e,t,r){for(var n=-1,o=(t=jo(t,e)).length,i=!1;++n<o;){var s=Ui(t[n]);if(!(i=null!=e&&r(e,s)))break;e=e[s]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&ra(o)&&wi(s,o)&&(Xs(e)||Ws(e))}function gi(e){return"function"!=typeof e.constructor||Ti(e)?{}:qr(Xe(e))}function bi(e){return Xs(e)||Ws(e)||!!(Ze&&e&&e[Ze])}function wi(e,t){var r=typeof e;return!!(t=null==t?p:t)&&("number"==r||"symbol"!=r&&be.test(e))&&e>-1&&e%1==0&&e<t}function ji(e,t,r){if(!na(r))return!1;var n=typeof t;return!!("number"==n?Gs(r)&&wi(t,r.length):"string"==n&&t in r)&&Vs(r[t],e)}function ki(e,t){if(Xs(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!da(e))||(re.test(e)||!te.test(e)||null!=t&&e in Ae(t))}function Si(e){var t=li(e),r=Hr[t];if("function"!=typeof r||!(t in Yr.prototype))return!1;if(e===r)return!0;var n=ui(r);return!!n&&e===n[0]}(xr&&yi(new xr(new ArrayBuffer(1)))!=N||Tr&&yi(new Tr)!=x||Ar&&yi(Ar.resolve())!=E||Er&&yi(new Er)!=R||Or&&yi(new Or)!=M)&&(yi=function(e){var t=An(e),r=t==A?e.constructor:o,n=r?Hi(r):"";if(n)switch(n){case Mr:return N;case Ir:return x;case Nr:return E;case Lr:return R;case Br:return M}return t});var xi=Ie?ea:gu;function Ti(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Me)}function Ai(e){return e==e&&!na(e)}function Ei(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==o||e in Ae(r)))}}function Oi(e,t,r){return t=gr(t===o?e.length-1:t,0),function(){for(var o=arguments,i=-1,s=gr(o.length-t,0),a=n(s);++i<s;)a[i]=o[t+i];i=-1;for(var u=n(t+1);++i<t;)u[i]=o[i];return u[t]=r(a),xt(e,this,u)}}function Ri(e,t){return t.length<2?e:xn(e,io(t,0,-1))}function Ci(e,t){for(var r=e.length,n=br(t.length,r),i=Po(e);n--;){var s=t[n];e[n]=wi(s,r)?i[s]:o}return e}function Pi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Mi=Bi(ro),Ii=pt||function(e,t){return ft.setTimeout(e,t)},Ni=Bi(no);function Li(e,t,r){var n=t+"";return Ni(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ue,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return At(y,(function(r){var n="_."+r[0];t&r[1]&&!Ct(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ce):[]}(n),r)))}function Bi(e){var t=0,r=0;return function(){var n=wr(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Di(e,t){var r=-1,n=e.length,i=n-1;for(t=t===o?n:t;++r<t;){var s=$n(r,i),a=e[s];e[s]=e[r],e[r]=a}return e.length=t,e}var Fi=function(e){var t=Bs(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ne,(function(e,r,n,o){t.push(n?o.replace(fe,"$1"):r||e)})),t}));function Ui(e){if("string"==typeof e||da(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Hi(e){if(null!=e){try{return Ne.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function qi(e){if(e instanceof Yr)return e.clone();var t=new Kr(e.__wrapped__,e.__chain__);return t.__actions__=Po(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Vi=Qn((function(e,t){return $s(e)?fn(e,gn(t,1,$s,!0)):[]})),Ki=Qn((function(e,t){var r=Ji(t);return $s(r)&&(r=o),$s(e)?fn(e,gn(t,1,$s,!0),di(r,2)):[]})),Yi=Qn((function(e,t){var r=Ji(t);return $s(r)&&(r=o),$s(e)?fn(e,gn(t,1,$s,!0),o,r):[]}));function Wi(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:ya(r);return o<0&&(o=gr(n+o,0)),Ut(e,di(t,3),o)}function Xi(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n-1;return r!==o&&(i=ya(r),i=r<0?gr(n+i,0):br(i,n-1)),Ut(e,di(t,3),i,!0)}function zi(e){return(null==e?0:e.length)?gn(e,1):[]}function Gi(e){return e&&e.length?e[0]:o}var $i=Qn((function(e){var t=Mt(e,bo);return t.length&&t[0]===e[0]?Cn(t):[]})),Zi=Qn((function(e){var t=Ji(e),r=Mt(e,bo);return t===Ji(r)?t=o:r.pop(),r.length&&r[0]===e[0]?Cn(r,di(t,2)):[]})),Qi=Qn((function(e){var t=Ji(e),r=Mt(e,bo);return(t="function"==typeof t?t:o)&&r.pop(),r.length&&r[0]===e[0]?Cn(r,o,t):[]}));function Ji(e){var t=null==e?0:e.length;return t?e[t-1]:o}var es=Qn(ts);function ts(e,t){return e&&e.length&&t&&t.length?zn(e,t):e}var rs=ii((function(e,t){var r=null==e?0:e.length,n=un(e,t);return Gn(e,Mt(t,(function(e){return wi(e,r)?+e:e})).sort(Oo)),n}));function ns(e){return null==e?e:Sr.call(e)}var os=Qn((function(e){return fo(gn(e,1,$s,!0))})),is=Qn((function(e){var t=Ji(e);return $s(t)&&(t=o),fo(gn(e,1,$s,!0),di(t,2))})),ss=Qn((function(e){var t=Ji(e);return t="function"==typeof t?t:o,fo(gn(e,1,$s,!0),o,t)}));function as(e){if(!e||!e.length)return[];var t=0;return e=Rt(e,(function(e){if($s(e))return t=gr(e.length,t),!0})),Gt(t,(function(t){return Mt(e,Yt(t))}))}function us(e,t){if(!e||!e.length)return[];var r=as(e);return null==t?r:Mt(r,(function(e){return xt(t,o,e)}))}var ls=Qn((function(e,t){return $s(e)?fn(e,t):[]})),cs=Qn((function(e){return vo(Rt(e,$s))})),ds=Qn((function(e){var t=Ji(e);return $s(t)&&(t=o),vo(Rt(e,$s),di(t,2))})),hs=Qn((function(e){var t=Ji(e);return t="function"==typeof t?t:o,vo(Rt(e,$s),o,t)})),fs=Qn(as);var ps=Qn((function(e){var t=e.length,r=t>1?e[t-1]:o;return r="function"==typeof r?(e.pop(),r):o,us(e,r)}));function _s(e){var t=Hr(e);return t.__chain__=!0,t}function ms(e,t){return t(e)}var ys=ii((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return un(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Yr&&wi(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:ms,args:[i],thisArg:o}),new Kr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)}));var vs=Io((function(e,t,r){Le.call(e,r)?++e[r]:an(e,r,1)}));var gs=Ho(Wi),bs=Ho(Xi);function ws(e,t){return(Xs(e)?At:pn)(e,di(t,3))}function js(e,t){return(Xs(e)?Et:_n)(e,di(t,3))}var ks=Io((function(e,t,r){Le.call(e,r)?e[r].push(t):an(e,r,[t])}));var Ss=Qn((function(e,t,r){var o=-1,i="function"==typeof t,s=Gs(e)?n(e.length):[];return pn(e,(function(e){s[++o]=i?xt(t,e,r):Pn(e,t,r)})),s})),xs=Io((function(e,t,r){an(e,r,t)}));function Ts(e,t){return(Xs(e)?Mt:Hn)(e,di(t,3))}var As=Io((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var Es=Qn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&ji(e,t[0],t[1])?t=[]:r>2&&ji(t[0],t[1],t[2])&&(t=[t[0]]),Wn(e,gn(t,1),[])})),Os=ht||function(){return ft.Date.now()};function Rs(e,t,r){return t=r?o:t,t=e&&null==t?e.length:t,ei(e,d,o,o,o,o,t)}function Cs(e,t){var r;if("function"!=typeof t)throw new Re(i);return e=ya(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=o),r}}var Ps=Qn((function(e,t,r){var n=1;if(r.length){var o=lr(r,ci(Ps));n|=l}return ei(e,n,t,r,o)})),Ms=Qn((function(e,t,r){var n=3;if(r.length){var o=lr(r,ci(Ms));n|=l}return ei(t,n,e,r,o)}));function Is(e,t,r){var n,s,a,u,l,c,d=0,h=!1,f=!1,p=!0;if("function"!=typeof e)throw new Re(i);function _(t){var r=n,i=s;return n=s=o,d=t,u=e.apply(i,r)}function m(e){return d=e,l=Ii(v,t),h?_(e):u}function y(e){var r=e-c;return c===o||r>=t||r<0||f&&e-d>=a}function v(){var e=Os();if(y(e))return g(e);l=Ii(v,function(e){var r=t-(e-c);return f?br(r,a-(e-d)):r}(e))}function g(e){return l=o,p&&n?_(e):(n=s=o,u)}function b(){var e=Os(),r=y(e);if(n=arguments,s=this,c=e,r){if(l===o)return m(c);if(f)return xo(l),l=Ii(v,t),_(c)}return l===o&&(l=Ii(v,t)),u}return t=ga(t)||0,na(r)&&(h=!!r.leading,a=(f="maxWait"in r)?gr(ga(r.maxWait)||0,t):a,p="trailing"in r?!!r.trailing:p),b.cancel=function(){l!==o&&xo(l),d=0,n=c=s=l=o},b.flush=function(){return l===o?u:g(Os())},b}var Ns=Qn((function(e,t){return hn(e,1,t)})),Ls=Qn((function(e,t,r){return hn(e,ga(t)||0,r)}));function Bs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Re(i);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(Bs.Cache||zr),r}function Ds(e){if("function"!=typeof e)throw new Re(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Bs.Cache=zr;var Fs=ko((function(e,t){var r=(t=1==t.length&&Xs(t[0])?Mt(t[0],Zt(di())):Mt(gn(t,1),Zt(di()))).length;return Qn((function(n){for(var o=-1,i=br(n.length,r);++o<i;)n[o]=t[o].call(this,n[o]);return xt(e,this,n)}))})),Us=Qn((function(e,t){var r=lr(t,ci(Us));return ei(e,l,o,t,r)})),Hs=Qn((function(e,t){var r=lr(t,ci(Hs));return ei(e,c,o,t,r)})),qs=ii((function(e,t){return ei(e,h,o,o,o,t)}));function Vs(e,t){return e===t||e!=e&&t!=t}var Ks=Go(En),Ys=Go((function(e,t){return e>=t})),Ws=Mn(function(){return arguments}())?Mn:function(e){return oa(e)&&Le.call(e,"callee")&&!Ge.call(e,"callee")},Xs=n.isArray,zs=gt?Zt(gt):function(e){return oa(e)&&An(e)==I};function Gs(e){return null!=e&&ra(e.length)&&!ea(e)}function $s(e){return oa(e)&&Gs(e)}var Zs=Dt||gu,Qs=bt?Zt(bt):function(e){return oa(e)&&An(e)==w};function Js(e){if(!oa(e))return!1;var t=An(e);return t==j||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!aa(e)}function ea(e){if(!na(e))return!1;var t=An(e);return t==k||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ta(e){return"number"==typeof e&&e==ya(e)}function ra(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function na(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function oa(e){return null!=e&&"object"==typeof e}var ia=wt?Zt(wt):function(e){return oa(e)&&yi(e)==x};function sa(e){return"number"==typeof e||oa(e)&&An(e)==T}function aa(e){if(!oa(e)||An(e)!=A)return!1;var t=Xe(e);if(null===t)return!0;var r=Le.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Ne.call(r)==Ue}var ua=jt?Zt(jt):function(e){return oa(e)&&An(e)==O};var la=kt?Zt(kt):function(e){return oa(e)&&yi(e)==R};function ca(e){return"string"==typeof e||!Xs(e)&&oa(e)&&An(e)==C}function da(e){return"symbol"==typeof e||oa(e)&&An(e)==P}var ha=St?Zt(St):function(e){return oa(e)&&ra(e.length)&&!!st[An(e)]};var fa=Go(Un),pa=Go((function(e,t){return e<=t}));function _a(e){if(!e)return[];if(Gs(e))return ca(e)?fr(e):Po(e);if(et&&e[et])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[et]());var t=yi(e);return(t==x?ar:t==R?cr:Va)(e)}function ma(e){return e?(e=ga(e))===f||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ya(e){var t=ma(e),r=t%1;return t==t?r?t-r:t:0}function va(e){return e?ln(ya(e),0,m):0}function ga(e){if("number"==typeof e)return e;if(da(e))return _;if(na(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=na(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=$t(e);var r=ye.test(e);return r||ge.test(e)?ct(e.slice(2),r?2:8):me.test(e)?_:+e}function ba(e){return Mo(e,Na(e))}function wa(e){return null==e?"":ho(e)}var ja=No((function(e,t){if(Ti(t)||Gs(t))Mo(t,Ia(t),e);else for(var r in t)Le.call(t,r)&&rn(e,r,t[r])})),ka=No((function(e,t){Mo(t,Na(t),e)})),Sa=No((function(e,t,r,n){Mo(t,Na(t),e,n)})),xa=No((function(e,t,r,n){Mo(t,Ia(t),e,n)})),Ta=ii(un);var Aa=Qn((function(e,t){e=Ae(e);var r=-1,n=t.length,i=n>2?t[2]:o;for(i&&ji(t[0],t[1],i)&&(n=1);++r<n;)for(var s=t[r],a=Na(s),u=-1,l=a.length;++u<l;){var c=a[u],d=e[c];(d===o||Vs(d,Me[c])&&!Le.call(e,c))&&(e[c]=s[c])}return e})),Ea=Qn((function(e){return e.push(o,ri),xt(Ba,o,e)}));function Oa(e,t,r){var n=null==e?o:xn(e,t);return n===o?r:n}function Ra(e,t){return null!=e&&vi(e,t,Rn)}var Ca=Ko((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),e[t]=r}),nu(su)),Pa=Ko((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),Le.call(e,t)?e[t].push(r):e[t]=[r]}),di),Ma=Qn(Pn);function Ia(e){return Gs(e)?Zr(e):Dn(e)}function Na(e){return Gs(e)?Zr(e,!0):Fn(e)}var La=No((function(e,t,r){Kn(e,t,r)})),Ba=No((function(e,t,r,n){Kn(e,t,r,n)})),Da=ii((function(e,t){var r={};if(null==e)return r;var n=!1;t=Mt(t,(function(t){return t=jo(t,e),n||(n=t.length>1),t})),Mo(e,ai(e),r),n&&(r=cn(r,7,ni));for(var o=t.length;o--;)po(r,t[o]);return r}));var Fa=ii((function(e,t){return null==e?{}:function(e,t){return Xn(e,t,(function(t,r){return Ra(e,r)}))}(e,t)}));function Ua(e,t){if(null==e)return{};var r=Mt(ai(e),(function(e){return[e]}));return t=di(t),Xn(e,r,(function(e,r){return t(e,r[0])}))}var Ha=Jo(Ia),qa=Jo(Na);function Va(e){return null==e?[]:Qt(e,Ia(e))}var Ka=Fo((function(e,t,r){return t=t.toLowerCase(),e+(r?Ya(t):t)}));function Ya(e){return Ja(wa(e).toLowerCase())}function Wa(e){return(e=wa(e))&&e.replace(we,nr).replace(Je,"")}var Xa=Fo((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),za=Fo((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Ga=Do("toLowerCase");var $a=Fo((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var Za=Fo((function(e,t,r){return e+(r?" ":"")+Ja(t)}));var Qa=Fo((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Ja=Do("toUpperCase");function eu(e,t,r){return e=wa(e),(t=r?o:t)===o?function(e){return nt.test(e)}(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var tu=Qn((function(e,t){try{return xt(e,o,t)}catch(e){return Js(e)?e:new Se(e)}})),ru=ii((function(e,t){return At(t,(function(t){t=Ui(t),an(e,t,Ps(e[t],e))})),e}));function nu(e){return function(){return e}}var ou=qo(),iu=qo(!0);function su(e){return e}function au(e){return Bn("function"==typeof e?e:cn(e,1))}var uu=Qn((function(e,t){return function(r){return Pn(r,e,t)}})),lu=Qn((function(e,t){return function(r){return Pn(e,r,t)}}));function cu(e,t,r){var n=Ia(t),o=Sn(t,n);null!=r||na(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=Sn(t,Ia(t)));var i=!(na(r)&&"chain"in r&&!r.chain),s=ea(e);return At(o,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=e(this.__wrapped__),o=r.__actions__=Po(this.__actions__);return o.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,It([this.value()],arguments))})})),e}function du(){}var hu=Wo(Mt),fu=Wo(Ot),pu=Wo(Bt);function _u(e){return ki(e)?Yt(Ui(e)):function(e){return function(t){return xn(t,e)}}(e)}var mu=zo(),yu=zo(!0);function vu(){return[]}function gu(){return!1}var bu=Yo((function(e,t){return e+t}),0),wu=Zo("ceil"),ju=Yo((function(e,t){return e/t}),1),ku=Zo("floor");var Su,xu=Yo((function(e,t){return e*t}),1),Tu=Zo("round"),Au=Yo((function(e,t){return e-t}),0);return Hr.after=function(e,t){if("function"!=typeof t)throw new Re(i);return e=ya(e),function(){if(--e<1)return t.apply(this,arguments)}},Hr.ary=Rs,Hr.assign=ja,Hr.assignIn=ka,Hr.assignInWith=Sa,Hr.assignWith=xa,Hr.at=Ta,Hr.before=Cs,Hr.bind=Ps,Hr.bindAll=ru,Hr.bindKey=Ms,Hr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Xs(e)?e:[e]},Hr.chain=_s,Hr.chunk=function(e,t,r){t=(r?ji(e,t,r):t===o)?1:gr(ya(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var s=0,a=0,u=n(_t(i/t));s<i;)u[a++]=io(e,s,s+=t);return u},Hr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,o=[];++t<r;){var i=e[t];i&&(o[n++]=i)}return o},Hr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],o=e;o--;)t[o-1]=arguments[o];return It(Xs(r)?Po(r):[r],gn(t,1))},Hr.cond=function(e){var t=null==e?0:e.length,r=di();return e=t?Mt(e,(function(e){if("function"!=typeof e[1])throw new Re(i);return[r(e[0]),e[1]]})):[],Qn((function(r){for(var n=-1;++n<t;){var o=e[n];if(xt(o[0],this,r))return xt(o[1],this,r)}}))},Hr.conforms=function(e){return function(e){var t=Ia(e);return function(r){return dn(r,e,t)}}(cn(e,1))},Hr.constant=nu,Hr.countBy=vs,Hr.create=function(e,t){var r=qr(e);return null==t?r:sn(r,t)},Hr.curry=function e(t,r,n){var i=ei(t,8,o,o,o,o,o,r=n?o:r);return i.placeholder=e.placeholder,i},Hr.curryRight=function e(t,r,n){var i=ei(t,u,o,o,o,o,o,r=n?o:r);return i.placeholder=e.placeholder,i},Hr.debounce=Is,Hr.defaults=Aa,Hr.defaultsDeep=Ea,Hr.defer=Ns,Hr.delay=Ls,Hr.difference=Vi,Hr.differenceBy=Ki,Hr.differenceWith=Yi,Hr.drop=function(e,t,r){var n=null==e?0:e.length;return n?io(e,(t=r||t===o?1:ya(t))<0?0:t,n):[]},Hr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?io(e,0,(t=n-(t=r||t===o?1:ya(t)))<0?0:t):[]},Hr.dropRightWhile=function(e,t){return e&&e.length?mo(e,di(t,3),!0,!0):[]},Hr.dropWhile=function(e,t){return e&&e.length?mo(e,di(t,3),!0):[]},Hr.fill=function(e,t,r,n){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&ji(e,t,r)&&(r=0,n=i),function(e,t,r,n){var i=e.length;for((r=ya(r))<0&&(r=-r>i?0:i+r),(n=n===o||n>i?i:ya(n))<0&&(n+=i),n=r>n?0:va(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Hr.filter=function(e,t){return(Xs(e)?Rt:vn)(e,di(t,3))},Hr.flatMap=function(e,t){return gn(Ts(e,t),1)},Hr.flatMapDeep=function(e,t){return gn(Ts(e,t),f)},Hr.flatMapDepth=function(e,t,r){return r=r===o?1:ya(r),gn(Ts(e,t),r)},Hr.flatten=zi,Hr.flattenDeep=function(e){return(null==e?0:e.length)?gn(e,f):[]},Hr.flattenDepth=function(e,t){return(null==e?0:e.length)?gn(e,t=t===o?1:ya(t)):[]},Hr.flip=function(e){return ei(e,512)},Hr.flow=ou,Hr.flowRight=iu,Hr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var o=e[t];n[o[0]]=o[1]}return n},Hr.functions=function(e){return null==e?[]:Sn(e,Ia(e))},Hr.functionsIn=function(e){return null==e?[]:Sn(e,Na(e))},Hr.groupBy=ks,Hr.initial=function(e){return(null==e?0:e.length)?io(e,0,-1):[]},Hr.intersection=$i,Hr.intersectionBy=Zi,Hr.intersectionWith=Qi,Hr.invert=Ca,Hr.invertBy=Pa,Hr.invokeMap=Ss,Hr.iteratee=au,Hr.keyBy=xs,Hr.keys=Ia,Hr.keysIn=Na,Hr.map=Ts,Hr.mapKeys=function(e,t){var r={};return t=di(t,3),jn(e,(function(e,n,o){an(r,t(e,n,o),e)})),r},Hr.mapValues=function(e,t){var r={};return t=di(t,3),jn(e,(function(e,n,o){an(r,n,t(e,n,o))})),r},Hr.matches=function(e){return qn(cn(e,1))},Hr.matchesProperty=function(e,t){return Vn(e,cn(t,1))},Hr.memoize=Bs,Hr.merge=La,Hr.mergeWith=Ba,Hr.method=uu,Hr.methodOf=lu,Hr.mixin=cu,Hr.negate=Ds,Hr.nthArg=function(e){return e=ya(e),Qn((function(t){return Yn(t,e)}))},Hr.omit=Da,Hr.omitBy=function(e,t){return Ua(e,Ds(di(t)))},Hr.once=function(e){return Cs(2,e)},Hr.orderBy=function(e,t,r,n){return null==e?[]:(Xs(t)||(t=null==t?[]:[t]),Xs(r=n?o:r)||(r=null==r?[]:[r]),Wn(e,t,r))},Hr.over=hu,Hr.overArgs=Fs,Hr.overEvery=fu,Hr.overSome=pu,Hr.partial=Us,Hr.partialRight=Hs,Hr.partition=As,Hr.pick=Fa,Hr.pickBy=Ua,Hr.property=_u,Hr.propertyOf=function(e){return function(t){return null==e?o:xn(e,t)}},Hr.pull=es,Hr.pullAll=ts,Hr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?zn(e,t,di(r,2)):e},Hr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?zn(e,t,o,r):e},Hr.pullAt=rs,Hr.range=mu,Hr.rangeRight=yu,Hr.rearg=qs,Hr.reject=function(e,t){return(Xs(e)?Rt:vn)(e,Ds(di(t,3)))},Hr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,o=[],i=e.length;for(t=di(t,3);++n<i;){var s=e[n];t(s,n,e)&&(r.push(s),o.push(n))}return Gn(e,o),r},Hr.rest=function(e,t){if("function"!=typeof e)throw new Re(i);return Qn(e,t=t===o?t:ya(t))},Hr.reverse=ns,Hr.sampleSize=function(e,t,r){return t=(r?ji(e,t,r):t===o)?1:ya(t),(Xs(e)?Jr:eo)(e,t)},Hr.set=function(e,t,r){return null==e?e:to(e,t,r)},Hr.setWith=function(e,t,r,n){return n="function"==typeof n?n:o,null==e?e:to(e,t,r,n)},Hr.shuffle=function(e){return(Xs(e)?en:oo)(e)},Hr.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&ji(e,t,r)?(t=0,r=n):(t=null==t?0:ya(t),r=r===o?n:ya(r)),io(e,t,r)):[]},Hr.sortBy=Es,Hr.sortedUniq=function(e){return e&&e.length?lo(e):[]},Hr.sortedUniqBy=function(e,t){return e&&e.length?lo(e,di(t,2)):[]},Hr.split=function(e,t,r){return r&&"number"!=typeof r&&ji(e,t,r)&&(t=r=o),(r=r===o?m:r>>>0)?(e=wa(e))&&("string"==typeof t||null!=t&&!ua(t))&&!(t=ho(t))&&sr(e)?So(fr(e),0,r):e.split(t,r):[]},Hr.spread=function(e,t){if("function"!=typeof e)throw new Re(i);return t=null==t?0:gr(ya(t),0),Qn((function(r){var n=r[t],o=So(r,0,t);return n&&It(o,n),xt(e,this,o)}))},Hr.tail=function(e){var t=null==e?0:e.length;return t?io(e,1,t):[]},Hr.take=function(e,t,r){return e&&e.length?io(e,0,(t=r||t===o?1:ya(t))<0?0:t):[]},Hr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?io(e,(t=n-(t=r||t===o?1:ya(t)))<0?0:t,n):[]},Hr.takeRightWhile=function(e,t){return e&&e.length?mo(e,di(t,3),!1,!0):[]},Hr.takeWhile=function(e,t){return e&&e.length?mo(e,di(t,3)):[]},Hr.tap=function(e,t){return t(e),e},Hr.throttle=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new Re(i);return na(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Is(e,t,{leading:n,maxWait:t,trailing:o})},Hr.thru=ms,Hr.toArray=_a,Hr.toPairs=Ha,Hr.toPairsIn=qa,Hr.toPath=function(e){return Xs(e)?Mt(e,Ui):da(e)?[e]:Po(Fi(wa(e)))},Hr.toPlainObject=ba,Hr.transform=function(e,t,r){var n=Xs(e),o=n||Zs(e)||ha(e);if(t=di(t,4),null==r){var i=e&&e.constructor;r=o?n?new i:[]:na(e)&&ea(i)?qr(Xe(e)):{}}return(o?At:jn)(e,(function(e,n,o){return t(r,e,n,o)})),r},Hr.unary=function(e){return Rs(e,1)},Hr.union=os,Hr.unionBy=is,Hr.unionWith=ss,Hr.uniq=function(e){return e&&e.length?fo(e):[]},Hr.uniqBy=function(e,t){return e&&e.length?fo(e,di(t,2)):[]},Hr.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?fo(e,o,t):[]},Hr.unset=function(e,t){return null==e||po(e,t)},Hr.unzip=as,Hr.unzipWith=us,Hr.update=function(e,t,r){return null==e?e:_o(e,t,wo(r))},Hr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:o,null==e?e:_o(e,t,wo(r),n)},Hr.values=Va,Hr.valuesIn=function(e){return null==e?[]:Qt(e,Na(e))},Hr.without=ls,Hr.words=eu,Hr.wrap=function(e,t){return Us(wo(t),e)},Hr.xor=cs,Hr.xorBy=ds,Hr.xorWith=hs,Hr.zip=fs,Hr.zipObject=function(e,t){return go(e||[],t||[],rn)},Hr.zipObjectDeep=function(e,t){return go(e||[],t||[],to)},Hr.zipWith=ps,Hr.entries=Ha,Hr.entriesIn=qa,Hr.extend=ka,Hr.extendWith=Sa,cu(Hr,Hr),Hr.add=bu,Hr.attempt=tu,Hr.camelCase=Ka,Hr.capitalize=Ya,Hr.ceil=wu,Hr.clamp=function(e,t,r){return r===o&&(r=t,t=o),r!==o&&(r=(r=ga(r))==r?r:0),t!==o&&(t=(t=ga(t))==t?t:0),ln(ga(e),t,r)},Hr.clone=function(e){return cn(e,4)},Hr.cloneDeep=function(e){return cn(e,5)},Hr.cloneDeepWith=function(e,t){return cn(e,5,t="function"==typeof t?t:o)},Hr.cloneWith=function(e,t){return cn(e,4,t="function"==typeof t?t:o)},Hr.conformsTo=function(e,t){return null==t||dn(e,t,Ia(t))},Hr.deburr=Wa,Hr.defaultTo=function(e,t){return null==e||e!=e?t:e},Hr.divide=ju,Hr.endsWith=function(e,t,r){e=wa(e),t=ho(t);var n=e.length,i=r=r===o?n:ln(ya(r),0,n);return(r-=t.length)>=0&&e.slice(r,i)==t},Hr.eq=Vs,Hr.escape=function(e){return(e=wa(e))&&Z.test(e)?e.replace(G,or):e},Hr.escapeRegExp=function(e){return(e=wa(e))&&ie.test(e)?e.replace(oe,"\\$&"):e},Hr.every=function(e,t,r){var n=Xs(e)?Ot:mn;return r&&ji(e,t,r)&&(t=o),n(e,di(t,3))},Hr.find=gs,Hr.findIndex=Wi,Hr.findKey=function(e,t){return Ft(e,di(t,3),jn)},Hr.findLast=bs,Hr.findLastIndex=Xi,Hr.findLastKey=function(e,t){return Ft(e,di(t,3),kn)},Hr.floor=ku,Hr.forEach=ws,Hr.forEachRight=js,Hr.forIn=function(e,t){return null==e?e:bn(e,di(t,3),Na)},Hr.forInRight=function(e,t){return null==e?e:wn(e,di(t,3),Na)},Hr.forOwn=function(e,t){return e&&jn(e,di(t,3))},Hr.forOwnRight=function(e,t){return e&&kn(e,di(t,3))},Hr.get=Oa,Hr.gt=Ks,Hr.gte=Ys,Hr.has=function(e,t){return null!=e&&vi(e,t,On)},Hr.hasIn=Ra,Hr.head=Gi,Hr.identity=su,Hr.includes=function(e,t,r,n){e=Gs(e)?e:Va(e),r=r&&!n?ya(r):0;var o=e.length;return r<0&&(r=gr(o+r,0)),ca(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&Ht(e,t,r)>-1},Hr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:ya(r);return o<0&&(o=gr(n+o,0)),Ht(e,t,o)},Hr.inRange=function(e,t,r){return t=ma(t),r===o?(r=t,t=0):r=ma(r),function(e,t,r){return e>=br(t,r)&&e<gr(t,r)}(e=ga(e),t,r)},Hr.invoke=Ma,Hr.isArguments=Ws,Hr.isArray=Xs,Hr.isArrayBuffer=zs,Hr.isArrayLike=Gs,Hr.isArrayLikeObject=$s,Hr.isBoolean=function(e){return!0===e||!1===e||oa(e)&&An(e)==b},Hr.isBuffer=Zs,Hr.isDate=Qs,Hr.isElement=function(e){return oa(e)&&1===e.nodeType&&!aa(e)},Hr.isEmpty=function(e){if(null==e)return!0;if(Gs(e)&&(Xs(e)||"string"==typeof e||"function"==typeof e.splice||Zs(e)||ha(e)||Ws(e)))return!e.length;var t=yi(e);if(t==x||t==R)return!e.size;if(Ti(e))return!Dn(e).length;for(var r in e)if(Le.call(e,r))return!1;return!0},Hr.isEqual=function(e,t){return In(e,t)},Hr.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:o)?r(e,t):o;return n===o?In(e,t,o,r):!!n},Hr.isError=Js,Hr.isFinite=function(e){return"number"==typeof e&&Wt(e)},Hr.isFunction=ea,Hr.isInteger=ta,Hr.isLength=ra,Hr.isMap=ia,Hr.isMatch=function(e,t){return e===t||Nn(e,t,fi(t))},Hr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:o,Nn(e,t,fi(t),r)},Hr.isNaN=function(e){return sa(e)&&e!=+e},Hr.isNative=function(e){if(xi(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ln(e)},Hr.isNil=function(e){return null==e},Hr.isNull=function(e){return null===e},Hr.isNumber=sa,Hr.isObject=na,Hr.isObjectLike=oa,Hr.isPlainObject=aa,Hr.isRegExp=ua,Hr.isSafeInteger=function(e){return ta(e)&&e>=-9007199254740991&&e<=p},Hr.isSet=la,Hr.isString=ca,Hr.isSymbol=da,Hr.isTypedArray=ha,Hr.isUndefined=function(e){return e===o},Hr.isWeakMap=function(e){return oa(e)&&yi(e)==M},Hr.isWeakSet=function(e){return oa(e)&&"[object WeakSet]"==An(e)},Hr.join=function(e,t){return null==e?"":yr.call(e,t)},Hr.kebabCase=Xa,Hr.last=Ji,Hr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;return r!==o&&(i=(i=ya(r))<0?gr(n+i,0):br(i,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):Ut(e,Vt,i,!0)},Hr.lowerCase=za,Hr.lowerFirst=Ga,Hr.lt=fa,Hr.lte=pa,Hr.max=function(e){return e&&e.length?yn(e,su,En):o},Hr.maxBy=function(e,t){return e&&e.length?yn(e,di(t,2),En):o},Hr.mean=function(e){return Kt(e,su)},Hr.meanBy=function(e,t){return Kt(e,di(t,2))},Hr.min=function(e){return e&&e.length?yn(e,su,Un):o},Hr.minBy=function(e,t){return e&&e.length?yn(e,di(t,2),Un):o},Hr.stubArray=vu,Hr.stubFalse=gu,Hr.stubObject=function(){return{}},Hr.stubString=function(){return""},Hr.stubTrue=function(){return!0},Hr.multiply=xu,Hr.nth=function(e,t){return e&&e.length?Yn(e,ya(t)):o},Hr.noConflict=function(){return ft._===this&&(ft._=He),this},Hr.noop=du,Hr.now=Os,Hr.pad=function(e,t,r){e=wa(e);var n=(t=ya(t))?hr(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return Xo(yt(o),r)+e+Xo(_t(o),r)},Hr.padEnd=function(e,t,r){e=wa(e);var n=(t=ya(t))?hr(e):0;return t&&n<t?e+Xo(t-n,r):e},Hr.padStart=function(e,t,r){e=wa(e);var n=(t=ya(t))?hr(e):0;return t&&n<t?Xo(t-n,r)+e:e},Hr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),jr(wa(e).replace(se,""),t||0)},Hr.random=function(e,t,r){if(r&&"boolean"!=typeof r&&ji(e,t,r)&&(t=r=o),r===o&&("boolean"==typeof t?(r=t,t=o):"boolean"==typeof e&&(r=e,e=o)),e===o&&t===o?(e=0,t=1):(e=ma(e),t===o?(t=e,e=0):t=ma(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var i=kr();return br(e+i*(t-e+lt("1e-"+((i+"").length-1))),t)}return $n(e,t)},Hr.reduce=function(e,t,r){var n=Xs(e)?Nt:Xt,o=arguments.length<3;return n(e,di(t,4),r,o,pn)},Hr.reduceRight=function(e,t,r){var n=Xs(e)?Lt:Xt,o=arguments.length<3;return n(e,di(t,4),r,o,_n)},Hr.repeat=function(e,t,r){return t=(r?ji(e,t,r):t===o)?1:ya(t),Zn(wa(e),t)},Hr.replace=function(){var e=arguments,t=wa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Hr.result=function(e,t,r){var n=-1,i=(t=jo(t,e)).length;for(i||(i=1,e=o);++n<i;){var s=null==e?o:e[Ui(t[n])];s===o&&(n=i,s=r),e=ea(s)?s.call(e):s}return e},Hr.round=Tu,Hr.runInContext=e,Hr.sample=function(e){return(Xs(e)?Qr:Jn)(e)},Hr.size=function(e){if(null==e)return 0;if(Gs(e))return ca(e)?hr(e):e.length;var t=yi(e);return t==x||t==R?e.size:Dn(e).length},Hr.snakeCase=$a,Hr.some=function(e,t,r){var n=Xs(e)?Bt:so;return r&&ji(e,t,r)&&(t=o),n(e,di(t,3))},Hr.sortedIndex=function(e,t){return ao(e,t)},Hr.sortedIndexBy=function(e,t,r){return uo(e,t,di(r,2))},Hr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ao(e,t);if(n<r&&Vs(e[n],t))return n}return-1},Hr.sortedLastIndex=function(e,t){return ao(e,t,!0)},Hr.sortedLastIndexBy=function(e,t,r){return uo(e,t,di(r,2),!0)},Hr.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=ao(e,t,!0)-1;if(Vs(e[r],t))return r}return-1},Hr.startCase=Za,Hr.startsWith=function(e,t,r){return e=wa(e),r=null==r?0:ln(ya(r),0,e.length),t=ho(t),e.slice(r,r+t.length)==t},Hr.subtract=Au,Hr.sum=function(e){return e&&e.length?zt(e,su):0},Hr.sumBy=function(e,t){return e&&e.length?zt(e,di(t,2)):0},Hr.template=function(e,t,r){var n=Hr.templateSettings;r&&ji(e,t,r)&&(t=o),e=wa(e),t=Sa({},t,n,ti);var i,s,a=Sa({},t.imports,n.imports,ti),u=Ia(a),l=Qt(a,u),c=0,d=t.interpolate||je,h="__p += '",f=Ee((t.escape||je).source+"|"+d.source+"|"+(d===ee?pe:je).source+"|"+(t.evaluate||je).source+"|$","g"),p="//# sourceURL="+(Le.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++it+"]")+"\n";e.replace(f,(function(t,r,n,o,a,u){return n||(n=o),h+=e.slice(c,u).replace(ke,ir),r&&(i=!0,h+="' +\n__e("+r+") +\n'"),a&&(s=!0,h+="';\n"+a+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),h+="';\n";var _=Le.call(t,"variable")&&t.variable;if(_){if(he.test(_))throw new Se("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(s?h.replace(Y,""):h).replace(W,"$1").replace(X,"$1;"),h="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=tu((function(){return xe(u,p+"return "+h).apply(o,l)}));if(m.source=h,Js(m))throw m;return m},Hr.times=function(e,t){if((e=ya(e))<1||e>p)return[];var r=m,n=br(e,m);t=di(t),e-=m;for(var o=Gt(n,t);++r<e;)t(r);return o},Hr.toFinite=ma,Hr.toInteger=ya,Hr.toLength=va,Hr.toLower=function(e){return wa(e).toLowerCase()},Hr.toNumber=ga,Hr.toSafeInteger=function(e){return e?ln(ya(e),-9007199254740991,p):0===e?e:0},Hr.toString=wa,Hr.toUpper=function(e){return wa(e).toUpperCase()},Hr.trim=function(e,t,r){if((e=wa(e))&&(r||t===o))return $t(e);if(!e||!(t=ho(t)))return e;var n=fr(e),i=fr(t);return So(n,er(n,i),tr(n,i)+1).join("")},Hr.trimEnd=function(e,t,r){if((e=wa(e))&&(r||t===o))return e.slice(0,pr(e)+1);if(!e||!(t=ho(t)))return e;var n=fr(e);return So(n,0,tr(n,fr(t))+1).join("")},Hr.trimStart=function(e,t,r){if((e=wa(e))&&(r||t===o))return e.replace(se,"");if(!e||!(t=ho(t)))return e;var n=fr(e);return So(n,er(n,fr(t))).join("")},Hr.truncate=function(e,t){var r=30,n="...";if(na(t)){var i="separator"in t?t.separator:i;r="length"in t?ya(t.length):r,n="omission"in t?ho(t.omission):n}var s=(e=wa(e)).length;if(sr(e)){var a=fr(e);s=a.length}if(r>=s)return e;var u=r-hr(n);if(u<1)return n;var l=a?So(a,0,u).join(""):e.slice(0,u);if(i===o)return l+n;if(a&&(u+=l.length-u),ua(i)){if(e.slice(u).search(i)){var c,d=l;for(i.global||(i=Ee(i.source,wa(_e.exec(i))+"g")),i.lastIndex=0;c=i.exec(d);)var h=c.index;l=l.slice(0,h===o?u:h)}}else if(e.indexOf(ho(i),u)!=u){var f=l.lastIndexOf(i);f>-1&&(l=l.slice(0,f))}return l+n},Hr.unescape=function(e){return(e=wa(e))&&$.test(e)?e.replace(z,_r):e},Hr.uniqueId=function(e){var t=++Be;return wa(e)+t},Hr.upperCase=Qa,Hr.upperFirst=Ja,Hr.each=ws,Hr.eachRight=js,Hr.first=Gi,cu(Hr,(Su={},jn(Hr,(function(e,t){Le.call(Hr.prototype,t)||(Su[t]=e)})),Su),{chain:!1}),Hr.VERSION="4.17.21",At(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Hr[e].placeholder=Hr})),At(["drop","take"],(function(e,t){Yr.prototype[e]=function(r){r=r===o?1:gr(ya(r),0);var n=this.__filtered__&&!t?new Yr(this):this.clone();return n.__filtered__?n.__takeCount__=br(r,n.__takeCount__):n.__views__.push({size:br(r,m),type:e+(n.__dir__<0?"Right":"")}),n},Yr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),At(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Yr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:di(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),At(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Yr.prototype[e]=function(){return this[r](1).value()[0]}})),At(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Yr.prototype[e]=function(){return this.__filtered__?new Yr(this):this[r](1)}})),Yr.prototype.compact=function(){return this.filter(su)},Yr.prototype.find=function(e){return this.filter(e).head()},Yr.prototype.findLast=function(e){return this.reverse().find(e)},Yr.prototype.invokeMap=Qn((function(e,t){return"function"==typeof e?new Yr(this):this.map((function(r){return Pn(r,e,t)}))})),Yr.prototype.reject=function(e){return this.filter(Ds(di(e)))},Yr.prototype.slice=function(e,t){e=ya(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Yr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==o&&(r=(t=ya(t))<0?r.dropRight(-t):r.take(t-e)),r)},Yr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Yr.prototype.toArray=function(){return this.take(m)},jn(Yr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),i=Hr[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);i&&(Hr.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,u=t instanceof Yr,l=a[0],c=u||Xs(t),d=function(e){var t=i.apply(Hr,It([e],a));return n&&h?t[0]:t};c&&r&&"function"==typeof l&&1!=l.length&&(u=c=!1);var h=this.__chain__,f=!!this.__actions__.length,p=s&&!h,_=u&&!f;if(!s&&c){t=_?t:new Yr(this);var m=e.apply(t,a);return m.__actions__.push({func:ms,args:[d],thisArg:o}),new Kr(m,h)}return p&&_?e.apply(this,a):(m=this.thru(d),p?n?m.value()[0]:m.value():m)})})),At(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ce[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Hr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(Xs(o)?o:[],e)}return this[r]((function(r){return t.apply(Xs(r)?r:[],e)}))}})),jn(Yr.prototype,(function(e,t){var r=Hr[t];if(r){var n=r.name+"";Le.call(Pr,n)||(Pr[n]=[]),Pr[n].push({name:t,func:r})}})),Pr[Vo(o,2).name]=[{name:"wrapper",func:o}],Yr.prototype.clone=function(){var e=new Yr(this.__wrapped__);return e.__actions__=Po(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Po(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Po(this.__views__),e},Yr.prototype.reverse=function(){if(this.__filtered__){var e=new Yr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Yr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Xs(e),n=t<0,o=r?e.length:0,i=function(e,t,r){var n=-1,o=r.length;for(;++n<o;){var i=r[n],s=i.size;switch(i.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=br(t,e+s);break;case"takeRight":e=gr(e,t-s)}}return{start:e,end:t}}(0,o,this.__views__),s=i.start,a=i.end,u=a-s,l=n?a:s-1,c=this.__iteratees__,d=c.length,h=0,f=br(u,this.__takeCount__);if(!r||!n&&o==u&&f==u)return yo(e,this.__actions__);var p=[];e:for(;u--&&h<f;){for(var _=-1,m=e[l+=t];++_<d;){var y=c[_],v=y.iteratee,g=y.type,b=v(m);if(2==g)m=b;else if(!b){if(1==g)continue e;break e}}p[h++]=m}return p},Hr.prototype.at=ys,Hr.prototype.chain=function(){return _s(this)},Hr.prototype.commit=function(){return new Kr(this.value(),this.__chain__)},Hr.prototype.next=function(){this.__values__===o&&(this.__values__=_a(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Hr.prototype.plant=function(e){for(var t,r=this;r instanceof Vr;){var n=qi(r);n.__index__=0,n.__values__=o,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t},Hr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Yr){var t=e;return this.__actions__.length&&(t=new Yr(this)),(t=t.reverse()).__actions__.push({func:ms,args:[ns],thisArg:o}),new Kr(t,this.__chain__)}return this.thru(ns)},Hr.prototype.toJSON=Hr.prototype.valueOf=Hr.prototype.value=function(){return yo(this.__wrapped__,this.__actions__)},Hr.prototype.first=Hr.prototype.head,et&&(Hr.prototype[et]=function(){return this}),Hr}();ft._=mr,(n=function(){return mr}.call(t,r,t,e))===o||(e.exports=n)}.call(this)},"./node_modules/lodash/map.js":(e,t,r)=>{var n=r("./node_modules/lodash/_arrayMap.js"),o=r("./node_modules/lodash/_baseIteratee.js"),i=r("./node_modules/lodash/_baseMap.js"),s=r("./node_modules/lodash/isArray.js");e.exports=function(e,t){return(s(e)?n:i)(e,o(t,3))}},"./node_modules/lodash/memoize.js":(e,t,r)=>{var n=r("./node_modules/lodash/_MapCache.js");function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(o.Cache||n),r}o.Cache=n,e.exports=o},"./node_modules/lodash/padEnd.js":(e,t,r)=>{var n=r("./node_modules/lodash/_createPadding.js"),o=r("./node_modules/lodash/_stringSize.js"),i=r("./node_modules/lodash/toInteger.js"),s=r("./node_modules/lodash/toString.js");e.exports=function(e,t,r){e=s(e);var a=(t=i(t))?o(e):0;return t&&a<t?e+n(t-a,r):e}},"./node_modules/lodash/property.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseProperty.js"),o=r("./node_modules/lodash/_basePropertyDeep.js"),i=r("./node_modules/lodash/_isKey.js"),s=r("./node_modules/lodash/_toKey.js");e.exports=function(e){return i(e)?n(s(e)):o(e)}},"./node_modules/lodash/stubArray.js":e=>{e.exports=function(){return[]}},"./node_modules/lodash/stubFalse.js":e=>{e.exports=function(){return!1}},"./node_modules/lodash/times.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseTimes.js"),o=r("./node_modules/lodash/_castFunction.js"),i=r("./node_modules/lodash/toInteger.js"),s=4294967295,a=Math.min;e.exports=function(e,t){if((e=i(e))<1||e>9007199254740991)return[];var r=s,u=a(e,s);t=o(t),e-=s;for(var l=n(u,t);++r<e;)t(r);return l}},"./node_modules/lodash/toFinite.js":(e,t,r)=>{var n=r("./node_modules/lodash/toNumber.js"),o=1/0;e.exports=function(e){return e?(e=n(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},"./node_modules/lodash/toInteger.js":(e,t,r)=>{var n=r("./node_modules/lodash/toFinite.js");e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},"./node_modules/lodash/toNumber.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseTrim.js"),o=r("./node_modules/lodash/isObject.js"),i=r("./node_modules/lodash/isSymbol.js"),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=a.test(e);return r||u.test(e)?l(e.slice(2),r?2:8):s.test(e)?NaN:+e}},"./node_modules/lodash/toString.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseToString.js");e.exports=function(e){return null==e?"":n(e)}},"./node_modules/lodash/trimEnd.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseToString.js"),o=r("./node_modules/lodash/_castSlice.js"),i=r("./node_modules/lodash/_charsEndIndex.js"),s=r("./node_modules/lodash/_stringToArray.js"),a=r("./node_modules/lodash/toString.js"),u=r("./node_modules/lodash/_trimmedEndIndex.js");e.exports=function(e,t,r){if((e=a(e))&&(r||void 0===t))return e.slice(0,u(e)+1);if(!e||!(t=n(t)))return e;var l=s(e),c=i(l,s(t))+1;return o(l,0,c).join("")}},"./node_modules/lodash/values.js":(e,t,r)=>{var n=r("./node_modules/lodash/_baseValues.js"),o=r("./node_modules/lodash/keys.js");e.exports=function(e){return null==e?[]:n(e,o(e))}},"./node_modules/long/dist/Long.js":function(e,t){var r,n,o;n=[],void 0===(o="function"==typeof(r=function(){"use strict";function e(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}e.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),e.isLong=function(e){return!0===(e&&e.__isLong__)};var t={},r={};e.fromInt=function(n,o){var i,s;return o?0<=(n>>>=0)&&n<256&&(s=r[n])?s:(i=new e(n,(0|n)<0?-1:0,!0),0<=n&&n<256&&(r[n]=i),i):-128<=(n|=0)&&n<128&&(s=t[n])?s:(i=new e(n,n<0?-1:0,!1),-128<=n&&n<128&&(t[n]=i),i)},e.fromNumber=function(t,r){return r=!!r,isNaN(t)||!isFinite(t)?e.ZERO:!r&&t<=-a?e.MIN_VALUE:!r&&t+1>=a?e.MAX_VALUE:r&&t>=s?e.MAX_UNSIGNED_VALUE:t<0?e.fromNumber(-t,r).negate():new e(t%i|0,t/i|0,r)},e.fromBits=function(t,r,n){return new e(t,r,n)},e.fromString=function(t,r,n){if(0===t.length)throw Error("number format error: empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e.ZERO;if("number"==typeof r&&(n=r,r=!1),(n=n||10)<2||36<n)throw Error("radix out of range: "+n);var o;if((o=t.indexOf("-"))>0)throw Error('number format error: interior "-" character: '+t);if(0===o)return e.fromString(t.substring(1),r,n).negate();for(var i=e.fromNumber(Math.pow(n,8)),s=e.ZERO,a=0;a<t.length;a+=8){var u=Math.min(8,t.length-a),l=parseInt(t.substring(a,a+u),n);if(u<8){var c=e.fromNumber(Math.pow(n,u));s=s.multiply(c).add(e.fromNumber(l))}else s=(s=s.multiply(i)).add(e.fromNumber(l))}return s.unsigned=r,s},e.fromValue=function(t){return t instanceof e?t:"number"==typeof t?e.fromNumber(t):"string"==typeof t?e.fromString(t):new e(t.low,t.high,t.unsigned)};var n=65536,o=1<<24,i=n*n,s=i*i,a=s/2,u=e.fromInt(o);return e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*i+(this.low>>>0):this.high*i+(this.low>>>0)},e.prototype.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix out of range: "+t);if(this.isZero())return"0";var r;if(this.isNegative()){if(this.equals(e.MIN_VALUE)){var n=e.fromNumber(t),o=this.divide(n);return r=o.multiply(n).subtract(this),o.toString(t)+r.toInt().toString(t)}return"-"+this.negate().toString(t)}var i=e.fromNumber(Math.pow(t,6),this.unsigned);r=this;for(var s="";;){var a=r.divide(i),u=(r.subtract(a.multiply(i)).toInt()>>>0).toString(t);if((r=a).isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(e.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,r=31;r>0&&0==(t&1<<r);r--);return 0!=this.high?r+33:r+1},e.prototype.isZero=function(){return 0===this.high&&0===this.low},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isOdd=function(){return 1==(1&this.low)},e.prototype.isEven=function(){return 0==(1&this.low)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},e.eq=e.prototype.equals,e.prototype.notEquals=function(e){return!this.equals(e)},e.neq=e.prototype.notEquals,e.prototype.lessThan=function(e){return this.compare(e)<0},e.prototype.lt=e.prototype.lessThan,e.prototype.lessThanOrEqual=function(e){return this.compare(e)<=0},e.prototype.lte=e.prototype.lessThanOrEqual,e.prototype.greaterThan=function(e){return this.compare(e)>0},e.prototype.gt=e.prototype.greaterThan,e.prototype.greaterThanOrEqual=function(e){return this.compare(e)>=0},e.prototype.gte=e.prototype.greaterThanOrEqual,e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.equals(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.subtract(t).isNegative()?-1:1},e.prototype.negate=function(){return!this.unsigned&&this.equals(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=e.prototype.negate,e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var r=this.high>>>16,n=65535&this.high,o=this.low>>>16,i=65535&this.low,s=t.high>>>16,a=65535&t.high,u=t.low>>>16,l=0,c=0,d=0,h=0;return d+=(h+=i+(65535&t.low))>>>16,h&=65535,c+=(d+=o+u)>>>16,d&=65535,l+=(c+=n+a)>>>16,c&=65535,l+=r+s,l&=65535,e.fromBits(d<<16|h,l<<16|c,this.unsigned)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.negate())},e.prototype.sub=e.prototype.subtract,e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())return e.ZERO;if(this.equals(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.equals(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.negate().multiply(t.negate()):this.negate().multiply(t).negate();if(t.isNegative())return this.multiply(t.negate()).negate();if(this.lessThan(u)&&t.lessThan(u))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,n=65535&this.high,o=this.low>>>16,i=65535&this.low,s=t.high>>>16,a=65535&t.high,l=t.low>>>16,c=65535&t.low,d=0,h=0,f=0,p=0;return f+=(p+=i*c)>>>16,p&=65535,h+=(f+=o*c)>>>16,f&=65535,h+=(f+=i*l)>>>16,f&=65535,d+=(h+=n*c)>>>16,h&=65535,d+=(h+=o*l)>>>16,h&=65535,d+=(h+=i*a)>>>16,h&=65535,d+=r*c+n*l+o*a+i*s,d&=65535,e.fromBits(f<<16|p,d<<16|h,this.unsigned)},e.prototype.mul=e.prototype.multiply,e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw new Error("division by zero");if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var r,n,o;if(this.equals(e.MIN_VALUE))return t.equals(e.ONE)||t.equals(e.NEG_ONE)?e.MIN_VALUE:t.equals(e.MIN_VALUE)?e.ONE:(r=this.shiftRight(1).divide(t).shiftLeft(1)).equals(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(n=this.subtract(t.multiply(r)),o=r.add(n.divide(t)));if(t.equals(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.negate().divide(t.negate()):this.negate().divide(t).negate();if(t.isNegative())return this.divide(t.negate()).negate();for(o=e.ZERO,n=this;n.greaterThanOrEqual(t);){r=Math.max(1,Math.floor(n.toNumber()/t.toNumber()));for(var i=Math.ceil(Math.log(r)/Math.LN2),s=i<=48?1:Math.pow(2,i-48),a=e.fromNumber(r),u=a.multiply(t);u.isNegative()||u.greaterThan(n);)r-=s,u=(a=e.fromNumber(r,this.unsigned)).multiply(t);a.isZero()&&(a=e.ONE),o=o.add(a),n=n.subtract(u)}return o},e.prototype.div=e.prototype.divide,e.prototype.modulo=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.subtract(this.divide(t).multiply(t))},e.prototype.mod=e.prototype.modulo,e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):e.fromBits(0,this.low<<t-32,this.unsigned)},e.prototype.shl=e.prototype.shiftLeft,e.prototype.shiftRight=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=e.prototype.shiftRight,e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),0==(t&=63))return this;var r=this.high;if(t<32){var n=this.low;return e.fromBits(n>>>t|r<<32-t,r>>>t,this.unsigned)}return 32===t?e.fromBits(r,0,this.unsigned):e.fromBits(r>>>t-32,0,this.unsigned)},e.prototype.shru=e.prototype.shiftRightUnsigned,e.prototype.toSigned=function(){return this.unsigned?new e(this.low,this.high,!1):this},e.prototype.toUnsigned=function(){return this.unsigned?this:new e(this.low,this.high,!0)},e})?r.apply(t,n):r)||(e.exports=o)},"./node_modules/moment/moment.js":function(e,t,r){(e=r.nmd(e)).exports=function(){"use strict";var t,r;function n(){return t.apply(null,arguments)}function o(e){t=e}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(a(e,t))return!1;return!0}function l(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function h(e,t){var r,n=[];for(r=0;r<e.length;++r)n.push(t(e[r],r));return n}function f(e,t){for(var r in t)a(t,r)&&(e[r]=t[r]);return a(t,"toString")&&(e.toString=t.toString),a(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,r,n){return Wr(e,t,r,n,!0).utc()}function _(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function m(e){return null==e._pf&&(e._pf=_()),e._pf}function y(e){if(null==e._isValid){var t=m(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),o=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return o;e._isValid=o}return e._isValid}function v(e){var t=p(NaN);return null!=e?f(m(t),e):m(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){var t,r=Object(this),n=r.length>>>0;for(t=0;t<n;t++)if(t in r&&e.call(this,r[t],t,r))return!0;return!1};var g=n.momentProperties=[],b=!1;function w(e,t){var r,n,o;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=m(t)),l(t._locale)||(e._locale=t._locale),g.length>0)for(r=0;r<g.length;r++)l(o=t[n=g[r]])||(e[n]=o);return e}function j(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,n.updateOffset(this),b=!1)}function k(e){return e instanceof j||null!=e&&null!=e._isAMomentObject}function S(e){!1===n.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function x(e,t){var r=!0;return f((function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,e),r){var o,i,s,u=[];for(i=0;i<arguments.length;i++){if(o="","object"==typeof arguments[i]){for(s in o+="\n["+i+"] ",arguments[0])a(arguments[0],s)&&(o+=s+": "+arguments[0][s]+", ");o=o.slice(0,-2)}else o=arguments[i];u.push(o)}S(e+"\nArguments: "+Array.prototype.slice.call(u).join("")+"\n"+(new Error).stack),r=!1}return t.apply(this,arguments)}),t)}var T,A={};function E(e,t){null!=n.deprecationHandler&&n.deprecationHandler(e,t),A[e]||(S(t),A[e]=!0)}function O(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function R(e){var t,r;for(r in e)a(e,r)&&(O(t=e[r])?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function C(e,t){var r,n=f({},e);for(r in t)a(t,r)&&(s(e[r])&&s(t[r])?(n[r]={},f(n[r],e[r]),f(n[r],t[r])):null!=t[r]?n[r]=t[r]:delete n[r]);for(r in e)a(e,r)&&!a(t,r)&&s(e[r])&&(n[r]=f({},n[r]));return n}function P(e){null!=e&&this.set(e)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null,T=Object.keys?Object.keys:function(e){var t,r=[];for(t in e)a(e,t)&&r.push(t);return r};var M={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function I(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return O(n)?n.call(t,r):n}function N(e,t,r){var n=""+Math.abs(e),o=t-n.length;return(e>=0?r?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+n}var L=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,B=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,D={},F={};function U(e,t,r,n){var o=n;"string"==typeof n&&(o=function(){return this[n]()}),e&&(F[e]=o),t&&(F[t[0]]=function(){return N(o.apply(this,arguments),t[1],t[2])}),r&&(F[r]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function H(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function q(e){var t,r,n=e.match(L);for(t=0,r=n.length;t<r;t++)F[n[t]]?n[t]=F[n[t]]:n[t]=H(n[t]);return function(t){var o,i="";for(o=0;o<r;o++)i+=O(n[o])?n[o].call(t,e):n[o];return i}}function V(e,t){return e.isValid()?(t=K(t,e.localeData()),D[t]=D[t]||q(t),D[t](e)):e.localeData().invalidDate()}function K(e,t){var r=5;function n(e){return t.longDateFormat(e)||e}for(B.lastIndex=0;r>=0&&B.test(e);)e=e.replace(B,n),B.lastIndex=0,r-=1;return e}var Y={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function W(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(L).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var X="Invalid date";function z(){return this._invalidDate}var G="%d",$=/\d{1,2}/;function Z(e){return this._ordinal.replace("%d",e)}var Q={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function J(e,t,r,n){var o=this._relativeTime[r];return O(o)?o(e,t,r,n):o.replace(/%d/i,e)}function ee(e,t){var r=this._relativeTime[e>0?"future":"past"];return O(r)?r(t):r.replace(/%s/i,t)}var te={};function re(e,t){var r=e.toLowerCase();te[r]=te[r+"s"]=te[t]=e}function ne(e){return"string"==typeof e?te[e]||te[e.toLowerCase()]:void 0}function oe(e){var t,r,n={};for(r in e)a(e,r)&&(t=ne(r))&&(n[t]=e[r]);return n}var ie={};function se(e,t){ie[e]=t}function ae(e){var t,r=[];for(t in e)a(e,t)&&r.push({unit:t,priority:ie[t]});return r.sort((function(e,t){return e.priority-t.priority})),r}function ue(e){return e%4==0&&e%100!=0||e%400==0}function le(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ce(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=le(t)),r}function de(e,t){return function(r){return null!=r?(fe(this,e,r),n.updateOffset(this,t),this):he(this,e)}}function he(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function fe(e,t,r){e.isValid()&&!isNaN(r)&&("FullYear"===t&&ue(e.year())&&1===e.month()&&29===e.date()?(r=ce(r),e._d["set"+(e._isUTC?"UTC":"")+t](r,e.month(),Je(r,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](r))}function pe(e){return O(this[e=ne(e)])?this[e]():this}function _e(e,t){if("object"==typeof e){var r,n=ae(e=oe(e));for(r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit])}else if(O(this[e=ne(e)]))return this[e](t);return this}var me,ye=/\d/,ve=/\d\d/,ge=/\d{3}/,be=/\d{4}/,we=/[+-]?\d{6}/,je=/\d\d?/,ke=/\d\d\d\d?/,Se=/\d\d\d\d\d\d?/,xe=/\d{1,3}/,Te=/\d{1,4}/,Ae=/[+-]?\d{1,6}/,Ee=/\d+/,Oe=/[+-]?\d+/,Re=/Z|[+-]\d\d:?\d\d/gi,Ce=/Z|[+-]\d\d(?::?\d\d)?/gi,Pe=/[+-]?\d+(\.\d{1,3})?/,Me=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function Ie(e,t,r){me[e]=O(t)?t:function(e,n){return e&&r?r:t}}function Ne(e,t){return a(me,e)?me[e](t._strict,t._locale):new RegExp(Le(e))}function Le(e){return Be(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,r,n,o){return t||r||n||o})))}function Be(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}me={};var De={};function Fe(e,t){var r,n=t;for("string"==typeof e&&(e=[e]),c(t)&&(n=function(e,r){r[t]=ce(e)}),r=0;r<e.length;r++)De[e[r]]=n}function Ue(e,t){Fe(e,(function(e,r,n,o){n._w=n._w||{},t(e,n._w,n,o)}))}function He(e,t,r){null!=t&&a(De,e)&&De[e](t,r._a,r,e)}var qe,Ve=0,Ke=1,Ye=2,We=3,Xe=4,ze=5,Ge=6,$e=7,Ze=8;function Qe(e,t){return(e%t+t)%t}function Je(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=Qe(t,12);return e+=(t-r)/12,1===r?ue(e)?29:28:31-r%7%2}qe=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},U("M",["MM",2],"Mo",(function(){return this.month()+1})),U("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),U("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),re("month","M"),se("month",8),Ie("M",je),Ie("MM",je,ve),Ie("MMM",(function(e,t){return t.monthsShortRegex(e)})),Ie("MMMM",(function(e,t){return t.monthsRegex(e)})),Fe(["M","MM"],(function(e,t){t[Ke]=ce(e)-1})),Fe(["MMM","MMMM"],(function(e,t,r,n){var o=r._locale.monthsParse(e,n,r._strict);null!=o?t[Ke]=o:m(r).invalidMonth=e}));var et="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),tt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),rt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,nt=Me,ot=Me;function it(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||rt).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone}function st(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[rt.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function at(e,t,r){var n,o,i,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)i=p([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(i,"").toLocaleLowerCase();return r?"MMM"===t?-1!==(o=qe.call(this._shortMonthsParse,s))?o:null:-1!==(o=qe.call(this._longMonthsParse,s))?o:null:"MMM"===t?-1!==(o=qe.call(this._shortMonthsParse,s))||-1!==(o=qe.call(this._longMonthsParse,s))?o:null:-1!==(o=qe.call(this._longMonthsParse,s))||-1!==(o=qe.call(this._shortMonthsParse,s))?o:null}function ut(e,t,r){var n,o,i;if(this._monthsParseExact)return at.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(o=p([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),r||this._monthsParse[n]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[n]=new RegExp(i.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(r&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function lt(e,t){var r;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=ce(t);else if(!c(t=e.localeData().monthsParse(t)))return e;return r=Math.min(e.date(),Je(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,r),e}function ct(e){return null!=e?(lt(this,e),n.updateOffset(this,!0),this):he(this,"Month")}function dt(){return Je(this.year(),this.month())}function ht(e){return this._monthsParseExact?(a(this,"_monthsRegex")||pt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=nt),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function ft(e){return this._monthsParseExact?(a(this,"_monthsRegex")||pt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=ot),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function pt(){function e(e,t){return t.length-e.length}var t,r,n=[],o=[],i=[];for(t=0;t<12;t++)r=p([2e3,t]),n.push(this.monthsShort(r,"")),o.push(this.months(r,"")),i.push(this.months(r,"")),i.push(this.monthsShort(r,""));for(n.sort(e),o.sort(e),i.sort(e),t=0;t<12;t++)n[t]=Be(n[t]),o[t]=Be(o[t]);for(t=0;t<24;t++)i[t]=Be(i[t]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function _t(e){return ue(e)?366:365}U("Y",0,0,(function(){var e=this.year();return e<=9999?N(e,4):"+"+e})),U(0,["YY",2],0,(function(){return this.year()%100})),U(0,["YYYY",4],0,"year"),U(0,["YYYYY",5],0,"year"),U(0,["YYYYYY",6,!0],0,"year"),re("year","y"),se("year",1),Ie("Y",Oe),Ie("YY",je,ve),Ie("YYYY",Te,be),Ie("YYYYY",Ae,we),Ie("YYYYYY",Ae,we),Fe(["YYYYY","YYYYYY"],Ve),Fe("YYYY",(function(e,t){t[Ve]=2===e.length?n.parseTwoDigitYear(e):ce(e)})),Fe("YY",(function(e,t){t[Ve]=n.parseTwoDigitYear(e)})),Fe("Y",(function(e,t){t[Ve]=parseInt(e,10)})),n.parseTwoDigitYear=function(e){return ce(e)+(ce(e)>68?1900:2e3)};var mt=de("FullYear",!0);function yt(){return ue(this.year())}function vt(e,t,r,n,o,i,s){var a;return e<100&&e>=0?(a=new Date(e+400,t,r,n,o,i,s),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,r,n,o,i,s),a}function gt(e){var t,r;return e<100&&e>=0?((r=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function bt(e,t,r){var n=7+t-r;return-(7+gt(e,0,n).getUTCDay()-t)%7+n-1}function wt(e,t,r,n,o){var i,s,a=1+7*(t-1)+(7+r-n)%7+bt(e,n,o);return a<=0?s=_t(i=e-1)+a:a>_t(e)?(i=e+1,s=a-_t(e)):(i=e,s=a),{year:i,dayOfYear:s}}function jt(e,t,r){var n,o,i=bt(e.year(),t,r),s=Math.floor((e.dayOfYear()-i-1)/7)+1;return s<1?n=s+kt(o=e.year()-1,t,r):s>kt(e.year(),t,r)?(n=s-kt(e.year(),t,r),o=e.year()+1):(o=e.year(),n=s),{week:n,year:o}}function kt(e,t,r){var n=bt(e,t,r),o=bt(e+1,t,r);return(_t(e)-n+o)/7}function St(e){return jt(e,this._week.dow,this._week.doy).week}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),re("week","w"),re("isoWeek","W"),se("week",5),se("isoWeek",5),Ie("w",je),Ie("ww",je,ve),Ie("W",je),Ie("WW",je,ve),Ue(["w","ww","W","WW"],(function(e,t,r,n){t[n.substr(0,1)]=ce(e)}));var xt={dow:0,doy:6};function Tt(){return this._week.dow}function At(){return this._week.doy}function Et(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Ot(e){var t=jt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Rt(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Ct(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Pt(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("d",0,"do","day"),U("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),U("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),U("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),re("day","d"),re("weekday","e"),re("isoWeekday","E"),se("day",11),se("weekday",11),se("isoWeekday",11),Ie("d",je),Ie("e",je),Ie("E",je),Ie("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Ie("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Ie("dddd",(function(e,t){return t.weekdaysRegex(e)})),Ue(["dd","ddd","dddd"],(function(e,t,r,n){var o=r._locale.weekdaysParse(e,n,r._strict);null!=o?t.d=o:m(r).invalidWeekday=e})),Ue(["d","e","E"],(function(e,t,r,n){t[n]=ce(e)}));var Mt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),It="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Nt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Lt=Me,Bt=Me,Dt=Me;function Ft(e,t){var r=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Pt(r,this._week.dow):e?r[e.day()]:r}function Ut(e){return!0===e?Pt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ht(e){return!0===e?Pt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function qt(e,t,r){var n,o,i,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)i=p([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(i,"").toLocaleLowerCase();return r?"dddd"===t?-1!==(o=qe.call(this._weekdaysParse,s))?o:null:"ddd"===t?-1!==(o=qe.call(this._shortWeekdaysParse,s))?o:null:-1!==(o=qe.call(this._minWeekdaysParse,s))?o:null:"dddd"===t?-1!==(o=qe.call(this._weekdaysParse,s))||-1!==(o=qe.call(this._shortWeekdaysParse,s))||-1!==(o=qe.call(this._minWeekdaysParse,s))?o:null:"ddd"===t?-1!==(o=qe.call(this._shortWeekdaysParse,s))||-1!==(o=qe.call(this._weekdaysParse,s))||-1!==(o=qe.call(this._minWeekdaysParse,s))?o:null:-1!==(o=qe.call(this._minWeekdaysParse,s))||-1!==(o=qe.call(this._weekdaysParse,s))||-1!==(o=qe.call(this._shortWeekdaysParse,s))?o:null}function Vt(e,t,r){var n,o,i;if(this._weekdaysParseExact)return qt.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(o=p([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[n]=new RegExp(i.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function Kt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Rt(e,this.localeData()),this.add(e-t,"d")):t}function Yt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Wt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Ct(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Xt(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Lt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function zt(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Bt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Gt(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Dt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function $t(){function e(e,t){return t.length-e.length}var t,r,n,o,i,s=[],a=[],u=[],l=[];for(t=0;t<7;t++)r=p([2e3,1]).day(t),n=Be(this.weekdaysMin(r,"")),o=Be(this.weekdaysShort(r,"")),i=Be(this.weekdays(r,"")),s.push(n),a.push(o),u.push(i),l.push(n),l.push(o),l.push(i);s.sort(e),a.sort(e),u.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Zt(){return this.hours()%12||12}function Qt(){return this.hours()||24}function Jt(e,t){U(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function er(e,t){return t._meridiemParse}function tr(e){return"p"===(e+"").toLowerCase().charAt(0)}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,Zt),U("k",["kk",2],0,Qt),U("hmm",0,0,(function(){return""+Zt.apply(this)+N(this.minutes(),2)})),U("hmmss",0,0,(function(){return""+Zt.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)})),U("Hmm",0,0,(function(){return""+this.hours()+N(this.minutes(),2)})),U("Hmmss",0,0,(function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)})),Jt("a",!0),Jt("A",!1),re("hour","h"),se("hour",13),Ie("a",er),Ie("A",er),Ie("H",je),Ie("h",je),Ie("k",je),Ie("HH",je,ve),Ie("hh",je,ve),Ie("kk",je,ve),Ie("hmm",ke),Ie("hmmss",Se),Ie("Hmm",ke),Ie("Hmmss",Se),Fe(["H","HH"],We),Fe(["k","kk"],(function(e,t,r){var n=ce(e);t[We]=24===n?0:n})),Fe(["a","A"],(function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e})),Fe(["h","hh"],(function(e,t,r){t[We]=ce(e),m(r).bigHour=!0})),Fe("hmm",(function(e,t,r){var n=e.length-2;t[We]=ce(e.substr(0,n)),t[Xe]=ce(e.substr(n)),m(r).bigHour=!0})),Fe("hmmss",(function(e,t,r){var n=e.length-4,o=e.length-2;t[We]=ce(e.substr(0,n)),t[Xe]=ce(e.substr(n,2)),t[ze]=ce(e.substr(o)),m(r).bigHour=!0})),Fe("Hmm",(function(e,t,r){var n=e.length-2;t[We]=ce(e.substr(0,n)),t[Xe]=ce(e.substr(n))})),Fe("Hmmss",(function(e,t,r){var n=e.length-4,o=e.length-2;t[We]=ce(e.substr(0,n)),t[Xe]=ce(e.substr(n,2)),t[ze]=ce(e.substr(o))}));var rr=/[ap]\.?m?\.?/i,nr=de("Hours",!0);function or(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var ir,sr={calendar:M,longDateFormat:Y,invalidDate:X,ordinal:G,dayOfMonthOrdinalParse:$,relativeTime:Q,months:et,monthsShort:tt,week:xt,weekdays:Mt,weekdaysMin:Nt,weekdaysShort:It,meridiemParse:rr},ar={},ur={};function lr(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function cr(e){return e?e.toLowerCase().replace("_","-"):e}function dr(e){for(var t,r,n,o,i=0;i<e.length;){for(t=(o=cr(e[i]).split("-")).length,r=(r=cr(e[i+1]))?r.split("-"):null;t>0;){if(n=hr(o.slice(0,t).join("-")))return n;if(r&&r.length>=t&&lr(o,r)>=t-1)break;t--}i++}return ir}function hr(t){var r=null;if(void 0===ar[t]&&e&&e.exports)try{r=ir._abbr,Object(function(){var e=new Error("Cannot find module 'undefined'");throw e.code="MODULE_NOT_FOUND",e}()),fr(r)}catch(e){ar[t]=null}return ar[t]}function fr(e,t){var r;return e&&((r=l(t)?mr(e):pr(e,t))?ir=r:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ir._abbr}function pr(e,t){if(null!==t){var r,n=sr;if(t.abbr=e,null!=ar[e])E("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=ar[e]._config;else if(null!=t.parentLocale)if(null!=ar[t.parentLocale])n=ar[t.parentLocale]._config;else{if(null==(r=hr(t.parentLocale)))return ur[t.parentLocale]||(ur[t.parentLocale]=[]),ur[t.parentLocale].push({name:e,config:t}),null;n=r._config}return ar[e]=new P(C(n,t)),ur[e]&&ur[e].forEach((function(e){pr(e.name,e.config)})),fr(e),ar[e]}return delete ar[e],null}function _r(e,t){if(null!=t){var r,n,o=sr;null!=ar[e]&&null!=ar[e].parentLocale?ar[e].set(C(ar[e]._config,t)):(null!=(n=hr(e))&&(o=n._config),t=C(o,t),null==n&&(t.abbr=e),(r=new P(t)).parentLocale=ar[e],ar[e]=r),fr(e)}else null!=ar[e]&&(null!=ar[e].parentLocale?(ar[e]=ar[e].parentLocale,e===fr()&&fr(e)):null!=ar[e]&&delete ar[e]);return ar[e]}function mr(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ir;if(!i(e)){if(t=hr(e))return t;e=[e]}return dr(e)}function yr(){return T(ar)}function vr(e){var t,r=e._a;return r&&-2===m(e).overflow&&(t=r[Ke]<0||r[Ke]>11?Ke:r[Ye]<1||r[Ye]>Je(r[Ve],r[Ke])?Ye:r[We]<0||r[We]>24||24===r[We]&&(0!==r[Xe]||0!==r[ze]||0!==r[Ge])?We:r[Xe]<0||r[Xe]>59?Xe:r[ze]<0||r[ze]>59?ze:r[Ge]<0||r[Ge]>999?Ge:-1,m(e)._overflowDayOfYear&&(t<Ve||t>Ye)&&(t=Ye),m(e)._overflowWeeks&&-1===t&&(t=$e),m(e)._overflowWeekday&&-1===t&&(t=Ze),m(e).overflow=t),e}var gr=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,br=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wr=/Z|[+-]\d\d(?::?\d\d)?/,jr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],kr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Sr=/^\/?Date\((-?\d+)/i,xr=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Tr={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ar(e){var t,r,n,o,i,s,a=e._i,u=gr.exec(a)||br.exec(a);if(u){for(m(e).iso=!0,t=0,r=jr.length;t<r;t++)if(jr[t][1].exec(u[1])){o=jr[t][0],n=!1!==jr[t][2];break}if(null==o)return void(e._isValid=!1);if(u[3]){for(t=0,r=kr.length;t<r;t++)if(kr[t][1].exec(u[3])){i=(u[2]||" ")+kr[t][0];break}if(null==i)return void(e._isValid=!1)}if(!n&&null!=i)return void(e._isValid=!1);if(u[4]){if(!wr.exec(u[4]))return void(e._isValid=!1);s="Z"}e._f=o+(i||"")+(s||""),Fr(e)}else e._isValid=!1}function Er(e,t,r,n,o,i){var s=[Or(e),tt.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(o,10)];return i&&s.push(parseInt(i,10)),s}function Or(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Rr(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Cr(e,t,r){return!e||It.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(r).weekdayMismatch=!0,r._isValid=!1,!1)}function Pr(e,t,r){if(e)return Tr[e];if(t)return 0;var n=parseInt(r,10),o=n%100;return(n-o)/100*60+o}function Mr(e){var t,r=xr.exec(Rr(e._i));if(r){if(t=Er(r[4],r[3],r[2],r[5],r[6],r[7]),!Cr(r[1],t,e))return;e._a=t,e._tzm=Pr(r[8],r[9],r[10]),e._d=gt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function Ir(e){var t=Sr.exec(e._i);null===t?(Ar(e),!1===e._isValid&&(delete e._isValid,Mr(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:n.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Nr(e,t,r){return null!=e?e:null!=t?t:r}function Lr(e){var t=new Date(n.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Br(e){var t,r,n,o,i,s=[];if(!e._d){for(n=Lr(e),e._w&&null==e._a[Ye]&&null==e._a[Ke]&&Dr(e),null!=e._dayOfYear&&(i=Nr(e._a[Ve],n[Ve]),(e._dayOfYear>_t(i)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),r=gt(i,0,e._dayOfYear),e._a[Ke]=r.getUTCMonth(),e._a[Ye]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=n[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[We]&&0===e._a[Xe]&&0===e._a[ze]&&0===e._a[Ge]&&(e._nextDay=!0,e._a[We]=0),e._d=(e._useUTC?gt:vt).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[We]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(m(e).weekdayMismatch=!0)}}function Dr(e){var t,r,n,o,i,s,a,u,l;null!=(t=e._w).GG||null!=t.W||null!=t.E?(i=1,s=4,r=Nr(t.GG,e._a[Ve],jt(Xr(),1,4).year),n=Nr(t.W,1),((o=Nr(t.E,1))<1||o>7)&&(u=!0)):(i=e._locale._week.dow,s=e._locale._week.doy,l=jt(Xr(),i,s),r=Nr(t.gg,e._a[Ve],l.year),n=Nr(t.w,l.week),null!=t.d?((o=t.d)<0||o>6)&&(u=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(u=!0)):o=i),n<1||n>kt(r,i,s)?m(e)._overflowWeeks=!0:null!=u?m(e)._overflowWeekday=!0:(a=wt(r,n,o,i,s),e._a[Ve]=a.year,e._dayOfYear=a.dayOfYear)}function Fr(e){if(e._f!==n.ISO_8601)if(e._f!==n.RFC_2822){e._a=[],m(e).empty=!0;var t,r,o,i,s,a,u=""+e._i,l=u.length,c=0;for(o=K(e._f,e._locale).match(L)||[],t=0;t<o.length;t++)i=o[t],(r=(u.match(Ne(i,e))||[])[0])&&((s=u.substr(0,u.indexOf(r))).length>0&&m(e).unusedInput.push(s),u=u.slice(u.indexOf(r)+r.length),c+=r.length),F[i]?(r?m(e).empty=!1:m(e).unusedTokens.push(i),He(i,r,e)):e._strict&&!r&&m(e).unusedTokens.push(i);m(e).charsLeftOver=l-c,u.length>0&&m(e).unusedInput.push(u),e._a[We]<=12&&!0===m(e).bigHour&&e._a[We]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[We]=Ur(e._locale,e._a[We],e._meridiem),null!==(a=m(e).era)&&(e._a[Ve]=e._locale.erasConvertYear(a,e._a[Ve])),Br(e),vr(e)}else Mr(e);else Ar(e)}function Ur(e,t,r){var n;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?((n=e.isPM(r))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}function Hr(e){var t,r,n,o,i,s,a=!1;if(0===e._f.length)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<e._f.length;o++)i=0,s=!1,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],Fr(t),y(t)&&(s=!0),i+=m(t).charsLeftOver,i+=10*m(t).unusedTokens.length,m(t).score=i,a?i<n&&(n=i,r=t):(null==n||i<n||s)&&(n=i,r=t,s&&(a=!0));f(e,r||t)}function qr(e){if(!e._d){var t=oe(e._i),r=void 0===t.day?t.date:t.day;e._a=h([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Br(e)}}function Vr(e){var t=new j(vr(Kr(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Kr(e){var t=e._i,r=e._f;return e._locale=e._locale||mr(e._l),null===t||void 0===r&&""===t?v({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),k(t)?new j(vr(t)):(d(t)?e._d=t:i(r)?Hr(e):r?Fr(e):Yr(e),y(e)||(e._d=null),e))}function Yr(e){var t=e._i;l(t)?e._d=new Date(n.now()):d(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Ir(e):i(t)?(e._a=h(t.slice(0),(function(e){return parseInt(e,10)})),Br(e)):s(t)?qr(e):c(t)?e._d=new Date(t):n.createFromInputFallback(e)}function Wr(e,t,r,n,o){var a={};return!0!==t&&!1!==t||(n=t,t=void 0),!0!==r&&!1!==r||(n=r,r=void 0),(s(e)&&u(e)||i(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=o,a._l=r,a._i=e,a._f=t,a._strict=n,Vr(a)}function Xr(e,t,r,n){return Wr(e,t,r,n,!1)}n.createFromInputFallback=x("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),n.ISO_8601=function(){},n.RFC_2822=function(){};var zr=x("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Xr.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()})),Gr=x("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Xr.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:v()}));function $r(e,t){var r,n;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Xr();for(r=t[0],n=1;n<t.length;++n)t[n].isValid()&&!t[n][e](r)||(r=t[n]);return r}function Zr(){return $r("isBefore",[].slice.call(arguments,0))}function Qr(){return $r("isAfter",[].slice.call(arguments,0))}var Jr=function(){return Date.now?Date.now():+new Date},en=["year","quarter","month","week","day","hour","minute","second","millisecond"];function tn(e){var t,r,n=!1;for(t in e)if(a(e,t)&&(-1===qe.call(en,t)||null!=e[t]&&isNaN(e[t])))return!1;for(r=0;r<en.length;++r)if(e[en[r]]){if(n)return!1;parseFloat(e[en[r]])!==ce(e[en[r]])&&(n=!0)}return!0}function rn(){return this._isValid}function nn(){return An(NaN)}function on(e){var t=oe(e),r=t.year||0,n=t.quarter||0,o=t.month||0,i=t.week||t.isoWeek||0,s=t.day||0,a=t.hour||0,u=t.minute||0,l=t.second||0,c=t.millisecond||0;this._isValid=tn(t),this._milliseconds=+c+1e3*l+6e4*u+1e3*a*60*60,this._days=+s+7*i,this._months=+o+3*n+12*r,this._data={},this._locale=mr(),this._bubble()}function sn(e){return e instanceof on}function an(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function un(e,t,r){var n,o=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0;for(n=0;n<o;n++)(r&&e[n]!==t[n]||!r&&ce(e[n])!==ce(t[n]))&&s++;return s+i}function ln(e,t){U(e,0,0,(function(){var e=this.utcOffset(),r="+";return e<0&&(e=-e,r="-"),r+N(~~(e/60),2)+t+N(~~e%60,2)}))}ln("Z",":"),ln("ZZ",""),Ie("Z",Ce),Ie("ZZ",Ce),Fe(["Z","ZZ"],(function(e,t,r){r._useUTC=!0,r._tzm=dn(Ce,e)}));var cn=/([\+\-]|\d\d)/gi;function dn(e,t){var r,n,o=(t||"").match(e);return null===o?null:0===(n=60*(r=((o[o.length-1]||[])+"").match(cn)||["-",0,0])[1]+ce(r[2]))?0:"+"===r[0]?n:-n}function hn(e,t){var r,o;return t._isUTC?(r=t.clone(),o=(k(e)||d(e)?e.valueOf():Xr(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+o),n.updateOffset(r,!1),r):Xr(e).local()}function fn(e){return-Math.round(e._d.getTimezoneOffset())}function pn(e,t,r){var o,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=dn(Ce,e)))return this}else Math.abs(e)<16&&!r&&(e*=60);return!this._isUTC&&t&&(o=fn(this)),this._offset=e,this._isUTC=!0,null!=o&&this.add(o,"m"),i!==e&&(!t||this._changeInProgress?Pn(this,An(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:fn(this)}function _n(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function mn(e){return this.utcOffset(0,e)}function yn(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(fn(this),"m")),this}function vn(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=dn(Re,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function gn(e){return!!this.isValid()&&(e=e?Xr(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function bn(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function wn(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=Kr(t))._a?(e=t._isUTC?p(t._a):Xr(t._a),this._isDSTShifted=this.isValid()&&un(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function jn(){return!!this.isValid()&&!this._isUTC}function kn(){return!!this.isValid()&&this._isUTC}function Sn(){return!!this.isValid()&&this._isUTC&&0===this._offset}n.updateOffset=function(){};var xn=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Tn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function An(e,t){var r,n,o,i=e,s=null;return sn(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(i={},t?i[t]=+e:i.milliseconds=+e):(s=xn.exec(e))?(r="-"===s[1]?-1:1,i={y:0,d:ce(s[Ye])*r,h:ce(s[We])*r,m:ce(s[Xe])*r,s:ce(s[ze])*r,ms:ce(an(1e3*s[Ge]))*r}):(s=Tn.exec(e))?(r="-"===s[1]?-1:1,i={y:En(s[2],r),M:En(s[3],r),w:En(s[4],r),d:En(s[5],r),h:En(s[6],r),m:En(s[7],r),s:En(s[8],r)}):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(o=Rn(Xr(i.from),Xr(i.to)),(i={}).ms=o.milliseconds,i.M=o.months),n=new on(i),sn(e)&&a(e,"_locale")&&(n._locale=e._locale),sn(e)&&a(e,"_isValid")&&(n._isValid=e._isValid),n}function En(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function On(e,t){var r={};return r.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function Rn(e,t){var r;return e.isValid()&&t.isValid()?(t=hn(t,e),e.isBefore(t)?r=On(e,t):((r=On(t,e)).milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Cn(e,t){return function(r,n){var o;return null===n||isNaN(+n)||(E(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=r,r=n,n=o),Pn(this,An(r,n),e),this}}function Pn(e,t,r,o){var i=t._milliseconds,s=an(t._days),a=an(t._months);e.isValid()&&(o=null==o||o,a&<(e,he(e,"Month")+a*r),s&&fe(e,"Date",he(e,"Date")+s*r),i&&e._d.setTime(e._d.valueOf()+i*r),o&&n.updateOffset(e,s||a))}An.fn=on.prototype,An.invalid=nn;var Mn=Cn(1,"add"),In=Cn(-1,"subtract");function Nn(e){return"string"==typeof e||e instanceof String}function Ln(e){return k(e)||d(e)||Nn(e)||c(e)||Dn(e)||Bn(e)||null==e}function Bn(e){var t,r,n=s(e)&&!u(e),o=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;t<i.length;t+=1)r=i[t],o=o||a(e,r);return n&&o}function Dn(e){var t=i(e),r=!1;return t&&(r=0===e.filter((function(t){return!c(t)&&Nn(e)})).length),t&&r}function Fn(e){var t,r,n=s(e)&&!u(e),o=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<i.length;t+=1)r=i[t],o=o||a(e,r);return n&&o}function Un(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function Hn(e,t){1===arguments.length&&(arguments[0]?Ln(arguments[0])?(e=arguments[0],t=void 0):Fn(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Xr(),o=hn(r,this).startOf("day"),i=n.calendarFormat(this,o)||"sameElse",s=t&&(O(t[i])?t[i].call(this,r):t[i]);return this.format(s||this.localeData().calendar(i,this,Xr(r)))}function qn(){return new j(this)}function Vn(e,t){var r=k(e)?e:Xr(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf())}function Kn(e,t){var r=k(e)?e:Xr(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf())}function Yn(e,t,r,n){var o=k(e)?e:Xr(e),i=k(t)?t:Xr(t);return!!(this.isValid()&&o.isValid()&&i.isValid())&&("("===(n=n||"()")[0]?this.isAfter(o,r):!this.isBefore(o,r))&&(")"===n[1]?this.isBefore(i,r):!this.isAfter(i,r))}function Wn(e,t){var r,n=k(e)?e:Xr(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf()))}function Xn(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function zn(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Gn(e,t,r){var n,o,i;if(!this.isValid())return NaN;if(!(n=hn(e,this)).isValid())return NaN;switch(o=6e4*(n.utcOffset()-this.utcOffset()),t=ne(t)){case"year":i=$n(this,n)/12;break;case"month":i=$n(this,n);break;case"quarter":i=$n(this,n)/3;break;case"second":i=(this-n)/1e3;break;case"minute":i=(this-n)/6e4;break;case"hour":i=(this-n)/36e5;break;case"day":i=(this-n-o)/864e5;break;case"week":i=(this-n-o)/6048e5;break;default:i=this-n}return r?i:le(i)}function $n(e,t){if(e.date()<t.date())return-$n(t,e);var r=12*(t.year()-e.year())+(t.month()-e.month()),n=e.clone().add(r,"months");return-(r+(t-n<0?(t-n)/(n-e.clone().add(r-1,"months")):(t-n)/(e.clone().add(r+1,"months")-n)))||0}function Zn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Qn(e){if(!this.isValid())return null;var t=!0!==e,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?V(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",V(r,"Z")):V(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Jn(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,r,n,o="moment",i="";return this.isLocal()||(o=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+o+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",n=i+'[")]',this.format(e+t+r+n)}function eo(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=V(this,e);return this.localeData().postformat(t)}function to(e,t){return this.isValid()&&(k(e)&&e.isValid()||Xr(e).isValid())?An({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ro(e){return this.from(Xr(),e)}function no(e,t){return this.isValid()&&(k(e)&&e.isValid()||Xr(e).isValid())?An({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function oo(e){return this.to(Xr(),e)}function io(e){var t;return void 0===e?this._locale._abbr:(null!=(t=mr(e))&&(this._locale=t),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var so=x("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function ao(){return this._locale}var uo=1e3,lo=60*uo,co=60*lo,ho=3506328*co;function fo(e,t){return(e%t+t)%t}function po(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-ho:new Date(e,t,r).valueOf()}function _o(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-ho:Date.UTC(e,t,r)}function mo(e){var t,r;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?_o:po,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=fo(t+(this._isUTC?0:this.utcOffset()*lo),co);break;case"minute":t=this._d.valueOf(),t-=fo(t,lo);break;case"second":t=this._d.valueOf(),t-=fo(t,uo)}return this._d.setTime(t),n.updateOffset(this,!0),this}function yo(e){var t,r;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?_o:po,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=co-fo(t+(this._isUTC?0:this.utcOffset()*lo),co)-1;break;case"minute":t=this._d.valueOf(),t+=lo-fo(t,lo)-1;break;case"second":t=this._d.valueOf(),t+=uo-fo(t,uo)-1}return this._d.setTime(t),n.updateOffset(this,!0),this}function vo(){return this._d.valueOf()-6e4*(this._offset||0)}function go(){return Math.floor(this.valueOf()/1e3)}function bo(){return new Date(this.valueOf())}function wo(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function jo(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function ko(){return this.isValid()?this.toISOString():null}function So(){return y(this)}function xo(){return f({},m(this))}function To(){return m(this).overflow}function Ao(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Eo(e,t){var r,o,i,s=this._eras||mr("en")._eras;for(r=0,o=s.length;r<o;++r)switch("string"==typeof s[r].since&&(i=n(s[r].since).startOf("day"),s[r].since=i.valueOf()),typeof s[r].until){case"undefined":s[r].until=1/0;break;case"string":i=n(s[r].until).startOf("day").valueOf(),s[r].until=i.valueOf()}return s}function Oo(e,t,r){var n,o,i,s,a,u=this.eras();for(e=e.toUpperCase(),n=0,o=u.length;n<o;++n)if(i=u[n].name.toUpperCase(),s=u[n].abbr.toUpperCase(),a=u[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(s===e)return u[n];break;case"NNNN":if(i===e)return u[n];break;case"NNNNN":if(a===e)return u[n]}else if([i,s,a].indexOf(e)>=0)return u[n]}function Ro(e,t){var r=e.since<=e.until?1:-1;return void 0===t?n(e.since).year():n(e.since).year()+(t-e.offset)*r}function Co(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].name;if(n[e].until<=r&&r<=n[e].since)return n[e].name}return""}function Po(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].narrow;if(n[e].until<=r&&r<=n[e].since)return n[e].narrow}return""}function Mo(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].abbr;if(n[e].until<=r&&r<=n[e].since)return n[e].abbr}return""}function Io(){var e,t,r,o,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(r=i[e].since<=i[e].until?1:-1,o=this.clone().startOf("day").valueOf(),i[e].since<=o&&o<=i[e].until||i[e].until<=o&&o<=i[e].since)return(this.year()-n(i[e].since).year())*r+i[e].offset;return this.year()}function No(e){return a(this,"_erasNameRegex")||qo.call(this),e?this._erasNameRegex:this._erasRegex}function Lo(e){return a(this,"_erasAbbrRegex")||qo.call(this),e?this._erasAbbrRegex:this._erasRegex}function Bo(e){return a(this,"_erasNarrowRegex")||qo.call(this),e?this._erasNarrowRegex:this._erasRegex}function Do(e,t){return t.erasAbbrRegex(e)}function Fo(e,t){return t.erasNameRegex(e)}function Uo(e,t){return t.erasNarrowRegex(e)}function Ho(e,t){return t._eraYearOrdinalRegex||Ee}function qo(){var e,t,r=[],n=[],o=[],i=[],s=this.eras();for(e=0,t=s.length;e<t;++e)n.push(Be(s[e].name)),r.push(Be(s[e].abbr)),o.push(Be(s[e].narrow)),i.push(Be(s[e].name)),i.push(Be(s[e].abbr)),i.push(Be(s[e].narrow));this._erasRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+n.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function Vo(e,t){U(0,[e,e.length],0,t)}function Ko(e){return $o.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Yo(e){return $o.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Wo(){return kt(this.year(),1,4)}function Xo(){return kt(this.isoWeekYear(),1,4)}function zo(){var e=this.localeData()._week;return kt(this.year(),e.dow,e.doy)}function Go(){var e=this.localeData()._week;return kt(this.weekYear(),e.dow,e.doy)}function $o(e,t,r,n,o){var i;return null==e?jt(this,n,o).year:(t>(i=kt(e,n,o))&&(t=i),Zo.call(this,e,t,r,n,o))}function Zo(e,t,r,n,o){var i=wt(e,t,r,n,o),s=gt(i.year,0,i.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function Qo(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}U("N",0,0,"eraAbbr"),U("NN",0,0,"eraAbbr"),U("NNN",0,0,"eraAbbr"),U("NNNN",0,0,"eraName"),U("NNNNN",0,0,"eraNarrow"),U("y",["y",1],"yo","eraYear"),U("y",["yy",2],0,"eraYear"),U("y",["yyy",3],0,"eraYear"),U("y",["yyyy",4],0,"eraYear"),Ie("N",Do),Ie("NN",Do),Ie("NNN",Do),Ie("NNNN",Fo),Ie("NNNNN",Uo),Fe(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,r,n){var o=r._locale.erasParse(e,n,r._strict);o?m(r).era=o:m(r).invalidEra=e})),Ie("y",Ee),Ie("yy",Ee),Ie("yyy",Ee),Ie("yyyy",Ee),Ie("yo",Ho),Fe(["y","yy","yyy","yyyy"],Ve),Fe(["yo"],(function(e,t,r,n){var o;r._locale._eraYearOrdinalRegex&&(o=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Ve]=r._locale.eraYearOrdinalParse(e,o):t[Ve]=parseInt(e,10)})),U(0,["gg",2],0,(function(){return this.weekYear()%100})),U(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Vo("gggg","weekYear"),Vo("ggggg","weekYear"),Vo("GGGG","isoWeekYear"),Vo("GGGGG","isoWeekYear"),re("weekYear","gg"),re("isoWeekYear","GG"),se("weekYear",1),se("isoWeekYear",1),Ie("G",Oe),Ie("g",Oe),Ie("GG",je,ve),Ie("gg",je,ve),Ie("GGGG",Te,be),Ie("gggg",Te,be),Ie("GGGGG",Ae,we),Ie("ggggg",Ae,we),Ue(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,r,n){t[n.substr(0,2)]=ce(e)})),Ue(["gg","GG"],(function(e,t,r,o){t[o]=n.parseTwoDigitYear(e)})),U("Q",0,"Qo","quarter"),re("quarter","Q"),se("quarter",7),Ie("Q",ye),Fe("Q",(function(e,t){t[Ke]=3*(ce(e)-1)})),U("D",["DD",2],"Do","date"),re("date","D"),se("date",9),Ie("D",je),Ie("DD",je,ve),Ie("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Fe(["D","DD"],Ye),Fe("Do",(function(e,t){t[Ye]=ce(e.match(je)[0])}));var Jo=de("Date",!0);function ei(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}U("DDD",["DDDD",3],"DDDo","dayOfYear"),re("dayOfYear","DDD"),se("dayOfYear",4),Ie("DDD",xe),Ie("DDDD",ge),Fe(["DDD","DDDD"],(function(e,t,r){r._dayOfYear=ce(e)})),U("m",["mm",2],0,"minute"),re("minute","m"),se("minute",14),Ie("m",je),Ie("mm",je,ve),Fe(["m","mm"],Xe);var ti=de("Minutes",!1);U("s",["ss",2],0,"second"),re("second","s"),se("second",15),Ie("s",je),Ie("ss",je,ve),Fe(["s","ss"],ze);var ri,ni,oi=de("Seconds",!1);for(U("S",0,0,(function(){return~~(this.millisecond()/100)})),U(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),U(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),U(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),U(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),U(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),U(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),re("millisecond","ms"),se("millisecond",16),Ie("S",xe,ye),Ie("SS",xe,ve),Ie("SSS",xe,ge),ri="SSSS";ri.length<=9;ri+="S")Ie(ri,Ee);function ii(e,t){t[Ge]=ce(1e3*("0."+e))}for(ri="S";ri.length<=9;ri+="S")Fe(ri,ii);function si(){return this._isUTC?"UTC":""}function ai(){return this._isUTC?"Coordinated Universal Time":""}ni=de("Milliseconds",!1),U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var ui=j.prototype;function li(e){return Xr(1e3*e)}function ci(){return Xr.apply(null,arguments).parseZone()}function di(e){return e}ui.add=Mn,ui.calendar=Hn,ui.clone=qn,ui.diff=Gn,ui.endOf=yo,ui.format=eo,ui.from=to,ui.fromNow=ro,ui.to=no,ui.toNow=oo,ui.get=pe,ui.invalidAt=To,ui.isAfter=Vn,ui.isBefore=Kn,ui.isBetween=Yn,ui.isSame=Wn,ui.isSameOrAfter=Xn,ui.isSameOrBefore=zn,ui.isValid=So,ui.lang=so,ui.locale=io,ui.localeData=ao,ui.max=Gr,ui.min=zr,ui.parsingFlags=xo,ui.set=_e,ui.startOf=mo,ui.subtract=In,ui.toArray=wo,ui.toObject=jo,ui.toDate=bo,ui.toISOString=Qn,ui.inspect=Jn,"undefined"!=typeof Symbol&&null!=Symbol.for&&(ui[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ui.toJSON=ko,ui.toString=Zn,ui.unix=go,ui.valueOf=vo,ui.creationData=Ao,ui.eraName=Co,ui.eraNarrow=Po,ui.eraAbbr=Mo,ui.eraYear=Io,ui.year=mt,ui.isLeapYear=yt,ui.weekYear=Ko,ui.isoWeekYear=Yo,ui.quarter=ui.quarters=Qo,ui.month=ct,ui.daysInMonth=dt,ui.week=ui.weeks=Et,ui.isoWeek=ui.isoWeeks=Ot,ui.weeksInYear=zo,ui.weeksInWeekYear=Go,ui.isoWeeksInYear=Wo,ui.isoWeeksInISOWeekYear=Xo,ui.date=Jo,ui.day=ui.days=Kt,ui.weekday=Yt,ui.isoWeekday=Wt,ui.dayOfYear=ei,ui.hour=ui.hours=nr,ui.minute=ui.minutes=ti,ui.second=ui.seconds=oi,ui.millisecond=ui.milliseconds=ni,ui.utcOffset=pn,ui.utc=mn,ui.local=yn,ui.parseZone=vn,ui.hasAlignedHourOffset=gn,ui.isDST=bn,ui.isLocal=jn,ui.isUtcOffset=kn,ui.isUtc=Sn,ui.isUTC=Sn,ui.zoneAbbr=si,ui.zoneName=ai,ui.dates=x("dates accessor is deprecated. Use date instead.",Jo),ui.months=x("months accessor is deprecated. Use month instead",ct),ui.years=x("years accessor is deprecated. Use year instead",mt),ui.zone=x("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",_n),ui.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",wn);var hi=P.prototype;function fi(e,t,r,n){var o=mr(),i=p().set(n,t);return o[r](i,e)}function pi(e,t,r){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return fi(e,t,r,"month");var n,o=[];for(n=0;n<12;n++)o[n]=fi(e,n,r,"month");return o}function _i(e,t,r,n){"boolean"==typeof e?(c(t)&&(r=t,t=void 0),t=t||""):(r=t=e,e=!1,c(t)&&(r=t,t=void 0),t=t||"");var o,i=mr(),s=e?i._week.dow:0,a=[];if(null!=r)return fi(t,(r+s)%7,n,"day");for(o=0;o<7;o++)a[o]=fi(t,(o+s)%7,n,"day");return a}function mi(e,t){return pi(e,t,"months")}function yi(e,t){return pi(e,t,"monthsShort")}function vi(e,t,r){return _i(e,t,r,"weekdays")}function gi(e,t,r){return _i(e,t,r,"weekdaysShort")}function bi(e,t,r){return _i(e,t,r,"weekdaysMin")}hi.calendar=I,hi.longDateFormat=W,hi.invalidDate=z,hi.ordinal=Z,hi.preparse=di,hi.postformat=di,hi.relativeTime=J,hi.pastFuture=ee,hi.set=R,hi.eras=Eo,hi.erasParse=Oo,hi.erasConvertYear=Ro,hi.erasAbbrRegex=Lo,hi.erasNameRegex=No,hi.erasNarrowRegex=Bo,hi.months=it,hi.monthsShort=st,hi.monthsParse=ut,hi.monthsRegex=ft,hi.monthsShortRegex=ht,hi.week=St,hi.firstDayOfYear=At,hi.firstDayOfWeek=Tt,hi.weekdays=Ft,hi.weekdaysMin=Ht,hi.weekdaysShort=Ut,hi.weekdaysParse=Vt,hi.weekdaysRegex=Xt,hi.weekdaysShortRegex=zt,hi.weekdaysMinRegex=Gt,hi.isPM=tr,hi.meridiem=or,fr("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===ce(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.lang=x("moment.lang is deprecated. Use moment.locale instead.",fr),n.langData=x("moment.langData is deprecated. Use moment.localeData instead.",mr);var wi=Math.abs;function ji(){var e=this._data;return this._milliseconds=wi(this._milliseconds),this._days=wi(this._days),this._months=wi(this._months),e.milliseconds=wi(e.milliseconds),e.seconds=wi(e.seconds),e.minutes=wi(e.minutes),e.hours=wi(e.hours),e.months=wi(e.months),e.years=wi(e.years),this}function ki(e,t,r,n){var o=An(t,r);return e._milliseconds+=n*o._milliseconds,e._days+=n*o._days,e._months+=n*o._months,e._bubble()}function Si(e,t){return ki(this,e,t,1)}function xi(e,t){return ki(this,e,t,-1)}function Ti(e){return e<0?Math.floor(e):Math.ceil(e)}function Ai(){var e,t,r,n,o,i=this._milliseconds,s=this._days,a=this._months,u=this._data;return i>=0&&s>=0&&a>=0||i<=0&&s<=0&&a<=0||(i+=864e5*Ti(Oi(a)+s),s=0,a=0),u.milliseconds=i%1e3,e=le(i/1e3),u.seconds=e%60,t=le(e/60),u.minutes=t%60,r=le(t/60),u.hours=r%24,s+=le(r/24),a+=o=le(Ei(s)),s-=Ti(Oi(o)),n=le(a/12),a%=12,u.days=s,u.months=a,u.years=n,this}function Ei(e){return 4800*e/146097}function Oi(e){return 146097*e/4800}function Ri(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if("month"===(e=ne(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,r=this._months+Ei(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Oi(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}}function Ci(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ce(this._months/12):NaN}function Pi(e){return function(){return this.as(e)}}var Mi=Pi("ms"),Ii=Pi("s"),Ni=Pi("m"),Li=Pi("h"),Bi=Pi("d"),Di=Pi("w"),Fi=Pi("M"),Ui=Pi("Q"),Hi=Pi("y");function qi(){return An(this)}function Vi(e){return e=ne(e),this.isValid()?this[e+"s"]():NaN}function Ki(e){return function(){return this.isValid()?this._data[e]:NaN}}var Yi=Ki("milliseconds"),Wi=Ki("seconds"),Xi=Ki("minutes"),zi=Ki("hours"),Gi=Ki("days"),$i=Ki("months"),Zi=Ki("years");function Qi(){return le(this.days()/7)}var Ji=Math.round,es={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ts(e,t,r,n,o){return o.relativeTime(t||1,!!r,e,n)}function rs(e,t,r,n){var o=An(e).abs(),i=Ji(o.as("s")),s=Ji(o.as("m")),a=Ji(o.as("h")),u=Ji(o.as("d")),l=Ji(o.as("M")),c=Ji(o.as("w")),d=Ji(o.as("y")),h=i<=r.ss&&["s",i]||i<r.s&&["ss",i]||s<=1&&["m"]||s<r.m&&["mm",s]||a<=1&&["h"]||a<r.h&&["hh",a]||u<=1&&["d"]||u<r.d&&["dd",u];return null!=r.w&&(h=h||c<=1&&["w"]||c<r.w&&["ww",c]),(h=h||l<=1&&["M"]||l<r.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=t,h[3]=+e>0,h[4]=n,ts.apply(null,h)}function ns(e){return void 0===e?Ji:"function"==typeof e&&(Ji=e,!0)}function os(e,t){return void 0!==es[e]&&(void 0===t?es[e]:(es[e]=t,"s"===e&&(es.ss=t-1),!0))}function is(e,t){if(!this.isValid())return this.localeData().invalidDate();var r,n,o=!1,i=es;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(o=e),"object"==typeof t&&(i=Object.assign({},es,t),null!=t.s&&null==t.ss&&(i.ss=t.s-1)),n=rs(this,!o,i,r=this.localeData()),o&&(n=r.pastFuture(+this,n)),r.postformat(n)}var ss=Math.abs;function as(e){return(e>0)-(e<0)||+e}function us(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,n,o,i,s,a,u=ss(this._milliseconds)/1e3,l=ss(this._days),c=ss(this._months),d=this.asSeconds();return d?(e=le(u/60),t=le(e/60),u%=60,e%=60,r=le(c/12),c%=12,n=u?u.toFixed(3).replace(/\.?0+$/,""):"",o=d<0?"-":"",i=as(this._months)!==as(d)?"-":"",s=as(this._days)!==as(d)?"-":"",a=as(this._milliseconds)!==as(d)?"-":"",o+"P"+(r?i+r+"Y":"")+(c?i+c+"M":"")+(l?s+l+"D":"")+(t||e||u?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(u?a+n+"S":"")):"P0D"}var ls=on.prototype;return ls.isValid=rn,ls.abs=ji,ls.add=Si,ls.subtract=xi,ls.as=Ri,ls.asMilliseconds=Mi,ls.asSeconds=Ii,ls.asMinutes=Ni,ls.asHours=Li,ls.asDays=Bi,ls.asWeeks=Di,ls.asMonths=Fi,ls.asQuarters=Ui,ls.asYears=Hi,ls.valueOf=Ci,ls._bubble=Ai,ls.clone=qi,ls.get=Vi,ls.milliseconds=Yi,ls.seconds=Wi,ls.minutes=Xi,ls.hours=zi,ls.days=Gi,ls.weeks=Qi,ls.months=$i,ls.years=Zi,ls.humanize=is,ls.toISOString=us,ls.toString=us,ls.toJSON=us,ls.locale=io,ls.localeData=ao,ls.toIsoString=x("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",us),ls.lang=so,U("X",0,0,"unix"),U("x",0,0,"valueOf"),Ie("x",Oe),Ie("X",Pe),Fe("X",(function(e,t,r){r._d=new Date(1e3*parseFloat(e))})),Fe("x",(function(e,t,r){r._d=new Date(ce(e))})),n.version="2.29.1",o(Xr),n.fn=ui,n.min=Zr,n.max=Qr,n.now=Jr,n.utc=p,n.unix=li,n.months=mi,n.isDate=d,n.locale=fr,n.invalid=v,n.duration=An,n.isMoment=k,n.weekdays=vi,n.parseZone=ci,n.localeData=mr,n.isDuration=sn,n.monthsShort=yi,n.weekdaysMin=bi,n.defineLocale=pr,n.updateLocale=_r,n.locales=yr,n.weekdaysShort=gi,n.normalizeUnits=ne,n.relativeTimeRounding=ns,n.relativeTimeThreshold=os,n.calendarFormat=Un,n.prototype=ui,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n}()},"./node_modules/safe-buffer/index.js":(e,t,r)=>{var n=r("./node_modules/buffer/index.js"),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=s),i(o,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},"./node_modules/sha.js/hash.js":(e,t,r)=>{var n=r("./node_modules/safe-buffer/index.js").Buffer;function o(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}o.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,o=this._blockSize,i=e.length,s=this._len,a=0;a<i;){for(var u=s%o,l=Math.min(i-a,o-u),c=0;c<l;c++)r[u+c]=e[a+c];a+=l,(s+=l)%o==0&&this._update(r)}return this._len+=i,this},o.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,o=(r-n)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=o},"./node_modules/sha.js/index.js":(e,t,r)=>{var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r("./node_modules/sha.js/sha.js"),n.sha1=r("./node_modules/sha.js/sha1.js"),n.sha224=r("./node_modules/sha.js/sha224.js"),n.sha256=r("./node_modules/sha.js/sha256.js"),n.sha384=r("./node_modules/sha.js/sha384.js"),n.sha512=r("./node_modules/sha.js/sha512.js")},"./node_modules/sha.js/sha.js":(e,t,r)=>{var n=r("./node_modules/inherits/inherits_browser.js"),o=r("./node_modules/sha.js/hash.js"),i=r("./node_modules/safe-buffer/index.js").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,o.call(this,64,56)}function l(e){return e<<30|e>>>2}function c(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,o),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,i=0|this._c,a=0|this._d,u=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=r[d-3]^r[d-8]^r[d-14]^r[d-16];for(var h=0;h<80;++h){var f=~~(h/20),p=0|((t=n)<<5|t>>>27)+c(f,o,i,a)+u+r[h]+s[f];u=a,a=i,i=l(o),o=n,n=p}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},"./node_modules/sha.js/sha1.js":(e,t,r)=>{var n=r("./node_modules/inherits/inherits_browser.js"),o=r("./node_modules/sha.js/hash.js"),i=r("./node_modules/safe-buffer/index.js").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,o.call(this,64,56)}function l(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function d(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,o),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,i=0|this._c,a=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<80;++h)r[h]=(t=r[h-3]^r[h-8]^r[h-14]^r[h-16])<<1|t>>>31;for(var f=0;f<80;++f){var p=~~(f/20),_=l(n)+d(p,o,i,a)+u+r[f]+s[p]|0;u=a,a=i,i=c(o),o=n,n=_}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},"./node_modules/sha.js/sha224.js":(e,t,r)=>{var n=r("./node_modules/inherits/inherits_browser.js"),o=r("./node_modules/sha.js/sha256.js"),i=r("./node_modules/sha.js/hash.js"),s=r("./node_modules/safe-buffer/index.js").Buffer,a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}n(u,o),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},"./node_modules/sha.js/sha256.js":(e,t,r)=>{var n=r("./node_modules/inherits/inherits_browser.js"),o=r("./node_modules/sha.js/hash.js"),i=r("./node_modules/safe-buffer/index.js").Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}function l(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function d(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function f(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,o),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,i=0|this._c,a=0|this._d,u=0|this._e,p=0|this._f,_=0|this._g,m=0|this._h,y=0;y<16;++y)r[y]=e.readInt32BE(4*y);for(;y<64;++y)r[y]=0|(((t=r[y-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[y-7]+f(r[y-15])+r[y-16];for(var v=0;v<64;++v){var g=m+h(u)+l(u,p,_)+s[v]+r[v]|0,b=d(n)+c(n,o,i)|0;m=_,_=p,p=u,u=a+g|0,a=i,i=o,o=n,n=g+b|0}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=_+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var e=i.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},"./node_modules/sha.js/sha384.js":(e,t,r)=>{var n=r("./node_modules/inherits/inherits_browser.js"),o=r("./node_modules/sha.js/sha512.js"),i=r("./node_modules/sha.js/hash.js"),s=r("./node_modules/safe-buffer/index.js").Buffer,a=new Array(160);function u(){this.init(),this._w=a,i.call(this,128,112)}n(u,o),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},"./node_modules/sha.js/sha512.js":(e,t,r)=>{var n=r("./node_modules/inherits/inherits_browser.js"),o=r("./node_modules/sha.js/hash.js"),i=r("./node_modules/safe-buffer/index.js").Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}function l(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function d(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function f(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function _(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function y(e,t){return e>>>0<t>>>0?1:0}n(u,o),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,o=0|this._ch,i=0|this._dh,a=0|this._eh,u=0|this._fh,v=0|this._gh,g=0|this._hh,b=0|this._al,w=0|this._bl,j=0|this._cl,k=0|this._dl,S=0|this._el,x=0|this._fl,T=0|this._gl,A=0|this._hl,E=0;E<32;E+=2)t[E]=e.readInt32BE(4*E),t[E+1]=e.readInt32BE(4*E+4);for(;E<160;E+=2){var O=t[E-30],R=t[E-30+1],C=f(O,R),P=p(R,O),M=_(O=t[E-4],R=t[E-4+1]),I=m(R,O),N=t[E-14],L=t[E-14+1],B=t[E-32],D=t[E-32+1],F=P+L|0,U=C+N+y(F,P)|0;U=(U=U+M+y(F=F+I|0,I)|0)+B+y(F=F+D|0,D)|0,t[E]=U,t[E+1]=F}for(var H=0;H<160;H+=2){U=t[H],F=t[H+1];var q=c(r,n,o),V=c(b,w,j),K=d(r,b),Y=d(b,r),W=h(a,S),X=h(S,a),z=s[H],G=s[H+1],$=l(a,u,v),Z=l(S,x,T),Q=A+X|0,J=g+W+y(Q,A)|0;J=(J=(J=J+$+y(Q=Q+Z|0,Z)|0)+z+y(Q=Q+G|0,G)|0)+U+y(Q=Q+F|0,F)|0;var ee=Y+V|0,te=K+q+y(ee,Y)|0;g=v,A=T,v=u,T=x,u=a,x=S,a=i+J+y(S=k+Q|0,k)|0,i=o,k=j,o=n,j=w,n=r,w=b,r=J+te+y(b=Q+ee|0,Q)|0}this._al=this._al+b|0,this._bl=this._bl+w|0,this._cl=this._cl+j|0,this._dl=this._dl+k|0,this._el=this._el+S|0,this._fl=this._fl+x|0,this._gl=this._gl+T|0,this._hl=this._hl+A|0,this._ah=this._ah+r+y(this._al,b)|0,this._bh=this._bh+n+y(this._bl,w)|0,this._ch=this._ch+o+y(this._cl,j)|0,this._dh=this._dh+i+y(this._dl,k)|0,this._eh=this._eh+a+y(this._el,S)|0,this._fh=this._fh+u+y(this._fl,x)|0,this._gh=this._gh+v+y(this._gl,T)|0,this._hh=this._hh+g+y(this._hl,A)|0},u.prototype._hash=function(){var e=i.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},"./node_modules/stellar-base/lib/account.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MuxedAccount=t.Account=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=l(r("./node_modules/lodash/isString.js")),i=l(r("./node_modules/bignumber.js/bignumber.js")),s=l(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js")),a=r("./node_modules/stellar-base/lib/strkey.js"),u=r("./node_modules/stellar-base/lib/util/decode_encode_muxed_account.js");function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var d=t.Account=function(){function e(t,r){if(c(this,e),a.StrKey.isValidMed25519PublicKey(t))throw new Error("accountId is an M-address; use MuxedAccount instead");if(!a.StrKey.isValidEd25519PublicKey(t))throw new Error("accountId is invalid");if(!(0,o.default)(r))throw new Error("sequence must be of type string");this._accountId=t,this.sequence=new i.default(r)}return n(e,[{key:"accountId",value:function(){return this._accountId}},{key:"sequenceNumber",value:function(){return this.sequence.toString()}},{key:"incrementSequenceNumber",value:function(){this.sequence=this.sequence.add(1)}},{key:"createSubaccount",value:function(e){return new h(this,e)}}]),e}(),h=t.MuxedAccount=function(){function e(t,r){c(this,e);var n=t.accountId();if(!a.StrKey.isValidEd25519PublicKey(n))throw new Error("accountId is invalid");this.account=t,this._muxedXdr=(0,u.encodeMuxedAccount)(n,r),this._mAddress=(0,u.encodeMuxedAccountToAddress)(this._muxedXdr,!0),this._id=r}return n(e,[{key:"baseAccount",value:function(){return this.account}},{key:"accountId",value:function(){return this._mAddress}},{key:"id",value:function(){return this._id}},{key:"setId",value:function(e){if(!(0,o.default)(e))throw new Error("id should be a string representing a number (uint64)");return this._muxedXdr.med25519().id(s.default.Uint64.fromString(e)),this._mAddress=(0,u.encodeMuxedAccountToAddress)(this._muxedXdr,!0),this._id=e,this}},{key:"sequenceNumber",value:function(){return this.account.sequenceNumber()}},{key:"incrementSequenceNumber",value:function(){return this.account.incrementSequenceNumber()}},{key:"createSubaccount",value:function(t){return new e(this.account,t)}},{key:"toXDRObject",value:function(){return this._muxedXdr}},{key:"equals",value:function(e){return this.accountId()===e.accountId()}}],[{key:"fromAddress",value:function(t,r){var n=(0,u.decodeAddressToMuxedAccount)(t,!0),o=(0,u.encodeMuxedAccountToAddress)(n,!1),i=n.med25519().id().toString();return new e(new d(o,r),i)}}]),e}()},"./node_modules/stellar-base/lib/asset.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Asset=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=c(r("./node_modules/lodash/clone.js")),i=c(r("./node_modules/lodash/padEnd.js")),s=c(r("./node_modules/lodash/trimEnd.js")),a=c(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js")),u=r("./node_modules/stellar-base/lib/keypair.js"),l=r("./node_modules/stellar-base/lib/strkey.js");function c(e){return e&&e.__esModule?e:{default:e}}t.Asset=function(){function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!/^[a-zA-Z0-9]{1,12}$/.test(t))throw new Error("Asset code is invalid (maximum alphanumeric, 12 characters at max)");if("xlm"!==String(t).toLowerCase()&&!r)throw new Error("Issuer cannot be null");if(r&&!l.StrKey.isValidEd25519PublicKey(r))throw new Error("Issuer is invalid");this.code=t,this.issuer=r}return n(e,[{key:"toXDRObject",value:function(){return this._toXDRObject(a.default.Asset)}},{key:"toChangeTrustXDRObject",value:function(){return this._toXDRObject(a.default.ChangeTrustAsset)}},{key:"toTrustLineXDRObject",value:function(){return this._toXDRObject(a.default.TrustLineAsset)}},{key:"_toXDRObject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.default.Asset;if(this.isNative())return e.assetTypeNative();var t=void 0,r=void 0;this.code.length<=4?(t=a.default.AlphaNum4,r="assetTypeCreditAlphanum4"):(t=a.default.AlphaNum12,r="assetTypeCreditAlphanum12");var n=this.code.length<=4?4:12,o=(0,i.default)(this.code,n,"\0"),s=new t({assetCode:o,issuer:u.Keypair.fromPublicKey(this.issuer).xdrAccountId()});return new e(r,s)}},{key:"getCode",value:function(){return(0,o.default)(this.code)}},{key:"getIssuer",value:function(){return(0,o.default)(this.issuer)}},{key:"getAssetType",value:function(){return this.isNative()?"native":this.code.length>=1&&this.code.length<=4?"credit_alphanum4":this.code.length>=5&&this.code.length<=12?"credit_alphanum12":null}},{key:"isNative",value:function(){return!this.issuer}},{key:"equals",value:function(e){return this.code===e.getCode()&&this.issuer===e.getIssuer()}},{key:"toString",value:function(){return this.isNative()?"native":this.getCode()+":"+this.getIssuer()}}],[{key:"native",value:function(){return new e("XLM")}},{key:"fromOperation",value:function(e){var t=void 0,r=void 0;switch(e.switch()){case a.default.AssetType.assetTypeNative():return this.native();case a.default.AssetType.assetTypeCreditAlphanum4():t=e.alphaNum4();case a.default.AssetType.assetTypeCreditAlphanum12():return t=t||e.alphaNum12(),r=l.StrKey.encodeEd25519PublicKey(t.issuer().ed25519()),new this((0,s.default)(t.assetCode(),"\0"),r);default:throw new Error("Invalid asset type: "+e.switch().name)}}},{key:"compare",value:function(t,r){if(!(t&&t instanceof e))throw new Error("assetA is invalid");if(!(r&&r instanceof e))throw new Error("assetB is invalid");if(t.equals(r))return 0;switch(t.getAssetType()){case"native":return-1;case"credit_alphanum4":if("native"===r.getAssetType())return 1;if("credit_alphanum12"===r.getAssetType())return-1;break;case"credit_alphanum12":if("credit_alphanum12"!==r.getAssetType())return 1;break;default:throw new Error("Unexpected asset type")}var n=t.getCode().localeCompare(r.getCode());return 0!==n?n:t.getIssuer().localeCompare(r.getIssuer())}}]),e}()},"./node_modules/stellar-base/lib/claimant.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Claimant=void 0;var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"),s=(n=i)&&n.__esModule?n:{default:n},a=r("./node_modules/stellar-base/lib/keypair.js"),u=r("./node_modules/stellar-base/lib/strkey.js");t.Claimant=function(){function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&!u.StrKey.isValidEd25519PublicKey(t))throw new Error("Destination is invalid");if(this._destination=t,r){if(!(r instanceof s.default.ClaimPredicate))throw new Error("Predicate should be an xdr.ClaimPredicate");this._predicate=r}else this._predicate=s.default.ClaimPredicate.claimPredicateUnconditional()}return o(e,[{key:"toXDRObject",value:function(){var e=new s.default.ClaimantV0({destination:a.Keypair.fromPublicKey(this._destination).xdrAccountId(),predicate:this._predicate});return s.default.Claimant.claimantTypeV0(e)}},{key:"destination",get:function(){return this._destination},set:function(e){throw new Error("Claimant is immutable")}},{key:"predicate",get:function(){return this._predicate},set:function(e){throw new Error("Claimant is immutable")}}],[{key:"predicateUnconditional",value:function(){return s.default.ClaimPredicate.claimPredicateUnconditional()}},{key:"predicateAnd",value:function(e,t){if(!(e instanceof s.default.ClaimPredicate))throw new Error("left Predicate should be an xdr.ClaimPredicate");if(!(t instanceof s.default.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return s.default.ClaimPredicate.claimPredicateAnd([e,t])}},{key:"predicateOr",value:function(e,t){if(!(e instanceof s.default.ClaimPredicate))throw new Error("left Predicate should be an xdr.ClaimPredicate");if(!(t instanceof s.default.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return s.default.ClaimPredicate.claimPredicateOr([e,t])}},{key:"predicateNot",value:function(e){if(!(e instanceof s.default.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return s.default.ClaimPredicate.claimPredicateNot(e)}},{key:"predicateBeforeAbsoluteTime",value:function(e){return s.default.ClaimPredicate.claimPredicateBeforeAbsoluteTime(s.default.Int64.fromString(e))}},{key:"predicateBeforeRelativeTime",value:function(e){return s.default.ClaimPredicate.claimPredicateBeforeRelativeTime(s.default.Int64.fromString(e))}},{key:"fromXDR",value:function(e){var t=void 0;if(e.switch()===s.default.ClaimantType.claimantTypeV0())return t=e.v0(),new this(u.StrKey.encodeEd25519PublicKey(t.destination().ed25519()),t.predicate());throw new Error("Invalid claimant type: "+e.switch().name)}}]),e}()},"./node_modules/stellar-base/lib/fee_bump_transaction.js":(e,t,r)=>{"use strict";var n=r("./node_modules/buffer/index.js").Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.FeeBumpTransaction=void 0;var o,i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"),a=(o=s)&&o.__esModule?o:{default:o},u=r("./node_modules/stellar-base/lib/hashing.js"),l=r("./node_modules/stellar-base/lib/transaction.js"),c=r("./node_modules/stellar-base/lib/transaction_base.js"),d=r("./node_modules/stellar-base/lib/util/decode_encode_muxed_account.js");t.FeeBumpTransaction=function(e){function t(e,r,o){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"string"==typeof e){var i=n.from(e,"base64");e=a.default.TransactionEnvelope.fromXDR(i)}var s=e.switch();if(s!==a.default.EnvelopeType.envelopeTypeTxFeeBump())throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxFeeBump but received an "+s.name+".");var u=e.value(),c=u.tx(),h=c.fee().toString(),f=(u.signatures()||[]).slice(),p=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,c,f,h,r)),_=a.default.TransactionEnvelope.envelopeTypeTx(c.innerTx().v1());return p._feeSource=(0,d.encodeMuxedAccountToAddress)(p.tx.feeSource(),o),p._innerTransaction=new l.Transaction(_,r),p}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"signatureBase",value:function(){var e=new a.default.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTxFeeBump(this.tx);return new a.default.TransactionSignaturePayload({networkId:a.default.Hash.fromXDR((0,u.hash)(this.networkPassphrase)),taggedTransaction:e}).toXDR()}},{key:"toEnvelope",value:function(){var e=new a.default.FeeBumpTransactionEnvelope({tx:a.default.FeeBumpTransaction.fromXDR(this.tx.toXDR()),signatures:this.signatures.slice()});return new a.default.TransactionEnvelope.envelopeTypeTxFeeBump(e)}},{key:"innerTransaction",get:function(){return this._innerTransaction}},{key:"feeSource",get:function(){return this._feeSource}}]),t}(c.TransactionBase)},"./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r("./node_modules/js-xdr/lib/index.js")).config((function(e){e.typedef("AccountId",e.lookup("PublicKey")),e.typedef("Thresholds",e.opaque(4)),e.typedef("String32",e.string(32)),e.typedef("String64",e.string(64)),e.typedef("SequenceNumber",e.lookup("Int64")),e.typedef("TimePoint",e.lookup("Uint64")),e.typedef("DataValue",e.varOpaque(64)),e.typedef("PoolId",e.lookup("Hash")),e.typedef("AssetCode4",e.opaque(4)),e.typedef("AssetCode12",e.opaque(12)),e.enum("AssetType",{assetTypeNative:0,assetTypeCreditAlphanum4:1,assetTypeCreditAlphanum12:2,assetTypePoolShare:3}),e.union("AssetCode",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeCreditAlphanum4","assetCode4"],["assetTypeCreditAlphanum12","assetCode12"]],arms:{assetCode4:e.lookup("AssetCode4"),assetCode12:e.lookup("AssetCode12")}}),e.struct("AlphaNum4",[["assetCode",e.lookup("AssetCode4")],["issuer",e.lookup("AccountId")]]),e.struct("AlphaNum12",[["assetCode",e.lookup("AssetCode12")],["issuer",e.lookup("AccountId")]]),e.union("Asset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",e.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"]],arms:{alphaNum4:e.lookup("AlphaNum4"),alphaNum12:e.lookup("AlphaNum12")}}),e.struct("Price",[["n",e.lookup("Int32")],["d",e.lookup("Int32")]]),e.struct("Liabilities",[["buying",e.lookup("Int64")],["selling",e.lookup("Int64")]]),e.enum("ThresholdIndices",{thresholdMasterWeight:0,thresholdLow:1,thresholdMed:2,thresholdHigh:3}),e.enum("LedgerEntryType",{account:0,trustline:1,offer:2,data:3,claimableBalance:4,liquidityPool:5}),e.struct("Signer",[["key",e.lookup("SignerKey")],["weight",e.lookup("Uint32")]]),e.enum("AccountFlags",{authRequiredFlag:1,authRevocableFlag:2,authImmutableFlag:4,authClawbackEnabledFlag:8}),e.const("MASK_ACCOUNT_FLAGS",7),e.const("MASK_ACCOUNT_FLAGS_V17",15),e.const("MAX_SIGNERS",20),e.typedef("SponsorshipDescriptor",e.option(e.lookup("AccountId"))),e.union("AccountEntryExtensionV2Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("AccountEntryExtensionV2",[["numSponsored",e.lookup("Uint32")],["numSponsoring",e.lookup("Uint32")],["signerSponsoringIDs",e.varArray(e.lookup("SponsorshipDescriptor"),e.lookup("MAX_SIGNERS"))],["ext",e.lookup("AccountEntryExtensionV2Ext")]]),e.union("AccountEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[2,"v2"]],arms:{v2:e.lookup("AccountEntryExtensionV2")}}),e.struct("AccountEntryExtensionV1",[["liabilities",e.lookup("Liabilities")],["ext",e.lookup("AccountEntryExtensionV1Ext")]]),e.union("AccountEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("AccountEntryExtensionV1")}}),e.struct("AccountEntry",[["accountId",e.lookup("AccountId")],["balance",e.lookup("Int64")],["seqNum",e.lookup("SequenceNumber")],["numSubEntries",e.lookup("Uint32")],["inflationDest",e.option(e.lookup("AccountId"))],["flags",e.lookup("Uint32")],["homeDomain",e.lookup("String32")],["thresholds",e.lookup("Thresholds")],["signers",e.varArray(e.lookup("Signer"),e.lookup("MAX_SIGNERS"))],["ext",e.lookup("AccountEntryExt")]]),e.enum("TrustLineFlags",{authorizedFlag:1,authorizedToMaintainLiabilitiesFlag:2,trustlineClawbackEnabledFlag:4}),e.const("MASK_TRUSTLINE_FLAGS",1),e.const("MASK_TRUSTLINE_FLAGS_V13",3),e.const("MASK_TRUSTLINE_FLAGS_V17",7),e.enum("LiquidityPoolType",{liquidityPoolConstantProduct:0}),e.union("TrustLineAsset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",e.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"],["assetTypePoolShare","liquidityPoolId"]],arms:{alphaNum4:e.lookup("AlphaNum4"),alphaNum12:e.lookup("AlphaNum12"),liquidityPoolId:e.lookup("PoolId")}}),e.union("TrustLineEntryExtensionV2Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TrustLineEntryExtensionV2",[["liquidityPoolUseCount",e.lookup("Int32")],["ext",e.lookup("TrustLineEntryExtensionV2Ext")]]),e.union("TrustLineEntryV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[2,"v2"]],arms:{v2:e.lookup("TrustLineEntryExtensionV2")}}),e.struct("TrustLineEntryV1",[["liabilities",e.lookup("Liabilities")],["ext",e.lookup("TrustLineEntryV1Ext")]]),e.union("TrustLineEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("TrustLineEntryV1")}}),e.struct("TrustLineEntry",[["accountId",e.lookup("AccountId")],["asset",e.lookup("TrustLineAsset")],["balance",e.lookup("Int64")],["limit",e.lookup("Int64")],["flags",e.lookup("Uint32")],["ext",e.lookup("TrustLineEntryExt")]]),e.enum("OfferEntryFlags",{passiveFlag:1}),e.const("MASK_OFFERENTRY_FLAGS",1),e.union("OfferEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("OfferEntry",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")],["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")],["flags",e.lookup("Uint32")],["ext",e.lookup("OfferEntryExt")]]),e.union("DataEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("DataEntry",[["accountId",e.lookup("AccountId")],["dataName",e.lookup("String64")],["dataValue",e.lookup("DataValue")],["ext",e.lookup("DataEntryExt")]]),e.enum("ClaimPredicateType",{claimPredicateUnconditional:0,claimPredicateAnd:1,claimPredicateOr:2,claimPredicateNot:3,claimPredicateBeforeAbsoluteTime:4,claimPredicateBeforeRelativeTime:5}),e.union("ClaimPredicate",{switchOn:e.lookup("ClaimPredicateType"),switchName:"type",switches:[["claimPredicateUnconditional",e.void()],["claimPredicateAnd","andPredicates"],["claimPredicateOr","orPredicates"],["claimPredicateNot","notPredicate"],["claimPredicateBeforeAbsoluteTime","absBefore"],["claimPredicateBeforeRelativeTime","relBefore"]],arms:{andPredicates:e.varArray(e.lookup("ClaimPredicate"),2),orPredicates:e.varArray(e.lookup("ClaimPredicate"),2),notPredicate:e.option(e.lookup("ClaimPredicate")),absBefore:e.lookup("Int64"),relBefore:e.lookup("Int64")}}),e.enum("ClaimantType",{claimantTypeV0:0}),e.struct("ClaimantV0",[["destination",e.lookup("AccountId")],["predicate",e.lookup("ClaimPredicate")]]),e.union("Claimant",{switchOn:e.lookup("ClaimantType"),switchName:"type",switches:[["claimantTypeV0","v0"]],arms:{v0:e.lookup("ClaimantV0")}}),e.enum("ClaimableBalanceIdType",{claimableBalanceIdTypeV0:0,claimableBalanceIdTypeFromPoolRevoke:1}),e.union("ClaimableBalanceId",{switchOn:e.lookup("ClaimableBalanceIdType"),switchName:"type",switches:[["claimableBalanceIdTypeV0","v0"],["claimableBalanceIdTypeFromPoolRevoke","fromPoolRevoke"]],arms:{v0:e.lookup("Hash"),fromPoolRevoke:e.lookup("Hash")}}),e.enum("ClaimableBalanceFlags",{claimableBalanceClawbackEnabledFlag:1}),e.const("MASK_CLAIMABLE_BALANCE_FLAGS",1),e.union("ClaimableBalanceEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("ClaimableBalanceEntryExtensionV1",[["ext",e.lookup("ClaimableBalanceEntryExtensionV1Ext")],["flags",e.lookup("Uint32")]]),e.union("ClaimableBalanceEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("ClaimableBalanceEntryExtensionV1")}}),e.struct("ClaimableBalanceEntry",[["balanceId",e.lookup("ClaimableBalanceId")],["claimants",e.varArray(e.lookup("Claimant"),10)],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")],["ext",e.lookup("ClaimableBalanceEntryExt")]]),e.struct("LiquidityPoolConstantProductParameters",[["assetA",e.lookup("Asset")],["assetB",e.lookup("Asset")],["fee",e.lookup("Int32")]]),e.struct("LiquidityPoolEntryConstantProduct",[["params",e.lookup("LiquidityPoolConstantProductParameters")],["reserveA",e.lookup("Int64")],["reserveB",e.lookup("Int64")],["totalPoolShares",e.lookup("Int64")],["poolSharesTrustLineCount",e.lookup("Int64")]]),e.union("LiquidityPoolEntryBody",{switchOn:e.lookup("LiquidityPoolType"),switchName:"type",switches:[["liquidityPoolConstantProduct","constantProduct"]],arms:{constantProduct:e.lookup("LiquidityPoolEntryConstantProduct")}}),e.struct("LiquidityPoolEntry",[["liquidityPoolId",e.lookup("PoolId")],["body",e.lookup("LiquidityPoolEntryBody")]]),e.union("LedgerEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerEntryExtensionV1",[["sponsoringId",e.lookup("SponsorshipDescriptor")],["ext",e.lookup("LedgerEntryExtensionV1Ext")]]),e.union("LedgerEntryData",{switchOn:e.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["data","data"],["claimableBalance","claimableBalance"],["liquidityPool","liquidityPool"]],arms:{account:e.lookup("AccountEntry"),trustLine:e.lookup("TrustLineEntry"),offer:e.lookup("OfferEntry"),data:e.lookup("DataEntry"),claimableBalance:e.lookup("ClaimableBalanceEntry"),liquidityPool:e.lookup("LiquidityPoolEntry")}}),e.union("LedgerEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("LedgerEntryExtensionV1")}}),e.struct("LedgerEntry",[["lastModifiedLedgerSeq",e.lookup("Uint32")],["data",e.lookup("LedgerEntryData")],["ext",e.lookup("LedgerEntryExt")]]),e.struct("LedgerKeyAccount",[["accountId",e.lookup("AccountId")]]),e.struct("LedgerKeyTrustLine",[["accountId",e.lookup("AccountId")],["asset",e.lookup("TrustLineAsset")]]),e.struct("LedgerKeyOffer",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")]]),e.struct("LedgerKeyData",[["accountId",e.lookup("AccountId")],["dataName",e.lookup("String64")]]),e.struct("LedgerKeyClaimableBalance",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("LedgerKeyLiquidityPool",[["liquidityPoolId",e.lookup("PoolId")]]),e.union("LedgerKey",{switchOn:e.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["data","data"],["claimableBalance","claimableBalance"],["liquidityPool","liquidityPool"]],arms:{account:e.lookup("LedgerKeyAccount"),trustLine:e.lookup("LedgerKeyTrustLine"),offer:e.lookup("LedgerKeyOffer"),data:e.lookup("LedgerKeyData"),claimableBalance:e.lookup("LedgerKeyClaimableBalance"),liquidityPool:e.lookup("LedgerKeyLiquidityPool")}}),e.enum("EnvelopeType",{envelopeTypeTxV0:0,envelopeTypeScp:1,envelopeTypeTx:2,envelopeTypeAuth:3,envelopeTypeScpvalue:4,envelopeTypeTxFeeBump:5,envelopeTypeOpId:6,envelopeTypePoolRevokeOpId:7}),e.typedef("UpgradeType",e.varOpaque(128)),e.enum("StellarValueType",{stellarValueBasic:0,stellarValueSigned:1}),e.struct("LedgerCloseValueSignature",[["nodeId",e.lookup("NodeId")],["signature",e.lookup("Signature")]]),e.union("StellarValueExt",{switchOn:e.lookup("StellarValueType"),switchName:"v",switches:[["stellarValueBasic",e.void()],["stellarValueSigned","lcValueSignature"]],arms:{lcValueSignature:e.lookup("LedgerCloseValueSignature")}}),e.struct("StellarValue",[["txSetHash",e.lookup("Hash")],["closeTime",e.lookup("TimePoint")],["upgrades",e.varArray(e.lookup("UpgradeType"),6)],["ext",e.lookup("StellarValueExt")]]),e.const("MASK_LEDGERHEADER_FLAGS",7),e.enum("LedgerHeaderFlags",{disableLiquidityPoolTradingFlag:1,disableLiquidityPoolDepositFlag:2,disableLiquidityPoolWithdrawalFlag:4}),e.union("LedgerHeaderExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerHeaderExtensionV1",[["flags",e.lookup("Uint32")],["ext",e.lookup("LedgerHeaderExtensionV1Ext")]]),e.union("LedgerHeaderExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("LedgerHeaderExtensionV1")}}),e.struct("LedgerHeader",[["ledgerVersion",e.lookup("Uint32")],["previousLedgerHash",e.lookup("Hash")],["scpValue",e.lookup("StellarValue")],["txSetResultHash",e.lookup("Hash")],["bucketListHash",e.lookup("Hash")],["ledgerSeq",e.lookup("Uint32")],["totalCoins",e.lookup("Int64")],["feePool",e.lookup("Int64")],["inflationSeq",e.lookup("Uint32")],["idPool",e.lookup("Uint64")],["baseFee",e.lookup("Uint32")],["baseReserve",e.lookup("Uint32")],["maxTxSetSize",e.lookup("Uint32")],["skipList",e.array(e.lookup("Hash"),4)],["ext",e.lookup("LedgerHeaderExt")]]),e.enum("LedgerUpgradeType",{ledgerUpgradeVersion:1,ledgerUpgradeBaseFee:2,ledgerUpgradeMaxTxSetSize:3,ledgerUpgradeBaseReserve:4,ledgerUpgradeFlags:5}),e.union("LedgerUpgrade",{switchOn:e.lookup("LedgerUpgradeType"),switchName:"type",switches:[["ledgerUpgradeVersion","newLedgerVersion"],["ledgerUpgradeBaseFee","newBaseFee"],["ledgerUpgradeMaxTxSetSize","newMaxTxSetSize"],["ledgerUpgradeBaseReserve","newBaseReserve"],["ledgerUpgradeFlags","newFlags"]],arms:{newLedgerVersion:e.lookup("Uint32"),newBaseFee:e.lookup("Uint32"),newMaxTxSetSize:e.lookup("Uint32"),newBaseReserve:e.lookup("Uint32"),newFlags:e.lookup("Uint32")}}),e.enum("BucketEntryType",{metaentry:-1,liveentry:0,deadentry:1,initentry:2}),e.union("BucketMetadataExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("BucketMetadata",[["ledgerVersion",e.lookup("Uint32")],["ext",e.lookup("BucketMetadataExt")]]),e.union("BucketEntry",{switchOn:e.lookup("BucketEntryType"),switchName:"type",switches:[["liveentry","liveEntry"],["initentry","liveEntry"],["deadentry","deadEntry"],["metaentry","metaEntry"]],arms:{liveEntry:e.lookup("LedgerEntry"),deadEntry:e.lookup("LedgerKey"),metaEntry:e.lookup("BucketMetadata")}}),e.struct("TransactionSet",[["previousLedgerHash",e.lookup("Hash")],["txes",e.varArray(e.lookup("TransactionEnvelope"),2147483647)]]),e.struct("TransactionResultPair",[["transactionHash",e.lookup("Hash")],["result",e.lookup("TransactionResult")]]),e.struct("TransactionResultSet",[["results",e.varArray(e.lookup("TransactionResultPair"),2147483647)]]),e.union("TransactionHistoryEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionHistoryEntry",[["ledgerSeq",e.lookup("Uint32")],["txSet",e.lookup("TransactionSet")],["ext",e.lookup("TransactionHistoryEntryExt")]]),e.union("TransactionHistoryResultEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionHistoryResultEntry",[["ledgerSeq",e.lookup("Uint32")],["txResultSet",e.lookup("TransactionResultSet")],["ext",e.lookup("TransactionHistoryResultEntryExt")]]),e.union("LedgerHeaderHistoryEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerHeaderHistoryEntry",[["hash",e.lookup("Hash")],["header",e.lookup("LedgerHeader")],["ext",e.lookup("LedgerHeaderHistoryEntryExt")]]),e.struct("LedgerScpMessages",[["ledgerSeq",e.lookup("Uint32")],["messages",e.varArray(e.lookup("ScpEnvelope"),2147483647)]]),e.struct("ScpHistoryEntryV0",[["quorumSets",e.varArray(e.lookup("ScpQuorumSet"),2147483647)],["ledgerMessages",e.lookup("LedgerScpMessages")]]),e.union("ScpHistoryEntry",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("ScpHistoryEntryV0")}}),e.enum("LedgerEntryChangeType",{ledgerEntryCreated:0,ledgerEntryUpdated:1,ledgerEntryRemoved:2,ledgerEntryState:3}),e.union("LedgerEntryChange",{switchOn:e.lookup("LedgerEntryChangeType"),switchName:"type",switches:[["ledgerEntryCreated","created"],["ledgerEntryUpdated","updated"],["ledgerEntryRemoved","removed"],["ledgerEntryState","state"]],arms:{created:e.lookup("LedgerEntry"),updated:e.lookup("LedgerEntry"),removed:e.lookup("LedgerKey"),state:e.lookup("LedgerEntry")}}),e.typedef("LedgerEntryChanges",e.varArray(e.lookup("LedgerEntryChange"),2147483647)),e.struct("OperationMeta",[["changes",e.lookup("LedgerEntryChanges")]]),e.struct("TransactionMetaV1",[["txChanges",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),2147483647)]]),e.struct("TransactionMetaV2",[["txChangesBefore",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),2147483647)],["txChangesAfter",e.lookup("LedgerEntryChanges")]]),e.union("TransactionMeta",{switchOn:e.int(),switchName:"v",switches:[[0,"operations"],[1,"v1"],[2,"v2"]],arms:{operations:e.varArray(e.lookup("OperationMeta"),2147483647),v1:e.lookup("TransactionMetaV1"),v2:e.lookup("TransactionMetaV2")}}),e.struct("TransactionResultMeta",[["result",e.lookup("TransactionResultPair")],["feeProcessing",e.lookup("LedgerEntryChanges")],["txApplyProcessing",e.lookup("TransactionMeta")]]),e.struct("UpgradeEntryMeta",[["upgrade",e.lookup("LedgerUpgrade")],["changes",e.lookup("LedgerEntryChanges")]]),e.struct("LedgerCloseMetaV0",[["ledgerHeader",e.lookup("LedgerHeaderHistoryEntry")],["txSet",e.lookup("TransactionSet")],["txProcessing",e.varArray(e.lookup("TransactionResultMeta"),2147483647)],["upgradesProcessing",e.varArray(e.lookup("UpgradeEntryMeta"),2147483647)],["scpInfo",e.varArray(e.lookup("ScpHistoryEntry"),2147483647)]]),e.union("LedgerCloseMeta",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("LedgerCloseMetaV0")}}),e.enum("ErrorCode",{errMisc:0,errData:1,errConf:2,errAuth:3,errLoad:4}),e.struct("Error",[["code",e.lookup("ErrorCode")],["msg",e.string(100)]]),e.struct("AuthCert",[["pubkey",e.lookup("Curve25519Public")],["expiration",e.lookup("Uint64")],["sig",e.lookup("Signature")]]),e.struct("Hello",[["ledgerVersion",e.lookup("Uint32")],["overlayVersion",e.lookup("Uint32")],["overlayMinVersion",e.lookup("Uint32")],["networkId",e.lookup("Hash")],["versionStr",e.string(100)],["listeningPort",e.int()],["peerId",e.lookup("NodeId")],["cert",e.lookup("AuthCert")],["nonce",e.lookup("Uint256")]]),e.struct("Auth",[["unused",e.int()]]),e.enum("IpAddrType",{iPv4:0,iPv6:1}),e.union("PeerAddressIp",{switchOn:e.lookup("IpAddrType"),switchName:"type",switches:[["iPv4","ipv4"],["iPv6","ipv6"]],arms:{ipv4:e.opaque(4),ipv6:e.opaque(16)}}),e.struct("PeerAddress",[["ip",e.lookup("PeerAddressIp")],["port",e.lookup("Uint32")],["numFailures",e.lookup("Uint32")]]),e.enum("MessageType",{errorMsg:0,auth:2,dontHave:3,getPeers:4,peers:5,getTxSet:6,txSet:7,transaction:8,getScpQuorumset:9,scpQuorumset:10,scpMessage:11,getScpState:12,hello:13,surveyRequest:14,surveyResponse:15}),e.struct("DontHave",[["type",e.lookup("MessageType")],["reqHash",e.lookup("Uint256")]]),e.enum("SurveyMessageCommandType",{surveyTopology:0}),e.struct("SurveyRequestMessage",[["surveyorPeerId",e.lookup("NodeId")],["surveyedPeerId",e.lookup("NodeId")],["ledgerNum",e.lookup("Uint32")],["encryptionKey",e.lookup("Curve25519Public")],["commandType",e.lookup("SurveyMessageCommandType")]]),e.struct("SignedSurveyRequestMessage",[["requestSignature",e.lookup("Signature")],["request",e.lookup("SurveyRequestMessage")]]),e.typedef("EncryptedBody",e.varOpaque(64e3)),e.struct("SurveyResponseMessage",[["surveyorPeerId",e.lookup("NodeId")],["surveyedPeerId",e.lookup("NodeId")],["ledgerNum",e.lookup("Uint32")],["commandType",e.lookup("SurveyMessageCommandType")],["encryptedBody",e.lookup("EncryptedBody")]]),e.struct("SignedSurveyResponseMessage",[["responseSignature",e.lookup("Signature")],["response",e.lookup("SurveyResponseMessage")]]),e.struct("PeerStats",[["id",e.lookup("NodeId")],["versionStr",e.string(100)],["messagesRead",e.lookup("Uint64")],["messagesWritten",e.lookup("Uint64")],["bytesRead",e.lookup("Uint64")],["bytesWritten",e.lookup("Uint64")],["secondsConnected",e.lookup("Uint64")],["uniqueFloodBytesRecv",e.lookup("Uint64")],["duplicateFloodBytesRecv",e.lookup("Uint64")],["uniqueFetchBytesRecv",e.lookup("Uint64")],["duplicateFetchBytesRecv",e.lookup("Uint64")],["uniqueFloodMessageRecv",e.lookup("Uint64")],["duplicateFloodMessageRecv",e.lookup("Uint64")],["uniqueFetchMessageRecv",e.lookup("Uint64")],["duplicateFetchMessageRecv",e.lookup("Uint64")]]),e.typedef("PeerStatList",e.varArray(e.lookup("PeerStats"),25)),e.struct("TopologyResponseBody",[["inboundPeers",e.lookup("PeerStatList")],["outboundPeers",e.lookup("PeerStatList")],["totalInboundPeerCount",e.lookup("Uint32")],["totalOutboundPeerCount",e.lookup("Uint32")]]),e.union("SurveyResponseBody",{switchOn:e.lookup("SurveyMessageCommandType"),switchName:"type",switches:[["surveyTopology","topologyResponseBody"]],arms:{topologyResponseBody:e.lookup("TopologyResponseBody")}}),e.union("StellarMessage",{switchOn:e.lookup("MessageType"),switchName:"type",switches:[["errorMsg","error"],["hello","hello"],["auth","auth"],["dontHave","dontHave"],["getPeers",e.void()],["peers","peers"],["getTxSet","txSetHash"],["txSet","txSet"],["transaction","transaction"],["surveyRequest","signedSurveyRequestMessage"],["surveyResponse","signedSurveyResponseMessage"],["getScpQuorumset","qSetHash"],["scpQuorumset","qSet"],["scpMessage","envelope"],["getScpState","getScpLedgerSeq"]],arms:{error:e.lookup("Error"),hello:e.lookup("Hello"),auth:e.lookup("Auth"),dontHave:e.lookup("DontHave"),peers:e.varArray(e.lookup("PeerAddress"),100),txSetHash:e.lookup("Uint256"),txSet:e.lookup("TransactionSet"),transaction:e.lookup("TransactionEnvelope"),signedSurveyRequestMessage:e.lookup("SignedSurveyRequestMessage"),signedSurveyResponseMessage:e.lookup("SignedSurveyResponseMessage"),qSetHash:e.lookup("Uint256"),qSet:e.lookup("ScpQuorumSet"),envelope:e.lookup("ScpEnvelope"),getScpLedgerSeq:e.lookup("Uint32")}}),e.struct("AuthenticatedMessageV0",[["sequence",e.lookup("Uint64")],["message",e.lookup("StellarMessage")],["mac",e.lookup("HmacSha256Mac")]]),e.union("AuthenticatedMessage",{switchOn:e.lookup("Uint32"),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("AuthenticatedMessageV0")}}),e.typedef("Value",e.varOpaque()),e.struct("ScpBallot",[["counter",e.lookup("Uint32")],["value",e.lookup("Value")]]),e.enum("ScpStatementType",{scpStPrepare:0,scpStConfirm:1,scpStExternalize:2,scpStNominate:3}),e.struct("ScpNomination",[["quorumSetHash",e.lookup("Hash")],["votes",e.varArray(e.lookup("Value"),2147483647)],["accepted",e.varArray(e.lookup("Value"),2147483647)]]),e.struct("ScpStatementPrepare",[["quorumSetHash",e.lookup("Hash")],["ballot",e.lookup("ScpBallot")],["prepared",e.option(e.lookup("ScpBallot"))],["preparedPrime",e.option(e.lookup("ScpBallot"))],["nC",e.lookup("Uint32")],["nH",e.lookup("Uint32")]]),e.struct("ScpStatementConfirm",[["ballot",e.lookup("ScpBallot")],["nPrepared",e.lookup("Uint32")],["nCommit",e.lookup("Uint32")],["nH",e.lookup("Uint32")],["quorumSetHash",e.lookup("Hash")]]),e.struct("ScpStatementExternalize",[["commit",e.lookup("ScpBallot")],["nH",e.lookup("Uint32")],["commitQuorumSetHash",e.lookup("Hash")]]),e.union("ScpStatementPledges",{switchOn:e.lookup("ScpStatementType"),switchName:"type",switches:[["scpStPrepare","prepare"],["scpStConfirm","confirm"],["scpStExternalize","externalize"],["scpStNominate","nominate"]],arms:{prepare:e.lookup("ScpStatementPrepare"),confirm:e.lookup("ScpStatementConfirm"),externalize:e.lookup("ScpStatementExternalize"),nominate:e.lookup("ScpNomination")}}),e.struct("ScpStatement",[["nodeId",e.lookup("NodeId")],["slotIndex",e.lookup("Uint64")],["pledges",e.lookup("ScpStatementPledges")]]),e.struct("ScpEnvelope",[["statement",e.lookup("ScpStatement")],["signature",e.lookup("Signature")]]),e.struct("ScpQuorumSet",[["threshold",e.lookup("Uint32")],["validators",e.varArray(e.lookup("NodeId"),2147483647)],["innerSets",e.varArray(e.lookup("ScpQuorumSet"),2147483647)]]),e.union("LiquidityPoolParameters",{switchOn:e.lookup("LiquidityPoolType"),switchName:"type",switches:[["liquidityPoolConstantProduct","constantProduct"]],arms:{constantProduct:e.lookup("LiquidityPoolConstantProductParameters")}}),e.struct("MuxedAccountMed25519",[["id",e.lookup("Uint64")],["ed25519",e.lookup("Uint256")]]),e.union("MuxedAccount",{switchOn:e.lookup("CryptoKeyType"),switchName:"type",switches:[["keyTypeEd25519","ed25519"],["keyTypeMuxedEd25519","med25519"]],arms:{ed25519:e.lookup("Uint256"),med25519:e.lookup("MuxedAccountMed25519")}}),e.struct("DecoratedSignature",[["hint",e.lookup("SignatureHint")],["signature",e.lookup("Signature")]]),e.enum("OperationType",{createAccount:0,payment:1,pathPaymentStrictReceive:2,manageSellOffer:3,createPassiveSellOffer:4,setOptions:5,changeTrust:6,allowTrust:7,accountMerge:8,inflation:9,manageData:10,bumpSequence:11,manageBuyOffer:12,pathPaymentStrictSend:13,createClaimableBalance:14,claimClaimableBalance:15,beginSponsoringFutureReserves:16,endSponsoringFutureReserves:17,revokeSponsorship:18,clawback:19,clawbackClaimableBalance:20,setTrustLineFlags:21,liquidityPoolDeposit:22,liquidityPoolWithdraw:23}),e.struct("CreateAccountOp",[["destination",e.lookup("AccountId")],["startingBalance",e.lookup("Int64")]]),e.struct("PaymentOp",[["destination",e.lookup("MuxedAccount")],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")]]),e.struct("PathPaymentStrictReceiveOp",[["sendAsset",e.lookup("Asset")],["sendMax",e.lookup("Int64")],["destination",e.lookup("MuxedAccount")],["destAsset",e.lookup("Asset")],["destAmount",e.lookup("Int64")],["path",e.varArray(e.lookup("Asset"),5)]]),e.struct("PathPaymentStrictSendOp",[["sendAsset",e.lookup("Asset")],["sendAmount",e.lookup("Int64")],["destination",e.lookup("MuxedAccount")],["destAsset",e.lookup("Asset")],["destMin",e.lookup("Int64")],["path",e.varArray(e.lookup("Asset"),5)]]),e.struct("ManageSellOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")],["offerId",e.lookup("Int64")]]),e.struct("ManageBuyOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["buyAmount",e.lookup("Int64")],["price",e.lookup("Price")],["offerId",e.lookup("Int64")]]),e.struct("CreatePassiveSellOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")]]),e.struct("SetOptionsOp",[["inflationDest",e.option(e.lookup("AccountId"))],["clearFlags",e.option(e.lookup("Uint32"))],["setFlags",e.option(e.lookup("Uint32"))],["masterWeight",e.option(e.lookup("Uint32"))],["lowThreshold",e.option(e.lookup("Uint32"))],["medThreshold",e.option(e.lookup("Uint32"))],["highThreshold",e.option(e.lookup("Uint32"))],["homeDomain",e.option(e.lookup("String32"))],["signer",e.option(e.lookup("Signer"))]]),e.union("ChangeTrustAsset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",e.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"],["assetTypePoolShare","liquidityPool"]],arms:{alphaNum4:e.lookup("AlphaNum4"),alphaNum12:e.lookup("AlphaNum12"),liquidityPool:e.lookup("LiquidityPoolParameters")}}),e.struct("ChangeTrustOp",[["line",e.lookup("ChangeTrustAsset")],["limit",e.lookup("Int64")]]),e.struct("AllowTrustOp",[["trustor",e.lookup("AccountId")],["asset",e.lookup("AssetCode")],["authorize",e.lookup("Uint32")]]),e.struct("ManageDataOp",[["dataName",e.lookup("String64")],["dataValue",e.option(e.lookup("DataValue"))]]),e.struct("BumpSequenceOp",[["bumpTo",e.lookup("SequenceNumber")]]),e.struct("CreateClaimableBalanceOp",[["asset",e.lookup("Asset")],["amount",e.lookup("Int64")],["claimants",e.varArray(e.lookup("Claimant"),10)]]),e.struct("ClaimClaimableBalanceOp",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("BeginSponsoringFutureReservesOp",[["sponsoredId",e.lookup("AccountId")]]),e.enum("RevokeSponsorshipType",{revokeSponsorshipLedgerEntry:0,revokeSponsorshipSigner:1}),e.struct("RevokeSponsorshipOpSigner",[["accountId",e.lookup("AccountId")],["signerKey",e.lookup("SignerKey")]]),e.union("RevokeSponsorshipOp",{switchOn:e.lookup("RevokeSponsorshipType"),switchName:"type",switches:[["revokeSponsorshipLedgerEntry","ledgerKey"],["revokeSponsorshipSigner","signer"]],arms:{ledgerKey:e.lookup("LedgerKey"),signer:e.lookup("RevokeSponsorshipOpSigner")}}),e.struct("ClawbackOp",[["asset",e.lookup("Asset")],["from",e.lookup("MuxedAccount")],["amount",e.lookup("Int64")]]),e.struct("ClawbackClaimableBalanceOp",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("SetTrustLineFlagsOp",[["trustor",e.lookup("AccountId")],["asset",e.lookup("Asset")],["clearFlags",e.lookup("Uint32")],["setFlags",e.lookup("Uint32")]]),e.const("LIQUIDITY_POOL_FEE_V18",30),e.struct("LiquidityPoolDepositOp",[["liquidityPoolId",e.lookup("PoolId")],["maxAmountA",e.lookup("Int64")],["maxAmountB",e.lookup("Int64")],["minPrice",e.lookup("Price")],["maxPrice",e.lookup("Price")]]),e.struct("LiquidityPoolWithdrawOp",[["liquidityPoolId",e.lookup("PoolId")],["amount",e.lookup("Int64")],["minAmountA",e.lookup("Int64")],["minAmountB",e.lookup("Int64")]]),e.union("OperationBody",{switchOn:e.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountOp"],["payment","paymentOp"],["pathPaymentStrictReceive","pathPaymentStrictReceiveOp"],["manageSellOffer","manageSellOfferOp"],["createPassiveSellOffer","createPassiveSellOfferOp"],["setOptions","setOptionsOp"],["changeTrust","changeTrustOp"],["allowTrust","allowTrustOp"],["accountMerge","destination"],["inflation",e.void()],["manageData","manageDataOp"],["bumpSequence","bumpSequenceOp"],["manageBuyOffer","manageBuyOfferOp"],["pathPaymentStrictSend","pathPaymentStrictSendOp"],["createClaimableBalance","createClaimableBalanceOp"],["claimClaimableBalance","claimClaimableBalanceOp"],["beginSponsoringFutureReserves","beginSponsoringFutureReservesOp"],["endSponsoringFutureReserves",e.void()],["revokeSponsorship","revokeSponsorshipOp"],["clawback","clawbackOp"],["clawbackClaimableBalance","clawbackClaimableBalanceOp"],["setTrustLineFlags","setTrustLineFlagsOp"],["liquidityPoolDeposit","liquidityPoolDepositOp"],["liquidityPoolWithdraw","liquidityPoolWithdrawOp"]],arms:{createAccountOp:e.lookup("CreateAccountOp"),paymentOp:e.lookup("PaymentOp"),pathPaymentStrictReceiveOp:e.lookup("PathPaymentStrictReceiveOp"),manageSellOfferOp:e.lookup("ManageSellOfferOp"),createPassiveSellOfferOp:e.lookup("CreatePassiveSellOfferOp"),setOptionsOp:e.lookup("SetOptionsOp"),changeTrustOp:e.lookup("ChangeTrustOp"),allowTrustOp:e.lookup("AllowTrustOp"),destination:e.lookup("MuxedAccount"),manageDataOp:e.lookup("ManageDataOp"),bumpSequenceOp:e.lookup("BumpSequenceOp"),manageBuyOfferOp:e.lookup("ManageBuyOfferOp"),pathPaymentStrictSendOp:e.lookup("PathPaymentStrictSendOp"),createClaimableBalanceOp:e.lookup("CreateClaimableBalanceOp"),claimClaimableBalanceOp:e.lookup("ClaimClaimableBalanceOp"),beginSponsoringFutureReservesOp:e.lookup("BeginSponsoringFutureReservesOp"),revokeSponsorshipOp:e.lookup("RevokeSponsorshipOp"),clawbackOp:e.lookup("ClawbackOp"),clawbackClaimableBalanceOp:e.lookup("ClawbackClaimableBalanceOp"),setTrustLineFlagsOp:e.lookup("SetTrustLineFlagsOp"),liquidityPoolDepositOp:e.lookup("LiquidityPoolDepositOp"),liquidityPoolWithdrawOp:e.lookup("LiquidityPoolWithdrawOp")}}),e.struct("Operation",[["sourceAccount",e.option(e.lookup("MuxedAccount"))],["body",e.lookup("OperationBody")]]),e.struct("OperationIdId",[["sourceAccount",e.lookup("AccountId")],["seqNum",e.lookup("SequenceNumber")],["opNum",e.lookup("Uint32")]]),e.struct("OperationIdRevokeId",[["sourceAccount",e.lookup("AccountId")],["seqNum",e.lookup("SequenceNumber")],["opNum",e.lookup("Uint32")],["liquidityPoolId",e.lookup("PoolId")],["asset",e.lookup("Asset")]]),e.union("OperationId",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeOpId","id"],["envelopeTypePoolRevokeOpId","revokeId"]],arms:{id:e.lookup("OperationIdId"),revokeId:e.lookup("OperationIdRevokeId")}}),e.enum("MemoType",{memoNone:0,memoText:1,memoId:2,memoHash:3,memoReturn:4}),e.union("Memo",{switchOn:e.lookup("MemoType"),switchName:"type",switches:[["memoNone",e.void()],["memoText","text"],["memoId","id"],["memoHash","hash"],["memoReturn","retHash"]],arms:{text:e.string(28),id:e.lookup("Uint64"),hash:e.lookup("Hash"),retHash:e.lookup("Hash")}}),e.struct("TimeBounds",[["minTime",e.lookup("TimePoint")],["maxTime",e.lookup("TimePoint")]]),e.const("MAX_OPS_PER_TX",100),e.union("TransactionV0Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionV0",[["sourceAccountEd25519",e.lookup("Uint256")],["fee",e.lookup("Uint32")],["seqNum",e.lookup("SequenceNumber")],["timeBounds",e.option(e.lookup("TimeBounds"))],["memo",e.lookup("Memo")],["operations",e.varArray(e.lookup("Operation"),e.lookup("MAX_OPS_PER_TX"))],["ext",e.lookup("TransactionV0Ext")]]),e.struct("TransactionV0Envelope",[["tx",e.lookup("TransactionV0")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("TransactionExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("Transaction",[["sourceAccount",e.lookup("MuxedAccount")],["fee",e.lookup("Uint32")],["seqNum",e.lookup("SequenceNumber")],["timeBounds",e.option(e.lookup("TimeBounds"))],["memo",e.lookup("Memo")],["operations",e.varArray(e.lookup("Operation"),e.lookup("MAX_OPS_PER_TX"))],["ext",e.lookup("TransactionExt")]]),e.struct("TransactionV1Envelope",[["tx",e.lookup("Transaction")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("FeeBumpTransactionInnerTx",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","v1"]],arms:{v1:e.lookup("TransactionV1Envelope")}}),e.union("FeeBumpTransactionExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("FeeBumpTransaction",[["feeSource",e.lookup("MuxedAccount")],["fee",e.lookup("Int64")],["innerTx",e.lookup("FeeBumpTransactionInnerTx")],["ext",e.lookup("FeeBumpTransactionExt")]]),e.struct("FeeBumpTransactionEnvelope",[["tx",e.lookup("FeeBumpTransaction")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("TransactionEnvelope",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTxV0","v0"],["envelopeTypeTx","v1"],["envelopeTypeTxFeeBump","feeBump"]],arms:{v0:e.lookup("TransactionV0Envelope"),v1:e.lookup("TransactionV1Envelope"),feeBump:e.lookup("FeeBumpTransactionEnvelope")}}),e.union("TransactionSignaturePayloadTaggedTransaction",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","tx"],["envelopeTypeTxFeeBump","feeBump"]],arms:{tx:e.lookup("Transaction"),feeBump:e.lookup("FeeBumpTransaction")}}),e.struct("TransactionSignaturePayload",[["networkId",e.lookup("Hash")],["taggedTransaction",e.lookup("TransactionSignaturePayloadTaggedTransaction")]]),e.enum("ClaimAtomType",{claimAtomTypeV0:0,claimAtomTypeOrderBook:1,claimAtomTypeLiquidityPool:2}),e.struct("ClaimOfferAtomV0",[["sellerEd25519",e.lookup("Uint256")],["offerId",e.lookup("Int64")],["assetSold",e.lookup("Asset")],["amountSold",e.lookup("Int64")],["assetBought",e.lookup("Asset")],["amountBought",e.lookup("Int64")]]),e.struct("ClaimOfferAtom",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")],["assetSold",e.lookup("Asset")],["amountSold",e.lookup("Int64")],["assetBought",e.lookup("Asset")],["amountBought",e.lookup("Int64")]]),e.struct("ClaimLiquidityAtom",[["liquidityPoolId",e.lookup("PoolId")],["assetSold",e.lookup("Asset")],["amountSold",e.lookup("Int64")],["assetBought",e.lookup("Asset")],["amountBought",e.lookup("Int64")]]),e.union("ClaimAtom",{switchOn:e.lookup("ClaimAtomType"),switchName:"type",switches:[["claimAtomTypeV0","v0"],["claimAtomTypeOrderBook","orderBook"],["claimAtomTypeLiquidityPool","liquidityPool"]],arms:{v0:e.lookup("ClaimOfferAtomV0"),orderBook:e.lookup("ClaimOfferAtom"),liquidityPool:e.lookup("ClaimLiquidityAtom")}}),e.enum("CreateAccountResultCode",{createAccountSuccess:0,createAccountMalformed:-1,createAccountUnderfunded:-2,createAccountLowReserve:-3,createAccountAlreadyExist:-4}),e.union("CreateAccountResult",{switchOn:e.lookup("CreateAccountResultCode"),switchName:"code",switches:[["createAccountSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("PaymentResultCode",{paymentSuccess:0,paymentMalformed:-1,paymentUnderfunded:-2,paymentSrcNoTrust:-3,paymentSrcNotAuthorized:-4,paymentNoDestination:-5,paymentNoTrust:-6,paymentNotAuthorized:-7,paymentLineFull:-8,paymentNoIssuer:-9}),e.union("PaymentResult",{switchOn:e.lookup("PaymentResultCode"),switchName:"code",switches:[["paymentSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("PathPaymentStrictReceiveResultCode",{pathPaymentStrictReceiveSuccess:0,pathPaymentStrictReceiveMalformed:-1,pathPaymentStrictReceiveUnderfunded:-2,pathPaymentStrictReceiveSrcNoTrust:-3,pathPaymentStrictReceiveSrcNotAuthorized:-4,pathPaymentStrictReceiveNoDestination:-5,pathPaymentStrictReceiveNoTrust:-6,pathPaymentStrictReceiveNotAuthorized:-7,pathPaymentStrictReceiveLineFull:-8,pathPaymentStrictReceiveNoIssuer:-9,pathPaymentStrictReceiveTooFewOffers:-10,pathPaymentStrictReceiveOfferCrossSelf:-11,pathPaymentStrictReceiveOverSendmax:-12}),e.struct("SimplePaymentResult",[["destination",e.lookup("AccountId")],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")]]),e.struct("PathPaymentStrictReceiveResultSuccess",[["offers",e.varArray(e.lookup("ClaimAtom"),2147483647)],["last",e.lookup("SimplePaymentResult")]]),e.union("PathPaymentStrictReceiveResult",{switchOn:e.lookup("PathPaymentStrictReceiveResultCode"),switchName:"code",switches:[["pathPaymentStrictReceiveSuccess","success"],["pathPaymentStrictReceiveNoIssuer","noIssuer"]],arms:{success:e.lookup("PathPaymentStrictReceiveResultSuccess"),noIssuer:e.lookup("Asset")},defaultArm:e.void()}),e.enum("PathPaymentStrictSendResultCode",{pathPaymentStrictSendSuccess:0,pathPaymentStrictSendMalformed:-1,pathPaymentStrictSendUnderfunded:-2,pathPaymentStrictSendSrcNoTrust:-3,pathPaymentStrictSendSrcNotAuthorized:-4,pathPaymentStrictSendNoDestination:-5,pathPaymentStrictSendNoTrust:-6,pathPaymentStrictSendNotAuthorized:-7,pathPaymentStrictSendLineFull:-8,pathPaymentStrictSendNoIssuer:-9,pathPaymentStrictSendTooFewOffers:-10,pathPaymentStrictSendOfferCrossSelf:-11,pathPaymentStrictSendUnderDestmin:-12}),e.struct("PathPaymentStrictSendResultSuccess",[["offers",e.varArray(e.lookup("ClaimAtom"),2147483647)],["last",e.lookup("SimplePaymentResult")]]),e.union("PathPaymentStrictSendResult",{switchOn:e.lookup("PathPaymentStrictSendResultCode"),switchName:"code",switches:[["pathPaymentStrictSendSuccess","success"],["pathPaymentStrictSendNoIssuer","noIssuer"]],arms:{success:e.lookup("PathPaymentStrictSendResultSuccess"),noIssuer:e.lookup("Asset")},defaultArm:e.void()}),e.enum("ManageSellOfferResultCode",{manageSellOfferSuccess:0,manageSellOfferMalformed:-1,manageSellOfferSellNoTrust:-2,manageSellOfferBuyNoTrust:-3,manageSellOfferSellNotAuthorized:-4,manageSellOfferBuyNotAuthorized:-5,manageSellOfferLineFull:-6,manageSellOfferUnderfunded:-7,manageSellOfferCrossSelf:-8,manageSellOfferSellNoIssuer:-9,manageSellOfferBuyNoIssuer:-10,manageSellOfferNotFound:-11,manageSellOfferLowReserve:-12}),e.enum("ManageOfferEffect",{manageOfferCreated:0,manageOfferUpdated:1,manageOfferDeleted:2}),e.union("ManageOfferSuccessResultOffer",{switchOn:e.lookup("ManageOfferEffect"),switchName:"effect",switches:[["manageOfferCreated","offer"],["manageOfferUpdated","offer"]],arms:{offer:e.lookup("OfferEntry")},defaultArm:e.void()}),e.struct("ManageOfferSuccessResult",[["offersClaimed",e.varArray(e.lookup("ClaimAtom"),2147483647)],["offer",e.lookup("ManageOfferSuccessResultOffer")]]),e.union("ManageSellOfferResult",{switchOn:e.lookup("ManageSellOfferResultCode"),switchName:"code",switches:[["manageSellOfferSuccess","success"]],arms:{success:e.lookup("ManageOfferSuccessResult")},defaultArm:e.void()}),e.enum("ManageBuyOfferResultCode",{manageBuyOfferSuccess:0,manageBuyOfferMalformed:-1,manageBuyOfferSellNoTrust:-2,manageBuyOfferBuyNoTrust:-3,manageBuyOfferSellNotAuthorized:-4,manageBuyOfferBuyNotAuthorized:-5,manageBuyOfferLineFull:-6,manageBuyOfferUnderfunded:-7,manageBuyOfferCrossSelf:-8,manageBuyOfferSellNoIssuer:-9,manageBuyOfferBuyNoIssuer:-10,manageBuyOfferNotFound:-11,manageBuyOfferLowReserve:-12}),e.union("ManageBuyOfferResult",{switchOn:e.lookup("ManageBuyOfferResultCode"),switchName:"code",switches:[["manageBuyOfferSuccess","success"]],arms:{success:e.lookup("ManageOfferSuccessResult")},defaultArm:e.void()}),e.enum("SetOptionsResultCode",{setOptionsSuccess:0,setOptionsLowReserve:-1,setOptionsTooManySigners:-2,setOptionsBadFlags:-3,setOptionsInvalidInflation:-4,setOptionsCantChange:-5,setOptionsUnknownFlag:-6,setOptionsThresholdOutOfRange:-7,setOptionsBadSigner:-8,setOptionsInvalidHomeDomain:-9,setOptionsAuthRevocableRequired:-10}),e.union("SetOptionsResult",{switchOn:e.lookup("SetOptionsResultCode"),switchName:"code",switches:[["setOptionsSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("ChangeTrustResultCode",{changeTrustSuccess:0,changeTrustMalformed:-1,changeTrustNoIssuer:-2,changeTrustInvalidLimit:-3,changeTrustLowReserve:-4,changeTrustSelfNotAllowed:-5,changeTrustTrustLineMissing:-6,changeTrustCannotDelete:-7,changeTrustNotAuthMaintainLiabilities:-8}),e.union("ChangeTrustResult",{switchOn:e.lookup("ChangeTrustResultCode"),switchName:"code",switches:[["changeTrustSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("AllowTrustResultCode",{allowTrustSuccess:0,allowTrustMalformed:-1,allowTrustNoTrustLine:-2,allowTrustTrustNotRequired:-3,allowTrustCantRevoke:-4,allowTrustSelfNotAllowed:-5,allowTrustLowReserve:-6}),e.union("AllowTrustResult",{switchOn:e.lookup("AllowTrustResultCode"),switchName:"code",switches:[["allowTrustSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("AccountMergeResultCode",{accountMergeSuccess:0,accountMergeMalformed:-1,accountMergeNoAccount:-2,accountMergeImmutableSet:-3,accountMergeHasSubEntries:-4,accountMergeSeqnumTooFar:-5,accountMergeDestFull:-6,accountMergeIsSponsor:-7}),e.union("AccountMergeResult",{switchOn:e.lookup("AccountMergeResultCode"),switchName:"code",switches:[["accountMergeSuccess","sourceAccountBalance"]],arms:{sourceAccountBalance:e.lookup("Int64")},defaultArm:e.void()}),e.enum("InflationResultCode",{inflationSuccess:0,inflationNotTime:-1}),e.struct("InflationPayout",[["destination",e.lookup("AccountId")],["amount",e.lookup("Int64")]]),e.union("InflationResult",{switchOn:e.lookup("InflationResultCode"),switchName:"code",switches:[["inflationSuccess","payouts"]],arms:{payouts:e.varArray(e.lookup("InflationPayout"),2147483647)},defaultArm:e.void()}),e.enum("ManageDataResultCode",{manageDataSuccess:0,manageDataNotSupportedYet:-1,manageDataNameNotFound:-2,manageDataLowReserve:-3,manageDataInvalidName:-4}),e.union("ManageDataResult",{switchOn:e.lookup("ManageDataResultCode"),switchName:"code",switches:[["manageDataSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("BumpSequenceResultCode",{bumpSequenceSuccess:0,bumpSequenceBadSeq:-1}),e.union("BumpSequenceResult",{switchOn:e.lookup("BumpSequenceResultCode"),switchName:"code",switches:[["bumpSequenceSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("CreateClaimableBalanceResultCode",{createClaimableBalanceSuccess:0,createClaimableBalanceMalformed:-1,createClaimableBalanceLowReserve:-2,createClaimableBalanceNoTrust:-3,createClaimableBalanceNotAuthorized:-4,createClaimableBalanceUnderfunded:-5}),e.union("CreateClaimableBalanceResult",{switchOn:e.lookup("CreateClaimableBalanceResultCode"),switchName:"code",switches:[["createClaimableBalanceSuccess","balanceId"]],arms:{balanceId:e.lookup("ClaimableBalanceId")},defaultArm:e.void()}),e.enum("ClaimClaimableBalanceResultCode",{claimClaimableBalanceSuccess:0,claimClaimableBalanceDoesNotExist:-1,claimClaimableBalanceCannotClaim:-2,claimClaimableBalanceLineFull:-3,claimClaimableBalanceNoTrust:-4,claimClaimableBalanceNotAuthorized:-5}),e.union("ClaimClaimableBalanceResult",{switchOn:e.lookup("ClaimClaimableBalanceResultCode"),switchName:"code",switches:[["claimClaimableBalanceSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("BeginSponsoringFutureReservesResultCode",{beginSponsoringFutureReservesSuccess:0,beginSponsoringFutureReservesMalformed:-1,beginSponsoringFutureReservesAlreadySponsored:-2,beginSponsoringFutureReservesRecursive:-3}),e.union("BeginSponsoringFutureReservesResult",{switchOn:e.lookup("BeginSponsoringFutureReservesResultCode"),switchName:"code",switches:[["beginSponsoringFutureReservesSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("EndSponsoringFutureReservesResultCode",{endSponsoringFutureReservesSuccess:0,endSponsoringFutureReservesNotSponsored:-1}),e.union("EndSponsoringFutureReservesResult",{switchOn:e.lookup("EndSponsoringFutureReservesResultCode"),switchName:"code",switches:[["endSponsoringFutureReservesSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("RevokeSponsorshipResultCode",{revokeSponsorshipSuccess:0,revokeSponsorshipDoesNotExist:-1,revokeSponsorshipNotSponsor:-2,revokeSponsorshipLowReserve:-3,revokeSponsorshipOnlyTransferable:-4,revokeSponsorshipMalformed:-5}),e.union("RevokeSponsorshipResult",{switchOn:e.lookup("RevokeSponsorshipResultCode"),switchName:"code",switches:[["revokeSponsorshipSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("ClawbackResultCode",{clawbackSuccess:0,clawbackMalformed:-1,clawbackNotClawbackEnabled:-2,clawbackNoTrust:-3,clawbackUnderfunded:-4}),e.union("ClawbackResult",{switchOn:e.lookup("ClawbackResultCode"),switchName:"code",switches:[["clawbackSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("ClawbackClaimableBalanceResultCode",{clawbackClaimableBalanceSuccess:0,clawbackClaimableBalanceDoesNotExist:-1,clawbackClaimableBalanceNotIssuer:-2,clawbackClaimableBalanceNotClawbackEnabled:-3}),e.union("ClawbackClaimableBalanceResult",{switchOn:e.lookup("ClawbackClaimableBalanceResultCode"),switchName:"code",switches:[["clawbackClaimableBalanceSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("SetTrustLineFlagsResultCode",{setTrustLineFlagsSuccess:0,setTrustLineFlagsMalformed:-1,setTrustLineFlagsNoTrustLine:-2,setTrustLineFlagsCantRevoke:-3,setTrustLineFlagsInvalidState:-4,setTrustLineFlagsLowReserve:-5}),e.union("SetTrustLineFlagsResult",{switchOn:e.lookup("SetTrustLineFlagsResultCode"),switchName:"code",switches:[["setTrustLineFlagsSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("LiquidityPoolDepositResultCode",{liquidityPoolDepositSuccess:0,liquidityPoolDepositMalformed:-1,liquidityPoolDepositNoTrust:-2,liquidityPoolDepositNotAuthorized:-3,liquidityPoolDepositUnderfunded:-4,liquidityPoolDepositLineFull:-5,liquidityPoolDepositBadPrice:-6,liquidityPoolDepositPoolFull:-7}),e.union("LiquidityPoolDepositResult",{switchOn:e.lookup("LiquidityPoolDepositResultCode"),switchName:"code",switches:[["liquidityPoolDepositSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("LiquidityPoolWithdrawResultCode",{liquidityPoolWithdrawSuccess:0,liquidityPoolWithdrawMalformed:-1,liquidityPoolWithdrawNoTrust:-2,liquidityPoolWithdrawUnderfunded:-3,liquidityPoolWithdrawLineFull:-4,liquidityPoolWithdrawUnderMinimum:-5}),e.union("LiquidityPoolWithdrawResult",{switchOn:e.lookup("LiquidityPoolWithdrawResultCode"),switchName:"code",switches:[["liquidityPoolWithdrawSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("OperationResultCode",{opInner:0,opBadAuth:-1,opNoAccount:-2,opNotSupported:-3,opTooManySubentries:-4,opExceededWorkLimit:-5,opTooManySponsoring:-6}),e.union("OperationResultTr",{switchOn:e.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountResult"],["payment","paymentResult"],["pathPaymentStrictReceive","pathPaymentStrictReceiveResult"],["manageSellOffer","manageSellOfferResult"],["createPassiveSellOffer","createPassiveSellOfferResult"],["setOptions","setOptionsResult"],["changeTrust","changeTrustResult"],["allowTrust","allowTrustResult"],["accountMerge","accountMergeResult"],["inflation","inflationResult"],["manageData","manageDataResult"],["bumpSequence","bumpSeqResult"],["manageBuyOffer","manageBuyOfferResult"],["pathPaymentStrictSend","pathPaymentStrictSendResult"],["createClaimableBalance","createClaimableBalanceResult"],["claimClaimableBalance","claimClaimableBalanceResult"],["beginSponsoringFutureReserves","beginSponsoringFutureReservesResult"],["endSponsoringFutureReserves","endSponsoringFutureReservesResult"],["revokeSponsorship","revokeSponsorshipResult"],["clawback","clawbackResult"],["clawbackClaimableBalance","clawbackClaimableBalanceResult"],["setTrustLineFlags","setTrustLineFlagsResult"],["liquidityPoolDeposit","liquidityPoolDepositResult"],["liquidityPoolWithdraw","liquidityPoolWithdrawResult"]],arms:{createAccountResult:e.lookup("CreateAccountResult"),paymentResult:e.lookup("PaymentResult"),pathPaymentStrictReceiveResult:e.lookup("PathPaymentStrictReceiveResult"),manageSellOfferResult:e.lookup("ManageSellOfferResult"),createPassiveSellOfferResult:e.lookup("ManageSellOfferResult"),setOptionsResult:e.lookup("SetOptionsResult"),changeTrustResult:e.lookup("ChangeTrustResult"),allowTrustResult:e.lookup("AllowTrustResult"),accountMergeResult:e.lookup("AccountMergeResult"),inflationResult:e.lookup("InflationResult"),manageDataResult:e.lookup("ManageDataResult"),bumpSeqResult:e.lookup("BumpSequenceResult"),manageBuyOfferResult:e.lookup("ManageBuyOfferResult"),pathPaymentStrictSendResult:e.lookup("PathPaymentStrictSendResult"),createClaimableBalanceResult:e.lookup("CreateClaimableBalanceResult"),claimClaimableBalanceResult:e.lookup("ClaimClaimableBalanceResult"),beginSponsoringFutureReservesResult:e.lookup("BeginSponsoringFutureReservesResult"),endSponsoringFutureReservesResult:e.lookup("EndSponsoringFutureReservesResult"),revokeSponsorshipResult:e.lookup("RevokeSponsorshipResult"),clawbackResult:e.lookup("ClawbackResult"),clawbackClaimableBalanceResult:e.lookup("ClawbackClaimableBalanceResult"),setTrustLineFlagsResult:e.lookup("SetTrustLineFlagsResult"),liquidityPoolDepositResult:e.lookup("LiquidityPoolDepositResult"),liquidityPoolWithdrawResult:e.lookup("LiquidityPoolWithdrawResult")}}),e.union("OperationResult",{switchOn:e.lookup("OperationResultCode"),switchName:"code",switches:[["opInner","tr"]],arms:{tr:e.lookup("OperationResultTr")},defaultArm:e.void()}),e.enum("TransactionResultCode",{txFeeBumpInnerSuccess:1,txSuccess:0,txFailed:-1,txTooEarly:-2,txTooLate:-3,txMissingOperation:-4,txBadSeq:-5,txBadAuth:-6,txInsufficientBalance:-7,txNoAccount:-8,txInsufficientFee:-9,txBadAuthExtra:-10,txInternalError:-11,txNotSupported:-12,txFeeBumpInnerFailed:-13,txBadSponsorship:-14}),e.union("InnerTransactionResultResult",{switchOn:e.lookup("TransactionResultCode"),switchName:"code",switches:[["txSuccess","results"],["txFailed","results"],["txTooEarly",e.void()],["txTooLate",e.void()],["txMissingOperation",e.void()],["txBadSeq",e.void()],["txBadAuth",e.void()],["txInsufficientBalance",e.void()],["txNoAccount",e.void()],["txInsufficientFee",e.void()],["txBadAuthExtra",e.void()],["txInternalError",e.void()],["txNotSupported",e.void()],["txBadSponsorship",e.void()]],arms:{results:e.varArray(e.lookup("OperationResult"),2147483647)}}),e.union("InnerTransactionResultExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("InnerTransactionResult",[["feeCharged",e.lookup("Int64")],["result",e.lookup("InnerTransactionResultResult")],["ext",e.lookup("InnerTransactionResultExt")]]),e.struct("InnerTransactionResultPair",[["transactionHash",e.lookup("Hash")],["result",e.lookup("InnerTransactionResult")]]),e.union("TransactionResultResult",{switchOn:e.lookup("TransactionResultCode"),switchName:"code",switches:[["txFeeBumpInnerSuccess","innerResultPair"],["txFeeBumpInnerFailed","innerResultPair"],["txSuccess","results"],["txFailed","results"]],arms:{innerResultPair:e.lookup("InnerTransactionResultPair"),results:e.varArray(e.lookup("OperationResult"),2147483647)},defaultArm:e.void()}),e.union("TransactionResultExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionResult",[["feeCharged",e.lookup("Int64")],["result",e.lookup("TransactionResultResult")],["ext",e.lookup("TransactionResultExt")]]),e.typedef("Hash",e.opaque(32)),e.typedef("Uint256",e.opaque(32)),e.typedef("Uint32",e.uint()),e.typedef("Int32",e.int()),e.typedef("Uint64",e.uhyper()),e.typedef("Int64",e.hyper()),e.enum("CryptoKeyType",{keyTypeEd25519:0,keyTypePreAuthTx:1,keyTypeHashX:2,keyTypeMuxedEd25519:256}),e.enum("PublicKeyType",{publicKeyTypeEd25519:0}),e.enum("SignerKeyType",{signerKeyTypeEd25519:0,signerKeyTypePreAuthTx:1,signerKeyTypeHashX:2}),e.union("PublicKey",{switchOn:e.lookup("PublicKeyType"),switchName:"type",switches:[["publicKeyTypeEd25519","ed25519"]],arms:{ed25519:e.lookup("Uint256")}}),e.union("SignerKey",{switchOn:e.lookup("SignerKeyType"),switchName:"type",switches:[["signerKeyTypeEd25519","ed25519"],["signerKeyTypePreAuthTx","preAuthTx"],["signerKeyTypeHashX","hashX"]],arms:{ed25519:e.lookup("Uint256"),preAuthTx:e.lookup("Uint256"),hashX:e.lookup("Uint256")}}),e.typedef("Signature",e.varOpaque(64)),e.typedef("SignatureHint",e.opaque(4)),e.typedef("NodeId",e.lookup("PublicKey")),e.struct("Curve25519Secret",[["key",e.opaque(32)]]),e.struct("Curve25519Public",[["key",e.opaque(32)]]),e.struct("HmacSha256Key",[["key",e.opaque(32)]]),e.struct("HmacSha256Mac",[["mac",e.opaque(32)]])}));t.default=n},"./node_modules/stellar-base/lib/get_liquidity_pool_id.js":(e,t,r)=>{"use strict";var n=r("./node_modules/buffer/index.js").Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.LiquidityPoolFeeV18=void 0,t.getLiquidityPoolId=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("constant_product"!==e)throw new Error("liquidityPoolType is invalid");var r=t.assetA,o=t.assetB,i=t.fee;if(!(r&&r instanceof a.Asset))throw new Error("assetA is invalid");if(!(o&&o instanceof a.Asset))throw new Error("assetB is invalid");if(!i||i!==l)throw new Error("fee is invalid");if(-1!==a.Asset.compare(r,o))throw new Error("Assets are not in lexicographic order");var c=s.default.LiquidityPoolType.liquidityPoolConstantProduct().toXDR(),d=new s.default.LiquidityPoolConstantProductParameters({assetA:r.toXDRObject(),assetB:o.toXDRObject(),fee:i}).toXDR(),h=n.concat([c,d]);return(0,u.hash)(h)};var o,i=r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"),s=(o=i)&&o.__esModule?o:{default:o},a=r("./node_modules/stellar-base/lib/asset.js"),u=r("./node_modules/stellar-base/lib/hashing.js");var l=t.LiquidityPoolFeeV18=30},"./node_modules/stellar-base/lib/hashing.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hash=function(e){var t=new n.sha256;return t.update(e,"utf8"),t.digest()};var n=r("./node_modules/sha.js/index.js")},"./node_modules/stellar-base/lib/index.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeMuxedAccount=t.encodeMuxedAccountToAddress=t.decodeAddressToMuxedAccount=t.StrKey=t.Networks=t.Claimant=t.MuxedAccount=t.Account=t.AuthClawbackEnabledFlag=t.AuthImmutableFlag=t.AuthRevocableFlag=t.AuthRequiredFlag=t.Operation=t.LiquidityPoolId=t.LiquidityPoolAsset=t.Asset=t.BASE_FEE=t.TimeoutInfinite=t.TransactionBuilder=t.FeeBumpTransaction=t.Transaction=t.TransactionBase=t.Hyper=t.UnsignedHyper=t.Keypair=t.LiquidityPoolFeeV18=t.getLiquidityPoolId=t.FastSigning=t.verify=t.sign=t.hash=t.xdr=void 0;var n=r("./node_modules/stellar-base/lib/hashing.js");Object.defineProperty(t,"hash",{enumerable:!0,get:function(){return n.hash}});var o=r("./node_modules/stellar-base/lib/signing.js");Object.defineProperty(t,"sign",{enumerable:!0,get:function(){return o.sign}}),Object.defineProperty(t,"verify",{enumerable:!0,get:function(){return o.verify}}),Object.defineProperty(t,"FastSigning",{enumerable:!0,get:function(){return o.FastSigning}});var i=r("./node_modules/stellar-base/lib/get_liquidity_pool_id.js");Object.defineProperty(t,"getLiquidityPoolId",{enumerable:!0,get:function(){return i.getLiquidityPoolId}}),Object.defineProperty(t,"LiquidityPoolFeeV18",{enumerable:!0,get:function(){return i.LiquidityPoolFeeV18}});var s=r("./node_modules/stellar-base/lib/keypair.js");Object.defineProperty(t,"Keypair",{enumerable:!0,get:function(){return s.Keypair}});var a=r("./node_modules/js-xdr/lib/index.js");Object.defineProperty(t,"UnsignedHyper",{enumerable:!0,get:function(){return a.UnsignedHyper}}),Object.defineProperty(t,"Hyper",{enumerable:!0,get:function(){return a.Hyper}});var u=r("./node_modules/stellar-base/lib/transaction_base.js");Object.defineProperty(t,"TransactionBase",{enumerable:!0,get:function(){return u.TransactionBase}});var l=r("./node_modules/stellar-base/lib/transaction.js");Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return l.Transaction}});var c=r("./node_modules/stellar-base/lib/fee_bump_transaction.js");Object.defineProperty(t,"FeeBumpTransaction",{enumerable:!0,get:function(){return c.FeeBumpTransaction}});var d=r("./node_modules/stellar-base/lib/transaction_builder.js");Object.defineProperty(t,"TransactionBuilder",{enumerable:!0,get:function(){return d.TransactionBuilder}}),Object.defineProperty(t,"TimeoutInfinite",{enumerable:!0,get:function(){return d.TimeoutInfinite}}),Object.defineProperty(t,"BASE_FEE",{enumerable:!0,get:function(){return d.BASE_FEE}});var h=r("./node_modules/stellar-base/lib/asset.js");Object.defineProperty(t,"Asset",{enumerable:!0,get:function(){return h.Asset}});var f=r("./node_modules/stellar-base/lib/liquidity_pool_asset.js");Object.defineProperty(t,"LiquidityPoolAsset",{enumerable:!0,get:function(){return f.LiquidityPoolAsset}});var p=r("./node_modules/stellar-base/lib/liquidity_pool_id.js");Object.defineProperty(t,"LiquidityPoolId",{enumerable:!0,get:function(){return p.LiquidityPoolId}});var _=r("./node_modules/stellar-base/lib/operation.js");Object.defineProperty(t,"Operation",{enumerable:!0,get:function(){return _.Operation}}),Object.defineProperty(t,"AuthRequiredFlag",{enumerable:!0,get:function(){return _.AuthRequiredFlag}}),Object.defineProperty(t,"AuthRevocableFlag",{enumerable:!0,get:function(){return _.AuthRevocableFlag}}),Object.defineProperty(t,"AuthImmutableFlag",{enumerable:!0,get:function(){return _.AuthImmutableFlag}}),Object.defineProperty(t,"AuthClawbackEnabledFlag",{enumerable:!0,get:function(){return _.AuthClawbackEnabledFlag}});var m=r("./node_modules/stellar-base/lib/memo.js");Object.keys(m).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return m[e]}})}));var y=r("./node_modules/stellar-base/lib/account.js");Object.defineProperty(t,"Account",{enumerable:!0,get:function(){return y.Account}}),Object.defineProperty(t,"MuxedAccount",{enumerable:!0,get:function(){return y.MuxedAccount}});var v=r("./node_modules/stellar-base/lib/claimant.js");Object.defineProperty(t,"Claimant",{enumerable:!0,get:function(){return v.Claimant}});var g=r("./node_modules/stellar-base/lib/network.js");Object.defineProperty(t,"Networks",{enumerable:!0,get:function(){return g.Networks}});var b=r("./node_modules/stellar-base/lib/strkey.js");Object.defineProperty(t,"StrKey",{enumerable:!0,get:function(){return b.StrKey}});var w=r("./node_modules/stellar-base/lib/util/decode_encode_muxed_account.js");Object.defineProperty(t,"decodeAddressToMuxedAccount",{enumerable:!0,get:function(){return w.decodeAddressToMuxedAccount}}),Object.defineProperty(t,"encodeMuxedAccountToAddress",{enumerable:!0,get:function(){return w.encodeMuxedAccountToAddress}}),Object.defineProperty(t,"encodeMuxedAccount",{enumerable:!0,get:function(){return w.encodeMuxedAccount}});var j,k=r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"),S=(j=k)&&j.__esModule?j:{default:j};t.xdr=S.default,t.default=e.exports},"./node_modules/stellar-base/lib/keypair.js":(e,t,r)=>{"use strict";var n=r("./node_modules/buffer/index.js").Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Keypair=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=f(r("./node_modules/tweetnacl/nacl-fast.js")),a=f(r("./node_modules/lodash/isUndefined.js")),u=f(r("./node_modules/lodash/isString.js")),l=r("./node_modules/stellar-base/lib/signing.js"),c=r("./node_modules/stellar-base/lib/strkey.js"),d=r("./node_modules/stellar-base/lib/hashing.js"),h=f(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"));function f(e){return e&&e.__esModule?e:{default:e}}t.Keypair=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"ed25519"!==t.type)throw new Error("Invalid keys type");if(this.type=t.type,t.secretKey){if(t.secretKey=n.from(t.secretKey),32!==t.secretKey.length)throw new Error("secretKey length is invalid");if(this._secretSeed=t.secretKey,this._publicKey=(0,l.generate)(t.secretKey),this._secretKey=n.concat([t.secretKey,this._publicKey]),t.publicKey&&!this._publicKey.equals(n.from(t.publicKey)))throw new Error("secretKey does not match publicKey")}else if(this._publicKey=n.from(t.publicKey),32!==this._publicKey.length)throw new Error("publicKey length is invalid")}return i(e,[{key:"xdrAccountId",value:function(){return new h.default.AccountId.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrPublicKey",value:function(){return new h.default.PublicKey.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrMuxedAccount",value:function(e){if(!(0,a.default)(e)){if(!(0,u.default)(e))throw new TypeError("expected string for ID, got "+(void 0===e?"undefined":o(e)));return h.default.MuxedAccount.keyTypeMuxedEd25519(new h.default.MuxedAccountMed25519({id:h.default.Uint64.fromString(e),ed25519:this._publicKey}))}return new h.default.MuxedAccount.keyTypeEd25519(this._publicKey)}},{key:"rawPublicKey",value:function(){return this._publicKey}},{key:"signatureHint",value:function(){var e=this.xdrAccountId().toXDR();return e.slice(e.length-4)}},{key:"publicKey",value:function(){return c.StrKey.encodeEd25519PublicKey(this._publicKey)}},{key:"secret",value:function(){if(!this._secretSeed)throw new Error("no secret key available");if("ed25519"===this.type)return c.StrKey.encodeEd25519SecretSeed(this._secretSeed);throw new Error("Invalid Keypair type")}},{key:"rawSecretKey",value:function(){return this._secretSeed}},{key:"canSign",value:function(){return!!this._secretKey}},{key:"sign",value:function(e){if(!this.canSign())throw new Error("cannot sign: no secret key available");return(0,l.sign)(e,this._secretKey)}},{key:"verify",value:function(e,t){return(0,l.verify)(e,t,this._publicKey)}},{key:"signDecorated",value:function(e){var t=this.sign(e),r=this.signatureHint();return new h.default.DecoratedSignature({hint:r,signature:t})}}],[{key:"fromSecret",value:function(e){var t=c.StrKey.decodeEd25519SecretSeed(e);return this.fromRawEd25519Seed(t)}},{key:"fromRawEd25519Seed",value:function(e){return new this({type:"ed25519",secretKey:e})}},{key:"master",value:function(e){if(!e)throw new Error("No network selected. Please pass a network argument, e.g. `Keypair.master(Networks.PUBLIC)`.");return this.fromRawEd25519Seed((0,d.hash)(e))}},{key:"fromPublicKey",value:function(e){if(32!==(e=c.StrKey.decodeEd25519PublicKey(e)).length)throw new Error("Invalid Stellar public key");return new this({type:"ed25519",publicKey:e})}},{key:"random",value:function(){var e=s.default.randomBytes(32);return this.fromRawEd25519Seed(e)}}]),e}()},"./node_modules/stellar-base/lib/liquidity_pool_asset.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LiquidityPoolAsset=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=u(r("./node_modules/lodash/clone.js")),i=u(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js")),s=r("./node_modules/stellar-base/lib/asset.js"),a=r("./node_modules/stellar-base/lib/get_liquidity_pool_id.js");function u(e){return e&&e.__esModule?e:{default:e}}t.LiquidityPoolAsset=function(){function e(t,r,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!(t&&t instanceof s.Asset))throw new Error("assetA is invalid");if(!(r&&r instanceof s.Asset))throw new Error("assetB is invalid");if(-1!==s.Asset.compare(t,r))throw new Error("Assets are not in lexicographic order");if(!n||n!==a.LiquidityPoolFeeV18)throw new Error("fee is invalid");this.assetA=t,this.assetB=r,this.fee=n}return n(e,[{key:"toXDRObject",value:function(){var e=new i.default.LiquidityPoolConstantProductParameters({assetA:this.assetA.toXDRObject(),assetB:this.assetB.toXDRObject(),fee:this.fee}),t=new i.default.LiquidityPoolParameters("liquidityPoolConstantProduct",e);return new i.default.ChangeTrustAsset("assetTypePoolShare",t)}},{key:"getLiquidityPoolParameters",value:function(){return(0,o.default)({assetA:this.assetA,assetB:this.assetB,fee:this.fee})}},{key:"getAssetType",value:function(){return"liquidity_pool_shares"}},{key:"equals",value:function(e){return this.assetA.equals(e.assetA)&&this.assetB.equals(e.assetB)&&this.fee===e.fee}},{key:"toString",value:function(){return"liquidity_pool:"+(0,a.getLiquidityPoolId)("constant_product",this.getLiquidityPoolParameters()).toString("hex")}}],[{key:"fromOperation",value:function(e){var t=e.switch();if(t===i.default.AssetType.assetTypePoolShare()){var r=e.liquidityPool().constantProduct();return new this(s.Asset.fromOperation(r.assetA()),s.Asset.fromOperation(r.assetB()),r.fee())}throw new Error("Invalid asset type: "+t.name)}}]),e}()},"./node_modules/stellar-base/lib/liquidity_pool_id.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LiquidityPoolId=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=s(r("./node_modules/lodash/clone.js")),i=s(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"));function s(e){return e&&e.__esModule?e:{default:e}}t.LiquidityPoolId=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("liquidityPoolId cannot be empty");if(!/^[a-f0-9]{64}$/.test(t))throw new Error("Liquidity pool ID is not a valid hash");this.liquidityPoolId=t}return n(e,[{key:"toXDRObject",value:function(){var e=i.default.PoolId.fromXDR(this.liquidityPoolId,"hex");return new i.default.TrustLineAsset("assetTypePoolShare",e)}},{key:"getLiquidityPoolId",value:function(){return(0,o.default)(this.liquidityPoolId)}},{key:"getAssetType",value:function(){return"liquidity_pool_shares"}},{key:"equals",value:function(e){return this.liquidityPoolId===e.getLiquidityPoolId()}},{key:"toString",value:function(){return"liquidity_pool:"+this.liquidityPoolId}}],[{key:"fromOperation",value:function(e){var t=e.switch();if(t===i.default.AssetType.assetTypePoolShare())return new this(e.liquidityPoolId().toString("hex"));throw new Error("Invalid asset type: "+t.name)}}]),e}()},"./node_modules/stellar-base/lib/memo.js":(e,t,r)=>{"use strict";var n=r("./node_modules/buffer/index.js").Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Memo=t.MemoReturn=t.MemoHash=t.MemoText=t.MemoID=t.MemoNone=void 0;var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=d(r("./node_modules/lodash/isUndefined.js")),s=d(r("./node_modules/lodash/isString.js")),a=d(r("./node_modules/lodash/clone.js")),u=r("./node_modules/js-xdr/lib/index.js"),l=d(r("./node_modules/bignumber.js/bignumber.js")),c=d(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"));function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var f=t.MemoNone="none",p=t.MemoID="id",_=t.MemoText="text",m=t.MemoHash="hash",y=t.MemoReturn="return",v=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;switch(h(this,e),this._type=t,this._value=r,this._type){case f:break;case p:e._validateIdValue(r);break;case _:e._validateTextValue(r);break;case m:case y:e._validateHashValue(r),(0,s.default)(r)&&(this._value=n.from(r,"hex"));break;default:throw new Error("Invalid memo type")}}return o(e,[{key:"toXDRObject",value:function(){switch(this._type){case f:return c.default.Memo.memoNone();case p:return c.default.Memo.memoId(u.UnsignedHyper.fromString(this._value));case _:return c.default.Memo.memoText(this._value);case m:return c.default.Memo.memoHash(this._value);case y:return c.default.Memo.memoReturn(this._value);default:return null}}},{key:"type",get:function(){return(0,a.default)(this._type)},set:function(e){throw new Error("Memo is immutable")}},{key:"value",get:function(){switch(this._type){case f:return null;case p:case _:return(0,a.default)(this._value);case m:case y:return n.from(this._value);default:throw new Error("Invalid memo type")}},set:function(e){throw new Error("Memo is immutable")}}],[{key:"_validateIdValue",value:function(e){var t=new Error("Expects a int64 as a string. Got "+e);if(!(0,s.default)(e))throw t;var r=void 0;try{r=new l.default(e)}catch(e){throw t}if(!r.isFinite())throw t;if(r.isNaN())throw t}},{key:"_validateTextValue",value:function(e){if(!c.default.Memo.armTypeForArm("text").isValid(e))throw new Error("Expects string, array or buffer, max 28 bytes")}},{key:"_validateHashValue",value:function(e){var t=new Error("Expects a 32 byte hash value or hex encoded string. Got "+e);if(null===e||(0,i.default)(e))throw t;var r=void 0;if((0,s.default)(e)){if(!/^[0-9A-Fa-f]{64}$/g.test(e))throw t;r=n.from(e,"hex")}else{if(!n.isBuffer(e))throw t;r=n.from(e)}if(!r.length||32!==r.length)throw t}},{key:"none",value:function(){return new e(f)}},{key:"text",value:function(t){return new e(_,t)}},{key:"id",value:function(t){return new e(p,t)}},{key:"hash",value:function(t){return new e(m,t)}},{key:"return",value:function(t){return new e(y,t)}},{key:"fromXDRObject",value:function(t){switch(t.arm()){case"id":return e.id(t.value().toString());case"text":return e.text(t.value());case"hash":return e.hash(t.value());case"retHash":return e.return(t.value())}if(void 0===t.value())return e.none();throw new Error("Unknown type")}}]),e}();t.Memo=v},"./node_modules/stellar-base/lib/network.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Networks={PUBLIC:"Public Global Stellar Network ; September 2015",TESTNET:"Test SDF Network ; September 2015"}},"./node_modules/stellar-base/lib/operation.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operation=t.AuthClawbackEnabledFlag=t.AuthImmutableFlag=t.AuthRevocableFlag=t.AuthRequiredFlag=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r("./node_modules/js-xdr/lib/index.js"),i=b(r("./node_modules/bignumber.js/bignumber.js")),s=b(r("./node_modules/lodash/trimEnd.js")),a=b(r("./node_modules/lodash/isUndefined.js")),u=b(r("./node_modules/lodash/isString.js")),l=b(r("./node_modules/lodash/isNumber.js")),c=b(r("./node_modules/lodash/isFinite.js")),d=r("./node_modules/stellar-base/lib/util/continued_fraction.js"),h=r("./node_modules/stellar-base/lib/asset.js"),f=r("./node_modules/stellar-base/lib/liquidity_pool_asset.js"),p=r("./node_modules/stellar-base/lib/claimant.js"),_=r("./node_modules/stellar-base/lib/strkey.js"),m=r("./node_modules/stellar-base/lib/liquidity_pool_id.js"),y=b(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js")),v=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r("./node_modules/stellar-base/lib/operations/index.js")),g=r("./node_modules/stellar-base/lib/util/decode_encode_muxed_account.js");function b(e){return e&&e.__esModule?e:{default:e}}var w=1e7,j="9223372036854775807",k=(t.AuthRequiredFlag=1,t.AuthRevocableFlag=2,t.AuthImmutableFlag=4,t.AuthClawbackEnabledFlag=8,t.Operation=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"setSourceAccount",value:function(e,t){if(t.source)try{e.sourceAccount=(0,g.decodeAddressToMuxedAccount)(t.source,t.withMuxing)}catch(e){throw new Error("Source address is invalid")}}},{key:"fromXDRObject",value:function(e,t){var r={};e.sourceAccount()&&(r.source=(0,g.encodeMuxedAccountToAddress)(e.sourceAccount(),t));var n=e.body().value(),o=e.body().switch().name;switch(o){case"createAccount":r.type="createAccount",r.destination=S(n.destination()),r.startingBalance=this._fromXDRAmount(n.startingBalance());break;case"payment":r.type="payment",r.destination=(0,g.encodeMuxedAccountToAddress)(n.destination(),t),r.asset=h.Asset.fromOperation(n.asset()),r.amount=this._fromXDRAmount(n.amount());break;case"pathPaymentStrictReceive":r.type="pathPaymentStrictReceive",r.sendAsset=h.Asset.fromOperation(n.sendAsset()),r.sendMax=this._fromXDRAmount(n.sendMax()),r.destination=(0,g.encodeMuxedAccountToAddress)(n.destination(),t),r.destAsset=h.Asset.fromOperation(n.destAsset()),r.destAmount=this._fromXDRAmount(n.destAmount()),r.path=[];var i=n.path();Object.keys(i).forEach((function(e){r.path.push(h.Asset.fromOperation(i[e]))}));break;case"pathPaymentStrictSend":r.type="pathPaymentStrictSend",r.sendAsset=h.Asset.fromOperation(n.sendAsset()),r.sendAmount=this._fromXDRAmount(n.sendAmount()),r.destination=(0,g.encodeMuxedAccountToAddress)(n.destination(),t),r.destAsset=h.Asset.fromOperation(n.destAsset()),r.destMin=this._fromXDRAmount(n.destMin()),r.path=[];var a=n.path();Object.keys(a).forEach((function(e){r.path.push(h.Asset.fromOperation(a[e]))}));break;case"changeTrust":if(r.type="changeTrust",n.line().switch()===y.default.AssetType.assetTypePoolShare())r.line=f.LiquidityPoolAsset.fromOperation(n.line());else r.line=h.Asset.fromOperation(n.line());r.limit=this._fromXDRAmount(n.limit());break;case"allowTrust":r.type="allowTrust",r.trustor=S(n.trustor()),r.assetCode=n.asset().value().toString(),r.assetCode=(0,s.default)(r.assetCode,"\0"),r.authorize=n.authorize();break;case"setOptions":if(r.type="setOptions",n.inflationDest()&&(r.inflationDest=S(n.inflationDest())),r.clearFlags=n.clearFlags(),r.setFlags=n.setFlags(),r.masterWeight=n.masterWeight(),r.lowThreshold=n.lowThreshold(),r.medThreshold=n.medThreshold(),r.highThreshold=n.highThreshold(),r.homeDomain=void 0!==n.homeDomain()?n.homeDomain().toString("ascii"):void 0,n.signer()){var u={},l=n.signer().key().arm();"ed25519"===l?u.ed25519PublicKey=S(n.signer().key()):"preAuthTx"===l?u.preAuthTx=n.signer().key().preAuthTx():"hashX"===l&&(u.sha256Hash=n.signer().key().hashX()),u.weight=n.signer().weight(),r.signer=u}break;case"manageOffer":case"manageSellOffer":r.type="manageSellOffer",r.selling=h.Asset.fromOperation(n.selling()),r.buying=h.Asset.fromOperation(n.buying()),r.amount=this._fromXDRAmount(n.amount()),r.price=this._fromXDRPrice(n.price()),r.offerId=n.offerId().toString();break;case"manageBuyOffer":r.type="manageBuyOffer",r.selling=h.Asset.fromOperation(n.selling()),r.buying=h.Asset.fromOperation(n.buying()),r.buyAmount=this._fromXDRAmount(n.buyAmount()),r.price=this._fromXDRPrice(n.price()),r.offerId=n.offerId().toString();break;case"createPassiveOffer":case"createPassiveSellOffer":r.type="createPassiveSellOffer",r.selling=h.Asset.fromOperation(n.selling()),r.buying=h.Asset.fromOperation(n.buying()),r.amount=this._fromXDRAmount(n.amount()),r.price=this._fromXDRPrice(n.price());break;case"accountMerge":r.type="accountMerge",r.destination=(0,g.encodeMuxedAccountToAddress)(n,t);break;case"manageData":r.type="manageData",r.name=n.dataName().toString("ascii"),r.value=n.dataValue();break;case"inflation":r.type="inflation";break;case"bumpSequence":r.type="bumpSequence",r.bumpTo=n.bumpTo().toString();break;case"createClaimableBalance":r.type="createClaimableBalance",r.asset=h.Asset.fromOperation(n.asset()),r.amount=this._fromXDRAmount(n.amount()),r.claimants=[],n.claimants().forEach((function(e){r.claimants.push(p.Claimant.fromXDR(e))}));break;case"claimClaimableBalance":r.type="claimClaimableBalance",r.balanceId=n.toXDR("hex");break;case"beginSponsoringFutureReserves":r.type="beginSponsoringFutureReserves",r.sponsoredId=S(n.sponsoredId());break;case"endSponsoringFutureReserves":r.type="endSponsoringFutureReserves";break;case"revokeSponsorship":!function(e,t){switch(e.switch().name){case"revokeSponsorshipLedgerEntry":var r=e.ledgerKey();switch(r.switch().name){case y.default.LedgerEntryType.account().name:t.type="revokeAccountSponsorship",t.account=S(r.account().accountId());break;case y.default.LedgerEntryType.trustline().name:t.type="revokeTrustlineSponsorship",t.account=S(r.trustLine().accountId());var n=r.trustLine().asset();if(n.switch()===y.default.AssetType.assetTypePoolShare())t.asset=m.LiquidityPoolId.fromOperation(n);else t.asset=h.Asset.fromOperation(n);break;case y.default.LedgerEntryType.offer().name:t.type="revokeOfferSponsorship",t.seller=S(r.offer().sellerId()),t.offerId=r.offer().offerId().toString();break;case y.default.LedgerEntryType.data().name:t.type="revokeDataSponsorship",t.account=S(r.data().accountId()),t.name=r.data().dataName().toString("ascii");break;case y.default.LedgerEntryType.claimableBalance().name:t.type="revokeClaimableBalanceSponsorship",t.balanceId=r.claimableBalance().balanceId().toXDR("hex");break;case y.default.LedgerEntryType.liquidityPool().name:t.type="revokeLiquidityPoolSponsorship",t.liquidityPoolId=r.liquidityPool().liquidityPoolId().toString("hex");break;default:throw new Error("Unknown ledgerKey: "+e.switch().name)}break;case"revokeSponsorshipSigner":t.type="revokeSignerSponsorship",t.account=S(e.signer().accountId()),t.signer=function(e){var t={};switch(e.switch().name){case y.default.SignerKeyType.signerKeyTypeEd25519().name:t.ed25519PublicKey=_.StrKey.encodeEd25519PublicKey(e.ed25519());break;case y.default.SignerKeyType.signerKeyTypePreAuthTx().name:t.preAuthTx=e.preAuthTx().toString("hex");break;case y.default.SignerKeyType.signerKeyTypeHashX().name:t.sha256Hash=e.hashX().toString("hex");break;default:throw new Error("Unknown signerKey: "+e.switch().name)}return t}(e.signer().signerKey());break;default:throw new Error("Unknown revokeSponsorship: "+e.switch().name)}}(n,r);break;case"clawback":r.type="clawback",r.amount=this._fromXDRAmount(n.amount()),r.from=(0,g.encodeMuxedAccountToAddress)(n.from()),r.asset=h.Asset.fromOperation(n.asset());break;case"clawbackClaimableBalance":r.type="clawbackClaimableBalance",r.balanceId=n.toXDR("hex");break;case"setTrustLineFlags":r.type="setTrustLineFlags",r.asset=h.Asset.fromOperation(n.asset()),r.trustor=S(n.trustor());var c=n.clearFlags(),d=n.setFlags(),v={authorized:y.default.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:y.default.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:y.default.TrustLineFlags.trustlineClawbackEnabledFlag()};r.flags={},Object.keys(v).forEach((function(e){var t;r.flags[e]=(t=v[e].value,!!(d&t)||!(c&t)&&void 0)}));break;case"liquidityPoolDeposit":r.type="liquidityPoolDeposit",r.liquidityPoolId=n.liquidityPoolId().toString("hex"),r.maxAmountA=this._fromXDRAmount(n.maxAmountA()),r.maxAmountB=this._fromXDRAmount(n.maxAmountB()),r.minPrice=this._fromXDRPrice(n.minPrice()),r.maxPrice=this._fromXDRPrice(n.maxPrice());break;case"liquidityPoolWithdraw":r.type="liquidityPoolWithdraw",r.liquidityPoolId=n.liquidityPoolId().toString("hex"),r.amount=this._fromXDRAmount(n.amount()),r.minAmountA=this._fromXDRAmount(n.minAmountA()),r.minAmountB=this._fromXDRAmount(n.minAmountB());break;default:throw new Error("Unknown operation: "+o)}return r}},{key:"isValidAmount",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(0,u.default)(e))return!1;var r=void 0;try{r=new i.default(e)}catch(e){return!1}return!(!t&&r.isZero()||r.isNegative()||r.times(w).greaterThan(new i.default(j).toString())||r.decimalPlaces()>7||r.isNaN()||!r.isFinite())}},{key:"constructAmountRequirementsError",value:function(e){return e+" argument must be of type String, represent a positive number and have at most 7 digits after the decimal"}},{key:"_checkUnsignedIntValue",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!(0,a.default)(t))switch((0,u.default)(t)&&(t=parseFloat(t)),!0){case!(0,l.default)(t)||!(0,c.default)(t)||t%1!=0:throw new Error(e+" value is invalid");case t<0:throw new Error(e+" value must be unsigned");case!r||r&&r(t,e):return t;default:throw new Error(e+" value is invalid")}}},{key:"_toXDRAmount",value:function(e){var t=new i.default(e).mul(w);return o.Hyper.fromString(t.toString())}},{key:"_fromXDRAmount",value:function(e){return new i.default(e).div(w).toFixed(7)}},{key:"_fromXDRPrice",value:function(e){return new i.default(e.n()).div(new i.default(e.d())).toString()}},{key:"_toXDRPrice",value:function(e){var t=void 0;if(e.n&&e.d)t=new y.default.Price(e);else{e=new i.default(e);var r=(0,d.best_r)(e);t=new y.default.Price({n:parseInt(r[0],10),d:parseInt(r[1],10)})}if(t.n()<0||t.d()<0)throw new Error("price must be positive");return t}}]),e}());function S(e){return _.StrKey.encodeEd25519PublicKey(e.ed25519())}k.accountMerge=v.accountMerge,k.allowTrust=v.allowTrust,k.bumpSequence=v.bumpSequence,k.changeTrust=v.changeTrust,k.createAccount=v.createAccount,k.createClaimableBalance=v.createClaimableBalance,k.claimClaimableBalance=v.claimClaimableBalance,k.clawbackClaimableBalance=v.clawbackClaimableBalance,k.createPassiveSellOffer=v.createPassiveSellOffer,k.inflation=v.inflation,k.manageData=v.manageData,k.manageSellOffer=v.manageSellOffer,k.manageBuyOffer=v.manageBuyOffer,k.pathPaymentStrictReceive=v.pathPaymentStrictReceive,k.pathPaymentStrictSend=v.pathPaymentStrictSend,k.payment=v.payment,k.setOptions=v.setOptions,k.beginSponsoringFutureReserves=v.beginSponsoringFutureReserves,k.endSponsoringFutureReserves=v.endSponsoringFutureReserves,k.revokeAccountSponsorship=v.revokeAccountSponsorship,k.revokeTrustlineSponsorship=v.revokeTrustlineSponsorship,k.revokeOfferSponsorship=v.revokeOfferSponsorship,k.revokeDataSponsorship=v.revokeDataSponsorship,k.revokeClaimableBalanceSponsorship=v.revokeClaimableBalanceSponsorship,k.revokeLiquidityPoolSponsorship=v.revokeLiquidityPoolSponsorship,k.revokeSignerSponsorship=v.revokeSignerSponsorship,k.clawback=v.clawback,k.setTrustLineFlags=v.setTrustLineFlags,k.liquidityPoolDeposit=v.liquidityPoolDeposit,k.liquidityPoolWithdraw=v.liquidityPoolWithdraw},"./node_modules/stellar-base/lib/operations/account_merge.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accountMerge=function(e){var t={};try{t.body=i.default.OperationBody.accountMerge((0,s.decodeAddressToMuxedAccount)(e.destination,e.withMuxing))}catch(e){throw new Error("destination is invalid")}return this.setSourceAccount(t,e),new i.default.Operation(t)};var n,o=r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"),i=(n=o)&&n.__esModule?n:{default:n},s=r("./node_modules/stellar-base/lib/util/decode_encode_muxed_account.js")},"./node_modules/stellar-base/lib/operations/allow_trust.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.allowTrust=function(e){if(!s.StrKey.isValidEd25519PublicKey(e.trustor))throw new Error("trustor is invalid");var t={};if(t.trustor=i.Keypair.fromPublicKey(e.trustor).xdrAccountId(),e.assetCode.length<=4){var r=(0,n.default)(e.assetCode,4,"\0");t.asset=o.default.AssetCode.assetTypeCreditAlphanum4(r)}else{if(!(e.assetCode.length<=12))throw new Error("Asset code must be 12 characters at max.");var a=(0,n.default)(e.assetCode,12,"\0");t.asset=o.default.AssetCode.assetTypeCreditAlphanum12(a)}"boolean"==typeof e.authorize?e.authorize?t.authorize=o.default.TrustLineFlags.authorizedFlag().value:t.authorize=0:t.authorize=e.authorize;var u=new o.default.AllowTrustOp(t),l={};return l.body=o.default.OperationBody.allowTrust(u),this.setSourceAccount(l,e),new o.default.Operation(l)};var n=a(r("./node_modules/lodash/padEnd.js")),o=a(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js")),i=r("./node_modules/stellar-base/lib/keypair.js"),s=r("./node_modules/stellar-base/lib/strkey.js");function a(e){return e&&e.__esModule?e:{default:e}}},"./node_modules/stellar-base/lib/operations/begin_sponsoring_future_reserves.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.beginSponsoringFutureReserves=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s.StrKey.isValidEd25519PublicKey(e.sponsoredId))throw new Error("sponsoredId is invalid");var t=new i.default.BeginSponsoringFutureReservesOp({sponsoredId:a.Keypair.fromPublicKey(e.sponsoredId).xdrAccountId()}),r={};return r.body=i.default.OperationBody.beginSponsoringFutureReserves(t),this.setSourceAccount(r,e),new i.default.Operation(r)};var n,o=r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"),i=(n=o)&&n.__esModule?n:{default:n},s=r("./node_modules/stellar-base/lib/strkey.js"),a=r("./node_modules/stellar-base/lib/keypair.js")},"./node_modules/stellar-base/lib/operations/bump_sequence.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bumpSequence=function(e){var t={};if(!(0,i.default)(e.bumpTo))throw new Error("bumpTo must be a string");try{new o.default(e.bumpTo)}catch(e){throw new Error("bumpTo must be a stringified number")}t.bumpTo=n.Hyper.fromString(e.bumpTo);var r=new s.default.BumpSequenceOp(t),a={};return a.body=s.default.OperationBody.bumpSequence(r),this.setSourceAccount(a,e),new s.default.Operation(a)};var n=r("./node_modules/js-xdr/lib/index.js"),o=a(r("./node_modules/bignumber.js/bignumber.js")),i=a(r("./node_modules/lodash/isString.js")),s=a(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"));function a(e){return e&&e.__esModule?e:{default:e}}},"./node_modules/stellar-base/lib/operations/change_trust.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.changeTrust=function(e){var t={};if(e.asset instanceof a.Asset)t.line=e.asset.toChangeTrustXDRObject();else{if(!(e.asset instanceof u.LiquidityPoolAsset))throw new TypeError("asset must be Asset or LiquidityPoolAsset");t.line=e.asset.toXDRObject()}if(!(0,n.default)(e.limit)&&!this.isValidAmount(e.limit,!0))throw new TypeError(this.constructAmountRequirementsError("limit"));e.limit?t.limit=this._toXDRAmount(e.limit):t.limit=o.Hyper.fromString(new i.default("9223372036854775807").toString());e.source&&(t.source=e.source.masterKeypair);var r=new s.default.ChangeTrustOp(t),l={};return l.body=s.default.OperationBody.changeTrust(r),this.setSourceAccount(l,e),new s.default.Operation(l)};var n=l(r("./node_modules/lodash/isUndefined.js")),o=r("./node_modules/js-xdr/lib/index.js"),i=l(r("./node_modules/bignumber.js/bignumber.js")),s=l(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js")),a=r("./node_modules/stellar-base/lib/asset.js"),u=r("./node_modules/stellar-base/lib/liquidity_pool_asset.js");function l(e){return e&&e.__esModule?e:{default:e}}},"./node_modules/stellar-base/lib/operations/claim_claimable_balance.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.claimClaimableBalance=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s(e.balanceId);var t={};t.balanceId=i.default.ClaimableBalanceId.fromXDR(e.balanceId,"hex");var r=new i.default.ClaimClaimableBalanceOp(t),n={};return n.body=i.default.OperationBody.claimClaimableBalance(r),this.setSourceAccount(n,e),new i.default.Operation(n)},t.validateClaimableBalanceId=s;var n,o=r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"),i=(n=o)&&n.__esModule?n:{default:n};function s(e){if("string"!=typeof e||72!==e.length)throw new Error("must provide a valid claimable balance id")}},"./node_modules/stellar-base/lib/operations/clawback.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clawback=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));t.amount=this._toXDRAmount(e.amount),t.asset=e.asset.toXDRObject(),t.from=(0,s.decodeAddressToMuxedAccount)(e.from);var r={body:i.default.OperationBody.clawback(new i.default.ClawbackOp(t))};return this.setSourceAccount(r,e),new i.default.Operation(r)};var n,o=r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"),i=(n=o)&&n.__esModule?n:{default:n},s=r("./node_modules/stellar-base/lib/util/decode_encode_muxed_account.js")},"./node_modules/stellar-base/lib/operations/clawback_claimable_balance.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clawbackClaimableBalance=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.validateClaimableBalanceId)(e.balanceId);var t={balanceId:i.default.ClaimableBalanceId.fromXDR(e.balanceId,"hex")},r={body:i.default.OperationBody.clawbackClaimableBalance(new i.default.ClawbackClaimableBalanceOp(t))};return this.setSourceAccount(r,e),new i.default.Operation(r)};var n,o=r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"),i=(n=o)&&n.__esModule?n:{default:n},s=r("./node_modules/stellar-base/lib/operations/claim_claimable_balance.js")},"./node_modules/stellar-base/lib/operations/create_account.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createAccount=function(e){if(!a.StrKey.isValidEd25519PublicKey(e.destination))throw new Error("destination is invalid");if(!this.isValidAmount(e.startingBalance,!0))throw new TypeError("startingBalance must be of type String, represent a non-negative number and have at most 7 digits after the decimal");var t={};t.destination=s.Keypair.fromPublicKey(e.destination).xdrAccountId(),t.startingBalance=this._toXDRAmount(e.startingBalance);var r=new i.default.CreateAccountOp(t),n={};return n.body=i.default.OperationBody.createAccount(r),this.setSourceAccount(n,e),new i.default.Operation(n)};var n,o=r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"),i=(n=o)&&n.__esModule?n:{default:n},s=r("./node_modules/stellar-base/lib/keypair.js"),a=r("./node_modules/stellar-base/lib/strkey.js")},"./node_modules/stellar-base/lib/operations/create_claimable_balance.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createClaimableBalance=function(e){if(!(e.asset instanceof s.Asset))throw new Error("must provide an asset for create claimable balance operation");if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(!Array.isArray(e.claimants)||0===e.claimants.length)throw new Error("must provide at least one claimant");var t={};t.asset=e.asset.toXDRObject(),t.amount=this._toXDRAmount(e.amount),t.claimants=e.claimants.map((function(e){return e.toXDRObject()}));var r=new i.default.CreateClaimableBalanceOp(t),n={};return n.body=i.default.OperationBody.createClaimableBalance(r),this.setSourceAccount(n,e),new i.default.Operation(n)};var n,o=r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"),i=(n=o)&&n.__esModule?n:{default:n},s=r("./node_modules/stellar-base/lib/asset.js")},"./node_modules/stellar-base/lib/operations/create_passive_sell_offer.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPassiveSellOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),(0,n.default)(e.price))throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price);var r=new o.default.CreatePassiveSellOfferOp(t),i={};return i.body=o.default.OperationBody.createPassiveSellOffer(r),this.setSourceAccount(i,e),new o.default.Operation(i)};var n=i(r("./node_modules/lodash/isUndefined.js")),o=i(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"));function i(e){return e&&e.__esModule?e:{default:e}}},"./node_modules/stellar-base/lib/operations/end_sponsoring_future_reserves.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.endSponsoringFutureReserves=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return t.body=i.default.OperationBody.endSponsoringFutureReserves(),this.setSourceAccount(t,e),new i.default.Operation(t)};var n,o=r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"),i=(n=o)&&n.__esModule?n:{default:n}},"./node_modules/stellar-base/lib/operations/index.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("./node_modules/stellar-base/lib/operations/manage_sell_offer.js");Object.defineProperty(t,"manageSellOffer",{enumerable:!0,get:function(){return n.manageSellOffer}});var o=r("./node_modules/stellar-base/lib/operations/create_passive_sell_offer.js");Object.defineProperty(t,"createPassiveSellOffer",{enumerable:!0,get:function(){return o.createPassiveSellOffer}});var i=r("./node_modules/stellar-base/lib/operations/account_merge.js");Object.defineProperty(t,"accountMerge",{enumerable:!0,get:function(){return i.accountMerge}});var s=r("./node_modules/stellar-base/lib/operations/allow_trust.js");Object.defineProperty(t,"allowTrust",{enumerable:!0,get:function(){return s.allowTrust}});var a=r("./node_modules/stellar-base/lib/operations/bump_sequence.js");Object.defineProperty(t,"bumpSequence",{enumerable:!0,get:function(){return a.bumpSequence}});var u=r("./node_modules/stellar-base/lib/operations/change_trust.js");Object.defineProperty(t,"changeTrust",{enumerable:!0,get:function(){return u.changeTrust}});var l=r("./node_modules/stellar-base/lib/operations/create_account.js");Object.defineProperty(t,"createAccount",{enumerable:!0,get:function(){return l.createAccount}});var c=r("./node_modules/stellar-base/lib/operations/create_claimable_balance.js");Object.defineProperty(t,"createClaimableBalance",{enumerable:!0,get:function(){return c.createClaimableBalance}});var d=r("./node_modules/stellar-base/lib/operations/claim_claimable_balance.js");Object.defineProperty(t,"claimClaimableBalance",{enumerable:!0,get:function(){return d.claimClaimableBalance}});var h=r("./node_modules/stellar-base/lib/operations/clawback_claimable_balance.js");Object.defineProperty(t,"clawbackClaimableBalance",{enumerable:!0,get:function(){return h.clawbackClaimableBalance}});var f=r("./node_modules/stellar-base/lib/operations/inflation.js");Object.defineProperty(t,"inflation",{enumerable:!0,get:function(){return f.inflation}});var p=r("./node_modules/stellar-base/lib/operations/manage_data.js");Object.defineProperty(t,"manageData",{enumerable:!0,get:function(){return p.manageData}});var _=r("./node_modules/stellar-base/lib/operations/manage_buy_offer.js");Object.defineProperty(t,"manageBuyOffer",{enumerable:!0,get:function(){return _.manageBuyOffer}});var m=r("./node_modules/stellar-base/lib/operations/path_payment_strict_receive.js");Object.defineProperty(t,"pathPaymentStrictReceive",{enumerable:!0,get:function(){return m.pathPaymentStrictReceive}});var y=r("./node_modules/stellar-base/lib/operations/path_payment_strict_send.js");Object.defineProperty(t,"pathPaymentStrictSend",{enumerable:!0,get:function(){return y.pathPaymentStrictSend}});var v=r("./node_modules/stellar-base/lib/operations/payment.js");Object.defineProperty(t,"payment",{enumerable:!0,get:function(){return v.payment}});var g=r("./node_modules/stellar-base/lib/operations/set_options.js");Object.defineProperty(t,"setOptions",{enumerable:!0,get:function(){return g.setOptions}});var b=r("./node_modules/stellar-base/lib/operations/begin_sponsoring_future_reserves.js");Object.defineProperty(t,"beginSponsoringFutureReserves",{enumerable:!0,get:function(){return b.beginSponsoringFutureReserves}});var w=r("./node_modules/stellar-base/lib/operations/end_sponsoring_future_reserves.js");Object.defineProperty(t,"endSponsoringFutureReserves",{enumerable:!0,get:function(){return w.endSponsoringFutureReserves}});var j=r("./node_modules/stellar-base/lib/operations/revoke_sponsorship.js");Object.defineProperty(t,"revokeAccountSponsorship",{enumerable:!0,get:function(){return j.revokeAccountSponsorship}}),Object.defineProperty(t,"revokeTrustlineSponsorship",{enumerable:!0,get:function(){return j.revokeTrustlineSponsorship}}),Object.defineProperty(t,"revokeOfferSponsorship",{enumerable:!0,get:function(){return j.revokeOfferSponsorship}}),Object.defineProperty(t,"revokeDataSponsorship",{enumerable:!0,get:function(){return j.revokeDataSponsorship}}),Object.defineProperty(t,"revokeClaimableBalanceSponsorship",{enumerable:!0,get:function(){return j.revokeClaimableBalanceSponsorship}}),Object.defineProperty(t,"revokeLiquidityPoolSponsorship",{enumerable:!0,get:function(){return j.revokeLiquidityPoolSponsorship}}),Object.defineProperty(t,"revokeSignerSponsorship",{enumerable:!0,get:function(){return j.revokeSignerSponsorship}});var k=r("./node_modules/stellar-base/lib/operations/clawback.js");Object.defineProperty(t,"clawback",{enumerable:!0,get:function(){return k.clawback}});var S=r("./node_modules/stellar-base/lib/operations/set_trustline_flags.js");Object.defineProperty(t,"setTrustLineFlags",{enumerable:!0,get:function(){return S.setTrustLineFlags}});var x=r("./node_modules/stellar-base/lib/operations/liquidity_pool_deposit.js");Object.defineProperty(t,"liquidityPoolDeposit",{enumerable:!0,get:function(){return x.liquidityPoolDeposit}});var T=r("./node_modules/stellar-base/lib/operations/liquidity_pool_withdraw.js");Object.defineProperty(t,"liquidityPoolWithdraw",{enumerable:!0,get:function(){return T.liquidityPoolWithdraw}})},"./node_modules/stellar-base/lib/operations/inflation.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inflation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return t.body=i.default.OperationBody.inflation(),this.setSourceAccount(t,e),new i.default.Operation(t)};var n,o=r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"),i=(n=o)&&n.__esModule?n:{default:n}},"./node_modules/stellar-base/lib/operations/liquidity_pool_deposit.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.liquidityPoolDeposit=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.liquidityPoolId,r=e.maxAmountA,i=e.maxAmountB,s=e.minPrice,a=e.maxPrice,u={};if(!t)throw new TypeError("liquidityPoolId argument is required");if(u.liquidityPoolId=o.default.PoolId.fromXDR(t,"hex"),!this.isValidAmount(r,!0))throw new TypeError("maxAmountA argument is required");if(u.maxAmountA=this._toXDRAmount(r),!this.isValidAmount(i,!0))throw new TypeError("maxAmountB argument is required");if(u.maxAmountB=this._toXDRAmount(i),(0,n.default)(s))throw new TypeError("minPrice argument is required");if(u.minPrice=this._toXDRPrice(s),(0,n.default)(a))throw new TypeError("maxPrice argument is required");u.maxPrice=this._toXDRPrice(a);var l=new o.default.LiquidityPoolDepositOp(u),c={body:o.default.OperationBody.liquidityPoolDeposit(l)};return this.setSourceAccount(c,e),new o.default.Operation(c)};var n=i(r("./node_modules/lodash/isUndefined.js")),o=i(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"));function i(e){return e&&e.__esModule?e:{default:e}}},"./node_modules/stellar-base/lib/operations/liquidity_pool_withdraw.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.liquidityPoolWithdraw=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};if(!e.liquidityPoolId)throw new TypeError("liquidityPoolId argument is required");if(t.liquidityPoolId=i.default.PoolId.fromXDR(e.liquidityPoolId,"hex"),!this.isValidAmount(e.amount))throw new TypeError("amount argument is required");if(t.amount=this._toXDRAmount(e.amount),!this.isValidAmount(e.minAmountA,!0))throw new TypeError("minAmountA argument is required");if(t.minAmountA=this._toXDRAmount(e.minAmountA),!this.isValidAmount(e.minAmountB,!0))throw new TypeError("minAmountB argument is required");t.minAmountB=this._toXDRAmount(e.minAmountB);var r=new i.default.LiquidityPoolWithdrawOp(t),n={body:i.default.OperationBody.liquidityPoolWithdraw(r)};return this.setSourceAccount(n,e),new i.default.Operation(n)};var n,o=r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"),i=(n=o)&&n.__esModule?n:{default:n}},"./node_modules/stellar-base/lib/operations/manage_buy_offer.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.manageBuyOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.buyAmount,!0))throw new TypeError(this.constructAmountRequirementsError("buyAmount"));if(t.buyAmount=this._toXDRAmount(e.buyAmount),(0,n.default)(e.price))throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price),(0,n.default)(e.offerId)?e.offerId="0":e.offerId=e.offerId.toString();t.offerId=o.Hyper.fromString(e.offerId);var r=new i.default.ManageBuyOfferOp(t),s={};return s.body=i.default.OperationBody.manageBuyOffer(r),this.setSourceAccount(s,e),new i.default.Operation(s)};var n=s(r("./node_modules/lodash/isUndefined.js")),o=r("./node_modules/js-xdr/lib/index.js"),i=s(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"));function s(e){return e&&e.__esModule?e:{default:e}}},"./node_modules/stellar-base/lib/operations/manage_data.js":(e,t,r)=>{"use strict";var n=r("./node_modules/buffer/index.js").Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.manageData=function(e){var t={};if(!((0,o.default)(e.name)&&e.name.length<=64))throw new Error("name must be a string, up to 64 characters");if(t.dataName=e.name,!(0,o.default)(e.value)&&!n.isBuffer(e.value)&&null!==e.value)throw new Error("value must be a string, Buffer or null");(0,o.default)(e.value)?t.dataValue=n.from(e.value):t.dataValue=e.value;if(null!==t.dataValue&&t.dataValue.length>64)throw new Error("value cannot be longer that 64 bytes");var r=new i.default.ManageDataOp(t),s={};return s.body=i.default.OperationBody.manageData(r),this.setSourceAccount(s,e),new i.default.Operation(s)};var o=s(r("./node_modules/lodash/isString.js")),i=s(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"));function s(e){return e&&e.__esModule?e:{default:e}}},"./node_modules/stellar-base/lib/operations/manage_sell_offer.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.manageSellOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.amount,!0))throw new TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),(0,n.default)(e.price))throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price),(0,n.default)(e.offerId)?e.offerId="0":e.offerId=e.offerId.toString();t.offerId=o.Hyper.fromString(e.offerId);var r=new i.default.ManageSellOfferOp(t),s={};return s.body=i.default.OperationBody.manageSellOffer(r),this.setSourceAccount(s,e),new i.default.Operation(s)};var n=s(r("./node_modules/lodash/isUndefined.js")),o=r("./node_modules/js-xdr/lib/index.js"),i=s(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"));function s(e){return e&&e.__esModule?e:{default:e}}},"./node_modules/stellar-base/lib/operations/path_payment_strict_receive.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pathPaymentStrictReceive=function(e){switch(!0){case!e.sendAsset:throw new Error("Must specify a send asset");case!this.isValidAmount(e.sendMax):throw new TypeError(this.constructAmountRequirementsError("sendMax"));case!e.destAsset:throw new Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(e.destAmount):throw new TypeError(this.constructAmountRequirementsError("destAmount"))}var t={};t.sendAsset=e.sendAsset.toXDRObject(),t.sendMax=this._toXDRAmount(e.sendMax);try{t.destination=(0,s.decodeAddressToMuxedAccount)(e.destination,e.withMuxing)}catch(e){throw new Error("destination is invalid")}t.destAsset=e.destAsset.toXDRObject(),t.destAmount=this._toXDRAmount(e.destAmount);var r=e.path?e.path:[];t.path=r.map((function(e){return e.toXDRObject()}));var n=new i.default.PathPaymentStrictReceiveOp(t),o={};return o.body=i.default.OperationBody.pathPaymentStrictReceive(n),this.setSourceAccount(o,e),new i.default.Operation(o)};var n,o=r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"),i=(n=o)&&n.__esModule?n:{default:n},s=r("./node_modules/stellar-base/lib/util/decode_encode_muxed_account.js")},"./node_modules/stellar-base/lib/operations/path_payment_strict_send.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pathPaymentStrictSend=function(e){switch(!0){case!e.sendAsset:throw new Error("Must specify a send asset");case!this.isValidAmount(e.sendAmount):throw new TypeError(this.constructAmountRequirementsError("sendAmount"));case!e.destAsset:throw new Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(e.destMin):throw new TypeError(this.constructAmountRequirementsError("destMin"))}var t={};t.sendAsset=e.sendAsset.toXDRObject(),t.sendAmount=this._toXDRAmount(e.sendAmount);try{t.destination=(0,s.decodeAddressToMuxedAccount)(e.destination,e.withMuxing)}catch(e){throw new Error("destination is invalid")}t.destAsset=e.destAsset.toXDRObject(),t.destMin=this._toXDRAmount(e.destMin);var r=e.path?e.path:[];t.path=r.map((function(e){return e.toXDRObject()}));var n=new i.default.PathPaymentStrictSendOp(t),o={};return o.body=i.default.OperationBody.pathPaymentStrictSend(n),this.setSourceAccount(o,e),new i.default.Operation(o)};var n,o=r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"),i=(n=o)&&n.__esModule?n:{default:n},s=r("./node_modules/stellar-base/lib/util/decode_encode_muxed_account.js")},"./node_modules/stellar-base/lib/operations/payment.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.payment=function(e){if(!e.asset)throw new Error("Must provide an asset for a payment operation");if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));var t={};try{t.destination=(0,s.decodeAddressToMuxedAccount)(e.destination,e.withMuxing)}catch(e){throw new Error("destination is invalid; did you forget to enable muxing?")}t.asset=e.asset.toXDRObject(),t.amount=this._toXDRAmount(e.amount);var r=new i.default.PaymentOp(t),n={};return n.body=i.default.OperationBody.payment(r),this.setSourceAccount(n,e),new i.default.Operation(n)};var n,o=r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"),i=(n=o)&&n.__esModule?n:{default:n},s=r("./node_modules/stellar-base/lib/util/decode_encode_muxed_account.js")},"./node_modules/stellar-base/lib/operations/revoke_sponsorship.js":(e,t,r)=>{"use strict";var n=r("./node_modules/buffer/index.js").Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.revokeAccountSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s.StrKey.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");var t=i.default.LedgerKey.account(new i.default.LedgerKeyAccount({accountId:a.Keypair.fromPublicKey(e.account).xdrAccountId()})),r=i.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=i.default.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new i.default.Operation(n)},t.revokeTrustlineSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s.StrKey.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");var t=void 0;if(e.asset instanceof u.Asset)t=e.asset.toTrustLineXDRObject();else{if(!(e.asset instanceof l.LiquidityPoolId))throw new TypeError("asset must be an Asset or LiquidityPoolId");t=e.asset.toXDRObject()}var r=i.default.LedgerKey.trustline(new i.default.LedgerKeyTrustLine({accountId:a.Keypair.fromPublicKey(e.account).xdrAccountId(),asset:t})),n=i.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(r),o={};return o.body=i.default.OperationBody.revokeSponsorship(n),this.setSourceAccount(o,e),new i.default.Operation(o)},t.revokeOfferSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s.StrKey.isValidEd25519PublicKey(e.seller))throw new Error("seller is invalid");if(!(0,o.default)(e.offerId))throw new Error("offerId is invalid");var t=i.default.LedgerKey.offer(new i.default.LedgerKeyOffer({sellerId:a.Keypair.fromPublicKey(e.seller).xdrAccountId(),offerId:i.default.Int64.fromString(e.offerId)})),r=i.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=i.default.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new i.default.Operation(n)},t.revokeDataSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s.StrKey.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");if(!(0,o.default)(e.name)||e.name.length>64)throw new Error("name must be a string, up to 64 characters");var t=i.default.LedgerKey.data(new i.default.LedgerKeyData({accountId:a.Keypair.fromPublicKey(e.account).xdrAccountId(),dataName:e.name})),r=i.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=i.default.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new i.default.Operation(n)},t.revokeClaimableBalanceSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(0,o.default)(e.balanceId))throw new Error("balanceId is invalid");var t=i.default.LedgerKey.claimableBalance(new i.default.LedgerKeyClaimableBalance({balanceId:i.default.ClaimableBalanceId.fromXDR(e.balanceId,"hex")})),r=i.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=i.default.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new i.default.Operation(n)},t.revokeLiquidityPoolSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(0,o.default)(e.liquidityPoolId))throw new Error("liquidityPoolId is invalid");var t=i.default.LedgerKey.liquidityPool(new i.default.LedgerKeyLiquidityPool({liquidityPoolId:i.default.PoolId.fromXDR(e.liquidityPoolId,"hex")})),r=i.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={body:i.default.OperationBody.revokeSponsorship(r)};return this.setSourceAccount(n,e),new i.default.Operation(n)},t.revokeSignerSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s.StrKey.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");var t=void 0;if(e.signer.ed25519PublicKey){if(!s.StrKey.isValidEd25519PublicKey(e.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var r=s.StrKey.decodeEd25519PublicKey(e.signer.ed25519PublicKey);t=new i.default.SignerKey.signerKeyTypeEd25519(r)}else if(e.signer.preAuthTx){var u=void 0;if(u=(0,o.default)(e.signer.preAuthTx)?n.from(e.signer.preAuthTx,"hex"):e.signer.preAuthTx,!n.isBuffer(u)||32!==u.length)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");t=new i.default.SignerKey.signerKeyTypePreAuthTx(u)}else{if(!e.signer.sha256Hash)throw new Error("signer is invalid");var l=void 0;if(l=(0,o.default)(e.signer.sha256Hash)?n.from(e.signer.sha256Hash,"hex"):e.signer.sha256Hash,!n.isBuffer(l)||32!==l.length)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");t=new i.default.SignerKey.signerKeyTypeHashX(l)}var c=new i.default.RevokeSponsorshipOpSigner({accountId:a.Keypair.fromPublicKey(e.account).xdrAccountId(),signerKey:t}),d=i.default.RevokeSponsorshipOp.revokeSponsorshipSigner(c),h={};return h.body=i.default.OperationBody.revokeSponsorship(d),this.setSourceAccount(h,e),new i.default.Operation(h)};var o=c(r("./node_modules/lodash/isString.js")),i=c(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js")),s=r("./node_modules/stellar-base/lib/strkey.js"),a=r("./node_modules/stellar-base/lib/keypair.js"),u=r("./node_modules/stellar-base/lib/asset.js"),l=r("./node_modules/stellar-base/lib/liquidity_pool_id.js");function c(e){return e&&e.__esModule?e:{default:e}}},"./node_modules/stellar-base/lib/operations/set_options.js":(e,t,r)=>{"use strict";var n=r("./node_modules/buffer/index.js").Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.setOptions=function(e){var t={};if(e.inflationDest){if(!u.StrKey.isValidEd25519PublicKey(e.inflationDest))throw new Error("inflationDest is invalid");t.inflationDest=a.Keypair.fromPublicKey(e.inflationDest).xdrAccountId()}if(t.clearFlags=this._checkUnsignedIntValue("clearFlags",e.clearFlags),t.setFlags=this._checkUnsignedIntValue("setFlags",e.setFlags),t.masterWeight=this._checkUnsignedIntValue("masterWeight",e.masterWeight,c),t.lowThreshold=this._checkUnsignedIntValue("lowThreshold",e.lowThreshold,c),t.medThreshold=this._checkUnsignedIntValue("medThreshold",e.medThreshold,c),t.highThreshold=this._checkUnsignedIntValue("highThreshold",e.highThreshold,c),!(0,o.default)(e.homeDomain)&&!(0,i.default)(e.homeDomain))throw new TypeError("homeDomain argument must be of type String");if(t.homeDomain=e.homeDomain,e.signer){var r=this._checkUnsignedIntValue("signer.weight",e.signer.weight,c),l=void 0,d=0;if(e.signer.ed25519PublicKey){if(!u.StrKey.isValidEd25519PublicKey(e.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var h=u.StrKey.decodeEd25519PublicKey(e.signer.ed25519PublicKey);l=new s.default.SignerKey.signerKeyTypeEd25519(h),d+=1}if(e.signer.preAuthTx){if((0,i.default)(e.signer.preAuthTx)&&(e.signer.preAuthTx=n.from(e.signer.preAuthTx,"hex")),!n.isBuffer(e.signer.preAuthTx)||32!==e.signer.preAuthTx.length)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");l=new s.default.SignerKey.signerKeyTypePreAuthTx(e.signer.preAuthTx),d+=1}if(e.signer.sha256Hash){if((0,i.default)(e.signer.sha256Hash)&&(e.signer.sha256Hash=n.from(e.signer.sha256Hash,"hex")),!n.isBuffer(e.signer.sha256Hash)||32!==e.signer.sha256Hash.length)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");l=new s.default.SignerKey.signerKeyTypeHashX(e.signer.sha256Hash),d+=1}if(1!==d)throw new Error("Signer object must contain exactly one of signer.ed25519PublicKey, signer.sha256Hash, signer.preAuthTx.");t.signer=new s.default.Signer({key:l,weight:r})}var f=new s.default.SetOptionsOp(t),p={};return p.body=s.default.OperationBody.setOptions(f),this.setSourceAccount(p,e),new s.default.Operation(p)};var o=l(r("./node_modules/lodash/isUndefined.js")),i=l(r("./node_modules/lodash/isString.js")),s=l(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js")),a=r("./node_modules/stellar-base/lib/keypair.js"),u=r("./node_modules/stellar-base/lib/strkey.js");function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(e>=0&&e<=255)return!0;throw new Error(t+" value must be between 0 and 255")}},"./node_modules/stellar-base/lib/operations/set_trustline_flags.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.setTrustLineFlags=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};if("object"!==n(e.flags)||0===Object.keys(e.flags).length)throw new Error("opts.flags must be an map of boolean flags to modify");var r={authorized:s.default.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:s.default.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:s.default.TrustLineFlags.trustlineClawbackEnabledFlag()},o=0,i=0;Object.keys(e.flags).forEach((function(t){if(!Object.prototype.hasOwnProperty.call(r,t))throw new Error("unsupported flag name specified: "+t);var n=e.flags[t],s=r[t].value;!0===n?i|=s:!1===n&&(o|=s)})),t.trustor=a.Keypair.fromPublicKey(e.trustor).xdrAccountId(),t.asset=e.asset.toXDRObject(),t.clearFlags=o,t.setFlags=i;var u={body:s.default.OperationBody.setTrustLineFlags(new s.default.SetTrustLineFlagsOp(t))};return this.setSourceAccount(u,e),new s.default.Operation(u)};var o,i=r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"),s=(o=i)&&o.__esModule?o:{default:o},a=r("./node_modules/stellar-base/lib/keypair.js")},"./node_modules/stellar-base/lib/signing.js":(e,t,r)=>{"use strict";var n=r("./src/@utils/window.ts"),o=r("./node_modules/buffer/index.js").Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.sign=function(e,t){return i.sign(e,t)},t.verify=function(e,t,r){return i.verify(e,t,r)},t.generate=function(e){return i.generate(e)};var i={};t.FastSigning=void 0===n?function(){var e=void 0;try{e=r("?90ab")}catch(e){return s()}return i.generate=function(t){var r=o.alloc(e.crypto_sign_PUBLICKEYBYTES),n=o.alloc(e.crypto_sign_SECRETKEYBYTES);return e.crypto_sign_seed_keypair(r,n,t),r},i.sign=function(t,r){t=o.from(t);var n=o.alloc(e.crypto_sign_BYTES);return e.crypto_sign_detached(n,t,r),n},i.verify=function(t,r,n){t=o.from(t);try{return e.crypto_sign_verify_detached(r,t,n)}catch(e){return!1}},!0}():s();function s(){var e=r("./node_modules/tweetnacl/nacl-fast.js");return i.generate=function(t){var r=new Uint8Array(t),n=e.sign.keyPair.fromSeed(r);return o.from(n.publicKey)},i.sign=function(t,r){t=o.from(t),t=new Uint8Array(t.toJSON().data),r=new Uint8Array(r.toJSON().data);var n=e.sign.detached(t,r);return o.from(n)},i.verify=function(t,r,n){return t=o.from(t),t=new Uint8Array(t.toJSON().data),r=new Uint8Array(r.toJSON().data),n=new Uint8Array(n.toJSON().data),e.sign.detached.verify(t,r,n)},!1}},"./node_modules/stellar-base/lib/strkey.js":(e,t,r)=>{"use strict";var n=r("./node_modules/buffer/index.js").Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.StrKey=void 0;var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();t.decodeCheck=p,t.encodeCheck=_;var i=d(r("./node_modules/base32.js/base32.js")),s=d(r("./node_modules/crc/index.js")),a=d(r("./node_modules/lodash/isUndefined.js")),u=d(r("./node_modules/lodash/isNull.js")),l=d(r("./node_modules/lodash/isString.js")),c=r("./node_modules/stellar-base/lib/util/checksum.js");function d(e){return e&&e.__esModule?e:{default:e}}var h={ed25519PublicKey:48,ed25519SecretSeed:144,med25519PublicKey:96,preAuthTx:152,sha256Hash:184};t.StrKey=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return o(e,null,[{key:"encodeEd25519PublicKey",value:function(e){return _("ed25519PublicKey",e)}},{key:"decodeEd25519PublicKey",value:function(e){return p("ed25519PublicKey",e)}},{key:"isValidEd25519PublicKey",value:function(e){return f("ed25519PublicKey",e)}},{key:"encodeEd25519SecretSeed",value:function(e){return _("ed25519SecretSeed",e)}},{key:"decodeEd25519SecretSeed",value:function(e){return p("ed25519SecretSeed",e)}},{key:"isValidEd25519SecretSeed",value:function(e){return f("ed25519SecretSeed",e)}},{key:"encodeMed25519PublicKey",value:function(e){return _("med25519PublicKey",e)}},{key:"decodeMed25519PublicKey",value:function(e){return p("med25519PublicKey",e)}},{key:"isValidMed25519PublicKey",value:function(e){return f("med25519PublicKey",e)}},{key:"encodePreAuthTx",value:function(e){return _("preAuthTx",e)}},{key:"decodePreAuthTx",value:function(e){return p("preAuthTx",e)}},{key:"encodeSha256Hash",value:function(e){return _("sha256Hash",e)}},{key:"decodeSha256Hash",value:function(e){return p("sha256Hash",e)}}]),e}();function f(e,t){if(t&&56!==t.length&&69!==t.length)return!1;try{var r=p(e,t);if(32!==r.length&&40!==r.length)return!1}catch(e){return!1}return!0}function p(e,t){if(!(0,l.default)(t))throw new TypeError("encoded argument must be of type String");var r=i.default.decode(t),o=r[0],s=r.slice(0,-2),u=s.slice(1),d=r.slice(-2);if(t!==i.default.encode(r))throw new Error("invalid encoded string");var f=h[e];if((0,a.default)(f))throw new Error(e+" is not a valid version byte name. Expected one of "+Object.keys(h).join(", "));if(o!==f)throw new Error("invalid version byte. expected "+f+", got "+o);var p=m(s);if(!(0,c.verifyChecksum)(p,d))throw new Error("invalid checksum");return n.from(u)}function _(e,t){if((0,u.default)(t)||(0,a.default)(t))throw new Error("cannot encode null data");var r=h[e];if((0,a.default)(r))throw new Error(e+" is not a valid version byte name. Expected one of "+Object.keys(h).join(", "));t=n.from(t);var o=n.from([r]),s=n.concat([o,t]),l=m(s),c=n.concat([s,l]);return i.default.encode(c)}function m(e){var t=n.alloc(2);return t.writeUInt16LE(s.default.crc16xmodem(e),0),t}},"./node_modules/stellar-base/lib/transaction.js":(e,t,r)=>{"use strict";var n=r("./node_modules/buffer/index.js").Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Transaction=void 0;var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=f(r("./node_modules/lodash/map.js")),s=f(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js")),a=r("./node_modules/stellar-base/lib/hashing.js"),u=r("./node_modules/stellar-base/lib/strkey.js"),l=r("./node_modules/stellar-base/lib/operation.js"),c=r("./node_modules/stellar-base/lib/memo.js"),d=r("./node_modules/stellar-base/lib/transaction_base.js"),h=r("./node_modules/stellar-base/lib/util/decode_encode_muxed_account.js");function f(e){return e&&e.__esModule?e:{default:e}}t.Transaction=function(e){function t(e,r,o){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"string"==typeof e){var a=n.from(e,"base64");e=s.default.TransactionEnvelope.fromXDR(a)}var c=e.switch();if(c!==s.default.EnvelopeType.envelopeTypeTxV0()&&c!==s.default.EnvelopeType.envelopeTypeTx())throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxV0 or envelopeTypeTx but received an "+c.name+".");var d=e.value(),f=d.tx(),p=f.fee().toString(),_=(d.signatures()||[]).slice(),m=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,f,_,p,r));if(m._envelopeType=c,m._memo=f.memo(),m._sequence=f.seqNum().toString(),m._envelopeType===s.default.EnvelopeType.envelopeTypeTxV0())m._source=u.StrKey.encodeEd25519PublicKey(m.tx.sourceAccountEd25519());else m._source=(0,h.encodeMuxedAccountToAddress)(m.tx.sourceAccount(),o);var y=f.timeBounds();y&&(m._timeBounds={minTime:y.minTime().toString(),maxTime:y.maxTime().toString()});var v=f.operations()||[];return m._operations=(0,i.default)(v,(function(e){return l.Operation.fromXDRObject(e,o)})),m}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"signatureBase",value:function(){var e=this.tx;this._envelopeType===s.default.EnvelopeType.envelopeTypeTxV0()&&(e=s.default.Transaction.fromXDR(n.concat([s.default.PublicKeyType.publicKeyTypeEd25519().toXDR(),e.toXDR()])));var t=new s.default.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTx(e);return new s.default.TransactionSignaturePayload({networkId:s.default.Hash.fromXDR((0,a.hash)(this.networkPassphrase)),taggedTransaction:t}).toXDR()}},{key:"toEnvelope",value:function(){var e=this.tx.toXDR(),t=this.signatures.slice(),r=void 0;switch(this._envelopeType){case s.default.EnvelopeType.envelopeTypeTxV0():r=new s.default.TransactionEnvelope.envelopeTypeTxV0(new s.default.TransactionV0Envelope({tx:s.default.TransactionV0.fromXDR(e),signatures:t}));break;case s.default.EnvelopeType.envelopeTypeTx():r=new s.default.TransactionEnvelope.envelopeTypeTx(new s.default.TransactionV1Envelope({tx:s.default.Transaction.fromXDR(e),signatures:t}));break;default:throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxV0 or envelopeTypeTx but received an "+this._envelopeType.name+".")}return r}},{key:"timeBounds",get:function(){return this._timeBounds},set:function(e){throw new Error("Transaction is immutable")}},{key:"sequence",get:function(){return this._sequence},set:function(e){throw new Error("Transaction is immutable")}},{key:"source",get:function(){return this._source},set:function(e){throw new Error("Transaction is immutable")}},{key:"operations",get:function(){return this._operations},set:function(e){throw new Error("Transaction is immutable")}},{key:"memo",get:function(){return c.Memo.fromXDRObject(this._memo)},set:function(e){throw new Error("Transaction is immutable")}}]),t}(d.TransactionBase)},"./node_modules/stellar-base/lib/transaction_base.js":(e,t,r)=>{"use strict";var n=r("./node_modules/buffer/index.js").Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionBase=void 0;var o,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js"),u=(o=a)&&o.__esModule?o:{default:o},l=r("./node_modules/stellar-base/lib/hashing.js"),c=r("./node_modules/stellar-base/lib/keypair.js");t.TransactionBase=function(){function e(t,r,n,o){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"string"!=typeof o)throw new Error("Invalid passphrase provided to Transaction: expected a string but got a "+(void 0===o?"undefined":i(o)));this._networkPassphrase=o,this._tx=t,this._signatures=r,this._fee=n}return s(e,[{key:"sign",value:function(){for(var e=this,t=this.hash(),r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];n.forEach((function(r){var n=r.signDecorated(t);e.signatures.push(n)}))}},{key:"getKeypairSignature",value:function(e){return e.sign(this.hash()).toString("base64")}},{key:"addSignature",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!t||"string"!=typeof t)throw new Error("Invalid signature");if(!e||"string"!=typeof e)throw new Error("Invalid publicKey");var r=void 0,o=void 0,i=n.from(t,"base64");try{o=(r=c.Keypair.fromPublicKey(e)).signatureHint()}catch(e){throw new Error("Invalid publicKey")}if(!r.verify(this.hash(),i))throw new Error("Invalid signature");this.signatures.push(new u.default.DecoratedSignature({hint:o,signature:i}))}},{key:"signHashX",value:function(e){if("string"==typeof e&&(e=n.from(e,"hex")),e.length>64)throw new Error("preimage cannnot be longer than 64 bytes");var t=e,r=(0,l.hash)(e),o=r.slice(r.length-4);this.signatures.push(new u.default.DecoratedSignature({hint:o,signature:t}))}},{key:"hash",value:function(){return(0,l.hash)(this.signatureBase())}},{key:"signatureBase",value:function(){throw new Error("Implement in subclass")}},{key:"toEnvelope",value:function(){throw new Error("Implement in subclass")}},{key:"toXDR",value:function(){return this.toEnvelope().toXDR().toString("base64")}},{key:"signatures",get:function(){return this._signatures},set:function(e){throw new Error("Transaction is immutable")}},{key:"tx",get:function(){return this._tx},set:function(e){throw new Error("Transaction is immutable")}},{key:"fee",get:function(){return this._fee},set:function(e){throw new Error("Transaction is immutable")}},{key:"networkPassphrase",get:function(){return this._networkPassphrase},set:function(e){this._networkPassphrase=e}}]),e}()},"./node_modules/stellar-base/lib/transaction_builder.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionBuilder=t.TimeoutInfinite=t.BASE_FEE=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();t.isValidDate=y;var o=r("./node_modules/js-xdr/lib/index.js"),i=p(r("./node_modules/bignumber.js/bignumber.js")),s=p(r("./node_modules/lodash/clone.js")),a=p(r("./node_modules/lodash/isUndefined.js")),u=p(r("./node_modules/lodash/isString.js")),l=p(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js")),c=r("./node_modules/stellar-base/lib/transaction.js"),d=r("./node_modules/stellar-base/lib/fee_bump_transaction.js"),h=r("./node_modules/stellar-base/lib/memo.js"),f=r("./node_modules/stellar-base/lib/util/decode_encode_muxed_account.js");function p(e){return e&&e.__esModule?e:{default:e}}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var m=t.BASE_FEE="100";t.TimeoutInfinite=0,t.TransactionBuilder=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_(this,e),!t)throw new Error("must specify source account for the transaction");if((0,a.default)(r.fee))throw new Error("must specify fee for the transaction (in stroops)");this.source=t,this.operations=[],this.baseFee=(0,a.default)(r.fee)?m:r.fee,this.timebounds=(0,s.default)(r.timebounds)||null,this.memo=r.memo||h.Memo.none(),this.networkPassphrase=r.networkPassphrase||null,this.supportMuxedAccounts=r.withMuxing||!1}return n(e,[{key:"addOperation",value:function(e){return this.operations.push(e),this}},{key:"addMemo",value:function(e){return this.memo=e,this}},{key:"setTimeout",value:function(e){if(null!==this.timebounds&&this.timebounds.maxTime>0)throw new Error("TimeBounds.max_time has been already set - setting timeout would overwrite it.");if(e<0)throw new Error("timeout cannot be negative");if(e>0){var t=Math.floor(Date.now()/1e3)+e;null===this.timebounds?this.timebounds={minTime:0,maxTime:t}:this.timebounds={minTime:this.timebounds.minTime,maxTime:t}}else this.timebounds={minTime:0,maxTime:0};return this}},{key:"setNetworkPassphrase",value:function(e){return this.networkPassphrase=e,this}},{key:"enableMuxedAccounts",value:function(){return this.supportMuxedAccounts=!0,this}},{key:"build",value:function(){var e=new i.default(this.source.sequenceNumber()).add(1),t={fee:new i.default(this.baseFee).mul(this.operations.length).toNumber(),seqNum:l.default.SequenceNumber.fromString(e.toString()),memo:this.memo?this.memo.toXDRObject():null};if(null===this.timebounds||void 0===this.timebounds.minTime||void 0===this.timebounds.maxTime)throw new Error("TimeBounds has to be set or you must call setTimeout(TimeoutInfinite).");y(this.timebounds.minTime)&&(this.timebounds.minTime=this.timebounds.minTime.getTime()/1e3),y(this.timebounds.maxTime)&&(this.timebounds.maxTime=this.timebounds.maxTime.getTime()/1e3),this.timebounds.minTime=o.UnsignedHyper.fromString(this.timebounds.minTime.toString()),this.timebounds.maxTime=o.UnsignedHyper.fromString(this.timebounds.maxTime.toString()),t.timeBounds=new l.default.TimeBounds(this.timebounds),t.sourceAccount=(0,f.decodeAddressToMuxedAccount)(this.source.accountId(),this.supportMuxedAccounts),t.ext=new l.default.TransactionExt(0);var r=new l.default.Transaction(t);r.operations(this.operations);var n=new l.default.TransactionEnvelope.envelopeTypeTx(new l.default.TransactionV1Envelope({tx:r})),s=new c.Transaction(n,this.networkPassphrase,this.supportMuxedAccounts);return this.source.incrementSequenceNumber(),s}}],[{key:"buildFeeBumpTransaction",value:function(e,t,r,n,o){var s=r.operations.length,a=new i.default(r.fee).div(s),c=new i.default(t);if(c.lessThan(a))throw new Error("Invalid baseFee, it should be at least "+a+" stroops.");var h=new i.default(m);if(c.lessThan(h))throw new Error("Invalid baseFee, it should be at least "+h+" stroops.");var p=r.toEnvelope();if(p.switch()===l.default.EnvelopeType.envelopeTypeTxV0()){var _=p.v0().tx(),y=new l.default.Transaction({sourceAccount:new l.default.MuxedAccount.keyTypeEd25519(_.sourceAccountEd25519()),fee:_.fee(),seqNum:_.seqNum(),timeBounds:_.timeBounds(),memo:_.memo(),operations:_.operations(),ext:new l.default.TransactionExt(0)});p=new l.default.TransactionEnvelope.envelopeTypeTx(new l.default.TransactionV1Envelope({tx:y,signatures:p.v0().signatures()}))}var v=void 0;v=(0,u.default)(e)?(0,f.decodeAddressToMuxedAccount)(e,o):e.xdrMuxedAccount();var g=new l.default.FeeBumpTransaction({feeSource:v,fee:l.default.Int64.fromString(c.mul(s+1).toString()),innerTx:l.default.FeeBumpTransactionInnerTx.envelopeTypeTx(p.v1()),ext:new l.default.FeeBumpTransactionExt(0)}),b=new l.default.FeeBumpTransactionEnvelope({tx:g,signatures:[]}),w=new l.default.TransactionEnvelope.envelopeTypeTxFeeBump(b);return new d.FeeBumpTransaction(w,n,o)}},{key:"fromXDR",value:function(e,t){return"string"==typeof e&&(e=l.default.TransactionEnvelope.fromXDR(e,"base64")),e.switch()===l.default.EnvelopeType.envelopeTypeTxFeeBump()?new d.FeeBumpTransaction(e,t):new c.Transaction(e,t)}}]),e}();function y(e){return e instanceof Date&&!isNaN(e)}},"./node_modules/stellar-base/lib/util/checksum.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyChecksum=function(e,t){if(e.length!==t.length)return!1;if(0===e.length)return!0;for(var r=0;r<e.length;r+=1)if(e[r]!==t[r])return!1;return!0}},"./node_modules/stellar-base/lib/util/continued_fraction.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.best_r=function(e){var t=new s.default(e),r=void 0,o=void 0,i=[[new s.default(0),new s.default(1)],[new s.default(1),new s.default(0)]],u=2;for(;!t.gt(a);){r=t.floor(),o=t.sub(r);var l=r.mul(i[u-1][0]).add(i[u-2][0]),c=r.mul(i[u-1][1]).add(i[u-2][1]);if(l.gt(a)||c.gt(a))break;if(i.push([l,c]),o.eq(0))break;t=new s.default(1).div(o),u+=1}var d=n(i[i.length-1],2),h=d[0],f=d[1];if(h.isZero()||f.isZero())throw new Error("Couldn't find approximation");return[h.toNumber(),f.toNumber()]};var o,i=r("./node_modules/bignumber.js/bignumber.js"),s=(o=i)&&o.__esModule?o:{default:o};var a=2147483647},"./node_modules/stellar-base/lib/util/decode_encode_muxed_account.js":(e,t,r)=>{"use strict";var n=r("./node_modules/buffer/index.js").Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.decodeAddressToMuxedAccount=function(e,t){if(t&&s.StrKey.isValidMed25519PublicKey(e))return function(e){var t=s.StrKey.decodeMed25519PublicKey(e);return i.default.MuxedAccount.keyTypeMuxedEd25519(new i.default.MuxedAccountMed25519({id:i.default.Uint64.fromXDR(t.slice(-8)),ed25519:t.slice(0,-8)}))}(e);return i.default.MuxedAccount.keyTypeEd25519(s.StrKey.decodeEd25519PublicKey(e))},t.encodeMuxedAccountToAddress=u,t.encodeMuxedAccount=function(e,t){if(!s.StrKey.isValidEd25519PublicKey(e))throw new Error("address should be a Stellar account ID (G...)");if(!(0,o.default)(t))throw new Error("id should be a string representing a number (uint64)");return i.default.MuxedAccount.keyTypeMuxedEd25519(new i.default.MuxedAccountMed25519({id:i.default.Uint64.fromString(t),ed25519:s.StrKey.decodeEd25519PublicKey(e)}))};var o=a(r("./node_modules/lodash/isString.js")),i=a(r("./node_modules/stellar-base/lib/generated/stellar-xdr_generated.js")),s=r("./node_modules/stellar-base/lib/strkey.js");function a(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(e.switch().value===i.default.CryptoKeyType.keyTypeMuxedEd25519().value){if(t)return function(e){if(e.switch()===i.default.CryptoKeyType.keyTypeEd25519())return u(e);var t=e.med25519();return s.StrKey.encodeMed25519PublicKey(n.concat([t.ed25519(),t.id().toXDR("raw")]))}(e);e=e.med25519()}return s.StrKey.encodeEd25519PublicKey(e.ed25519())}},"./src/@utils/auth.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{authTxToken:()=>u});var n=r("./node_modules/bignumber.js/bignumber.js"),o=r("./node_modules/stellar-base/lib/index.js"),i=r("./src/@utils/stellar-sdk-utils.ts"),s=r("./node_modules/moment/moment.js"),a=r.n(s);function u(e,t){try{if(void 0===t)throw{message:"Unable to find an auth token"};const r=new o.Transaction(t,o.Networks[e]);if(!new n.BigNumber(r.sequence).equals(0))throw{message:"AuthTokenTx has a non-zero sequence number"};if(!r.timeBounds)return;if(!new n.BigNumber(r.timeBounds.maxTime).equals(0)&&a().utc(r.timeBounds.maxTime,"X").isBefore())throw{message:"AuthToken has expired"};const s=r.source;if(!(0,i.verifyTxSignedBy)(r,s))throw{message:"AuthToken not signed"};let u=[],l=!1;for(const e of r.operations)if("manageData"===e.type){if(!e.value)return;let t=e.value.toString();"singleUse"===e.name?l="true"===t:"txFunctionHash"===e.name&&u.push(t)}if(l&&(new n.BigNumber(r.timeBounds.maxTime).lessThanOrEqualTo(0)||a().utc(r.timeBounds.maxTime,"X").isAfter(a().utc().add(1,"hour"))))throw{message:"Single use auth tokens must expire in less than 1 hour"};return{hash:r.hash().toString("hex"),publicKey:s,data:u,singleUse:l,exp:r.timeBounds.maxTime}}catch(e){throw{message:null!=e.message?`${e.message}: Failed during auth`:"Failed to parse Auth Token"}}}},"./src/@utils/flush-single-use-auth-tokens.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c});var n=r("./node_modules/cfw-easy-utils/dist/cfw-easy-utils.js"),o=r("./node_modules/moment/moment.js"),i=r.n(o),s=r("./node_modules/lodash/lodash.js"),a=r("./src/@utils/index.ts"),u=r("./node_modules/bluebird/js/browser/bluebird.js"),l=r.n(u);async function c({env:e}){const{META:t,TX_FEES:r}=e,{keys:o}=await t.list({prefix:"suat:",limit:100}),u=o.filter((({metadata:e})=>i().utc(e,"X").isBefore())).map((({name:e})=>{const[,t,r]=e.split(":");return{publicKey:t,transactionHash:r}})),c=(0,s.map)((0,s.groupBy)(u,"publicKey"),((e,t)=>({publicKey:t,transactionHashes:(0,s.map)(e,"transactionHash")}))),d=await l().mapSeries(c,(({publicKey:e,transactionHashes:t})=>{const n=r.idFromName(e);return r.get(n).fetch(`/${e}`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(a.handleResponse)}));return n.response.json(d)}},"./src/@utils/handleFees.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{handleFees:()=>s});var n=r("./node_modules/cfw-easy-utils/dist/cfw-easy-utils.js"),o=r("./node_modules/bluebird/js/browser/bluebird.js"),i=r.n(o);class s{storage;META;value;constructor(e,t){const{META:r}=t;this.storage=e.storage,this.META=r,this.value={lastModifiedTime:0,balance:0}}async fetch(e){const t=new URL(e.url),{pathname:r}=t,[,o]=r.split("/"),{method:s}=e;if("object"!=typeof this.value){const e=await this.storage.get("value")||{lastModifiedTime:0,balance:0};this.value="object"!=typeof this.value?e:this.value}if(o){if("POST"===s){const e=o;return console.log("first POST"),console.log(e),n.response.text("OK")}if("DELETE"===s){const t=o,r=await e.json(),s=await this.storage.delete(r);return await i().map(r,(e=>this.META.delete(`suat:${t}:${e}`))),n.response.text(s)}return new Response(null,{status:404})}if("POST"===s){await e.json();console.log("second POST");const t=Object.assign({},this.value);return await this.storage.put("value",t),n.response.json(t)}return n.response.json(this.value)}}},"./src/@utils/handlers.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{handleRequest:()=>i,handleResponse:()=>s,handleScheduled:()=>a});var n=r("./src/@utils/flush-single-use-auth-tokens.ts"),o=r("./src/@utils/parseError.ts");const i=async(e,t,r,n)=>{try{console.log("Handling Request");const o=caches.default,i=t.method,{href:s,pathname:a}=new URL(t.url);if("OPTIONS"===i)return new Response(null,{status:204,headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Headers":"Authorization, Origin, Content-Type, Accept, Cache-Control, Pragma","Access-Control-Allow-Methods":"GET, PUT, POST, DELETE, PATCH, OPTIONS","Cache-Control":"public, max-age=2419200"}});const u=e.match(i,a);if(u){const e=await u.handler({...u,cache:o,request:t,env:r,ctx:n});return"GET"===i&&e.status>=200&&e.status<=299&&n.waitUntil(o.put(s,e.clone())),e}throw{status:404}}catch(e){return(0,o.parseError)(e)}};async function s(e){if(e.json().then((e=>console.log(e))),e.ok)return e.headers.get("content-type")?.indexOf("json")>-1?e.json():e.text();throw e.headers.get("content-type")?.indexOf("json")>-1?await e.json():await e.text()}function a(e){return Promise.all([(0,n.default)({env:e})])}},"./src/@utils/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{handleRequest:()=>n.handleRequest,handleResponse:()=>n.handleResponse,handleScheduled:()=>n.handleScheduled,handleFees:()=>o.handleFees,parseError:()=>i.parseError,authTxToken:()=>s.authTxToken,verifyTxSignedBy:()=>a.verifyTxSignedBy,gatherTxSigners:()=>a.gatherTxSigners,processFeePayment:()=>a.processFeePayment});var n=r("./src/@utils/handlers.ts"),o=r("./src/@utils/handleFees.ts"),i=r("./src/@utils/parseError.ts"),s=r("./src/@utils/auth.ts"),a=r("./src/@utils/stellar-sdk-utils.ts")},"./src/@utils/parseError.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{parseError:()=>o});var n=r("./node_modules/cfw-easy-utils/dist/cfw-easy-utils.js");async function o(e){try{return"string"==typeof e&&(e={message:e,status:400}),e.headers?.has("content-type")&&(e.message=e.headers.get("content-type").indexOf("json")>-1?await e.json():await e.text()),e.status||(e.status=400),n.response.json({..."string"==typeof e.message?{message:e.message}:e.message,status:e.status},{status:e.status,headers:{"Cache-Control":"no-store"}})}catch(e){return n.response.json(e,{headers:{"Cache-Control":"no-store"}})}}},"./src/@utils/stellar-sdk-utils.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{verifyTxSignedBy:()=>s,gatherTxSigners:()=>a,processFeePayment:()=>u});var n=r("./node_modules/bignumber.js/bignumber.js"),o=r.n(n),i=r("./node_modules/stellar-base/lib/index.js");function s(e,t){return 0!==a(e,[t]).length}function a(e,t){const r=e.hash(),n=new Set;for(const o of t){if(0===e.signatures.length)break;let t;try{t=i.Keypair.fromPublicKey(o)}catch(e){throw new Error("Signer is not a valid address: "+e.message)}for(let i of e.signatures)if(i.hint().equals(t.signatureHint())&&t.verify(r,i.signature())){n.add(o);break}}return Array.from(n)}async function u(e,t,r,n){const{HORIZON_URL:s,STELLAR_NETWORK:a,TURRET_ADDRESS:u}=e,l=new i.Transaction(t,i.Networks[a]),c=l.hash().toString("hex");if(1!==l.operations.length)throw{message:"Fee payments cannot have more than one operation"};const d=l.operations[0];if("payment"!==d.type||d.destination!==u||!d.asset.isNative())throw{message:`Fee payments must be XLM payments made to ${u}`};if(r&&new(o())(d.amount).lessThan(r))throw{message:`Fee payment too low. Min = ${r}`};if(n&&new(o())(d.amount).greaterThan(n))throw{message:`Fee payment too large. Max = ${n}`};let h=await fetch(`${s}/transactions/${c}`);if(h.ok)throw{message:`Fee payment with hash ${c} has already been submitted`};if(404===h.status)return await async function(e,t){const r=t.toXDR(),n=new FormData;n.append("tx",r);let o=await fetch(`${e}/transactions`,{method:"POST",body:n});if(o.ok){return(await o.json()).hash}throw{message:"Failed to submit transaction"}}(s,l),{hash:c,amount:d.amount};throw{message:"Error checking for fee payment"}}},"./src/@utils/window.ts":e=>{"use strict";e.exports={}},"./src/functions/Turret.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Turret:()=>o});var n=r("./node_modules/cfw-easy-utils/dist/cfw-easy-utils.js");class o{static async details({env:e}){const{TURRET_ADDRESS:t,STELLAR_NETWORK:r,HORIZON_URL:o,TURRET_RUN_URL:i,XLM_FEE_MIN:s,XLM_FEE_MAX:a,UPLOAD_DIVISOR:u,RUN_DIVISOR:l}=e;return n.response.json({turret:t,network:r,horizon:o,runner:i,version:"b412bd2",fee:{min:s,max:a},divisor:{upload:u,run:l}},{headers:{"Cache-Control":"public, max-age=300"}})}static async toml({env:e}){const{META:t}=e,r=await t.get("STELLAR_TOML");if(!r)throw{status:404,message:"stellar.toml file could not be found on this turret"};return n.response.text(r,{headers:{"Content-Type":"text/plain","Cache-Control":"public, max-age=2419200"}})}}},"./src/functions/TxFees.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{TxFees:()=>i});var n=r("./node_modules/cfw-easy-utils/dist/cfw-easy-utils.js"),o=r("./src/@utils/index.ts");class i{static async get({request:e,env:t}){const{TX_FEES:r,STELLAR_NETWORK:i}=t,s=e.headers.get("authorization")?.split(" ")?.[1],a=(0,o.authTxToken)(i,s);if(!a)return;const{hash:u,publicKey:l,data:c,singleUse:d}=a,h=r.idFromName(l),f=r.get(h),p=await f.fetch("/").then((0,o.handleResponse)(n.response));if(!p)throw{status:404,message:"Fee balance could not be found this turret"};return n.response.json({hash:u,publicKey:l,lastModifiedTime:p.lastModifiedTime,balance:p.balance,txFunctionHashes:c,singleUse:d},{headers:{"Cache-Control":"public, max-age=5"}})}static async pay({request:e,params:t,env:r}){const{TX_FEES:i,XLM_FEE_MIN:s,XLM_FEE_MAX:a,HORIZON_URL:u,STELLAR_NETWORK:l,TURRET_ADDRESS:c}=r,{publicKey:d}=t,h=await e.json(),{txFunctionFee:f}=h;if(!i)return;const p=i.idFromName(d),_=i.get(p),{hash:m,amount:y}=await(0,o.processFeePayment)({HORIZON_URL:u,STELLAR_NETWORK:l,TURRET_ADDRESS:c},f,s,a),{lastModifiedTime:v,balance:g}=await _.fetch("/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plus:y})}).then(o.handleResponse);return n.response.json({publicKey:d,paymentHash:m,lastModifiedTime:v,balance:g})}}},"./src/functions/TxFunctions.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{TxFunctions:()=>d});var n=r("./node_modules/cfw-easy-utils/dist/cfw-easy-utils.js"),o=r("./node_modules/sha.js/index.js"),i=r.n(o),s=r("./src/@utils/index.ts"),a=r("./node_modules/stellar-base/lib/index.js"),u=r("./node_modules/bignumber.js/bignumber.js"),l=r.n(u),c=r("./node_modules/buffer/index.js").Buffer;class d{static async get({params:e,env:t}){const{TX_FUNCTIONS:r}=t,{txFunctionHash:o}=e,{value:i,metadata:s}=await r.getWithMetadata(o,"arrayBuffer");if(!i)throw{status:404,message:"txFunction could not be found this turret"};const{length:a,txFunctionSignerPublicKey:u}=s,l=c.from(i),d=l.slice(0,a).toString(),h=JSON.parse(l.slice(a).toString());return n.response.json({function:d,fields:h,signer:u},{headers:{"Cache-Control":"public, max-age=2419200"}})}static async upload({request:e,env:t}){const{TX_FUNCTIONS:r,HORIZON_URL:o,TURRET_ADDRESS:u,STELLAR_NETWORK:d,UPLOAD_DIVISOR:h,XLM_FEE_MAX:f}=t,p=await e.formData();if(!r||!h)return;const _=p.get("txFunctionFields");if("string"!=typeof _)return;const m=_?c.from(_,"base64"):c.alloc(0);_&&JSON.parse(m.toString());const y=p.get("txFunction");if("string"!=typeof y)return;const v=c.from(y),g=c.concat([v,m]),b=i()("sha256").update(g).digest("hex");if(await r.get(b,"arrayBuffer"))throw`txFunction ${b} has already been uploaded to this turret`;const w=a.Keypair.random(),j=w.secret(),k=w.publicKey(),S=new(l())(g.length).dividedBy(h).toFixed(7);try{const e=p.get("txFunctionFee");await(0,s.processFeePayment)({HORIZON_URL:o,STELLAR_NETWORK:d,TURRET_ADDRESS:u},e,S,f)}catch(e){return n.response.json({message:"string"==typeof e.message?e.message:"Failed to process txFunctionFee",status:402,turret:u,cost:S},{status:402})}return await r.put(b,g,{metadata:{cost:S,payment:undefined,length:v.length,txFunctionSignerSecret:j,txFunctionSignerPublicKey:k}}),n.response.json({hash:b,signer:k})}static async run({request:e,params:t,env:r}){const{TX_FUNCTIONS:o,TX_FEES:i,META:u,TURRET_RUN_URL:d,TURRET_SIGNER:h,STELLAR_NETWORK:f,HORIZON_URL:p,RUN_DIVISOR:_}=r,{txFunctionHash:m}=t;if(!(o&&u&&h&&_))return;const{value:y,metadata:v}=await o.getWithMetadata(m,"arrayBuffer");if(!y)throw{status:404,message:"txFunction could not be found this turret"};const{length:g,txFunctionSignerPublicKey:b,txFunctionSignerSecret:w}=v,j=c.from(y).slice(0,g).toString(),k=await e.json(),S=e.headers.get("authorization")?.split(" ")?.[1],x=(0,s.authTxToken)(f,S);if(!x)return;const{hash:T,publicKey:A,data:E,singleUse:O,exp:R}=x;if(E.length&&!E.some((e=>e===m)))throw{status:403,message:`Not authorized to run contract with hash ${m}`};const C=i.idFromName(A),P=i.get(C);O&&(await P.fetch(`/${T}`,{method:"POST"}).then(s.handleResponse),await u.put(`suat:${A}:${T}`,c.alloc(0),{metadata:R}));const M=await P.fetch("/").then(s.handleResponse);let I;if(!M)throw{status:402,message:`No payment was found for account ${A}`};if(I=new(l())(M.balance),I.lessThanOrEqualTo(0))throw{status:402,message:`Turret fees have been spent for account ${A}`};let{value:N,metadata:L}=await u.getWithMetadata("TURRET_AUTH_TOKEN");if(!N){const e=a.Keypair.fromSecret(h),t=crypto.getRandomValues(c.alloc(256));N=t.toString("base64"),L=e.sign(t).toString("base64"),await u.put("TURRET_AUTH_TOKEN",N,{expirationTtl:2419200,metadata:L})}const B=new n.Stopwatch,D=await fetch(`${d}/${m}`,{method:"POST",headers:{"Content-Type":"application/json","X-Turret-Data":N,"X-Turret-Signature":L},body:JSON.stringify({...k,HORIZON_URL:p,STELLAR_NETWORK:f,txFunction:j})}).then((async e=>{B.mark("Ran txFunction");const t=new(l())(B.getTotalTime()).dividedBy(_).toFixed(7),r=await e.text(),{balance:n}=await P.fetch("/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({minus:t})}).then(s.handleResponse);if(e.ok)return{xdr:r,cost:t,feeSponsor:A,feeBalanceRemaining:n};const o=e.headers.get("content-type");return o?{error:{status:e.status||400,...o.indexOf("json")>-1?await e.json():await e.text()},cost:t,feeSponsor:A,feeBalanceRemaining:n}:void 0})),{xdr:F,error:U,cost:H,feeSponsor:q,feeBalanceRemaining:V}=D;if(U)return 403===U.status&&await u.delete("TURRET_AUTH_TOKEN"),n.response.json({...U,cost:H,feeSponsor:A,feeBalanceRemaining:V},{status:U.status,stopwatch:B});if(!F)return;const K=new a.Transaction(F,a.Networks[f]),Y=a.Keypair.fromSecret(w).sign(K.hash()).toString("base64");return n.response.json({xdr:F,signer:b,signature:Y,cost:H,feeSponsor:q,feeBalanceRemaining:V},{stopwatch:B})}}},"./src/functions/ctrlAccount.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{ctrlAccount:()=>d});var n=r("./node_modules/cfw-easy-utils/dist/cfw-easy-utils.js"),o=r("./node_modules/stellar-base/lib/index.js"),i=r("./node_modules/lodash/lodash.js"),s=r("./node_modules/bluebird/js/browser/bluebird.js"),a=r.n(s),u=r("./src/functions/index.ts"),l=r("./node_modules/@iarna/toml/toml.js"),c=r("./node_modules/buffer/index.js").Buffer;class d{static async heal({request:e,params:t,env:r}){const{TX_FUNCTIONS:s,TURRET_ADDRESS:d,STELLAR_NETWORK:h,HORIZON_URL:f}=r,{functionHash:p,sourceAccount:_,removeTurret:m,addTurret:y}=await e.json();if(!s)return;if(m===d||y===d)throw"Turrets may not add or remove themselves from a ctrlAccount";const{value:v,metadata:g}=await s.getWithMetadata(p,"arrayBuffer");if(!v)throw{status:404,message:"txFunction could not be found this turret"};const{ctrlAccount:b}=t,{requiredThreshold:w,existingSigners:j}=await fetch(`${f}/accounts/${b}`).then((e=>{if(e.ok)return e.json();throw e})).then((e=>{const t=(0,i.chain)(e.data).map(((t,r)=>{t=c.from(t,"base64").toString("utf8");const n=(0,i.find)(e.signers,{key:t});return 0===r.indexOf("TSS")&&n?{turret:r.replace("TSS_",""),signer:t,weight:n.weight}:null})).compact().value();return{requiredThreshold:e.thresholds.high_threshold,existingSigners:t}})),k=await a().map((0,i.chain)([{turret:y},...j]).orderBy("weight","asc").uniqBy("turret").value(),(async t=>({...t,...await fetch(`${f}/accounts/${t.turret}`).then((e=>{if(e.ok)return e.json();throw e})).then((t=>{const{url:r}=e,{hostname:n}=new URL(r);return(n===t.home_domain?u.TxFunctions.get({params:p,env:{TX_FUNCTIONS:s}}):fetch(`https://${t.home_domain}/tx-functions/${p}`)).then((e=>{if(e.ok)return e.json();throw e})).then((async e=>({signer:e.signer,toml:await(n===t.home_domain?u.Turret.toml({env:{META}}):fetch(`https://${t.home_domain}/.well-known/stellar.toml`)).then((async e=>{if(e.ok)return(0,l.parse)(await e.text());throw e}))})))})).catch((()=>null))}))),S=(0,i.find)(k,{turret:m});if(!S||S.toml)throw"Signer is not able to be removed";const x=(0,i.find)(k,{turret:y});if(!x||!x.toml)throw"Signer is not able to be added";if((0,i.chain)(k).filter((e=>e.toml&&e.weight)).sumBy("weight").value()<w)throw"Insufficient signer threshold";if(-1===(0,i.intersection)(...(0,i.compact)((0,i.map)(k,"toml.TSS.TURRETS"))).indexOf(x.turret))throw"New turret isn't trusted by existing signer turrets";const T=await fetch(`${f}/accounts/${_}`).then((e=>{if(e.ok)return e.json();throw e})).then((e=>new o.TransactionBuilder(new o.Account(e.id,e.sequence),{fee:o.BASE_FEE,networkPassphrase:o.Networks[h]}).addOperation(o.Operation.setOptions({signer:{ed25519PublicKey:S.signer,weight:0}})).addOperation(o.Operation.setOptions({signer:{ed25519PublicKey:x.signer,weight:S.weight}})).addOperation(o.Operation.manageData({name:`TSS_${S.turret}`,value:null})).addOperation(o.Operation.manageData({name:`TSS_${x.turret}`,value:x.signer})).setTimeout(0).build())),{txFunctionSignerPublicKey:A,txFunctionSignerSecret:E}=g,O=o.Keypair.fromSecret(E).sign(T.hash()).toString("base64");return n.response.json({xdr:T.toXDR(),signer:A,signature:O})}}},"./src/functions/index.ts":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Turret:()=>n.Turret,TxFees:()=>o.TxFees,TxFunctions:()=>i.TxFunctions,ctrlAccount:()=>s.ctrlAccount});var n=r("./src/functions/Turret.ts"),o=r("./src/functions/TxFees.ts"),i=r("./src/functions/TxFunctions.ts"),s=r("./src/functions/ctrlAccount.ts")},"./node_modules/tweetnacl/nacl-fast.js":(e,t,r)=>{!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},n=function(){throw new Error("no PRNG")},o=new Uint8Array(16),i=new Uint8Array(32);i[0]=9;var s=t(),a=t([1]),u=t([56129,1]),l=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),c=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),d=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),h=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),f=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function p(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function _(e,t,r,n,o){var i,s=0;for(i=0;i<o;i++)s|=e[t+i]^r[n+i];return(1&s-1>>>8)-1}function m(e,t,r,n){return _(e,t,r,n,16)}function y(e,t,r,n){return _(e,t,r,n,32)}function v(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,l=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,c=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,d=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,f=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,_=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,g=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,b=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=i,j=s,k=a,S=u,x=l,T=c,A=d,E=h,O=f,R=p,C=_,P=m,M=y,I=v,N=g,L=b,B=0;B<20;B+=2)w^=(o=(M^=(o=(O^=(o=(x^=(o=w+M|0)<<7|o>>>25)+w|0)<<9|o>>>23)+x|0)<<13|o>>>19)+O|0)<<18|o>>>14,T^=(o=(j^=(o=(I^=(o=(R^=(o=T+j|0)<<7|o>>>25)+T|0)<<9|o>>>23)+R|0)<<13|o>>>19)+I|0)<<18|o>>>14,C^=(o=(A^=(o=(k^=(o=(N^=(o=C+A|0)<<7|o>>>25)+C|0)<<9|o>>>23)+N|0)<<13|o>>>19)+k|0)<<18|o>>>14,L^=(o=(P^=(o=(E^=(o=(S^=(o=L+P|0)<<7|o>>>25)+L|0)<<9|o>>>23)+S|0)<<13|o>>>19)+E|0)<<18|o>>>14,w^=(o=(S^=(o=(k^=(o=(j^=(o=w+S|0)<<7|o>>>25)+w|0)<<9|o>>>23)+j|0)<<13|o>>>19)+k|0)<<18|o>>>14,T^=(o=(x^=(o=(E^=(o=(A^=(o=T+x|0)<<7|o>>>25)+T|0)<<9|o>>>23)+A|0)<<13|o>>>19)+E|0)<<18|o>>>14,C^=(o=(R^=(o=(O^=(o=(P^=(o=C+R|0)<<7|o>>>25)+C|0)<<9|o>>>23)+P|0)<<13|o>>>19)+O|0)<<18|o>>>14,L^=(o=(N^=(o=(I^=(o=(M^=(o=L+N|0)<<7|o>>>25)+L|0)<<9|o>>>23)+M|0)<<13|o>>>19)+I|0)<<18|o>>>14;w=w+i|0,j=j+s|0,k=k+a|0,S=S+u|0,x=x+l|0,T=T+c|0,A=A+d|0,E=E+h|0,O=O+f|0,R=R+p|0,C=C+_|0,P=P+m|0,M=M+y|0,I=I+v|0,N=N+g|0,L=L+b|0,e[0]=w>>>0&255,e[1]=w>>>8&255,e[2]=w>>>16&255,e[3]=w>>>24&255,e[4]=j>>>0&255,e[5]=j>>>8&255,e[6]=j>>>16&255,e[7]=j>>>24&255,e[8]=k>>>0&255,e[9]=k>>>8&255,e[10]=k>>>16&255,e[11]=k>>>24&255,e[12]=S>>>0&255,e[13]=S>>>8&255,e[14]=S>>>16&255,e[15]=S>>>24&255,e[16]=x>>>0&255,e[17]=x>>>8&255,e[18]=x>>>16&255,e[19]=x>>>24&255,e[20]=T>>>0&255,e[21]=T>>>8&255,e[22]=T>>>16&255,e[23]=T>>>24&255,e[24]=A>>>0&255,e[25]=A>>>8&255,e[26]=A>>>16&255,e[27]=A>>>24&255,e[28]=E>>>0&255,e[29]=E>>>8&255,e[30]=E>>>16&255,e[31]=E>>>24&255,e[32]=O>>>0&255,e[33]=O>>>8&255,e[34]=O>>>16&255,e[35]=O>>>24&255,e[36]=R>>>0&255,e[37]=R>>>8&255,e[38]=R>>>16&255,e[39]=R>>>24&255,e[40]=C>>>0&255,e[41]=C>>>8&255,e[42]=C>>>16&255,e[43]=C>>>24&255,e[44]=P>>>0&255,e[45]=P>>>8&255,e[46]=P>>>16&255,e[47]=P>>>24&255,e[48]=M>>>0&255,e[49]=M>>>8&255,e[50]=M>>>16&255,e[51]=M>>>24&255,e[52]=I>>>0&255,e[53]=I>>>8&255,e[54]=I>>>16&255,e[55]=I>>>24&255,e[56]=N>>>0&255,e[57]=N>>>8&255,e[58]=N>>>16&255,e[59]=N>>>24&255,e[60]=L>>>0&255,e[61]=L>>>8&255,e[62]=L>>>16&255,e[63]=L>>>24&255}(e,t,r,n)}function g(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,l=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,c=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,d=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,f=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,_=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,g=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,b=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=0;w<20;w+=2)i^=(o=(y^=(o=(f^=(o=(l^=(o=i+y|0)<<7|o>>>25)+i|0)<<9|o>>>23)+l|0)<<13|o>>>19)+f|0)<<18|o>>>14,c^=(o=(s^=(o=(v^=(o=(p^=(o=c+s|0)<<7|o>>>25)+c|0)<<9|o>>>23)+p|0)<<13|o>>>19)+v|0)<<18|o>>>14,_^=(o=(d^=(o=(a^=(o=(g^=(o=_+d|0)<<7|o>>>25)+_|0)<<9|o>>>23)+g|0)<<13|o>>>19)+a|0)<<18|o>>>14,b^=(o=(m^=(o=(h^=(o=(u^=(o=b+m|0)<<7|o>>>25)+b|0)<<9|o>>>23)+u|0)<<13|o>>>19)+h|0)<<18|o>>>14,i^=(o=(u^=(o=(a^=(o=(s^=(o=i+u|0)<<7|o>>>25)+i|0)<<9|o>>>23)+s|0)<<13|o>>>19)+a|0)<<18|o>>>14,c^=(o=(l^=(o=(h^=(o=(d^=(o=c+l|0)<<7|o>>>25)+c|0)<<9|o>>>23)+d|0)<<13|o>>>19)+h|0)<<18|o>>>14,_^=(o=(p^=(o=(f^=(o=(m^=(o=_+p|0)<<7|o>>>25)+_|0)<<9|o>>>23)+m|0)<<13|o>>>19)+f|0)<<18|o>>>14,b^=(o=(g^=(o=(v^=(o=(y^=(o=b+g|0)<<7|o>>>25)+b|0)<<9|o>>>23)+y|0)<<13|o>>>19)+v|0)<<18|o>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=c>>>0&255,e[5]=c>>>8&255,e[6]=c>>>16&255,e[7]=c>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=b>>>0&255,e[13]=b>>>8&255,e[14]=b>>>16&255,e[15]=b>>>24&255,e[16]=d>>>0&255,e[17]=d>>>8&255,e[18]=d>>>16&255,e[19]=d>>>24&255,e[20]=h>>>0&255,e[21]=h>>>8&255,e[22]=h>>>16&255,e[23]=h>>>24&255,e[24]=f>>>0&255,e[25]=f>>>8&255,e[26]=f>>>16&255,e[27]=f>>>24&255,e[28]=p>>>0&255,e[29]=p>>>8&255,e[30]=p>>>16&255,e[31]=p>>>24&255}(e,t,r,n)}var b=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function w(e,t,r,n,o,i,s){var a,u,l=new Uint8Array(16),c=new Uint8Array(64);for(u=0;u<16;u++)l[u]=0;for(u=0;u<8;u++)l[u]=i[u];for(;o>=64;){for(v(c,l,s,b),u=0;u<64;u++)e[t+u]=r[n+u]^c[u];for(a=1,u=8;u<16;u++)a=a+(255&l[u])|0,l[u]=255&a,a>>>=8;o-=64,t+=64,n+=64}if(o>0)for(v(c,l,s,b),u=0;u<o;u++)e[t+u]=r[n+u]^c[u];return 0}function j(e,t,r,n,o){var i,s,a=new Uint8Array(16),u=new Uint8Array(64);for(s=0;s<16;s++)a[s]=0;for(s=0;s<8;s++)a[s]=n[s];for(;r>=64;){for(v(u,a,o,b),s=0;s<64;s++)e[t+s]=u[s];for(i=1,s=8;s<16;s++)i=i+(255&a[s])|0,a[s]=255&i,i>>>=8;r-=64,t+=64}if(r>0)for(v(u,a,o,b),s=0;s<r;s++)e[t+s]=u[s];return 0}function k(e,t,r,n,o){var i=new Uint8Array(32);g(i,n,o,b);for(var s=new Uint8Array(8),a=0;a<8;a++)s[a]=n[a+16];return j(e,t,r,s,i)}function S(e,t,r,n,o,i,s){var a=new Uint8Array(32);g(a,i,s,b);for(var u=new Uint8Array(8),l=0;l<8;l++)u[l]=i[l+16];return w(e,t,r,n,o,u,a)}var x=function(e){var t,r,n,o,i,s,a,u;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),o=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|o<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|s<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|a<<5),u=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function T(e,t,r,n,o,i){var s=new x(i);return s.update(r,n,o),s.finish(e,t),0}function A(e,t,r,n,o,i){var s=new Uint8Array(16);return T(s,0,r,n,o,i),m(e,t,s,0)}function E(e,t,r,n,o){var i;if(r<32)return-1;for(S(e,0,t,0,r,n,o),T(e,16,e,32,r-32,e),i=0;i<16;i++)e[i]=0;return 0}function O(e,t,r,n,o){var i,s=new Uint8Array(32);if(r<32)return-1;if(k(s,0,32,n,o),0!==A(t,16,t,32,r-32,s))return-1;for(S(e,0,t,0,r,n,o),i=0;i<32;i++)e[i]=0;return 0}function R(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function C(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function P(e,t,r){for(var n,o=~(r-1),i=0;i<16;i++)n=o&(e[i]^t[i]),e[i]^=n,t[i]^=n}function M(e,r){var n,o,i,s=t(),a=t();for(n=0;n<16;n++)a[n]=r[n];for(C(a),C(a),C(a),o=0;o<2;o++){for(s[0]=a[0]-65517,n=1;n<15;n++)s[n]=a[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),i=s[15]>>16&1,s[14]&=65535,P(a,s,1-i)}for(n=0;n<16;n++)e[2*n]=255&a[n],e[2*n+1]=a[n]>>8}function I(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return M(r,e),M(n,t),y(r,0,n,0)}function N(e){var t=new Uint8Array(32);return M(t,e),1&t[0]}function L(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function B(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function D(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function F(e,t,r){var n,o,i=0,s=0,a=0,u=0,l=0,c=0,d=0,h=0,f=0,p=0,_=0,m=0,y=0,v=0,g=0,b=0,w=0,j=0,k=0,S=0,x=0,T=0,A=0,E=0,O=0,R=0,C=0,P=0,M=0,I=0,N=0,L=r[0],B=r[1],D=r[2],F=r[3],U=r[4],H=r[5],q=r[6],V=r[7],K=r[8],Y=r[9],W=r[10],X=r[11],z=r[12],G=r[13],$=r[14],Z=r[15];i+=(n=t[0])*L,s+=n*B,a+=n*D,u+=n*F,l+=n*U,c+=n*H,d+=n*q,h+=n*V,f+=n*K,p+=n*Y,_+=n*W,m+=n*X,y+=n*z,v+=n*G,g+=n*$,b+=n*Z,s+=(n=t[1])*L,a+=n*B,u+=n*D,l+=n*F,c+=n*U,d+=n*H,h+=n*q,f+=n*V,p+=n*K,_+=n*Y,m+=n*W,y+=n*X,v+=n*z,g+=n*G,b+=n*$,w+=n*Z,a+=(n=t[2])*L,u+=n*B,l+=n*D,c+=n*F,d+=n*U,h+=n*H,f+=n*q,p+=n*V,_+=n*K,m+=n*Y,y+=n*W,v+=n*X,g+=n*z,b+=n*G,w+=n*$,j+=n*Z,u+=(n=t[3])*L,l+=n*B,c+=n*D,d+=n*F,h+=n*U,f+=n*H,p+=n*q,_+=n*V,m+=n*K,y+=n*Y,v+=n*W,g+=n*X,b+=n*z,w+=n*G,j+=n*$,k+=n*Z,l+=(n=t[4])*L,c+=n*B,d+=n*D,h+=n*F,f+=n*U,p+=n*H,_+=n*q,m+=n*V,y+=n*K,v+=n*Y,g+=n*W,b+=n*X,w+=n*z,j+=n*G,k+=n*$,S+=n*Z,c+=(n=t[5])*L,d+=n*B,h+=n*D,f+=n*F,p+=n*U,_+=n*H,m+=n*q,y+=n*V,v+=n*K,g+=n*Y,b+=n*W,w+=n*X,j+=n*z,k+=n*G,S+=n*$,x+=n*Z,d+=(n=t[6])*L,h+=n*B,f+=n*D,p+=n*F,_+=n*U,m+=n*H,y+=n*q,v+=n*V,g+=n*K,b+=n*Y,w+=n*W,j+=n*X,k+=n*z,S+=n*G,x+=n*$,T+=n*Z,h+=(n=t[7])*L,f+=n*B,p+=n*D,_+=n*F,m+=n*U,y+=n*H,v+=n*q,g+=n*V,b+=n*K,w+=n*Y,j+=n*W,k+=n*X,S+=n*z,x+=n*G,T+=n*$,A+=n*Z,f+=(n=t[8])*L,p+=n*B,_+=n*D,m+=n*F,y+=n*U,v+=n*H,g+=n*q,b+=n*V,w+=n*K,j+=n*Y,k+=n*W,S+=n*X,x+=n*z,T+=n*G,A+=n*$,E+=n*Z,p+=(n=t[9])*L,_+=n*B,m+=n*D,y+=n*F,v+=n*U,g+=n*H,b+=n*q,w+=n*V,j+=n*K,k+=n*Y,S+=n*W,x+=n*X,T+=n*z,A+=n*G,E+=n*$,O+=n*Z,_+=(n=t[10])*L,m+=n*B,y+=n*D,v+=n*F,g+=n*U,b+=n*H,w+=n*q,j+=n*V,k+=n*K,S+=n*Y,x+=n*W,T+=n*X,A+=n*z,E+=n*G,O+=n*$,R+=n*Z,m+=(n=t[11])*L,y+=n*B,v+=n*D,g+=n*F,b+=n*U,w+=n*H,j+=n*q,k+=n*V,S+=n*K,x+=n*Y,T+=n*W,A+=n*X,E+=n*z,O+=n*G,R+=n*$,C+=n*Z,y+=(n=t[12])*L,v+=n*B,g+=n*D,b+=n*F,w+=n*U,j+=n*H,k+=n*q,S+=n*V,x+=n*K,T+=n*Y,A+=n*W,E+=n*X,O+=n*z,R+=n*G,C+=n*$,P+=n*Z,v+=(n=t[13])*L,g+=n*B,b+=n*D,w+=n*F,j+=n*U,k+=n*H,S+=n*q,x+=n*V,T+=n*K,A+=n*Y,E+=n*W,O+=n*X,R+=n*z,C+=n*G,P+=n*$,M+=n*Z,g+=(n=t[14])*L,b+=n*B,w+=n*D,j+=n*F,k+=n*U,S+=n*H,x+=n*q,T+=n*V,A+=n*K,E+=n*Y,O+=n*W,R+=n*X,C+=n*z,P+=n*G,M+=n*$,I+=n*Z,b+=(n=t[15])*L,s+=38*(j+=n*D),a+=38*(k+=n*F),u+=38*(S+=n*U),l+=38*(x+=n*H),c+=38*(T+=n*q),d+=38*(A+=n*V),h+=38*(E+=n*K),f+=38*(O+=n*Y),p+=38*(R+=n*W),_+=38*(C+=n*X),m+=38*(P+=n*z),y+=38*(M+=n*G),v+=38*(I+=n*$),g+=38*(N+=n*Z),i=(n=(i+=38*(w+=n*B))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),_=(n=_+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),i=(n=(i+=o-1+37*(o-1))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),_=(n=_+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),i+=o-1+37*(o-1),e[0]=i,e[1]=s,e[2]=a,e[3]=u,e[4]=l,e[5]=c,e[6]=d,e[7]=h,e[8]=f,e[9]=p,e[10]=_,e[11]=m,e[12]=y,e[13]=v,e[14]=g,e[15]=b}function U(e,t){F(e,t,t)}function H(e,r){var n,o=t();for(n=0;n<16;n++)o[n]=r[n];for(n=253;n>=0;n--)U(o,o),2!==n&&4!==n&&F(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}function q(e,r){var n,o=t();for(n=0;n<16;n++)o[n]=r[n];for(n=250;n>=0;n--)U(o,o),1!==n&&F(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}function V(e,r,n){var o,i,s=new Uint8Array(32),a=new Float64Array(80),l=t(),c=t(),d=t(),h=t(),f=t(),p=t();for(i=0;i<31;i++)s[i]=r[i];for(s[31]=127&r[31]|64,s[0]&=248,L(a,n),i=0;i<16;i++)c[i]=a[i],h[i]=l[i]=d[i]=0;for(l[0]=h[0]=1,i=254;i>=0;--i)P(l,c,o=s[i>>>3]>>>(7&i)&1),P(d,h,o),B(f,l,d),D(l,l,d),B(d,c,h),D(c,c,h),U(h,f),U(p,l),F(l,d,l),F(d,c,f),B(f,l,d),D(l,l,d),U(c,l),D(d,h,p),F(l,d,u),B(l,l,h),F(d,d,l),F(l,h,p),F(h,c,a),U(c,f),P(l,c,o),P(d,h,o);for(i=0;i<16;i++)a[i+16]=l[i],a[i+32]=d[i],a[i+48]=c[i],a[i+64]=h[i];var _=a.subarray(32),m=a.subarray(16);return H(_,_),F(m,m,_),M(e,m),0}function K(e,t){return V(e,t,i)}function Y(e,t){return n(t,32),K(e,t)}function W(e,t,r){var n=new Uint8Array(32);return V(n,r,t),g(e,o,n,b)}x.prototype.blocks=function(e,t,r){for(var n,o,i,s,a,u,l,c,d,h,f,p,_,m,y,v,g,b,w,j=this.fin?0:2048,k=this.h[0],S=this.h[1],x=this.h[2],T=this.h[3],A=this.h[4],E=this.h[5],O=this.h[6],R=this.h[7],C=this.h[8],P=this.h[9],M=this.r[0],I=this.r[1],N=this.r[2],L=this.r[3],B=this.r[4],D=this.r[5],F=this.r[6],U=this.r[7],H=this.r[8],q=this.r[9];r>=16;)h=d=0,h+=(k+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*M,h+=(S+=8191&(n>>>13|(o=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*q),h+=(x+=8191&(o>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*H),h+=(T+=8191&(i>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*U),d=(h+=(A+=8191&(s>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*F))>>>13,h&=8191,h+=(E+=a>>>1&8191)*(5*D),h+=(O+=8191&(a>>>14|(u=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*B),h+=(R+=8191&(u>>>11|(l=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*L),h+=(C+=8191&(l>>>8|(c=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*N),f=d+=(h+=(P+=c>>>5|j)*(5*I))>>>13,f+=k*I,f+=S*M,f+=x*(5*q),f+=T*(5*H),d=(f+=A*(5*U))>>>13,f&=8191,f+=E*(5*F),f+=O*(5*D),f+=R*(5*B),f+=C*(5*L),d+=(f+=P*(5*N))>>>13,f&=8191,p=d,p+=k*N,p+=S*I,p+=x*M,p+=T*(5*q),d=(p+=A*(5*H))>>>13,p&=8191,p+=E*(5*U),p+=O*(5*F),p+=R*(5*D),p+=C*(5*B),_=d+=(p+=P*(5*L))>>>13,_+=k*L,_+=S*N,_+=x*I,_+=T*M,d=(_+=A*(5*q))>>>13,_&=8191,_+=E*(5*H),_+=O*(5*U),_+=R*(5*F),_+=C*(5*D),m=d+=(_+=P*(5*B))>>>13,m+=k*B,m+=S*L,m+=x*N,m+=T*I,d=(m+=A*M)>>>13,m&=8191,m+=E*(5*q),m+=O*(5*H),m+=R*(5*U),m+=C*(5*F),y=d+=(m+=P*(5*D))>>>13,y+=k*D,y+=S*B,y+=x*L,y+=T*N,d=(y+=A*I)>>>13,y&=8191,y+=E*M,y+=O*(5*q),y+=R*(5*H),y+=C*(5*U),v=d+=(y+=P*(5*F))>>>13,v+=k*F,v+=S*D,v+=x*B,v+=T*L,d=(v+=A*N)>>>13,v&=8191,v+=E*I,v+=O*M,v+=R*(5*q),v+=C*(5*H),g=d+=(v+=P*(5*U))>>>13,g+=k*U,g+=S*F,g+=x*D,g+=T*B,d=(g+=A*L)>>>13,g&=8191,g+=E*N,g+=O*I,g+=R*M,g+=C*(5*q),b=d+=(g+=P*(5*H))>>>13,b+=k*H,b+=S*U,b+=x*F,b+=T*D,d=(b+=A*B)>>>13,b&=8191,b+=E*L,b+=O*N,b+=R*I,b+=C*M,w=d+=(b+=P*(5*q))>>>13,w+=k*q,w+=S*H,w+=x*U,w+=T*F,d=(w+=A*D)>>>13,w&=8191,w+=E*B,w+=O*L,w+=R*N,w+=C*I,k=h=8191&(d=(d=((d+=(w+=P*M)>>>13)<<2)+d|0)+(h&=8191)|0),S=f+=d>>>=13,x=p&=8191,T=_&=8191,A=m&=8191,E=y&=8191,O=v&=8191,R=g&=8191,C=b&=8191,P=w&=8191,t+=16,r-=16;this.h[0]=k,this.h[1]=S,this.h[2]=x,this.h[3]=T,this.h[4]=A,this.h[5]=E,this.h[6]=O,this.h[7]=R,this.h[8]=C,this.h[9]=P},x.prototype.finish=function(e,t){var r,n,o,i,s=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=r,r=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,i=1;i<10;i++)s[i]=this.h[i]+r,r=s[i]>>>13,s[i]&=8191;for(s[9]-=8192,n=(1^r)-1,i=0;i<10;i++)s[i]&=n;for(n=~n,i=0;i<10;i++)this.h[i]=this.h[i]&n|s[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},x.prototype.update=function(e,t,r){var n,o;if(this.leftover){for((o=16-this.leftover)>r&&(o=r),n=0;n<o;n++)this.buffer[this.leftover+n]=e[t+n];if(r-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(o=r-r%16,this.blocks(e,t,o),t+=o,r-=o),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=e[t+n];this.leftover+=r}};var X=E,z=O;var G=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function $(e,t,r,n){for(var o,i,s,a,u,l,c,d,h,f,p,_,m,y,v,g,b,w,j,k,S,x,T,A,E,O,R=new Int32Array(16),C=new Int32Array(16),P=e[0],M=e[1],I=e[2],N=e[3],L=e[4],B=e[5],D=e[6],F=e[7],U=t[0],H=t[1],q=t[2],V=t[3],K=t[4],Y=t[5],W=t[6],X=t[7],z=0;n>=128;){for(j=0;j<16;j++)k=8*j+z,R[j]=r[k+0]<<24|r[k+1]<<16|r[k+2]<<8|r[k+3],C[j]=r[k+4]<<24|r[k+5]<<16|r[k+6]<<8|r[k+7];for(j=0;j<80;j++)if(o=P,i=M,s=I,a=N,u=L,l=B,c=D,F,h=U,f=H,p=q,_=V,m=K,y=Y,v=W,X,T=65535&(x=X),A=x>>>16,E=65535&(S=F),O=S>>>16,T+=65535&(x=(K>>>14|L<<18)^(K>>>18|L<<14)^(L>>>9|K<<23)),A+=x>>>16,E+=65535&(S=(L>>>14|K<<18)^(L>>>18|K<<14)^(K>>>9|L<<23)),O+=S>>>16,T+=65535&(x=K&Y^~K&W),A+=x>>>16,E+=65535&(S=L&B^~L&D),O+=S>>>16,T+=65535&(x=G[2*j+1]),A+=x>>>16,E+=65535&(S=G[2*j]),O+=S>>>16,S=R[j%16],A+=(x=C[j%16])>>>16,E+=65535&S,O+=S>>>16,E+=(A+=(T+=65535&x)>>>16)>>>16,T=65535&(x=w=65535&T|A<<16),A=x>>>16,E=65535&(S=b=65535&E|(O+=E>>>16)<<16),O=S>>>16,T+=65535&(x=(U>>>28|P<<4)^(P>>>2|U<<30)^(P>>>7|U<<25)),A+=x>>>16,E+=65535&(S=(P>>>28|U<<4)^(U>>>2|P<<30)^(U>>>7|P<<25)),O+=S>>>16,A+=(x=U&H^U&q^H&q)>>>16,E+=65535&(S=P&M^P&I^M&I),O+=S>>>16,d=65535&(E+=(A+=(T+=65535&x)>>>16)>>>16)|(O+=E>>>16)<<16,g=65535&T|A<<16,T=65535&(x=_),A=x>>>16,E=65535&(S=a),O=S>>>16,A+=(x=w)>>>16,E+=65535&(S=b),O+=S>>>16,M=o,I=i,N=s,L=a=65535&(E+=(A+=(T+=65535&x)>>>16)>>>16)|(O+=E>>>16)<<16,B=u,D=l,F=c,P=d,H=h,q=f,V=p,K=_=65535&T|A<<16,Y=m,W=y,X=v,U=g,j%16==15)for(k=0;k<16;k++)S=R[k],T=65535&(x=C[k]),A=x>>>16,E=65535&S,O=S>>>16,S=R[(k+9)%16],T+=65535&(x=C[(k+9)%16]),A+=x>>>16,E+=65535&S,O+=S>>>16,b=R[(k+1)%16],T+=65535&(x=((w=C[(k+1)%16])>>>1|b<<31)^(w>>>8|b<<24)^(w>>>7|b<<25)),A+=x>>>16,E+=65535&(S=(b>>>1|w<<31)^(b>>>8|w<<24)^b>>>7),O+=S>>>16,b=R[(k+14)%16],A+=(x=((w=C[(k+14)%16])>>>19|b<<13)^(b>>>29|w<<3)^(w>>>6|b<<26))>>>16,E+=65535&(S=(b>>>19|w<<13)^(w>>>29|b<<3)^b>>>6),O+=S>>>16,O+=(E+=(A+=(T+=65535&x)>>>16)>>>16)>>>16,R[k]=65535&E|O<<16,C[k]=65535&T|A<<16;T=65535&(x=U),A=x>>>16,E=65535&(S=P),O=S>>>16,S=e[0],A+=(x=t[0])>>>16,E+=65535&S,O+=S>>>16,O+=(E+=(A+=(T+=65535&x)>>>16)>>>16)>>>16,e[0]=P=65535&E|O<<16,t[0]=U=65535&T|A<<16,T=65535&(x=H),A=x>>>16,E=65535&(S=M),O=S>>>16,S=e[1],A+=(x=t[1])>>>16,E+=65535&S,O+=S>>>16,O+=(E+=(A+=(T+=65535&x)>>>16)>>>16)>>>16,e[1]=M=65535&E|O<<16,t[1]=H=65535&T|A<<16,T=65535&(x=q),A=x>>>16,E=65535&(S=I),O=S>>>16,S=e[2],A+=(x=t[2])>>>16,E+=65535&S,O+=S>>>16,O+=(E+=(A+=(T+=65535&x)>>>16)>>>16)>>>16,e[2]=I=65535&E|O<<16,t[2]=q=65535&T|A<<16,T=65535&(x=V),A=x>>>16,E=65535&(S=N),O=S>>>16,S=e[3],A+=(x=t[3])>>>16,E+=65535&S,O+=S>>>16,O+=(E+=(A+=(T+=65535&x)>>>16)>>>16)>>>16,e[3]=N=65535&E|O<<16,t[3]=V=65535&T|A<<16,T=65535&(x=K),A=x>>>16,E=65535&(S=L),O=S>>>16,S=e[4],A+=(x=t[4])>>>16,E+=65535&S,O+=S>>>16,O+=(E+=(A+=(T+=65535&x)>>>16)>>>16)>>>16,e[4]=L=65535&E|O<<16,t[4]=K=65535&T|A<<16,T=65535&(x=Y),A=x>>>16,E=65535&(S=B),O=S>>>16,S=e[5],A+=(x=t[5])>>>16,E+=65535&S,O+=S>>>16,O+=(E+=(A+=(T+=65535&x)>>>16)>>>16)>>>16,e[5]=B=65535&E|O<<16,t[5]=Y=65535&T|A<<16,T=65535&(x=W),A=x>>>16,E=65535&(S=D),O=S>>>16,S=e[6],A+=(x=t[6])>>>16,E+=65535&S,O+=S>>>16,O+=(E+=(A+=(T+=65535&x)>>>16)>>>16)>>>16,e[6]=D=65535&E|O<<16,t[6]=W=65535&T|A<<16,T=65535&(x=X),A=x>>>16,E=65535&(S=F),O=S>>>16,S=e[7],A+=(x=t[7])>>>16,E+=65535&S,O+=S>>>16,O+=(E+=(A+=(T+=65535&x)>>>16)>>>16)>>>16,e[7]=F=65535&E|O<<16,t[7]=X=65535&T|A<<16,z+=128,n-=128}return n}function Z(e,t,r){var n,o=new Int32Array(8),i=new Int32Array(8),s=new Uint8Array(256),a=r;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,$(o,i,t,r),r%=128,n=0;n<r;n++)s[n]=t[a-r+n];for(s[r]=128,s[(r=256-128*(r<112?1:0))-9]=0,p(s,r-8,a/536870912|0,a<<3),$(o,i,s,r),n=0;n<8;n++)p(e,8*n,o[n],i[n]);return 0}function Q(e,r){var n=t(),o=t(),i=t(),s=t(),a=t(),u=t(),l=t(),d=t(),h=t();D(n,e[1],e[0]),D(h,r[1],r[0]),F(n,n,h),B(o,e[0],e[1]),B(h,r[0],r[1]),F(o,o,h),F(i,e[3],r[3]),F(i,i,c),F(s,e[2],r[2]),B(s,s,s),D(a,o,n),D(u,s,i),B(l,s,i),B(d,o,n),F(e[0],a,u),F(e[1],d,l),F(e[2],l,u),F(e[3],a,d)}function J(e,t,r){var n;for(n=0;n<4;n++)P(e[n],t[n],r)}function ee(e,r){var n=t(),o=t(),i=t();H(i,r[2]),F(n,r[0],i),F(o,r[1],i),M(e,o),e[31]^=N(n)<<7}function te(e,t,r){var n,o;for(R(e[0],s),R(e[1],a),R(e[2],a),R(e[3],s),o=255;o>=0;--o)J(e,t,n=r[o/8|0]>>(7&o)&1),Q(t,e),Q(e,e),J(e,t,n)}function re(e,r){var n=[t(),t(),t(),t()];R(n[0],d),R(n[1],h),R(n[2],a),F(n[3],d,h),te(e,n,r)}function ne(e,r,o){var i,s=new Uint8Array(64),a=[t(),t(),t(),t()];for(o||n(r,32),Z(s,r,32),s[0]&=248,s[31]&=127,s[31]|=64,re(a,s),ee(e,a),i=0;i<32;i++)r[i+32]=e[i];return 0}var oe=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ie(e,t){var r,n,o,i;for(n=63;n>=32;--n){for(r=0,o=n-32,i=n-12;o<i;++o)t[o]+=r-16*t[n]*oe[o-(n-32)],r=Math.floor((t[o]+128)/256),t[o]-=256*r;t[o]+=r,t[n]=0}for(r=0,o=0;o<32;o++)t[o]+=r-(t[31]>>4)*oe[o],r=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=r*oe[o];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function se(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;ie(e,r)}function ae(e,r,n,o){var i,s,a=new Uint8Array(64),u=new Uint8Array(64),l=new Uint8Array(64),c=new Float64Array(64),d=[t(),t(),t(),t()];Z(a,o,32),a[0]&=248,a[31]&=127,a[31]|=64;var h=n+64;for(i=0;i<n;i++)e[64+i]=r[i];for(i=0;i<32;i++)e[32+i]=a[32+i];for(Z(l,e.subarray(32),n+32),se(l),re(d,l),ee(e,d),i=32;i<64;i++)e[i]=o[i];for(Z(u,e,n+64),se(u),i=0;i<64;i++)c[i]=0;for(i=0;i<32;i++)c[i]=l[i];for(i=0;i<32;i++)for(s=0;s<32;s++)c[i+s]+=u[i]*a[s];return ie(e.subarray(32),c),h}function ue(e,r,n,o){var i,u=new Uint8Array(32),c=new Uint8Array(64),d=[t(),t(),t(),t()],h=[t(),t(),t(),t()];if(n<64)return-1;if(function(e,r){var n=t(),o=t(),i=t(),u=t(),c=t(),d=t(),h=t();return R(e[2],a),L(e[1],r),U(i,e[1]),F(u,i,l),D(i,i,e[2]),B(u,e[2],u),U(c,u),U(d,c),F(h,d,c),F(n,h,i),F(n,n,u),q(n,n),F(n,n,i),F(n,n,u),F(n,n,u),F(e[0],n,u),U(o,e[0]),F(o,o,u),I(o,i)&&F(e[0],e[0],f),U(o,e[0]),F(o,o,u),I(o,i)?-1:(N(e[0])===r[31]>>7&&D(e[0],s,e[0]),F(e[3],e[0],e[1]),0)}(h,o))return-1;for(i=0;i<n;i++)e[i]=r[i];for(i=0;i<32;i++)e[i+32]=o[i];if(Z(c,e,n),se(c),te(d,h,c),re(h,r.subarray(32)),Q(d,h),ee(u,d),n-=64,y(r,0,u,0)){for(i=0;i<n;i++)e[i]=0;return-1}for(i=0;i<n;i++)e[i]=r[i+64];return n}var le=16,ce=64,de=32,he=64;function fe(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function pe(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function _e(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:g,crypto_stream_xor:S,crypto_stream:k,crypto_stream_salsa20_xor:w,crypto_stream_salsa20:j,crypto_onetimeauth:T,crypto_onetimeauth_verify:A,crypto_verify_16:m,crypto_verify_32:y,crypto_secretbox:E,crypto_secretbox_open:O,crypto_scalarmult:V,crypto_scalarmult_base:K,crypto_box_beforenm:W,crypto_box_afternm:X,crypto_box:function(e,t,r,n,o,i){var s=new Uint8Array(32);return W(s,o,i),X(e,t,r,n,s)},crypto_box_open:function(e,t,r,n,o,i){var s=new Uint8Array(32);return W(s,o,i),z(e,t,r,n,s)},crypto_box_keypair:Y,crypto_hash:Z,crypto_sign:ae,crypto_sign_keypair:ne,crypto_sign_open:ue,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:le,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ce,crypto_sign_PUBLICKEYBYTES:de,crypto_sign_SECRETKEYBYTES:he,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:l,L:oe,pack25519:M,unpack25519:L,M:F,A:B,S:U,Z:D,pow2523:q,add:Q,set25519:R,modL:ie,scalarmult:te,scalarbase:re},e.randomBytes=function(e){var t=new Uint8Array(e);return n(t,e),t},e.secretbox=function(e,t,r){pe(e,t,r),fe(r,t);for(var n=new Uint8Array(32+e.length),o=new Uint8Array(n.length),i=0;i<e.length;i++)n[i+32]=e[i];return E(o,n,n.length,t,r),o.subarray(le)},e.secretbox.open=function(e,t,r){pe(e,t,r),fe(r,t);for(var n=new Uint8Array(le+e.length),o=new Uint8Array(n.length),i=0;i<e.length;i++)n[i+le]=e[i];return n.length<32||0!==O(o,n,n.length,t,r)?null:o.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=le,e.scalarMult=function(e,t){if(pe(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var r=new Uint8Array(32);return V(r,e,t),r},e.scalarMult.base=function(e){if(pe(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return K(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,r,n,o){var i=e.box.before(n,o);return e.secretbox(t,r,i)},e.box.before=function(e,t){pe(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var r=new Uint8Array(32);return W(r,e,t),r},e.box.after=e.secretbox,e.box.open=function(t,r,n,o){var i=e.box.before(n,o);return e.secretbox.open(t,r,i)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return Y(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(pe(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return K(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(pe(e,t),t.length!==he)throw new Error("bad secret key size");var r=new Uint8Array(ce+e.length);return ae(r,e,e.length,t),r},e.sign.open=function(e,t){if(pe(e,t),t.length!==de)throw new Error("bad public key size");var r=new Uint8Array(e.length),n=ue(r,e,e.length,t);if(n<0)return null;for(var o=new Uint8Array(n),i=0;i<o.length;i++)o[i]=r[i];return o},e.sign.detached=function(t,r){for(var n=e.sign(t,r),o=new Uint8Array(ce),i=0;i<o.length;i++)o[i]=n[i];return o},e.sign.detached.verify=function(e,t,r){if(pe(e,t,r),t.length!==ce)throw new Error("bad signature size");if(r.length!==de)throw new Error("bad public key size");var n,o=new Uint8Array(ce+e.length),i=new Uint8Array(ce+e.length);for(n=0;n<ce;n++)o[n]=t[n];for(n=0;n<e.length;n++)o[n+ce]=e[n];return ue(i,o,o.length,r)>=0},e.sign.keyPair=function(){var e=new Uint8Array(de),t=new Uint8Array(he);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(pe(e),e.length!==he)throw new Error("bad secret key size");for(var t=new Uint8Array(de),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(pe(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(de),r=new Uint8Array(he),n=0;n<32;n++)r[n]=e[n];return ne(t,r,!0),{publicKey:t,secretKey:r}},e.sign.publicKeyLength=de,e.sign.secretKeyLength=he,e.sign.seedLength=32,e.sign.signatureLength=ce,e.hash=function(e){pe(e);var t=new Uint8Array(64);return Z(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return pe(e,t),0!==e.length&&0!==t.length&&(e.length===t.length&&0===_(e,0,t,0,e.length))},e.setPRNG=function(e){n=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){e.setPRNG((function(e,r){var n,o=new Uint8Array(r);for(n=0;n<r;n+=65536)t.getRandomValues(o.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)e[n]=o[n];_e(o)}))}else(t=r("?dba7"))&&t.randomBytes&&e.setPRNG((function(e,r){var n,o=t.randomBytes(r);for(n=0;n<r;n++)e[n]=o[n];_e(o)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},"?bfcf":()=>{},"?90ab":()=>{},"?dba7":()=>{},"./node_modules/nanoevents/index.cjs":e=>{e.exports={createNanoEvents:()=>({events:{},emit(e,...t){(this.events[e]||[]).forEach((e=>e(...t)))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter((e=>e!==t))}})}},"./node_modules/tiny-request-router/dist/router.browser.mjs":(e,t,r)=>{"use strict";r.r(t),r.d(t,{Router:()=>l,pathToRegexp:()=>u});var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};function o(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var o=1,i="";if("?"===e[a=r+1])throw new TypeError('Pattern cannot start with "?" at '+a);for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0==--o){a++;break}}else if("("===e[a]&&(o++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at "+a);i+=e[a++]}else i+=e[a++]+e[a++];if(o)throw new TypeError("Unbalanced pattern at "+r);if(!i)throw new TypeError("Missing pattern at "+r);t.push({type:"PATTERN",index:r,value:i}),r=a}else{for(var s="",a=r+1;a<e.length;){var u=e.charCodeAt(a);if(!(u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||95===u))break;s+=e[a++]}if(!s)throw new TypeError("Missing parameter name at "+r);t.push({type:"NAME",index:r,value:s}),r=a}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,o=void 0===n?"./":n,s="[^"+i(t.delimiter||"/#?")+"]+?",a=[],u=0,l=0,c="",d=function(e){if(l<r.length&&r[l].type===e)return r[l++].value},h=function(e){var t=d(e);if(void 0!==t)return t;var n=r[l],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},f=function(){for(var e,t="";e=d("CHAR")||d("ESCAPED_CHAR");)t+=e;return t};l<r.length;){var p=d("CHAR"),_=d("NAME"),m=d("PATTERN");if(_||m){var y=p||"";-1===o.indexOf(y)&&(c+=y,y=""),c&&(a.push(c),c=""),a.push({name:_||u++,prefix:y,suffix:"",pattern:m||s,modifier:d("MODIFIER")||""})}else{var v=p||d("ESCAPED_CHAR");if(v)c+=v;else if(c&&(a.push(c),c=""),d("OPEN")){y=f();var g=d("NAME")||"",b=d("PATTERN")||"",w=f();h("CLOSE"),a.push({name:g||(b?u++:""),pattern:g&&!b?s:b,prefix:y,suffix:w,modifier:d("MODIFIER")||""})}else h("END")}}return a}function i(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function s(e){return e&&e.sensitive?"":"i"}function a(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,o=void 0!==n&&n,a=r.start,u=void 0===a||a,l=r.end,c=void 0===l||l,d=r.encode,h=void 0===d?function(e){return e}:d,f="["+i(r.endsWith||"")+"]|$",p="["+i(r.delimiter||"/#?")+"]",_=u?"^":"",m=0,y=e;m<y.length;m++){var v=y[m];if("string"==typeof v)_+=i(h(v));else{var g=i(h(v.prefix)),b=i(h(v.suffix));if(v.pattern)if(t&&t.push(v),g||b)if("+"===v.modifier||"*"===v.modifier){var w="*"===v.modifier?"?":"";_+="(?:"+g+"((?:"+v.pattern+")(?:"+b+g+"(?:"+v.pattern+"))*)"+b+")"+w}else _+="(?:"+g+"("+v.pattern+")"+b+")"+v.modifier;else _+="("+v.pattern+")"+v.modifier;else _+="(?:"+g+b+")"+v.modifier}}if(c)o||(_+=p+"?"),_+=r.endsWith?"(?="+f+")":"$";else{var j=e[e.length-1],k="string"==typeof j?p.indexOf(j[j.length-1])>-1:void 0===j;o||(_+="(?:"+p+"(?="+f+"))?"),k||(_+="(?="+p+"|"+f+")")}return new RegExp(_,s(r))}(o(e,r),t,r)}function u(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;var r=e.source.match(/\((?!\?)/g);if(r)for(var n=0;n<r.length;n++)t.push({name:n,prefix:"",suffix:"",modifier:"",pattern:""});return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return u(e,t,r).source}));return new RegExp("(?:"+n.join("|")+")",s(r))}(e,t,r):a(e,t,r)}var l=function(){function e(){this.routes=[]}return e.prototype.all=function(e,t,r){return void 0===r&&(r={}),this._push("ALL",e,t,r)},e.prototype.get=function(e,t,r){return void 0===r&&(r={}),this._push("GET",e,t,r)},e.prototype.post=function(e,t,r){return void 0===r&&(r={}),this._push("POST",e,t,r)},e.prototype.put=function(e,t,r){return void 0===r&&(r={}),this._push("PUT",e,t,r)},e.prototype.patch=function(e,t,r){return void 0===r&&(r={}),this._push("PATCH",e,t,r)},e.prototype.delete=function(e,t,r){return void 0===r&&(r={}),this._push("DELETE",e,t,r)},e.prototype.head=function(e,t,r){return void 0===r&&(r={}),this._push("HEAD",e,t,r)},e.prototype.options=function(e,t,r){return void 0===r&&(r={}),this._push("OPTIONS",e,t,r)},e.prototype.match=function(e,t){for(var r=0,o=this.routes;r<o.length;r++){var i=o[r];if(i.method===e||"ALL"===i.method){if("(.*)"===i.path)return n(n({},i),{params:{0:i.path}});if("/"===i.path&&!1===i.options.end)return n(n({},i),{params:{}});var s=i.regexp.exec(t);if(s&&s.length)return n(n({},i),{matches:s,params:c(s,i.keys)})}}return null},e.prototype._push=function(e,t,r,n){var o=[];"*"===t&&(t="(.*)");var i=u(t,o,n);return this.routes.push({method:e,path:t,handler:r,keys:o,options:n,regexp:i}),this},e}(),c=function(e,t){for(var r={},n=1;n<e.length;n++){var o=t[n-1].name,i=e[n];void 0!==i&&(r[o]=i)}return r}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__={};(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>o});var e=__webpack_require__("./node_modules/tiny-request-router/dist/router.browser.mjs"),t=__webpack_require__("./src/@utils/index.ts"),r=__webpack_require__("./src/functions/index.ts");const n=new e.Router;n.get("/",r.Turret.details).get("/.well-known/stellar.toml",r.Turret.toml).get("/tx-fees",r.TxFees.get).post("/tx-fees/:publicKey",r.TxFees.pay),exports.TxFees=t.handleFees,exports.handlers={async fetch(e,r,o){try{return await(0,t.handleRequest)(n,e,r,o)}catch(e){return console.log("error response"),new Response(e.message)}},async scheduled(e){try{return await(0,t.handleScheduled)(e)}catch(e){return new Response(e.message)}}};const o=exports})()})(); | 321,527 | 642,991 | 0.698579 |
de259eadc693bfdb91fef0869a0e831055072890 | 6,681 | js | JavaScript | src/handlers/verify.js | acikek/Vex | 0fe25225ac95a8966f663b3cca754494bb172f2b | [
"MIT"
] | 2 | 2021-05-23T15:04:48.000Z | 2021-12-29T23:25:45.000Z | src/handlers/verify.js | acikek/Vexii | 0fe25225ac95a8966f663b3cca754494bb172f2b | [
"MIT"
] | null | null | null | src/handlers/verify.js | acikek/Vexii | 0fe25225ac95a8966f663b3cca754494bb172f2b | [
"MIT"
] | null | null | null | const config = require("../config.json");
const fetch = require("../util/fetch.js");
const status = require("./status.js");
const db = require("../db.js");
const fetchRedditUserData = require("../util/reddit-user.js");
async function entry(client, member, role) {
let lobby = await fetch.channel(client, config.entry.lobby);
let notifyChannel = await fetch.channel(client, config.entry.notifyChannel);
if (role) {
let role = fetch.role(member.guild, config.entry.role);
member.roles.add(role);
}
lobby.send(`
Welcome to the **Vexillology Discord Server**, <@${member.user.id}>! After reviewing the <#${config.entry.rules}>, you will need to answer a few questions to gain access to the server's channels. This process is automatic, but a staff member will have to review your responses.
**1. Where did you find the invite link to this server?** (Answer below. If from a friend, please state their Discord username.)
`);
notifyChannel.send(`<:welcome:685321152767328441> **${member.user.username} joined the server.**`);
status.setStatus(member.user, "entry-1");
}
async function verify(m, s, client) {
let lobby = await fetch.channel(client, config.entry.lobby);
if (s == "entry-1") {
if (!m.content || m.content == " ") return;
db.users.set(`${m.author.id}.verify.origin`, m.content).write();
status.setStatus(m.author, "entry-2");
lobby.send(`<@${m.author.id}> - **2. What is your Reddit username?** (Answer below. If you do not have a Reddit account, you can just say \`skip\`.)`);
} else if (s == "entry-2") {
let obj = { name: undefined, created: undefined, email: undefined, alternative: undefined };
if (m.content.toLowerCase() == "skip") {
db.users.set(`${m.author.id}.verify.reddit`, obj).write();
status.setStatus(m.author, "entry-alt");
lobby.send(`<@${m.author.id}> - **Alternatively, what is your Steam/Spotify username?** (Answer below. If you do not have an account on one of those platforms, you can just say \`skip\`.)`)
} else {
await fetchRedditUserData(m.content)
.then(resp => {
if (resp.data.is_suspended) {
m.channel.send("Sorry, but that account appears to be suspended. If you do not have an alternative account, please say `skip`.");
} else {
obj.name = resp.data.subreddit.display_name_prefixed;
obj.created = resp.data.created;
obj.email = resp.data.has_verified_email;
db.users.set(`${m.author.id}.verify.reddit`, obj).write();
favFlag(lobby, m.author);
}
})
.catch(e => m.channel.send(`Sorry, that's not a valid Reddit account. (Input: \`${m.content}\`)`));
}
} else if (s == "entry-alt") {
if (m.content.toLowerCase() != "skip") {
db.users.set(`${m.author.id}.verify.reddit.alternative`, m.content).write();
}
favFlag(lobby, m.author);
} else if (s == "entry-3") {
db.users.set(`${m.author.id}.verify.flag`, m.content).write();
status.setStatus(m.author, "entry-4");
let data = db.users.get(`${m.author.id}.verify`).value();
lobby.send(`<@${m.author.id}> - Please review your answers below. Complete the process with \`continue\` or restart with \`cancel\`.
\`\`\`
1. Where did you find the invite link to the server? - ${data.origin}
2. What is your Reddit username? - ${data.reddit.alternative ? `[SKIPPED] (Alternative: ${data.reddit.alternative})` : data.reddit.name || "[SKIPPED]"}
3. What is your favorite flag? - ${data.flag}
\`\`\`
`);
} else if (s == "entry-4") {
if (m.content.toLowerCase() == "continue") {
let modchannel = await fetch.channel(client, config.entry.modChannel);
let data = db.users.get(`${m.author.id}.verify`).value();
function skipped(val) {
return val ? val : "[SKIPPED]";
}
modchannel.send(`
\`\`\`yml
DISCORD-ACCOUNT:
- TAG: ${m.author.tag}
- CREATED-AT: ${new Date(m.author.createdAt).toDateString()}
- INVITE-SOURCE: ${data.origin}
REDDIT-ACCOUNT:
- NAME: ${skipped(data.reddit.name)}
- CREATED-AT: ${data.reddit.created ? new Date(data.reddit.created * 1000).toDateString() : "[SKIPPED]"}
- VERIFIED-EMAIL: ${skipped(data.reddit.email)}
- ALTERNATIVE: ${skipped(data.reddit.alternative)}
FAVORITE-FLAG: ${data.flag}
Accept [✅]; Kick [👢]; Ban [🔨]
\`\`\`
`)
.then(msg => {
msg.react("✅");
msg.react("👢");
msg.react("🔨");
db.users.set(`${m.author.id}.verifyMID`, msg.id).write();
db.users.unset(`${m.author.id}.verify`).write();
status.setStatus(m.author, "entry-pending");
db.messages.set(`${msg.id}`, m.author.id).write();
m.channel.send(`<@${m.author.id}> - **Your application has been sent!** Once it has been approved, you will gain access to the server's channels.\n> *Please be patient. The mods can be busy at times, and you'll be approved eventually.*`);
})
} else if (m.content.toLowerCase() == "cancel") {
db.users.unset(`${m.author.id}.verify`).write();
status.setStatus(m.author, "entry-1");
lobby.send(`<@${m.author.id}> - **1. Where did you find the invite link to this server?** (Answer below. If from a friend, please state their Discord username.)`);
}
}
}
function favFlag(lobby, user) {
status.setStatus(user, "entry-3");
lobby.send(`<@${user.id}> - **3. What is your favorite flag?** (Answer below.)`);
}
async function exit(client, member) {
let notifyChannel = await fetch.channel(client, config.entry.notifyChannel);
if (db.users.get(`${member.user.id}.status`).value()) {
let channel = await fetch.channel(client, config.entry.modChannel);
channel.messages.fetch(db.users.get(`${member.user.id}.verifyMID`).value())
.then(m => {
if (db.users.get(`${member.user.id}.exitReason`).value()) {
notifyChannel.send(`<:goodbye:685321570687647750> **${member.user.username} was ${db.users.get(`${member.user.id}.exitReason`).value().toLowerCase()} from the server.**`);
} else {
notifyChannel.send(`<:goodbye:685321570687647750> **${member.user.username} didn't want to play with the bot...**`);
m.delete();
db.messages.unset(`${m.id}`).write();
}
db.users.unset(`${member.user.id}`).write();
});
} else {
notifyChannel.send(`<:goodbye:685321570687647750> **${member.user.username} left the server.**`);
db.users.unset(`${member.user.id}`).write();
}
}
module.exports = { entry, verify, exit }; | 44.245033 | 278 | 0.614429 |
de2649820215dfb07229d7422e06a400102b6c93 | 4,702 | js | JavaScript | lib/client/platform/webworks.handset/2.0.0/client/Message.js | brentlintner/incubator-ripple | 86385ad34dbea5a08c3313ebc9f45b11bd097956 | [
"Apache-2.0"
] | 56 | 2015-01-05T19:21:10.000Z | 2018-04-20T12:49:06.000Z | lib/client/platform/webworks.handset/2.0.0/client/Message.js | SidYa/ripple | 394ce6b3a77efceedb963795ca174474f4a50250 | [
"Apache-2.0"
] | 36 | 2015-01-30T15:16:55.000Z | 2015-10-19T18:06:30.000Z | lib/client/platform/webworks.handset/2.0.0/client/Message.js | isabella232/incubator-retired-ripple | e208b483a835f4df2e886ae4ca39e92c6cc76f21 | [
"Apache-2.0"
] | 31 | 2015-01-17T11:19:21.000Z | 2016-05-12T00:22:45.000Z | /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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 identity = ripple('platform/webworks.handset/2.0.0/client/identity'),
transport = ripple('platform/webworks.core/2.0.0/client/transport'),
Service = ripple('platform/webworks.handset/2.0.0/client/identity/Service'),
_uri = "blackberry/message/message/";
function Message(service) {
var _service = service,
_msg = {
uid: 0,
status: Message.STATUS_DRAFT,
from: "",
folder: Message.FOLDER_DRAFT,
replyTo: "",
bccRecipients: "",
body: "",
ccRecipients: "",
priority: Message.PRIORITY_MEDIUM, //default to med priority
subject: "",
toRecipients: "",
remove: function () {
_msg.folder = Message.FOLDER_DELETED;
transport.call(_uri + "remove", {
get: {uid: _msg.uid}
});
},
save: function () {
if (_msg.uid === 0) {
_msg.uid = Number(Math.uuid(8, 10));
}
_msg.replyTo = _msg.from = _service.emailAddress;
_msg.status = Message.STATUS_SAVED;
transport.call(_uri + "save", {
post: {message: _msg}
});
},
send: function () {
if (_msg.toRecipients) {
if (_msg.uid === 0) {
_msg.uid = Number(Math.uuid(8, 10));
}
_msg.folder = Message.FOLDER_DRAFT;
_msg.status = Message.STATUS_UNKNOWN;
transport.call(_uri + "send", {
get: {message: _msg}
});
} else {
throw "message has no recipients";
}
}
};
if (!_service) {
_service = identity.getDefaultService().reduce(function (email, service) {
return service.type === Service.TYPE_EMAIL ? service : email;
}, null);
}
return _msg;
}
Message.find = function (filter, maxReturn, service) {
var opts = {
post: {
filter: filter,
maxReturn: maxReturn,
service: service
}
};
return transport.call(_uri + "find", opts).map(function (obj) {
var msg = new Message();
msg.uid = obj.uid;
msg.status = obj.status;
msg.from = obj.from;
msg.folder = obj.folder;
msg.replyTo = obj.replyTo;
msg.bccRecipients = obj.bccRecipients;
msg.body = obj.body;
msg.ccRecipients = obj.ccRecipients;
msg.priority = obj.priority;
msg.subject = obj.subject;
msg.toRecipients = obj.toRecipients;
return msg;
});
};
Message.__defineGetter__("STATUS_UNKNOWN", function () {
return -1;
});
Message.__defineGetter__("STATUS_SAVED", function () {
return 0;
});
Message.__defineGetter__("STATUS_DRAFT", function () {
return 1;
});
Message.__defineGetter__("STATUS_SENT", function () {
return 2;
});
Message.__defineGetter__("STATUS_ERROR_OCCURED", function () {
return 3;
});
Message.__defineGetter__("PRIORITY_HIGH", function () {
return 0;
});
Message.__defineGetter__("PRIORITY_MEDIUM", function () {
return 1;
});
Message.__defineGetter__("PRIORITY_LOW", function () {
return 2;
});
Message.__defineGetter__("FOLDER_INBOX", function () {
return 0;
});
Message.__defineGetter__("FOLDER_SENT", function () {
return 1;
});
Message.__defineGetter__("FOLDER_DRAFT", function () {
return 2;
});
Message.__defineGetter__("FOLDER_OUTBOX", function () {
return 3;
});
Message.__defineGetter__("FOLDER_DELETED", function () {
return 4;
});
Message.__defineGetter__("FOLDER_OTHER", function () {
return 5;
});
module.exports = Message;
| 29.572327 | 82 | 0.572735 |
de2712956ab70cbe07a0094e00b59fcfcbe3176a | 1,783 | js | JavaScript | 2-api/routes/exchange/verify_user/POST/verifyUser/index.js | shavz/bitcoin-api-full-stack | 4ff8c267d794747e8d101a50045fbef0af8f41f9 | [
"BSD-3-Clause"
] | 1 | 2020-08-10T03:39:33.000Z | 2020-08-10T03:39:33.000Z | 2-api/routes/exchange/verify_user/POST/verifyUser/index.js | shavz/bitcoin-api-full-stack | 4ff8c267d794747e8d101a50045fbef0af8f41f9 | [
"BSD-3-Clause"
] | null | null | null | 2-api/routes/exchange/verify_user/POST/verifyUser/index.js | shavz/bitcoin-api-full-stack | 4ff8c267d794747e8d101a50045fbef0af8f41f9 | [
"BSD-3-Clause"
] | null | null | null | 'use strict';
const {
utils: {
stringify,
}
} = require( '@bitcoin-api.io/common-private' );
const validateAndGetValues = require( './validateAndGetValues' );
const ensureVerificationRequestIsValid = require( './ensureVerificationRequestIsValid' );
const verifyUserEmail = require( './verifyUserEmail' );
const doLogin = require( '../../../../../sacredElementals/crypto/doLogin' );
module.exports = Object.freeze( async ({
event,
ipAddress
}) => {
const rawEmail = event.body.email;
const rawPassword = event.body.password;
const rawVerifyEmailCode = event.body.verifyEmailCode;
console.log(
`running verifyUser with the following values - ${ stringify({
rawEmail,
rawPassword,
rawVerifyEmailCode
}) }`
);
const {
email,
password,
verifyEmailCode
} = validateAndGetValues({
rawEmail,
rawPassword,
rawVerifyEmailCode,
});
const {
exchangeUserId,
} = await ensureVerificationRequestIsValid({
email,
password,
verifyEmailCode
});
await verifyUserEmail({
email,
password,
verifyEmailCode,
ipAddress,
exchangeUserId
});
console.log( '🦩verify user - performing login' );
const doLoginResults = await doLogin({
event,
ipAddress
});
console.log( '🦩verify user - login performed successfully' );
const verifyUserResponse = Object.assign(
{},
doLoginResults
);
console.log(
'verifyUser executed successfully - ' +
`returning values: ${ stringify( verifyUserResponse ) }`
);
return verifyUserResponse;
});
| 19.380435 | 89 | 0.588895 |
de27ce7d6ab1dc435615d820ec5252505d813ff8 | 494 | js | JavaScript | formas de criar objetos/prototype.js | Gabriel-Leao/POO-JS | d5db5e8f3f25523470d59d9cc2a4ee6c5d1bab06 | [
"MIT"
] | null | null | null | formas de criar objetos/prototype.js | Gabriel-Leao/POO-JS | d5db5e8f3f25523470d59d9cc2a4ee6c5d1bab06 | [
"MIT"
] | null | null | null | formas de criar objetos/prototype.js | Gabriel-Leao/POO-JS | d5db5e8f3f25523470d59d9cc2a4ee6c5d1bab06 | [
"MIT"
] | null | null | null | function Microfone(color = "black") {
this.color = color
this.isOn = true
Microfone.prototype.toggleOnOff = function() {
if (this.isOn) {
console.log("Desligar")
} else {
console.log("Ligar")
}
this.isOn = !this.isOn
}
}
const microfonBlack = new Microfone()
const microfoneWhite = new Microfone("white")
console.log(microfonBlack)
console.log(microfoneWhite, microfoneWhite.toggleOnOff(), microfoneWhite.toggleOnOff()) | 26 | 87 | 0.639676 |
de27f5ee443502c2a7be06eac2ac883667a38fb5 | 536 | js | JavaScript | app/components/Camera/styles/CameraStyle.js | EIP2021/kiup-app | 6a1bbdc73b090719f8b69717c15e77d802d9b88c | [
"MIT"
] | 2 | 2019-10-23T21:43:28.000Z | 2019-10-28T13:20:30.000Z | app/components/Camera/styles/CameraStyle.js | EIP2021/kiup-app | 6a1bbdc73b090719f8b69717c15e77d802d9b88c | [
"MIT"
] | 3 | 2020-06-01T14:18:29.000Z | 2021-05-10T12:19:41.000Z | app/components/Camera/styles/CameraStyle.js | EIP2021/kiup-app | 6a1bbdc73b090719f8b69717c15e77d802d9b88c | [
"MIT"
] | null | null | null | import { StyleSheet, Platform } from 'react-native';
const styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'column',
backgroundColor: 'black',
},
preview: {
flex: 1,
justifyContent: 'flex-end',
alignItems: 'center',
},
iconContainer: {
backgroundColor: 'transparent',
position: 'absolute',
...Platform.select({
ios: {
right: 10,
top: 40,
},
android: {
right: 0,
top: 25,
},
}),
},
});
export default styles;
| 17.290323 | 52 | 0.539179 |
de285eb656371c854670069fd1f8a6fc5d5db96d | 6,507 | js | JavaScript | test/endpoint-config.test.js | jepenven-silabs/zap | dbf261317c47cb5ad55f1999c2dec343f372e956 | [
"Apache-2.0"
] | null | null | null | test/endpoint-config.test.js | jepenven-silabs/zap | dbf261317c47cb5ad55f1999c2dec343f372e956 | [
"Apache-2.0"
] | null | null | null | test/endpoint-config.test.js | jepenven-silabs/zap | dbf261317c47cb5ad55f1999c2dec343f372e956 | [
"Apache-2.0"
] | null | null | null | /**
*
* Copyright (c) 2020 Silicon Labs
*
* 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.
*
*
* @jest-environment node
*/
const path = require('path')
const genEngine = require('../src-electron/generator/generation-engine.js')
const args = require('../src-electron/util/args.js')
const env = require('../src-electron/util/env.js')
const dbApi = require('../src-electron/db/db-api.js')
const zclLoader = require('../src-electron/zcl/zcl-loader.js')
const importJs = require('../src-electron/importexport/import.js')
const testUtil = require('./test-util.js')
const queryEndpoint = require('../src-electron/db/query-endpoint.js')
const types = require('../src-electron/util/types.js')
const bin = require('../src-electron/util/bin.js')
var db
const templateCount = 12
const genTimeout = 3000
const testFile = path.join(__dirname, 'resource/three-endpoint-device.zap')
var sessionId
var templateContext
var zclContext
beforeAll(() => {
var file = env.sqliteTestFile('endpointconfig')
return dbApi
.initDatabaseAndLoadSchema(file, env.schemaFile(), env.zapVersion())
.then((d) => {
db = d
env.logInfo('DB initialized.')
})
}, 5000)
afterAll(() => {
return dbApi.closeDatabase(db)
})
test(
'Basic gen template parsing and generation',
() =>
genEngine
.loadTemplates(db, testUtil.testZigbeeGenerationTemplates)
.then((context) => {
expect(context.crc).not.toBeNull()
expect(context.templateData).not.toBeNull()
expect(context.templateData.name).toEqual('Test templates')
expect(context.templateData.version).toEqual('test-v1')
expect(context.templateData.templates.length).toEqual(templateCount)
expect(context.packageId).not.toBeNull()
templateContext = context
}),
3000
)
test(
'Load ZCL stuff',
() =>
zclLoader.loadZcl(db, args.zclPropertiesFile).then((context) => {
zclContext = context
}),
5000
)
test('Test file import', () =>
importJs.importDataFromFile(db, testFile).then((s) => {
sessionId = s
expect(s).not.toBeNull()
}))
test('Test endpoint config queries', () =>
queryEndpoint
.queryEndpointTypes(db, sessionId)
.then((epts) => {
expect(epts.length).toBe(3)
return epts
})
.then((epts) => {
var ps = []
epts.forEach((ept) => {
ps.push(queryEndpoint.queryEndpointClusters(db, ept.id))
})
return Promise.all(ps)
})
.then((clusterArray) => {
expect(clusterArray.length).toBe(3)
expect(clusterArray[0].length).toBe(28)
expect(clusterArray[1].length).toBe(5)
expect(clusterArray[2].length).toBe(7)
var promiseAttributes = []
var promiseCommands = []
clusterArray.forEach((clusters) => {
clusters.forEach((cluster) => {
promiseAttributes.push(
queryEndpoint.queryEndpointClusterAttributes(
db,
cluster.clusterId,
cluster.side,
cluster.endpointTypeId
)
)
promiseCommands.push(
queryEndpoint.queryEndpointClusterCommands(
db,
cluster.clusterId,
cluster.endpointTypeId
)
)
})
})
return Promise.all([
Promise.all(promiseAttributes),
Promise.all(promiseCommands),
])
})
.then((twoLists) => {
var attributeLists = twoLists[0]
var commandLists = twoLists[1]
expect(attributeLists.length).toBe(40)
expect(commandLists.length).toBe(40)
var atSums = {}
attributeLists.forEach((al) => {
var l = al.length
if (atSums[l]) {
atSums[l]++
} else {
atSums[l] = 1
}
})
expect(atSums[0]).toBe(18)
var cmdSums = {}
commandLists.forEach((cl) => {
var l = cl.length
if (cmdSums[l]) {
cmdSums[l]++
} else {
cmdSums[l] = 1
}
})
expect(cmdSums[0]).toBe(15)
}))
test('Some intermediate queries', () =>
types.typeSize(db, zclContext.packageId, 'bitmap8').then((size) => {
expect(size).toBe(1)
}))
test(
'Test endpoint config generation',
() =>
genEngine
.generate(db, sessionId, templateContext.packageId)
.then((genResult) => {
expect(genResult).not.toBeNull()
expect(genResult.partial).toBeFalsy()
expect(genResult.content).not.toBeNull()
var epc = genResult.content['zap-config.h']
var epcLines = epc.split(/\r?\n/)
expect(
epc.includes(
'#define FIXED_ENDPOINT_ARRAY { 0x0029, 0x002A, 0x002B }'
)
).toBeTruthy()
expect(
epc.includes(
"17, 'V', 'e', 'r', 'y', ' ', 'l', 'o', 'n', 'g', ' ', 'u', 's', 'e', 'r', ' ', 'i', 'd', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,"
)
).toBeTruthy()
expect(
epc.includes(
'{ ZAP_REPORT_DIRECTION(REPORTED), 0x0029, 0x0101, 0x002A, ZAP_CLUSTER_MASK(SERVER), 0x0000, 0, 65344, 0 }, /* Reporting for cluster: "Door Lock", attribute: "enable inside status led". side: server */'
)
).toBeTruthy()
expect(
epc.includes(bin.hexToCBytes(bin.stringToHex('Very long user id')))
)
expect(epc.includes('#define FIXED_NETWORKS { 1, 1, 2 }')).toBeTruthy()
expect(
epc.includes('#define FIXED_PROFILE_IDS { 0x0107, 0x0104, 0x0104 }')
).toBeTruthy()
expect(
epc.includes('#define FIXED_ENDPOINT_TYPES { 0, 1, 2 }')
).toBeTruthy()
expect(epcLines.length).toBeGreaterThan(100)
var cnt = 0
epcLines.forEach((line) => {
if (line.includes('ZAP_TYPE(')) {
expect(line.includes('undefined')).toBeFalsy()
cnt++
}
})
expect(cnt).toBe(101)
}),
genTimeout
)
| 30.265116 | 214 | 0.593822 |
de28701424d93958af729646e12293b58d8db675 | 153 | js | JavaScript | data/js/54/a4/93/20/00/00.28.js | hdm/mac-tracker | 69f0c4efaa3d60111001d40f7a33886cc507e742 | [
"CC-BY-4.0",
"MIT"
] | 20 | 2018-12-26T17:06:05.000Z | 2021-08-05T07:47:31.000Z | data/js/54/a4/93/20/00/00.28.js | hdm/mac-tracker | 69f0c4efaa3d60111001d40f7a33886cc507e742 | [
"CC-BY-4.0",
"MIT"
] | 1 | 2021-06-03T12:20:55.000Z | 2021-06-03T16:36:26.000Z | data/js/54/a4/93/20/00/00.28.js | hdm/mac-tracker | 69f0c4efaa3d60111001d40f7a33886cc507e742 | [
"CC-BY-4.0",
"MIT"
] | 8 | 2018-12-27T05:07:48.000Z | 2021-01-26T00:41:17.000Z | macDetailCallback("54a493200000/28",[{"d":"2019-07-27","t":"add","s":"ieee-mam.csv","a":"Domagkstr. 7 Kirchheim DE 85551","c":"DE","o":"genua GmbH"}]);
| 76.5 | 152 | 0.620915 |
de2923a07736961e64e2a1e109ea1155ef437ce3 | 2,503 | js | JavaScript | skillsquire/views/admin_views/controllers/resource.edit.controller.js | joryschmidt/hosted_jorys | cc563188624e8a8ed13543178d5941b56e49859a | [
"CC-BY-3.0"
] | null | null | null | skillsquire/views/admin_views/controllers/resource.edit.controller.js | joryschmidt/hosted_jorys | cc563188624e8a8ed13543178d5941b56e49859a | [
"CC-BY-3.0"
] | 1 | 2021-05-10T17:23:26.000Z | 2021-05-10T17:23:26.000Z | skillsquire/views/admin_views/controllers/resource.edit.controller.js | joryschmidt/jorys | 4c103658701c4639689b1990d2068c97f0f9dc10 | [
"CC-BY-3.0"
] | null | null | null | angular.module('admin')
.controller('resourceEditCtrl', ['$http', '$scope', '$routeParams', '$location', function($http, $scope, $routeParams, $location) {
$http.get('/skillsquire/admin/resource/' + $routeParams.id).then(function(res) {
console.log('success');
$scope.resource = res.data;
$scope.submit = function() {
$http({method: 'PUT', url: '/skillsquire/admin/resource/edit/' + $routeParams.id, data: $scope.resource }).then(function(response) {
// Having serious problems trying to get Angular to send resource.categories anything but an empty array, so this will have to do for now
console.log('sent to mongo');
for (var cat in $scope.categories) {
if ($scope.categories[cat] == true) {
$http.put('/skillsquire/admin/resource/add_category/' + $routeParams.id, { cat: cat }).then(function() {
console.log('Updated category');
}, function(err) {
console.log(err);
});
} else {
$http.put('/skillquire/admin/resource/remove_category/' + $routeParams.id, { cat: cat }).then(function() {
console.log('Removed category');
}, function(err) {
console.log(err);
});
}
}
}, function(response) {
console.log(response.data);
});
$location.path('/skillsquire/');
};
// This will add new categories to the database
$scope.addNewCategory = function() {
$http.put('/skillsquire/categories/add', { cat: $scope.newCat }).then(function(q) {
console.log('Added category');
$scope.categories[$scope.newCat] = false;
$scope.newCat = null;
}, function(err) {
console.log('Error: ', err);
});
};
$http.get('/skillsquire/categories').then(function(q) {
$scope.categories = {};
// this is so the in operator works in the next loop and we don't have to loop through the resource categories array for every checkbox
var cat_object = {};
for (var i=0; i<$scope.resource.categories.length; i++) {
cat_object[$scope.resource.categories[i]] = true;
}
var categories = q.data.categories;
var len = categories.length;
for (var i=0; i<len; i++) {
$scope.categories[categories[i]] = categories[i] in cat_object;
}
}, function() {
console.log('No cats :(');
});
console.log($scope.resource);
});
}]); | 38.507692 | 145 | 0.576508 |
de2962c6b13819762779b707d0c3d7af0d3ff895 | 11,969 | js | JavaScript | node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestMemory.js | phmpacheco-ufjf/Analise-AIBF | ff9344ec79800112bca240bebf020eb906215935 | [
"MIT"
] | 5 | 2019-03-18T23:25:20.000Z | 2021-09-24T19:58:59.000Z | node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestMemory.js | QueenShabazz/queenscript | 3ef86cb49be82477d49ebd8f3ad95dd61ed5846d | [
"MIT"
] | 5 | 2021-03-10T15:51:15.000Z | 2022-02-27T03:33:14.000Z | node_modules/monaco-editor/esm/vs/editor/contrib/suggest/suggestMemory.js | QueenShabazz/queenscript | 3ef86cb49be82477d49ebd8f3ad95dd61ed5846d | [
"MIT"
] | 4 | 2019-03-19T07:03:48.000Z | 2021-05-16T15:38:12.000Z | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
import { LRUCache, TernarySearchTree } from '../../../base/common/map.js';
import { IStorageService } from '../../../platform/storage/common/storage.js';
import { completionKindFromLegacyString } from '../../common/modes.js';
import { Disposable } from '../../../base/common/lifecycle.js';
import { RunOnceScheduler } from '../../../base/common/async.js';
import { createDecorator } from '../../../platform/instantiation/common/instantiation.js';
import { IConfigurationService } from '../../../platform/configuration/common/configuration.js';
import { registerSingleton } from '../../../platform/instantiation/common/extensions.js';
var Memory = /** @class */ (function () {
function Memory() {
}
Memory.prototype.select = function (model, pos, items) {
if (items.length === 0) {
return 0;
}
var topScore = items[0].score;
for (var i = 1; i < items.length; i++) {
var _a = items[i], score = _a.score, suggestion = _a.completion;
if (score !== topScore) {
// stop when leaving the group of top matches
break;
}
if (suggestion.preselect) {
// stop when seeing an auto-select-item
return i;
}
}
return 0;
};
return Memory;
}());
export { Memory };
var NoMemory = /** @class */ (function (_super) {
__extends(NoMemory, _super);
function NoMemory() {
return _super !== null && _super.apply(this, arguments) || this;
}
NoMemory.prototype.memorize = function (model, pos, item) {
// no-op
};
NoMemory.prototype.toJSON = function () {
return undefined;
};
NoMemory.prototype.fromJSON = function () {
//
};
return NoMemory;
}(Memory));
export { NoMemory };
var LRUMemory = /** @class */ (function (_super) {
__extends(LRUMemory, _super);
function LRUMemory() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this._cache = new LRUCache(300, 0.66);
_this._seq = 0;
return _this;
}
LRUMemory.prototype.memorize = function (model, pos, item) {
var label = item.completion.label;
var key = model.getLanguageIdentifier().language + "/" + label;
this._cache.set(key, {
touch: this._seq++,
type: item.completion.kind,
insertText: item.completion.insertText
});
};
LRUMemory.prototype.select = function (model, pos, items) {
// in order of completions, select the first
// that has been used in the past
var word = model.getWordUntilPosition(pos).word;
if (word.length !== 0) {
return _super.prototype.select.call(this, model, pos, items);
}
var lineSuffix = model.getLineContent(pos.lineNumber).substr(pos.column - 10, pos.column - 1);
if (/\s$/.test(lineSuffix)) {
return _super.prototype.select.call(this, model, pos, items);
}
var res = -1;
var seq = -1;
for (var i = 0; i < items.length; i++) {
var suggestion = items[i].completion;
var key = model.getLanguageIdentifier().language + "/" + suggestion.label;
var item = this._cache.get(key);
if (item && item.touch > seq && item.type === suggestion.kind && item.insertText === suggestion.insertText) {
seq = item.touch;
res = i;
}
}
if (res === -1) {
return _super.prototype.select.call(this, model, pos, items);
}
else {
return res;
}
};
LRUMemory.prototype.toJSON = function () {
var data = [];
this._cache.forEach(function (value, key) {
data.push([key, value]);
});
return data;
};
LRUMemory.prototype.fromJSON = function (data) {
this._cache.clear();
var seq = 0;
for (var _i = 0, data_1 = data; _i < data_1.length; _i++) {
var _a = data_1[_i], key = _a[0], value = _a[1];
value.touch = seq;
value.type = typeof value.type === 'number' ? value.type : completionKindFromLegacyString(value.type);
this._cache.set(key, value);
}
this._seq = this._cache.size;
};
return LRUMemory;
}(Memory));
export { LRUMemory };
var PrefixMemory = /** @class */ (function (_super) {
__extends(PrefixMemory, _super);
function PrefixMemory() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this._trie = TernarySearchTree.forStrings();
_this._seq = 0;
return _this;
}
PrefixMemory.prototype.memorize = function (model, pos, item) {
var word = model.getWordUntilPosition(pos).word;
var key = model.getLanguageIdentifier().language + "/" + word;
this._trie.set(key, {
type: item.completion.kind,
insertText: item.completion.insertText,
touch: this._seq++
});
};
PrefixMemory.prototype.select = function (model, pos, items) {
var word = model.getWordUntilPosition(pos).word;
if (!word) {
return _super.prototype.select.call(this, model, pos, items);
}
var key = model.getLanguageIdentifier().language + "/" + word;
var item = this._trie.get(key);
if (!item) {
item = this._trie.findSubstr(key);
}
if (item) {
for (var i = 0; i < items.length; i++) {
var _a = items[i].completion, kind = _a.kind, insertText = _a.insertText;
if (kind === item.type && insertText === item.insertText) {
return i;
}
}
}
return _super.prototype.select.call(this, model, pos, items);
};
PrefixMemory.prototype.toJSON = function () {
var entries = [];
this._trie.forEach(function (value, key) { return entries.push([key, value]); });
// sort by last recently used (touch), then
// take the top 200 item and normalize their
// touch
entries
.sort(function (a, b) { return -(a[1].touch - b[1].touch); })
.forEach(function (value, i) { return value[1].touch = i; });
return entries.slice(0, 200);
};
PrefixMemory.prototype.fromJSON = function (data) {
this._trie.clear();
if (data.length > 0) {
this._seq = data[0][1].touch + 1;
for (var _i = 0, data_2 = data; _i < data_2.length; _i++) {
var _a = data_2[_i], key = _a[0], value = _a[1];
value.type = typeof value.type === 'number' ? value.type : completionKindFromLegacyString(value.type);
this._trie.set(key, value);
}
}
};
return PrefixMemory;
}(Memory));
export { PrefixMemory };
var SuggestMemoryService = /** @class */ (function (_super) {
__extends(SuggestMemoryService, _super);
function SuggestMemoryService(_storageService, _configService) {
var _this = _super.call(this) || this;
_this._storageService = _storageService;
_this._configService = _configService;
_this._storagePrefix = 'suggest/memories';
var update = function () {
var mode = _this._configService.getValue('editor.suggestSelection');
var share = _this._configService.getValue('editor.suggest.shareSuggestSelections');
_this._update(mode, share, false);
};
_this._persistSoon = _this._register(new RunOnceScheduler(function () { return _this._saveState(); }, 500));
_this._register(_storageService.onWillSaveState(function () { return _this._saveState(); }));
_this._register(_this._configService.onDidChangeConfiguration(function (e) {
if (e.affectsConfiguration('editor.suggestSelection') || e.affectsConfiguration('editor.suggest.shareSuggestSelections')) {
update();
}
}));
_this._register(_this._storageService.onDidChangeStorage(function (e) {
if (e.scope === 0 /* GLOBAL */ && e.key.indexOf(_this._storagePrefix) === 0) {
if (!document.hasFocus()) {
// windows that aren't focused have to drop their current
// storage value and accept what's stored now
_this._update(_this._mode, _this._shareMem, true);
}
}
}));
update();
return _this;
}
SuggestMemoryService.prototype._update = function (mode, shareMem, force) {
if (!force && this._mode === mode && this._shareMem === shareMem) {
return;
}
this._shareMem = shareMem;
this._mode = mode;
this._strategy = mode === 'recentlyUsedByPrefix' ? new PrefixMemory() : mode === 'recentlyUsed' ? new LRUMemory() : new NoMemory();
try {
var scope = shareMem ? 0 /* GLOBAL */ : 1 /* WORKSPACE */;
var raw = this._storageService.get(this._storagePrefix + "/" + this._mode, scope);
if (raw) {
this._strategy.fromJSON(JSON.parse(raw));
}
}
catch (e) {
// things can go wrong with JSON...
}
};
SuggestMemoryService.prototype.memorize = function (model, pos, item) {
this._strategy.memorize(model, pos, item);
this._persistSoon.schedule();
};
SuggestMemoryService.prototype.select = function (model, pos, items) {
return this._strategy.select(model, pos, items);
};
SuggestMemoryService.prototype._saveState = function () {
var raw = JSON.stringify(this._strategy);
var scope = this._shareMem ? 0 /* GLOBAL */ : 1 /* WORKSPACE */;
this._storageService.store(this._storagePrefix + "/" + this._mode, raw, scope);
};
SuggestMemoryService = __decorate([
__param(0, IStorageService),
__param(1, IConfigurationService)
], SuggestMemoryService);
return SuggestMemoryService;
}(Disposable));
export { SuggestMemoryService };
export var ISuggestMemoryService = createDecorator('ISuggestMemories');
registerSingleton(ISuggestMemoryService, SuggestMemoryService, true);
| 43.523636 | 150 | 0.568886 |
de299cc06e14583ed33e91c6039f5c609e03385b | 297 | js | JavaScript | src/hooks/useRegisterMutation.js | VzAnthony/Petgram | b93117087460c19b15ad4ff3f38136755ce3c8ac | [
"MIT"
] | null | null | null | src/hooks/useRegisterMutation.js | VzAnthony/Petgram | b93117087460c19b15ad4ff3f38136755ce3c8ac | [
"MIT"
] | null | null | null | src/hooks/useRegisterMutation.js | VzAnthony/Petgram | b93117087460c19b15ad4ff3f38136755ce3c8ac | [
"MIT"
] | null | null | null | import { gql, useMutation } from '@apollo/client'
const REGISTER = gql`
mutation signup ($input: UserCredentials!) {
signup (input: $input)
}
`
export const useRegisterMutation = () => {
const [register, { loading, error }] = useMutation(REGISTER)
return [register, loading, error]
}
| 24.75 | 62 | 0.680135 |
de2a7e245068253487eef782e7a6add3052bcea3 | 3,340 | js | JavaScript | server/controllers/business-controller.js | alfredopozosnicolau/OurCircle | 85c6ef48ea18b5938bf9175a4962887fd00d5013 | [
"MIT"
] | null | null | null | server/controllers/business-controller.js | alfredopozosnicolau/OurCircle | 85c6ef48ea18b5938bf9175a4962887fd00d5013 | [
"MIT"
] | null | null | null | server/controllers/business-controller.js | alfredopozosnicolau/OurCircle | 85c6ef48ea18b5938bf9175a4962887fd00d5013 | [
"MIT"
] | null | null | null | const Business = require('../models/business-model');
const bcrypt = require('bcryptjs');
const jwt = require('jsonwebtoken');
createBusiness = async (req, res) => {
const body = req.body;
if (!body) {
return res.status(400).json({
sucess: false,
error: 'You must provide a Business details.',
});
}
const saltRound = 10;
const {
email,
businessName,
password,
buinessLocation,
services,
businessURL,
phoneNumber,
story,
deals,
} = req.body;
await bcrypt.hash(password, saltRound, (err, hash) => {
if (err) {
return res.status(400).json({
success: false,
error: err,
message: 'error hashing the password',
});
}
const business = new Business({
email,
passwordHash: hash,
businessName,
buinessLocation,
services,
businessURL,
phoneNumber,
story,
deals,
});
if (!business) {
return res.status(400).json({
success: false,
message: "'Business' is malformed",
});
}
return business
.save()
.then(() => {
return res.status(201).json({
success: true,
business: business,
message: 'Business created!',
});
})
.catch(err => {
return res.status(400).json({
success: false,
error: err,
message: err,
});
});
});
};
/**
* Login method, if user found it compare password, if password matches it signs the info in jsonWebToken then sends it back with business Info
*/
businessLogin = async (req, res) => {
const body = req.body;
if (!body) {
return res.status(400).json({
sucess: false,
error: 'You must provide a email and password to login.',
});
}
const { email, password } = body;
await Business.findOne({ email }, (err, business) => {
if (err) {
return res.status(400).json({
success: false,
error: err,
message: 'error in business login',
});
} else if (!business) {
return res.status(404).json({
success: false,
error: 'Business not found',
});
}
bcrypt.compare(password, business.passwordHash, (err, result) => {
if (err) {
return res.status(400).json({
success: false,
error: err,
message: 'error comparing the password',
});
} else if (result) {
jwt.sign(
{
business: business.email,
},
'process.env.ACCESS_TOKEN_SECRET',
{ algorithm: 'HS256', expiresIn: '7200s' },
(err, token) => {
if (err) {
return res.status(400).json({
success: false,
error: err,
message: `error in business login jwt.sign token ${err}`,
});
}
res.send({
token,
business: {
businessInfo: [business.email, business.businessName],
},
role: 'business',
});
},
);
} else {
return res.status(404).json({
success: false,
error: 'Invalid password',
});
}
});
});
};
module.exports = {
createBusiness,
businessLogin,
};
| 23.521127 | 143 | 0.509581 |
de2b6fa2e28a9f850761b15f389c69afcc16127f | 6,775 | js | JavaScript | node_modules/knex/lib/dialects/mssql/schema/tablecompiler.js | raaudain/sauti-marketplace-backend | 39edc5a987e692d4c0b285df2590de9f359bfc9f | [
"MIT"
] | 7 | 2020-06-07T02:14:43.000Z | 2021-03-17T23:23:40.000Z | node_modules/knex/lib/dialects/mssql/schema/tablecompiler.js | raaudain/sauti-marketplace-backend | 39edc5a987e692d4c0b285df2590de9f359bfc9f | [
"MIT"
] | 39 | 2020-03-06T16:32:00.000Z | 2022-03-26T21:19:49.000Z | server/node_modules/knex/lib/dialects/mssql/schema/tablecompiler.js | andrefmenezes/tab | a31c1dccef0595b8749c5f033ba0c5ad5002731d | [
"MIT"
] | 21 | 2020-04-25T03:15:51.000Z | 2020-04-30T23:03:03.000Z | /* eslint max-len:0 */
// MSSQL Table Builder & Compiler
// -------
const inherits = require('inherits');
const TableCompiler = require('../../../schema/tablecompiler');
const helpers = require('../../../helpers');
// Table Compiler
// ------
function TableCompiler_MSSQL() {
TableCompiler.apply(this, arguments);
}
inherits(TableCompiler_MSSQL, TableCompiler);
Object.assign(TableCompiler_MSSQL.prototype, {
createAlterTableMethods: ['foreign', 'primary'],
createQuery(columns, ifNot) {
const createStatement = ifNot
? `if object_id('${this.tableName()}', 'U') is null CREATE TABLE `
: 'CREATE TABLE ';
const sql =
createStatement +
this.tableName() +
(this._formatting ? ' (\n ' : ' (') +
columns.sql.join(this._formatting ? ',\n ' : ', ') +
')';
if (this.single.comment) {
const { comment } = this.single;
if (comment.length > 60)
this.client.logger.warn(
'The max length for a table comment is 60 characters'
);
}
this.pushQuery(sql);
},
lowerCase: false,
addColumnsPrefix: 'ADD ',
dropColumnPrefix: 'DROP COLUMN ',
alterColumnPrefix: 'ALTER COLUMN ',
// Compiles column add. Multiple columns need only one ADD clause (not one ADD per column) so core addColumns doesn't work. #1348
addColumns(columns, prefix) {
prefix = prefix || this.addColumnsPrefix;
if (columns.sql.length > 0) {
this.pushQuery({
sql:
(this.lowerCase ? 'alter table ' : 'ALTER TABLE ') +
this.tableName() +
' ' +
prefix +
columns.sql.join(', '),
bindings: columns.bindings,
});
}
},
// Compiles column drop. Multiple columns need only one DROP clause (not one DROP per column) so core dropColumn doesn't work. #1348
dropColumn() {
const _this2 = this;
const columns = helpers.normalizeArr.apply(null, arguments);
const drops = (Array.isArray(columns) ? columns : [columns]).map((column) =>
_this2.formatter.wrap(column)
);
this.pushQuery(
(this.lowerCase ? 'alter table ' : 'ALTER TABLE ') +
this.tableName() +
' ' +
this.dropColumnPrefix +
drops.join(', ')
);
},
// Compiles the comment on the table.
comment() {},
changeType() {},
// Renames a column on the table.
renameColumn(from, to) {
this.pushQuery(
`exec sp_rename ${this.formatter.parameter(
this.tableName() + '.' + from
)}, ${this.formatter.parameter(to)}, 'COLUMN'`
);
},
dropFKRefs(runner, refs) {
const formatter = this.client.formatter(this.tableBuilder);
return Promise.all(
refs.map(function (ref) {
const constraintName = formatter.wrap(ref.CONSTRAINT_NAME);
const tableName = formatter.wrap(ref.TABLE_NAME);
return runner.query({
sql: `ALTER TABLE ${tableName} DROP CONSTRAINT ${constraintName}`,
});
})
);
},
createFKRefs(runner, refs) {
const formatter = this.client.formatter(this.tableBuilder);
return Promise.all(
refs.map(function (ref) {
const tableName = formatter.wrap(ref.TABLE_NAME);
const keyName = formatter.wrap(ref.CONSTRAINT_NAME);
const column = formatter.columnize(ref.COLUMN_NAME);
const references = formatter.columnize(ref.REFERENCED_COLUMN_NAME);
const inTable = formatter.wrap(ref.REFERENCED_TABLE_NAME);
const onUpdate = ` ON UPDATE ${ref.UPDATE_RULE}`;
const onDelete = ` ON DELETE ${ref.DELETE_RULE}`;
return runner.query({
sql:
`ALTER TABLE ${tableName} ADD CONSTRAINT ${keyName}` +
' FOREIGN KEY (' +
column +
') REFERENCES ' +
inTable +
' (' +
references +
')' +
onUpdate +
onDelete,
});
})
);
},
index(columns, indexName) {
indexName = indexName
? this.formatter.wrap(indexName)
: this._indexCommand('index', this.tableNameRaw, columns);
this.pushQuery(
`CREATE INDEX ${indexName} ON ${this.tableName()} (${this.formatter.columnize(
columns
)})`
);
},
primary(columns, constraintName) {
constraintName = constraintName
? this.formatter.wrap(constraintName)
: this.formatter.wrap(`${this.tableNameRaw}_pkey`);
if (!this.forCreate) {
this.pushQuery(
`ALTER TABLE ${this.tableName()} ADD CONSTRAINT ${constraintName} PRIMARY KEY (${this.formatter.columnize(
columns
)})`
);
} else {
this.pushQuery(
`CONSTRAINT ${constraintName} PRIMARY KEY (${this.formatter.columnize(
columns
)})`
);
}
},
unique(columns, indexName) {
indexName = indexName
? this.formatter.wrap(indexName)
: this._indexCommand('unique', this.tableNameRaw, columns);
if (!Array.isArray(columns)) {
columns = [columns];
}
const whereAllTheColumnsAreNotNull = columns
.map((column) => this.formatter.columnize(column) + ' IS NOT NULL')
.join(' AND ');
// make unique constraint that allows null https://stackoverflow.com/a/767702/360060
// to be more or less compatible with other DBs (if any of the columns is NULL then "duplicates" are allowed)
this.pushQuery(
`CREATE UNIQUE INDEX ${indexName} ON ${this.tableName()} (${this.formatter.columnize(
columns
)}) WHERE ${whereAllTheColumnsAreNotNull}`
);
},
// Compile a drop index command.
dropIndex(columns, indexName) {
indexName = indexName
? this.formatter.wrap(indexName)
: this._indexCommand('index', this.tableNameRaw, columns);
this.pushQuery(`DROP INDEX ${indexName} ON ${this.tableName()}`);
},
// Compile a drop foreign key command.
dropForeign(columns, indexName) {
indexName = indexName
? this.formatter.wrap(indexName)
: this._indexCommand('foreign', this.tableNameRaw, columns);
this.pushQuery(
`ALTER TABLE ${this.tableName()} DROP CONSTRAINT ${indexName}`
);
},
// Compile a drop primary key command.
dropPrimary(constraintName) {
constraintName = constraintName
? this.formatter.wrap(constraintName)
: this.formatter.wrap(`${this.tableNameRaw}_pkey`);
this.pushQuery(
`ALTER TABLE ${this.tableName()} DROP CONSTRAINT ${constraintName}`
);
},
// Compile a drop unique key command.
dropUnique(column, indexName) {
indexName = indexName
? this.formatter.wrap(indexName)
: this._indexCommand('unique', this.tableNameRaw, column);
this.pushQuery(`DROP INDEX ${indexName} ON ${this.tableName()}`);
},
});
module.exports = TableCompiler_MSSQL;
| 29.585153 | 136 | 0.614022 |
de2b7e4fc41b2a7c849688e26a662f57bd84550f | 7,463 | js | JavaScript | src/components/documentView/index.js | sourav-k7/sih-frontend | 184dc51b0ab1512d9af0b2e183aaf18be56d80e5 | [
"MIT"
] | null | null | null | src/components/documentView/index.js | sourav-k7/sih-frontend | 184dc51b0ab1512d9af0b2e183aaf18be56d80e5 | [
"MIT"
] | null | null | null | src/components/documentView/index.js | sourav-k7/sih-frontend | 184dc51b0ab1512d9af0b2e183aaf18be56d80e5 | [
"MIT"
] | null | null | null | import React, { useContext, useEffect } from "react";
import withMainLayout from "../../layout/withMainLayout";
import {
Box,
Container,
InputAdornment,
TextField,
Alert,
Button,
Typography,
} from "@mui/material";
import { BsSearch } from "react-icons/bs";
import { useState } from "react";
import { UserContext } from "../../context/user";
import pdfFile from "../../Assets/test.pdf";
import { useParams } from "react-router-dom";
import axios from "../../utls/axios";
import { toast } from "react-toastify";
const DocumentView = () => {
const [numPages, setNumPages] = useState(null);
const [pageNumber, setPageNumber] = useState(1);
const [userData, setUserData] = useState();
const { userState, documentAction } = useContext(UserContext);
const { documentId } = useParams();
const [application, setApplication] = useState();
const [isReceivedOrNot, setIsReceivedOrNot] = useState(false);
useEffect(() => {
let appDate = userState?.receivedApplication?.find(
(app) => app._id === documentId
);
if (appDate) {
setApplication(appDate);
setIsReceivedOrNot(true);
} else {
setApplication(
userState?.sentApplication?.find((app) => app._id === documentId)
);
}
}, []);
console.log(application);
// const app = userState?.receivedApplication?.filter(
// (application) => application._id === documentId
// );
// let attachment = null;
// let subject = "";
// if (app?.length > 0) {
// attachment = app[0]?.attachment[0]?.data;
// subject = app[0].subject;
// }
function onDocumentLoadSuccess({ numPages }) {
setNumPages(numPages);
setPageNumber(1);
}
async function getApplicationData(id) {
try {
const res = await axios.get(`/application/${id}`);
setUserData(res.data.user);
} catch (error) {
console.log(error);
if (error.response) {
toast.error(error.response.data.errors[0].msg);
}
}
}
useEffect(() => {
getApplicationData(documentId);
}, []);
function changePage(offSet) {
setPageNumber((prevPageNumber) => prevPageNumber + offSet);
}
function changePageBack() {
changePage(-1);
}
function changePageNext() {
changePage(+1);
}
const defaultPdfFile = useState(pdfFile);
return (
<Container maxWidth="lg" sx={{ mt: 2 }}>
<Box display="flex" justifyContent={"space-between"}>
<TextField
variant="outlined"
sx={{
width: "28%",
position: "fixed",
top: 10,
height: "12rem",
left: "50%",
margin: "auto",
zIndex: 4,
transform: "translateX(-50%)",
}}
placeholder="Search Document"
InputProps={{
startAdornment: (
<InputAdornment position="start">
<BsSearch />
</InputAdornment>
),
}}
/>
</Box>
<Box sx={{ display: "flex", gap: 6, marginTop: "1rem" }}>
<Box
sx={{
height: "35rem",
width: "25%",
borderRadius: "2%",
backgroundColor: (theme) => theme.palette.primary.main,
color: "white",
padding: "1rem",
display: "flex",
flexDirection: "column",
gap: 2,
}}
>
<Typography varient="h3" sx={{ fontSize: 20 }}>
Sender
</Typography>
<Box
sx={{
height: "16%",
backgroundColor: "white",
display: "flex",
borderRadius: "2%",
color: "black",
padding: "1rem",
}}
>
<Box sx={{ display: "grid" }}>
<Typography varient="h3" sx={{ fontSize: 22 }}>
{userData?.name}
</Typography>
<Typography varient="h7" sx={{ color: "rgba(69, 90, 100, 1)" }}>
{userData?.email}
</Typography>
</Box>
</Box>
<Typography varient="h3" sx={{ fontSize: 20 }}>
Send At
</Typography>
<Box
sx={{
height: "10%",
backgroundColor: "white",
display: "flex",
borderRadius: "2%",
color: "black",
padding: "1rem",
}}
>
<Box sx={{ display: "grid" }}>
{/* <Typography varient="h5">{(new Date(application?.createdAt)).toLocaleTimeString('en-IN',{
hour:'numeric',minute:'numeric',
})}</Typography> */}
<Typography varient="h5">
{new Date(application?.createdAt).toLocaleDateString("en-IN", {
day: "numeric",
month: "long",
year: "numeric",
})}
</Typography>
</Box>
</Box>
<Box
sx={{
display: "flex",
width: "100%",
justifyContent: "center",
gap: 2,
}}
>
{application?.status === "Pending" && isReceivedOrNot && (
<>
<Button
variant="contained"
sx={{ color: "white", backgroundColor: "green" }}
onClick={() => {
documentAction("Approved", documentId);
}}
>
Approve
</Button>
<Button
variant="contained"
sx={{ backgroundColor: "red", color: "white" }}
onClick={() => {
documentAction("Declined", documentId);
}}
>
Decline
</Button>
</>
)}
{application?.status === "Approved" && (
<Alert variant="filled" severity="success" sx={{ width: "100%" }}>
Approved
</Alert>
)}
{application?.status === "Declined" && (
<Alert variant="filled" severity="error" sx={{ width: "100%" }}>
Declined
</Alert>
)}
{application?.status === "Pending" && !isReceivedOrNot && (
<Alert variant="filled" severity="info" sx={{ width: "100%" }}>
Approval Pending
</Alert>
)}
</Box>
</Box>
<Box
sx={{
height: "35rem",
width: "58%",
borderRadius: "2%",
}}
>
<Typography variant="h6">
Subject:{" "}
{application?.subject?.charAt(0).toUpperCase() +
application?.subject.substr(1).toLowerCase()}
</Typography>
<Typography variant="body2" gutterBottom>
{application?.message}
</Typography>
{application?.attachment[0]?.data && (
<img
src={application?.attachment[0]?.data}
alt="attachements"
style={{
height: "100%",
width: "100%",
justifySelf: "center",
}}
></img>
)}
</Box>
</Box>
</Container>
);
};
export const DocumentViewLayout = withMainLayout(DocumentView);
| 29.152344 | 107 | 0.465898 |
de2b899046cf6875f0964c66866bd71a999c8b44 | 6,839 | js | JavaScript | sdk/tests/deqp/temp_externs/ie_event.js | dyna-dot/WebGL | e27538ce22753999c7418e66aa45a245d13e461d | [
"MIT"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | sdk/tests/deqp/temp_externs/ie_event.js | dyna-dot/WebGL | e27538ce22753999c7418e66aa45a245d13e461d | [
"MIT"
] | 2,313 | 2015-01-05T11:39:14.000Z | 2022-03-30T21:27:47.000Z | sdk/tests/deqp/temp_externs/ie_event.js | dyna-dot/WebGL | e27538ce22753999c7418e66aa45a245d13e461d | [
"MIT"
] | 613 | 2015-01-03T21:47:15.000Z | 2022-03-28T09:46:13.000Z | /*
* Copyright 2008 The Closure Compiler Authors
*
* 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.
*/
/**
* @fileoverview Definitions for all the extensions over the
* W3C's event specification by IE in JScript. This file depends on
* w3c_event.js.
*
* @see http://msdn.microsoft.com/en-us/library/ms535863.aspx
* @externs
*/
/** @type {string} */
Event.prototype.Abstract;
/** @type {boolean} */
Event.prototype.altLeft;
/** @type {string} */
Event.prototype.Banner;
/**
* A ClipboardData on IE, but a DataTransfer on WebKit.
* @see http://msdn.microsoft.com/en-us/library/ms535220.aspx
* @type {(ClipboardData|undefined)}
*/
Event.prototype.clipboardData;
/** @type {boolean} */
Event.prototype.contentOverflow;
/** @type {boolean} */
Event.prototype.ctrlLeft;
/** @type {string} */
Event.prototype.dataFld;
Event.prototype.domain;
/** @type {Element} */
Event.prototype.fromElement;
/** @type {string} */
Event.prototype.MoreInfo;
/** @type {string} */
Event.prototype.nextPage;
/** @type {number} */
Event.prototype.offsetX;
/** @type {number} */
Event.prototype.offsetY;
/** @type {string} */
Event.prototype.propertyName;
/** @type {string} */
Event.prototype.qualifier;
/** @type {number} */
Event.prototype.reason;
/** @type {Object.<*,*>} */
Event.prototype.recordset;
/** @type {boolean} */
Event.prototype.repeat;
/** @type {(boolean|string|undefined)} */
Event.prototype.returnValue;
/** @type {string} */
Event.prototype.saveType;
Event.prototype.scheme;
/** @type {boolean} */
Event.prototype.shiftLeft;
/** @type {Window} */
Event.prototype.source;
/** @type {Element} */
Event.prototype.srcElement;
Event.prototype.srcFilter;
/** @type {string} */
Event.prototype.srcUrn;
/** @type {Element} */
Event.prototype.toElement;
Event.prototype.userName;
/** @type {number} */
Event.prototype.wheelDelta;
/** @type {number} */
Event.prototype.x;
/** @type {number} */
Event.prototype.y;
/**
* @constructor
* @see http://msdn.microsoft.com/en-us/library/windows/apps/hh441257.aspx
*/
function MSPointerPoint() {}
/** @type {number} */
MSPointerPoint.prototype.pointerId;
/** @type {number} */
MSPointerPoint.prototype.pointerType;
/**
* @constructor
* @extends {Event}
* @see http://msdn.microsoft.com/en-us/library/windows/apps/hh441233.aspx
*/
function MSPointerEvent() {}
/** @type {number} */
MSPointerEvent.MSPOINTER_TYPE_MOUSE;
/** @type {number} */
MSPointerEvent.MSPOINTER_TYPE_PEN;
/** @type {number} */
MSPointerEvent.MSPOINTER_TYPE_TOUCH;
/** @type {number} */
MSPointerEvent.prototype.height;
/** @type {number} */
MSPointerEvent.prototype.hwTimestamp;
/** @type {boolean} */
MSPointerEvent.prototype.isPrimary;
/** @type {number} */
MSPointerEvent.prototype.pointerId;
/** @type {number} */
MSPointerEvent.prototype.pointerType;
/** @type {number} */
MSPointerEvent.prototype.pressure;
/** @type {number} */
MSPointerEvent.prototype.rotation;
/** @type {number} */
MSPointerEvent.prototype.tiltX;
/** @type {number} */
MSPointerEvent.prototype.tiltY;
/** @type {number} */
MSPointerEvent.prototype.timeStamp;
/** @type {number} */
MSPointerEvent.prototype.width;
/**
* @param {number} pointerId
* @return {undefined}
*/
MSPointerEvent.prototype.msReleasePointerCapture;
/**
* @param {number} pointerId
* @return {undefined}
*/
MSPointerEvent.prototype.msSetPointerCapture;
/**
* @param {string} typeArg
* @param {boolean} canBubbleArg
* @param {boolean} cancelableArg
* @param {Window} viewArg
* @param {number} detailArg
* @param {number} screenXArg
* @param {number} screenYArg
* @param {number} clientXArg
* @param {number} clientYArg
* @param {boolean} ctrlKeyArg
* @param {boolean} altKeyArg
* @param {boolean} shiftKeyArg
* @param {boolean} metaKeyArg
* @param {number} buttonArg
* @param {Element} relatedTargetArg
* @param {number} offsetXArg
* @param {number} offsetYArg
* @param {number} widthArg
* @param {number} heightArg
* @param {number} pressure
* @param {number} rotation
* @param {number} tiltX
* @param {number} tiltY
* @param {number} pointerIdArg
* @param {number} pointerType
* @param {number} hwTimestampArg
* @param {boolean} isPrimary
* @return {undefined}
* @see http://msdn.microsoft.com/en-us/library/windows/apps/hh441246.aspx
*/
MSPointerEvent.prototype.initPointerEvent;
/**
* @constructor
* @see http://msdn.microsoft.com/en-us/library/ie/hh968249(v=vs.85).aspx
*/
function MSGesture() {}
/**
* @type {Element}
*/
MSGesture.prototype.target;
/**
* @param {number} pointerId
*/
MSGesture.prototype.addPointer = function(pointerId) {};
MSGesture.prototype.stop = function() {};
/**
* @constructor
* @extends {Event}
* @see http://msdn.microsoft.com/en-us/library/ie/hh772076(v=vs.85).aspx
*/
function MSGestureEvent() {}
/** @type {number} */
MSGestureEvent.prototype.expansion;
/** @type {!MSGesture} */
MSGestureEvent.prototype.gestureObject;
/** @type {number} */
MSGestureEvent.prototype.hwTimestamp;
/** @type {number} */
MSGestureEvent.prototype.rotation;
/** @type {number} */
MSGestureEvent.prototype.scale;
/** @type {number} */
MSGestureEvent.prototype.translationX;
/** @type {number} */
MSGestureEvent.prototype.translationY;
/** @type {number} */
MSGestureEvent.prototype.velocityAngular;
/** @type {number} */
MSGestureEvent.prototype.velocityExpansion;
/** @type {number} */
MSGestureEvent.prototype.velocityX;
/** @type {number} */
MSGestureEvent.prototype.velocityY;
/**
* @param {string} typeArg
* @param {boolean} canBubbleArg
* @param {boolean} cancelableArg
* @param {Window} viewArg
* @param {number} detailArg
* @param {number} screenXArg
* @param {number} screenYArg
* @param {number} clientXArg
* @param {number} clientYArg
* @param {number} offsetXArg
* @param {number} offsetYArg
* @param {number} translationXArg
* @param {number} translationYArg
* @param {number} scaleArg
* @param {number} expansionArg
* @param {number} rotationArg
* @param {number} velocityXArg
* @param {number} velocityYArg
* @param {number} velocityExpansionArg
* @param {number} velocityAngularArg
* @param {number} hwTimestampArg
* @param {EventTarget} relatedTargetArg
* @return {undefined}
* @see http://msdn.microsoft.com/en-us/library/windows/apps/hh441187.aspx
*/
MSGestureEvent.prototype.initGestureEvent;
| 22.06129 | 75 | 0.703027 |
de2b994227189db89e9520f220631258767ec628 | 10,619 | js | JavaScript | test/mailarchive/mailarchive_test.js | marcphilipp/NeuePlattform-Implementierung | d42c596129460eecaeb2417dae6832785baa9750 | [
"MIT"
] | null | null | null | test/mailarchive/mailarchive_test.js | marcphilipp/NeuePlattform-Implementierung | d42c596129460eecaeb2417dae6832785baa9750 | [
"MIT"
] | null | null | null | test/mailarchive/mailarchive_test.js | marcphilipp/NeuePlattform-Implementierung | d42c596129460eecaeb2417dae6832785baa9750 | [
"MIT"
] | null | null | null | "use strict";
var request = require('supertest');
var express = require('express');
var sinon = require('sinon');
var sinonSandbox = sinon.sandbox.create();
var expect = require('chai').expect;
var moment = require('moment');
var conf = require('../configureForTest');
var parentApp = express();
var session;
parentApp.configure(function () {
parentApp.use(function (req, res, next) {
req.session = session;
next();
});
});
var app = conf.get('beans').get('mailarchiveApp')(parentApp);
var mailarchiveAPI = conf.get('beans').get('mailarchiveAPI');
var membersAPI = conf.get('beans').get('membersAPI');
var Mail = conf.get('beans').get('archivedMail');
describe('Mail content page', function () {
afterEach(function (done) {
sinonSandbox.restore();
done();
});
it('shows "page not found" error if no message is given', function (done) {
request(app)
.get('/message')
.expect(404, function (err) {
done(err);
});
});
it('shows text "Keine Mail" if mail is not found', function (done) {
var mailForId = sinonSandbox.stub(mailarchiveAPI, 'mailForId', function (id, callback) {callback(null, undefined); });
request(app)
.get('/message?id=mailID')
.expect(200)
.expect(/Keine Mail/, function (err) {
expect(mailForId.calledOnce).to.be.ok;
done(err);
});
});
it('shows html if message contains html', function (done) {
var displayedMail = new Mail({
"timeUnix": 1364242214,
"from": {
"name": "Heißen",
"address": "no@mail.de"
},
"html": "<div>Html message 1</div>",
"id": "<message1@nomail.com>",
"subject": "Mail 1",
"text": "Plain text message 1.\n",
"group": "group"
});
var mailForId = sinonSandbox.stub(mailarchiveAPI, 'mailForId', function (id, callback) {callback(null, displayedMail); });
request(app)
.get('/message?id=mailID')
.expect(200)
.expect(/<div>Html message 1<\/div>/, function (err) {
expect(mailForId.calledOnce).to.be.ok;
done(err);
});
});
it('references sender member page if available', function (done) {
var displayedMail = new Mail({
from: {name: "Sender Name", id: "sender ID"},
timeUnix: 0,
id: "<message1@nomail.com>",
subject: "Mail 1",
group: "group",
text: "text"
});
var mailForId = sinonSandbox.stub(mailarchiveAPI, 'mailForId', function (id, callback) {callback(null, displayedMail); });
var dummyMember = {nickname: "nickname", id: "sender ID"};
sinonSandbox.stub(membersAPI, 'getMemberForId', function (id, callback) {
callback(null, dummyMember);
});
request(app)
.get('/message?id=mailID')
.expect(200)
.expect(/href="\/members\/nickname"/, function (err) {
expect(mailForId.calledOnce).to.be.ok;
done(err);
});
});
});
describe('Mail index page', function () {
beforeEach(function (done) {
session = {};
sinonSandbox.stub(membersAPI, 'getMembersForIds', function (id, callback) {
callback(null, []);
});
done();
});
afterEach(function (done) {
sinonSandbox.restore();
done();
});
function stubMailHeaders(headers) {
sinonSandbox.stub(mailarchiveAPI, 'mailHeaders', function (group, callback) {callback(null, headers); });
}
it('shows group name in the title', function (done) {
stubMailHeaders([]);
request(app)
.get('/list/group')
.expect(200)
.expect(/<title>Softwerkskammer\s+-\s+group\s+mails\s+<\/title>/, function (err) {
done(err);
});
});
it('shows group name and references group page in the header', function (done) {
stubMailHeaders([]);
request(app)
.get('/list/group')
.expect(200)
.expect(/Gruppe <a href="\/groups\/group">group<\/a>/, function (err) {
done(err);
});
});
it('contains reference to the group page', function (done) {
stubMailHeaders([]);
request(app)
.get('/list/group')
.expect(200)
.expect(/ href="\/groups\/group"/, function (err) {
done(err);
});
});
it('shows text "Keine Mails" if no mails for group are available', function (done) {
stubMailHeaders([]);
request(app)
.get('/list/group')
.expect(200)
.expect(/Keine Mails/, function (err) {
done(err);
});
});
var mailTime = moment("01 Jan 2010 21:14:14 +0100");
mailTime.lang("de");
var displayedMailHeader = new Mail({
from: {name: "Sender Name"},
timeUnix: mailTime.unix(),
id: "<message1@nomail.com>",
subject: "Mail 1",
group: "group"
});
it('shows sender', function (done) {
stubMailHeaders([displayedMailHeader]);
request(app)
.get('/list/group')
.expect(200)
.expect(/Sender Name/, function (err) {
done(err);
});
});
it('shows subject', function (done) {
stubMailHeaders([displayedMailHeader]);
request(app)
.get('/list/group')
.expect(200)
.expect(/Mail 1/, function (err) {
done(err);
});
});
it('shows mail time', function (done) {
stubMailHeaders([displayedMailHeader]);
request(app)
.get('/list/group')
.expect(200)
.expect(new RegExp(mailTime.format("LLLL")), function (err) {
done(err);
});
});
it('references sender member page if available', function (done) {
var displayedMailHeader = new Mail({
id: "Mail 1",
from: {name: "Sender Name", id: "sender ID"},
subject: "Mail 1",
group: "group"
});
stubMailHeaders([displayedMailHeader]);
var dummyMember = {nickname: "nickname", id: "sender ID"};
membersAPI.getMembersForIds.restore();
sinonSandbox.stub(membersAPI, 'getMembersForIds', function (id, callback) {
callback(null, [dummyMember]);
});
request(app)
.get('/list/group')
.expect(200)
.expect(/href="\/members\/nickname"/, function (err) {
done(err);
});
});
it('references sender member page if available', function (done) {
var displayedMailHeader = new Mail({
id: "Mail 1",
from: {name: "Sender Name", id: "sender ID"},
subject: "Mail 1",
group: "group"
});
stubMailHeaders([displayedMailHeader]);
var dummyMember = {nickname: "nickname", id: "sender ID"};
membersAPI.getMembersForIds.restore();
sinonSandbox.stub(membersAPI, 'getMembersForIds', function (id, callback) {
callback(null, [dummyMember]);
});
request(app)
.get('/list/group')
.expect(200)
.expect(/href="\/members\/nickname"/, function (err) {
done(err);
});
});
it('sorts mails unthreaded and descending on time on request', function (done) {
var mail1 = new Mail({id: "Mail 1", subject: "Mail 1", references: [], timeUnix: 1});
var mail2 = new Mail({id: "Mail 2", subject: "Mail 2", references: ["Mail 1"], timeUnix: 2});
stubMailHeaders([mail1, mail2]);
request(app)
.get('/list/group?thread=false')
.expect(200)
.expect(/Mail 2[\s\S]*?Mail 1/, function (err) {
done(err);
});
});
it('sorts mails threaded and descending on time on request', function (done) {
var mail1 = new Mail({id: "Mail 1", subject: "Mail 1", references: [], timeUnix: 1});
var mail2 = new Mail({id: "Mail 2", subject: "Mail 2", references: ["Mail 1"], timeUnix: 2});
stubMailHeaders([mail1, mail2]);
request(app)
.get('/list/group?thread=true')
.expect(200)
.expect(/Mail 1[\s\S]*?Mail 2/, function (err) {
done(err);
});
});
it('sets session property displayMailsThreaded to true when a threaded index is requested', function (done) {
stubMailHeaders([]);
request(app)
.get('/list/group?thread=true')
.expect(200, function (err) {
expect(session.displayMailsThreaded).to.equal(true);
done(err);
});
});
it('sets session property displayMailsThreaded to false when a threaded index is requested', function (done) {
stubMailHeaders([]);
request(app)
.get('/list/group?thread=false')
.expect(200, function (err) {
expect(session.displayMailsThreaded).to.equal(false);
done(err);
});
});
it('sorts mails unthreaded and descending on time by default', function (done) {
var mail1 = new Mail({id: "Mail 1", subject: "Mail 1", references: [], timeUnix: 1});
var mail2 = new Mail({id: "Mail 2", subject: "Mail 2", references: ["Mail 1"], timeUnix: 2});
stubMailHeaders([mail1, mail2]);
request(app)
.get('/list/group')
.expect(200)
.expect(/Mail 2[\s\S]*?Mail 1/, function (err) {
done(err);
});
});
it('sorts mails unthreaded and descending on time on session setting', function (done) {
var mail1 = new Mail({id: "Mail 1", subject: "Mail 1", references: [], timeUnix: 1});
var mail2 = new Mail({id: "Mail 2", subject: "Mail 2", references: ["Mail 1"], timeUnix: 2});
stubMailHeaders([mail1, mail2]);
session.displayMailsThreaded = false;
request(app)
.get('/list/group')
.expect(200)
.expect(/Mail 2[\s\S]*?Mail 1/, function (err) {
done(err);
});
});
it('sorts mails threaded and descending on time on session setting', function (done) {
var mail1 = new Mail({id: "Mail 1", subject: "Mail 1", references: [], timeUnix: 1});
var mail2 = new Mail({id: "Mail 2", subject: "Mail 2", references: ["Mail 1"], timeUnix: 2});
stubMailHeaders([mail1, mail2]);
session.displayMailsThreaded = true;
request(app)
.get('/list/group')
.expect(200)
.expect(/Mail 1[\s\S]*?Mail 2/, function (err) {
done(err);
});
});
it('shows a link to not threaded representation when a threaded index is requested', function (done) {
var mail1 = new Mail({id: "Mail 1", subject: "Mail 1", references: [], timeUnix: 1});
stubMailHeaders([mail1]);
request(app)
.get('/list/group?thread=true')
.expect(200)
.expect(/href="group\?thread=false"/, function (err) {
done(err);
});
});
it('shows a link to threaded representation when a non threaded index is requested', function (done) {
var mail1 = new Mail({id: "Mail 1", subject: "Mail 1", references: [], timeUnix: 1});
stubMailHeaders([mail1]);
request(app)
.get('/list/group?thread=false')
.expect(200)
.expect(/href="group\?thread=true"/, function (err) {
done(err);
});
});
});
| 29.093151 | 126 | 0.591958 |
de2c2067d0621ad566208db8097944ad0a02c814 | 1,142 | js | JavaScript | src/ui/src/app/loading/Loading.js | PythonDataIntegrator/pythondataintegrator | 6167778c36c2295e36199ac0d4d256a4a0c28d7a | [
"MIT"
] | 14 | 2020-12-19T15:06:13.000Z | 2022-01-12T19:52:17.000Z | src/ui/src/app/loading/Loading.js | ahmetcagriakca/pythondataintegrator | 079b968d6c893008f02c88dbe34909a228ac1c7b | [
"MIT"
] | 43 | 2021-01-06T22:05:22.000Z | 2022-03-10T10:30:30.000Z | src/ui/src/app/loading/Loading.js | PythonDataIntegrator/pythondataintegrator | 6167778c36c2295e36199ac0d4d256a4a0c28d7a | [
"MIT"
] | 4 | 2020-12-18T23:10:09.000Z | 2021-04-02T13:03:12.000Z | import React, { useState, useEffect } from "react";
import Backdrop from '@material-ui/core/Backdrop';
import CircularProgress from '@material-ui/core/CircularProgress';
import { makeStyles } from '@material-ui/core/styles';
import { useDispatch, useSelector } from 'react-redux';
import withReducer from 'app/store/withReducer';
import reducer from './store';
import { initialState } from './store/loadingSlice';
const useStyles = makeStyles(theme => ({
backdrop: {
zIndex: theme.zIndex.drawer + 1,
color: '#fff',
},
}));
const Loading = () => {
const classes = useStyles();
// const openBackdrop = initialState.loading
const openBackdrop = useSelector(({ loading }) => {
return loading.loading.loading
});
// const [openBackdrop, setOpenBackdrop] = React.useState(true);
// const handleBackdropClose = () => {
// setOpenBackdrop(false);
// };
// const handleToggle = () => {
// setOpenBackdrop(true);
// };
return (
<div>
<Backdrop className={classes.backdrop} open={openBackdrop} >
<CircularProgress color="inherit" />
</Backdrop>
</div>
)
}
export default withReducer('loading', reducer)(Loading); | 28.55 | 66 | 0.688266 |
de2c66337e5d0be992e575dbf75740ac1db0a418 | 1,886 | js | JavaScript | src/players/Wistia.js | yashatgit/react-player | 23c9faf163a9ab8770ec2e3edcd2ca1b488bbe92 | [
"MIT"
] | null | null | null | src/players/Wistia.js | yashatgit/react-player | 23c9faf163a9ab8770ec2e3edcd2ca1b488bbe92 | [
"MIT"
] | null | null | null | src/players/Wistia.js | yashatgit/react-player | 23c9faf163a9ab8770ec2e3edcd2ca1b488bbe92 | [
"MIT"
] | null | null | null | import React, { Component } from 'react'
import { callPlayer, getSDK } from '../utils'
const SDK_URL = '//fast.wistia.com/assets/external/E-v1.js'
const SDK_GLOBAL = 'Wistia'
const MATCH_URL = /(?:wistia.com|wi.st)\/(?:medias|embed)\/(.*)$/
export default class Wistia extends Component {
static displayName = 'Wistia'
static canPlay = url => MATCH_URL.test(url)
static loopOnEnded = true
callPlayer = callPlayer
getID (url) {
return url && url.match(MATCH_URL)[1]
}
load (url) {
const { controls, onReady, onPlay, onPause, onSeek, onEnded, config } = this.props
getSDK(SDK_URL, SDK_GLOBAL).then(() => {
window._wq = window._wq || []
window._wq.push({
id: this.getID(url),
options: {
controlsVisibleOnLoad: controls,
...config.wistia.options
},
onReady: player => {
this.player = player
this.player.bind('play', onPlay)
this.player.bind('pause', onPause)
this.player.bind('seek', onSeek)
this.player.bind('end', onEnded)
onReady()
}
})
})
}
play () {
this.callPlayer('play')
}
pause () {
this.callPlayer('pause')
}
stop () {
this.callPlayer('remove')
}
seekTo (seconds) {
this.callPlayer('time', seconds)
}
setVolume (fraction) {
this.callPlayer('volume', fraction)
}
setPlaybackRate (rate) {
this.callPlayer('playbackRate', rate)
}
getDuration () {
return this.callPlayer('duration')
}
getCurrentTime () {
return this.callPlayer('time')
}
getSecondsLoaded () {
return null
}
render () {
const id = this.getID(this.props.url)
const className = `wistia_embed wistia_async_${id}`
const style = {
width: '100%',
height: '100%'
}
return (
<div key={id} className={className} style={style} />
)
}
}
| 24.179487 | 86 | 0.589608 |
de2ca8cae5a7156583ca3ff94434f27c9c5bf060 | 566 | js | JavaScript | minesearch/src/mine.js | ada6666-test/rect_minesearch | 17689b9fb201b5f9711fbcfd6cd914c40d6b3ca9 | [
"MIT"
] | 1 | 2022-02-07T14:51:19.000Z | 2022-02-07T14:51:19.000Z | minesearch/src/mine.js | ada6666-test/rect_minesearch | 17689b9fb201b5f9711fbcfd6cd914c40d6b3ca9 | [
"MIT"
] | null | null | null | minesearch/src/mine.js | ada6666-test/rect_minesearch | 17689b9fb201b5f9711fbcfd6cd914c40d6b3ca9 | [
"MIT"
] | 2 | 2022-02-03T21:55:12.000Z | 2022-02-07T14:51:32.000Z |
import React from 'react';
import ReactDOM from 'react-dom';
class Mine extends React.Component {
// constructor(props) {
// super(props);
// this.state {
// test: 'test',
// };
// }
constructor() {
super();
}
render() {
return (
<>
</>
// <div className="Mine">
// <button className="Mine">
// {this.props.value}
// </button>
// </div>
);
}
}
export default Mine; | 18.258065 | 40 | 0.392226 |
de2d12deeb0a72a9ee4808faa6a4c7cbd36c7e25 | 2,336 | js | JavaScript | build/src/lib/Orderbook.js | vgulyakin/gdax-tt | b2fe6815fd46ae0e4993c88813cb014f4a31aff0 | [
"Apache-2.0"
] | null | null | null | build/src/lib/Orderbook.js | vgulyakin/gdax-tt | b2fe6815fd46ae0e4993c88813cb014f4a31aff0 | [
"Apache-2.0"
] | null | null | null | build/src/lib/Orderbook.js | vgulyakin/gdax-tt | b2fe6815fd46ae0e4993c88813cb014f4a31aff0 | [
"Apache-2.0"
] | null | null | null | "use strict";
/***************************************************************************************************************************
* @license *
* Copyright 2017 Coinbase, Inc. *
* *
* 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. *
***************************************************************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });
const bintrees_1 = require("bintrees");
const types_1 = require("./types");
function PriceLevelFactory(price, size, side) {
const p = types_1.Big(price);
const s = types_1.Big(size);
return {
price: p,
totalSize: s,
orders: [{
id: p.toString(),
price: p,
size: s,
side: side
}]
};
}
exports.PriceLevelFactory = PriceLevelFactory;
function PriceTreeFactory() {
return new bintrees_1.RBTree((a, b) => a.price.comparedTo(b.price));
}
exports.PriceTreeFactory = PriceTreeFactory;
//# sourceMappingURL=Orderbook.js.map | 63.135135 | 125 | 0.375 |
de2d534ed37027f22961db751ac0306aabc7db3b | 385 | js | JavaScript | src/utils/convert-abstracts-to-html.js | tbetous/gridsome-source-conference-hall | 4dcfc6043ba287f6e131f6eb9bfc1ad163cc43f1 | [
"MIT"
] | 4 | 2020-01-09T13:43:59.000Z | 2020-01-09T16:25:32.000Z | src/utils/convert-abstracts-to-html.js | tbetous/gridsome-source-conference-hall | 4dcfc6043ba287f6e131f6eb9bfc1ad163cc43f1 | [
"MIT"
] | 1 | 2021-05-10T23:41:59.000Z | 2021-05-10T23:41:59.000Z | src/utils/convert-abstracts-to-html.js | tbetous/gridsome-source-conference-hall | 4dcfc6043ba287f6e131f6eb9bfc1ad163cc43f1 | [
"MIT"
] | null | null | null | const showdown = require('showdown')
/**
* Convert event abstracts from markdown to html
* @param {*} event
*/
const convertAbstractsToHtml = event => {
const converter = new showdown.Converter()
return {
...event,
talks: event.talks.map(talk => ({
...talk,
abstract: converter.makeHtml(talk.abstract)
}))
}
}
module.exports = convertAbstractsToHtml
| 20.263158 | 49 | 0.654545 |
de2db8c28c9840bcbcc2f5865c117351335856ca | 2,693 | js | JavaScript | node_modules/angular2/es6/prod/examples/router/ts/on_deactivate/on_deactivate_example.js | Ttommeke/ITalentIAmTom | 706ab1d2c8667b326218081166534cb793ebcb69 | [
"CC0-1.0"
] | 1 | 2016-07-01T07:57:31.000Z | 2016-07-01T07:57:31.000Z | node_modules/angular2/es6/prod/examples/router/ts/on_deactivate/on_deactivate_example.js | Ttommeke/ITalentIAmTom | 706ab1d2c8667b326218081166534cb793ebcb69 | [
"CC0-1.0"
] | null | null | null | node_modules/angular2/es6/prod/examples/router/ts/on_deactivate/on_deactivate_example.js | Ttommeke/ITalentIAmTom | 706ab1d2c8667b326218081166534cb793ebcb69 | [
"CC0-1.0"
] | null | null | null | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { Component, Injectable, provide } from 'angular2/core';
import { bootstrap } from 'angular2/platform/browser';
import { RouteConfig, ROUTER_DIRECTIVES, APP_BASE_HREF } from 'angular2/router';
let LogService = class LogService {
constructor() {
this.logs = [];
}
addLog(message) { this.logs.push(message); }
};
LogService = __decorate([
Injectable(),
__metadata('design:paramtypes', [])
], LogService);
// #docregion routerOnDeactivate
let MyCmp = class MyCmp {
constructor(logService) {
this.logService = logService;
}
routerOnDeactivate(next, prev) {
this.logService.addLog(`Navigating from "${prev ? prev.urlPath : 'null'}" to "${next.urlPath}"`);
}
};
MyCmp = __decorate([
Component({ selector: 'my-cmp', template: `<div>hello</div>` }),
__metadata('design:paramtypes', [LogService])
], MyCmp);
// #enddocregion
let AppCmp = class AppCmp {
constructor(logService) {
this.logService = logService;
}
};
AppCmp = __decorate([
Component({
selector: 'example-app',
template: `
<h1>My App</h1>
<nav>
<a [routerLink]="['/HomeCmp']" id="home-link">Navigate Home</a> |
<a [routerLink]="['/ParamCmp', {param: 1}]" id="param-link">Navigate with a Param</a>
</nav>
<router-outlet></router-outlet>
<div id="log">
<h2>Log:</h2>
<p *ngFor="#logItem of logService.logs">{{ logItem }}</p>
</div>
`,
directives: [ROUTER_DIRECTIVES]
}),
RouteConfig([
{ path: '/', component: MyCmp, name: 'HomeCmp' },
{ path: '/:param', component: MyCmp, name: 'ParamCmp' }
]),
__metadata('design:paramtypes', [LogService])
], AppCmp);
export function main() {
return bootstrap(AppCmp, [
provide(APP_BASE_HREF, { useValue: '/angular2/examples/router/ts/on_deactivate' }),
LogService
]);
}
| 37.929577 | 151 | 0.600817 |
de2def052da1094341e50d80c088cf7f59aec95f | 578 | js | JavaScript | src/components/snake/Head.js | zhiying038/segp-react-native | e21a578cd783db29fbc3a2b86f724d6b2742723c | [
"MIT"
] | null | null | null | src/components/snake/Head.js | zhiying038/segp-react-native | e21a578cd783db29fbc3a2b86f724d6b2742723c | [
"MIT"
] | 3 | 2022-02-13T12:56:29.000Z | 2022-02-27T04:30:31.000Z | src/components/snake/Head.js | zhiying038/segp-react-native | e21a578cd783db29fbc3a2b86f724d6b2742723c | [
"MIT"
] | 2 | 2021-04-02T07:53:36.000Z | 2021-04-15T08:19:14.000Z | /*
Code written by group 7A
*/
import React, { Component } from "react";
import { View } from "react-native";
export default class Head extends Component {
constructor(props) {
super(props);
}
render() {
const x = this.props.position[0];
const y = this.props.position[1];
return (
<View
style={{
width: this.props.size,
height: this.props.size,
backgroundColor: "red",
position: "absolute",
left: x * this.props.size,
top: y * this.props.size,
}}
/>
);
}
}
| 18.645161 | 45 | 0.541522 |
de2f54e0e1b962b56dc020fb80e6d8724802dced | 1,696 | js | JavaScript | helpers/resolveImportCall.js | edonet/babel-plugin-transform-style-import | cc0553ac441a6ad8db2be94fcb36954233e05d20 | [
"MIT"
] | null | null | null | helpers/resolveImportCall.js | edonet/babel-plugin-transform-style-import | cc0553ac441a6ad8db2be94fcb36954233e05d20 | [
"MIT"
] | 1 | 2021-05-10T01:16:31.000Z | 2021-05-10T01:16:31.000Z | helpers/resolveImportCall.js | edonet/babel-plugin-transform-style-import | cc0553ac441a6ad8db2be94fcb36954233e05d20 | [
"MIT"
] | null | null | null | /**
*****************************************
* Created by edonet@163.com
* Created on 2019-07-24 11:34:21
*****************************************
*/
'use strict';
/**
*****************************************
* 加载依赖
*****************************************
*/
const { STYLED_IDENT, IGNORE_SIGN } = require('./match');
const resolveCallExpr = require('./resolveCallExpr');
/**
*****************************************
* 查找属性标识
*****************************************
*/
function findStyledIdent(node) {
if (node.type === 'ObjectPattern') {
return node.properties.find(prop => prop.key && prop.key.name === STYLED_IDENT);
}
}
/**
*****************************************
* 判断是否样式化
*****************************************
*/
function isUseStyled(parent, parentPath) {
let type = parent.type;
// 处理赋值表达式
if (type === 'VariableDeclarator') {
return false;
}
// 处理【await】表达式
if (type === 'AwaitExpression') {
let sup = parentPath.parent;
// 处理【await】赋值表达式;
if (sup.type === 'VariableDeclarator') {
return findStyledIdent(sup.id);
}
// 匹配失败
return sup.type === 'ExpressionStatement' ? IGNORE_SIGN : false;
}
// 匹配【then】调用
if (type === 'MemberExpression' && parent.property.name === 'then') {
let argv = parentPath.parent.arguments[0],
param = argv && argv.params && argv.params[0];
// 解析参数传值
return param ? findStyledIdent(param) : IGNORE_SIGN;
}
}
/**
*****************************************
* 解析动态加载语句
*****************************************
*/
module.exports = resolveCallExpr(isUseStyled);
| 22.918919 | 88 | 0.432783 |
de2f5ce6f80953fefe6d3f77accbc265327aabd8 | 234 | js | JavaScript | client/src/components/Landing/Landing.js | vivekmalva/audit-review-tool | 3bd73808bb17acbec3f6311f1713876269793bed | [
"MIT"
] | null | null | null | client/src/components/Landing/Landing.js | vivekmalva/audit-review-tool | 3bd73808bb17acbec3f6311f1713876269793bed | [
"MIT"
] | 1 | 2021-05-11T12:25:45.000Z | 2021-05-11T12:25:45.000Z | client/src/components/Landing/Landing.js | vivekmalva/audit-review-tool | 3bd73808bb17acbec3f6311f1713876269793bed | [
"MIT"
] | null | null | null | import React from 'react';
const Landing = () => {
return (
<div style={{ textAlign: 'center' }}>
<h1>
Audit Review Tool
</h1>
<p>A project auditing tool</p>
</div>
);
};
export default Landing; | 16.714286 | 41 | 0.534188 |
de2f67945adad71153bf304aa9c668d7b3a7058a | 9,370 | js | JavaScript | scripts/report.js | rcsb/mmtf-javascript | 4710d805a1543a8016537481510175332e8ed582 | [
"MIT"
] | 10 | 2016-03-31T22:29:11.000Z | 2018-12-05T19:08:28.000Z | scripts/report.js | rcsb/mmtf-javascript | 4710d805a1543a8016537481510175332e8ed582 | [
"MIT"
] | 13 | 2016-04-13T23:53:57.000Z | 2020-02-21T15:11:49.000Z | scripts/report.js | rcsb/mmtf-javascript | 4710d805a1543a8016537481510175332e8ed582 | [
"MIT"
] | 5 | 2016-12-05T07:58:45.000Z | 2020-12-05T05:26:56.000Z |
require('es6-object-assign').polyfill();
var fs = require('fs');
var request = require('request');
var http = require('http');
var now = require("performance-now");
var Promise = require('promise');
var csvWriter = require('csv-write-stream');
var ArgumentParser = require('argparse').ArgumentParser;
var Queue = require('./lib/queue');
var io = require('./lib/io');
var mmtf = require('./lib/mmtf');
//
function getSummary (data, params) {
var t0 = now();
var p = Object.assign({}, params);
return mmtf.decodeMsgpack(data).then(function(decodedMsgpack){
var t1 = now();
return mmtf.decodeMmtf(decodedMsgpack).then(function(decodedMmtf){
var t2 = now();
var md = decodedMmtf;
if(p.storeMmtf){
io.writeBinary(md.structureId + ".mmtf", data);
}
if(p.storeJson){
io.writeMmtfJson(md.structureId + ".json", decodedMmtf);
}
if(p.storeJsonEncoded){
io.writeEncodedMmtfJson(md.structureId + ".encoded.json", decodedMsgpack)
}
return {
decodeMsgpackMs: t1-t0,
decodeMmtfMs: t2-t1,
numBonds: md.numBonds,
numAtoms: md.numAtoms,
numGroups: md.numGroups,
numChains: md.numChains,
numModels: md.numModels,
};
});
});
}
function getFileSummary (file, params) {
var t0 = now();
return io.readFile(file).then(function(data){
var t1 = now();
return getSummary(data, params).then(function(summary){
summary.readFileMs = t1-t0;
return summary;
});
});
}
function getUrlSummary (url, params) {
var t0 = now();
return io.loadUrl(url, params).then(function(data){
var t1 = now();
return getSummary(data, params).then(function(summary){
summary.loadUrlMs = t1-t0;
return summary;
});
});
}
function getPdbidSummary(pdbid, params){
var url = mmtf.FULL_URL + pdbid;
return getUrlSummary(url, params);
}
function combineSummaryList(list){
var combinedSummary = {
decodeMsgpackMs: 0,
decodeMmtfMs: 0,
readFileMs: 0,
loadUrlMs: 0,
numBonds: 0,
numAtoms: 0,
numGroups: 0,
numChains: 0,
numModels: 0
};
list.forEach(function(summary){
for (var name in combinedSummary) {
if (summary[ name ]!==undefined) {
combinedSummary[ name ] += summary[ name ];
}
}
});
if(combinedSummary.readFileMs===0) delete combinedSummary.readFileMs;
if(combinedSummary.loadUrlMs===0) delete combinedSummary.loadUrlMs;
return combinedSummary;
}
function getRandomPdbidList( count, list ){
var pdbidList;
if( count === 0 || count === true || count === "all" || count === list.length ){
pdbidList = list;
}else{
pdbidList = [];
for( var i = 0; i < count; ++i ){
var index = Math.floor( Math.random() * list.length );
pdbidList.push( list[ index ] );
}
}
return pdbidList;
}
function loadPdbidList(){
return new Promise(function (resolve, reject) {
var options = {
url: "http://www.rcsb.org/pdb/json/getCurrent",
json:true
}
request.get(options, function(err, response, body){
if(err){
reject(err);
}else{
resolve(body.idList);
}
});
});
}
function getListSummary( list, promiseFn, params ){
var t0 = now();
var p = Object.assign({}, params);
var summaryPath = p.summaryPath || 'summary.txt';
var errorPath = p.errorPath || 'error.txt';
var reportPath = p.reportPath || 'report.csv';
var printFrequency = p.printFrequency!==0 ? 1000 : false;
var chunkSize = p.chunkSize || 100;
return new Promise(function (resolve, reject) {
var summaryList = [];
var reportFile = csvWriter();
reportFile.pipe(fs.createWriteStream(reportPath));
var errorFile = fs.createWriteStream(errorPath);
var summaryFile = fs.createWriteStream(summaryPath);
var count = 0;
var failCount = 0;
var successCount = 0;
var chunkList = [];
for( var i = 0, il = list.length; i < il; i += chunkSize ){
chunkList.push( i );
}
var queue = new Queue( function( start, callback ){
var listChunk = list.slice( start, start + chunkSize );
Promise.all(listChunk.map(function(value){
return promiseFn(value, params).then(function(summary){
count += 1;
successCount += 1;
summaryList.push(summary);
reportFile.write(Object.assign({id: value}, summary));
if(printFrequency!==false && count % printFrequency === 0){
console.log([value, count, now()-t0]);
}
}).catch(function(err){
count += 1;
failCount += 1;
errorFile.write("[" + value + "] " + err + "\n");
});
})).then( function(){
if( queue.length() === 0 ){
var summary = combineSummaryList(summaryList);
summary.overallMs = now()-t0;
summary.failCount = failCount;
summary.successCount = successCount;
for (var name in summary) {
summaryFile.write(name + ": " + summary[name] + "\n");
}
reportFile.end();
errorFile.end();
summaryFile.end();
resolve(summary);
}
callback();
}).catch(function(err){
reportFile.end();
errorFile.end();
summaryFile.end();
throw err;
callback();
});
}, chunkList );
});
}
function getFileListSummary( fileList, params ){
var t0 = now();
var p = Object.assign({}, params);
return getListSummary(fileList, getFileSummary, p);
}
function getUrlListSummary( urlList, params ){
var p = Object.assign({}, params);
var pool = new http.Agent();
pool.maxSockets = 5;
pool.maxFreeSockets = 5;
p.pool = pool;
return getListSummary(urlList, getUrlSummary, p);
}
function getPdbidListSummary( pdbidList, params ){
var p = Object.assign({}, params);
var pool = new http.Agent();
pool.maxSockets = 5;
pool.maxFreeSockets = 5;
p.pool = pool;
return getListSummary(pdbidList, getPdbidSummary, p);
}
//
var parser = new ArgumentParser({
version: '0.0.2',
addHelp:true,
description: 'Get MMTF files, decode them and report back statistics. Optionally store them.'
});
parser.addArgument( '--file', {
help: 'file path',
nargs: "*"
});
parser.addArgument( '--url', {
help: 'url',
nargs: "*"
});
parser.addArgument('--pdbid', {
help: 'list of pdb ids',
nargs: "*"
});
parser.addArgument( '--archive', {
help: 'number of pdb ids, 0 for all',
type: parseInt
});
parser.addArgument( '--timeout', {
help: 'timeout in ms for url requests (default: 1000)',
defaultValue: 1000,
type: parseInt
});
parser.addArgument( '--chunkSize', {
help: 'number of concurrent elements in processing queue; to get accurate download numbers, set to 1 (default: 100)',
defaultValue: 100,
type: parseInt
});
parser.addArgument( '--printFrequency', {
help: 'frequency of messages to the console (default: 1000)',
defaultValue: 1000,
type: parseInt
});
parser.addArgument( '--printSummary', {
help: 'print summary on finish',
action: "storeTrue"
});
parser.addArgument( '--storeMmtf', {
help: 'store as binary "$structureId.mmtf"',
action: "storeTrue"
});
parser.addArgument( '--storeJson', {
help: 'store as decoded "$structureId.json"',
action: "storeTrue"
});
parser.addArgument( '--storeJsonEncoded', {
help: 'store as encoded "$structureId.encoded.json"',
action: "storeTrue"
});
parser.addArgument( '--summaryPath', {
help: 'path and name for the summary file (default: summary.txt)',
defaultValue: 'summary.txt'
});
parser.addArgument( '--errorPath', {
help: 'path and name for the error file (default: error.txt)',
defaultValue: 'error.txt'
});
parser.addArgument( '--reportPath', {
help: 'path and name for the report file (default: report.csv)',
defaultValue: 'report.csv'
});
var args = parser.parseArgs();
//
function printSummary (summary) {
if(args.printSummary) console.log(summary);
}
if (args.file!==null) {
getFileListSummary(args.file, args).then(printSummary);
}
if (args.url!==null) {
getUrlListSummary(args.url, args).then(printSummary);
}
if (args.pdbid!==null) {
getPdbidListSummary(args.pdbid, args).then(printSummary);
}
if (args.archive!==null) {
loadPdbidList().then(function(_pdbidList){
var pdbidList = getRandomPdbidList(args.archive, _pdbidList);
return getPdbidListSummary(pdbidList, args).then(printSummary);
});
}
| 30.422078 | 121 | 0.565848 |
de308e7d84d762eebf227ce4fa9d13973fd0c62b | 2,122 | js | JavaScript | src/components/layout.js | le-dawg/dhumantech-v1-b | ccfc00262bfc833a3c4563e3f2b497f955a7c8d0 | [
"MIT"
] | null | null | null | src/components/layout.js | le-dawg/dhumantech-v1-b | ccfc00262bfc833a3c4563e3f2b497f955a7c8d0 | [
"MIT"
] | null | null | null | src/components/layout.js | le-dawg/dhumantech-v1-b | ccfc00262bfc833a3c4563e3f2b497f955a7c8d0 | [
"MIT"
] | null | null | null | import React, { Component } from "react";
import { Link } from "gatsby"
import { ThemeToggler } from "gatsby-plugin-dark-mode"
import LogoImg from '../../static/logo.svg';
class Layout extends Component {
render() {
const { title, children} = this.props
const toggler = (
<div className="toggler">
<ThemeToggler>{({ theme, toggleTheme }) => (
<label className="tog">
<input
type="checkbox"
onChange={e =>
toggleTheme(e.target.checked ? "dark" : "light")
}
checked={theme === "dark"}
className="tog-checkbox"
/>
{theme === "dark" ? (
<div className="tog-text">
Light
</div>
) : (
<div className="tog-text">
Dark
</div>
)}
</label>
)}</ThemeToggler>
</div>
)
return (
<div className="site-container">
<div className="header-container">
<Link
className="header-title"
to={`/`}
>
<object type="image/svg+xml" data={LogoImg} class="logo">DAWG on tech</object>
</Link>
<div className="nav-container">
<ul className="header-nav">
<li id="header-nav-first"><Link to={`/tags`}>Tags</Link></li>
<li><Link to={`/search`}>Search</Link></li>
<li>{toggler}</li>
</ul>
<ul className="header-link">
<li><a href="https://github.com/" target="_blank" rel="noopener noreferrer">GitHub</a></li>
<li><a href="https://www.linkedin.com/" target="_blank" rel="noopener noreferrer">LinkedIn</a></li>
</ul>
</div>
</div>
<main>{children}</main>
<footer className="footer-copyright">
© {new Date().getFullYear()} {title}, Built with
{` `}
<a className="footer-gatsby" href="https://www.gatsbyjs.org">Gatsby</a>
</footer>
</div>
)
}
}
export default Layout
| 31.205882 | 113 | 0.48115 |
de30b7ce37aadeb9bfa4d87f4a480c7e3e390fd3 | 4,610 | js | JavaScript | awx/ui_next/src/screens/Setting/Subscription/SubscriptionEdit/SubscriptionModal.test.js | philipsd6/awx | 6715b886335fdb9ea80c14601e3788d192f7dafa | [
"Apache-2.0"
] | null | null | null | awx/ui_next/src/screens/Setting/Subscription/SubscriptionEdit/SubscriptionModal.test.js | philipsd6/awx | 6715b886335fdb9ea80c14601e3788d192f7dafa | [
"Apache-2.0"
] | 10 | 2021-03-05T22:57:15.000Z | 2021-05-26T10:16:18.000Z | awx/ui_next/src/screens/Setting/Subscription/SubscriptionEdit/SubscriptionModal.test.js | paulo-amaral/awx | 872513617ed8da9661e0bd3aaba88d628e00d675 | [
"Apache-2.0"
] | null | null | null | import React from 'react';
import { act } from 'react-dom/test-utils';
import { ConfigAPI } from 'api';
import {
mountWithContexts,
waitForElement,
} from '../../../../../testUtils/enzymeHelpers';
import SubscriptionModal from './SubscriptionModal';
jest.mock('../../../../api');
describe('<SubscriptionModal />', () => {
let wrapper;
const onConfirm = jest.fn();
const onClose = jest.fn();
beforeAll(async () => {
ConfigAPI.readSubscriptions = async () => ({
data: [
{
subscription_name: 'mock A',
instance_count: 100,
license_date: 1714000271,
pool_id: 7,
},
{
subscription_name: 'mock B',
instance_count: 200,
license_date: 1714000271,
pool_id: 8,
},
{
subscription_name: 'mock C',
instance_count: 30,
license_date: 1714000271,
pool_id: 9,
},
],
});
await act(async () => {
wrapper = mountWithContexts(
<SubscriptionModal
subscriptionCreds={{
username: 'admin',
password: '$encrypted',
}}
onConfirm={onConfirm}
onClose={onClose}
/>
);
await waitForElement(wrapper, 'ContentLoading', el => el.length === 0);
});
});
afterAll(() => {
jest.clearAllMocks();
});
test('initially renders without crashing', async () => {
expect(wrapper.find('SubscriptionModal').length).toBe(1);
});
test('should render header', async () => {
wrapper.update();
const header = wrapper
.find('tr')
.first()
.find('th');
expect(header.at(0).text()).toEqual('');
expect(header.at(1).text()).toEqual('Name');
expect(header.at(2).text()).toEqual('Managed nodes');
expect(header.at(3).text()).toEqual('Expires');
});
test('should render subscription rows', async () => {
const rows = wrapper.find('tbody tr');
expect(rows).toHaveLength(3);
const firstRow = rows.at(0).find('td');
expect(firstRow.at(0).find('input[type="radio"]')).toHaveLength(1);
expect(firstRow.at(1).text()).toEqual('mock A');
expect(firstRow.at(2).text()).toEqual('100');
expect(firstRow.at(3).text()).toEqual('4/24/2024, 11:11:11 PM');
});
test('submit button should call onConfirm', async () => {
expect(
wrapper.find('Button[aria-label="Confirm selection"]').prop('isDisabled')
).toBe(true);
await act(async () => {
wrapper
.find('SubscriptionModal SelectColumn')
.first()
.invoke('onSelect')();
});
wrapper.update();
expect(
wrapper.find('Button[aria-label="Confirm selection"]').prop('isDisabled')
).toBe(false);
expect(onConfirm).toHaveBeenCalledTimes(0);
expect(onClose).toHaveBeenCalledTimes(0);
await act(async () =>
wrapper.find('Button[aria-label="Confirm selection"]').prop('onClick')()
);
expect(onConfirm).toHaveBeenCalledTimes(1);
expect(onClose).toHaveBeenCalledTimes(1);
});
test('should show empty content', async () => {
await act(async () => {
wrapper = mountWithContexts(
<SubscriptionModal
subscriptionCreds={{
username: null,
password: null,
}}
/>
);
await waitForElement(wrapper, 'ContentEmpty', el => el.length === 1);
});
});
test('should auto-select current selected subscription', async () => {
await act(async () => {
wrapper = mountWithContexts(
<SubscriptionModal
subscriptionCreds={{
username: 'admin',
password: '$encrypted',
}}
selectedSubscription={{
pool_id: 8,
}}
/>
);
await waitForElement(wrapper, 'table');
expect(wrapper.find('tr[id=7] input').prop('checked')).toBe(false);
expect(wrapper.find('tr[id=8] input').prop('checked')).toBe(true);
expect(wrapper.find('tr[id=9] input').prop('checked')).toBe(false);
});
});
test('should display error detail message', async () => {
ConfigAPI.readSubscriptions = jest.fn();
ConfigAPI.readSubscriptions.mockRejectedValueOnce(new Error());
await act(async () => {
wrapper = mountWithContexts(
<SubscriptionModal
subscriptionCreds={{
username: 'admin',
password: '$encrypted',
}}
/>
);
});
await waitForElement(wrapper, 'ContentLoading', el => el.length === 0);
await waitForElement(wrapper, 'ErrorDetail', el => el.length === 1);
});
});
| 28.993711 | 79 | 0.566594 |
de324f4c296ef4849b560d0dae69e459e5771fda | 337 | js | JavaScript | arrays/array.js | luanmarques1789/javascript-fundaments | 643ada2c1115185cc7d864b552571bfaf68b2c32 | [
"MIT"
] | null | null | null | arrays/array.js | luanmarques1789/javascript-fundaments | 643ada2c1115185cc7d864b552571bfaf68b2c32 | [
"MIT"
] | null | null | null | arrays/array.js | luanmarques1789/javascript-fundaments | 643ada2c1115185cc7d864b552571bfaf68b2c32 | [
"MIT"
] | null | null | null | let arr = [5, 6, 9, 4];
let aux = [10, 5, 6, 3];
console.log(`Array: ${arr}\nArray's length: ${arr.length}`);
console.log(`\nNew length: ${arr.length}`);
arr.sort();
console.log(arr);
console.log(typeof arr);
for (const value of arr) {
console.log(value);
}
let value = 10;
console.log(`Index of ${value}: ${arr.indexOf(value)}`);
| 19.823529 | 60 | 0.620178 |
de32876007a276d2cb049aed82fd12fa7193ad38 | 3,125 | js | JavaScript | dijit/geoenrichment/ReportPlayer/core/charts/utils/builder/columnBarLine/ColumnBarLineChartBuilder.js | kataya/arcgis-js-api | a311577dade6dcb3b77c40c5bc70d218895e635e | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | dijit/geoenrichment/ReportPlayer/core/charts/utils/builder/columnBarLine/ColumnBarLineChartBuilder.js | kataya/arcgis-js-api | a311577dade6dcb3b77c40c5bc70d218895e635e | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | dijit/geoenrichment/ReportPlayer/core/charts/utils/builder/columnBarLine/ColumnBarLineChartBuilder.js | kataya/arcgis-js-api | a311577dade6dcb3b77c40c5bc70d218895e635e | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | // COPYRIGHT © 2021 Esri
//
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
//
// This material is licensed for use under the Esri Master License
// Agreement (MLA), and is bound by the terms of that agreement.
// You may redistribute and use this code without modification,
// provided you adhere to the terms of the MLA and include this
// copyright notice.
//
// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
//
// For additional information, contact:
// Environmental Systems Research Institute, Inc.
// Attn: Contracts and Legal Services Department
// 380 New York Street
// Redlands, California, USA 92373
// USA
//
// email: contracts@esri.com
//
// See http://js.arcgis.com/3.37/esri/copyright.txt for details.
define(["dojo/_base/lang","dojo/_base/declare","../../ChartTypes","../../ChartDataLabelsTypes","../../plots/ClusteredColumns","../../plots/StackedColumns","../../plots/ClusteredBars","../../plots/StackedBars","../../plots/PictureClusteredColumns","../../plots/PictureClusteredBars","../../plots/Lines","../../plots/StackedLines","../../plots/Areas","../../plots/StackedAreas","../../plots/_TouchPlotEvents","../utils/ChartDataLabelBuilder","../ChartPlots","./_ColumnBarLineChartSeriesCalculator","./_ColumnBarLineChartGridPlotBuilder","./_ComparisonUtil","./_BarSizeCalculator","./_AxisBuilder","./_PointLabelUtil"],(function(e,a,t,r,i,l,s,o,n,c,d,u,p,C,P,m,h,f,y,b,L,S,_){return{configureChart:function(e){var a=e.chart,t=e.visualProperties,r=e.chartType,i=e.themeSettings,l=e.viewModel;_.createPointToLabelMap(a),this._addPrimaryPlot(e),this._addSecondaryPlot(e),this._configureBackgroundGridPlot(e),a.addAxis("x",S.createXAxis(null,t,r,i,l,a)),a.addAxis("y",S.createYAxis(null,t,r,i,l,a))},_configureBackgroundGridPlot:function(e){return y.configureBackgroundGridPlot(e)},_getLabelsParams:function(e){var a=r.hasLabel(e.dataLabels),t=r.hasValue(e.dataLabels),i=r.hasPercent(e.dataLabels),l=e.dataLabelsInside?"inside":"outside";return a||t||i?{labels:!0,labelStyle:l,labelOffset:5,labelFunc:function(a){return m.formatDataLabel(a,e)}}:null},_addPrimaryPlot:function(r){var m=r.chart,f=r.visualProperties,y=r.chartType,b=r.viewModel,L=this._getLabelsParams(f),S=b.isAnimationAllowed()?{animate:!0}:null;function _(e){e.type=a([e.type,P]),m.addPlot(h.PRIMARY,e)}switch(y){case t.COLUMN:_(e.mixin({type:f.isStacked?l:i},L,S));break;case t.BAR:_(e.mixin({type:f.isStacked?o:s},L,S));break;case t.LINE:case t.VERTICAL_LINE:_(e.mixin({type:f.fillLineArea?f.isStacked?C:p:f.isStacked?u:d,markers:b.isGraphicStyle},S));break;case t.PICTURE_COLUMN:_(e.mixin({type:n},L,S));break;case t.PICTURE_BAR:_(e.mixin({type:c},L,S))}},_addSecondaryPlot:function(t){var r=t.chart,i=t.chartType,l=t.comparisonInfo;l&&!b.isComparisonInPrimaryPlot(i,l)&&(r.addPlot(h.SECONDARY,e.mixin({type:a([d,P]),markers:!0})),r.movePlotToFront(h.SECONDARY))},updateBarSize:function(e){L.updateBarSize(e)},prettifyColumnBarYAxis:function(e){f.prettifyColumnBarYAxis(e)},calcSeries:function(e){return f.calcSeries(e)}}})); | 125 | 2,288 | 0.74592 |
de330e6e535b404e3eb66cc8d8e416677aa6d60a | 5,462 | js | JavaScript | server/router/artist.js | silenceanddeep/ieaseMusic | a09864b41a28ed04ebec3ce822b391194c2ea2a2 | [
"MIT"
] | 9,922 | 2017-09-20T12:14:48.000Z | 2022-03-31T09:11:42.000Z | server/router/artist.js | silenceanddeep/ieaseMusic | a09864b41a28ed04ebec3ce822b391194c2ea2a2 | [
"MIT"
] | 413 | 2017-09-26T12:13:54.000Z | 2022-02-07T15:38:41.000Z | server/router/artist.js | silenceanddeep/ieaseMusic | a09864b41a28ed04ebec3ce822b391194c2ea2a2 | [
"MIT"
] | 1,259 | 2017-09-21T11:20:47.000Z | 2022-03-27T09:24:35.000Z |
import express from 'express';
import axios from 'axios';
import crypto from 'crypto';
import _debug from 'debug';
const debug = _debug('dev:api');
const error = _debug('dev:error');
const router = express();
// https://github.com/skyline75489/nmdown/blob/ee0f66448b6e64f8b9bdb2f7451a8d4ff63e14c4/cloudmusic/hasher.py
function id2url(id) {
var key = '3go8&$8*3*3h0k(2)2';
var keyCodes = Array.from(key).map((e, i) => key.charCodeAt(i));
var fidCodes = Array.from(id).map((e, i) => id.charCodeAt(i));
var hashCodes = [];
for (let i = 0; i < fidCodes.length; i++) {
let code = (fidCodes[i] ^ keyCodes[i % key.length]) & 0XFF;
hashCodes.push(code);
}
var string = hashCodes.map((e, i) => String.fromCharCode(hashCodes[i])).join('');
var md5 = crypto.createHash('md5').update(string).digest();
var result = Buffer.from(md5).toString('base64').replace(/\//g, '_').replace(/\+/g, '-');
return `https://p4.music.126.net/${result}/${id}.jpg?param=y177y177`;
}
async function getArtist(id) {
var profile = {};
var songs = [];
try {
let response = await axios.get(`/artists?id=${id}`);
let data = response.data;
if (data.code !== 200) {
throw data;
} else {
profile = data.artist;
profile = {
id: profile.id.toString(),
uid: profile.accountId,
name: profile.name,
background: profile.picUrl + '?param=640y300',
followed: profile.followed,
size: {
song: profile.musicSize,
mv: profile.mvSize,
album: profile.albumSize,
},
};
songs = data.hotSongs.map(e => {
// eslint-disable-next-line
var { al /* Album */, ar /* Artist */ } = e;
return {
id: e.id.toString(),
name: e.name,
duration: e.dt,
album: {
id: al.id.toString(),
name: al.name,
cover: id2url(al.pic_str),
link: `/player/1/${al.id}`
},
artists: ar.map(e => ({
id: e.id.toString(),
name: e.name,
// Broken link
link: e.id ? `/artist/${e.id}` : '',
}))
};
});
}
} catch (ex) {
error('Failed to get artist: %O', ex);
}
return {
profile,
playlist: {
id: profile.id.toString(),
name: `TOP 50 - ${profile.name}`,
size: 50,
songs,
}
};
}
async function getAlbums(id) {
var albums = [];
try {
let response = await axios.get(`/artist/album?id=${id}&limit=999`);
let data = response.data;
if (data.code !== 200) {
throw data;
} else {
albums = data.hotAlbums.map(e => ({
id: e.id.toString(),
name: e.name,
cover: e.picUrl,
link: `/player/1/${e.id}`,
publishTime: e.publishTime,
}));
}
} catch (ex) {
error('Failed to get albums: %O', ex);
}
return albums;
}
async function getSimilar(id) {
var similar = [];
try {
let response = await axios.get(`/simi/artist?id=${id}`);
let data = response.data;
if (data.code !== 200) {
throw data;
} else {
similar = data.artists.map(e => ({
id: e.id.toString(),
name: e.name,
avatar: e.picUrl,
publishTime: e.publishTime,
// Broken link
link: e.id ? `/artist/${e.id}` : '',
}));
}
} catch (ex) {
error('Failed to get similar artists: %O', ex);
}
return similar;
}
router.get('/unfollow/:id', async(req, res) => {
debug('Handle request for /artist/unfollow');
var id = req.params.id;
var success = false;
debug('Params \'id\': %s', id);
try {
let response = await axios.get(`/artist/sub/?id=${id}&&t=0`);
let data = response.data;
success = data.code === 200;
if (data.code !== 200) {
throw data;
}
} catch (ex) {
error('Failed to unfollow artist: %O', ex);
}
res.send({
success,
});
});
router.get('/follow/:id', async(req, res) => {
debug('Handle request for /artist/follow');
var id = req.params.id;
var success = false;
debug('Params \'id\': %s', id);
try {
let response = await axios.get(`/artist/sub/?id=${id}&&t=1`);
let data = response.data;
success = data.code === 200;
if (data.code !== 200) {
throw data;
}
} catch (ex) {
error('Failed to follow artist: %O', ex);
}
res.send({
success,
});
});
router.get('/:id', async(req, res) => {
debug('Handle request for /artist');
var id = req.params.id;
debug('Params \'id\': %s', id);
res.send({
...(await getArtist(id)),
albums: await getAlbums(id),
similar: await getSimilar(id),
});
});
module.exports = router;
| 25.643192 | 108 | 0.464299 |
de3368ce6059fd10d79611f4f5539273e195b7c6 | 726 | js | JavaScript | Commands/Sed.js | free4fun/hackspaceuyBot | 03d9e9a9d1f1394868e89feaf347aff546ff2147 | [
"MIT"
] | null | null | null | Commands/Sed.js | free4fun/hackspaceuyBot | 03d9e9a9d1f1394868e89feaf347aff546ff2147 | [
"MIT"
] | null | null | null | Commands/Sed.js | free4fun/hackspaceuyBot | 03d9e9a9d1f1394868e89feaf347aff546ff2147 | [
"MIT"
] | null | null | null | const Helpers = require("../lib/Helpers.js");
class Sed {
constructor(ircMsg, tgMsg, ircConfig, isEnabled) {
this.name = 'sed';
this._ircMsg = ircMsg;
this._tgMsg = tgMsg;
this.Enabled = isEnabled;
}
Exec(userMessage, username, isMaster, ircMsg, tgMsg) {
console.log(userMessage);
Helpers.MongoDBFindInCollection('log', username).then(function(items) {
if (items.length > 0) {
var text = items[0][username];
var res = text.replace(userMessage);
ircMsg(res);
tgMsg(res);
}
});
}
Help() {
var helpTxt = "!" + this.name+" <regex to apply to previous line>";
this._ircMsg(helpTxt);
this._tgMsg(helpTxt);
}
}
module.exports = Sed;
| 23.419355 | 75 | 0.608815 |
de337998ce779f04b2d6e351645c988865afbddb | 71 | js | JavaScript | src/middlewares/encode-json.js | ollelindeman/mappersmith | 2057ab66252d83fed0f113b88578d466f7ad78ed | [
"MIT"
] | 313 | 2015-01-16T21:59:35.000Z | 2022-03-25T05:13:03.000Z | src/middlewares/encode-json.js | ollelindeman/mappersmith | 2057ab66252d83fed0f113b88578d466f7ad78ed | [
"MIT"
] | 207 | 2015-01-06T18:29:44.000Z | 2022-03-16T09:55:54.000Z | src/middlewares/encode-json.js | ollelindeman/mappersmith | 2057ab66252d83fed0f113b88578d466f7ad78ed | [
"MIT"
] | 85 | 2015-04-13T09:49:55.000Z | 2022-02-03T15:12:07.000Z | export { default, CONTENT_TYPE_JSON } from '../middleware/encode-json'
| 35.5 | 70 | 0.760563 |
83aa51cf06aaf7cf766c98fd328480782ac15778 | 51 | js | JavaScript | 11-21/demo02/src/pages/Page8/index.js | ZiCo11/React-demo | d9a9694a6b676e28094f0d6e3e6e02bf00df9c0f | [
"MIT"
] | null | null | null | 11-21/demo02/src/pages/Page8/index.js | ZiCo11/React-demo | d9a9694a6b676e28094f0d6e3e6e02bf00df9c0f | [
"MIT"
] | null | null | null | 11-21/demo02/src/pages/Page8/index.js | ZiCo11/React-demo | d9a9694a6b676e28094f0d6e3e6e02bf00df9c0f | [
"MIT"
] | null | null | null | import Page8 from './Page8';
export default Page8;
| 17 | 28 | 0.745098 |
83ab6eb23eb3e4d1fd9eeace9c03ef62ff462eb8 | 432 | js | JavaScript | example/index.js | InnovativeTravel/react-stub-context | ae09110a5a172147adeaf3364defb1b4dc012f50 | [
"ISC"
] | null | null | null | example/index.js | InnovativeTravel/react-stub-context | ae09110a5a172147adeaf3364defb1b4dc012f50 | [
"ISC"
] | null | null | null | example/index.js | InnovativeTravel/react-stub-context | ae09110a5a172147adeaf3364defb1b4dc012f50 | [
"ISC"
] | 1 | 2022-03-20T08:07:14.000Z | 2022-03-20T08:07:14.000Z | var React = require('react');
var createStubbedContext = require('../dist');
var TestComponent = React.createClass({
render: function() { return React.DOM.h2(null, this.context.foo); }
});
var div = document.createElement('div');
var StubbedComponent = createStubbedContext(TestComponent, { foo: 'bar' });
var stubbedComponentElement = React.render(React.createElement(StubbedComponent), div);
document.body.appendChild(div);
| 30.857143 | 87 | 0.74537 |