text
stringlengths 3
1.05M
|
|---|
import errorHandler from '../../lib/error-handler'
import { cloneMock } from './mocks/entities'
import { describe, test } from 'mocha'
import { expect } from 'chai'
describe('A errorHandler', () => {
// Best case scenario where an error is a known and expected situation and the
// server returns an error with a JSON payload with all the information possible
test('Throws well formed error with details from server', async () => {
const error = cloneMock('error')
error.response.data = {
sys: {
id: 'SpecificError',
type: 'Error',
},
message: 'datamessage',
requestId: 'requestid',
details: 'errordetails',
}
try {
errorHandler(error)
} catch (err) {
const parsedMessage = JSON.parse(err.message)
expect(err.name).equals('SpecificError', 'error name')
expect(parsedMessage.request.url).equals('requesturl', 'request url')
expect(parsedMessage.message).equals('datamessage', 'error payload message')
expect(parsedMessage.requestId).equals('requestid', 'request id')
expect(parsedMessage.details).equals('errordetails', 'error payload details')
}
})
// Second best case scenario, where we'll still get a JSON payload from the server
// but only with an Unknown error type and no additional details
test('Throws unknown error received from server', async () => {
const error = cloneMock('error')
error.response.data = {
sys: {
id: 'Unknown',
type: 'Error',
},
requestId: 'requestid',
}
error.response.status = 500
error.response.statusText = 'Internal'
try {
errorHandler(error)
} catch (err) {
const parsedMessage = JSON.parse(err.message)
expect(err.name).equals('500 Internal', 'error name defaults to status code and text')
expect(parsedMessage.request.url).equals('requesturl', 'request url')
expect(parsedMessage.requestId).equals('requestid', 'request id')
}
})
// Wurst case scenario, where we have no JSON payload and only HTTP status information
test('Throws error without additional detail', async () => {
const error = cloneMock('error')
error.response.status = 500
error.response.statusText = 'Everything is on fire'
try {
errorHandler(error)
} catch (err) {
const parsedMessage = JSON.parse(err.message)
expect(err.name).equals(
'500 Everything is on fire',
'error name defaults to status code and text'
)
expect(parsedMessage.request.url).equals('requesturl', 'request url')
}
})
test('Obscures management token in any error message', async () => {
const responseError = cloneMock('error')
responseError.config.headers = {
Authorization: 'Bearer secret-management-token',
}
try {
errorHandler(responseError)
} catch (err) {
const parsedMessage = JSON.parse(err.message)
expect(parsedMessage.request.headers.Authorization).equals(
'Bearer ...token',
'Obscures management token'
)
}
const requestError = {
config: {
url: 'requesturl',
headers: {},
},
data: {},
request: {
status: 404,
statusText: 'Not Found',
},
}
requestError.config.headers = {
Authorization: 'Bearer secret-management-token',
}
try {
errorHandler(requestError)
} catch (err) {
expect(err.config.headers.Authorization).equals(
'Bearer ...token',
'Obscures management token'
)
}
})
})
|
import pandas
def convert_column_cells_to_string(
column: str,
dataframe: pandas.DataFrame) -> str:
column_cells_as_string = \
''.join(dataframe[column].astype(str).tolist())
return \
column_cells_as_string
|
/*
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang("language","it",{button:"Imposta lingua",remove:"Rimuovi lingua"});
|
# Generated by Django 3.0.5 on 2020-04-27 16:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pages', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='invite',
name='notes',
field=models.TextField(blank=True),
),
]
|
const express = require('express');
const app = express();
// Sets up a self-contained environment (think - biodome)
const port = process.env.PORT || 5050;
// this catches every route request - every time location bar changed, function runs
app.use((req, res, next) => {
console.log('incoming request');
console.log(port);
// NEXT is the original route request i.e. /api/users
next(); // => send the user to the route they requested
})
// use the API route file to handle API routes (/api/users, /api/user/id, etc)
app.use("/api", require("./routes/api"));
app.use("/ums", require("./routes/ums"));
// Run the app at the PORT
app.listen(port, () => {
console.log(`server is running on ${port}`);
})
|
import { ConcurrentError } from 'resolve-storage-base'
import createStorageAdapter from '../src/index'
const TIMESTAMP_1 = Number.MAX_SAFE_INTEGER - 6
const TIMESTAMP_2 = Number.MAX_SAFE_INTEGER - 5
const TIMESTAMP_3 = Number.MAX_SAFE_INTEGER - 4
const TIMESTAMP_4 = Number.MAX_SAFE_INTEGER - 3
const TIMESTAMP_5 = Number.MAX_SAFE_INTEGER - 2
const TIMESTAMP_6 = Number.MAX_SAFE_INTEGER - 1
describe('resolve-storage-lite', () => {
let storageAdapter = null
beforeEach(async () => {
storageAdapter = createStorageAdapter({
databaseFile: ':memory:',
tableName: 'tableName'
})
await storageAdapter.init()
})
afterEach(async () => {
await storageAdapter.dispose()
})
test('"saveEvent" should save an event with empty payload', async () => {
await storageAdapter.saveEvent({
type: 'AAA',
aggregateId: 'id1',
aggregateVersion: 1,
timestamp: TIMESTAMP_1
})
let events = []
await storageAdapter.loadEvents({}, event => {
events.push(event)
})
expect(events[0]).toMatchObject({
type: 'AAA',
aggregateId: 'id1',
aggregateVersion: 1,
payload: null
})
})
test('"saveEvent" should save an event', async () => {
await storageAdapter.saveEvent({
type: 'AAA',
aggregateId: 'id1',
aggregateVersion: 1,
timestamp: TIMESTAMP_1,
payload: { index: 1 }
})
let events = []
await storageAdapter.loadEvents({}, event => {
events.push(event)
})
expect(events[0]).toMatchObject({
type: 'AAA',
aggregateId: 'id1',
aggregateVersion: 1,
payload: { index: 1 }
})
})
test('"saveEvent" should throw a concurrent error', async () => {
await storageAdapter.saveEvent({
type: 'AAA',
aggregateId: 'id1',
aggregateVersion: 1,
timestamp: TIMESTAMP_1,
payload: { index: 1 }
})
try {
await storageAdapter.saveEvent({
type: 'AAA',
aggregateId: 'id1',
aggregateVersion: 1,
timestamp: TIMESTAMP_1,
payload: { index: 1 }
})
return Promise.reject(new Error('Test failed'))
} catch (error) {
expect(error).toBeInstanceOf(ConcurrentError)
}
})
test('"saveEvent" should throw an error when a bad event', async () => {
try {
await storageAdapter.saveEvent({
/* BAD_EVENT */
})
return Promise.reject(new Error('Test failed'))
} catch (error) {
expect(error.code).toEqual('SQLITE_ERROR')
}
})
test('"loadEvents" should load events', async () => {
await storageAdapter.saveEvent({
type: 'AAA',
aggregateId: 'id1',
aggregateVersion: 1,
timestamp: TIMESTAMP_1,
payload: { index: 1 }
})
await storageAdapter.saveEvent({
type: 'CCC',
aggregateId: 'id3',
aggregateVersion: 1,
timestamp: TIMESTAMP_2,
payload: { index: 2 }
})
await storageAdapter.saveEvent({
type: 'BBB',
aggregateId: 'id2',
aggregateVersion: 1,
timestamp: TIMESTAMP_3,
payload: { index: 3 }
})
await storageAdapter.saveEvent({
type: 'AAA',
aggregateId: 'id2',
aggregateVersion: 2,
timestamp: TIMESTAMP_4,
payload: { index: 4 }
})
await storageAdapter.saveEvent({
type: 'BBB',
aggregateId: 'id1',
aggregateVersion: 2,
timestamp: TIMESTAMP_5,
payload: { index: 5 }
})
await storageAdapter.saveEvent({
type: 'CCC',
aggregateId: 'id3',
aggregateVersion: 2,
timestamp: TIMESTAMP_6,
payload: { index: 6 }
})
let events = []
await storageAdapter.loadEvents({}, event => {
events.push(event)
})
expect(events).toMatchObject([
{
type: 'AAA',
aggregateId: 'id1',
aggregateVersion: 1,
timestamp: TIMESTAMP_1,
payload: { index: 1 }
},
{
type: 'CCC',
aggregateId: 'id3',
aggregateVersion: 1,
timestamp: TIMESTAMP_2,
payload: { index: 2 }
},
{
type: 'BBB',
aggregateId: 'id2',
aggregateVersion: 1,
timestamp: TIMESTAMP_3,
payload: { index: 3 }
},
{
type: 'AAA',
aggregateId: 'id2',
aggregateVersion: 2,
timestamp: TIMESTAMP_4,
payload: { index: 4 }
},
{
type: 'BBB',
aggregateId: 'id1',
aggregateVersion: 2,
timestamp: TIMESTAMP_5,
payload: { index: 5 }
},
{
type: 'CCC',
aggregateId: 'id3',
aggregateVersion: 2,
timestamp: TIMESTAMP_6,
payload: { index: 6 }
}
])
events = []
await storageAdapter.loadEvents({ eventTypes: ['AAA'] }, event => {
events.push(event)
})
expect(events).toMatchObject([
{
type: 'AAA',
aggregateId: 'id1',
aggregateVersion: 1,
payload: { index: 1 }
},
{
type: 'AAA',
aggregateId: 'id2',
aggregateVersion: 2,
timestamp: TIMESTAMP_4,
payload: { index: 4 }
}
])
events = []
await storageAdapter.loadEvents({ aggregateIds: ['id1'] }, event => {
events.push(event)
})
expect(events).toMatchObject([
{
type: 'AAA',
aggregateId: 'id1',
aggregateVersion: 1,
timestamp: TIMESTAMP_1,
payload: { index: 1 }
},
{
type: 'BBB',
aggregateId: 'id1',
aggregateVersion: 2,
timestamp: TIMESTAMP_5,
payload: { index: 5 }
}
])
events = []
await storageAdapter.loadEvents(
{
startTime: TIMESTAMP_2 - 1,
finishTime: TIMESTAMP_5 + 1
},
event => {
events.push(event)
}
)
expect(events).toMatchObject([
{
type: 'CCC',
aggregateId: 'id3',
aggregateVersion: 1,
timestamp: TIMESTAMP_2,
payload: { index: 2 }
},
{
type: 'BBB',
aggregateId: 'id2',
aggregateVersion: 1,
timestamp: TIMESTAMP_3,
payload: { index: 3 }
},
{
type: 'AAA',
aggregateId: 'id2',
aggregateVersion: 2,
timestamp: TIMESTAMP_4,
payload: { index: 4 }
},
{
type: 'BBB',
aggregateId: 'id1',
aggregateVersion: 2,
timestamp: TIMESTAMP_5,
payload: { index: 5 }
}
])
})
test('"drop" should drop events', async () => {
await storageAdapter.saveEvent({
type: 'AAA',
aggregateId: 'id1',
aggregateVersion: 1,
timestamp: TIMESTAMP_1,
payload: { index: 1 }
})
let events = []
await storageAdapter.loadEvents({}, event => {
events.push(event)
})
expect(events.length).toEqual(1)
await storageAdapter.drop()
try {
await storageAdapter.loadEvents({}, () => {})
return Promise.reject(new Error('Test failed'))
} catch (error) {
expect(error.message).toContain('no such table')
}
})
test('"getLatestEvent" should get the latest event', async () => {
await storageAdapter.saveEvent({
type: 'AAA',
aggregateId: 'id1',
aggregateVersion: 1,
timestamp: TIMESTAMP_1,
payload: { index: 1 }
})
expect(await storageAdapter.getLatestEvent({})).toMatchObject({
type: 'AAA',
aggregateId: 'id1',
aggregateVersion: 1,
payload: { index: 1 }
})
await storageAdapter.saveEvent({
type: 'BBB',
aggregateId: 'id1',
aggregateVersion: 2,
timestamp: TIMESTAMP_2,
payload: { index: 2 }
})
expect(await storageAdapter.getLatestEvent({})).toMatchObject({
type: 'BBB',
aggregateId: 'id1',
aggregateVersion: 2,
payload: { index: 2 }
})
})
})
|
// Card Characters
function drawCardImage(card, isPlayer, returnOnly=false) {
let cardHTML = '<span class=" pokercard ' + (card.isRed ? 'redcard':'') + '">' + card.char + '</span>';
if(returnOnly)
return cardHTML;
if(isPlayer)
$('#playerHandDiv').html($('#playerHandDiv').html() + cardHTML);
else
$('#dealerHandDiv').html($('#dealerHandDiv').html() + cardHTML);
}
function drawCardbackImage() {
$('#dealerHandDiv').html($('#dealerHandDiv').html() + '<span class="pokercard redcard cardback">🂠</span>');
}
function clearCards() {
$('.cardHandDiv').html(''); //player and dealer hand divs
}
// Advanced Functions
function drawOdds(elm, playerValue, dealerValue, isSoft, isSplit) {
elm.html('');
let doubleOdds = getDoubleOdds(playerValue, dealerValue, isSoft);
elm.append('<br>Double: ' + doubleOdds +
'<div class="odds-bar-container"><div class="odds-bar ' +
(doubleOdds>0 ? 'green' : 'red') + '" style="width:' +
Math.abs(doubleOdds*100) + '%;"></div></div>');
let hitOdds = getHitOdds(playerValue, dealerValue, isSoft);
elm.append('<br>Hit: ' + hitOdds +
'<div class="odds-bar-container"><div class="odds-bar ' +
(hitOdds>0 ? 'green' : 'red') + '" style="width:' +
Math.abs(hitOdds*100) + '%;"></div></div>');
if(isSplit) {
let splitOdds = getSplitOdds(playerValue, dealerValue, isSoft);
elm.append('<br>Split: ' + splitOdds +
'<div class="odds-bar-container"><div class="odds-bar ' +
(splitOdds>0 ? 'green' : 'red flip-horizontal') + '" style="width:' +
Math.abs(splitOdds*100) + '%;"></div></div>');
}
let standOdds = getStandOdds(playerValue, dealerValue);
elm.append('<br>Stand: ' + standOdds +
'<div class="odds-bar-container"><div class="odds-bar ' +
(standOdds>0 ? 'green' : 'red flip-horizontal') + '" style="width:' +
Math.abs(standOdds*100) + '%;"></div></div>');
}
function drawChips() {
let classList = 'small-chip';
if(! $('#animateCheckbox').is(':checked') )
classList += ' animate';
let chipsHTML = '';
let idx = numChips;
for(; idx>=25; idx-=25)
chipsHTML += '<img src="img/chips/chip-blue.svg" class="' + classList + ' blue"> ';
for(; idx>=5; idx-=5)
chipsHTML += '<img src="img/chips/chip-red.svg" class="' + classList + ' red"> ';
for(; idx>=1; idx-=1)
chipsHTML += '<img src="img/chips/chip-green.svg" class="' + classList + ' green"> ';
$('#chipsDiv').html(chipsHTML + '<span id="numChips">' + numChips + '</span>');
if($('#animateCheckbox').is(':checked') )
setTimeout( ()=> $('.small-chip').toggleClass('animate'), 100);
}
function drawTable(elm, playerValue, isSoft, isSplit) { // draws relevant slice of the strategy table
elm.html('');
let row1, row2;
if(isSplit) {
row1 = 19;
if(playerValue==2) {
row2 = 29;
} else {
row2 = playerValue/2 + 18;
}
} else if(isSoft) {
row1 = 11;
if(playerValue >= 19) {
row2 = 18;
} else {
row2 = playerValue-1;
}
} else { // hard
row1 = 0;
if(playerValue <=8) {
row2 = 1;
} else if(playerValue >=17) {
row2 = 10;
} else {
row2 = playerValue-7;
}
}
$($('#strategyTable tr').get(row1) ).clone().appendTo(elm);
$($('#strategyTable tr').get(row2) ).clone().appendTo(elm);
}
function drawStreak() {
$('#statP').html('Streak: ' + numStreak + ' —— ' + 'Max streak: ' + maxStreak
+ ' —— ' + numCorrect + ' / ' + (numCorrect+numWrong) );
}
|
/**
* @author: tipe.io
*/
const helpers = require('./helpers');
const buildUtils = require('./build-utils');
const webpackMerge = require('webpack-merge'); // used to merge webpack configs
const commonConfig = require('./webpack.common.js'); // the settings that are common to prod and dev
/**
* Webpack Plugins
*/
const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin');
/**
* Webpack configuration
*
* See: https://webpack.js.org/configuration/
*/
module.exports = function(options) {
const ENV = (process.env.ENV = process.env.NODE_ENV = 'development');
const HOST = process.env.HOST || 'localhost';
const PORT = process.env.PORT || 8989;
const METADATA = Object.assign({}, buildUtils.DEFAULT_METADATA, {
host: HOST,
port: PORT,
ENV: ENV,
HMR: helpers.hasProcessFlag('hot'),
PUBLIC: process.env.PUBLIC_DEV || HOST + ':' + PORT
});
return webpackMerge(commonConfig({ env: ENV, metadata: METADATA }), {
mode: 'development',
devtool: 'inline-source-map',
/**
* Options affecting the output of the compilation.
*
* See: https://webpack.js.org/configuration/output/
*/
output: {
/**
* The output directory as absolute path (required).
*
* See: https://webpack.js.org/configuration/output/#output-path
*/
path: helpers.root('dist'),
/**
* Specifies the name of each output file on disk.
* IMPORTANT: You must not specify an absolute path here!
*
* See: https://webpack.js.org/configuration/output/#output-filename
*/
filename: '[name].bundle.js',
/**
* The filename of the SourceMaps for the JavaScript files.
* They are inside the output.path directory.
*
* See: https://webpack.js.org/configuration/output/#output-sourcemapfilename
*/
sourceMapFilename: '[file].map',
/** The filename of non-entry chunks as relative path
* inside the output.path directory.
*
* See: https://webpack.js.org/configuration/output/#output-chunkfilename
*/
chunkFilename: '[id].chunk.js',
library: 'ac_[name]',
libraryTarget: 'var'
},
module: {
rules: [
/**
* Sass loader support for *.scss files (styles directory only)
* Loads external sass styles into the DOM, supports HMR
*
*/
{
test: /\.scss$/,
use: [
'style-loader',
'css-loader',
{
loader: 'postcss-loader',
options: {
config: {
path: 'config/'
}
}
},
'sass-loader'
],
include: [helpers.root('src', 'styles')]
}
]
},
plugins: [
/**
* Plugin LoaderOptionsPlugin (experimental)
*
* See: https://gist.github.com/sokra/27b24881210b56bbaff7
*/
new LoaderOptionsPlugin({
debug: true,
options: {}
})
],
/**
* Webpack Development Server configuration
* Description: The webpack-dev-server is a little node.js Express server.
* The server emits information about the compilation state to the client,
* which reacts to those events.
*
* See: https://webpack.js.org/configuration/dev-server/
*/
devServer: {
port: METADATA.port,
host: METADATA.host,
hot: METADATA.HMR,
public: METADATA.PUBLIC,
historyApiFallback: true,
watchOptions: {
// if you're using Docker you may need this
// aggregateTimeout: 300,
// poll: 1000,
ignored: /node_modules/
},
/**
* Here you can access the Express app object and add your own custom middleware to it.
*
* See: https://webpack.js.org/configuration/dev-server/
*/
setup: function(app) {
// For example, to define custom handlers for some paths:
// app.get('/some/path', function(req, res) {
// res.json({ custom: 'response' });
// });
}
},
/**
* Include polyfills or mocks for various node stuff
* Description: Node configuration
*
* See: https://webpack.js.org/configuration/node/
*/
node: {
global: true,
crypto: 'empty',
process: true,
module: false,
clearImmediate: false,
setImmediate: false,
fs: 'empty'
}
});
};
|
window.onload = function () {
// p90
let latency_none_mtls_both_p90_trending = constructDataSeries(latency_none_mtls_both_p90, latency_none_mtls_base_p90)
let latency_none_plaintext_both_p90_trending = constructDataSeries(latency_none_plaintext_both_p90, latency_none_mtls_base_p90)
let latency_v2_stats_nullvm_both_p90_trending = constructDataSeries(latency_v2_stats_nullvm_both_p90, latency_none_mtls_base_p90)
let latency_v2_stats_wasm_both_p90_trending = constructDataSeries(latency_v2_stats_wasm_both_p90, latency_none_mtls_base_p90)
let latency_v2_sd_nologging_nullvm_both_p90_trending = constructDataSeries(latency_v2_sd_nologging_nullvm_both_p90, latency_none_mtls_base_p90)
let latency_v2_sd_full_nullvm_both_p90_trending = constructDataSeries(latency_v2_sd_full_nullvm_both_p90, latency_none_mtls_base_p90)
p90ModesData = [];
p90ModesData.push(latency_none_mtls_both_p90_trending);
p90ModesData.push(latency_none_plaintext_both_p90_trending);
p90ModesData.push(latency_v2_stats_nullvm_both_p90_trending);
p90ModesData.push(latency_v2_stats_wasm_both_p90_trending);
p90ModesData.push(latency_v2_sd_nologging_nullvm_both_p90_trending);
p90ModesData.push(latency_v2_sd_full_nullvm_both_p90_trending);
generateChart("trending_p90", p90ModesData);
// p99
let latency_none_mtls_both_p99_trending = constructDataSeries(latency_none_mtls_both_p99, latency_none_mtls_base_p99)
let latency_none_plaintext_both_p99_trending = constructDataSeries(latency_none_plaintext_both_p99, latency_none_mtls_base_p99)
let latency_v2_stats_nullvm_both_p99_trending = constructDataSeries(latency_v2_stats_nullvm_both_p99, latency_none_mtls_base_p99)
let latency_v2_stats_wasm_both_p99_trending = constructDataSeries(latency_v2_stats_wasm_both_p99, latency_none_mtls_base_p99)
let latency_v2_sd_nologging_nullvm_both_p99_trending = constructDataSeries(latency_v2_sd_nologging_nullvm_both_p99, latency_none_mtls_base_p99)
let latency_v2_sd_full_nullvm_both_p99_trending = constructDataSeries(latency_v2_sd_full_nullvm_both_p99, latency_none_mtls_base_p99)
p99ModesData = [];
p99ModesData.push(latency_none_mtls_both_p99_trending);
p99ModesData.push(latency_none_plaintext_both_p99_trending);
p99ModesData.push(latency_v2_stats_nullvm_both_p99_trending);
p99ModesData.push(latency_v2_stats_wasm_both_p99_trending);
p99ModesData.push(latency_v2_sd_nologging_nullvm_both_p99_trending);
p99ModesData.push(latency_v2_sd_full_nullvm_both_p99_trending);
generateChart("trending_p99", p99ModesData);
};
|
#!/usr/bin/env python
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
import sys
import json
import threading
import logging as log
import urllib2
from argparse import ArgumentParser
import subprocess
import time
CLONE_VM = '/usr/bin/VBoxManage clonevm OVX --snapshot Master --mode machine --options link --name %s --register'
GET_IP_VM = '/usr/bin/VBoxManage guestcontrol %s execute --image /home/ovx/get-ip.sh --wait-exit --username ovx --password ovx --wait-stdout -- eth0'
START_VM = '/usr/bin/VBoxManage startvm %s --type headless'
#START_VM = '/usr/bin/VBoxManage startvm %s'
STOP_VM = '/usr/bin/VBoxManage controlvm %s poweroff'
UNREGISTER_VM = '/usr/bin/VBoxManage unregistervm %s --delete'
class ERROR_CODE:
PARSE_ERROR = -32700 # Invalid JSON was received by the server.
INVALID_REQ = -32600 # The JSON sent is not a valid Request object.
METHOD_NOT_FOUND = -32601 # The method does not exist / is not available.
INVALID_PARAMS = -32602 # Invalid method parameter(s).
INTERNAL_ERROR = -32603 # Internal JSON-RPC error.
class OVXException(Exception):
def __init__(self, code, msg, tenantId, rollback=False):
self.code = code
self.msg = msg
self.rollback = rollback
self.tenantId = tenantId
def __str__(self):
return '%s (%s)' % (self.msg, self.code)
class EmbedderException(Exception):
def __init__(self, code, msg):
self.code = code
self.msg = msg
def __str__(self):
return '%s (%s)' % (self.msg, self.code)
# Convert dotted hex to long value
def hexToLong(h):
return int(h.replace(':', ''), 16)
# Convert long value to dotted hex value with specified length in bytes
def longToHex(l, length=8):
h = ("%x" % l)
if len(h) % 2 != 0:
h = '0' + h
result = ':'.join([h[i:i+2] for i in range(0, len(h), 2)])
prefix = '00:' * (length - (len(h) / 2) - (len(h) % 2))
return prefix + result
class Routing():
def __init__(self, topology):
try:
self.nodes = topology['switches']
self.links = {}
for link in topology['links']:
src = link['src']
dst = link['dst']
self.links[(src['dpid'], src['port'])] = (dst['dpid'], dst['port'])
self.SP = {}
except:
pass
def _neighbours(self, node):
"""Returns list of nodes that are neighbour to node.
Assumes nodes are connected on at most one port, i.e., multigraphs are not supported (should
delete duplicate entries from result.
"""
return [dst_node for (src_node,src_port),(dst_node,dst_port) in self.links.iteritems() if src_node == node]
def _shortestPath(self, src, dst):
"""Calculates shortest path between src and dst switches and stores it in the SP dict.
Assumes graph is connected.
"""
distance = {}
previous = {}
for node in self.nodes:
distance[node] = sys.maxint
distance[src] = 0
# Sort Q according to distance
Q = sorted(distance, key=distance.get)
while Q:
current = Q.pop(0)
if distance[current] == sys.maxint:
log.error("Graph is disconnected")
# TODO: raise expection
break
for neighbour in self._neighbours(current):
alt = distance[current] + 1
if alt < distance[neighbour]:
distance[neighbour] = alt
previous[neighbour] = current
# TODO: really should use a heap instead of resorting every time
Q = sorted(distance, key=distance.get)
# Path is between current and src (first iteration of outer while: current == src, previous[current] undefined)
x = current
path = []
while previous.get(x) >= 0:
path.append(x)
x = previous[x]
path.append(src)
path.reverse()
self.SP[(src, current)] = path
def _findPorts(self, dpid1, dpid2):
"""Returns tuple (port_out, port_in) with port_out on dpid1 and port_in on dpid2, None if switches are not connected."""
# Iterates over all links in worst case!
for (dpid_out, port_out), (dpid_in, port_in) in self.links.iteritems():
if (dpid1 == dpid_out) and (dpid2 == dpid_in):
return (port_out, port_in)
return None
def _findOutPort(self, dpid1, dpid2):
"""Returns output port on dpid1 that connects to dpid2, None if switches are not connected."""
return self._findPorts(dpid1, dpid2)[0]
def _findInPort(self, dpid1, dpid2):
"""Returns input port on dpid2 that is connected to dpid1, None if switches are not connected."""
return self._findPorts(dpid1, dpid2)[1]
def getRoute(self, dpid_in, dpid_out):
"""Find route between dpid_in and dpid_out.
Route is of form [ dpid ]
"""
# Catch trivial path
if dpid_in == dpid_out:
return [ (dpid_in) ]
# Calculate path
if (dpid_in, dpid_out) not in self.SP.keys():
self._shortestPath(dpid_in, dpid_out)
route = self.SP[(dpid_in, dpid_out)]
return route
def parseRoute(self, route):
"""Parse route specified and return OVX-type path string.
Input route is of form [ dpid ], while return path is of form dpid1/port1-dpid2/port2,...
"""
path = ''
for index in xrange(0, len(route) - 1):
outPort = self._findOutPort(route[index], route[index + 1])
inPort = self._findInPort(route[index], route[index + 1])
path += "%s/%s-%s/%s," % (parseDpid(route[index]), outPort, parseDpid(route[index + 1]), inPort)
# Remove final comma
return path[:-1]
class OVXClient():
def __init__(self, host, port, user, password):
self.host = host
self.port = port
self.user = user
self.password = password
self.base_url = "http://%s:%s/" % (self.host, self.port)
self.tenant_url = self.base_url + 'tenant'
self.status_url = self.base_url + 'status'
def _buildRequest(self, data, url, cmd):
j = { "id" : "ovxembedder", "method" : cmd, "jsonrpc" : "2.0" }
h = {"Content-Type" : "application/json"}
if data is not None:
j['params'] = data
return urllib2.Request(url, json.dumps(j), h)
def _parseResponse(self, data):
j = json.loads(data)
if 'error' in j:
e = OVXException(j['error']['code'], j['error']['message'], -1)
log.error(e)
raise e
return j['result']
def _connect(self, cmd, url, data=None):
log.debug("%s: %s" % (cmd, data))
try:
passman = urllib2.HTTPPasswordMgrWithDefaultRealm()
passman.add_password(None, url, self.user, self.password)
authhandler = urllib2.HTTPBasicAuthHandler(passman)
opener = urllib2.build_opener(authhandler)
req = self._buildRequest(data, url, cmd)
ph = opener.open(req)
return self._parseResponse(ph.read())
except urllib2.URLError as e:
log.error(e)
sys.exit(1)
except urllib2.HTTPError as e:
if e.code == 401:
log.error("Authentication failed: invalid password")
# TODO
sys.exit(1)
elif e.code == 504:
log.error("HTTP Error 504: Gateway timeout")
# TODO
sys.exit(1)
else:
log.error(e)
except RuntimeError as e:
log.error(e)
def createNetwork(self, ctrls, net_address, net_mask):
req = {'controllerUrls': ctrls,
'networkAddress': net_address, 'mask': net_mask}
try:
ret = self._connect("createNetwork", self.tenant_url, data=req)
tenantId = ret.get('tenantId')
if tenantId:
log.info("Network with tenantId %s has been created" % tenantId)
return tenantId
except OVXException as e:
e.rollback = False
raise
def removeNetwork(self, tenantId):
req = {'tenantId': tenantId}
try:
ret = self._connect("removeNetwork", self.tenant_url, data=req)
log.info("Network with tenantId %s has been removed" % tenantId)
except OVXException as e:
e.rollback = False
raise
def createSwitch(self, tenantId, dpids, dpid=None):
req = {'tenantId': tenantId, 'dpids': dpids}
if dpid:
req["vdpid"] = dpid
try:
ret = self._connect("createSwitch", self.tenant_url, data=req)
switchId = ret.get('vdpid')
if switchId:
log.info("Switch with switchId %s has been created" % longToHex(switchId))
return switchId
except OVXException as e:
e.rollback = True
e.tenantId = tenantId
raise
def createPort(self, tenantId, dpid, port):
req = {'tenantId': tenantId, 'dpid': dpid, 'port': port}
try:
ret = self._connect("createPort", self.tenant_url, data=req)
switchId = ret.get('vdpid')
portId = ret.get('vport')
if switchId and portId:
log.info("Port on switch %s with port number %s has been created" % (longToHex(switchId), portId))
return (switchId, portId)
except OVXException as e:
e.rollback = True
e.tenantId = tenantId
raise
def connectLink(self, tenantId, srcDpid, srcPort, dstDpid, dstPort, algorithm, backup_num):
req = {'tenantId': tenantId, 'srcDpid': srcDpid, 'srcPort': srcPort, 'dstDpid': dstDpid, 'dstPort': dstPort, 'algorithm': algorithm, 'backup_num': backup_num}
try:
ret = self._connect("connectLink", self.tenant_url, data=req)
linkId = ret.get('linkId')
if linkId:
log.info("Link with linkId %s has been created" % linkId)
return linkId
except OVXException as e:
e.rollback = True
e.tenantId = tenantId
raise
def setLinkPath(self, tenantId, linkId, path, priority):
req = {'tenantId': tenantId, 'linkId': linkId, 'path': path, 'priority': priority}
try:
ret = self._connect("setLinkPath", self.tenant_url, data=req)
if ret:
log.info("Path on link %s has been set" % linkId)
return ret
except OVXException as e:
e.rollback = True
e.tenantId = tenantId
raise
def setOVXmode(self, tenantId, OVXmode):
req = {'tenantId': tenantId, 'OVXmode': OVXmode}
try:
ret = self._connect("setOVXmode", self.tenant_url, data=req)
if ret:
log.info("OVX mode %s has been set" % OVXmode)
return ret
except OVXException as e:
e.rollback = True
e.tenantId = tenantId
raise
def connectHost(self, tenantId, dpid, port, mac):
req = {'tenantId': tenantId, 'vdpid': dpid, 'vport': port, 'mac': mac}
try:
ret = self._connect("connectHost", self.tenant_url, data=req)
hostId = ret.get('hostId')
if hostId:
log.info("Host with hostId %s connected" % hostId)
return hostId
except OVXException as e:
e.rollback = True
e.tenantId = tenantId
raise
def connectRoute(self, tenantId, switchId, srcPort, dstPort, path):
req = {'tenantId': tenantId, 'vdpid': switchId, 'srcPort': srcPort, 'dstPort': dstPort, 'path': path}
try:
ret = self._connect("connectRoute", self.tenant_url, data=req)
routeId = reg.get('routeId')
if routeId:
log.info("Route with routeId %s on switch %s between ports (%s,%s) created" % (routeId, switchId, srcPort, dstPort))
return routeId
except OVXException as e:
e.rollback = True
e.tenantId = tenantId
raise
def createSwitchRoute(self, tenantId, switchId, srcPort, dstPort, path):
req = {'tenantId': tenantId, 'dpid': switchId, 'srcPort': srcPort, 'dstPort': dstPort, 'path': path}
try:
ret = self._connect("createSwitchRoute", self.tenant_url, data=req)
if ret:
log.info("Route on switch %s between ports (%s,%s) created" % (switchId, srcPort, dstPort))
return ret
except OVXException as e:
e.rollback = True
e.tenantId = tenantId
raise
def startNetwork(self, tenantId):
req = {'tenantId': tenantId}
try:
ret = self._connect("startNetwork", self.tenant_url, data=req)
if ret:
log.info("Network with tenantId %s has been started" % tenantId)
return ret
except OVXException as e:
e.rollback = True
e.tenantId = tenantId
raise
def getPhysicalTopology(self):
ret = self._connect("getPhysicalTopology", self.status_url)
try:
if ret:
log.info("Physical network topology received")
return ret
except OVXException as e:
e.rollback = False
raise
def setInternalRouting(self, tenantId, dpid, algorithm, backup_num):
req = {'tenantId': tenantId, 'vdpid': dpid, 'algorithm': algorithm, 'backup_num': backup_num}
try:
ret = self._connect("setInternalRouting", self.tenant_url, data=req)
if ret:
log.info("Internal routing of switch %s has been set to %s" % (longToHex(dpid), algorithm))
return ret
except OVXException as e:
e.rollback = True
e.tenantId = tenantId
raise
class OVXEmbedderHandler(BaseHTTPRequestHandler):
"""
Implementation of JSON-RPC API, defines all API handler methods.
"""
def _buildResponse(self, json_id, result=None, error=None):
"""Returns JSON 2.0 compliant response"""
res = {}
res['jsonrpc'] = '2.0'
# result and error are mutually exclusive
if result is not None:
res['result'] = result
elif error is not None:
res['error'] = error
res['id'] = json_id
return res
def _buildError(self, code, message, data=None):
"""Returns JSON RPC 2.0 error object"""
res = {}
res['code'] = code
res['message'] = message
if data:
res['data'] = data
return res
def doBigSwitchNetwork(self, controller, routing, subnet, hosts):
"""Create OVX network that is a single big switch"""
client = self.server.client
# request physical topology
phyTopo = client.getPhysicalTopology()
# spawn controller if necessary
# TODO: do proper string comparison
if controller['type'] == 'default':
proto = self.server.ctrlProto
host = self.server._spawnController()
port = self.server.ctrlPort
ctrls = ["%s:%s:%s" % (proto, host, port)]
elif controller['type'] == 'custom':
ctrls = controller['ctrls']
else:
raise EmbedderException(ERROR_CODE.INVALID_REQ, 'Unsupported controller type')
# split subnet in netaddress and netmask
(net_address, net_mask) = subnet.split('/')
# create virtual network
tenantId = client.createNetwork(ctrls, net_address, int(net_mask))
# create virtual switch with all physical dpids
dpids = [hexToLong(dpid) for dpid in phyTopo['switches']]
switchId = client.createSwitch(tenantId, dpids)
# set routing algorithm and number of backups, only for true bigswitches
if (len(dpids) > 1):
client.setInternalRouting(tenantId, switchId, routing['algorithm'], routing['backup_num'])
# create virtual ports and connect hosts
for host in hosts:
(vdpid, vport) = client.createPort(tenantId, hexToLong(host['dpid']), host['port'])
client.connectHost(tenantId, vdpid, vport, host['mac'])
# Start virtual network
client.startNetwork(tenantId)
return tenantId
def doPhysicalNetwork(self, controller, routing, subnet, hosts, copyDpid = False):
"""Create OVX network that is clone of physical network"""
client = self.server.client
# request physical topology
phyTopo = client.getPhysicalTopology()
# spawn controller if necessary
if controller['type'] == 'default':
proto = self.server.ctrlProto
host = self.server._spawnController()
port = self.server.ctrlPort
ctrls = ["%s:%s:%s" % (proto, host, port)]
elif controller['type'] == 'custom':
ctrls = controller['ctrls']
else:
raise EmbedderException(ERROR_CODE.INVALID_REQ, 'Unsupported controller type')
# split subnet in netaddress and netmask
(net_address, net_mask) = subnet.split('/')
# create virtual network
tenantId = client.createNetwork(ctrls, net_address, int(net_mask))
# create virtual switch per physical dpid
for dpid in phyTopo['switches']:
if copyDpid:
client.createSwitch(tenantId, [hexToLong(dpid)], dpid=hexToLong(dpid))
else:
client.createSwitch(tenantId, [hexToLong(dpid)])
# create virtual ports and connect hosts
for host in hosts:
(vdpid, vport) = client.createPort(tenantId, hexToLong(host['dpid']), host['port'])
client.connectHost(tenantId, vdpid, vport, host['mac'])
# create virtual ports and connect virtual links
connected = []
for link in phyTopo['links']:
if (link['src']['dpid'], link['src']['port']) not in connected:
srcDpid = hexToLong(link['src']['dpid'])
# Type conversions needed because OVX JSON output is stringified
srcPort = int(link['src']['port'])
(srcVDpid, srcVPort) = client.createPort(tenantId, srcDpid, srcPort)
dstDpid = hexToLong(link['dst']['dpid'])
dstPort = int(link['dst']['port'])
(dstVDpid, dstVPort) = client.createPort(tenantId, dstDpid, dstPort)
src = "%s/%s" % (srcDpid, srcPort)
dst = "%s/%s" % (dstDpid, dstPort)
path = "%s-%s" % (src, dst)
client.connectLink(tenantId, srcVDpid, srcVPort, dstVDpid, dstVPort, routing['algorithm'], routing['backup_num'])
connected.append((link['dst']['dpid'], link['dst']['port']))
# boot network
client.startNetwork(tenantId)
return tenantId
def _exec_createNetwork(self, json_id, params):
"""Handler for automated network creation"""
try:
p = params.get('network')
if p == None:
raise EmbedderException(ERROR_CODE.INVALID_REQ, 'Missing network section')
tenantId = -1
networkType = p.get('type')
if networkType == None:
raise EmbedderException(ERROR_CODE.INVALID_REQ, 'Missing network type')
elif networkType == 'bigswitch':
tenantId = self.doBigSwitchNetwork(p['controller'], p['routing'], p['subnet'], p['hosts'])
elif networkType == 'physical':
tenantId = self.doPhysicalNetwork(p['controller'], p['routing'], p['subnet'], p['hosts'], copyDpid=p.get('copy-dpid', False))
else:
raise EmbedderException(ERROR_CODE.INVALID_REQ, 'Unsupported network type')
response = self._buildResponse(json_id, result={ 'tenantId' : tenantId })
except OVXException as e:
if e.rollback:
client = self.server.client
client.removeNetwork(e.tenantId)
err = self._buildError(e.code, e.msg)
response = self._buildResponse(json_id, error=err)
except EmbedderException as e:
log.error(e)
err = self._buildError(e.code, e.msg)
response = self._buildResponse(json_id, error=err)
return response
def do_POST(self):
"""Handle HTTP POST calls"""
def reply(response):
response = json.dumps(response) + '\n'
self.send_response(200, "OK")
self.send_header("Content-Type", "application/json")
self.send_header("Content-Length", len(response))
self.end_headers()
self.wfile.write(response)
# Put JSON message in data dict
l = self.headers.get("Content-Length", "")
data = ''
if l == "":
data = self.rfile.read()
else:
data = self.rfile.read(int(l))
try:
data = json.loads(data)
except:
msg = "Error parsing JSON request"
log.error(msg)
err = self._buildError(ERROR_CODE.PARSE_ERROR, msg)
result = self._buildResponse(None, error=err)
# Check if JSONRPC 2.0 compliant (correct version and json_id given)
json_id = data.get('id', None)
# Setup method to call
try:
methodName = "_exec_" + data.get('method')
method = getattr(self, methodName)
log.info(methodName)
except:
msg = "Method not found"
log.info(msg)
err = self._buildError(ERROR_CODE.METHOD_NOT_FOUND, msg)
result = self._buildResponse(json_id, error=err)
# Get method parameters
params = data.get('params', {})
# Call method
result = method(json_id, params)
reply(result)
class OVXEmbedderServer(HTTPServer):
def __init__(self, opts):
HTTPServer.__init__(self, (opts['host'], opts['port']), OVXEmbedderHandler)
self.client = OVXClient(opts['ovxhost'], opts['ovxport'], opts['ovxuser'], opts['ovxpass'])
self.ctrlProto = opts['ctrlproto']
self.ctrlPort = opts['ctrlport']
self.controllers = []
def _spawnController(self):
ctrl = "OVX-%s" % len(self.controllers)
devnull = open('/dev/null', 'w')
log.info("Spawning controller VM %s" % ctrl)
clone_cmd = CLONE_VM % ctrl
subprocess.call(clone_cmd.split(), stdout=devnull, stderr=devnull)
start_cmd = START_VM % ctrl
subprocess.call(start_cmd.split(), stdout=devnull, stderr=devnull)
get_ip_cmd = GET_IP_VM % ctrl
while True:
try:
ret = subprocess.check_output(get_ip_cmd.split(), stderr=devnull)
except subprocess.CalledProcessError:
time.sleep(1)
continue
ip = ret
break
self.controllers.append(ctrl)
log.info("Controller %s ready on %s" % (ctrl, ip))
return ip
def closeControllers(self):
for controller in self.controllers:
stop_cmd = STOP_VM % controller
subprocess.call(stop_cmd.split())
del_cmd = UNREGISTER_VM % controller
subprocess.call(del_cmd.split())
class OVXEmbedder(threading.Thread):
"""
Libera planner JSON RPC 2.0 server
"""
def __init__(self, opts):
threading.Thread.__init__(self)
self.httpd = OVXEmbedderServer(opts)
self.setDaemon(True)
# Multi-threaded webserver
def run(self):
"""
Main function run by thread
"""
log.info("JSON RPC server starting")
try:
self.httpd.serve_forever()
finally:
self.httpd.server_close()
self.httpd.closeControllers()
if __name__ == '__main__':
parser = ArgumentParser(description="Libera network embedding tool.")
parser.add_argument('--host', default='localhost', help='Libera embedder host (default="localhost")')
parser.add_argument('--port', default=8000, type=int, help='Libera embedder port (default=8000)')
parser.add_argument('--ovxhost', default='localhost', help='host where Libera is running (default="localhost")')
parser.add_argument('--ovxport', default=8080, type=int, help='port where Libera is running (default=8080)')
parser.add_argument('--ovxuser', default='admin', help='Libera user (default="admin")')
parser.add_argument('--ovxpass', default='admin', help='Libera password (default="admin")')
parser.add_argument('--ctrlproto', default='tcp', help='default controller protocol (default="tcp")')
parser.add_argument('--ctrlport', default=10000, type=int, help='default controller port (default=10000)')
parser.add_argument('--loglevel', default='INFO', help='log level (default="INFO")')
parser.add_argument('--version', action='version', version='%(prog)s 0.1')
args = parser.parse_args()
opts = vars(args)
log.basicConfig(format='%(asctime)s %(message)s', level=getattr(log, opts['loglevel'].upper()))
embedder = OVXEmbedder(opts)
embedder.run()
|
# Generated by Django 2.2.4 on 2019-08-27 17:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hie', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='hieprofile',
name='organization_name',
field=models.CharField(blank=True, default='HIXNY API', max_length=64),
),
]
|
##
## This script is used to compare the outputs generated by the ESRI geometry engine and
## GeographicLib when doing geodesic densification.
##
import arcpy
import math
from geographiclib.geodesic import Geodesic
# generic parameters
canberra = {'x':149, 'y':-35}
perth = {'x':115, 'y':-32}
ds = 100000 # maximum segment length(m)
# arcpy methods
canberraPointGeom = arcpy.PointGeometry(arcpy.Point(canberra['x'], canberra['y']), arcpy.SpatialReference(4326))
perthPointGeom = arcpy.PointGeometry(arcpy.Point(perth['x'], perth['y']), arcpy.SpatialReference(4326))
angle, distance = canberraPointGeom.angleAndDistanceTo(perthPointGeom, "GEODESIC")
waypoint = canberraPointGeom
print("arcpy distance: " + str(distance))
# geographiclib methods
geod = Geodesic.WGS84
l = geod.InverseLine(canberra['y'], canberra['x'],
perth['y'], perth['x'])
print("geographiclib distance: " + str(l.s13))
# generic parameters
n = int(math.ceil(distance / ds)) # number of segments
seglen = distance / n
# loop through segments
for i in range(n + 1):
if i == 0:
print(", ".join(["method", "segmentNo", "azimuth", "distance", "long", "lat"]))
else:
# arcpy method
fullAng, fullDist = waypoint.angleAndDistanceTo(perthPointGeom, "GEODESIC")
newWaypoint = waypoint.pointFromAngleAndDistance(fullAng, seglen, "GEODESIC")
segAng, segDist = waypoint.angleAndDistanceTo(newWaypoint, "GEODESIC")
waypoint = newWaypoint
arcpy_output = str(int(i)).zfill(2) + " " + \
str(segAng).ljust(18,'0') + " " + \
str(str(int(min(seglen * i, distance)))).zfill(7) + " " + \
str(newWaypoint.extent.XMax).ljust(19,'0') + " " + \
str(newWaypoint.extent.YMax).ljust(19,'0')
print("arcpy " + arcpy_output)
# geographiclib method
g = l.Position(min(seglen * i, l.s13))
geographiclib_output = str(int(i)).zfill(2) + " " + \
str(g['azi2']).ljust(18,'0') + " " + \
str(int(min(seglen * i, l.s13))).zfill(7) + " " + \
str(g['lon2']).ljust(19,'0') + " " +\
str(g['lat2']).ljust(19,'0')
print("geogr " + geographiclib_output)
print(" ")
|
import setuptools
with open("README.md", "r", encoding = "utf-8") as file_object:
long_description = file_object.read()
setuptools.setup(
name = "color_text",
version = "4.0.1",
author = "A Chinese that likes programming 一个热爱编程的中国人",
author_email = "colortextpackage@yandex.com",
description = "A library for printing colored text, getting colored input, changing Qt5 controls' colors. 一个用来打印彩色文字、获取彩色的输入、更改Qt5控件的颜色的库。",
long_description = long_description,
license = "MIT",
long_description_content_type = "text/markdown",
url = None,
packages = ["color_text", "color_text/doc"],
zip_safe = False,
python_requires = ">=3.0, !=3.9.*, <4.0",
data_files = [(
"Lib/site-packages/color_text/doc",
["color_text/doc/help.doc",
"color_text/doc/help.docx",
"color_text/doc/help.md",
"color_text/doc/help.mhtml",
"color_text/doc/help.odt",
"color_text/doc/help.pdf",
"color_text/doc/help.rtf",
"color_text/doc/help.xml",
"color_text/doc/help.xps"]
)],
classifiers = [
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: 3.8",
"Operating System :: Microsoft :: Windows",
"License :: OSI Approved :: MIT License",
"Environment :: Win32 (MS Windows)",
],
keywords = ["color_text", "color text", "colour_text", "colour text", "彩色文字", "有颜色的文字", "颜色文字",
"彩色文本", "有颜色的文本", "颜色文本", "color_words", "color words", "colour_words", "colour words", "color_word",
"color word", "colour_word", "colour word"],
platforms = ["Windows"],
scripts = [
"color_text-examples.cmd",
"color_text-examples.py",
"color_text-examples.ps1"
],
)
|
//// [tests/cases/compiler/declarationEmitInferredTypeAlias2.ts] ////
//// [0.ts]
{
type Data = string | boolean;
let obj: Data = true;
}
export { }
//// [1.ts]
let v = "str" || true;
function bar () {
return v;
}
export { v, bar }
//// [0.js]
"use strict";
exports.__esModule = true;
{
var obj = true;
}
//// [1.js]
"use strict";
exports.__esModule = true;
var v = "str" || true;
exports.v = v;
function bar() {
return v;
}
exports.bar = bar;
//// [0.d.ts]
export {};
//// [1.d.ts]
declare let v: string | boolean;
declare function bar(): string | boolean;
export { v, bar };
|
GENOMES_DIR='/home/cmb-panasas2/skchoudh/genomes'
OUT_DIR = '/staging/as/skchoudh/rna/public_HuR/GSE62129'
RAWDATA_DIR ='/home/cmb-06/as/skchoudh/dna/public_HuR/GSE62129'
GENOME_BUILD = 'mm10'
GENOME_FASTA = GENOMES_DIR + '/' + GENOME_BUILD + '/fasta/'+ GENOME_BUILD+ '.fa'
SRC_DIR = '/home/cmb-panasas2/skchoudh/github_projects/rna-seq-snakemake/scripts'
STAR_INDEX = GENOMES_DIR + '/' + GENOME_BUILD + '/star_annotated'
GTF = GENOMES_DIR + '/' + GENOME_BUILD + '/annotation/' + 'gencode.vM11.annotation.gtf'
GENE_NAMES = GENOMES_DIR + '/' + GENOME_BUILD + '/annotation/' + GENOME_BUILD+'_gene_names_stripped.tsv'
GENE_LENGTHS = GENOMES_DIR + '/' + GENOME_BUILD + '/annotation/' + 'gencode.vM11.coding_lengths.tsv' #+ GENOME_BUILD+'_gene_lengths.tsv'
GENE_NAME_MAP = GENOMES_DIR + '/' + GENOME_BUILD + '/annotation/' + GENOME_BUILD + '_gene_names_stripped.tsv'
DESIGN_FILE = RAWDATA_DIR + '/design.txt'
|
var style = {
}
export default style
|
const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
const path = require('path');
const TerserJSPlugin = require('terser-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
module.exports = merge(common, {
mode: 'production',
output: {
filename: '[name].[contentHash].bundle.js',
},
module: {
rules: [
{
test: /\.s[ac]ss$/i,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
},
{
loader: 'postcss-loader',
options: {
ident: 'postcss',
plugins: [require('autoprefixer')],
},
},
{
loader: 'sass-loader',
},
],
},
],
},
optimization: {
minimizer: [new TerserJSPlugin(), new OptimizeCSSAssetsPlugin()],
},
plugins: [
new MiniCssExtractPlugin({
filename: '[name].[hash].css',
}),
],
});
|
#encoding:utf-8
subreddit = 'cricket'
t_channel = '@r_cricket'
def send_post(submission, r2t):
return r2t.send_simple(submission)
|
import React, { useState, useContext } from 'react';
import styled from 'styled-components';
import { axiosWithAuth } from '../helpers/axiosWithAuth';
import UserContext from '../contexts/userContext';
import MyPlantDataContext from '../contexts/myPlantDataContext';
//STYLING
const AddPlantContainer = styled.div`
width: 40vw;
display: flex;
justify-content: center;
margin-top: 30px;
`
const PlantImg = styled.img`
object-fit: contain;
max-width: 224px;
`
const PlantInfoContainer = styled.div`
width: 100%;
display: flex;
flex-direction: column;
align-items: flex-start;
padding: 6px 0px 6px 20px;
`
const PlantInfo = styled.div`
display: flex;
justify-content: flex-start;
`
const WateringForm = styled.form`
margin-right: 40px;
`
const WaterLightContainer = styled.div`
display: flex;
flex-direction: column;
justify-content: space-between;
`
const AddPlant = ({plant, handleClose}) => {
const [dayValue, setDayValue] = useState('');
const {userInfo} = useContext(UserContext);
const plantInfo = useContext(MyPlantDataContext)
const changeHandler = (e) => {
setDayValue(e.target.value)
}
const submitter = (e) => {
e.preventDefault();
const newPlantData = {
user_id: userInfo.user.user_id,
plant_id: plant.plant_id,
week_day_id: Number(dayValue),
}
axiosWithAuth()
.post(`/my-plants`, newPlantData)
.then(res => {
plantInfo.plantInfo.fetchPlants();
handleClose();
})
.catch(err => {console.log({'AddPlant err:': err})})
}
return (
<AddPlantContainer>
<div>
<PlantImg src={plant.plant_image} alt={plant.plant_name} />
<div>Upload Custom Image</div>
</div>
<PlantInfoContainer>
<div className='plantName'>{plant.plant_name}</div>
<div className='plantSpecies'>{plant.species_name}</div>
<PlantInfo>
<div>
<div className='needs'>Start Watering</div>
<WateringForm onChange={changeHandler}>
<div className='dayCheckbox' >
<input type="radio" id="monday" name="day" value='1'/>
<label htmlFor="monday">Monday</label><br/>
</div>
<div className='dayCheckbox' >
<input type="radio" id="tuesday" name="day" value="2"/>
<label htmlFor="tuesday">Tuesday</label>
</div>
<div className='dayCheckbox' >
<input type="radio" id="wednesday" name="day" value="3"/>
<label htmlFor="wednesday">Wednesday</label>
</div>
<div className='dayCheckbox' >
<input type="radio" id="thursday" name="day" value="4"/>
<label htmlFor="thursday">Thursday</label>
</div>
<div className='dayCheckbox' >
<input type="radio" id="friday" name="day" value="5"/>
<label htmlFor="friday">Friday</label>
</div>
<div className='dayCheckbox' >
<input type="radio" id="saturday" name="day" value="6"/>
<label htmlFor="saturday">Saturday</label>
</div>
<div className='dayCheckbox' >
<input type="radio" id="sunday" name="day" value="7"/>
<label htmlFor="sunday">Sunday</label>
</div>
</WateringForm>
</div>
<WaterLightContainer>
<div>
<div className='needs'> Watering Schedule</div>
<div className='needsDetails'>{plant.water_schedule}</div>
</div>
<div>
<div className='needs'>Light</div>
<div className='needsDetails'>{plant.light_level}</div>
</div>
<button className='button' onClick={submitter}>Add Plant</button>
</WaterLightContainer>
</PlantInfo>
</PlantInfoContainer>
</AddPlantContainer>
)
}
export default AddPlant;
|
import Cookies from "js-cookie";
export const setCookies = () => {
try {
window.dataLayer = window.dataLayer || [];
function gtag() {
window.dataLayer.push(arguments)
}
gtag('js', new Date());
gtag(
'config',
'UA-161400643-2',
{
'anonymize_ip': true,
'allowAdFeatures': false
}
);
window.ga('create', 'UA-145652997-1', 'auto', 'govuk_shared', { 'allowLinker': true });
window.ga('govuk_shared.require', 'linker');
window.ga('govuk_shared.set', 'anonymizeIp', true);
window.ga('govuk_shared.set', 'allowAdFeatures', false);
window.ga('govuk_shared.linker:autoLink', ['www.gov.uk']);
window.ga('send', 'pageview');
window.ga('govuk_shared.send', 'pageview');
} catch (error) {
console.group("Cookie preferences")
console.warn("Cookies accepted, but tracking is blocked by the browser.")
console.warn("Failed to set GA cookies.")
console.groupEnd()
}
};
export const deleteCookies = () => {
Cookies.remove("_ga");
Cookies.remove("_gid");
Cookies.remove("_gat_gtag_UA_161400643_2");
Cookies.remove("LocationBanner");
};
export const handleCookieAccept = ( accepted ) => {
const
today = new Date(),
[year, month, day] = [today.getFullYear(), today.getMonth(), today.getDate()],
cookieExpiryDate = new Date(year, month + 1, day).toUTCString();
if ( accepted ) {
document.cookie = `cookies_policy_21_3=${ encodeURIComponent('{"essential":true,"usage":true}') }; expires=${ cookieExpiryDate };`;
setCookies();
} else {
document.cookie = `cookies_policy_21_3=${ encodeURIComponent('{"essential":true,"usage":false}') }; expires=${ cookieExpiryDate };`;
deleteCookies();
}
document.cookie = `cookies_preferences_set_21_3=true; expires=${ cookieExpiryDate }; path=/`
};
|
// src/app/reducers/router.js
export default (state = {route:'/'}, action) => {
switch (action.type) {
case "UPDATE_ROUTE":
// console.info('Case "UPDATE_ROUTE"');
const nextState = {
...state,
route: action.route
};
return nextState;
default:
return state
}
};
|
from flask import Flask
app = Flask(__name__)
app.config.from_object('config')
import index
|
/*!
* OpenUI5
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define(['./ShellHeader','./ShellLayout','./library','./ShellRenderer'],function(S,a,l,b){"use strict";var c=a.extend("sap.ui.unified.Shell",{metadata:{library:"sap.ui.unified",deprecated:true,properties:{icon:{type:"sap.ui.core.URI",group:"Appearance",defaultValue:null},showCurtain:{type:"boolean",group:"Appearance",defaultValue:null,deprecated:true},showCurtainPane:{type:"boolean",group:"Appearance",defaultValue:null,deprecated:true},searchVisible:{type:"boolean",group:"Appearance",defaultValue:true}},aggregations:{curtainContent:{type:"sap.ui.core.Control",multiple:true,singularName:"curtainContent"},curtainPaneContent:{type:"sap.ui.core.Control",multiple:true,singularName:"curtainPaneContent"},headItems:{type:"sap.ui.unified.ShellHeadItem",multiple:true,singularName:"headItem",forwarding:{idSuffix:"-header",aggregation:"headItems"}},headEndItems:{type:"sap.ui.unified.ShellHeadItem",multiple:true,singularName:"headEndItem",forwarding:{idSuffix:"-header",aggregation:"headEndItems"}},search:{type:"sap.ui.core.Control",multiple:false,forwarding:{idSuffix:"-header",aggregation:"search"}},user:{type:"sap.ui.unified.ShellHeadUserItem",multiple:false,forwarding:{idSuffix:"-header",aggregation:"user"}}}}});c.prototype.init=function(){a.prototype.init.apply(this,arguments);this._header=new S(this.getId()+"-header");this.setHeader(this._header);};c.prototype.exit=function(){a.prototype.exit.apply(this,arguments);this._header.destroy();delete this._header;};c.prototype._getSearchWidth=function(){if(this._header===this.getHeader()&&this._header.getDomRef()){var s=this._header.$("hdr-center").children();if(s.length){return s.width();}}return-1;};c.prototype.setIcon=function(i){this.setProperty("icon",i,true);this._header.setLogo(i);return this;};c.prototype.getIcon=function(){return this._header.getLogo();};c.prototype.setSearchVisible=function(s){this.setProperty("searchVisible",s,true);this._header.setSearchVisible(s);return this;};c.prototype.getSearchVisible=function(){return this._header.getSearchVisible();};c.prototype.setHeader=function(h){return a.prototype.setHeader.apply(this,[h?h:this._header]);};c.prototype.destroyHeader=function(){if(this.getHeader()===this._header){return this;}return a.prototype.destroyHeader.apply(this,[]);};return c;});
|
/**
* Copyright 2013-2018 the original author or authors from the JHipster project.
*
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
*
* 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.
*/
const path = require('path');
const _ = require('lodash');
const chalk = require('chalk');
const fs = require('fs');
const shelljs = require('shelljs');
const semver = require('semver');
const exec = require('child_process').exec;
const os = require('os');
const pluralize = require('pluralize');
const jhiCore = require('jhipster-core');
const packagejs = require('../package.json');
const jhipsterUtils = require('./utils');
const constants = require('./generator-constants');
const PrivateBase = require('./generator-base-private');
const JHIPSTER_CONFIG_DIR = '.jhipster';
const MODULES_HOOK_FILE = `${JHIPSTER_CONFIG_DIR}/modules/jhi-hooks.json`;
const GENERATOR_JHIPSTER = 'generator-jhipster';
const CLIENT_MAIN_SRC_DIR = constants.CLIENT_MAIN_SRC_DIR;
const CLIENT_WEBPACK_DIR = constants.CLIENT_WEBPACK_DIR;
const SERVER_MAIN_SRC_DIR = constants.SERVER_MAIN_SRC_DIR;
const SERVER_MAIN_RES_DIR = constants.SERVER_MAIN_RES_DIR;
/**
* This is the Generator base class.
* This provides all the public API methods exposed via the module system.
* The public API methods can be directly utilized as well using commonJS require.
*
* The method signatures in public API should not be changed without a major version change
*/
module.exports = class extends PrivateBase {
/**
* Get the JHipster configuration from the .yo-rc.json file.
*
* @param {string} namespace - namespace of the .yo-rc.json config file. By default: generator-jhipster
*/
getJhipsterAppConfig(namespace = 'generator-jhipster') {
const fromPath = '.yo-rc.json';
if (shelljs.test('-f', fromPath)) {
const fileData = this.fs.readJSON(fromPath);
if (fileData && fileData[namespace]) {
return fileData[namespace];
}
}
return false;
}
/**
* Add a new menu element, at the root of the menu.
*
* @param {string} routerName - The name of the Angular router that is added to the menu.
* @param {string} glyphiconName - The name of the Glyphicon (from Bootstrap) that will be displayed.
* @param {boolean} enableTranslation - If translations are enabled or not
* @param {string} clientFramework - The name of the client framework
*/
addElementToMenu(routerName, glyphiconName, enableTranslation, clientFramework) {
let navbarPath;
try {
if (clientFramework === 'angularX') {
navbarPath = `${CLIENT_MAIN_SRC_DIR}app/layouts/navbar/navbar.component.html`;
jhipsterUtils.rewriteFile({
file: navbarPath,
needle: 'jhipster-needle-add-element-to-menu',
splicable: [`<li class="nav-item" routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}">
<a class="nav-link" routerLink="${routerName}" (click)="collapseNavbar()">
<fa-icon [icon]="'${glyphiconName}'" [fixedWidth]="true"></fa-icon>
<span${enableTranslation ? ` jhiTranslate="global.menu.${routerName}"` : ''}>${_.startCase(routerName)}</span>
</a>
</li>`
]
}, this);
} else {
// React
// TODO:
}
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + navbarPath + chalk.yellow(' or missing required jhipster-needle. Reference to ') + routerName} ${chalk.yellow('not added to menu.\n')}`);
this.debug('Error:', e);
}
}
/**
* Add external resources to root file(index.html).
*
* @param {string} resources - Resources added to root file.
* @param {string} comment - comment to add before resources content.
*/
addExternalResourcesToRoot(resources, comment) {
const indexFilePath = `${CLIENT_MAIN_SRC_DIR}index.html`;
let resourcesBlock = '';
if (comment) {
resourcesBlock += `<!-- ${comment} -->\n`;
}
resourcesBlock += `${resources}\n`;
try {
jhipsterUtils.rewriteFile({
file: indexFilePath,
needle: 'jhipster-needle-add-resources-to-root',
splicable: [resourcesBlock]
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + indexFilePath + chalk.yellow(' or missing required jhipster-needle. Resources are not added to JHipster app.\n')}`);
this.debug('Error:', e);
}
}
/**
* Add a new menu element to the admin menu.
*
* @param {string} routerName - The name of the Angular router that is added to the admin menu.
* @param {string} glyphiconName - The name of the Glyphicon (from Bootstrap) that will be displayed.
* @param {boolean} enableTranslation - If translations are enabled or not
* @param {string} clientFramework - The name of the client framework
*/
addElementToAdminMenu(routerName, glyphiconName, enableTranslation, clientFramework) {
let navbarAdminPath;
try {
if (clientFramework === 'angularX') {
navbarAdminPath = `${CLIENT_MAIN_SRC_DIR}app/layouts/navbar/navbar.component.html`;
jhipsterUtils.rewriteFile({
file: navbarAdminPath,
needle: 'jhipster-needle-add-element-to-admin-menu',
splicable: [`<li>
<a class="dropdown-item" routerLink="${routerName}" routerLinkActive="active" (click)="collapseNavbar()">
<fa-icon [icon]="'${glyphiconName}'" [fixedWidth]="true"></fa-icon>
<span${enableTranslation ? ` jhiTranslate="global.menu.admin.${routerName}"` : ''}>${_.startCase(routerName)}</span>
</a>
</li>`
]
}, this);
}
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + navbarAdminPath + chalk.yellow(' or missing required jhipster-needle. Reference to ') + routerName} ${chalk.yellow('not added to admin menu.\n')}`);
this.debug('Error:', e);
}
}
/**
* Add a new entity route path to webpacks config
*
* @param {string} microserviceName - The name of the microservice to put into the url
* @param {string} clientFramework - The name of the client framework
*/
addEntityToWebpack(microserviceName, clientFramework) {
const webpackDevPath = `${CLIENT_WEBPACK_DIR}/webpack.dev.js`;
jhipsterUtils.rewriteFile({
file: webpackDevPath,
needle: 'jhipster-needle-add-entity-to-webpack',
splicable: [`'/${microserviceName.toLowerCase()}',`]
}, this);
}
/**
* Add a new entity in the "entities" menu.
*
* @param {string} routerName - The name of the Angular router (which by default is the name of the entity).
* @param {boolean} enableTranslation - If translations are enabled or not
* @param {string} clientFramework - The name of the client framework
*/
addEntityToMenu(routerName, enableTranslation, clientFramework, entityTranslationKeyMenu = _.camelCase(routerName)) {
let entityMenuPath;
try {
if (this.clientFramework === 'angularX') {
entityMenuPath = `${CLIENT_MAIN_SRC_DIR}app/layouts/navbar/navbar.component.html`;
jhipsterUtils.rewriteFile({
file: entityMenuPath,
needle: 'jhipster-needle-add-entity-to-menu',
splicable: [
this.stripMargin(`|<li>
| <a class="dropdown-item" routerLink="${routerName}" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" (click)="collapseNavbar()">
| <fa-icon [icon]="'asterisk'" [fixedWidth]="true"></fa-icon>
| <span${enableTranslation ? ` jhiTranslate="global.menu.entities.${entityTranslationKeyMenu}"` : ''}>${_.startCase(routerName)}</span>
| </a>
| </li>`)
]
}, this);
} else if (this.clientFramework === 'react') {
// React
entityMenuPath = `${CLIENT_MAIN_SRC_DIR}app/shared/layout/header/menus/entities.tsx`;
jhipsterUtils.rewriteFile({
file: entityMenuPath,
needle: 'jhipster-needle-add-entity-to-menu',
splicable: [
this.stripMargin(`|<DropdownItem tag={Link} to="/entity/${routerName}">
| <FontAwesomeIcon icon="asterisk" /> ${enableTranslation ? `<Translate contentKey="global.menu.entities.${entityTranslationKeyMenu}" />` : `${_.startCase(routerName)}`}
| </DropdownItem>`)
]
}, this);
}
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + entityMenuPath + chalk.yellow(' or missing required jhipster-needle. Reference to ') + routerName} ${chalk.yellow('not added to menu.\n')}`);
this.debug('Error:', e);
}
}
/**
* Add a new entity in the TS modules file.
*
* @param {string} entityInstance - Entity Instance
* @param {string} entityClass - Entity Class
* @param {string} entityAngularName - Entity Angular Name
* @param {string} entityFolderName - Entity Folder Name
* @param {string} entityFileName - Entity File Name
* @param {boolean} enableTranslation - If translations are enabled or not
* @param {string} clientFramework - The name of the client framework
*/
addEntityToModule(entityInstance, entityClass, entityAngularName, entityFolderName, entityFileName, enableTranslation, clientFramework, microServiceName) {
const entityModulePath = `${CLIENT_MAIN_SRC_DIR}app/entities/entity.module.ts`;
try {
if (clientFramework === 'angularX') {
const appName = this.getAngularXAppName();
let importName = `${appName}${entityAngularName}Module`;
if (microServiceName) {
importName = `${importName} as ${this.upperFirstCamelCase(microServiceName)}${entityAngularName}Module`;
}
let importStatement = `|import { ${importName} } from './${entityFolderName}/${entityFileName}.module';`;
if (importStatement.length > constants.LINE_LENGTH) {
importStatement = `|// prettier-ignore
|import {
| ${importName}
|} from './${entityFolderName}/${entityFileName}.module';`;
}
jhipsterUtils.rewriteFile({
file: entityModulePath,
needle: 'jhipster-needle-add-entity-module-import',
splicable: [
this.stripMargin(importStatement)
]
}, this);
jhipsterUtils.rewriteFile({
file: entityModulePath,
needle: 'jhipster-needle-add-entity-module',
splicable: [
this.stripMargin(microServiceName ? `|${this.upperFirstCamelCase(microServiceName)}${entityAngularName}Module,` : `|${appName}${entityAngularName}Module,`)
]
}, this);
} else if (clientFramework === 'react') {
// React
const indexModulePath = `${CLIENT_MAIN_SRC_DIR}app/entities/index.tsx`;
jhipsterUtils.rewriteFile({
file: indexModulePath,
needle: 'jhipster-needle-add-route-import',
splicable: [
this.stripMargin(`|import ${entityAngularName} from './${entityFolderName}';`)
]
}, this);
jhipsterUtils.rewriteFile({
file: indexModulePath,
needle: 'jhipster-needle-add-route-path',
splicable: [
this.stripMargin(`|<ErrorBoundaryRoute path={\`\${match.url}/${entityFileName}\`} component={${entityAngularName}} />`)
]
}, this);
const indexReducerPath = `${CLIENT_MAIN_SRC_DIR}app/shared/reducers/index.ts`;
jhipsterUtils.rewriteFile({
file: indexReducerPath,
needle: 'jhipster-needle-add-reducer-import',
splicable: [
this.stripMargin(`|// prettier-ignore
|import ${entityInstance}, {
| ${entityAngularName}State
|} from 'app/entities/${entityFolderName}/${entityFileName}.reducer';`)
]
}, this);
jhipsterUtils.rewriteFile({
file: indexReducerPath,
needle: 'jhipster-needle-add-reducer-type',
splicable: [
this.stripMargin(`| readonly ${entityInstance}: ${entityAngularName}State;`)
]
}, this);
jhipsterUtils.rewriteFile({
file: indexReducerPath,
needle: 'jhipster-needle-add-reducer-combine',
splicable: [
this.stripMargin(`| ${entityInstance},`)
]
}, this);
}
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + entityModulePath + chalk.yellow(' or missing required jhipster-needle. Reference to ') + entityInstance + entityClass + entityFolderName + entityFileName} ${chalk.yellow(`not added to ${entityModulePath}.\n`)}`);
this.debug('Error:', e);
}
}
/**
* Add a new admin in the TS modules file.
*
* @param {string} appName - Angular2 application name.
* @param {string} adminAngularName - The name of the new admin item.
* @param {string} adminFolderName - The name of the folder.
* @param {string} adminFileName - The name of the file.
* @param {boolean} enableTranslation - If translations are enabled or not.
* @param {string} clientFramework - The name of the client framework.
*/
addAdminToModule(appName, adminAngularName, adminFolderName, adminFileName, enableTranslation, clientFramework) {
const adminModulePath = `${CLIENT_MAIN_SRC_DIR}app/admin/admin.module.ts`;
try {
let importStatement = `|import { ${appName}${adminAngularName}Module } from './${adminFolderName}/${adminFileName}.module';`;
if (importStatement.length > constants.LINE_LENGTH) {
importStatement = `|import {
| ${appName}${adminAngularName}Module
|} from './${adminFolderName}/${adminFileName}.module';`;
}
jhipsterUtils.rewriteFile({
file: adminModulePath,
needle: 'jhipster-needle-add-admin-module-import',
splicable: [
this.stripMargin(importStatement)
]
}, this);
jhipsterUtils.rewriteFile({
file: adminModulePath,
needle: 'jhipster-needle-add-admin-module',
splicable: [
this.stripMargin(`|${appName}${adminAngularName}Module,`)
]
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + appName + chalk.yellow(' or missing required jhipster-needle. Reference to ') + adminAngularName + adminFolderName + adminFileName + enableTranslation + clientFramework} ${chalk.yellow(`not added to ${adminModulePath}.\n`)}`);
this.debug('Error:', e);
}
}
/**
* Add a new element in the "global.json" translations.
*
* @param {string} key - Key for the menu entry
* @param {string} value - Default translated value
* @param {string} language - The language to which this translation should be added
*/
addElementTranslationKey(key, value, language) {
const fullPath = `${CLIENT_MAIN_SRC_DIR}i18n/${language}/global.json`;
try {
jhipsterUtils.rewriteFile({
file: fullPath,
needle: 'jhipster-needle-menu-add-element',
splicable: [
`"${key}": "${_.startCase(value)}",`
]
}, this);
} catch (e) {
this.log(chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow(' or missing required jhipster-needle. Reference to ') + language + chalk.yellow(' not added as a new entity in the menu.\n'));
this.debug('Error:', e);
}
}
/**
* Add a new element in the admin section of "global.json" translations.
*
* @param {string} key - Key for the menu entry
* @param {string} value - Default translated value
* @param {string} language - The language to which this translation should be added
*/
addAdminElementTranslationKey(key, value, language) {
const fullPath = `${CLIENT_MAIN_SRC_DIR}i18n/${language}/global.json`;
try {
jhipsterUtils.rewriteFile({
file: fullPath,
needle: 'jhipster-needle-menu-add-admin-element',
splicable: [
`"${key}": "${_.startCase(value)}",`
]
}, this);
} catch (e) {
this.log(chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow(' or missing required jhipster-needle. Reference to ') + language + chalk.yellow(' not added as a new entry in the admin menu.\n'));
this.debug('Error:', e);
}
}
/**
* Add a new entity in the "global.json" translations.
*
* @param {string} key - Key for the entity name
* @param {string} value - Default translated value
* @param {string} language - The language to which this translation should be added
*/
addEntityTranslationKey(key, value, language) {
const fullPath = `${CLIENT_MAIN_SRC_DIR}i18n/${language}/global.json`;
try {
jhipsterUtils.rewriteFile({
file: fullPath,
needle: 'jhipster-needle-menu-add-entry',
splicable: [
`"${key}": "${_.startCase(value)}",`
]
}, this);
} catch (e) {
this.log(chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow(' or missing required jhipster-needle. Reference to ') + language + chalk.yellow(' not added as a new entity in the menu.\n'));
this.debug('Error:', e);
}
}
/**
* Add a new entry as a root param in "global.json" translations.
*
* @param {string} key - Key for the entry
* @param {string} value - Default translated value or object with multiple key and translated value
* @param {string} language - The language to which this translation should be added
*/
addGlobalTranslationKey(key, value, language) {
const fullPath = `${CLIENT_MAIN_SRC_DIR}i18n/${language}/global.json`;
try {
jhipsterUtils.rewriteJSONFile(fullPath, (jsonObj) => {
jsonObj[key] = value;
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow('. Reference to ')}(key: ${key}, value:${value})${chalk.yellow(' not added to global translations.\n')}`);
this.debug('Error:', e);
}
}
/**
* Add a translation key to all installed languages
*
* @param {string} key - Key for the entity name
* @param {string} value - Default translated value
* @param {string} method - The method to be run with provided key and value from above
* @param {string} enableTranslation - specify if i18n is enabled
*/
addTranslationKeyToAllLanguages(key, value, method, enableTranslation) {
if (enableTranslation) {
this.getAllInstalledLanguages().forEach((language) => {
this[method](key, value, language);
});
}
}
/**
* get all the languages installed currently
*/
getAllInstalledLanguages() {
const languages = [];
this.getAllSupportedLanguages().forEach((language) => {
try {
const stats = fs.lstatSync(`${CLIENT_MAIN_SRC_DIR}i18n/${language}`);
if (stats.isDirectory()) {
languages.push(language);
}
} catch (e) {
this.debug('Error:', e);
// An exception is thrown if the folder doesn't exist
// do nothing as the language might not be installed
}
});
return languages;
}
/**
* get all the languages supported by JHipster
*/
getAllSupportedLanguages() {
return _.map(this.getAllSupportedLanguageOptions(), 'value');
}
/**
* check if a language is supported by JHipster
* @param {string} language - Key for the language
*/
isSupportedLanguage(language) {
return _.includes(this.getAllSupportedLanguages(), language);
}
/**
* check if Right-to-Left support is necesary for i18n
* @param {string[]} languages - languages array
*/
isI18nRTLSupportNecessary(languages) {
if (!languages) {
return false;
}
const rtlLanguages = this.getAllSupportedLanguageOptions().filter(langObj => langObj.rtl);
return languages.some(lang => !!rtlLanguages.find(langObj => langObj.value === lang));
}
/**
* return the localeId from the given language key (from constants.LANGUAGES)
* if no localeId is defined, return the language key (which is a localeId itself)
* @param {string} language - language key
*/
getLocaleId(language) {
const langObj = this.getAllSupportedLanguageOptions().find(langObj => langObj.value === language);
return langObj.localeId || language;
}
/**
* get all the languages options supported by JHipster
*/
getAllSupportedLanguageOptions() {
return constants.LANGUAGES;
}
/**
* Add a new dependency in the "bower.json".
*
* @param {string} name - dependency name
* @param {string} version - dependency version
*/
addBowerDependency(name, version) {
const fullPath = 'bower.json';
try {
jhipsterUtils.rewriteJSONFile(fullPath, (jsonObj) => {
if (jsonObj.dependencies === undefined) {
jsonObj.dependencies = {};
}
jsonObj.dependencies[name] = version;
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow('. Reference to ')}bower dependency (name: ${name}, version:${version})${chalk.yellow(' not added.\n')}`);
this.debug('Error:', e);
}
}
/**
* Add a new override configuration in the "bower.json".
*
* @param {string} bowerPackageName - Bower package name use in dependencies
* @param {array} main - You can specify which files should be selected
* @param {boolean} isIgnored - Default: false, Set to true if you want to ignore this package.
* @param {object} dependencies - You can override the dependencies of a package. Set to null to ignore the dependencies.
*
*/
addBowerOverride(bowerPackageName, main, isIgnored, dependencies) {
const fullPath = 'bower.json';
try {
jhipsterUtils.rewriteJSONFile(fullPath, (jsonObj) => {
const override = {};
if (main !== undefined && main.length > 0) {
override.main = main;
}
if (isIgnored) {
override.ignore = true;
}
if (dependencies) {
override.dependencies = dependencies;
}
if (jsonObj.overrides === undefined) {
jsonObj.overrides = {};
}
jsonObj.overrides[bowerPackageName] = override;
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow('. Reference to ')}bower override configuration (bowerPackageName: ${bowerPackageName}, main:${JSON.stringify(main)}, ignore:${isIgnored})${chalk.yellow(' not added.\n')}`);
this.debug('Error:', e);
}
}
/**
* Add a new parameter in the ".bowerrc".
*
* @param {string} key - name of the parameter
* @param {string | boolean | any} value - value of the parameter
*/
addBowerrcParameter(key, value) {
const fullPath = '.bowerrc';
try {
this.log(chalk.yellow(' update ') + fullPath);
jhipsterUtils.rewriteJSONFile(fullPath, (jsonObj) => {
jsonObj[key] = value;
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow('. Reference to ')}bowerrc parameter (key: ${key}, value:${value})${chalk.yellow(' not added.\n')}`);
this.debug('Error:', e);
}
}
/**
* Add a new dependency in the "package.json".
*
* @param {string} name - dependency name
* @param {string} version - dependency version
*/
addNpmDependency(name, version) {
const fullPath = 'package.json';
try {
jhipsterUtils.rewriteJSONFile(fullPath, (jsonObj) => {
if (jsonObj.dependencies === undefined) {
jsonObj.dependencies = {};
}
jsonObj.dependencies[name] = version;
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow('. Reference to ')}npm dependency (name: ${name}, version:${version})${chalk.yellow(' not added.\n')}`);
this.debug('Error:', e);
}
}
/**
* Add a new devDependency in the "package.json".
*
* @param {string} name - devDependency name
* @param {string} version - devDependency version
*/
addNpmDevDependency(name, version) {
const fullPath = 'package.json';
try {
jhipsterUtils.rewriteJSONFile(fullPath, (jsonObj) => {
if (jsonObj.devDependencies === undefined) {
jsonObj.devDependencies = {};
}
jsonObj.devDependencies[name] = version;
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow('. Reference to ')}npm devDependency (name: ${name}, version:${version})${chalk.yellow(' not added.\n')}`);
this.debug('Error:', e);
}
}
/**
* Add a new script in the "package.json".
*
* @param {string} name - script name
* @param {string} data - script version
*/
addNpmScript(name, data) {
const fullPath = 'package.json';
try {
jhipsterUtils.rewriteJSONFile(fullPath, (jsonObj) => {
if (jsonObj.scripts === undefined) {
jsonObj.scripts = {};
}
jsonObj.scripts[name] = data;
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow('. Reference to ')}npm script (name: ${name}, data:${data})${chalk.yellow(' not added.\n')}`);
this.debug('Error:', e);
}
}
/**
* Add a new module in the TS modules file.
*
* @param {string} appName - Angular2 application name.
* @param {string} angularName - The name of the new admin item.
* @param {string} folderName - The name of the folder.
* @param {string} fileName - The name of the file.
* @param {boolean} enableTranslation - If translations are enabled or not.
* @param {string} clientFramework - The name of the client framework.
*/
addAngularModule(appName, angularName, folderName, fileName, enableTranslation, clientFramework) {
const modulePath = `${CLIENT_MAIN_SRC_DIR}app/app.module.ts`;
try {
let importStatement = `|import { ${appName}${angularName}Module } from './${folderName}/${fileName}.module';`;
if (importStatement.length > constants.LINE_LENGTH) {
importStatement = `|import {
| ${appName}${angularName}Module
|} from './${folderName}/${fileName}.module';`;
}
jhipsterUtils.rewriteFile({
file: modulePath,
needle: 'jhipster-needle-angular-add-module-import',
splicable: [
this.stripMargin(importStatement)
]
}, this);
jhipsterUtils.rewriteFile({
file: modulePath,
needle: 'jhipster-needle-angular-add-module',
splicable: [
this.stripMargin(`|${appName}${angularName}Module,`)
]
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + appName + chalk.yellow(' or missing required jhipster-needle. Reference to ') + angularName + folderName + fileName + enableTranslation + clientFramework} ${chalk.yellow(`not added to ${modulePath}.\n`)}`);
this.debug('Error:', e);
}
}
/**
* Add a new http interceptor to the angular application in "blocks/config/http.config.js".
* The interceptor should be in its own .js file inside app/blocks/interceptor folder
* @param {string} interceptorName - angular name of the interceptor
*
*/
addAngularJsInterceptor(interceptorName) {
const fullPath = `${CLIENT_MAIN_SRC_DIR}app/blocks/config/http.config.js`;
try {
jhipsterUtils.rewriteFile({
file: fullPath,
needle: 'jhipster-needle-angularjs-add-interceptor',
splicable: [
`$httpProvider.interceptors.push('${interceptorName}');`
]
}, this);
} catch (e) {
this.log(chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow(' or missing required jhipster-needle. Interceptor not added to JHipster app.\n'));
this.debug('Error:', e);
}
}
/**
* Add a new entity to Ehcache, for the 2nd level cache of an entity and its relationships.
*
* @param {string} entityClass - the entity to cache
* @param {array} relationships - the relationships of this entity
* @param {string} packageName - the Java package name
* @param {string} packageFolder - the Java package folder
*/
addEntityToEhcache(entityClass, relationships, packageName, packageFolder) {
this.addEntityToCache(entityClass, relationships, packageName, packageFolder, 'ehcache');
}
/**
* Add a new entry to Ehcache in CacheConfiguration.java
*
* @param {string} entry - the entry (including package name) to cache
* @param {string} packageFolder - the Java package folder
*/
addEntryToEhcache(entry, packageFolder) {
this.addEntryToCache(entry, packageFolder, 'ehcache');
}
/**
* Add a new entity to the chosen cache provider, for the 2nd level cache of an entity and its relationships.
*
* @param {string} entityClass - the entity to cache
* @param {array} relationships - the relationships of this entity
* @param {string} packageName - the Java package name
* @param {string} packageFolder - the Java package folder
* @param {string} cacheProvider - the cache provider
*/
addEntityToCache(entityClass, relationships, packageName, packageFolder, cacheProvider) {
// Add the entity to ehcache
this.addEntryToCache(`${packageName}.domain.${entityClass}.class.getName()`, packageFolder, cacheProvider);
// Add the collections linked to that entity to ehcache
relationships.forEach((relationship) => {
const relationshipType = relationship.relationshipType;
if (relationshipType === 'one-to-many' || relationshipType === 'many-to-many') {
this.addEntryToCache(`${packageName}.domain.${entityClass}.class.getName() + ".${relationship.relationshipFieldNamePlural}"`, packageFolder, cacheProvider);
}
});
}
/**
* Add a new entry to the chosen cache provider in CacheConfiguration.java
*
* @param {string} entry - the entry (including package name) to cache
* @param {string} packageFolder - the Java package folder
* @param {string} cacheProvider - the cache provider
*/
addEntryToCache(entry, packageFolder, cacheProvider) {
try {
const cachePath = `${SERVER_MAIN_SRC_DIR}${packageFolder}/config/CacheConfiguration.java`;
if (cacheProvider === 'ehcache') {
jhipsterUtils.rewriteFile({
file: cachePath,
needle: 'jhipster-needle-ehcache-add-entry',
splicable: [`cm.createCache(${entry}, jcacheConfiguration);`
]
}, this);
} else if (cacheProvider === 'infinispan') {
jhipsterUtils.rewriteFile({
file: cachePath,
needle: 'jhipster-needle-infinispan-add-entry',
splicable: [`registerPredefinedCache(${entry}, new JCache<Object, Object>(
cacheManager.getCache(${entry}).getAdvancedCache(), this,
ConfigurationAdapter.create()));`
]
}, this);
}
} catch (e) {
this.log(chalk.yellow(`\nUnable to add ${entry} to CacheConfiguration.java file.\n\t${e.message}`));
this.debug('Error:', e);
}
}
/**
* Add a new changelog to the Liquibase master.xml file.
*
* @param {string} changelogName - The name of the changelog (name of the file without .xml at the end).
*/
addChangelogToLiquibase(changelogName) {
this.addLiquibaseChangelogToMaster(changelogName, 'jhipster-needle-liquibase-add-changelog');
}
/**
* Add a new constraints changelog to the Liquibase master.xml file.
*
* @param {string} changelogName - The name of the changelog (name of the file without .xml at the end).
*/
addConstraintsChangelogToLiquibase(changelogName) {
this.addLiquibaseChangelogToMaster(changelogName, 'jhipster-needle-liquibase-add-constraints-changelog');
}
/**
* Add a new changelog to the Liquibase master.xml file.
*
* @param {string} changelogName - The name of the changelog (name of the file without .xml at the end).
* @param {string} needle - The needle at where it has to be added.
*/
addLiquibaseChangelogToMaster(changelogName, needle) {
const fullPath = `${SERVER_MAIN_RES_DIR}config/liquibase/master.xml`;
try {
jhipsterUtils.rewriteFile({
file: fullPath,
needle,
splicable: [
`<include file="config/liquibase/changelog/${changelogName}.xml" relativeToChangelogFile="false"/>`
]
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow(' or missing required jhipster-needle. Reference to ') + changelogName}.xml ${chalk.yellow('not added.\n')}`);
this.debug('Error:', e);
}
}
/**
* Add a new column to a Liquibase changelog file for entity.
*
* @param {string} filePath - The full path of the changelog file.
* @param {string} content - The content to be added as column, can have multiple columns as well
*/
addColumnToLiquibaseEntityChangeset(filePath, content) {
try {
jhipsterUtils.rewriteFile({
file: filePath,
needle: 'jhipster-needle-liquibase-add-column',
splicable: [
content
]
}, this);
} catch (e) {
this.log(chalk.yellow('\nUnable to find ') + filePath + chalk.yellow(' or missing required jhipster-needle. Column not added.\n') + e);
this.debug('Error:', e);
}
}
/**
* Add a new changeset to a Liquibase changelog file for entity.
*
* @param {string} filePath - The full path of the changelog file.
* @param {string} content - The content to be added as changeset
*/
addChangesetToLiquibaseEntityChangelog(filePath, content) {
try {
jhipsterUtils.rewriteFile({
file: filePath,
needle: 'jhipster-needle-liquibase-add-changeset',
splicable: [
content
]
}, this);
} catch (e) {
this.log(chalk.yellow('\nUnable to find ') + filePath + chalk.yellow(' or missing required jhipster-needle. Changeset not added.\n') + e);
this.debug('Error:', e);
}
}
/**
* Add new css style to the angular application in "main.css".
*
* @param {boolean} isUseSass - flag indicating if sass should be used
* @param {string} style - css to add in the file
* @param {string} comment - comment to add before css code
*
* example:
*
* style = '.jhipster {\n color: #baa186;\n}'
* comment = 'New JHipster color'
*
* * ==========================================================================
* New JHipster color
* ========================================================================== *
* .jhipster {
* color: #baa186;
* }
*
*/
addMainCSSStyle(isUseSass, style, comment) {
if (isUseSass) {
this.addMainSCSSStyle(style, comment);
}
const fullPath = `${CLIENT_MAIN_SRC_DIR}content/css/main.css`;
let styleBlock = '';
if (comment) {
styleBlock += '/* ==========================================================================\n';
styleBlock += `${comment}\n`;
styleBlock += '========================================================================== */\n';
}
styleBlock += `${style}\n`;
try {
jhipsterUtils.rewriteFile({
file: fullPath,
needle: 'jhipster-needle-css-add-main',
splicable: [
styleBlock
]
}, this);
} catch (e) {
this.log(chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow(' or missing required jhipster-needle. Style not added to JHipster app.\n'));
this.debug('Error:', e);
}
}
/**
* Add new scss style to the angular application in "main.scss".
*
* @param {string} style - scss to add in the file
* @param {string} comment - comment to add before css code
*
* example:
*
* style = '.success {\n @extend .message;\n border-color: green;\n}'
* comment = 'Message'
*
* * ==========================================================================
* Message
* ========================================================================== *
* .success {
* @extend .message;
* border-color: green;
* }
*
*/
addMainSCSSStyle(style, comment) {
const fullPath = `${CLIENT_MAIN_SRC_DIR}scss/main.scss`;
let styleBlock = '';
if (comment) {
styleBlock += '/* ==========================================================================\n';
styleBlock += `${comment}\n`;
styleBlock += '========================================================================== */\n';
}
styleBlock += `${style}\n`;
try {
jhipsterUtils.rewriteFile({
file: fullPath,
needle: 'jhipster-needle-scss-add-main',
splicable: [
styleBlock
]
}, this);
} catch (e) {
this.log(chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow(' or missing required jhipster-needle. Style not added to JHipster app.\n'));
this.debug('Error:', e);
}
}
/**
* Add new scss style to the angular application in "vendor.scss".
*
* @param {string} style - scss to add in the file
* @param {string} comment - comment to add before css code
*
* example:
*
* style = '.success {\n @extend .message;\n border-color: green;\n}'
* comment = 'Message'
*
* * ==========================================================================
* Message
* ========================================================================== *
* .success {
* @extend .message;
* border-color: green;
* }
*
*/
addVendorSCSSStyle(style, comment) {
const fullPath = `${CLIENT_MAIN_SRC_DIR}content/scss/vendor.scss`;
let styleBlock = '';
if (comment) {
styleBlock += '/* ==========================================================================\n';
styleBlock += `${comment}\n`;
styleBlock += '========================================================================== */\n';
}
styleBlock += `${style}\n`;
try {
jhipsterUtils.rewriteFile({
file: fullPath,
needle: 'jhipster-needle-scss-add-vendor',
splicable: [
styleBlock
]
}, this);
} catch (e) {
this.log(chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow(' or missing required jhipster-needle. Style not added to JHipster app.\n'));
this.debug('Error:', e);
}
}
/**
* Copy third-party library resources path.
*
* @param {string} sourceFolder - third-party library resources source path
* @param {string} targetFolder - third-party library resources destination path
*/
copyExternalAssetsInWebpack(sourceFolder, targetFolder) {
const from = `${CLIENT_MAIN_SRC_DIR}content/${sourceFolder}/`;
const to = `content/${targetFolder}/`;
const webpackDevPath = `${CLIENT_WEBPACK_DIR}/webpack.common.js`;
let assetBlock = '';
if (sourceFolder && targetFolder) {
assetBlock = `{ from: './${from}', to: '${to}' },`;
}
try {
jhipsterUtils.rewriteFile({
file: webpackDevPath,
needle: 'jhipster-needle-add-assets-to-webpack',
splicable: [
assetBlock
]
}, this);
} catch (e) {
this.log(chalk.yellow('\nUnable to find ') + webpackDevPath + chalk.yellow(' or missing required jhipster-needle. Resource path not added to JHipster app.\n'));
this.debug('Error:', e);
}
}
/**
* Add a Maven dependency Management.
*
* @param {string} groupId - dependency groupId
* @param {string} artifactId - dependency artifactId
* @param {string} version - (optional) explicit dependency version number
* @param {string} type - (optional) explicit type
* @param {string} scope - (optional) explicit scope
* @param {string} other - (optional) explicit other thing: exclusions...
*/
addMavenDependencyManagement(groupId, artifactId, version, type, scope, other) {
const fullPath = 'pom.xml';
try {
let dependency = `${'<dependency>\n'
+ ' <groupId>'}${groupId}</groupId>\n`
+ ` <artifactId>${artifactId}</artifactId>\n`;
if (version) {
dependency += ` <version>${version}</version>\n`;
}
if (type) {
dependency += ` <type>${type}</type>\n`;
}
if (scope) {
dependency += ` <scope>${version}</scope>\n`;
}
if (other) {
dependency += `${other}\n`;
}
dependency += ' </dependency>';
jhipsterUtils.rewriteFile({
file: fullPath,
needle: 'jhipster-needle-maven-add-dependency-management',
splicable: [
dependency
]
}, this);
} catch (e) {
this.log(e);
this.log(`${chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow(' or missing required jhipster-needle. Reference to ')}maven dependency (groupId: ${groupId}, artifactId:${artifactId}, version:${version})${chalk.yellow(' not added.\n')}`);
this.debug('Error:', e);
}
}
/**
* Add a remote Maven Repository to the Maven build.
*
* @param {string} id - id of the repository
* @param {string} url - url of the repository
*/
addMavenRepository(id, url) {
const fullPath = 'pom.xml';
try {
const repository = `${'<repository>\n'
+ ' <id>'}${id}</id>\n`
+ ` <url>${url}</url>\n`
+ ' </repository>';
jhipsterUtils.rewriteFile({
file: fullPath,
needle: 'jhipster-needle-maven-repository',
splicable: [
repository
]
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow(' or missing required jhipster-needle. Reference to ')}maven repository (id: ${id}, url:${url})${chalk.yellow(' not added.\n')}`);
this.debug('Error:', e);
}
}
/**
* Add a distributionManagement to the Maven build.
*
* @param {string} id - id of the repository
* @param {string} url - url of the repository
*/
addMavenDistributionManagement(snapshotsId, snapshotsUrl, releasesId, releasesUrl) {
const fullPath = 'pom.xml';
try {
const repository = `${'<distributionManagement>\n'
+ ' <snapshotRepository>\n'
+ ' <id>'}${snapshotsId}</id>\n`
+ ` <url>${snapshotsUrl}</url>\n`
+ ' </snapshotRepository>\n'
+ ' <repository>\n'
+ ` <id>${releasesId}</id>\n`
+ ` <url>${releasesUrl}</url>\n`
+ ' </repository>\n'
+ ' </distributionManagement>';
jhipsterUtils.rewriteFile({
file: fullPath,
needle: 'jhipster-needle-distribution-management',
splicable: [
repository
]
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow(' or missing required jhipster-needle. Reference to ')}maven repository ${chalk.yellow(' not added.\n')}`);
this.debug('Error:', e);
}
}
/**
* Add a new Maven property.
*
* @param {string} name - property name
* @param {string} value - property value
*/
addMavenProperty(name, value) {
const fullPath = 'pom.xml';
try {
const property = `<${name}>${value}</${name}>`;
jhipsterUtils.rewriteFile({
file: fullPath,
needle: 'jhipster-needle-maven-property',
splicable: [
property
]
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow(' or missing required jhipster-needle. Reference to ')}maven property (name: ${name}, value:${value})${chalk.yellow(' not added.\n')}`);
this.debug('Error:', e);
}
}
/**
* Add a new Maven dependency.
*
* @param {string} groupId - dependency groupId
* @param {string} artifactId - dependency artifactId
* @param {string} version - (optional) explicit dependency version number
* @param {string} other - (optional) explicit other thing: scope, exclusions...
*/
addMavenDependency(groupId, artifactId, version, other) {
this.addMavenDependencyInDirectory('.', groupId, artifactId, version, other);
}
/**
* Add a new Maven dependency in a specific folder..
*
* @param {string} directory - the folder to add the dependency in
* @param {string} groupId - dependency groupId
* @param {string} artifactId - dependency artifactId
* @param {string} version - (optional) explicit dependency version number
* @param {string} other - (optional) explicit other thing: scope, exclusions...
*/
addMavenDependencyInDirectory(directory, groupId, artifactId, version, other) {
try {
let dependency = `${'<dependency>\n'
+ ' <groupId>'}${groupId}</groupId>\n`
+ ` <artifactId>${artifactId}</artifactId>\n`;
if (version) {
dependency += ` <version>${version}</version>\n`;
}
if (other) {
dependency += `${other}\n`;
}
dependency += ' </dependency>';
jhipsterUtils.rewriteFile({
path: directory,
file: 'pom.xml',
needle: 'jhipster-needle-maven-add-dependency',
splicable: [
dependency
]
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + directory + chalk.yellow(' or missing required jhipster-needle. Reference to ')}maven dependency (groupId: ${groupId}, artifactId:${artifactId}, version:${version})${chalk.yellow(' not added.\n')}`);
this.debug('Error:', e);
}
}
/**
* Add a new Maven plugin.
*
* @param {string} groupId - plugin groupId
* @param {string} artifactId - plugin artifactId
* @param {string} version - explicit plugin version number
* @param {string} other - explicit other thing: executions, configuration...
*/
addMavenPlugin(groupId, artifactId, version, other) {
const fullPath = 'pom.xml';
try {
let plugin = `${'<plugin>\n'
+ ' <groupId>'}${groupId}</groupId>\n`
+ ` <artifactId>${artifactId}</artifactId>\n`;
if (version) {
plugin += ` <version>${version}</version>\n`;
}
if (other) {
plugin += `${other}\n`;
}
plugin += ' </plugin>';
jhipsterUtils.rewriteFile({
file: fullPath,
needle: 'jhipster-needle-maven-add-plugin',
splicable: [
plugin
]
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow(' or missing required jhipster-needle. Reference to ')}maven plugin (groupId: ${groupId}, artifactId:${artifactId}, version:${version})${chalk.yellow(' not added.\n')}`);
this.debug('Error:', e);
}
}
/**
* Add a new Maven profile.
*
* @param {string} profileId - profile ID
* @param {string} other - explicit other thing: build, dependencies...
*/
addMavenProfile(profileId, other) {
const fullPath = 'pom.xml';
try {
let profile = '<profile>\n'
+ ` <id>${profileId}</id>\n`;
if (other) {
profile += `${other}\n`;
}
profile += ' </profile>';
jhipsterUtils.rewriteFile({
file: fullPath,
needle: 'jhipster-needle-maven-add-profile',
splicable: [
profile
]
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow(' or missing required jhipster-needle. Reference to ')}maven profile (id: ${profileId})${chalk.yellow(' not added.\n')}`);
this.debug('Error:', e);
}
}
/**
* A new Gradle plugin.
*
* @param {string} group - plugin GroupId
* @param {string} name - plugin name
* @param {string} version - explicit plugin version number
*/
addGradlePlugin(group, name, version) {
const fullPath = 'build.gradle';
try {
jhipsterUtils.rewriteFile({
file: fullPath,
needle: 'jhipster-needle-gradle-buildscript-dependency',
splicable: [
`classpath '${group}:${name}:${version}'`
]
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow(' or missing required jhipster-needle. Reference to ')}classpath: ${group}:${name}:${version}${chalk.yellow(' not added.\n')}`);
this.debug('Error:', e);
}
}
/**
* Add Gradle plugin to the plugins block
*
* @param {string} id - plugin id
* @param {string} version - explicit plugin version number
*/
addGradlePluginToPluginsBlock(id, version) {
const fullPath = 'build.gradle';
try {
jhipsterUtils.rewriteFile({
file: fullPath,
needle: 'jhipster-needle-gradle-plugins',
splicable: [
`id "${id}" version "${version}"`
]
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow(' or missing required jhipster-needle. Reference to ')}id ${id} version ${version}${chalk.yellow(' not added.\n')}`);
this.debug('Error:', e);
}
}
/**
* A new dependency to build.gradle file.
*
* @param {string} scope - scope of the new dependency, e.g. compile
* @param {string} group - maven GroupId
* @param {string} name - maven ArtifactId
* @param {string} version - (optional) explicit dependency version number
*/
addGradleDependencyManagement(scope, group, name, version) {
const fullPath = 'build.gradle';
let dependency = `${group}:${name}`;
if (version) {
dependency += `:${version}`;
}
try {
jhipsterUtils.rewriteFile({
file: fullPath,
needle: 'jhipster-needle-gradle-dependency-management',
splicable: [
`${scope} "${dependency}"`
]
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow(' or missing required jhipster-needle. Reference to ') + group}:${name}:${version}${chalk.yellow(' not added.\n')}`);
this.debug('Error:', e);
}
}
/**
* A new dependency to build.gradle file.
*
* @param {string} scope - scope of the new dependency, e.g. compile
* @param {string} group - maven GroupId
* @param {string} name - maven ArtifactId
* @param {string} version - (optional) explicit dependency version number
*/
addGradleDependency(scope, group, name, version) {
this.addGradleDependencyInDirectory('.', scope, group, name, version);
}
/**
* A new dependency to build.gradle file in a specific folder.
*
* @param {string} scope - scope of the new dependency, e.g. compile
* @param {string} group - maven GroupId
* @param {string} name - maven ArtifactId
* @param {string} version - (optional) explicit dependency version number
*/
addGradleDependencyInDirectory(directory, scope, group, name, version) {
let dependency = `${group}:${name}`;
if (version) {
dependency += `:${version}`;
}
try {
jhipsterUtils.rewriteFile({
path: directory,
file: 'build.gradle',
needle: 'jhipster-needle-gradle-dependency',
splicable: [
`${scope} "${dependency}"`
]
}, this);
} catch (e) {
this.log(`${chalk.yellow('\nUnable to find ') + directory + chalk.yellow(' or missing required jhipster-needle. Reference to ') + group}:${name}:${version}${chalk.yellow(' not added.\n')}`);
this.debug('Error:', e);
}
}
/**
* Apply from an external Gradle build script.
*
* @param {string} name - name of the file to apply from, must be 'fileName.gradle'
*/
applyFromGradleScript(name) {
const fullPath = 'build.gradle';
try {
jhipsterUtils.rewriteFile({
file: fullPath,
needle: 'jhipster-needle-gradle-apply-from',
splicable: [
`apply from: '${name}.gradle'`
]
}, this);
} catch (e) {
this.log(chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow(' or missing required jhipster-needle. Reference to ') + name + chalk.yellow(' not added.\n'));
this.debug('Error:', e);
}
}
/**
* Add a remote Maven Repository to the Gradle build.
*
* @param {string} url - url of the repository
* @param {string} username - (optional) username of the repository credentials
* @param {string} password - (optional) password of the repository credentials
*/
addGradleMavenRepository(url, username, password) {
const fullPath = 'build.gradle';
try {
let repository = 'maven {\n';
if (url) {
repository += ` url "${url}"\n`;
}
if (username || password) {
repository += ' credentials {\n';
if (username) {
repository += ` username = "${username}"\n`;
}
if (password) {
repository += ` password = "${password}"\n`;
}
repository += ' }\n';
}
repository += ' }';
jhipsterUtils.rewriteFile({
file: fullPath,
needle: 'jhipster-needle-gradle-repositories',
splicable: [
repository
]
}, this);
} catch (e) {
this.log(chalk.yellow('\nUnable to find ') + fullPath + chalk.yellow(' or missing required jhipster-needle. Reference to ') + url + chalk.yellow(' not added.\n'));
this.debug('Error:', e);
}
}
/**
* Generate a date to be used by Liquibase changelogs.
*/
dateFormatForLiquibase() {
const now = new Date();
const nowUTC = new Date(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), now.getUTCHours(), now.getUTCMinutes(), now.getUTCSeconds());
const year = `${nowUTC.getFullYear()}`;
let month = `${nowUTC.getMonth() + 1}`;
if (month.length === 1) {
month = `0${month}`;
}
let day = `${nowUTC.getDate()}`;
if (day.length === 1) {
day = `0${day}`;
}
let hour = `${nowUTC.getHours()}`;
if (hour.length === 1) {
hour = `0${hour}`;
}
let minute = `${nowUTC.getMinutes()}`;
if (minute.length === 1) {
minute = `0${minute}`;
}
let second = `${nowUTC.getSeconds()}`;
if (second.length === 1) {
second = `0${second}`;
}
return `${year}${month}${day}${hour}${minute}${second}`;
}
/**
* Copy templates with all the custom logic applied according to the type.
*
* @param {string} source - path of the source file to copy from
* @param {string} dest - path of the destination file to copy to
* @param {string} action - type of the action to be performed on the template file, i.e: stripHtml | stripJs | template | copy
* @param {object} generator - context that can be used as the generator instance or data to process template
* @param {object} opt - options that can be passed to template method
* @param {boolean} template - flag to use template method instead of copy method
*/
copyTemplate(source, dest, action, generator, opt = {}, template) {
const _this = generator || this;
let regex;
switch (action) {
case 'stripHtml':
regex = new RegExp([
/( (data-t|jhiT)ranslate="([a-zA-Z0-9 +{}'_](\.)?)+")/, // data-translate or jhiTranslate
/( translate(-v|V)alues="\{([a-zA-Z]|\d|:|\{|\}|\[|\]|-|'|\s|\.|_)*?\}")/, // translate-values or translateValues
/( translate-compile)/, // translate-compile
/( translate-value-max="[0-9{}()|]*")/, // translate-value-max
].map(r => r.source).join('|'), 'g');
jhipsterUtils.copyWebResource(source, dest, regex, 'html', _this, opt, template);
break;
case 'stripJs':
regex = new RegExp([
/(,[\s]*(resolve):[\s]*[{][\s]*(translatePartialLoader)['a-zA-Z0-9$,(){.<%=\->;\s:[\]]*(;[\s]*\}\][\s]*\}))/, // ng1 resolve block
/([\s]import\s\{\s?JhiLanguageService\s?\}\sfrom\s["|']ng-jhipster["|'];)/, // ng2 import jhiLanguageService
/(,?\s?JhiLanguageService,?\s?)/, // ng2 import jhiLanguageService
/(private\s[a-zA-Z0-9]*(L|l)anguageService\s?:\s?JhiLanguageService\s?,*[\s]*)/, // ng2 jhiLanguageService constructor argument
/(this\.[a-zA-Z0-9]*(L|l)anguageService\.setLocations\(\[['"a-zA-Z0-9\-_,\s]+\]\);[\s]*)/, // jhiLanguageService invocations
].map(r => r.source).join('|'), 'g');
jhipsterUtils.copyWebResource(source, dest, regex, 'js', _this, opt, template);
break;
case 'stripJsx':
regex = new RegExp([
/(import { ?Translate, ?translate ?} from 'react-jhipster';?)/, // Translate imports
/(import { ?translate, ?Translate ?} from 'react-jhipster';?)/, // translate imports
/( Translate,|, ?Translate|import { ?Translate ?} from 'react-jhipster';?)/, // Translate import
/( translate,|, ?translate|import { ?translate ?} from 'react-jhipster';?)/, // translate import
/<Translate(\s*)?((component="[a-z]+")(\s*)|(contentKey=("[a-zA-Z0-9.\-_]+"|\{.*\}))(\s*)|(interpolate=\{.*\})(\s*))*(\s*)\/?>|<\/Translate>/, // Translate component tag
].map(r => r.source).join('|'), 'g');
jhipsterUtils.copyWebResource(source, dest, regex, 'jsx', _this, opt, template);
break;
case 'copy':
_this.copy(source, dest);
break;
default:
_this.template(source, dest, _this, opt);
}
}
/**
* Copy html templates after stripping translation keys when translation is disabled.
*
* @param {string} source - path of the source file to copy from
* @param {string} dest - path of the destination file to copy to
* @param {object} generator - context that can be used as the generator instance or data to process template
* @param {object} opt - options that can be passed to template method
* @param {boolean} template - flag to use template method instead of copy
*/
processHtml(source, dest, generator, opt, template) {
this.copyTemplate(source, dest, 'stripHtml', generator, opt, template);
}
/**
* Copy Js templates after stripping translation keys when translation is disabled.
*
* @param {string} source - path of the source file to copy from
* @param {string} dest - path of the destination file to copy to
* @param {object} generator - context that can be used as the generator instance or data to process template
* @param {object} opt - options that can be passed to template method
* @param {boolean} template - flag to use template method instead of copy
*/
processJs(source, dest, generator, opt, template) {
this.copyTemplate(source, dest, 'stripJs', generator, opt, template);
}
/**
* Copy JSX templates after stripping translation keys when translation is disabled.
*
* @param {string} source - path of the source file to copy from
* @param {string} dest - path of the destination file to copy to
* @param {object} generator - context that can be used as the generator instance or data to process template
* @param {object} opt - options that can be passed to template method
* @param {boolean} template - flag to use template method instead of copy
*/
processJsx(source, dest, generator, opt, template) {
this.copyTemplate(source, dest, 'stripJsx', generator, opt, template);
}
/**
* Rewrite the specified file with provided content at the needle location
*
* @param {string} filePath - path of the source file to rewrite
* @param {string} needle - needle to look for where content will be inserted
* @param {string} content - content to be written
*/
rewriteFile(filePath, needle, content) {
try {
jhipsterUtils.rewriteFile({
file: filePath,
needle,
splicable: [
content
]
}, this);
} catch (e) {
this.log(chalk.yellow('\nUnable to find ') + filePath + chalk.yellow(' or missing required needle. File rewrite failed.\n'));
this.debug('Error:', e);
}
}
/**
* Replace the pattern/regex with provided content
*
* @param {string} filePath - path of the source file to rewrite
* @param {string} pattern - pattern to look for where content will be replaced
* @param {string} content - content to be written
* @param {string} regex - true if pattern is regex
*/
replaceContent(filePath, pattern, content, regex) {
try {
jhipsterUtils.replaceContent({
file: filePath,
pattern,
content,
regex
}, this);
} catch (e) {
this.log(chalk.yellow('\nUnable to find ') + filePath + chalk.yellow(' or missing required pattern. File rewrite failed.\n') + e);
this.debug('Error:', e);
}
}
/**
* Register a module configuration to .jhipster/modules/jhi-hooks.json
*
* @param {string} npmPackageName - npm package name of the generator
* @param {string} hookFor - from which JHipster generator this should be hooked ( 'entity' or 'app')
* @param {string} hookType - where to hook this at the generator stage ( 'pre' or 'post')
* @param {string} callbackSubGenerator[optional] - sub generator to invoke, if this is not given the module's main generator will be called, i.e app
* @param {string} description[optional] - description of the generator
*/
registerModule(npmPackageName, hookFor, hookType, callbackSubGenerator, description) {
try {
let modules;
let error;
let duplicate;
const moduleName = _.startCase(npmPackageName.replace(`${GENERATOR_JHIPSTER}-`, ''));
const generatorName = npmPackageName.replace('generator-', '');
const generatorCallback = `${generatorName}:${callbackSubGenerator || 'app'}`;
const moduleConfig = {
name: `${moduleName} generator`,
npmPackageName,
description: description || `A JHipster module to generate ${moduleName}`,
hookFor,
hookType,
generatorCallback
};
try {
// if file is not present, we got an empty list, no exception
modules = this.fs.readJSON(MODULES_HOOK_FILE, []);
duplicate = _.findIndex(modules, moduleConfig) !== -1;
} catch (err) {
error = true;
this.log(chalk.red('The JHipster module configuration file could not be read!'));
this.debug('Error:', err);
}
if (!error && !duplicate) {
modules.push(moduleConfig);
this.fs.writeJSON(MODULES_HOOK_FILE, modules, null, 4);
}
} catch (err) {
this.log(`\n${chalk.bold.red('Could not add jhipster module configuration')}`);
this.debug('Error:', err);
}
}
/**
* Add configuration to Entity.json files
*
* @param {string} file - configuration file name for the entity
* @param {string} key - key to be added or updated
* @param {object} value - value to be added
*/
updateEntityConfig(file, key, value) {
try {
const entityJson = this.fs.readJSON(file);
entityJson[key] = value;
this.fs.writeJSON(file, entityJson, null, 4);
} catch (err) {
this.log(chalk.red('The JHipster entity configuration file could not be read!') + err);
this.debug('Error:', err);
}
}
/**
* get the module hooks config json
*/
getModuleHooks() {
let modulesConfig = [];
try {
if (shelljs.test('-f', MODULES_HOOK_FILE)) {
modulesConfig = this.fs.readJSON(MODULES_HOOK_FILE);
}
} catch (err) {
this.log(chalk.red('The module configuration file could not be read!'));
}
return modulesConfig;
}
/**
* Call all the module hooks with the given options.
* @param {string} hookFor - "app" or "entity"
* @param {string} hookType - "pre" or "post"
* @param {any} options - the options to pass to the hooks
* @param {function} cb - callback to trigger at the end
*/
callHooks(hookFor, hookType, options, cb) {
const modules = this.getModuleHooks();
// run through all module hooks, which matches the hookFor and hookType
modules.forEach((module) => {
this.debug('Composing module with config:', module);
if (module.hookFor === hookFor && module.hookType === hookType) {
// compose with the modules callback generator
const hook = module.generatorCallback.split(':')[1];
try {
this.composeExternalModule(module.npmPackageName, hook || 'app', options);
} catch (e) {
this.log(chalk.red('Could not compose module ') + chalk.bold.yellow(module.npmPackageName)
+ chalk.red('. \nMake sure you have installed the module with ') + chalk.bold.yellow(`'npm install -g ${module.npmPackageName}'`));
this.debug('ERROR:', e);
}
}
});
this.debug('calling callback');
cb && cb();
}
/**
* Compose an external generator with Yeoman.
* @param {string} npmPackageName - package name
* @param {string} subGen - sub generator name
* @param {any} options - options to pass
*/
composeExternalModule(npmPackageName, subGen, options) {
let generatorTocall = path.join(process.cwd(), 'node_modules', npmPackageName, 'generators', subGen);
try {
if (!fs.existsSync(generatorTocall)) {
this.debug('using global module as local version could not be found in node_modules');
generatorTocall = path.join(npmPackageName, 'generators', subGen);
}
this.debug('Running yeoman compose with options: ', generatorTocall, options);
this.composeWith(require.resolve(generatorTocall), options);
} catch (err) {
this.debug('ERROR:', err);
const generatorName = npmPackageName.replace('generator-', '');
const generatorCallback = `${generatorName}:${subGen}`;
// Fallback for legacy modules
this.debug('Running yeoman legacy compose with options: ', generatorCallback, options);
this.composeWith(generatorCallback, options);
}
}
/**
* Get a name suitable for microservice
* @param {string} microserviceName
*/
getMicroserviceAppName(microserviceName) {
return _.camelCase(microserviceName) + (microserviceName.endsWith('App') ? '' : 'App');
}
/**
* Load an entity configuration file into context.
*/
loadEntityJson(fromPath = this.context.fromPath) {
const context = this.context;
try {
context.fileData = this.fs.readJSON(fromPath);
} catch (err) {
this.debug('Error:', err);
this.error(chalk.red('\nThe entity configuration file could not be read!\n'));
}
context.relationships = context.fileData.relationships || [];
context.fields = context.fileData.fields || [];
context.haveFieldWithJavadoc = false;
context.fields.forEach((field) => {
if (field.javadoc) {
context.haveFieldWithJavadoc = true;
}
});
context.changelogDate = context.fileData.changelogDate;
context.dto = context.fileData.dto;
context.service = context.fileData.service;
context.fluentMethods = context.fileData.fluentMethods;
context.clientRootFolder = context.fileData.clientRootFolder;
context.pagination = context.fileData.pagination;
context.searchEngine = _.isUndefined(context.fileData.searchEngine) ? context.searchEngine : context.fileData.searchEngine;
context.javadoc = context.fileData.javadoc;
context.entityTableName = context.fileData.entityTableName;
context.jhiPrefix = context.fileData.jhiPrefix || context.jhiPrefix;
context.skipCheckLengthOfIdentifier = context.fileData.skipCheckLengthOfIdentifier || context.skipCheckLengthOfIdentifier;
context.jhiTablePrefix = this.getTableName(context.jhiPrefix);
this.copyFilteringFlag(context.fileData, context, context);
if (_.isUndefined(context.entityTableName)) {
this.warning(`entityTableName is missing in .jhipster/${context.name}.json, using entity name as fallback`);
context.entityTableName = this.getTableName(context.name);
}
if (jhiCore.isReservedTableName(context.entityTableName, context.prodDatabaseType)) {
context.entityTableName = `${context.jhiTablePrefix}_${context.entityTableName}`;
}
context.fields.forEach((field) => {
context.fieldNamesUnderscored.push(_.snakeCase(field.fieldName));
context.fieldNameChoices.push({ name: field.fieldName, value: field.fieldName });
});
context.relationships.forEach((rel) => {
context.relNameChoices.push({ name: `${rel.relationshipName}:${rel.relationshipType}`, value: `${rel.relationshipName}:${rel.relationshipType}` });
});
if (context.fileData.angularJSSuffix !== undefined) {
context.entityAngularJSSuffix = context.fileData.angularJSSuffix;
}
context.useMicroserviceJson = context.useMicroserviceJson || !_.isUndefined(context.fileData.microserviceName);
if (context.applicationType === 'gateway' && context.useMicroserviceJson) {
context.microserviceName = context.fileData.microserviceName;
if (!context.microserviceName) {
this.error(chalk.red('Microservice name for the entity is not found. Entity cannot be generated!'));
}
context.microserviceAppName = this.getMicroserviceAppName(context.microserviceName);
context.skipServer = true;
}
}
/**
* get an entity from the configuration file
* @param {string} file - configuration file name for the entity
*/
getEntityJson(file) {
let entityJson = null;
try {
if (this.context.microservicePath) {
entityJson = this.fs.readJSON(path.join(this.context.microservicePath, JHIPSTER_CONFIG_DIR, `${_.upperFirst(file)}.json`));
} else {
entityJson = this.fs.readJSON(path.join(JHIPSTER_CONFIG_DIR, `${_.upperFirst(file)}.json`));
}
} catch (err) {
this.log(chalk.red(`The JHipster entity configuration file could not be read for file ${file}!`) + err);
this.debug('Error:', err);
}
return entityJson;
}
/**
* get sorted list of entities according to changelog date (i.e. the order in which they were added)
*/
getExistingEntities() {
const entities = [];
function isBefore(e1, e2) {
return e1.definition.changelogDate - e2.definition.changelogDate;
}
if (!shelljs.test('-d', JHIPSTER_CONFIG_DIR)) {
return entities;
}
return shelljs.ls(path.join(JHIPSTER_CONFIG_DIR, '*.json')).reduce((acc, file) => {
try {
const definition = jhiCore.readEntityJSON(file);
acc.push({ name: path.basename(file, '.json'), definition });
} catch (error) {
// not an entity file / malformed?
this.warning(`Unable to parse entity file ${file}`);
this.debug('Error:', error);
}
return acc;
}, entities).sort(isBefore);
}
/**
* Copy i18 files for given language
*
* @param {object} generator - context that can be used as the generator instance or data to process template
* @param {string} webappDir - webapp directory path
* @param {string} fileToCopy - file name to copy
* @param {string} lang - language for which file needs to be copied
*/
copyI18nFilesByName(generator, webappDir, fileToCopy, lang) {
const _this = generator || this;
_this.copy(`${webappDir}i18n/${lang}/${fileToCopy}`, `${webappDir}i18n/${lang}/${fileToCopy}`);
}
/**
* Check if the JHipster version used to generate an existing project is less than the passed version argument
*
* @param {string} version - A valid semver version string
*/
isJhipsterVersionLessThan(version) {
const jhipsterVersion = this.config.get('jhipsterVersion');
if (!jhipsterVersion) {
return true;
}
return semver.lt(jhipsterVersion, version);
}
/**
* executes a Git command using shellJS
* gitExec(args [, options ], callback)
*
* @param {string|array} args - can be an array of arguments or a string command
* @param {object} options[optional] - takes any of child process options
* @param {function} callback - a callback function to be called once process complete, The call back will receive code, stdout and stderr
*/
gitExec(args, options, callback) {
callback = arguments[arguments.length - 1]; // eslint-disable-line prefer-rest-params
if (arguments.length < 3) {
options = {};
}
if (options.async === undefined) options.async = true;
if (options.silent === undefined) options.silent = true;
if (options.trace === undefined) options.trace = true;
if (!Array.isArray(args)) {
args = [args];
}
const command = `git ${args.join(' ')}`;
if (options.trace) {
this.info(command);
}
shelljs.exec(command, options, callback);
}
/**
* get a table name in JHipster preferred style.
*
* @param {string} value - table name string
*/
getTableName(value) {
return this.hibernateSnakeCase(value);
}
/**
* get a table column name in JHipster preferred style.
*
* @param {string} value - table column name string
*/
getColumnName(value) {
return this.hibernateSnakeCase(value);
}
/**
* get a table column names plural form in JHipster preferred style.
*
* @param {string} value - table column name string
*/
getPluralColumnName(value) {
return this.getColumnName(pluralize(value));
}
/**
* get a table name for joined tables in JHipster preferred style.
*
* @param {string} entityName - name of the entity
* @param {string} relationshipName - name of the related entity
* @param {string} prodDatabaseType - database type
*/
getJoinTableName(entityName, relationshipName, prodDatabaseType) {
const joinTableName = `${this.getTableName(entityName)}_${this.getTableName(relationshipName)}`;
let limit = 0;
if (prodDatabaseType === 'oracle' && joinTableName.length > 30 && !this.skipCheckLengthOfIdentifier) {
this.warning(`The generated join table "${joinTableName}" is too long for Oracle (which has a 30 characters limit). It will be truncated!`);
limit = 30;
} else if (prodDatabaseType === 'mysql' && joinTableName.length > 64 && !this.skipCheckLengthOfIdentifier) {
this.warning(`The generated join table "${joinTableName}" is too long for MySQL (which has a 64 characters limit). It will be truncated!`);
limit = 64;
}
if (limit > 0) {
const halfLimit = Math.floor(limit / 2);
const entityTable = this.getTableName(entityName).substring(0, halfLimit);
const relationTable = this.getTableName(relationshipName).substring(0, limit - entityTable.length - 1);
return `${entityTable}_${relationTable}`;
}
return joinTableName;
}
/**
* get a constraint name for tables in JHipster preferred style after applying any length limits required.
*
* @param {string} entityName - name of the entity
* @param {string} columnOrRelationName - name of the column or related entity
* @param {string} prodDatabaseType - database type
* @param {boolean} noSnakeCase - do not convert names to snakecase
* @param {string} constraintNamePrefix - constraintName prefix for the constraintName
*/
getConstraintNameWithLimit(entityName, columnOrRelationName, prodDatabaseType, noSnakeCase, constraintNamePrefix = '') {
let constraintName;
if (noSnakeCase) {
constraintName = `${constraintNamePrefix}${entityName}_${columnOrRelationName}`;
} else {
constraintName = `${constraintNamePrefix}${this.getTableName(entityName)}_${this.getTableName(columnOrRelationName)}`;
}
let limit = 0;
if (prodDatabaseType === 'oracle' && constraintName.length >= 27 && !this.skipCheckLengthOfIdentifier) {
this.warning(`The generated constraint name "${constraintName}" is too long for Oracle (which has a 30 characters limit). It will be truncated!`);
limit = 28;
} else if (prodDatabaseType === 'mysql' && constraintName.length >= 61 && !this.skipCheckLengthOfIdentifier) {
this.warning(`The generated constraint name "${constraintName}" is too long for MySQL (which has a 64 characters limit). It will be truncated!`);
limit = 62;
}
if (limit > 0) {
const halfLimit = Math.floor(limit / 2);
const entityTable = noSnakeCase ? entityName.substring(0, halfLimit) : this.getTableName(entityName).substring(0, halfLimit);
const otherTable = noSnakeCase ? columnOrRelationName.substring(0, limit - entityTable.length - 2) : this.getTableName(columnOrRelationName).substring(0, limit - entityTable.length - 2);
return `${entityTable}_${otherTable}`;
}
return constraintName;
}
/**
* get a foreign key constraint name for tables in JHipster preferred style.
*
* @param {string} entityName - name of the entity
* @param {string} relationshipName - name of the related entity
* @param {string} prodDatabaseType - database type
* @param {boolean} noSnakeCase - do not convert names to snakecase
*/
getConstraintName(entityName, relationshipName, prodDatabaseType, noSnakeCase) {
// for backward compatibility
return this.getFKConstraintName(entityName, relationshipName, prodDatabaseType, noSnakeCase);
}
/**
* get a foreign key constraint name for tables in JHipster preferred style.
*
* @param {string} entityName - name of the entity
* @param {string} relationshipName - name of the related entity
* @param {string} prodDatabaseType - database type
* @param {boolean} noSnakeCase - do not convert names to snakecase
*/
getFKConstraintName(entityName, relationshipName, prodDatabaseType, noSnakeCase) {
return `${this.getConstraintNameWithLimit(entityName, relationshipName, prodDatabaseType, noSnakeCase, 'fk_')}_id`;
}
/**
* get a unique constraint name for tables in JHipster preferred style.
*
* @param {string} entityName - name of the entity
* @param {string} columnName - name of the column
* @param {string} prodDatabaseType - database type
* @param {boolean} noSnakeCase - do not convert names to snakecase
*/
getUXConstraintName(entityName, columnName, prodDatabaseType, noSnakeCase) {
return `ux_${this.getConstraintNameWithLimit(entityName, columnName, prodDatabaseType, noSnakeCase)}`;
}
/**
* Print an error message.
*
* @param {string} msg - message to print
*/
error(msg) {
this.env.error(`${chalk.red.bold('ERROR!')} ${msg}`);
}
/**
* Print a warning message.
*
* @param {string} msg - message to print
*/
warning(msg) {
this.log(`${chalk.yellow.bold('WARNING!')} ${msg}`);
}
/**
* Print an info message.
*
* @param {string} msg - message to print
*/
info(msg) {
this.log.info(msg);
}
/**
* Print a success message.
*
* @param {string} msg - message to print
*/
success(msg) {
this.log.ok(msg);
}
/**
* Generate a KeyStore for uaa authorization server.
*/
generateKeyStore() {
const done = this.async();
const keyStoreFile = `${SERVER_MAIN_RES_DIR}config/tls/keystore.p12`;
if (this.fs.exists(keyStoreFile)) {
this.log(chalk.cyan(`\nKeyStore '${keyStoreFile}' already exists. Leaving unchanged.\n`));
done();
} else {
shelljs.mkdir('-p', `${SERVER_MAIN_RES_DIR}config/tls`);
const javaHome = shelljs.env.JAVA_HOME;
let keytoolPath = '';
if (javaHome) {
keytoolPath = `${javaHome}/bin/`;
}
// Generate the PKCS#12 keystore
shelljs.exec(
`"${keytoolPath}keytool" -genkey -noprompt `
+ '-storetype PKCS12 '
+ '-keyalg RSA '
+ '-alias selfsigned '
+ `-keystore ${keyStoreFile} `
+ '-storepass password '
+ '-keypass password '
+ '-keysize 2048 '
+ '-validity 99999 '
+ `-dname "CN=Java Hipster, OU=Development, O=${this.packageName}, L=, ST=, C="`,
(code) => {
if (code !== 0) {
this.error('\nFailed to create a KeyStore with \'keytool\'', code);
} else {
this.log(chalk.green(`\nKeyStore '${keyStoreFile}' generated successfully.\n`));
}
done();
}
);
}
}
/**
* Prints a JHipster logo.
*/
printJHipsterLogo() {
this.log('\n');
this.log(`${chalk.green(' ██╗')}${chalk.red(' ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗')}`);
this.log(`${chalk.green(' ██║')}${chalk.red(' ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗')}`);
this.log(`${chalk.green(' ██║')}${chalk.red(' ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝')}`);
this.log(`${chalk.green(' ██╗ ██║')}${chalk.red(' ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║')}`);
this.log(`${chalk.green(' ╚██████╔╝')}${chalk.red(' ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗')}`);
this.log(`${chalk.green(' ╚═════╝ ')}${chalk.red(' ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝')}\n`);
this.log(chalk.white.bold(' https://www.jhipster.tech\n'));
this.log(chalk.white('Welcome to JHipster ') + chalk.yellow(`v${packagejs.version}`));
this.log(chalk.white(`Application files will be generated in folder: ${chalk.yellow(process.cwd())}`));
if (process.cwd() === this.getUserHome()) {
this.log(chalk.red.bold('\n️⚠️ WARNING ⚠️ You are in your HOME folder!'));
this.log(chalk.red('This can cause problems, you should always create a new directory and run the jhipster command from here.'));
this.log(chalk.white(`See the troubleshooting section at ${chalk.yellow('https://www.jhipster.tech/installation/')}`));
}
this.log(chalk.green(' _______________________________________________________________________________________________________________\n'));
this.log(chalk.white(` Documentation for creating an application is at ${chalk.yellow('https://www.jhipster.tech/creating-an-app/')}`));
this.log(chalk.white(` If you find JHipster useful, consider sponsoring the project at ${chalk.yellow('https://opencollective.com/generator-jhipster')}`));
this.log(chalk.green(' _______________________________________________________________________________________________________________\n'));
}
/**
* Return the user home
*/
getUserHome() {
return process.env[(process.platform === 'win32') ? 'USERPROFILE' : 'HOME'];
}
/**
* Checks if there is a newer JHipster version available.
*/
checkForNewVersion() {
try {
const done = this.async();
shelljs.exec(`npm show ${GENERATOR_JHIPSTER} version --fetch-retries 1 --fetch-retry-mintimeout 500 --fetch-retry-maxtimeout 500`, { silent: true }, (code, stdout, stderr) => {
if (!stderr && semver.lt(packagejs.version, stdout)) {
this.log(`${chalk.yellow(' ______________________________________________________________________________\n\n')
+ chalk.yellow(' JHipster update available: ') + chalk.green.bold(stdout.replace('\n', '')) + chalk.gray(` (current: ${packagejs.version})`)}\n`);
if (this.useYarn) {
this.log(chalk.yellow(` Run ${chalk.magenta(`yarn global upgrade ${GENERATOR_JHIPSTER}`)} to update.\n`));
} else {
this.log(chalk.yellow(` Run ${chalk.magenta(`npm install -g ${GENERATOR_JHIPSTER}`)} to update.\n`));
}
this.log(chalk.yellow(' ______________________________________________________________________________\n'));
}
done();
});
} catch (err) {
this.debug('Error:', err);
// fail silently as this function doesn't affect normal generator flow
}
}
/**
* get the Angular application name.
* @param {string} baseName of application
*/
getAngularAppName(baseName = this.baseName) {
const name = _.camelCase(baseName) + (baseName.endsWith('App') ? '' : 'App');
return name.match(/^\d/) ? 'App' : name;
}
/**
* get the Angular application name.
* @param {string} baseName of application
*/
getAngularXAppName(baseName = this.baseName) {
const name = this.upperFirstCamelCase(baseName);
return name.match(/^\d/) ? 'App' : name;
}
/**
* get the an upperFirst camelCase value.
* @param {string} value string to convert
*/
upperFirstCamelCase(value) {
return _.upperFirst(_.camelCase(value));
}
/**
* get the java main class name.
* @param {string} baseName of application
*/
getMainClassName(baseName = this.baseName) {
const main = _.upperFirst(this.getMicroserviceAppName(baseName));
const acceptableForJava = new RegExp('^[A-Z][a-zA-Z0-9_]*$');
return acceptableForJava.test(main) ? main : 'Application';
}
/**
* ask a prompt for apps name.
*
* @param {object} generator - generator instance to use
*/
askModuleName(generator) {
const done = generator.async();
const defaultAppBaseName = this.getDefaultAppName();
generator.prompt({
type: 'input',
name: 'baseName',
validate: (input) => {
if (!(/^([a-zA-Z0-9_]*)$/.test(input))) {
return 'Your base name cannot contain special characters or a blank space';
}
if ((generator.applicationType === 'microservice' || generator.applicationType === 'uaa') && /_/.test(input)) {
return 'Your base name cannot contain underscores as this does not meet the URI spec';
}
if (generator.applicationType === 'uaa' && input === 'auth') {
return 'Your UAA base name cannot be named \'auth\' as it conflicts with the gateway login routes';
}
if (input === 'application') {
return 'Your base name cannot be named \'application\' as this is a reserved name for Spring Boot';
}
return true;
},
message: 'What is the base name of your application?',
default: defaultAppBaseName
}).then((prompt) => {
generator.baseName = prompt.baseName;
done();
});
}
/**
* ask a prompt for i18n option.
*
* @param {object} generator - generator instance to use
*/
aski18n(generator) {
const languageOptions = this.getAllSupportedLanguageOptions();
const done = generator.async();
const prompts = [
{
type: 'confirm',
name: 'enableTranslation',
message: 'Would you like to enable internationalization support?',
default: true
},
{
when: response => response.enableTranslation === true,
type: 'list',
name: 'nativeLanguage',
message: 'Please choose the native language of the application',
choices: languageOptions,
default: 'en',
store: true
},
{
when: response => response.enableTranslation === true,
type: 'checkbox',
name: 'languages',
message: 'Please choose additional languages to install',
choices: response => _.filter(languageOptions, o => o.value !== response.nativeLanguage)
}
];
generator.prompt(prompts).then((prompt) => {
generator.enableTranslation = prompt.enableTranslation;
generator.nativeLanguage = prompt.nativeLanguage;
generator.languages = [prompt.nativeLanguage].concat(prompt.languages);
done();
});
}
/**
* compose using the language sub generator.
*
* @param {object} generator - generator instance to use
* @param {object} configOptions - options to pass to the generator
* @param {String} type - server | client
*/
composeLanguagesSub(generator, configOptions, type) {
if (generator.enableTranslation) {
// skip server if app type is client
const skipServer = type && type === 'client';
// skip client if app type is server
const skipClient = type && type === 'server';
generator.composeWith(require.resolve('./languages'), {
configOptions,
'skip-install': true,
'skip-server': skipServer,
'skip-client': skipClient,
languages: generator.languages,
force: generator.options.force,
debug: generator.options.debug
});
}
}
/**
* @Deprecated
* Add numbering to a question
*
* @param {String} msg - question text
* @param {boolean} cond - increment question
*/
getNumberedQuestion(msg, cond) {
return msg;
}
/**
* build a generated application.
*
* @param {String} buildTool - maven | gradle
* @param {String} profile - dev | prod
* @param {Function} cb - callback when build is complete
*/
buildApplication(buildTool, profile, cb) {
let buildCmd = 'mvnw verify -DskipTests=true -B';
if (buildTool === 'gradle') {
buildCmd = 'gradlew bootWar -x test';
}
if (os.platform() !== 'win32') {
buildCmd = `./${buildCmd}`;
}
buildCmd += ` -P${profile}`;
const child = {};
child.stdout = exec(buildCmd, { maxBuffer: 1024 * 10000 }, cb).stdout;
child.buildCmd = buildCmd;
return child;
}
/**
* write the given files using provided config.
*
* @param {object} files - files to write
* @param {object} generator - the generator instance to use
* @param {boolean} returnFiles - weather to return the generated file list or to write them
* @param {string} prefix - pefix to add to path
*/
writeFilesToDisk(files, generator, returnFiles, prefix) {
const _this = generator || this;
const filesOut = [];
const startTime = new Date();
// using the fastest method for iterations
for (let i = 0, blocks = Object.keys(files); i < blocks.length; i++) {
for (let j = 0, blockTemplates = files[blocks[i]]; j < blockTemplates.length; j++) {
const blockTemplate = blockTemplates[j];
if (!blockTemplate.condition || blockTemplate.condition(_this)) {
const path = blockTemplate.path || '';
blockTemplate.templates.forEach((templateObj) => {
let templatePath = path;
let method = 'template';
let useTemplate = false;
let options = {};
let templatePathTo;
if (typeof templateObj === 'string') {
templatePath += templateObj;
} else {
if (typeof templateObj.file === 'string') {
templatePath += templateObj.file;
} else if (typeof templateObj.file === 'function') {
templatePath += templateObj.file(_this);
}
method = templateObj.method ? templateObj.method : method;
useTemplate = templateObj.template ? templateObj.template : useTemplate;
options = templateObj.options ? templateObj.options : options;
}
if (templateObj && templateObj.renameTo) {
templatePathTo = path + templateObj.renameTo(_this);
} else {
// remove the .ejs suffix
templatePathTo = templatePath.replace('.ejs', '');
}
filesOut.push(templatePathTo);
if (!returnFiles) {
let templatePathFrom = prefix ? `${prefix}/${templatePath}` : templatePath;
if (
!templateObj.noEjs && !templatePathFrom.endsWith('.png')
&& !templatePathFrom.endsWith('.jpg') && !templatePathFrom.endsWith('.gif')
&& !templatePathFrom.endsWith('.svg') && !templatePathFrom.endsWith('.ico')
) {
templatePathFrom = `${templatePathFrom}.ejs`;
}
// if (method === 'template')
_this[method](templatePathFrom, templatePathTo, _this, options, useTemplate);
}
});
}
}
}
this.debug(`Time taken to write files: ${new Date() - startTime}ms`);
return filesOut;
}
/**
* Setup client instance level options from context.
* all variables should be set to dest,
* all variables should be referred from context,
* all methods should be called on generator,
* @param {any} generator - generator instance
* @param {any} context - context to use default is generator instance
* @param {any} dest - destination context to use default is context
*/
setupClientOptions(generator, context = generator, dest = context) {
dest.skipServer = context.configOptions.skipServer || context.config.get('skipServer');
dest.skipUserManagement = context.configOptions.skipUserManagement || context.options['skip-user-management'] || context.config.get('skipUserManagement');
dest.skipCommitHook = context.options['skip-commit-hook'] || context.config.get('skipCommitHook');
dest.authenticationType = context.options.auth || context.configOptions.authenticationType || context.config.get('authenticationType');
if (dest.authenticationType === 'oauth2') {
dest.skipUserManagement = true;
}
const uaaBaseName = context.options.uaaBaseName || context.configOptions.uaaBaseName || context.options['uaa-base-name'] || context.config.get('uaaBaseName');
if (context.options.auth === 'uaa' && _.isNil(uaaBaseName)) {
generator.error('when using --auth uaa, a UAA basename must be provided with --uaa-base-name');
}
dest.uaaBaseName = uaaBaseName;
dest.serviceDiscoveryType = context.configOptions.serviceDiscoveryType || context.config.get('serviceDiscoveryType');
dest.buildTool = context.options.build;
dest.websocket = context.options.websocket;
dest.devDatabaseType = context.options.db || context.configOptions.devDatabaseType || context.config.get('devDatabaseType');
dest.prodDatabaseType = context.options.db || context.configOptions.prodDatabaseType || context.config.get('prodDatabaseType');
dest.databaseType = generator.getDBTypeFromDBValue(context.options.db) || context.configOptions.databaseType || context.config.get('databaseType');
dest.searchEngine = context.options['search-engine'] || context.config.get('searchEngine');
dest.cacheProvider = context.options['cache-provider'] || context.config.get('cacheProvider') || context.config.get('hibernateCache') || 'no';
dest.enableHibernateCache = context.options['hb-cache'] || context.config.get('enableHibernateCache') || (context.config.get('hibernateCache') !== undefined && context.config.get('hibernateCache') !== 'no');
dest.otherModules = context.configOptions.otherModules || [];
dest.jhiPrefix = context.configOptions.jhiPrefix || context.config.get('jhiPrefix') || context.options['jhi-prefix'];
dest.jhiPrefixCapitalized = _.upperFirst(generator.jhiPrefix);
dest.jhiPrefixDashed = _.kebabCase(generator.jhiPrefix);
dest.testFrameworks = [];
if (context.options.protractor) dest.testFrameworks.push('protractor');
dest.baseName = context.configOptions.baseName;
dest.logo = context.configOptions.logo;
dest.useYarn = context.configOptions.useYarn = !context.options.npm;
dest.clientPackageManager = context.configOptions.clientPackageManager;
dest.isDebugEnabled = context.configOptions.isDebugEnabled || context.options.debug;
dest.experimental = context.configOptions.experimental || context.options.experimental;
}
/**
* Setup Server instance level options from context.
* all variables should be set to dest,
* all variables should be referred from context,
* all methods should be called on generator,
* @param {any} generator - generator instance
* @param {any} context - context to use default is generator instance
* @param {any} dest - destination context to use default is context
*/
setupServerOptions(generator, context = generator, dest = context) {
dest.skipClient = !context.options['client-hook'] || context.configOptions.skipClient || context.config.get('skipClient');
dest.skipUserManagement = context.configOptions.skipUserManagement || context.options['skip-user-management'] || context.config.get('skipUserManagement');
dest.enableTranslation = context.options.i18n || context.configOptions.enableTranslation || context.config.get('enableTranslation');
dest.testFrameworks = [];
if (context.options.gatling) dest.testFrameworks.push('gatling');
if (context.options.cucumber) dest.testFrameworks.push('cucumber');
dest.logo = context.configOptions.logo;
dest.baseName = context.configOptions.baseName;
dest.clientPackageManager = context.configOptions.clientPackageManager;
dest.isDebugEnabled = context.configOptions.isDebugEnabled || context.options.debug;
dest.experimental = context.configOptions.experimental || context.options.experimental;
}
/**
* Setup Entity instance level options from context.
* all variables should be set to dest,
* all variables should be referred from context,
* all methods should be called on generator,
* @param {any} generator - generator instance
* @param {any} context - context to use default is generator instance
* @param {any} dest - destination context to use default is context
*/
setupEntityOptions(generator, context = generator, dest = context) {
dest.name = context.options.name;
// remove extension if feeding json files
if (dest.name !== undefined) {
dest.name = dest.name.replace('.json', '');
}
dest.regenerate = context.options.regenerate;
dest.fluentMethods = context.options['fluent-methods'];
dest.skipCheckLengthOfIdentifier = context.options['skip-check-length-of-identifier'];
dest.entityTableName = generator.getTableName(context.options['table-name'] || dest.name);
dest.entityNameCapitalized = _.upperFirst(dest.name);
dest.entityAngularJSSuffix = context.options['angular-suffix'];
dest.skipUiGrouping = context.options['skip-ui-grouping'];
dest.clientRootFolder = context.options['skip-ui-grouping'] ? '' : context.options['client-root-folder'];
dest.isDebugEnabled = context.options.debug;
dest.experimental = context.options.experimental;
if (dest.entityAngularJSSuffix && !dest.entityAngularJSSuffix.startsWith('-')) {
dest.entityAngularJSSuffix = `-${dest.entityAngularJSSuffix}`;
}
dest.rootDir = generator.destinationRoot();
// enum-specific consts
dest.enums = [];
dest.existingEnum = false;
dest.fieldNamesUnderscored = ['id'];
// these variable hold field and relationship names for question options during update
dest.fieldNameChoices = [];
dest.relNameChoices = [];
}
/**
* Get all the generator configuration from the .yo-rc.json file
* @param {Generator} generator the generator instance to use
* @param {boolean} force force getting direct from file
*/
getAllJhipsterConfig(generator = this, force) {
let configuration = generator.config.getAll() || {};
if ((force || !configuration.baseName) && jhiCore.FileUtils.doesFileExist('.yo-rc.json')) {
const yoRc = JSON.parse(fs.readFileSync('.yo-rc.json', { encoding: 'utf-8' }));
configuration = yoRc['generator-jhipster'];
// merge the blueprint config if available
if (configuration.blueprint) {
configuration = Object.assign(configuration, yoRc[configuration.blueprint]);
}
}
if (!configuration.get || typeof configuration.get !== 'function') {
Object.assign(configuration, {
getAll: () => configuration,
get: key => configuration[key],
set: (key, value) => { configuration[key] = value; }
});
}
return configuration;
}
/**
* Fetch files from the generator-jhipster instance installed
* @param {string} subpath : the path to fetch from
*/
fetchFromInstalledJHipster(subpath) {
return path.join(__dirname, subpath);
}
};
|
import datetime
from django.test import TestCase
from django.urls import reverse
from django.utils import timezone
from .models import Question
def create_question(question_text, days):
time = timezone.now() + datetime.timedelta(days=days)
return Question.objects.create(question_text=question_text, pub_date=time)
class QuestionMethodTests(TestCase):
def test_index_view_with_no_question(self):
response = self.client.get(reverse('polls:index'))
self.assertEqual(response.status_code, 200)
self.assertContains(response, "No polls are available")
self.assertQuerysetEqual(response.context['latest_question_list'])
def test_index_view_with_a_past_question(self):
create_question(question_text="Past question.", days=-30)
response = self.client.get(reverse('polls:index'))
self.assertQuerysetEqual(
response.context['latest_question_list'],
['<Question: Past question.>']
)
def test_index_view_with_a_future_question(self):
"""
Questions with a pub_date in the future should not be displayed on
the index page.
"""
create_question(question_text="Future question.", days=30)
response = self.client.get(reverse('polls:index'))
self.assertContains(response, "No polls are available.")
self.assertQuerysetEqual(response.context['latest_question_list'], [])
def test_index_view_with_future_question_and_past_question(self):
"""
Even if both past and future questions exist, only past questions
should be displayed.
"""
create_question(question_text="Past question.", days=-30)
create_question(question_text="Future question.", days=30)
response = self.client.get(reverse('polls:index'))
self.assertQuerysetEqual(
response.context['latest_question_list'],
['<Question: Past question.>']
)
def test_index_view_with_two_past_questions(self):
"""
The questions index page may display multiple questions.
"""
create_question(question_text="Past question 1.", days=-30)
create_question(question_text="Past question 2.", days=-5)
response = self.client.get(reverse('polls:index'))
self.assertQuerysetEqual(
response.context['latest_question_list'],
['<Question: Past question 2.>', '<Question: Past question 1.>']
)
def test_was_published_recently_with_future_question(self):
time = timezone.now() + datetime.timedelta(days=30)
future_question = Question(pub_date=time)
self.assertIs(future_question.was_published_recently(), False)
def test_was_published_recently_with_old_question(self):
time = timezone.now() - datetime.timedelta(days=30)
old_question = Question(pub_date=time)
self.assertIs(old_question.was_published_recently(), False)
class QuestionIndexDetailTests(TestCase):
def test_detail_view_with_a_future_question(self):
future_question = create_question(question_text='Future question', days=5)
url = reverse('polls:detail', args=(future_question.id,))
response = self.client.get(url)
self.assertEqual(response.status_code, 404)
def test_detail_view_with_a_past_question(self):
past_question = create_question(question_text='Past question', days=-5)
url = reverse('polls:detail', args=(past_question.id,))
response = self.client.get(url)
self.assertContains(response, past_question.question_text)
|
"""
Pandora API Exceptions
This module contains the API exceptions from the Pandora API. The exception
classes are automatically generated from the API spec below and are added to
this module at first import. Exceptions will always be a sub-class of the base
PandoraException.
The name of the exception class is the message name with space removed and each
word capitalized. If the exception message contains a dash the class name will
not contain the dash or anything that follows it.
"""
__API_EXCEPTIONS__ = {
0: "Internal Server Error",
1: "Maintenance Mode",
2: "Missing API Method",
3: "Missing Auth Token",
4: "Missing Partner ID",
5: "Missing User ID",
6: "Secure Protocol Required",
7: "Certificate Required",
8: "Parameter Type Mismatch",
9: "Parameter Missing",
10: "Parameter Value Invalid",
11: "API Version Not Supported",
12: "Pandora not available in this country",
13: "Bad Sync Time",
14: "Unknown Method Name",
15: "Wrong Protocol - (http/https)",
1000: "Read Only Mode",
1001: "Invalid Auth Token",
1002: "Invalid Partner Login",
1003: "Listener Not Authorized - Subscription or Trial Expired",
1004: "User Not Authorized",
1005: "Station limit reached",
1006: "Station does not exist",
1009: "Device Not Found",
1010: "Partner Not Authorized",
1011: "Invalid Username",
1012: "Invalid Password",
1023: "Device Model Invalid",
1039: "Too many requests for a new playlist",
9999: "Authentication Required",
}
class PandoraException(Exception):
"""Pandora API Exception
Translates exceptions to user readable info.
"""
code = None
message = "Unknown Exception"
def __init__(self, extended_message=""):
self.extended_message = extended_message
super(Exception, self).__init__(self.message)
@classmethod
def from_code(cls, code, extended_message):
exc = __API_EXCEPTIONS__.get(code)
if not exc:
exc = PandoraException(extended_message)
exc.code = code
return exc
else:
return exc(extended_message)
@staticmethod
def _format_name(name):
output = []
for part in name.split(" "):
if part == "-":
break
else:
output.append(part.capitalize())
return "".join(output)
@staticmethod
def export_exceptions(export_to):
for code, api_message in __API_EXCEPTIONS__.items():
name = PandoraException._format_name(api_message)
exception = type(name, (PandoraException,), {
"code": code,
"message": api_message,
})
export_to[name] = __API_EXCEPTIONS__[code] = exception
PandoraException.export_exceptions(locals())
class InvalidUserLogin(InvalidPartnerLogin):
"""Pydora Internal Login Error
This is thrown around a user login to disambiguate a login that is invalid
due to user error vs a login that is invalid due to a partner credential
error. The Pandora API returns 1002 in both cases.
"""
message = "Invalid User Login"
|
let _ = require("lodash");
var BOOLEAN = {
__one_of: [true, false]
};
module.exports = function (api) {
api.addEndpointDescription('_get_mapping', {
methods: ['GET'],
priority: 10, // collides with get doc by id
patterns: [
"{indices}/_mapping",
"{indices}/_mapping/{types}",
"{indices}/{types}/_mapping",
"_mapping"
]
});
api.addEndpointDescription('_get_field_mapping', {
methods: ['GET'],
priority: 10, // collides with get doc by id
patterns: [
"{indices}/_mapping/field/{fields}",
"{indices}/_mapping/{type}/field/{fields}"
],
url_params: {
"include_defaults": "__flag__"
}
});
api.addEndpointDescription('_delete_mapping', {
methods: ['DELETE'],
priority: 10, // collides with get doc by id
patterns: [
"{indices}/_mapping",
"{indices}/_mapping/{types}",
"{indices}/{types}/_mapping",
"_mapping"
]
});
api.addEndpointDescription('_put_type_mapping', {
methods: ['PUT', 'POST'],
patterns: [
"{indices}/{type}/_mapping",
"{indices}/_mapping/{type}"
],
priority: 10, // collides with put doc by id
data_autocomplete_rules: {
__template: {
properties: {
'FIELD': {}
}
},
'_source': {
'enabled': BOOLEAN
},
'_all': {
'enabled': BOOLEAN
},
'_field_names': {
'index': BOOLEAN
},
'_routing': {
'required': BOOLEAN,
},
'_index': {
'enabled': BOOLEAN
},
'_parent': {
__template: {
'type': ''
},
'type': '{type}'
},
'_timestamp': {
'enabled': BOOLEAN,
'format': 'YYYY-MM-dd',
'default': ""
},
'dynamic_date_formats': ['yyyy-MM-dd'],
'date_detection': BOOLEAN,
'numeric_detection': BOOLEAN,
'properties': {
'*': {
type: {
__one_of: ['text', 'keyword', 'float', 'half_float', 'scaled_float', 'double', 'byte', 'short', 'integer', 'long', 'date', 'boolean',
'binary', 'object', 'nested', "geo_point", "geo_shape"
]
},
// strings
store: BOOLEAN,
index: BOOLEAN,
term_vector: {
__one_of: ['no', 'yes', 'with_offsets', 'with_positions', 'with_positions_offsets']
},
boost: 1.0,
null_value: '',
norms: BOOLEAN,
index_options: {
__one_of: ['docs', 'freqs', 'positions']
},
analyzer: 'standard',
search_analyzer: 'standard',
include_in_all: {
__one_of: [false, true]
},
ignore_above: 10,
position_increment_gap: 0,
// numeric
precision_step: 4,
ignore_malformed: BOOLEAN,
scaling_factor: 100,
// geo_point
lat_lon: {
__one_of: [true, false]
},
geohash: {
__one_of: [true, false]
},
geohash_precision: '1m',
geohash_prefix: {
__one_of: [true, false]
},
validate: {
__one_of: [true, false]
},
validate_lat: {
__one_of: [true, false]
},
validate_lon: {
__one_of: [true, false]
},
normalize: {
__one_of: [true, false]
},
normalize_lat: {
__one_of: [true, false]
},
normalize_lon: {
__one_of: [true, false]
},
// geo_shape
tree: {
__one_of: ['geohash', 'quadtree']
},
precision: '5km',
tree_levels: 12,
distance_error_pct: 0.025,
orientation: 'ccw',
// dates
format: {
__one_of: _.flatten([_.map(['date', 'date_time', 'date_time_no_millis',
'ordinal_date', 'ordinal_date_time', 'ordinal_date_time_no_millis',
'time', 'time_no_millis', 't_time', 't_time_no_millis',
'week_date', 'week_date_time', 'week_date_time_no_millis'], function (s) {
return ['basic_' + s, 'strict_' + s];
}),
[
'date', 'date_hour', 'date_hour_minute', 'date_hour_minute_second', 'date_hour_minute_second_fraction',
'date_hour_minute_second_millis', 'date_optional_time', 'date_time', 'date_time_no_millis',
'hour', 'hour_minute', 'hour_minute_second', 'hour_minute_second_fraction', 'hour_minute_second_millis',
'ordinal_date', 'ordinal_date_time', 'ordinal_date_time_no_millis', 'time', 'time_no_millis',
't_time', 't_time_no_millis', 'week_date', 'week_date_time', 'weekDateTimeNoMillis', 'week_year',
'weekyearWeek', 'weekyearWeekDay', 'year', 'year_month', 'year_month_day', 'epoch_millis', 'epoch_second'
]])
},
fielddata: {
filter: {
regex: '',
frequency: {
min: 0.001,
max: 0.1,
min_segment_size: 500
}
}
},
similarity: {
__one_of: ['default', 'BM25']
},
// objects
properties: {
__scope_link: '_put_mapping.{type}.properties'
},
// multi_field
fields: {
'*': {
__scope_link: '_put_mapping.type.properties.field'
}
},
copy_to: { __one_of: ['{field}', ['{field}']] },
// nested
include_in_parent: BOOLEAN,
include_in_root: BOOLEAN
}
}
}
});
api.addEndpointDescription('_put_mapping', {
methods: ['PUT'],
patterns: [
"{indices}/_mapping"
],
data_autocomplete_rules: {
'{type}': {
__scope_link: '_put_type_mapping'
}
}
});
};
|
/**
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
*
* 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.
*/
import {ActionTrust} from '../../../src/action-constants';
import {AutocompleteBindingDef} from './autocomplete-binding-def';
import {AutocompleteBindingInline} from './autocomplete-binding-inline';
import {AutocompleteBindingSingle} from './autocomplete-binding-single';
import {CSS} from '../../../build/amp-autocomplete-0.1.css';
import {Keys} from '../../../src/utils/key-codes';
import {Layout} from '../../../src/layout';
import {Services} from '../../../src/services';
import {SsrTemplateHelper} from '../../../src/ssr-template-helper';
import {
UrlReplacementPolicy,
batchFetchJsonFor,
requestForBatchFetch,
} from '../../../src/batched-json';
import {addParamToUrl} from '../../../src/url';
import {createCustomEvent} from '../../../src/event-helper';
import {dev, user, userAssert} from '../../../src/log';
import {dict, hasOwn, map, ownProperty} from '../../../src/utils/object';
import {getValueForExpr, tryParseJson} from '../../../src/json';
import {includes, startsWith} from '../../../src/string';
import {isAmp4Email} from '../../../src/format';
import {isArray, isEnumValue, toArray} from '../../../src/types';
import {mod} from '../../../src/utils/math';
import {once} from '../../../src/utils/function';
import {removeChildren, tryFocus} from '../../../src/dom';
import {
setupAMPCors,
setupInput,
setupJsonFetchInit,
} from '../../../src/utils/xhr-utils';
import {toggle} from '../../../src/style';
import fuzzysearch from '../../../third_party/fuzzysearch/index';
const TAG = 'amp-autocomplete';
/**
* Different filtering options.
* @enum {string}
*/
export const FilterType = {
SUBSTRING: 'substring',
PREFIX: 'prefix',
TOKEN_PREFIX: 'token-prefix',
FUZZY: 'fuzzy',
CUSTOM: 'custom',
NONE: 'none',
};
export class AmpAutocomplete extends AMP.BaseElement {
/** @param {!AmpElement} element */
constructor(element) {
super(element);
/** @private {AutocompleteBindingDef} */
this.binding_ = null;
/**
* The data extracted from the <script> tag optionally provided
* as a child. For use with static data.
* @private {?Array<!JsonObject|string>}
*/
this.sourceData_ = null;
/**
* The reference to the <input> or <textarea> provided as a child.
* @private {?HTMLInputElement}
*/
this.inputElement_ = null;
/**
* The partial user input used to generate suggestions.
* @private {string}
*/
this.userInput_ = '';
/**
* The value of the "filter" attribute on <autocomplete>.
* @private {string}
*/
this.filter_ = '';
/**
* The value of the "min-characters" attribute on <autocomplete>.
* @private {number}
*/
this.minChars_ = 1;
/**
* The value of the "max-items" attribute on <autocomplete>.
* @private {?number}
*/
this.maxItems_ = null;
/**
* If the "suggest-first" attribute is present on <autocomplete>.
*/
this.shouldSuggestFirst_ = false;
/**
* Whether or not the "Backspace" key has recently been fired.
* Only used when "suggest-first" is present on amp-autocomplete.
*
* This is used in conjunction between the "keydown" and "input" events
* on the input element. The reason the inputHandler_() does not alone
* read the "inputType" on the "input" to make the same discernment is
* because that event property is not compatible in all browsers.
*/
this.detectBackspace_ = false;
/**
* If the "highlight-user-entry" attribute is present on <autocomplete>.
*/
this.highlightUserEntry_ = false;
/**
* The base value obtained from the "src" attribute on amp-autocomplete.
* Used for creating static network endpoints. See generateSrc_.
* @private {string}
*/
this.srcBase_ = '';
/**
* The value of the "query" attribute on amp-autocomplete.
* @private {string}
*/
this.queryKey_ = '';
/**
* The index of the active suggested item.
* @private {number}
*/
this.activeIndex_ = -1;
/**
* The reference to the <div> of the active suggested item.
* @private {?Element}
*/
this.activeElement_ = null;
/**
* The element id if present or random number.
* @private {number|string}
*/
this.prefix_ = element.id ? element.id : Math.floor(Math.random() * 100);
/**
* The reference to the <div> that contains template-rendered children.
* @private {?Element}
*/
this.container_ = null;
/** @private {boolean} */
this.fallbackDisplayed_ = false;
/**
* The developer specified value of the 'autocomplete' attribute on the
* <form> ancestor that contains <amp-autocomplete>. Used to reset the
* attribute on blurring the input field. 'on' by default, according to
* common browser practices.
* @private {?string}
*/
this.initialAutocompleteAttr_ = null;
/** @const @private {!../../../src/service/template-impl.Templates} */
this.templates_ = Services.templatesFor(this.win);
/**
* Whether a <template> or <script type="text/plain"> tag is present.
* @private {boolean}
*/
this.hasTemplate_ = false;
/**
* @const {function():!../../../src/ssr-template-helper.SsrTemplateHelper}
*/
this.getSsrTemplateHelper = once(
() =>
new SsrTemplateHelper(
TAG,
Services.viewerForDoc(this.element),
this.templates_
)
);
/**
* Whether server-side rendering is required.
* @private {boolean}
*/
this.isSsr_ = false;
/** @private {?../../../src/service/action-impl.ActionService} */
this.action_ = null;
/** @private {?../../../src/service/viewport/viewport-interface.ViewportInterface} */
this.viewport_ = null;
/** @private {boolean} */
this.interacted_ = false;
/**
* To ensure that we provide an accessible experience,
* the suggestion container must have a unique ID.
* In case the autocomplete doesn't have an ID we use a
* random number to ensure uniqueness.
@private {number|string}
*/
this.containerId_ = element.id
? element.id
: Math.floor(Math.random() * 100) + '_AMP_content_';
}
/** @override */
buildCallback() {
const doc = this.element.ownerDocument;
const isEmail = doc && isAmp4Email(doc);
userAssert(
!isEmail ||
doc.documentElement.hasAttribute('data-amp-autocomplete-opt-in'),
'<amp-autocomplete> is not currently available in AMP4Email.'
);
this.action_ = Services.actionServiceForDoc(this.element);
this.viewport_ = Services.viewportForDoc(this.element);
this.inputElement_ = this.getSingleInputOrTextarea_();
const inputType = this.inputElement_.getAttribute('type');
userAssert(
!this.inputElement_.hasAttribute('type') ||
inputType === 'text' ||
inputType === 'search',
'%s requires the "type" attribute to be "text" or "search" if present on <input>. %s',
TAG,
this.element
);
this.binding_ = this.createBinding_();
this.queryKey_ = this.element.getAttribute('query');
this.srcBase_ = this.element.getAttribute('src');
const jsonScript = this.element.querySelector(
'script[type="application/json"]'
);
if (jsonScript) {
this.sourceData_ = this.getInlineData_(jsonScript);
} else if (!this.element.hasAttribute('src')) {
user().warn(
TAG,
'Expected a <script type="application/json"> child or ' +
'a URL specified in "src".'
);
}
this.inputElement_.setAttribute('dir', 'auto');
this.inputElement_.setAttribute('aria-autocomplete', 'both');
this.inputElement_.setAttribute('role', 'textbox');
this.inputElement_.setAttribute('aria-controls', this.containerId_);
if (this.inputElement_.tagName === 'INPUT') {
this.element.setAttribute('role', 'combobox');
this.inputElement_.setAttribute('aria-multiline', 'false');
}
this.element.setAttribute('aria-haspopup', 'listbox');
this.element.setAttribute('aria-expanded', 'false');
this.element.setAttribute('aria-owns', this.containerId_);
const form = this.getFormOrNull_();
if (form && form.hasAttribute('autocomplete')) {
this.initialAutocompleteAttr_ = form.getAttribute('autocomplete');
}
// When SSR is supported, it is required.
this.isSsr_ = this.getSsrTemplateHelper().isEnabled();
this.hasTemplate_ = this.templates_.hasTemplate(
this.element,
'template, script[template]'
);
if (this.isSsr_) {
userAssert(
this.srcBase_,
'%s requires data to be provided via "src" attribute for server-side rendering. %s',
TAG,
this.element
);
userAssert(
this.hasTemplate_,
`${TAG} should provide a <template> or <script type="plain/text"> element.`
);
userAssert(
!this.element.hasAttribute('filter'),
`${TAG} does not support client-side filter when server-side render is required.`
);
this.filter_ = FilterType.NONE;
} else {
this.filter_ = userAssert(
this.element.getAttribute('filter'),
'%s requires "filter" attribute. %s',
TAG,
this.element
);
userAssert(
isEnumValue(FilterType, this.filter_),
'Unexpected filter: %s. %s',
this.filter_,
this.element
);
}
// Read configuration attributes
this.minChars_ = this.element.hasAttribute('min-characters')
? parseInt(this.element.getAttribute('min-characters'), 10)
: 1;
if (this.element.hasAttribute('max-entries')) {
user().warn(TAG, '"max-items" attribute is preferred to "max-entries"');
}
const maxItems =
this.element.getAttribute('max-items') ||
this.element.getAttribute('max-entries');
this.maxItems_ = maxItems ? parseInt(maxItems, 10) : null;
this.shouldSuggestFirst_ = this.binding_.shouldSuggestFirst();
this.highlightUserEntry_ = this.element.hasAttribute(
'highlight-user-entry'
);
this.container_ = this.createContainer_();
this.element.appendChild(this.container_);
return Promise.resolve();
}
/**
* amp-autocomplete expects exactly one nested input or textarea.
* @return {!HTMLInputElement}
*/
getSingleInputOrTextarea_() {
const possibleElements = this.element.querySelectorAll('input,textarea');
userAssert(
possibleElements.length == 1,
'%s should contain exactly one <input> or <textarea> descendant %s',
TAG,
this.element
);
return /** @type {!HTMLInputElement} */ (possibleElements[0]);
}
/**
* @return {?HTMLFormElement}
*/
getFormOrNull_() {
return this.inputElement_.form || null;
}
/**
* Creates a binding associated with singular autocomplete or
* inline autocomplete depending on the presence of the given element's "inline" attribute.
* @return {AutocompleteBindingDef}
*/
createBinding_() {
return this.element.hasAttribute('inline')
? new AutocompleteBindingInline(this)
: new AutocompleteBindingSingle(this);
}
/**
* Reads the 'items' data from the child <script> element.
* For use with static local data.
* @param {!Element} script
* @return {!Array<!JsonObject|string>}
* @private
*/
getInlineData_(script) {
const json = tryParseJson(script.textContent, (error) => {
throw error;
});
const itemsExpr = this.element.getAttribute('items') || 'items';
const items = getValueForExpr(/**@type {!JsonObject}*/ (json), itemsExpr);
if (!items) {
user().warn(
TAG,
'Expected key "%s" in data but found nothing. Rendering empty results.',
itemsExpr
);
return [];
}
return user().assertArray(items);
}
/**
* Reads the 'items' data from the URL provided in the 'src' attribute.
* For use with remote data.
* @return {!Promise<!Array<string>>}
* @private
*/
getRemoteData_() {
const ampdoc = this.getAmpDoc();
const policy = UrlReplacementPolicy.ALL;
const itemsExpr = this.element.getAttribute('items') || 'items';
this.maybeSetSrcFromInput_();
if (this.isSsr_) {
return requestForBatchFetch(
this.element,
policy,
/* refresh */ false
).then((request) => {
request.xhrUrl = setupInput(this.win, request.xhrUrl, request.fetchOpt);
request.fetchOpt = setupAMPCors(
this.win,
request.xhrUrl,
request.fetchOpt
);
setupJsonFetchInit(request.fetchOpt);
const attributes = dict({
'ampAutocompleteAttributes': {
'items': itemsExpr,
'maxItems': this.maxItems_,
},
});
return this.getSsrTemplateHelper().ssr(
this.element,
request,
/* opt_templates */ null,
attributes
);
});
} else {
return batchFetchJsonFor(ampdoc, this.element, {
expr: itemsExpr,
urlReplacement: policy,
}).catch(() => {
user().warn(
TAG,
'Expected key "%s" in data but found nothing. Rendering empty results.',
itemsExpr
);
return [];
});
}
}
/**
* Update value of "src" attribute if the "query" attribute is provided.
*/
maybeSetSrcFromInput_() {
if (!this.queryKey_) {
return;
}
const src = this.generateSrc_(this.userInput_);
this.element.setAttribute('src', src);
}
/**
* Takes the given input and returns the constructed server endpoint for it.
* For use when publishers provide "src" and "query" attributes.
* @param {string} opt_query
* @return {string}
* @private
*/
generateSrc_(opt_query = '') {
return addParamToUrl(this.srcBase_, this.queryKey_, opt_query);
}
/**
* Creates and returns <div> that contains the template-rendered children.
* Should be called in a measureMutate context.
* @return {!Element}
* @private
*/
createContainer_() {
const container = this.element.ownerDocument.createElement('div');
container.classList.add('i-amphtml-autocomplete-results');
if (this.shouldRenderAbove_()) {
container.classList.add('i-amphtml-autocomplete-results-up');
}
container.setAttribute('role', 'listbox');
container.setAttribute('id', this.containerId_);
toggle(container, false);
return container;
}
/** @override */
layoutCallback() {
// Disable autofill in browsers.
this.inputElement_.setAttribute('autocomplete', 'off');
// Register event handlers.
this.inputElement_.addEventListener(
'touchstart',
() => {
this.checkFirstInteractionAndMaybeFetchData_();
},
{passive: true}
);
this.inputElement_.addEventListener('input', () => {
this.inputHandler_();
});
this.inputElement_.addEventListener('keydown', (e) => {
this.keyDownHandler_(e);
});
this.inputElement_.addEventListener('focus', () => {
this.checkFirstInteractionAndMaybeFetchData_().then(() => {
const display = this.binding_.shouldShowOnFocus();
this.toggleResultsHandler_(display);
});
});
this.inputElement_.addEventListener('blur', () => {
this.toggleResultsHandler_(false);
});
this.container_.addEventListener('mousedown', (e) => {
this.selectHandler_(e);
});
return this.autocomplete_(this.sourceData_, this.userInput_);
}
/** @override */
mutatedAttributesCallback(mutations) {
const src = mutations['src'];
if (src === undefined || src === null) {
return Promise.resolve();
}
if (typeof src === 'string') {
return this.getRemoteData_().then(
(remoteData) => {
this.sourceData_ = remoteData || [];
this.autocomplete_(this.sourceData_, this.userInput_);
},
(e) => {
this.displayFallback_(e);
}
);
}
if (typeof src === 'object') {
this.sourceData_ = src['items'] || [];
return this.autocomplete_(this.sourceData_, this.userInput_);
}
user().error(TAG, 'Unexpected "src" type: ' + src);
}
/**
* Create and return <div> element from given plan-text item.
* @param {string} item
* @param {string=} substring
* @return {!Element}
* @private
*/
createElementFromItem_(item, substring = '') {
const element = this.element.ownerDocument.createElement('div');
element.classList.add('i-amphtml-autocomplete-item');
element.setAttribute('role', 'option');
element.setAttribute('data-value', item);
element.setAttribute('dir', 'auto');
element.textContent = item;
const text = element.childNodes[0];
const lowerCaseItem = item.toLocaleLowerCase();
const lowerCaseSubstring = substring.toLocaleLowerCase();
if (
this.highlightUserEntry_ &&
substring &&
substring.length <= item.length &&
includes(lowerCaseItem, lowerCaseSubstring)
) {
const loc = lowerCaseItem.indexOf(lowerCaseSubstring);
const span = this.element.ownerDocument.createElement('span');
span.classList.add('autocomplete-partial');
span.appendChild(
this.element.ownerDocument.createTextNode(
// Preserve any capitalization from the original item.
item.slice(loc, loc + substring.length)
)
);
const textToRemove = text.splitText(loc);
textToRemove.splitText(substring.length);
element.replaceChild(span, textToRemove);
}
return element;
}
/**
* Displays autocomplete suggestions on user input if appropriate.
* @return {!Promise}
* @private
*/
inputHandler_() {
if (
this.binding_.shouldAutocomplete(
/** @type {!HTMLInputElement} */ (dev().assertElement(
this.inputElement_
))
)
) {
return this.maybeFetchAndAutocomplete_();
}
return this.mutateElement(() => {
this.clearAllItems_();
});
}
/**
* First fetches if data is dynamic, then updates user input and
* displays autocomplete suggestions against it.
* @return {!Promise}
*/
maybeFetchAndAutocomplete_() {
// If the input is the first entry in the field.
const isFirstInteraction =
this.userInput_.length === 0 && this.inputElement_.value.length === 1;
this.userInput_ = this.binding_.getUserInputForUpdate(
/** @type {!HTMLInputElement} */ (dev().assertElement(this.inputElement_))
);
// Fetch if autocomplete data is dynamic.
// Required when server-side rendering or otherwise relies on a query key.
const maybeFetch =
this.isSsr_ || this.queryKey_
? this.getRemoteData_()
: Promise.resolve(this.sourceData_);
return maybeFetch.then((data) => {
this.sourceData_ = data;
return this.mutateElement(() => {
this.autocomplete_(this.sourceData_, this.userInput_).then(() => {
this.displaySuggestions_(isFirstInteraction);
});
});
});
}
/**
* Toggle the container of suggestions to show.
* If the publisher has opted to autosuggest the first option, do this as well.
* @param {boolean} isFirstInteraction
*/
displaySuggestions_(isFirstInteraction) {
this.toggleResults_(true);
// Detecting backspace enables "suggest-first" to respect user deletion.
if (this.shouldSuggestFirst_) {
if (!this.detectBackspace_ || isFirstInteraction) {
this.updateActiveItem_(1);
}
this.detectBackspace_ = false;
}
}
/**
* Handle selecting items on user mousedown.
* @param {!Event} event
* @return {!Promise}
* @private
*/
selectHandler_(event) {
const element = dev().assertElement(event.target);
const selectedValue = this.setInputValue_(this.getItemElement_(element));
return this.mutateElement(() => {
this.selectItem_(selectedValue);
});
}
/**
* Display autocomplete suggestions and render it in the results container_.
* When client side rendering, filter the source data according to the given opt_input.
* @param {?Array<!JsonObject|string>} data
* @param {string} opt_input
* @return {!Promise}
* @private
*/
autocomplete_(data, opt_input = '') {
this.clearAllItems_();
if (opt_input.length < this.minChars_ || !data) {
return Promise.resolve();
} else if (this.isSsr_) {
return hasOwn(data, 'html')
? this.renderResults_(
data,
dev().assertElement(this.container_),
opt_input
)
: Promise.resolve();
} else {
return this.filterDataAndRenderResults_(data, opt_input);
}
}
/**
* Client-side filter the source data according to the given opt_input
* and render it in the results container_.
* @param {?Array<!JsonObject|string>} sourceData
* @param {string} input
* @return {!Promise}
* @private
*/
filterDataAndRenderResults_(sourceData, input) {
if (!sourceData.length) {
return Promise.resolve();
}
const filteredData = this.filterData_(sourceData, input);
return this.renderResults_(
filteredData,
dev().assertElement(this.container_),
input
);
}
/**
* Render the given data into item elements in the given container element.
* @param {!Array<!JsonObject|string>} filteredData
* @param {!Element} container
* @param {string} input
* @return {!Promise}
* @private
*/
renderResults_(filteredData, container, input) {
let renderPromise = Promise.resolve();
this.resetActiveElement_();
if (this.hasTemplate_) {
renderPromise = this.getSsrTemplateHelper()
.applySsrOrCsrTemplate(this.element, filteredData)
.then((rendered) => {
const elements = isArray(rendered)
? rendered
: toArray(rendered.children);
elements.forEach((child) => {
if (child.hasAttribute('data-disabled')) {
child.setAttribute('aria-disabled', 'true');
} else if (!child.hasAttribute('data-value')) {
user().warn(
TAG,
'Expected a "data-value" or "data-disabled" attribute on the rendered template item. %s',
child
);
}
child.classList.add('i-amphtml-autocomplete-item');
child.setAttribute('role', 'option');
container.appendChild(child);
});
});
} else {
filteredData.forEach((item) => {
userAssert(
typeof item === 'string',
'%s data must provide template for non-string items. %s',
TAG,
this.element
);
container.appendChild(
this.createElementFromItem_(/** @type {string} */ (item), input)
);
});
}
return renderPromise;
}
/**
* Apply the filter to the given data based on the given input.
* @param {!Array<!JsonObject|string>} data
* @param {string} input
* @return {!Array<!JsonObject|string>}
* @private
*/
filterData_(data, input) {
// Server-side filtering.
if (this.filter_ === FilterType.NONE) {
return this.truncateToMaxItems_(data);
}
// Client-side filtering.
input = input.toLocaleLowerCase();
const itemsExpr = this.element.getAttribute('filter-value') || 'value';
const filteredData = data.filter((item) => {
if (typeof item === 'object') {
item = getValueForExpr(/** @type {!JsonObject} */ (item), itemsExpr);
}
userAssert(
typeof item === 'string',
'%s data property "%s" must map to string type. %s',
TAG,
itemsExpr,
this.element
);
item = item.toLocaleLowerCase();
switch (this.filter_) {
case FilterType.SUBSTRING:
return includes(item, input);
case FilterType.PREFIX:
return startsWith(item, input);
case FilterType.TOKEN_PREFIX:
return this.tokenPrefixMatch_(item, input);
case FilterType.FUZZY:
return fuzzysearch(input, item);
case FilterType.CUSTOM:
throw new Error(
'Filter not yet supported: %s',
this.filter_,
this.element
);
default:
throw new Error('Unexpected filter: %s', this.filter_, this.element);
}
});
return this.truncateToMaxItems_(filteredData);
}
/**
* Returns true if the given input string is a token-prefix match on the
* given item string. Assumes toLocaleLowerCase() has been performed on both
* parameters.
*
* Matches:
* washington dc, dc
* washington dc, wash
* washington dc, dc washington
* new york ny, new york
*
* Non-matches:
* washington dc, district of columbia
* washington dc, washington d c
* washington dc, ashington dc
*
* @param {string} item
* @param {string} input
* @return {boolean}
* @private
*/
tokenPrefixMatch_(item, input) {
if (input === '') {
return true;
}
const itemTokens = this.tokenizeString_(item);
const inputTokens = this.tokenizeString_(input);
// Match each input token (except the last one) to an item token
const itemTokensMap = this.mapFromTokensArray_(itemTokens);
const lastInputToken = inputTokens[inputTokens.length - 1];
inputTokens.splice(inputTokens.length - 1, 1);
let match = true;
for (let i = 0; i < inputTokens.length; i++) {
const token = inputTokens[i];
if (token === '') {
continue;
}
if (!hasOwn(itemTokensMap, token)) {
match = false;
break;
}
const count = Number(ownProperty(itemTokensMap, token));
if (count > 1) {
itemTokensMap[token] = count - 1;
} else {
delete itemTokensMap[token];
}
}
// Return that the last input token is a prefix of one of the item tokens
const remainingItemTokens = Object.keys(itemTokensMap);
return (
match &&
(lastInputToken === '' ||
remainingItemTokens.some((itemToken) => {
return startsWith(itemToken, lastInputToken);
}))
);
}
/**
* Takes a string, removes '.', and splits by special characters.
* Returns the resulting array of tokens.
* @param {string} inputStr
* @return {!Array<string>}
* @private
*/
tokenizeString_(inputStr) {
inputStr = inputStr.replace(/[\.]+/g, '');
return inputStr.split(/[`~(){}_|+\-;:\'",\[\]\\\/ ]+/g);
}
/**
* Returns the given tokens array as a dictionary of key: token (str) and
* value: number of occurrences.
* @param {!Array<string>} tokens
* @return {!Object<string, number>}
* @private
*/
mapFromTokensArray_(tokens) {
const tokensMap = map();
tokens.forEach((token) => {
const count = hasOwn(tokensMap, token)
? ownProperty(tokensMap, token) + 1
: 1;
tokensMap[token] = count;
});
return tokensMap;
}
/**
* Truncate the given data to a maximum length of the max-items attribute.
* @param {!Array<!JsonObject|string>} data
* @return {!Array<!JsonObject|string>}
* @private
*/
truncateToMaxItems_(data) {
if (this.maxItems_ && this.maxItems_ < data.length) {
data = data.slice(0, this.maxItems_);
}
return data;
}
/**
* Shows or hides the results container_.
* @param {boolean} display
* @private
*/
toggleResults_(display) {
this.inputElement_.setAttribute('aria-expanded', display);
toggle(dev().assertElement(this.container_), display);
}
/**
* Disables or re-enables the browser autofill on the autocomplete input.
* Then handles showing or hiding results on user focus/blur.
* @param {boolean} display
* @return {!Promise}
* @private
*/
toggleResultsHandler_(display) {
// Set/reset "autocomplete" attribute on <form> ancestor if present.
const form = this.getFormOrNull_();
if (form) {
if (display) {
form.setAttribute('autocomplete', 'off');
} else if (this.initialAutocompleteAttr_) {
form.setAttribute('autocomplete', this.initialAutocompleteAttr_);
} else {
form.removeAttribute('autocomplete');
}
}
// Toggle results.
let renderAbove = false;
return this.measureMutateElement(
() => {
renderAbove = this.shouldRenderAbove_();
},
() => {
if (!display) {
this.userInput_ = this.inputElement_.value;
this.autocomplete_(this.sourceData_, this.userInput_);
this.resetActiveElement_();
}
this.setResultDisplayDirection_(renderAbove);
this.toggleResults_(display);
}
);
}
/**
* Requests remote data source, if provided, on first user interaction.
* @return {!Promise}
* @private
*/
checkFirstInteractionAndMaybeFetchData_() {
if (this.interacted_ || !this.element.hasAttribute('src')) {
return Promise.resolve();
}
this.interacted_ = true;
return this.getRemoteData_().then(
(remoteData) => {
this.sourceData_ = remoteData;
this.autocomplete_(this.sourceData_);
},
(e) => {
this.displayFallback_(e);
}
);
}
/**
* Display results upwards or downwards based on location in the viewport.
* Should be called in a measureMutate context.
* @param {boolean} renderAbove
* @private
*/
setResultDisplayDirection_(renderAbove) {
this.container_.classList.toggle(
'i-amphtml-autocomplete-results-up',
renderAbove
);
}
/**
* Returns true if the input is in the bottom half of the viewport.
* Should be called in a measureMutate context.
* @return {boolean}
* @private
*/
shouldRenderAbove_() {
const viewHeight = this.viewport_.getHeight() || 0;
return (
this.inputElement_./*OK*/ getBoundingClientRect().top > viewHeight / 2
);
}
/**
* Returns true if the results are visible and has items.
* @return {boolean}
* @private
*/
areResultsDisplayed_() {
return (
!this.container_.hasAttribute('hidden') &&
this.container_.children.length > 0
);
}
/**
* Returns the nearest ancestor element that is a suggested item.
* @param {?Element} element
* @return {?Element}
* @private
*/
getItemElement_(element) {
if (element === null) {
return null;
}
if (element.classList.contains('i-amphtml-autocomplete-item')) {
return element;
}
return this.getItemElement_(element.parentElement);
}
/**
* Writes the selected value into the input field.
* @param {?Element} element
* @return {?string}
* @private
*/
setInputValue_(element) {
if (element === null || element.hasAttribute('data-disabled')) {
return null;
}
const selectedValue =
element.getAttribute('data-value') || element.textContent || '';
this.inputElement_.value = this.binding_.getUserInputForUpdateWithSelection(
selectedValue,
this.inputElement_,
this.userInput_
);
this.userInput_ = this.binding_.getUserInputForUpdate(this.inputElement_);
return selectedValue;
}
/**
* Finish item selection with the selected value.
* @param {?string} value
* @private
*/
selectItem_(value) {
if (value === null) {
return;
}
this.fireSelectAndChangeEvents_(value);
this.clearAllItems_();
this.toggleResults_(false);
}
/**
* Triggers select event on amp-autocomplete element and change events (bind
* and native, for amp-script) on child input/textarea with the given value
* as the value emitted.
* @param {string} value
* @private
*/
fireSelectAndChangeEvents_(value) {
const selectName = 'select';
const selectEvent = createCustomEvent(
this.win,
`amp-autocomplete.${selectName}`,
/** @type {!JsonObject} */ ({value})
);
this.action_.trigger(
this.element,
selectName,
selectEvent,
ActionTrust.HIGH
);
// Ensure on="change" is triggered for input
const changeName = 'change';
const changeEvent = createCustomEvent(
this.win,
`amp-autocomplete.${changeName}`,
/** @type {!JsonObject} */ ({value})
);
this.action_.trigger(
dev().assertElement(this.inputElement_),
changeName,
changeEvent,
ActionTrust.HIGH
);
// Ensure native change listeners are triggered
const nativeChangeEvent = createCustomEvent(
this.win,
'change',
/** @type {!JsonObject} */ ({value})
);
this.inputElement_.dispatchEvent(nativeChangeEvent);
}
/**
* Given a delta between the current active item and the desired active item,
* marks the desired active item as active. Loops to the beginning.
* @param {number} delta
* @return {!Promise}
* @private
*/
updateActiveItem_(delta) {
if (
delta === 0 ||
!this.areResultsDisplayed_() ||
this.fallbackDisplayed_
) {
return Promise.resolve();
}
// Active element logic
const keyUpWhenNoneActive = this.activeIndex_ === -1 && delta < 0;
const index = keyUpWhenNoneActive ? delta : this.activeIndex_ + delta;
const enabledElements = this.getEnabledItems_();
if (enabledElements.length === 0) {
return Promise.resolve();
}
const activeIndex = mod(index, enabledElements.length);
const newActiveElement = enabledElements[activeIndex];
const newValue = newActiveElement.getAttribute('data-value');
this.binding_.displayActiveItemInInput(
/** @type {!HTMLInputElement} */ (dev().assertElement(
this.inputElement_
)),
newValue,
this.userInput_
);
// Element visibility logic
let shouldScroll, newTop;
return this.measureMutateElement(
() => {
const {offsetTop: itemTop, offsetHeight: itemHeight} = newActiveElement;
const {
scrollTop: resultTop,
offsetHeight: resultHeight,
} = this.container_;
shouldScroll =
resultTop > itemTop ||
resultTop + resultHeight < itemTop + itemHeight;
newTop = delta > 0 ? itemTop + itemHeight - resultHeight : itemTop;
},
() => {
if (shouldScroll) {
this.container_./*OK*/ scrollTop = newTop;
}
this.resetActiveElement_();
newActiveElement.classList.add('i-amphtml-autocomplete-item-active');
newActiveElement.setAttribute('aria-selected', 'true');
let elementId = newActiveElement.getAttribute('id');
if (!elementId) {
// To ensure that we pass Accessibility audits -
// we need to make sure that each item element has a unique ID.
// In case the autocomplete doesn't have an ID we use a
// random number to ensure uniqueness.
elementId = this.prefix_ + '_AMP_content_' + activeIndex;
newActiveElement.setAttribute('id', elementId);
}
this.inputElement_.setAttribute('aria-activedescendant', elementId);
this.activeIndex_ = activeIndex;
this.activeElement_ = newActiveElement;
tryFocus(dev().assertElement(this.activeElement_));
}
);
}
/** Returns all item elements in the results container that do not have the
* 'data-disabled' attribute.
* @return {!NodeList}
* @private
*/
getEnabledItems_() {
return this.container_.querySelectorAll(
'.i-amphtml-autocomplete-item:not([data-disabled])'
);
}
/**
* Displays the user's partial input in the input field.
* @private
*/
displayUserInput_() {
this.binding_.resetInputOnWrapAround(
this.userInput_,
/** @type {!HTMLInputElement} */ (dev().assertElement(this.inputElement_))
);
this.resetActiveElement_();
}
/**
* Resets the activeIndex_, activeElement_ and removes its 'active' class.
* Should be called in a measureMutate context.
* @private
*/
resetActiveElement_() {
if (!this.activeElement_) {
return;
}
this.activeElement_.classList.toggle(
'i-amphtml-autocomplete-item-active',
false
);
this.activeElement_.removeAttribute('aria-selected');
if (this.activeElement_.getAttribute('id') === 'autocomplete-selected') {
this.activeElement_.removeAttribute('id');
}
this.inputElement_.removeAttribute('aria-activedescendent');
this.activeElement_ = null;
this.activeIndex_ = -1;
}
/**
* Delete all children to the container_
* @private
*/
clearAllItems_() {
this.fallbackDisplayed_ = false;
removeChildren(dev().assertElement(this.container_));
}
/**
* Handles keyboard events.
* @param {!Event} event
* @return {!Promise}
* @private
*/
keyDownHandler_(event) {
switch (event.key) {
case Keys.DOWN_ARROW:
event.preventDefault();
if (this.areResultsDisplayed_()) {
// Disrupt loop around to display user input.
if (this.activeIndex_ === this.getEnabledItems_().length - 1) {
this.displayUserInput_();
return Promise.resolve();
}
return this.updateActiveItem_(1);
}
return this.mutateElement(() => {
this.autocomplete_(this.sourceData_, this.userInput_);
this.toggleResults_(true);
});
case Keys.UP_ARROW:
event.preventDefault();
// Disrupt loop around to display user input.
if (this.activeIndex_ === 0) {
this.displayUserInput_();
return Promise.resolve();
}
return this.updateActiveItem_(-1);
case Keys.ENTER:
const shouldPreventDefault = this.binding_.shouldPreventDefaultOnEnter(
!!this.activeElement_
);
if (this.areResultsDisplayed_() && shouldPreventDefault) {
event.preventDefault();
}
this.binding_.removeSelectionHighlighting(this.inputElement_);
if (this.areResultsDisplayed_() && this.activeElement_) {
const selectedValue = this.setInputValue_(this.activeElement_);
return this.mutateElement(() => {
this.selectItem_(selectedValue);
this.resetActiveElement_();
});
}
return this.mutateElement(() => {
this.toggleResults_(false);
});
case Keys.ESCAPE:
// Select user's partial input and hide results.
return this.mutateElement(() => {
if (!this.fallbackDisplayed_) {
event.preventDefault();
this.displayUserInput_();
this.toggleResults_(false);
}
});
case Keys.TAB:
if (this.areResultsDisplayed_() && this.activeElement_) {
event.preventDefault();
const selectedValue = this.setInputValue_(this.activeElement_);
return this.mutateElement(() => {
this.selectItem_(selectedValue);
});
}
return Promise.resolve();
case Keys.BACKSPACE:
this.detectBackspace_ = this.shouldSuggestFirst_;
return Promise.resolve();
default:
return Promise.resolve();
}
}
/**
* If a fallback element is provided, displays it instead of suggestions.
* Otherwise, throws given error. Must be called in a mutate context.
* @param {*=} error
* @throws {!Error} If fallback element is not present.
* @private
*/
displayFallback_(error) {
if (this.fallbackDisplayed_) {
return;
}
this.clearAllItems_();
const fallback = this.getFallback();
if (fallback) {
this.fallbackDisplayed_ = true;
this.toggleFallback(true);
} else {
throw error;
}
}
/** @override */
isLayoutSupported(layout) {
return layout == Layout.CONTAINER;
}
}
AMP.extension(TAG, '0.1', (AMP) => {
AMP.registerElement(TAG, AmpAutocomplete, CSS);
});
|
/*
* jQuery One Page Nav Plugin
* http://github.com/davist11/jQuery-One-Page-Nav
*
* Copyright (c) 2010 Trevor Davis (http://trevordavis.net)
* Dual licensed under the MIT and GPL licenses.
* Uses the same license as jQuery, see:
* http://jquery.org/license
*
* @version 3.0.0
*
* Example usage:
* $('#nav').onePageNav({
* currentClass: 'current',
* changeHash: false,
* scrollSpeed: 750
* });
*/
;(function($, window, document, undefined){
'use strict';
// our plugin constructor
var OnePageNav = function(elem, options){
this.elem = elem;
this.$elem = $(elem);
this.options = options;
this.metadata = this.$elem.data('plugin-options');
this.$win = $(window);
this.sections = {};
this.didScroll = false;
this.$doc = $(document);
this.docHeight = this.$doc.height();
};
// the plugin prototype
OnePageNav.prototype = {
defaults: {
navItems: 'a',
currentClass: 'current',
changeHash: false,
easing: 'swing',
filter: '',
scrollSpeed: 700,
scrollThreshold: 0.1,
begin: true,
end: true,
scrollChange: false
},
init: function() {
// Introduce defaults that can be extended either
// globally or using an object literal.
this.config = $.extend({}, this.defaults, this.options, this.metadata);
this.$nav = this.$elem.find(this.config.navItems);
//Filter any links out of the nav
if(this.config.filter !== '') {
this.$nav = this.$nav.filter(this.config.filter);
}
//Handle clicks on the nav
this.$nav.on('click.onePageNav', $.proxy(this.handleClick, this));
//Get the section positions
this.getPositions();
//Handle scroll changes
this.bindInterval();
//Update the positions on resize too
this.$win.on('resize.onePageNav', $.proxy(this.getPositions, this));
return this;
},
adjustNav: function(self, $parent) {
self.$elem.find('.' + self.config.currentClass).removeClass(self.config.currentClass);
$parent.addClass(self.config.currentClass);
},
bindInterval: function() {
var self = this;
var docHeight;
self.$win.on('scroll.onePageNav', function() {
self.didScroll = true;
});
self.t = setInterval(function() {
docHeight = self.$doc.height();
//If it was scrolled
if(self.didScroll) {
self.didScroll = false;
self.scrollChange();
}
//If the document height changes
if(docHeight !== self.docHeight) {
self.docHeight = docHeight;
self.getPositions();
}
}, 250);
},
getHash: function($link) {
return $link.attr('href').split('#')[1];
},
getPositions: function() {
var self = this;
var linkHref;
var topPos;
var $target;
self.$nav.each(function() {
linkHref = self.getHash($(this));
$target = $('#' + linkHref);
if($target.length) {
topPos = $target.offset().top;
self.sections[linkHref] = Math.round(topPos);
}
});
},
getSection: function(windowPos) {
var returnValue = null;
var windowHeight = Math.round(this.$win.height() * this.config.scrollThreshold);
for(var section in this.sections) {
if((this.sections[section] - windowHeight) < windowPos) {
returnValue = section;
}
}
return returnValue;
},
handleClick: function(e) {
var self = this;
var $link = $(e.currentTarget);
var $parent = $link.parent();
var newLoc = '#' + self.getHash($link);
if(!$parent.hasClass(self.config.currentClass)) {
//Start callback
if(self.config.begin) {
self.config.begin();
}
//Change the highlighted nav item
self.adjustNav(self, $parent);
//Removing the auto-adjust on scroll
self.unbindInterval();
//Scroll to the correct position
self.scrollTo(newLoc, function() {
//Do we need to change the hash?
if(self.config.changeHash) {
window.location.hash = newLoc;
}
//Add the auto-adjust on scroll back in
self.bindInterval();
//End callback
if(self.config.end) {
self.config.end();
}
});
}
e.preventDefault();
},
scrollChange: function() {
var windowTop = this.$win.scrollTop();
var position = this.getSection(windowTop);
var $parent;
//If the position is set
if(position !== null) {
$parent = this.$elem.find('a[href$="#' + position + '"]').parent();
//If it's not already the current section
if(!$parent.hasClass(this.config.currentClass)) {
//Change the highlighted nav item
this.adjustNav(this, $parent);
//If there is a scrollChange callback
if(this.config.scrollChange) {
this.config.scrollChange($parent);
}
}
}
},
scrollTo: function(target, callback) {
var offset = $(target).offset().top;
$('html, body').animate({
// scrollTop: offset
}, this.config.scrollSpeed, this.config.easing, callback);
},
unbindInterval: function() {
clearInterval(this.t);
this.$win.unbind('scroll.onePageNav');
}
};
OnePageNav.defaults = OnePageNav.prototype.defaults;
$.fn.onePageNav = function(options) {
return this.each(function() {
new OnePageNav(this, options).init();
});
};
})( jQuery, window , document );
$('#nav a[href^="#"], a#arrow-down, a.whole-tile, a#inquire').on('click', function()
{ jQuery('#nav').hide();
var the_id = $(this).attr("href");
$('html, body').animate(
{
scrollTop:$(the_id).offset().top - 65
}, 'slow');
return false;
});
$('a.button').on('click', function()
{ jQuery('#nav').hide();
var the_id = $(this).attr("href");
$('html, body').animate(
{
scrollTop:$(the_id).offset().top
}, 'slow');
return false;
});
$('#nav').onePageNav({
currentClass: 'active',
// scrollOffset: 0
});
|
"""
Comments area plugin.
This plugin package is not called "comments" as that conflicts
with the `django.contrib.comments` appname. Hence, "commentsarea" it is.
The plugin displays the form and messagelist that ``django.contrib.comments`` renders.
Hence, it depends on a properly configured contrib module.
The least you need to do, is:
* providing a ``comments/base.html`` template.
* include a ``title`` block that is displayed in the ``<head>`` of the base template.
* include a ``content`` block that is displayed in the ``<body>`` of the base template.
* provide a ``comments/posted.html`` template for the success page.
* It could contains links to the blog page.
* It could redirect automatically back to the blog in a few seconds.
"""
from django.utils.translation import ugettext_lazy as _
from fluent_contents.extensions import ContentPlugin, plugin_pool
from fluent_contents.plugins.commentsarea.models import CommentsAreaItem
@plugin_pool.register
class CommentsAreaPlugin(ContentPlugin):
model = CommentsAreaItem
category = _('Interactivity')
render_template = "fluent_contents/plugins/commentsarea/commentsarea.html"
|
const debug = require('debug')('ssb-chat-core')
const pull = require('pull-stream')
const unique = require('pull-stream/throughs/unique')
const connect = require('./connect')
const state = require('./state')
const events = require('./state/events')
const constants = require('./util/constants')
const processor = require('./util/processor')
const messenger = require('./messenger')
const commands = require('./commands')
// state actions
const actions = require('./state/actions')
let started
module.exports = {
state,
messenger,
commands,
constants,
events,
authors: actions.authors,
me: actions.me,
messages: actions.messages,
mode: actions.mode,
recipients: actions.recipients,
unreads: actions.unreads,
sbot: actions.sbot,
options: actions.options,
recents: actions.recents,
progress: actions.progress,
start: (opts, cb) => {
debug('attempting to start up sbot with %o options', opts)
if (started) {
debug('avoiding double start of sbot')
// don't double start, thanks @korlando7
cb()
return
}
started = true
actions.options.setOptions(opts)
let timeWindow = actions.options.get().get('timeWindow')
if (!timeWindow) {
timeWindow = constants.TIME_WINDOW
actions.options.set('timeWindow', constants.TIME_WINDOW)
}
const since = Date.now() - timeWindow
connect.start((err, server) => {
if (err) {
debug('error starting sbot: %O', err)
return cb(err)
}
// set our sbot instance and our self
actions.sbot.set(server)
actions.me.set(server.id)
actions.authors.updateFriends()
// start streaming messages
pull(
server.query.read({
reverse: true,
live: true,
query: [{
$filter: {
value: {
content: { type: constants.MESSAGE_TYPE },
timestamp: { $gte: since }
}
}
}]
}),
pull.drain(processor)
)
pull(
server.progress,
pull.map((data) => ({
current: data.indexes.current,
target: data.indexes.target
})),
unique(JSON.stringify),
pull.drain(actions.progress.set)
)
debug('started pulling msgs and index progress from sbot')
// let caller know that we are ready to rock n roll
cb()
})
},
stop: connect.stop
}
|
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add("login", (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
import '@testing-library/cypress/add-commands'
|
const express = require('express');
const personalSnippetsRouter = express.Router({mergeParams: true});
const Keycloak = require('keycloak-connect');
const PersonalSnippetsService = require('./personal-snippets.service');
const SnippetsSearchService = require('../../../common/snippets-search.service');
const UserIdValidator = require('../userid.validator');
const PaginationQueryParamsHelper = require('../../../common/pagination-query-params-helper');
const common = require('../../../common/config');
const config = common.config();
const HttpStatus = require('http-status-codes/index');
//add keycloak middleware
const keycloak = new Keycloak({scope: 'openid'}, config.keycloak);
personalSnippetsRouter.use(keycloak.middleware());
/**
* CREATE snippet for user
*/
personalSnippetsRouter.post('/', keycloak.protect(), async (request, response) => {
UserIdValidator.validateUserId(request);
const codeletData = request.body;
let newSnippet = await PersonalSnippetsService.createSnippet(request.params.userId, codeletData);
response
.set('Location', `${config.basicApiUrl}/personal/users/${request.params.userId}/snippets/${newSnippet.id}`)
.status(HttpStatus.CREATED)
.send({response: 'Snippet created for userId ' + request.params.userId});
});
/**
* GET suggested tags used by user
*
* Order matters - needs to be GET snippet by id
**/
personalSnippetsRouter.get('/suggested-tags', keycloak.protect(), async (request, response) => {
UserIdValidator.validateUserId(request);
const tags = await PersonalSnippetsService.getSuggestedSnippetTags(request.params.userId);
response.send(tags);
});
/**
* GET tags used by user
*
* Order matters - needs to be GET snippet by id
**/
personalSnippetsRouter.get('/tags', keycloak.protect(), async (request, response) => {
UserIdValidator.validateUserId(request);
const tags = await PersonalSnippetsService.getUserSnippetTags(request.params.userId);
response.send(tags);
});
/**
* GET all snippets of a user, ordered by createdAt date descending
**/
personalSnippetsRouter.get('/export', keycloak.protect(), async (request, response) => {
UserIdValidator.validateUserId(request);
const snippets = await PersonalSnippetsService.getAllMySnippets(request.params.userId);
response.send(snippets);
});
/**
* Find personal snippets
*/
personalSnippetsRouter.get('/', keycloak.protect(), async (request, response, next) => {
UserIdValidator.validateUserId(request);
const searchText = request.query.q;
const searchInclude = request.query.include || 'all';
const {page, limit} = PaginationQueryParamsHelper.getPageAndLimit(request);
const {userId} = request.params;
if ( searchText ) {
const snippets = await SnippetsSearchService.findSnippets(userId, searchText, page, limit, searchInclude);
return response.status(HttpStatus.OK).send(snippets);
} else {
next();
}
});
/*
* Different others filters in case search in not involved
*/
/**
* Find personal snippets
*/
personalSnippetsRouter.get('/', keycloak.protect(), async (request, response) => {
UserIdValidator.validateUserId(request);
const {userId} = request.params;
const {limit} = PaginationQueryParamsHelper.getPageAndLimit(request);
const snippets = await PersonalSnippetsService.getLatestSnippets(userId, limit || 20);
return response.status(HttpStatus.OK).send(snippets);
});
/* GET snippet of user */
personalSnippetsRouter.get('/:snippetId', keycloak.protect(), async (request, response) => {
UserIdValidator.validateUserId(request);
const {userId, snippetId: snippetId} = request.params;
const snippet = await PersonalSnippetsService.getSnippetById(userId, snippetId);
return response.status(HttpStatus.OK).send(snippet);
});
/**
* full UPDATE via PUT - that is the whole document is required and will be updated
* the descriptionHtml parameter is only set in backend, if only does not come front-end (might be an API call)
*/
personalSnippetsRouter.put('/:snippetId', keycloak.protect(), async (request, response) => {
UserIdValidator.validateUserId(request);
const snippetData = request.body;
const {userId, snippetId} = request.params;
const updatedSnippet = await PersonalSnippetsService.updateSnippet(userId, snippetId, snippetData);
return response.status(HttpStatus.OK).send(updatedSnippet);
});
/*
* DELETE bookmark for user
*/
personalSnippetsRouter.delete('/:snippetId', keycloak.protect(), async (request, response) => {
UserIdValidator.validateUserId(request);
const {userId, snippetId} = request.params;
await PersonalSnippetsService.deleteSnippetById(userId, snippetId);
return response.status(HttpStatus.NO_CONTENT).send();
});
module.exports = personalSnippetsRouter;
|
defineSuite([
'Scene/Model',
'Core/Cartesian3',
'Core/Cartesian4',
'Core/CesiumTerrainProvider',
'Core/ClippingPlaneCollection',
'Core/Color',
'Core/combine',
'Core/defaultValue',
'Core/defined',
'Core/defineProperties',
'Core/DistanceDisplayCondition',
'Core/Ellipsoid',
'Core/Event',
'Core/FeatureDetection',
'Core/HeadingPitchRange',
'Core/JulianDate',
'Core/loadArrayBuffer',
'Core/loadJson',
'Core/loadWithXhr',
'Core/Math',
'Core/Matrix3',
'Core/Matrix4',
'Core/PerspectiveFrustum',
'Core/Plane',
'Core/PrimitiveType',
'Core/Resource',
'Core/Transforms',
'Core/WebGLConstants',
'Renderer/Pass',
'Renderer/RenderState',
'Renderer/ShaderSource',
'Scene/Axis',
'Scene/ColorBlendMode',
'Scene/HeightReference',
'Scene/ModelAnimationLoop',
'Specs/createScene',
'Specs/pollToPromise',
'ThirdParty/when'
], function(
Model,
Cartesian3,
Cartesian4,
CesiumTerrainProvider,
ClippingPlaneCollection,
Color,
combine,
defaultValue,
defined,
defineProperties,
DistanceDisplayCondition,
Ellipsoid,
Event,
FeatureDetection,
HeadingPitchRange,
JulianDate,
loadArrayBuffer,
loadJson,
loadWithXhr,
CesiumMath,
Matrix3,
Matrix4,
PerspectiveFrustum,
Plane,
PrimitiveType,
Resource,
Transforms,
WebGLConstants,
Pass,
RenderState,
ShaderSource,
Axis,
ColorBlendMode,
HeightReference,
ModelAnimationLoop,
createScene,
pollToPromise,
when) {
'use strict';
var boxUrl = './Data/Models/Box/CesiumBoxTest.gltf';
var boxNoTechniqueUrl = './Data/Models/Box/CesiumBoxTest-NoTechnique.gltf';
var boxNoIndicesUrl = './Data/Models/Box-NoIndices/box-noindices.gltf';
var texturedBoxUrl = './Data/Models/Box-Textured/CesiumTexturedBoxTest.gltf';
var texturedBoxSeparateUrl = './Data/Models/Box-Textured-Separate/CesiumTexturedBoxTest.gltf';
var texturedBoxBasePathUrl = './Data/Models/Box-Textured-BasePath/CesiumTexturedBoxTest.gltf';
var texturedBoxKTXUrl = './Data/Models/Box-Textured-KTX/CesiumTexturedBoxTest.gltf';
var texturedBoxKTXBinaryUrl = './Data/Models/Box-Textured-KTX-Binary/CesiumTexturedBoxTest.glb';
var texturedBoxKTXEmbeddedUrl = './Data/Models/Box-Textured-KTX-Embedded/CesiumTexturedBoxTest.gltf';
var texturedBoxCRNUrl = './Data/Models/Box-Textured-CRN/CesiumTexturedBoxTest.gltf';
var texturedBoxCRNBinaryUrl = './Data/Models/Box-Textured-CRN-Binary/CesiumTexturedBoxTest.glb';
var texturedBoxCRNEmbeddedUrl = './Data/Models/Box-Textured-CRN-Embedded/CesiumTexturedBoxTest.gltf';
var texturedBoxCustomUrl = './Data/Models/Box-Textured-Custom/CesiumTexturedBoxTest.gltf';
var texturedBoxKhrBinaryUrl = './Data/Models/Box-Textured-Binary/CesiumTexturedBoxTest.glb';
var boxRtcUrl = './Data/Models/Box-RTC/Box.gltf';
var boxEcefUrl = './Data/Models/Box-ECEF/ecef.gltf';
var cesiumAirUrl = './Data/Models/CesiumAir/Cesium_Air.gltf';
var cesiumAir_0_8Url = './Data/Models/CesiumAir/Cesium_Air_0_8.gltf';
var animBoxesUrl = './Data/Models/anim-test-1-boxes/anim-test-1-boxes.gltf';
var riggedFigureUrl = './Data/Models/rigged-figure-test/rigged-figure-test.gltf';
var riggedSimpleUrl = './Data/Models/rigged-simple/rigged-simple.gltf';
var boxConstantUrl = './Data/Models/MaterialsCommon/BoxConstant.gltf';
var boxLambertUrl = './Data/Models/MaterialsCommon/BoxLambert.gltf';
var boxBlinnUrl = './Data/Models/MaterialsCommon/BoxBlinn.gltf';
var boxPhongUrl = './Data/Models/MaterialsCommon/BoxPhong.gltf';
var boxNoLightUrl = './Data/Models/MaterialsCommon/BoxNoLight.gltf';
var boxAmbientLightUrl = './Data/Models/MaterialsCommon/BoxAmbientLight.gltf';
var boxDirectionalLightUrl = './Data/Models/MaterialsCommon/BoxDirectionalLight.gltf';
var boxPointLightUrl = './Data/Models/MaterialsCommon/BoxPointLight.gltf';
var boxSpotLightUrl = './Data/Models/MaterialsCommon/BoxSpotLight.gltf';
var boxTransparentUrl = './Data/Models/MaterialsCommon/BoxTransparent.gltf';
var boxColorUrl = './Data/Models/Box-Color/Box-Color.gltf';
var boxUint32Indices = './Data/Models/Box-Uint32Indices/Box-Uint32Indices.gltf';
var boxQuantizedUrl = './Data/Models/WEB3DQuantizedAttributes/Box-Quantized.gltf';
var boxColorQuantizedUrl = './Data/Models/WEB3DQuantizedAttributes/Box-Color-Quantized.gltf';
var boxScalarQuantizedUrl = './Data/Models/WEB3DQuantizedAttributes/Box-Scalar-Quantized.gltf';
var milkTruckQuantizedUrl = './Data/Models/WEB3DQuantizedAttributes/CesiumMilkTruck-Quantized.gltf';
var milkTruckQuantizedMismatchUrl = './Data/Models/WEB3DQuantizedAttributes/CesiumMilkTruck-Mismatch-Quantized.gltf';
var duckQuantizedUrl = './Data/Models/WEB3DQuantizedAttributes/Duck-Quantized.gltf';
var riggedSimpleQuantizedUrl = './Data/Models/WEB3DQuantizedAttributes/RiggedSimple-Quantized.gltf';
var CesiumManUrl = './Data/Models/MaterialsCommon/Cesium_Man.gltf';
var boomBoxUrl = './Data/Models/PBR/BoomBox/BoomBox.gltf';
var boxPbrUrl = './Data/Models/PBR/Box/Box.gltf';
var boxAnimatedPbrUrl = './Data/Models/PBR/BoxAnimated/BoxAnimated.gltf';
var boxInterleavedPbrUrl = './Data/Models/PBR/BoxInterleaved/BoxInterleaved.gltf';
var riggedSimplePbrUrl = './Data/Models/PBR/RiggedSimple/RiggedSimple.gltf';
var animatedMorphCubeUrl = './Data/Models/PBR/AnimatedMorphCube/AnimatedMorphCube.gltf';
var twoSidedPlaneUrl = './Data/Models/PBR/TwoSidedPlane/TwoSidedPlane.gltf';
var vertexColorTestUrl = './Data/Models/PBR/VertexColorTest/VertexColorTest.gltf';
var texturedBoxModel;
var cesiumAirModel;
var animBoxesModel;
var riggedFigureModel;
var scene;
var primitives;
beforeAll(function() {
scene = createScene();
primitives = scene.primitives;
var modelPromises = [];
modelPromises.push(loadModel(texturedBoxUrl).then(function(model) {
texturedBoxModel = model;
}));
modelPromises.push(loadModel(cesiumAirUrl, {
minimumPixelSize : 1,
maximumScale : 200,
asynchronous : false
}).then(function(model) {
cesiumAirModel = model;
}));
modelPromises.push(loadModel(animBoxesUrl, {
scale : 2.0
}).then(function(model) {
animBoxesModel = model;
}));
modelPromises.push(loadModel(riggedFigureUrl).then(function(model) {
riggedFigureModel = model;
}));
return when.all(modelPromises);
});
afterAll(function() {
scene.destroyForSpecs();
});
beforeEach(function() {
scene.morphTo3D(0.0);
var camera = scene.camera;
camera.frustum = new PerspectiveFrustum();
camera.frustum.aspectRatio = scene.drawingBufferWidth / scene.drawingBufferHeight;
camera.frustum.fov = CesiumMath.toRadians(60.0);
});
function addZoomTo(model) {
model.zoomTo = function() {
var camera = scene.camera;
var center = Matrix4.multiplyByPoint(model.modelMatrix, model.boundingSphere.center, new Cartesian3());
var r = 4.0 * Math.max(model.boundingSphere.radius, camera.frustum.near);
camera.lookAt(center, new HeadingPitchRange(0.0, 0.0, r));
};
}
function loadModel(url, options) {
options = combine(options, {
modelMatrix : Transforms.eastNorthUpToFixedFrame(Cartesian3.fromDegrees(0.0, 0.0, 100.0)),
url : url,
id : url,
show : false
});
var model = primitives.add(Model.fromGltf(options));
addZoomTo(model);
return pollToPromise(function() {
// Render scene to progressively load the model
scene.renderForSpecs();
return model.ready;
}, { timeout: 10000 }).then(function() {
return model;
});
}
function loadModelJson(gltf, options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
options = combine(options, {
modelMatrix : Transforms.eastNorthUpToFixedFrame(Cartesian3.fromDegrees(0.0, 0.0, 100.0)),
gltf : gltf,
show : defaultValue(options.show, false)
});
var model = primitives.add(new Model(options));
addZoomTo(model);
return pollToPromise(function() {
// Render scene to progressively load the model
scene.renderForSpecs();
return model.ready;
}, { timeout: 10000 }).then(function() {
return model;
});
}
function verifyRender(model) {
expect(model.ready).toBe(true);
expect(scene).toRender([0, 0, 0, 255]);
model.show = true;
model.zoomTo();
expect(scene).notToRender([0, 0, 0, 255]);
model.show = false;
}
it('fromGltf throws without options', function() {
expect(function() {
Model.fromGltf();
}).toThrowDeveloperError();
});
it('fromGltf throws without options.url', function() {
expect(function() {
Model.fromGltf({});
}).toThrowDeveloperError();
});
it('sets model properties', function() {
var modelMatrix = Transforms.eastNorthUpToFixedFrame(Cartesian3.fromDegrees(0.0, 0.0, 100.0));
expect(texturedBoxModel.gltf).toBeDefined();
expect(texturedBoxModel.basePath).toEqual('./Data/Models/Box-Textured/CesiumTexturedBoxTest.gltf');
expect(texturedBoxModel.show).toEqual(false);
expect(texturedBoxModel.modelMatrix).toEqual(modelMatrix);
expect(texturedBoxModel.scale).toEqual(1.0);
expect(texturedBoxModel.minimumPixelSize).toEqual(0.0);
expect(texturedBoxModel.maximumScale).toBeUndefined();
expect(texturedBoxModel.id).toEqual(texturedBoxUrl);
expect(texturedBoxModel.allowPicking).toEqual(true);
expect(texturedBoxModel.activeAnimations).toBeDefined();
expect(texturedBoxModel.ready).toEqual(true);
expect(texturedBoxModel.asynchronous).toEqual(true);
expect(texturedBoxModel.releaseGltfJson).toEqual(false);
expect(texturedBoxModel.cacheKey).toEndWith('Data/Models/Box-Textured/CesiumTexturedBoxTest.gltf');
expect(texturedBoxModel.debugShowBoundingVolume).toEqual(false);
expect(texturedBoxModel.debugWireframe).toEqual(false);
expect(texturedBoxModel.distanceDisplayCondition).toBeUndefined();
expect(texturedBoxModel.silhouetteColor).toEqual(Color.RED);
expect(texturedBoxModel.silhouetteSize).toEqual(0.0);
expect(texturedBoxModel.color).toEqual(Color.WHITE);
expect(texturedBoxModel.colorBlendMode).toEqual(ColorBlendMode.HIGHLIGHT);
expect(texturedBoxModel.colorBlendAmount).toEqual(0.5);
});
it('preserves query string in url', function() {
var params = '?param1=1¶m2=2';
var url = texturedBoxUrl + params;
var model = Model.fromGltf({
url: url
});
expect(model.basePath).toEndWith(params);
});
it('fromGltf takes a base path', function() {
var url = texturedBoxBasePathUrl;
var basePath = './Data/Models/Box-Textured-Separate/';
var model = Model.fromGltf({
url: url,
basePath: basePath
});
expect(model.basePath).toEndWith(basePath);
expect(model._cacheKey).toEndWith(basePath);
});
it('fromGltf takes Resource as url and basePath parameters', function() {
spyOn(loadWithXhr, 'load').and.callThrough();
var url = new Resource({
url: texturedBoxUrl
});
var basePath = new Resource({
url: './Data/Models/Box-Textured-Separate/'
});
var model = Model.fromGltf({
url: url,
basePath: basePath
});
expect(model._resource).toEqual(basePath);
expect(loadWithXhr.load.calls.argsFor(0)[0]).toEqual(url.url);
});
it('renders', function() {
verifyRender(texturedBoxModel);
});
it('renders in CV', function() {
scene.morphToColumbusView(0.0);
verifyRender(texturedBoxModel);
});
it('renders in 2D', function() {
scene.morphTo2D(0.0);
verifyRender(texturedBoxModel);
});
it('renders in 2D over the IDL', function() {
return when(loadModel(texturedBoxUrl)).then(function(model) {
model.modelMatrix = Transforms.eastNorthUpToFixedFrame(Cartesian3.fromDegrees(180.0, 0.0, 100.0));
scene.morphTo2D(0.0);
verifyRender(model);
});
});
it('renders RTC in 2D', function() {
return loadModel(boxRtcUrl, {
modelMatrix : Matrix4.IDENTITY,
minimumPixelSize : 1
}).then(function(m) {
scene.morphTo2D(0.0);
verifyRender(m);
primitives.remove(m);
});
});
it('renders ECEF in 2D', function() {
return loadModel(boxEcefUrl, {
modelMatrix : Matrix4.IDENTITY,
minimumPixelSize : undefined
}).then(function(m) {
scene.morphTo2D(0.0);
verifyRender(m);
primitives.remove(m);
});
});
it('renders RTC in CV', function() {
return loadModel(boxRtcUrl, {
modelMatrix : Matrix4.IDENTITY,
minimumPixelSize : 1
}).then(function(m) {
scene.morphToColumbusView(0.0);
verifyRender(m);
primitives.remove(m);
});
});
it('renders ECEF in CV', function() {
return loadModel(boxEcefUrl, {
modelMatrix : Matrix4.IDENTITY,
minimumPixelSize : undefined
}).then(function(m) {
scene.morphToColumbusView(0.0);
verifyRender(m);
primitives.remove(m);
});
});
it('does not render during morph', function() {
var commandList = scene.frameState.commandList;
var model = texturedBoxModel;
model.show = true;
model.cull = false;
expect(model.ready).toBe(true);
scene.renderForSpecs();
expect(commandList.length).toBeGreaterThan(0);
scene.morphTo2D(1.0);
scene.renderForSpecs();
expect(commandList.length).toBe(0);
scene.completeMorph();
model.show = false;
});
it('Renders x-up model', function() {
return loadJson(boxEcefUrl).then(function(gltf) {
// Model data is z-up. Edit the transform to be z-up to x-up.
gltf.nodes.node_transform.matrix = Matrix4.pack(Axis.Z_UP_TO_X_UP, new Array(16));
return loadModelJson(gltf, {
modelMatrix : Matrix4.IDENTITY,
upAxis : Axis.X
}).then(function(m) {
verifyRender(m);
expect(m.upAxis).toBe(Axis.X);
primitives.remove(m);
});
});
});
it('Renders y-up model', function() {
return loadJson(boxEcefUrl).then(function(gltf) {
// Model data is z-up. Edit the transform to be z-up to y-up.
gltf.nodes.node_transform.matrix = Matrix4.pack(Axis.Z_UP_TO_Y_UP, new Array(16));
return loadModelJson(gltf, {
modelMatrix : Matrix4.IDENTITY,
upAxis : Axis.Y
}).then(function(m) {
verifyRender(m);
expect(m.upAxis).toBe(Axis.Y);
primitives.remove(m);
});
});
});
it('Renders z-up model', function() {
return loadJson(boxEcefUrl).then(function(gltf) {
// Model data is z-up. Edit the transform to be the identity.
gltf.nodes.node_transform.matrix = Matrix4.pack(Matrix4.IDENTITY, new Array(16));
return loadModelJson(gltf, {
modelMatrix : Matrix4.IDENTITY,
upAxis : Axis.Z
}).then(function(m) {
verifyRender(m);
expect(m.upAxis).toBe(Axis.Z);
primitives.remove(m);
});
});
});
it('resolves readyPromise', function() {
return texturedBoxModel.readyPromise.then(function(model) {
verifyRender(model);
});
});
it('rejects readyPromise on error', function() {
return loadJson(boomBoxUrl).then(function(gltf) {
gltf.images[0].uri = 'invalid.png';
var model = primitives.add(new Model({
gltf : gltf
}));
scene.renderForSpecs();
return model.readyPromise.then(function(model) {
fail('should not resolve');
}).otherwise(function(error) {
expect(model.ready).toEqual(false);
primitives.remove(model);
});
});
});
it('renders from glTF', function() {
// Simulate using procedural glTF as opposed to loading it from a file
return loadModelJson(texturedBoxModel.gltf).then(function(model) {
verifyRender(model);
primitives.remove(model);
});
});
it('Applies the right render state', function() {
spyOn(RenderState, 'fromCache').and.callThrough();
// Simulate using procedural glTF as opposed to loading it from a file
return loadModelJson(texturedBoxModel.gltf).then(function(model) {
var rs = {
frontFace : WebGLConstants.CCW,
cull : {
enabled : true,
face : WebGLConstants.BACK
},
lineWidth : 1.0,
polygonOffset : {
enabled : false,
factor : 0.0,
units : 0.0
},
depthRange : {
near : 0.0,
far : 1.0
},
depthTest : {
enabled : true,
func : WebGLConstants.LESS
},
colorMask : {
red : true,
green : true,
blue : true,
alpha : true
},
depthMask : true,
blending : {
enabled : false,
color : {
red : 0.0,
green : 0.0,
blue : 0.0,
alpha : 0.0
},
equationRgb : WebGLConstants.FUNC_ADD,
equationAlpha : WebGLConstants.FUNC_ADD,
functionSourceRgb : WebGLConstants.ONE,
functionSourceAlpha : WebGLConstants.ONE,
functionDestinationRgb : WebGLConstants.ZERO,
functionDestinationAlpha : WebGLConstants.ZERO
}
};
expect(RenderState.fromCache).toHaveBeenCalledWith(rs);
primitives.remove(model);
});
});
it('renders bounding volume', function() {
texturedBoxModel.debugShowBoundingVolume = true;
verifyRender(texturedBoxModel);
texturedBoxModel.debugShowBoundingVolume = false;
});
it('renders in wireframe', function() {
expect(scene).toRender([0, 0, 0, 255]);
texturedBoxModel.show = true;
texturedBoxModel.debugWireframe = true;
texturedBoxModel.zoomTo();
scene.renderForSpecs();
var commands = texturedBoxModel._nodeCommands;
var length = commands.length;
for (var i = 0; i < length; ++i) {
expect(commands[i].command.primitiveType).toEqual(PrimitiveType.LINES);
}
texturedBoxModel.show = false;
texturedBoxModel.debugWireframe = false;
});
it('renders with distance display condition', function() {
expect(scene).toRender([0, 0, 0, 255]);
var center = Matrix4.getTranslation(texturedBoxModel.modelMatrix, new Cartesian3());
var near = 10.0;
var far = 100.0;
texturedBoxModel.show = true;
texturedBoxModel.distanceDisplayCondition = new DistanceDisplayCondition(near, far);
var frameState = scene.frameState;
var commands = frameState.commandList;
frameState.camera.lookAt(center, new HeadingPitchRange(0.0, 0.0, far + 10.0));
frameState.camera.lookAtTransform(Matrix4.IDENTITY);
frameState.commandList = [];
texturedBoxModel.update(frameState);
expect(frameState.commandList.length).toEqual(0);
frameState.camera.lookAt(center, new HeadingPitchRange(0.0, 0.0, (far + near) * 0.5));
frameState.camera.lookAtTransform(Matrix4.IDENTITY);
frameState.commandList = [];
texturedBoxModel.update(frameState);
expect(frameState.commandList.length).toBeGreaterThan(0);
frameState.camera.lookAt(center, new HeadingPitchRange(0.0, 0.0, near - 1.0));
frameState.camera.lookAtTransform(Matrix4.IDENTITY);
frameState.commandList = [];
texturedBoxModel.update(frameState);
expect(frameState.commandList.length).toEqual(0);
scene.frameState.commandList = commands;
texturedBoxModel.show = false;
texturedBoxModel.distanceDisplayCondition = undefined;
});
it('distanceDisplayCondition throws when ner >= far', function() {
expect(function() {
texturedBoxModel.distanceDisplayCondition = new DistanceDisplayCondition(100.0, 10.0);
}).toThrowDeveloperError();
});
it('getNode throws when model is not loaded', function() {
var m = new Model();
expect(function() {
return m.getNode('gltf-node-name');
}).toThrowDeveloperError();
});
it('getNode throws when name is not provided', function() {
expect(function() {
return texturedBoxModel.getNode();
}).toThrowDeveloperError();
});
it('getNode returns undefined when node does not exist', function() {
expect(texturedBoxModel.getNode('name-of-node-that-does-not-exist')).not.toBeDefined();
});
it('getNode returns a node', function() {
var node = texturedBoxModel.getNode('Mesh');
expect(node).toBeDefined();
expect(node.name).toEqual('Mesh');
expect(node.id).toEqual(0);
expect(node.show).toEqual(true);
// Change node transform and render
expect(texturedBoxModel._cesiumAnimationsDirty).toEqual(false);
node.matrix = Matrix4.fromUniformScale(1.01, new Matrix4());
expect(texturedBoxModel._cesiumAnimationsDirty).toEqual(true);
verifyRender(texturedBoxModel);
expect(texturedBoxModel._cesiumAnimationsDirty).toEqual(false);
node.matrix = Matrix4.fromUniformScale(1.0, new Matrix4());
});
it('getMesh throws when model is not loaded', function() {
var m = new Model();
expect(function() {
return m.getMesh('gltf-mesh-name');
}).toThrowDeveloperError();
});
it('getMesh throws when name is not provided', function() {
expect(function() {
return texturedBoxModel.getMesh();
}).toThrowDeveloperError();
});
it('getMesh returns undefined when mesh does not exist', function() {
expect(texturedBoxModel.getMesh('name-of-mesh-that-does-not-exist')).not.toBeDefined();
});
it('getMesh returns a mesh', function() {
var mesh = texturedBoxModel.getMesh('Mesh');
expect(mesh).toBeDefined();
expect(mesh.name).toEqual('Mesh');
expect(mesh.id).toEqual(0);
expect(mesh.materials[0].name).toEqual('Texture');
});
it('getMaterial throws when model is not loaded', function() {
var m = new Model();
expect(function() {
return m.getMaterial('gltf-material-name');
}).toThrowDeveloperError();
});
it('getMaterial throws when name is not provided', function() {
expect(function() {
return texturedBoxModel.getMaterial();
}).toThrowDeveloperError();
});
it('getMaterial returns undefined when mesh does not exist', function() {
expect(texturedBoxModel.getMaterial('name-of-material-that-does-not-exist')).not.toBeDefined();
});
it('getMaterial returns a material', function() {
var material = texturedBoxModel.getMaterial('Texture');
expect(material).toBeDefined();
expect(material.name).toEqual('Texture');
expect(material.id).toEqual(0);
});
it('ModelMaterial.setValue throws when name is not provided', function() {
var material = texturedBoxModel.getMaterial('Texture');
expect(function() {
material.setValue();
}).toThrowDeveloperError();
});
it('ModelMaterial.setValue sets a scalar parameter', function() {
var material = texturedBoxModel.getMaterial('Texture');
material.setValue('shininess', 12.34);
expect(material.getValue('shininess')).toEqual(12.34);
});
it('ModelMaterial.setValue sets a Cartesian4 parameter', function() {
var material = texturedBoxModel.getMaterial('Texture');
var specular = new Cartesian4(0.25, 0.5, 0.75, 1.0);
material.setValue('specular', specular);
expect(material.getValue('specular')).toEqual(specular);
});
it('ModelMaterial.getValue throws when name is not provided', function() {
var material = texturedBoxModel.getMaterial('Texture');
expect(function() {
material.getValue();
}).toThrowDeveloperError();
});
it('ModelMaterial.getValue returns undefined when parameter does not exist', function() {
var material = texturedBoxModel.getMaterial('Texture');
expect(material.getValue('name-of-parameter-that-does-not-exist')).not.toBeDefined();
});
it('boundingSphere throws when model is not loaded', function() {
var m = new Model();
expect(function() {
return m.boundingSphere;
}).toThrowDeveloperError();
});
it('boundingSphere returns the bounding sphere', function() {
var boundingSphere = texturedBoxModel.boundingSphere;
expect(boundingSphere.center).toEqualEpsilon(new Cartesian3(0.0, 0.0, 0.0), CesiumMath.EPSILON3);
expect(boundingSphere.radius).toEqualEpsilon(0.866, CesiumMath.EPSILON3);
});
it('boundingSphere returns the bounding sphere when scale property is set', function() {
var originalScale = texturedBoxModel.scale;
texturedBoxModel.scale = 10;
var boundingSphere = texturedBoxModel.boundingSphere;
expect(boundingSphere.center).toEqualEpsilon(new Cartesian3(0.0, 0.0, 0.0), CesiumMath.EPSILON3);
expect(boundingSphere.radius).toEqualEpsilon(8.66, CesiumMath.EPSILON3);
texturedBoxModel.scale = originalScale;
});
it('boundingSphere returns the bounding sphere when maximumScale is reached', function() {
var originalScale = texturedBoxModel.scale;
var originalMaximumScale = texturedBoxModel.maximumScale;
texturedBoxModel.scale = 20;
texturedBoxModel.maximumScale = 10;
var boundingSphere = texturedBoxModel.boundingSphere;
expect(boundingSphere.center).toEqualEpsilon(new Cartesian3(0.0, 0.0, 0.0), CesiumMath.EPSILON3);
expect(boundingSphere.radius).toEqualEpsilon(8.66, CesiumMath.EPSILON3);
texturedBoxModel.scale = originalScale;
texturedBoxModel.maximumScale = originalMaximumScale;
});
it('boundingSphere returns the bounding sphere when modelMatrix has non-uniform scale', function() {
var originalMatrix = Matrix4.clone(texturedBoxModel.modelMatrix);
Matrix4.multiplyByScale(texturedBoxModel.modelMatrix, new Cartesian3(2, 5, 10), texturedBoxModel.modelMatrix);
var boundingSphere = texturedBoxModel.boundingSphere;
expect(boundingSphere.center).toEqualEpsilon(new Cartesian3(0.0, 0.0, 0.0), CesiumMath.EPSILON3);
expect(boundingSphere.radius).toEqualEpsilon(8.66, CesiumMath.EPSILON3);
texturedBoxModel.modelMatrix = originalMatrix;
});
it('destroys', function() {
return loadModel(boxUrl).then(function(m) {
expect(m.isDestroyed()).toEqual(false);
primitives.remove(m);
expect(m.isDestroyed()).toEqual(true);
});
});
///////////////////////////////////////////////////////////////////////////
it('Throws because of invalid extension', function() {
return loadJson(boxUrl).then(function(gltf) {
gltf.extensionsRequired = ['NOT_supported_extension'];
var model = primitives.add(new Model({
gltf : gltf
}));
expect(function() {
scene.renderForSpecs();
}).toThrowRuntimeError();
primitives.remove(model);
});
});
it('Throws because of invalid extension', function() {
return loadJson(boxUrl).then(function(gltf) {
gltf.extensionsRequired = ['CESIUM_binary_glTF'];
var model = primitives.add(new Model({
gltf : gltf
}));
expect(function() {
scene.renderForSpecs();
}).toThrowRuntimeError();
primitives.remove(model);
});
});
it('loads a glTF v0.8 model', function() {
return loadModel(cesiumAir_0_8Url, {
minimumPixelSize : 1
}).then(function(m) {
// Verify that the version has been updated
expect(m.gltf.asset.version).toEqual('2.0');
// Verify that rotation is converted from
// Axis-Angle (1,0,0,0) to Quaternion (0,0,0,1)
var rotation = m.gltf.nodes[3].rotation;
expect(rotation).toEqual([0.0, 0.0, 0.0, 1.0]);
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF model that doesn\'t have a technique', function() {
return loadModel(boxNoTechniqueUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF model that doesn\'t have indices', function() {
return loadModel(boxNoIndicesUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('renders texturedBoxCustom (all uniform semantics)', function() {
return loadModel(texturedBoxCustomUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('renders a model with the KHR_binary_glTF extension', function() {
return loadModel(texturedBoxKhrBinaryUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a model with the KHR_binary_glTF extension as an ArrayBuffer using new Model', function() {
return loadArrayBuffer(texturedBoxKhrBinaryUrl).then(function(arrayBuffer) {
return loadModelJson(arrayBuffer).then(function(model) {
verifyRender(model);
primitives.remove(model);
});
});
});
it('loads a model with the KHR_binary_glTF extension as an Uint8Array using new Model', function() {
return loadArrayBuffer(texturedBoxKhrBinaryUrl).then(function(arrayBuffer) {
return loadModelJson(new Uint8Array(arrayBuffer)).then(function(model) {
verifyRender(model);
primitives.remove(model);
});
});
});
it('Throws because of an invalid Binary glTF header - magic', function() {
var arrayBuffer = new ArrayBuffer(20);
expect(function() {
return new Model({
gltf : arrayBuffer
});
}).toThrowDeveloperError();
});
it('Throws because of an invalid Binary glTF header - version', function() {
var arrayBuffer = new ArrayBuffer(20);
var bytes = new Uint8Array(arrayBuffer);
bytes[0] = 'g'.charCodeAt(0);
bytes[1] = 'l'.charCodeAt(0);
bytes[2] = 'T'.charCodeAt(0);
bytes[3] = 'F'.charCodeAt(0);
expect(function() {
return new Model({
gltf : arrayBuffer
});
}).toThrowDeveloperError();
});
it('renders a model with the CESIUM_RTC extension', function() {
return loadModel(boxRtcUrl, {
modelMatrix : Matrix4.IDENTITY,
minimumPixelSize : 1
}).then(function(m) {
var bs = m.boundingSphere;
expect(bs.center.equalsEpsilon(new Cartesian3(6378137.0, 0.0, 0.0), CesiumMath.EPSILON14));
var radius = Math.sqrt(0.5 * 0.5 * 3);
expect(bs.radius).toEqualEpsilon(radius, CesiumMath.EPSILON14);
verifyRender(m);
primitives.remove(m);
});
});
it('renders textured box with external resources: .glsl, .bin, and .png files', function() {
return loadModel(texturedBoxSeparateUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('renders textured box with external KTX texture', function() {
return loadModel(texturedBoxKTXUrl, {
incrementallyLoadTextures : false
}).then(function(m) {
verifyRender(m);
expect(Object.keys(m._rendererResources.textures).length).toBe(1);
primitives.remove(m);
});
});
it('renders textured box with embedded binary KTX texture', function() {
return loadModel(texturedBoxKTXBinaryUrl, {
incrementallyLoadTextures : false
}).then(function(m) {
verifyRender(m);
expect(Object.keys(m._rendererResources.textures).length).toBe(1);
primitives.remove(m);
});
});
it('renders textured box with embedded base64 encoded KTX texture', function() {
return loadModel(texturedBoxKTXEmbeddedUrl, {
incrementallyLoadTextures : false
}).then(function(m) {
verifyRender(m);
expect(Object.keys(m._rendererResources.textures).length).toBe(1);
primitives.remove(m);
});
});
it('renders textured box with external CRN texture', function() {
if (!scene.context.s3tc) {
return;
}
return loadModel(texturedBoxCRNUrl, {
incrementallyLoadTextures : false
}).then(function(m) {
verifyRender(m);
expect(Object.keys(m._rendererResources.textures).length).toBe(1);
primitives.remove(m);
});
});
it('renders textured box with embedded binary CRN texture', function() {
if (!scene.context.s3tc) {
return;
}
return loadModel(texturedBoxCRNBinaryUrl, {
incrementallyLoadTextures : false
}).then(function(m) {
verifyRender(m);
expect(Object.keys(m._rendererResources.textures).length).toBe(1);
primitives.remove(m);
});
});
it('renders textured box with embedded base64 encoded CRN texture', function() {
if (!scene.context.s3tc) {
return;
}
return loadModel(texturedBoxCRNEmbeddedUrl, {
incrementallyLoadTextures : false
}).then(function(m) {
verifyRender(m);
expect(Object.keys(m._rendererResources.textures).length).toBe(1);
primitives.remove(m);
});
});
///////////////////////////////////////////////////////////////////////////
it('loads cesiumAir', function() {
expect(cesiumAirModel.minimumPixelSize).toEqual(1);
expect(cesiumAirModel.maximumScale).toEqual(200);
expect(cesiumAirModel.asynchronous).toEqual(false);
});
it('renders cesiumAir (has translucency)', function() {
verifyRender(cesiumAirModel);
});
it('renders cesiumAir with per-node show (root)', function() {
expect(scene).toRender([0, 0, 0, 255]);
var commands = cesiumAirModel._nodeCommands;
var i;
var length;
cesiumAirModel.show = true;
cesiumAirModel.zoomTo();
cesiumAirModel.getNode('Cesium_Air').show = false;
expect(scene).toRender([0, 0, 0, 255]);
length = commands.length;
for (i = 0; i < length; ++i) {
expect(commands[i].show).toEqual(false);
}
cesiumAirModel.getNode('Cesium_Air').show = true;
expect(scene).notToRender([0, 0, 0, 255]);
length = commands.length;
for (i = 0; i < length; ++i) {
expect(commands[i].show).toEqual(true);
}
cesiumAirModel.show = false;
});
it('renders cesiumAir with per-node show (non-root)', function() {
cesiumAirModel.show = true;
cesiumAirModel.zoomTo();
var commands = cesiumAirModel._nodeCommands;
var i;
var length;
var commandsPropFalse = 0;
var commandsPropTrue = 0;
cesiumAirModel.getNode('Prop').show = false;
scene.renderForSpecs();
length = commands.length;
for (i = 0; i < length; ++i) {
commandsPropFalse += commands[i].show ? 1 : 0;
}
cesiumAirModel.getNode('Prop').show = true;
scene.renderForSpecs();
length = commands.length;
for (i = 0; i < length; ++i) {
commandsPropTrue += commands[i].show ? 1 : 0;
}
cesiumAirModel.show = false;
// Prop node has one mesh with two primitives
expect(commandsPropFalse).toEqual(commandsPropTrue - 2);
});
it('picks cesiumAir', function() {
if (FeatureDetection.isInternetExplorer()) {
// Workaround IE 11.0.9. This test fails when all tests are ran without a breakpoint here.
return;
}
cesiumAirModel.show = true;
cesiumAirModel.zoomTo();
expect(scene).toPickAndCall(function(result) {
expect(result.primitive).toEqual(cesiumAirModel);
expect(result.id).toEqual(cesiumAirUrl);
expect(result.node).toBeDefined();
expect(result.mesh).toBeDefined();
});
cesiumAirModel.show = false;
});
it('cesiumAir is picked with a new pick id', function() {
if (FeatureDetection.isInternetExplorer()) {
// Workaround IE 11.0.9. This test fails when all tests are ran without a breakpoint here.
return;
}
var oldId = cesiumAirModel.id;
cesiumAirModel.id = 'id';
cesiumAirModel.show = true;
cesiumAirModel.zoomTo();
expect(scene).toPickAndCall(function(result) {
expect(result.primitive).toEqual(cesiumAirModel);
expect(result.id).toEqual('id');
});
cesiumAirModel.id = oldId;
cesiumAirModel.show = false;
});
it('cesiumAir is not picked (show === false)', function() {
cesiumAirModel.zoomTo();
expect(scene).notToPick();
});
///////////////////////////////////////////////////////////////////////////
it('renders animBoxes without animation', function() {
verifyRender(animBoxesModel);
});
it('adds and removes all animations', function() {
var animations = animBoxesModel.activeAnimations;
expect(animations.length).toEqual(0);
var spyAdd = jasmine.createSpy('listener');
animations.animationAdded.addEventListener(spyAdd);
var a = animations.addAll();
expect(animations.length).toEqual(2);
expect(spyAdd.calls.count()).toEqual(2);
expect(spyAdd.calls.argsFor(0)[0]).toBe(animBoxesModel);
expect(spyAdd.calls.argsFor(0)[1]).toBe(a[0]);
expect(spyAdd.calls.argsFor(1)[0]).toBe(animBoxesModel);
expect(spyAdd.calls.argsFor(1)[1]).toBe(a[1]);
animations.animationAdded.removeEventListener(spyAdd);
expect(animations.contains(a[0])).toEqual(true);
expect(animations.get(0)).toEqual(a[0]);
expect(animations.contains(a[1])).toEqual(true);
expect(animations.get(1)).toEqual(a[1]);
var spyRemove = jasmine.createSpy('listener');
animations.animationRemoved.addEventListener(spyRemove);
animations.removeAll();
expect(animations.length).toEqual(0);
expect(spyRemove.calls.count()).toEqual(2);
expect(spyRemove.calls.argsFor(0)[0]).toBe(animBoxesModel);
expect(spyRemove.calls.argsFor(0)[1]).toBe(a[0]);
expect(spyRemove.calls.argsFor(1)[0]).toBe(animBoxesModel);
expect(spyRemove.calls.argsFor(1)[1]).toBe(a[1]);
animations.animationRemoved.removeEventListener(spyRemove);
});
it('addAll throws when model is not loaded', function() {
var m = new Model();
expect(function() {
return m.activeAnimations.addAll();
}).toThrowDeveloperError();
});
it('addAll throws when speedup is less than or equal to zero.', function() {
expect(function() {
return animBoxesModel.activeAnimations.addAll({
speedup : 0.0
});
}).toThrowDeveloperError();
});
it('adds and removes an animation', function() {
var animations = animBoxesModel.activeAnimations;
expect(animations.length).toEqual(0);
var spyAdd = jasmine.createSpy('listener');
animations.animationAdded.addEventListener(spyAdd);
var a = animations.add({
name : 'animation_1'
});
expect(a).toBeDefined();
expect(a.name).toEqual('animation_1');
expect(a.startTime).not.toBeDefined();
expect(a.delay).toEqual(0.0);
expect(a.stopTime).not.toBeDefined();
expect(a.removeOnStop).toEqual(false);
expect(a.speedup).toEqual(1.0);
expect(a.reverse).toEqual(false);
expect(a.loop).toEqual(ModelAnimationLoop.NONE);
expect(a.start).toBeDefined();
expect(a.update).toBeDefined();
expect(a.stop).toBeDefined();
expect(spyAdd).toHaveBeenCalledWith(animBoxesModel, a);
animations.animationAdded.removeEventListener(spyAdd);
expect(animations.contains(a)).toEqual(true);
expect(animations.get(0)).toEqual(a);
var spyRemove = jasmine.createSpy('listener');
animations.animationRemoved.addEventListener(spyRemove);
expect(animations.remove(a)).toEqual(true);
expect(animations.remove(a)).toEqual(false);
expect(animations.remove()).toEqual(false);
expect(animations.contains(a)).toEqual(false);
expect(animations.length).toEqual(0);
expect(spyRemove).toHaveBeenCalledWith(animBoxesModel, a);
animations.animationRemoved.removeEventListener(spyRemove);
});
it('adds an animation by index', function() {
var animations = animBoxesModel.activeAnimations;
expect(animations.length).toEqual(0);
var spyAdd = jasmine.createSpy('listener');
animations.animationAdded.addEventListener(spyAdd);
var a = animations.add({
index : 1
});
expect(a).toBeDefined();
expect(a.name).toEqual('animation_1');
animations.remove(a);
});
it('add throws when name and index are not defined', function() {
var m = new Model();
expect(function() {
return m.activeAnimations.add();
}).toThrowDeveloperError();
});
it('add throws when index is invalid', function() {
var m = new Model();
expect(function() {
return m.activeAnimations.add({
index : -1
});
}).toThrowDeveloperError();
expect(function() {
return m.activeAnimations.add({
index : 2
});
}).toThrowDeveloperError();
});
it('add throws when model is not loaded', function() {
var m = new Model();
expect(function() {
return m.activeAnimations.add({
name : 'animation_1'
});
}).toThrowDeveloperError();
});
it('add throws when name is invalid.', function() {
expect(function() {
return animBoxesModel.activeAnimations.add({
name : 'animation-does-not-exist'
});
}).toThrowDeveloperError();
});
it('add throws when speedup is less than or equal to zero.', function() {
expect(function() {
return animBoxesModel.activeAnimations.add({
name : 'animation_1',
speedup : 0.0
});
}).toThrowDeveloperError();
});
it('get throws without an index', function() {
var m = new Model();
expect(function() {
return m.activeAnimations.get();
}).toThrowDeveloperError();
});
it('contains(undefined) returns false', function() {
expect(animBoxesModel.activeAnimations.contains(undefined)).toEqual(false);
});
it('raises animation start, update, and stop events when removeOnStop is true', function() {
var time = JulianDate.fromDate(new Date('January 1, 2014 12:00:00 UTC'));
var animations = animBoxesModel.activeAnimations;
var a = animations.add({
name : 'animation_1',
startTime : time,
removeOnStop : true
});
var spyStart = jasmine.createSpy('listener');
a.start.addEventListener(spyStart);
var spyUpdate = jasmine.createSpy('listener');
a.update.addEventListener(spyUpdate);
var stopped = false;
a.stop.addEventListener(function(model, animation) {
stopped = true;
});
var spyStop = jasmine.createSpy('listener');
a.stop.addEventListener(spyStop);
animBoxesModel.show = true;
return pollToPromise(function() {
scene.renderForSpecs(time);
time = JulianDate.addSeconds(time, 1.0, time, new JulianDate());
return stopped;
}, { timeout : 10000 }).then(function() {
expect(spyStart).toHaveBeenCalledWith(animBoxesModel, a);
expect(spyUpdate.calls.count()).toEqual(4);
expect(spyUpdate.calls.argsFor(0)[0]).toBe(animBoxesModel);
expect(spyUpdate.calls.argsFor(0)[1]).toBe(a);
expect(spyUpdate.calls.argsFor(0)[2]).toEqualEpsilon(0.0, CesiumMath.EPSILON14);
expect(spyUpdate.calls.argsFor(1)[2]).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
expect(spyUpdate.calls.argsFor(2)[2]).toEqualEpsilon(2.0, CesiumMath.EPSILON14);
expect(spyUpdate.calls.argsFor(3)[2]).toEqualEpsilon(3.0, CesiumMath.EPSILON14);
expect(spyStop).toHaveBeenCalledWith(animBoxesModel, a);
expect(animations.length).toEqual(0);
animBoxesModel.show = false;
});
});
it('Animates with a delay', function() {
var time = JulianDate.fromDate(new Date('January 1, 2014 12:00:00 UTC'));
var animations = animBoxesModel.activeAnimations;
var a = animations.add({
name : 'animation_1',
startTime : time,
delay : 1.0
});
var spyStart = jasmine.createSpy('listener');
a.start.addEventListener(spyStart);
animBoxesModel.show = true;
scene.renderForSpecs(time); // Does not fire start
scene.renderForSpecs(JulianDate.addSeconds(time, 1.0, new JulianDate()));
expect(spyStart.calls.count()).toEqual(1);
expect(animations.remove(a)).toEqual(true);
animBoxesModel.show = false;
});
it('Animates with an explicit stopTime', function() {
var time = JulianDate.fromDate(new Date('January 1, 2014 12:00:00 UTC'));
var stopTime = JulianDate.fromDate(new Date('January 1, 2014 12:00:01 UTC'));
var animations = animBoxesModel.activeAnimations;
var a = animations.add({
name : 'animation_1',
startTime : time,
stopTime : stopTime
});
var spyUpdate = jasmine.createSpy('listener');
a.update.addEventListener(spyUpdate);
animBoxesModel.show = true;
scene.renderForSpecs(time);
scene.renderForSpecs(JulianDate.addSeconds(time, 1.0, new JulianDate()));
scene.renderForSpecs(JulianDate.addSeconds(time, 2.0, new JulianDate())); // Does not fire update
expect(spyUpdate.calls.count()).toEqual(2);
expect(spyUpdate.calls.argsFor(0)[2]).toEqualEpsilon(0.0, CesiumMath.EPSILON14);
expect(spyUpdate.calls.argsFor(1)[2]).toEqualEpsilon(1.0, CesiumMath.EPSILON14);
expect(animations.remove(a)).toEqual(true);
animBoxesModel.show = false;
});
it('Animates with a speedup', function() {
var time = JulianDate.fromDate(new Date('January 1, 2014 12:00:00 UTC'));
var animations = animBoxesModel.activeAnimations;
var a = animations.add({
name : 'animation_1',
startTime : time,
speedup : 1.5
});
var spyUpdate = jasmine.createSpy('listener');
a.update.addEventListener(spyUpdate);
animBoxesModel.show = true;
scene.renderForSpecs(time);
scene.renderForSpecs(JulianDate.addSeconds(time, 1.0, new JulianDate()));
scene.renderForSpecs(JulianDate.addSeconds(time, 2.0, new JulianDate()));
expect(spyUpdate.calls.count()).toEqual(3);
expect(spyUpdate.calls.argsFor(0)[2]).toEqualEpsilon(0.0, CesiumMath.EPSILON14);
expect(spyUpdate.calls.argsFor(1)[2]).toEqualEpsilon(1.5, CesiumMath.EPSILON14);
expect(spyUpdate.calls.argsFor(2)[2]).toEqualEpsilon(3.0, CesiumMath.EPSILON14);
expect(animations.remove(a)).toEqual(true);
animBoxesModel.show = false;
});
it('Animates in reverse', function() {
var time = JulianDate.fromDate(new Date('January 1, 2014 12:00:00 UTC'));
var animations = animBoxesModel.activeAnimations;
var a = animations.add({
name : 'animation_1',
startTime : time,
reverse : true
});
var spyUpdate = jasmine.createSpy('listener');
a.update.addEventListener(spyUpdate);
animBoxesModel.show = true;
scene.renderForSpecs(time);
scene.renderForSpecs(JulianDate.addSeconds(time, 1.0, new JulianDate()));
scene.renderForSpecs(JulianDate.addSeconds(time, 2.0, new JulianDate()));
scene.renderForSpecs(JulianDate.addSeconds(time, 3.0, new JulianDate()));
expect(spyUpdate.calls.count()).toEqual(4);
expect(spyUpdate.calls.argsFor(0)[2]).toEqualEpsilon(3.708, CesiumMath.EPSILON3);
expect(spyUpdate.calls.argsFor(1)[2]).toEqualEpsilon(2.708, CesiumMath.EPSILON3);
expect(spyUpdate.calls.argsFor(2)[2]).toEqualEpsilon(1.708, CesiumMath.EPSILON3);
expect(spyUpdate.calls.argsFor(3)[2]).toEqualEpsilon(0.708, CesiumMath.EPSILON3);
expect(animations.remove(a)).toEqual(true);
animBoxesModel.show = false;
});
it('Animates with REPEAT', function() {
var time = JulianDate.fromDate(new Date('January 1, 2014 12:00:00 UTC'));
var animations = animBoxesModel.activeAnimations;
var a = animations.add({
name : 'animation_1',
startTime : time,
loop : ModelAnimationLoop.REPEAT
});
var spyUpdate = jasmine.createSpy('listener');
a.update.addEventListener(spyUpdate);
animBoxesModel.show = true;
for (var i = 0; i < 8; ++i) {
scene.renderForSpecs(JulianDate.addSeconds(time, i, new JulianDate()));
}
expect(spyUpdate.calls.count()).toEqual(8);
expect(spyUpdate.calls.argsFor(0)[2]).toEqualEpsilon(0.0, CesiumMath.EPSILON3);
expect(spyUpdate.calls.argsFor(1)[2]).toEqualEpsilon(1.0, CesiumMath.EPSILON3);
expect(spyUpdate.calls.argsFor(2)[2]).toEqualEpsilon(2.0, CesiumMath.EPSILON3);
expect(spyUpdate.calls.argsFor(3)[2]).toEqualEpsilon(3.0, CesiumMath.EPSILON3);
expect(spyUpdate.calls.argsFor(4)[2]).toEqualEpsilon(0.291, CesiumMath.EPSILON3); // Repeat with duration of ~3.7
expect(spyUpdate.calls.argsFor(5)[2]).toEqualEpsilon(1.291, CesiumMath.EPSILON3);
expect(spyUpdate.calls.argsFor(6)[2]).toEqualEpsilon(2.291, CesiumMath.EPSILON3);
expect(spyUpdate.calls.argsFor(7)[2]).toEqualEpsilon(3.291, CesiumMath.EPSILON3);
expect(animations.remove(a)).toEqual(true);
animBoxesModel.show = false;
});
it('Animates with MIRRORED_REPEAT', function() {
var time = JulianDate.fromDate(new Date('January 1, 2014 12:00:00 UTC'));
var animations = animBoxesModel.activeAnimations;
var a = animations.add({
name : 'animation_1',
startTime : time,
loop : ModelAnimationLoop.MIRRORED_REPEAT
});
var spyUpdate = jasmine.createSpy('listener');
a.update.addEventListener(spyUpdate);
animBoxesModel.show = true;
for (var i = 0; i < 8; ++i) {
scene.renderForSpecs(JulianDate.addSeconds(time, i, new JulianDate()));
}
expect(spyUpdate.calls.count()).toEqual(8);
expect(spyUpdate.calls.argsFor(0)[2]).toEqualEpsilon(0.0, CesiumMath.EPSILON3);
expect(spyUpdate.calls.argsFor(1)[2]).toEqualEpsilon(1.0, CesiumMath.EPSILON3);
expect(spyUpdate.calls.argsFor(2)[2]).toEqualEpsilon(2.0, CesiumMath.EPSILON3);
expect(spyUpdate.calls.argsFor(3)[2]).toEqualEpsilon(3.0, CesiumMath.EPSILON3);
expect(spyUpdate.calls.argsFor(4)[2]).toEqualEpsilon(3.416, CesiumMath.EPSILON3); // Mirror repeat with duration of 3.6
expect(spyUpdate.calls.argsFor(5)[2]).toEqualEpsilon(2.416, CesiumMath.EPSILON3);
expect(spyUpdate.calls.argsFor(6)[2]).toEqualEpsilon(1.416, CesiumMath.EPSILON3);
expect(spyUpdate.calls.argsFor(7)[2]).toEqualEpsilon(0.416, CesiumMath.EPSILON3);
expect(animations.remove(a)).toEqual(true);
animBoxesModel.show = false;
});
it('Animates and renders', function() {
return loadModel(animBoxesUrl, {
scale : 2.0
}).then(function(m) {
var node = m.getNode('inner_box');
var time = JulianDate.fromDate(new Date('January 1, 2014 12:00:00 UTC'));
var animations = m.activeAnimations;
var a = animations.add({
name : 'animation_1',
startTime : time
});
expect(node.matrix).toEqual(Matrix4.IDENTITY);
var previousMatrix = Matrix4.clone(node.matrix);
m.zoomTo();
for (var i = 1; i < 4; ++i) {
var t = JulianDate.addSeconds(time, i, new JulianDate());
expect({
scene : scene,
time : t
}).toRender([0, 0, 0, 255]);
m.show = true;
expect({
scene : scene,
time : t
}).notToRender([0, 0, 0, 255]);
m.show = false;
expect(node.matrix).not.toEqual(previousMatrix);
previousMatrix = Matrix4.clone(node.matrix);
}
expect(animations.remove(a)).toEqual(true);
primitives.remove(m);
});
});
it('does not animate when there are no animations', function() {
var animations = animBoxesModel.activeAnimations;
expect(animations.length).toEqual(0);
expect(animations.update()).toEqual(false);
});
///////////////////////////////////////////////////////////////////////////
it('renders riggedFigure without animation', function() {
verifyRender(riggedFigureModel);
});
it('renders riggedFigure with animation (skinning)', function() {
var time = JulianDate.fromDate(new Date('January 1, 2014 12:00:00 UTC'));
var animations = riggedFigureModel.activeAnimations;
animations.addAll({
startTime : time
});
riggedFigureModel.zoomTo();
for (var i = 0; i < 6; ++i) {
var t = JulianDate.addSeconds(time, 0.25 * i, new JulianDate());
expect({
scene : scene,
time : t
}).toRender([0, 0, 0, 255]);
riggedFigureModel.show = true;
expect({
scene : scene,
time : t
}).notToRender([0, 0, 0, 255]);
riggedFigureModel.show = false;
}
animations.removeAll();
riggedFigureModel.show = false;
});
it('renders riggedSimple', function() {
return loadModel(riggedSimpleUrl).then(function(m) {
expect(m).toBeDefined();
verifyRender(m);
});
});
it('should load a model where WebGL shader optimizer removes an attribute (linux)', function() {
var url = './Data/Models/test-shader-optimize/test-shader-optimize.gltf';
return loadModel(url).then(function(m) {
expect(m).toBeDefined();
primitives.remove(m);
});
});
it('releaseGltfJson releases glTF JSON when constructed with fromGltf', function() {
return loadModel(boxUrl, {
releaseGltfJson : true
}).then(function(m) {
expect(m.releaseGltfJson).toEqual(true);
expect(m.gltf).not.toBeDefined();
verifyRender(m);
primitives.remove(m);
});
});
it('releaseGltfJson releases glTF JSON when constructed with Model constructor function', function() {
return loadModelJson(texturedBoxModel.gltf, {
releaseGltfJson : true,
incrementallyLoadTextures : false,
asynchronous : true
}).then(function(m) {
expect(m.releaseGltfJson).toEqual(true);
expect(m.gltf).not.toBeDefined();
verifyRender(m);
primitives.remove(m);
});
});
it('Models are cached with fromGltf (1/2)', function() {
var key = 'a-cache-key';
// This cache for this model is initially empty
var gltfCache = Model._gltfCache;
expect(gltfCache[key]).not.toBeDefined();
var modelRendererResourceCache = scene.context.cache.modelRendererResourceCache;
expect(modelRendererResourceCache[key]).not.toBeDefined();
// Use a custom cache key to avoid conflicting with previous tests
var promise = loadModel(boxUrl, {
cacheKey : key
});
expect(gltfCache[key]).toBeDefined();
expect(gltfCache[key].count).toEqual(1);
expect(gltfCache[key].ready).toEqual(false);
// This is a cache hit, but the JSON request is still pending.
// In the test below, the cache hit occurs after the request completes.
var promise2 = loadModel(boxUrl, {
cacheKey : key
});
expect(gltfCache[key].count).toEqual(2);
return when.all([promise, promise2], function(models) {
var m = models[0];
var m2 = models[1];
// Render scene to progressively load the model
scene.renderForSpecs();
// glTF JSON cache set ready once the JSON was downloaded
expect(gltfCache[key].ready).toEqual(true);
expect(modelRendererResourceCache[key]).toBeDefined();
expect(modelRendererResourceCache[key].count).toEqual(2);
expect(modelRendererResourceCache[key].ready).toEqual(true);
verifyRender(m);
verifyRender(m2);
primitives.remove(m);
expect(gltfCache[key].count).toEqual(1);
expect(modelRendererResourceCache[key].count).toEqual(1);
primitives.remove(m2);
expect(gltfCache[key]).not.toBeDefined();
expect(modelRendererResourceCache[key]).not.toBeDefined();
});
});
it('Models are cached with fromGltf (2/2)', function() {
var key = 'a-cache-key';
// This cache for this model is initially empty
var gltfCache = Model._gltfCache;
expect(gltfCache[key]).not.toBeDefined();
// Use a custom cache key to avoid conflicting with previous tests
var promise = loadModel(boxUrl, {
cacheKey : key
});
expect(gltfCache[key]).toBeDefined();
expect(gltfCache[key].count).toEqual(1);
expect(gltfCache[key].ready).toEqual(false);
return promise.then(function(m) {
// Render scene to progressively load the model
scene.renderForSpecs();
// Cache hit after JSON request completed.
var m2;
loadModel(boxUrl, {
cacheKey : key
}).then(function(model) {
m2 = model;
});
expect(gltfCache[key].ready).toEqual(true);
expect(gltfCache[key].count).toEqual(2);
verifyRender(m);
verifyRender(m2);
primitives.remove(m);
expect(gltfCache[key].count).toEqual(1);
primitives.remove(m2);
expect(gltfCache[key]).not.toBeDefined();
});
});
it('Cache with a custom cacheKey the Model Constructor (1/2)', function() {
var key = 'a-cache-key';
// This cache for this model is initially empty
var gltfCache = Model._gltfCache;
expect(gltfCache[key]).not.toBeDefined();
var modelRendererResourceCache = scene.context.cache.modelRendererResourceCache;
expect(modelRendererResourceCache[key]).not.toBeDefined();
var m = primitives.add(new Model({
gltf : texturedBoxModel.gltf,
modelMatrix : Transforms.eastNorthUpToFixedFrame(Cartesian3.fromDegrees(0.0, 0.0, 100.0)),
show : false,
cacheKey : key,
incrementallyLoadTextures : false,
asynchronous : true
}));
addZoomTo(m);
expect(gltfCache[key]).toBeDefined();
expect(gltfCache[key].count).toEqual(1);
expect(gltfCache[key].ready).toEqual(true);
return pollToPromise(function() {
// Render scene to progressively load the model
scene.renderForSpecs();
expect(modelRendererResourceCache[key]).toBeDefined();
expect(modelRendererResourceCache[key].count).toEqual(1);
expect(modelRendererResourceCache[key].ready).toEqual(m.ready);
return m.ready;
}, { timeout : 10000 }).then(function() {
verifyRender(m);
primitives.remove(m);
expect(gltfCache[key]).not.toBeDefined();
expect(modelRendererResourceCache[key]).not.toBeDefined();
});
});
it('Cache with a custom cacheKey when using the Model Constructor (2/2)', function() {
var key = 'a-cache-key';
var key3 = 'another-cache-key';
// This cache for these keys is initially empty
var gltfCache = Model._gltfCache;
expect(gltfCache[key]).not.toBeDefined();
expect(gltfCache[key3]).not.toBeDefined();
var modelRendererResourceCache = scene.context.cache.modelRendererResourceCache;
expect(modelRendererResourceCache[key]).not.toBeDefined();
expect(modelRendererResourceCache[key3]).not.toBeDefined();
var m = primitives.add(new Model({
gltf : texturedBoxModel.gltf,
modelMatrix : Transforms.eastNorthUpToFixedFrame(Cartesian3.fromDegrees(0.0, 0.0, 100.0)),
show : false,
cacheKey : key,
asynchronous : true
}));
addZoomTo(m);
expect(gltfCache[key]).toBeDefined();
expect(gltfCache[key].count).toEqual(1);
expect(gltfCache[key].ready).toEqual(true);
// Should be cache hit. Not need to provide glTF.
var m2 = primitives.add(new Model({
modelMatrix : Transforms.eastNorthUpToFixedFrame(Cartesian3.fromDegrees(0.0, 0.0, 100.0)),
show : false,
cacheKey : key,
asynchronous : true
}));
addZoomTo(m2);
expect(gltfCache[key].count).toEqual(2);
// Should be cache miss.
var m3 = primitives.add(new Model({
gltf : texturedBoxModel.gltf,
modelMatrix : Transforms.eastNorthUpToFixedFrame(Cartesian3.fromDegrees(0.0, 0.0, 100.0)),
show : false,
cacheKey : key3,
asynchronous : true
}));
addZoomTo(m3);
expect(gltfCache[key3]).toBeDefined();
expect(gltfCache[key3].count).toEqual(1);
expect(gltfCache[key3].ready).toEqual(true);
return pollToPromise(function() {
// Render scene to progressively load the model
scene.renderForSpecs();
if (m.ready && m2.ready && m3.ready) {
expect(modelRendererResourceCache[key]).toBeDefined();
expect(modelRendererResourceCache[key].count).toEqual(2);
expect(modelRendererResourceCache[key3]).toBeDefined();
expect(modelRendererResourceCache[key3].count).toEqual(1);
return true;
}
return false;
}, { timeout : 10000 }).then(function() {
verifyRender(m);
verifyRender(m2);
verifyRender(m3);
primitives.remove(m);
primitives.remove(m2);
expect(gltfCache[key]).not.toBeDefined();
expect(modelRendererResourceCache[key]).not.toBeDefined();
primitives.remove(m3);
expect(gltfCache[key3]).not.toBeDefined();
expect(modelRendererResourceCache[key3]).not.toBeDefined();
});
});
it('Loads with incrementallyLoadTextures set to true', function() {
return loadModelJson(texturedBoxModel.gltf, {
incrementallyLoadTextures : true,
show : true
}).then(function(m) {
// Get the rendered color of the model before textures are loaded
var loadedColor;
m.zoomTo();
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba).not.toEqual([0, 0, 0, 255]);
loadedColor = rgba;
});
return pollToPromise(function() {
// Render scene to progressively load textures
scene.renderForSpecs();
// Textures have finished loading
return (m.pendingTextureLoads === 0);
}, { timeout : 10000 }).then(function() {
expect(scene).notToRender(loadedColor);
primitives.remove(m);
});
});
});
it('Loads with incrementallyLoadTextures set to false', function() {
return loadModelJson(texturedBoxModel.gltf, {
incrementallyLoadTextures : false,
show : true
}).then(function(m) {
// Get the rendered color of the model before textures are loaded
var loadedColor;
m.zoomTo();
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba).not.toEqual([0, 0, 0, 255]);
loadedColor = rgba;
});
return pollToPromise(function() {
// Render scene to progressively load textures (they should already be loaded)
scene.renderForSpecs();
// Textures have finished loading
return !defined(m._loadResources);
}, { timeout : 10000 }).then(function() {
expect(scene).toRender(loadedColor);
primitives.remove(m);
});
});
});
it('loads a glTF with KHR_materials_common using the constant lighting model', function() {
return loadModel(boxConstantUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF with KHR_materials_common using the lambert lighting model', function() {
return loadModel(boxLambertUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF with KHR_materials_common using the blinn lighting model', function() {
return loadModel(boxBlinnUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF with KHR_materials_common using the phong lighting model', function() {
return loadModel(boxPhongUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF with KHR_materials_common using a black ambient/directional light', function() {
return loadModel(boxNoLightUrl).then(function(m) {
// Verify that we render a black model because lighting is completely off
expect(m.ready).toBe(true);
expect(scene).toRender([0, 0, 0, 255]);
m.show = true;
m.zoomTo();
expect(scene).toRender([0, 0, 0, 255]);
m.show = false;
primitives.remove(m);
});
});
it('loads a glTF with KHR_materials_common using an ambient light', function() {
return loadModel(boxAmbientLightUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF with KHR_materials_common using a directional light', function() {
return loadModel(boxDirectionalLightUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF with KHR_materials_common using a point light', function() {
return loadModel(boxPointLightUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF with KHR_materials_common using a spot light', function() {
return loadModel(boxSpotLightUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF with KHR_materials_common that has skinning', function() {
return loadModel(CesiumManUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF with KHR_materials_common that has transparency', function() {
return loadModel(boxTransparentUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF with WEB3D_quantized_attributes POSITION and NORMAL', function() {
return loadModel(boxQuantizedUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF with WEB3D_quantized_attributes and accessor.normalized', function() {
return loadModel(boxQuantizedUrl).then(function(m) {
verifyRender(m);
var gltf = m.gltf;
var accessors = gltf.accessors;
var normalAccessor = accessors[2];
var positionAccessor = accessors[1];
normalAccessor.normalized = true;
positionAccessor.normalized = true;
var decodeMatrixArray = normalAccessor.extensions.WEB3D_quantized_attributes.decodeMatrix;
var decodeMatrix = new Matrix4();
Matrix4.unpack(decodeMatrixArray, 0, decodeMatrix);
Matrix4.multiplyByUniformScale(decodeMatrix, 65535.0, decodeMatrix);
Matrix4.pack(decodeMatrix, decodeMatrixArray);
decodeMatrixArray = positionAccessor.extensions.WEB3D_quantized_attributes.decodeMatrix;
Matrix4.unpack(decodeMatrixArray, 0, decodeMatrix);
Matrix4.multiplyByUniformScale(decodeMatrix, 65535.0, decodeMatrix);
Matrix4.pack(decodeMatrix, decodeMatrixArray);
primitives.remove(m);
return loadModelJson(gltf, {}).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
});
it('loads a glTF with WEB3D_quantized_attributes POSITION and NORMAL where primitives with different accessors use the same shader', function() {
return loadModel(milkTruckQuantizedUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF with WEB3D_quantized_attributes POSITION, TEXCOORD and NORMAL where one primitive is quantized and the other is not, but both use the same shader', function() {
return loadModel(milkTruckQuantizedMismatchUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF with WEB3D_quantized_attributes TEXCOORD', function() {
return loadModel(duckQuantizedUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF with WEB3D_quantized_attributes JOINT and WEIGHT', function() {
return loadModel(riggedSimpleQuantizedUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF 2.0 without textures', function() {
return loadModel(boxPbrUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF 2.0 with textures', function() {
return loadModel(boomBoxUrl).then(function(m) {
m.scale = 20.0; // Source model is very small, so scale up a bit
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF 2.0 with node animation', function() {
return loadModel(boxAnimatedPbrUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF 2.0 with node animations set to unclamped', function() {
return loadModel(boxAnimatedPbrUrl, {
clampAnimations : false
}).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF 2.0 with skinning', function() {
return loadModel(riggedSimplePbrUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF 2.0 with morph targets', function() {
return loadModel(animatedMorphCubeUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads a glTF 2.0 with alphaMode set to OPAQUE', function() {
return loadJson(boxPbrUrl).then(function(gltf) {
gltf.materials[0].alphaMode = 'OPAQUE';
return loadModelJson(gltf).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
});
it('loads a glTF 2.0 with alphaMode set to MASK', function() {
return loadJson(boxPbrUrl).then(function(gltf) {
gltf.materials[0].alphaMode = 'MASK';
gltf.materials[0].alphaCutoff = 0.5;
return loadModelJson(gltf).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
});
it('loads a glTF 2.0 with alphaMode set to BLEND', function() {
return loadJson(boxPbrUrl).then(function(gltf) {
gltf.materials[0].alphaMode = 'BLEND';
return loadModelJson(gltf).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
});
it('loads a glTF 2.0 with interleaved vertex attributes', function() {
return loadModel(boxInterleavedPbrUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
function checkDoubleSided(model, doubleSided) {
var camera = scene.camera;
var center = Matrix4.multiplyByPoint(model.modelMatrix, model.boundingSphere.center, new Cartesian3());
var range = 4.0 * model.boundingSphere.radius;
camera.lookAt(center, new HeadingPitchRange(0, -CesiumMath.PI_OVER_TWO, range));
expect(scene).notToRender([0, 0, 0, 255]);
camera.lookAt(center, new HeadingPitchRange(0, CesiumMath.PI_OVER_TWO, range));
if (doubleSided) {
expect(scene).notToRender([0, 0, 0, 255]);
} else {
expect(scene).toRender([0, 0, 0, 255]);
}
}
function checkVertexColors(model) {
model.zoomTo();
scene.camera.moveUp(0.1);
// Red
scene.camera.moveLeft(0.5);
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba[0]).toBeGreaterThan(10);
expect(rgba[1]).toBeLessThan(10);
expect(rgba[2]).toBeLessThan(10);
});
// Green
scene.camera.moveRight(0.5);
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba[0]).toBeLessThan(10);
expect(rgba[1]).toBeGreaterThan(20);
expect(rgba[2]).toBeLessThan(10);
});
// Blue
scene.camera.moveRight(0.5);
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba[0]).toBeLessThan(10);
expect(rgba[1]).toBeLessThan(10);
expect(rgba[2]).toBeGreaterThan(20);
});
}
it('loads a glTF 2.0 with doubleSided set to false', function() {
return loadJson(twoSidedPlaneUrl).then(function(gltf) {
gltf.materials[0].doubleSided = false;
return loadModelJson(gltf).then(function(m) {
m.show = true;
checkDoubleSided(m, false);
primitives.remove(m);
});
});
});
it('loads a glTF 2.0 with doubleSided set to true', function() {
return loadModel(twoSidedPlaneUrl).then(function(m) {
m.show = true;
checkDoubleSided(m, true);
primitives.remove(m);
});
});
it('load a glTF 2.0 with vertex colors', function() {
return loadModel(vertexColorTestUrl).then(function(m) {
m.show = true;
checkVertexColors(m);
primitives.remove(m);
});
});
function testBoxSideColors(m) {
var rotateX = Matrix3.fromRotationX(CesiumMath.toRadians(90.0));
var rotateY = Matrix3.fromRotationY(CesiumMath.toRadians(90.0));
var rotateZ = Matrix3.fromRotationZ(CesiumMath.toRadians(90.0));
// Each side of the cube should be a different color
var oldPixelColor;
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba).not.toEqual([0, 0, 0, 255]);
oldPixelColor = rgba;
});
for(var i = 0; i < 6; i++) {
var rotate = rotateZ;
if (i % 3 === 0) {
rotate = rotateX;
}
else if ((i-1) % 3 === 0) {
rotate = rotateY;
}
Matrix4.multiplyByMatrix3(m.modelMatrix, rotate, m.modelMatrix);
expect(scene).toRenderAndCall(function(rgba) { //eslint-disable-line no-loop-func
expect(rgba).not.toEqual([0, 0, 0, 255]);
expect(rgba).not.toEqual(oldPixelColor);
oldPixelColor = rgba;
});
}
}
it('loads a gltf with normalized color attributes', function() {
return loadModel(boxColorUrl).then(function(m) {
expect(m.ready).toBe(true);
expect(scene).toRender([0, 0, 0, 255]);
m.show = true;
m.zoomTo();
testBoxSideColors(m);
primitives.remove(m);
});
});
it('loads a gltf with uint32 indices', function() {
var context = scene.context;
if (context._elementIndexUint) {
return loadModel(boxUint32Indices).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
}
});
it('throws runtime error when loading a gltf with uint32 indices if OES_element_index_uint is disabled', function() {
var context = scene.context;
var uint32Supported = context._elementIndexUint;
context._elementIndexUint = false;
var model = primitives.add(Model.fromGltf({
url : boxUint32Indices
}));
return pollToPromise(function() {
// Render scene to progressively load the model
scene.renderForSpecs();
return model.ready;
}, { timeout: 10000 }).then(function() {
fail('should not resolve');
}).otherwise(function(e) {
expect(e).toBeDefined();
primitives.remove(model);
context._elementIndexUint = uint32Supported;
});
});
it('loads a gltf with WEB3D_quantized_attributes COLOR', function() {
return loadModel(boxColorQuantizedUrl).then(function(m) {
expect(m.ready).toBe(true);
expect(scene).toRender([0, 0, 0, 255]);
m.show = true;
m.zoomTo();
testBoxSideColors(m);
primitives.remove(m);
});
});
it('loads a gltf with WEB3D_quantized_attributes SCALAR attribute', function() {
return loadModel(boxScalarQuantizedUrl).then(function(m) {
verifyRender(m);
primitives.remove(m);
});
});
it('loads with custom vertex attributes, vertexShader, fragmentShader, and uniform map', function() {
function vertexShaderLoaded(vs) {
var renamedSource = ShaderSource.replaceMain(vs, 'czm_old_main');
var newMain =
'attribute vec4 a_color;\n' +
'varying vec4 v_color;\n' +
'void main()\n' +
'{\n' +
' czm_old_main();\n' +
' v_color = a_color;\n' +
'}';
return renamedSource + '\n' + newMain;
}
function fragmentShaderLoaded(fs) {
fs = 'uniform float u_value;\n' +
'varying vec4 v_color;\n' +
'void main()\n' +
'{\n' +
' gl_FragColor = u_value * v_color;\n' +
'}';
return fs;
}
function uniformMapLoaded(uniformMap) {
return combine(uniformMap, {
u_value : function() {
return 1.0;
}
});
}
var precreatedAttributes = {
a_color : {
index : 0, // updated in Model
componentsPerAttribute : 4,
value : [1.0, 1.0, 1.0, 1.0]
}
};
var options = {
show : true,
precreatedAttributes : precreatedAttributes,
vertexShaderLoaded : vertexShaderLoaded,
fragmentShaderLoaded : fragmentShaderLoaded,
uniformMapLoaded : uniformMapLoaded
};
return loadModelJson(texturedBoxModel.gltf, options).then(function(model) {
model.zoomTo();
expect(scene).toRender([255, 255, 255, 255]);
primitives.remove(model);
});
});
it('loads with custom pickFragmentShader and pickUniformMap', function() {
function pickFragmentShaderLoaded(fs) {
return ShaderSource.createPickFragmentShaderSource(fs, 'uniform');
}
var pickId = scene.context.createPickId({
custom : 'custom'
});
function pickUniformMapLoaded(uniformMap) {
return combine(uniformMap, {
czm_pickColor : function() {
return pickId.color;
}
});
}
var options = {
pickFragmentShaderLoaded : pickFragmentShaderLoaded,
pickUniformMapLoaded : pickUniformMapLoaded
};
return loadModelJson(texturedBoxModel.gltf, options).then(function(model) {
model.show = true;
expect(scene).toPickAndCall(function(result) {
expect(result.custom).toEqual('custom');
});
primitives.remove(model);
});
});
it('does not issue draw commands when ignoreCommands is true', function() {
return loadModel(texturedBoxUrl, {
ignoreCommands : true
}).then(function(m) {
expect(m.ready).toBe(true);
m.show = true;
m.zoomTo();
m.update(scene.frameState);
expect(scene.frameState.commandList.length).toEqual(0);
m.show = false;
primitives.remove(m);
});
});
it('does not issue draw commands when the model is out of view and cull is true', function() {
return loadModel(texturedBoxUrl, {
cull : true
}).then(function(m) {
expect(m.ready).toBe(true);
m.show = true;
// Look at the model
m.zoomTo();
scene.renderForSpecs();
expect(scene._frustumCommandsList.length).not.toEqual(0);
// Move the model out of view
m.modelMatrix = Matrix4.fromTranslation(new Cartesian3(100000.0, 0.0, 0.0));
scene.renderForSpecs();
expect(scene._frustumCommandsList.length).toEqual(0);
m.show = false;
primitives.remove(m);
});
});
it('issues draw commands when the model is out of view and cull is false', function() {
return loadModel(texturedBoxUrl, {
cull : false
}).then(function(m) {
expect(m.ready).toBe(true);
m.show = true;
// Look at the model
m.zoomTo();
scene.renderForSpecs();
expect(scene._frustumCommandsList.length).not.toEqual(0);
// Move the model out of view
m.modelMatrix = Matrix4.fromTranslation(new Cartesian3(10000000000.0, 0.0, 0.0));
scene.renderForSpecs();
expect(scene._frustumCommandsList.length).not.toEqual(0);
m.show = false;
primitives.remove(m);
});
});
it('renders with a color', function() {
return loadModel(boxUrl).then(function(model) {
model.show = true;
model.zoomTo();
// Model is originally red
var sourceColor;
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba[0]).toBeGreaterThan(0);
expect(rgba[1]).toEqual(0);
sourceColor = rgba;
});
// Check MIX
model.colorBlendMode = ColorBlendMode.MIX;
model.color = Color.LIME;
model.colorBlendAmount = 0.0;
expect(scene).toRender(sourceColor);
model.colorBlendAmount = 0.5;
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba[0]).toBeGreaterThan(0);
expect(rgba[1]).toBeGreaterThan(0);
});
model.colorBlendAmount = 1.0;
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba[0]).toEqual(0);
expect(rgba[1]).toEqual(255);
});
// Check REPLACE
model.colorBlendMode = ColorBlendMode.REPLACE;
model.colorBlendAmount = 0.5; // Should have no effect
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba[0]).toEqual(0);
expect(rgba[1]).toEqual(255);
});
// Check HIGHLIGHT
model.colorBlendMode = ColorBlendMode.HIGHLIGHT;
model.color = Color.DARKGRAY;
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba[0]).toBeGreaterThan(0);
expect(rgba[0]).toBeLessThan(255);
expect(rgba[1]).toEqual(0);
expect(rgba[2]).toEqual(0);
});
// Check alpha
model.colorBlendMode = ColorBlendMode.REPLACE;
model.color = Color.fromAlpha(Color.LIME, 0.5);
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba[0]).toEqual(0);
expect(rgba[1]).toBeLessThan(255);
expect(rgba[1]).toBeGreaterThan(0);
});
// No commands are issued when the alpha is 0.0
model.color = Color.fromAlpha(Color.LIME, 0.0);
scene.renderForSpecs();
var commands = scene.frameState.commandList;
expect(commands.length).toBe(0);
primitives.remove(model);
});
});
it('silhouetteSupported', function() {
expect(Model.silhouetteSupported(scene)).toBe(true);
scene.context._stencilBits = 0;
expect(Model.silhouetteSupported(scene)).toBe(false);
scene.context._stencilBits = 8;
});
it('renders with a silhouette', function() {
return loadModel(boxUrl).then(function(model) {
model.show = true;
model.zoomTo();
var commands = scene.frameState.commandList;
// No silhouette
model.silhouetteSize = 0.0;
scene.renderForSpecs();
expect(commands.length).toBe(1);
expect(commands[0].renderState.stencilTest.enabled).toBe(false);
expect(commands[0].pass).toBe(Pass.OPAQUE);
// Opaque silhouette
model.silhouetteSize = 1.0;
scene.renderForSpecs();
expect(commands.length).toBe(2);
expect(commands[0].renderState.stencilTest.enabled).toBe(true);
expect(commands[0].pass).toBe(Pass.OPAQUE);
expect(commands[1].renderState.stencilTest.enabled).toBe(true);
expect(commands[1].pass).toBe(Pass.OPAQUE);
// Translucent silhouette
model.silhouetteColor = Color.fromAlpha(Color.GREEN, 0.5);
scene.renderForSpecs();
expect(commands.length).toBe(2);
expect(commands[0].renderState.stencilTest.enabled).toBe(true);
expect(commands[0].pass).toBe(Pass.OPAQUE);
expect(commands[1].renderState.stencilTest.enabled).toBe(true);
expect(commands[1].pass).toBe(Pass.TRANSLUCENT);
// Invisible silhouette. The model is rendered normally.
model.silhouetteColor = Color.fromAlpha(Color.GREEN, 0.0);
scene.renderForSpecs();
expect(commands.length).toBe(1);
expect(commands[0].renderState.stencilTest.enabled).toBe(false);
expect(commands[0].pass).toBe(Pass.OPAQUE);
// Invisible model with no silhouette. No commands.
model.color = Color.fromAlpha(Color.WHITE, 0.0);
model.silhouetteColor = Color.GREEN;
model.silhouetteSize = 0.0;
scene.renderForSpecs();
expect(commands.length).toBe(0);
// Invisible model with silhouette. Model command is stencil-only.
model.silhouetteSize = 1.0;
scene.renderForSpecs();
expect(commands.length).toBe(2);
expect(commands[0].renderState.colorMask).toEqual({
red : false,
green : false,
blue : false,
alpha : false
});
expect(commands[0].renderState.depthMask).toEqual(false);
expect(commands[0].renderState.stencilTest.enabled).toBe(true);
expect(commands[0].pass).toBe(Pass.OPAQUE);
expect(commands[1].renderState.stencilTest.enabled).toBe(true);
expect(commands[1].pass).toBe(Pass.OPAQUE);
// Translucent model with opaque silhouette. Silhouette is placed in the translucent pass.
model.color = Color.fromAlpha(Color.WHITE, 0.5);
scene.renderForSpecs();
expect(commands.length).toBe(2);
expect(commands[0].renderState.stencilTest.enabled).toBe(true);
expect(commands[0].pass).toBe(Pass.TRANSLUCENT);
expect(commands[1].renderState.stencilTest.enabled).toBe(true);
expect(commands[1].pass).toBe(Pass.TRANSLUCENT);
// Model with translucent commands with silhouette
model.color = Color.WHITE;
model._nodeCommands[0].command.pass = Pass.TRANSLUCENT;
scene.renderForSpecs();
expect(commands.length).toBe(2);
expect(commands[0].renderState.stencilTest.enabled).toBe(true);
expect(commands[0].pass).toBe(Pass.TRANSLUCENT);
expect(commands[1].renderState.stencilTest.enabled).toBe(true);
expect(commands[1].pass).toBe(Pass.TRANSLUCENT);
model._nodeCommands[0].command.pass = Pass.OPAQUE; // Revert change
// Translucent model with translucent silhouette.
model.color = Color.fromAlpha(Color.WHITE, 0.5);
model.silhouetteColor = Color.fromAlpha(Color.GREEN, 0.5);
scene.renderForSpecs();
expect(commands.length).toBe(2);
expect(commands[0].renderState.stencilTest.enabled).toBe(true);
expect(commands[0].pass).toBe(Pass.TRANSLUCENT);
expect(commands[1].renderState.stencilTest.enabled).toBe(true);
expect(commands[1].pass).toBe(Pass.TRANSLUCENT);
model.color = Color.WHITE;
model.silhouetteColor = Color.GREEN;
// Load a second model
return loadModel(boxUrl).then(function(model2) {
model2.show = true;
model2.silhouetteSize = 1.0;
scene.renderForSpecs();
expect(commands.length).toBe(4);
expect(commands[0].renderState.stencilTest.enabled).toBe(true);
expect(commands[0].pass).toBe(Pass.OPAQUE);
expect(commands[1].renderState.stencilTest.enabled).toBe(true);
expect(commands[1].pass).toBe(Pass.OPAQUE);
expect(commands[2].renderState.stencilTest.enabled).toBe(true);
expect(commands[2].pass).toBe(Pass.OPAQUE);
expect(commands[3].renderState.stencilTest.enabled).toBe(true);
expect(commands[3].pass).toBe(Pass.OPAQUE);
var reference1 = commands[0].renderState.stencilTest.reference;
var reference2 = commands[2].renderState.stencilTest.reference;
expect(reference2).toEqual(reference1 + 1);
primitives.remove(model);
primitives.remove(model2);
});
});
});
it('Updates clipping planes when clipping planes are enabled', function () {
return loadModel(boxUrl).then(function(model) {
model.show = true;
model.zoomTo();
scene.renderForSpecs();
expect(model._packedClippingPlanes).toBeDefined();
expect(model._packedClippingPlanes.length).toBe(0);
expect(model._modelViewMatrix).toEqual(Matrix4.IDENTITY);
model.clippingPlanes = new ClippingPlaneCollection({
planes : [
new Plane(Cartesian3.UNIT_X, 0.0)
]
});
model.update(scene.frameState);
scene.renderForSpecs();
expect(model._packedClippingPlanes.length).toBe(1);
expect(model._modelViewMatrix).not.toEqual(Matrix4.IDENTITY);
primitives.remove(model);
});
});
it('Clipping planes selectively disable rendering', function () {
return loadModel(boxUrl).then(function(model) {
model.show = true;
model.zoomTo();
var modelColor;
model.update(scene.frameState);
expect(scene).toRenderAndCall(function(rgba) {
modelColor = rgba;
});
var plane = new Plane(Cartesian3.UNIT_X, 0.0);
model.clippingPlanes = new ClippingPlaneCollection({
planes : [
plane
]
});
model.update(scene.frameState);
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba).not.toEqual(modelColor);
});
plane.distance = 10.0;
model.update(scene.frameState);
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba).toEqual(modelColor);
});
primitives.remove(model);
});
});
it('Clipping planes apply edge styling', function () {
return loadModel(boxUrl).then(function(model) {
model.show = true;
model.zoomTo();
var modelColor;
model.update(scene.frameState);
expect(scene).toRenderAndCall(function(rgba) {
modelColor = rgba;
});
var plane = new Plane(Cartesian3.UNIT_X, 0.0);
model.clippingPlanes = new ClippingPlaneCollection({
planes : [
plane
],
edgeWidth : 5.0,
edgeColor : Color.BLUE
});
model.update(scene.frameState);
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba).not.toEqual(modelColor);
});
plane.distance = 5.0;
model.update(scene.frameState);
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba).toEqual([0, 0, 255, 255]);
});
primitives.remove(model);
});
});
it('Clipping planes union regions', function () {
return loadModel(boxUrl).then(function(model) {
model.show = true;
model.zoomTo();
var modelColor;
model.update(scene.frameState);
expect(scene).toRenderAndCall(function(rgba) {
modelColor = rgba;
});
model.clippingPlanes = new ClippingPlaneCollection({
planes : [
new Plane(Cartesian3.UNIT_Z, 5.0),
new Plane(Cartesian3.UNIT_X, 0.0)
],
unionClippingRegions: true
});
model.update(scene.frameState);
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba).not.toEqual(modelColor);
});
model.clippingPlanes.unionClippingRegions = false;
model.update(scene.frameState);
expect(scene).toRenderAndCall(function(rgba) {
expect(rgba).toEqual(modelColor);
});
primitives.remove(model);
});
});
it('gets triangle count', function() {
expect(texturedBoxModel.trianglesLength).toBe(12);
expect(cesiumAirModel.trianglesLength).toBe(5984);
});
it('gets memory usage', function() {
// Texture is originally 211*211 but is scaled up to 256*256 to support its minification filter and then is mipmapped
var expectedTextureMemory = Math.floor(256*256*4*(4/3));
var expectedGeometryMemory = 840;
var options = {
cacheKey : 'memory-usage-test',
incrementallyLoadTextures : false
};
return loadModel(texturedBoxUrl, options).then(function(model) {
// The first model owns the resources
expect(model.geometryByteLength).toBe(expectedGeometryMemory);
expect(model.texturesByteLength).toBe(expectedTextureMemory);
expect(model.cachedGeometryByteLength).toBe(0);
expect(model.cachedTexturesByteLength).toBe(0);
return loadModel(texturedBoxUrl, options).then(function(model) {
// The second model is sharing the resources, so its memory usage is reported as 0
expect(model.geometryByteLength).toBe(0);
expect(model.texturesByteLength).toBe(0);
expect(model.cachedGeometryByteLength).toBe(expectedGeometryMemory);
expect(model.cachedTexturesByteLength).toBe(expectedTextureMemory);
});
});
});
describe('height referenced model', function() {
function createMockGlobe() {
var globe = {
callback : undefined,
removedCallback : false,
ellipsoid : Ellipsoid.WGS84,
update : function() {},
render : function() {},
getHeight : function() {
return 0.0;
},
_surface : {
tileProvider : {
ready : true
},
_tileLoadQueueHigh : [],
_tileLoadQueueMedium : [],
_tileLoadQueueLow : [],
_debug : {
tilesWaitingForChildren : 0
}
},
tileLoadedEvent : new Event(),
imageryLayersUpdatedEvent : new Event(),
destroy : function() {}
};
globe.beginFrame = function() {
};
globe.endFrame = function() {
};
globe.terrainProviderChanged = new Event();
defineProperties(globe, {
terrainProvider : {
set : function(value) {
this.terrainProviderChanged.raiseEvent(value);
}
}
});
globe._surface.updateHeight = function(position, callback) {
globe.callback = callback;
return function() {
globe.removedCallback = true;
globe.callback = undefined;
};
};
return globe;
}
it('explicitly constructs a model with height reference', function() {
scene.globe = createMockGlobe();
return loadModelJson(texturedBoxModel.gltf, {
heightReference : HeightReference.CLAMP_TO_GROUND,
scene : scene
}).then(function(model) {
expect(model.heightReference).toEqual(HeightReference.CLAMP_TO_GROUND);
primitives.remove(model);
});
});
it('set model height reference property', function() {
scene.globe = createMockGlobe();
return loadModelJson(texturedBoxModel.gltf, {
scene : scene
}).then(function(model) {
model.heightReference = HeightReference.CLAMP_TO_GROUND;
expect(model.heightReference).toEqual(HeightReference.CLAMP_TO_GROUND);
primitives.remove(model);
});
});
it('creating with a height reference creates a height update callback', function() {
scene.globe = createMockGlobe();
return loadModelJson(texturedBoxModel.gltf, {
heightReference : HeightReference.CLAMP_TO_GROUND,
position : Cartesian3.fromDegrees(-72.0, 40.0),
scene : scene
}).then(function(model) {
expect(scene.globe.callback).toBeDefined();
primitives.remove(model);
});
});
it('set height reference property creates a height update callback', function() {
scene.globe = createMockGlobe();
return loadModelJson(texturedBoxModel.gltf, {
position : Cartesian3.fromDegrees(-72.0, 40.0),
scene : scene,
show : true
}).then(function(model) {
model.heightReference = HeightReference.CLAMP_TO_GROUND;
expect(model.heightReference).toEqual(HeightReference.CLAMP_TO_GROUND);
scene.renderForSpecs();
expect(scene.globe.callback).toBeDefined();
primitives.remove(model);
});
});
it('updates the callback when the height reference changes', function() {
scene.globe = createMockGlobe();
return loadModelJson(texturedBoxModel.gltf, {
heightReference : HeightReference.CLAMP_TO_GROUND,
position : Cartesian3.fromDegrees(-72.0, 40.0),
scene : scene,
show : true
}).then(function(model) {
expect(scene.globe.callback).toBeDefined();
model.heightReference = HeightReference.RELATIVE_TO_GROUND;
scene.renderForSpecs();
expect(scene.globe.removedCallback).toEqual(true);
expect(scene.globe.callback).toBeDefined();
scene.globe.removedCallback = false;
model.heightReference = HeightReference.NONE;
scene.renderForSpecs();
expect(scene.globe.removedCallback).toEqual(true);
expect(scene.globe.callback).not.toBeDefined();
primitives.remove(model);
});
});
it('changing the position updates the callback', function() {
scene.globe = createMockGlobe();
return loadModelJson(texturedBoxModel.gltf, {
heightReference : HeightReference.CLAMP_TO_GROUND,
position : Cartesian3.fromDegrees(-72.0, 40.0),
scene : scene,
show : true
}).then(function(model) {
expect(scene.globe.callback).toBeDefined();
var matrix = Matrix4.clone(model.modelMatrix);
var position = Cartesian3.fromDegrees(-73.0, 40.0);
matrix[12] = position.x;
matrix[13] = position.y;
matrix[14] = position.z;
model.modelMatrix = matrix;
scene.renderForSpecs();
expect(scene.globe.removedCallback).toEqual(true);
expect(scene.globe.callback).toBeDefined();
primitives.remove(model);
});
});
it('callback updates the position', function() {
scene.globe = createMockGlobe();
return loadModelJson(texturedBoxModel.gltf, {
heightReference : HeightReference.CLAMP_TO_GROUND,
position : Cartesian3.fromDegrees(-72.0, 40.0),
scene : scene,
show : true
}).then(function(model) {
expect(scene.globe.callback).toBeDefined();
scene.renderForSpecs();
scene.globe.callback(Cartesian3.fromDegrees(-72.0, 40.0, 100.0));
var matrix = model._clampedModelMatrix;
var clampedPosition = new Cartesian3(matrix[12], matrix[13], matrix[14]);
var cartographic = scene.globe.ellipsoid.cartesianToCartographic(clampedPosition);
expect(cartographic.height).toEqualEpsilon(100.0, CesiumMath.EPSILON9);
primitives.remove(model);
});
});
it('removes the callback on destroy', function() {
scene.globe = createMockGlobe();
return loadModelJson(texturedBoxModel.gltf, {
heightReference : HeightReference.CLAMP_TO_GROUND,
position : Cartesian3.fromDegrees(-72.0, 40.0),
scene : scene,
show : true
}).then(function(model) {
expect(scene.globe.callback).toBeDefined();
scene.renderForSpecs();
primitives.remove(model);
scene.renderForSpecs();
expect(scene.globe.callback).toBeUndefined();
});
});
it('changing the terrain provider', function() {
scene.globe = createMockGlobe();
return loadModelJson(texturedBoxModel.gltf, {
heightReference : HeightReference.CLAMP_TO_GROUND,
position : Cartesian3.fromDegrees(-72.0, 40.0),
scene : scene
}).then(function(model) {
expect(model._heightChanged).toBe(false);
var terrainProvider = new CesiumTerrainProvider({
url : 'made/up/url',
requestVertexNormals : true
});
scene.terrainProvider = terrainProvider;
expect(model._heightChanged).toBe(true);
});
});
it('height reference without a scene rejects', function() {
scene.globe = createMockGlobe();
return loadModelJson(texturedBoxModel.gltf, {
heightReference : HeightReference.CLAMP_TO_GROUND,
position : Cartesian3.fromDegrees(-72.0, 40.0),
show : true
}).otherwise(function(error) {
expect(error.message).toEqual('Height reference is not supported without a scene and globe.');
});
});
it('changing height reference without a scene throws DeveloperError', function() {
scene.globe = createMockGlobe();
return loadModelJson(texturedBoxModel.gltf, {
position : Cartesian3.fromDegrees(-72.0, 40.0),
show : true
}).then(function(model) {
model.heightReference = HeightReference.CLAMP_TO_GROUND;
expect(function () {
return scene.renderForSpecs();
}).toThrowDeveloperError();
primitives.remove(model);
});
});
it('height reference without a globe rejects', function() {
scene.globe = undefined;
return loadModelJson(texturedBoxModel.gltf, {
heightReference : HeightReference.CLAMP_TO_GROUND,
position : Cartesian3.fromDegrees(-72.0, 40.0),
scene : scene,
show : true
}).otherwise(function(error) {
expect(error.message).toEqual('Height reference is not supported without a scene and globe.');
});
});
it('changing height reference without a globe throws DeveloperError', function() {
scene.globe = undefined;
return loadModelJson(texturedBoxModel.gltf, {
position : Cartesian3.fromDegrees(-72.0, 40.0),
show : true
}).then(function(model) {
model.heightReference = HeightReference.CLAMP_TO_GROUND;
expect(function () {
return scene.renderForSpecs();
}).toThrowDeveloperError();
primitives.remove(model);
});
});
});
}, 'WebGL');
|
# import sys
import EncryptionSystems.Atbash as Atbash
import EncryptionSystems.Bifido as Bifido
import EncryptionSystems.Blowfish as Blowfish
import EncryptionSystems.Cesar as Cesar
import EncryptionSystems.ChaffingAndWinnowing as ChaffingAndWinnowing
import EncryptionSystems.DES as DES
import EncryptionSystems.Exponential as Exponential
import EncryptionSystems.Gronsfeld as Gronsfeld
import EncryptionSystems.RSA as RSA
import EncryptionSystems.Skipjack as Skipjack
class CryptographyTool:
def __init__(self):
self.Atbash = Atbash.Atbash()
self.Bifido = Bifido.Bifido()
self.Blowfish = Blowfish.Blowfish()
self.Cesar = Cesar.Cesar()
self.ChaffingAndWinnowing = ChaffingAndWinnowing.ChaffingAndWinnowing()
self.DES = DES.DES()
self.Exponential = Exponential.Exponential()
self.Gronsfeld = Gronsfeld.Gronsfeld()
self.RSA = RSA.RSA()
self.Skipjack = Skipjack.Skipjack()
self.EncryptionSystems = [
self.Atbash,
self.Bifido,
self.Blowfish,
self.Cesar,
self.ChaffingAndWinnowing,
self.DES,
self.Exponential,
self.Gronsfeld,
self.RSA,
self.Skipjack,
]
def Main(self):
self.SystemSelector()
self.ConvertionProcess(self.encryption_system)
print("\033[0;37m" + self.encrypted_text)
def SystemSelector(self):
try:
self.encryption_system = int(input("\033[0;35mSelect the encryption system you want to use: "))
if self.encryption_system in range(0, 10):
print(type(self.EncryptionSystems[self.encryption_system]).__name__ + " Selected!")
except:
print("Incorrect option \n")
self.SystemSelector()
def ConvertionProcess(self, index):
text = input("\033[0;35mInsert the text to encrypt: ")
if len(text) > 0:
self.encrypted_text = self.EncryptionSystems[index].Convertion(text)
else:
self.ConvertionProcess(self.encryption_system)
print("""
\033[1;33m
-------------------------------------------------------------------------------
\033[1;32m
_____ _ _
/ ____| | | | |
| | _ __ _ _ _ __ | |_ ___ __ _ _ __ __ _ _ __ | |__ _ _
| | | '__| | | | '_ \| __/ _ \ / _` | '__/ _` | '_ \| '_ \| | | |
| |____| | | |_| | |_) | || (_) | (_| | | | (_| | |_) | | | | |_| |
\_____|_| \__, | .__/ \__\___/ \__, |_| \__,_| .__/|_| |_|\__, |
__/ | | __/ | | | __/ |
|___/|_| |___/ |_| |___/
_______ _
|__ __| | |
| | ___ ___ | |
| |/ _ \ / _ \| |
| | (_) | (_) | |
|_|\___/ \___/|_|
\033[1;33m
-------------------------------------------------------------------------------
\033[0;37m
The encryption systems available are:
0) Atbash
1) Bifido
2) Blowfish
3) Cesar
4) ChaffingAndWinnowing
5) DES
6) Exponential
7) Gronsfeld
8) RSA
9) Skipjack
""")
cryptography_tool = CryptographyTool()
cryptography_tool.Main()
# if sys.argv[1] != False and sys.argv[1] == "--gui":
# print("Starting graphical interface... \n")
|
/* eslint-disable func-style */
/* eslint-disable max-len */
/* eslint-disable require-jsdoc */
function addToolbox () {
return `
<category name="%{BKY_EITGHTTIMESEIGHTMATIRXDISPLAY_CATEGORY}" id="EITGHTTIMESEIGHTMATIRXDISPLAY_CATEGORY" colour="#CE0000" secondaryColour="#AE0000">
<block type="eitghtTimesEightMatirxDisplay_init" id="eitghtTimesEightMatirxDisplay_init">
<field name="CS">2</field>
</block>
<sep gap="36"/>
<block type="eitghtTimesEightMatirxDisplay_drawPixel" id="eitghtTimesEightMatirxDisplay_drawPixel">
<value name="X">
<shadow type="math_whole_number">
<field name="NUM">0</field>
</shadow>
</value>
<value name="Y">
<shadow type="math_whole_number">
<field name="NUM">0</field>
</shadow>
</value>
</block>
<block type="eitghtTimesEightMatirxDisplay_drawLine" id="eitghtTimesEightMatirxDisplay_drawLine">
<value name="X0">
<shadow type="math_whole_number">
<field name="NUM">0</field>
</shadow>
</value>
<value name="Y0">
<shadow type="math_whole_number">
<field name="NUM">0</field>
</shadow>
</value>
<value name="X1">
<shadow type="math_whole_number">
<field name="NUM">7</field>
</shadow>
</value>
<value name="Y1">
<shadow type="math_whole_number">
<field name="NUM">7</field>
</shadow>
</value>
</block>
<block type="eitghtTimesEightMatirxDisplay_showChar" id="eitghtTimesEightMatirxDisplay_showChar">
<value name="TEXT">
<shadow type="text">
<field name="TEXT">A</field>
</shadow>
</value>
</block>
<block type="eitghtTimesEightMatirxDisplay_showNumber" id="eitghtTimesEightMatirxDisplay_showNumber">
<value name="NUMBER">
<shadow type="math_whole_number">
<field name="NUM">0</field>
</shadow>
</value>
</block>
<block type="eitghtTimesEightMatirxDisplay_fill" id="eitghtTimesEightMatirxDisplay_fill"></block>
<block type="eitghtTimesEightMatirxDisplay_refresh" id="eitghtTimesEightMatirxDisplay_refresh"></block>
<sep gap="36"/>
<block type="eitghtTimesEightMatirxDisplay_setBrightness" id="eitghtTimesEightMatirxDisplay_setBrightness">
<value name="BRT">
<shadow type="eitghtTimesEightMatirxDisplay_brightnessNumber">
<field name="NUM">7</field>
</shadow>
</value>
</block>
<block type="eitghtTimesEightMatirxDisplay_setRotation" id="eitghtTimesEightMatirxDisplay_setRotation"></block>
</category>`;
}
exports = addToolbox;
|
import React from "react";
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react'
import store, { persistor } from './redux/store';
import { render } from "react-dom";
import App from "./App";
import reportWebVitals from "./reportWebVitals";
import * as serviceWorker from './serviceWorker';
render(
<Provider store={store} >
<PersistGate loading={null} persistor={persistor}>
<App />
</PersistGate>
</Provider>,
document.getElementById("root")
);
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
// Enables the app to work offline and loads faster
serviceWorker.register();
|
import dotenv from 'dotenv';
dotenv.config();
const { Derrick,Aline,Regis,Admin } = process.env;
export async function up(queryInterface) {
return queryInterface.bulkInsert(
'users',
[
{
username:'derrick',
password: Derrick,
role:'COOK',
createdAt: new Date(),
updatedAt: new Date(),
},{
username:'aline',
password: Aline,
role:'BAR',
createdAt: new Date(),
updatedAt: new Date(),
},{
username:'regis',
password: Regis,
role:'WAITER',
createdAt: new Date(),
updatedAt: new Date(),
},{
username:'kalisa',
password: Admin,
role:'ADMIN',
createdAt: new Date(),
updatedAt: new Date(),
}
],
{},
);
}
export function down(queryInterface) {
return queryInterface.bulkDelete('users', null, {});
}
|
import os
import threading
import json
import requests
from common.params import Params
from common.basedir import BASEDIR
from selfdrive.version import comma_remote, tested_branch
from selfdrive.car.fingerprints import eliminate_incompatible_cars, all_known_cars
from selfdrive.car.vin import get_vin, VIN_UNKNOWN
from selfdrive.car.fw_versions import get_fw_versions, match_fw_to_car
from selfdrive.swaglog import cloudlog
import cereal.messaging as messaging
import selfdrive.crash as crash
from selfdrive.car import gen_empty_fingerprint
from common.travis_checker import travis
from common.op_params import opParams
op_params = opParams()
use_car_caching = op_params.get('use_car_caching', True)
from cereal import car, log
EventName = car.CarEvent.EventName
HwType = log.HealthData.HwType
def get_startup_event(car_recognized, controller_available):
if comma_remote and tested_branch:
event = EventName.startup
else:
event = EventName.startupMaster
if not car_recognized:
event = EventName.startupNoCar
elif car_recognized and not controller_available:
event = EventName.startupNoControl
return event
def load_interfaces(brand_names):
ret = {}
for brand_name in brand_names:
path = ('selfdrive.car.%s' % brand_name)
CarInterface = __import__(path + '.interface', fromlist=['CarInterface']).CarInterface
if os.path.exists(BASEDIR + '/' + path.replace('.', '/') + '/carstate.py'):
CarState = __import__(path + '.carstate', fromlist=['CarState']).CarState
else:
CarState = None
if os.path.exists(BASEDIR + '/' + path.replace('.', '/') + '/carcontroller.py'):
CarController = __import__(path + '.carcontroller', fromlist=['CarController']).CarController
else:
CarController = None
for model_name in brand_names[brand_name]:
ret[model_name] = (CarInterface, CarController, CarState)
return ret
def _get_interface_names():
# read all the folders in selfdrive/car and return a dict where:
# - keys are all the car names that which we have an interface for
# - values are lists of spefic car models for a given car
brand_names = {}
for car_folder in [x[0] for x in os.walk(BASEDIR + '/selfdrive/car')]:
try:
brand_name = car_folder.split('/')[-1]
model_names = __import__('selfdrive.car.%s.values' % brand_name, fromlist=['CAR']).CAR
model_names = [getattr(model_names, c) for c in model_names.__dict__.keys() if not c.startswith("__")]
brand_names[brand_name] = model_names
except (ImportError, IOError):
pass
return brand_names
# imports from directory selfdrive/car/<name>/
interface_names = _get_interface_names()
interfaces = load_interfaces(interface_names)
def only_toyota_left(candidate_cars):
return all(("TOYOTA" in c or "LEXUS" in c) for c in candidate_cars) and len(candidate_cars) > 0
# **** for use live only ****
def fingerprint(logcan, sendcan, has_relay):
params = Params()
car_params = params.get("CarParams")
if not travis:
cached_fingerprint = params.get('CachedFingerprint')
else:
cached_fingerprint = None
if car_params is not None:
car_params = car.CarParams.from_bytes(car_params)
fixed_fingerprint = os.environ.get('FINGERPRINT', "")
skip_fw_query = os.environ.get('SKIP_FW_QUERY', False)
if has_relay and not fixed_fingerprint and not skip_fw_query:
# Vin query only reliably works thorugh OBDII
bus = 1
cached_params = Params().get("CarParamsCache")
if cached_params is not None:
cached_params = car.CarParams.from_bytes(cached_params)
if cached_params.carName == "mock":
cached_params = None
if cached_params is not None and len(cached_params.carFw) > 0 and cached_params.carVin is not VIN_UNKNOWN:
cloudlog.warning("Using cached CarParams")
vin = cached_params.carVin
car_fw = list(cached_params.carFw)
else:
cloudlog.warning("Getting VIN & FW versions")
_, vin = get_vin(logcan, sendcan, bus)
car_fw = get_fw_versions(logcan, sendcan, bus)
fw_candidates = match_fw_to_car(car_fw)
else:
vin = VIN_UNKNOWN
fw_candidates, car_fw = set(), []
cloudlog.warning("VIN %s", vin)
Params().put("CarVin", vin)
finger = gen_empty_fingerprint()
candidate_cars = {i: all_known_cars() for i in [0, 1]} # attempt fingerprint on both bus 0 and 1
frame = 0
frame_fingerprint = 10 # 0.1s
car_fingerprint = None
done = False
if cached_fingerprint is not None and use_car_caching: # if we previously identified a car and fingerprint and user hasn't disabled caching
cached_fingerprint = json.loads(cached_fingerprint)
if cached_fingerprint[0] is None or len(cached_fingerprint) < 3:
params.delete('CachedFingerprint')
else:
finger[0] = {int(key): value for key, value in cached_fingerprint[2].items()}
source = car.CarParams.FingerprintSource.can
return (str(cached_fingerprint[0]), finger, vin, car_fw, cached_fingerprint[1])
while not done:
a = messaging.get_one_can(logcan)
for can in a.can:
# need to independently try to fingerprint both bus 0 and 1 to work
# for the combo black_panda and honda_bosch. Ignore extended messages
# and VIN query response.
# Include bus 2 for toyotas to disambiguate cars using camera messages
# (ideally should be done for all cars but we can't for Honda Bosch)
if can.src in range(0, 4):
finger[can.src][can.address] = len(can.dat)
for b in candidate_cars:
if (can.src == b or (only_toyota_left(candidate_cars[b]) and can.src == 2)) and \
can.address < 0x800 and can.address not in [0x7df, 0x7e0, 0x7e8]:
candidate_cars[b] = eliminate_incompatible_cars(can, candidate_cars[b])
# if we only have one car choice and the time since we got our first
# message has elapsed, exit
for b in candidate_cars:
# Toyota needs higher time to fingerprint, since DSU does not broadcast immediately
if only_toyota_left(candidate_cars[b]):
frame_fingerprint = 100 # 1s
if len(candidate_cars[b]) == 1:
if frame > frame_fingerprint:
# fingerprint done
car_fingerprint = candidate_cars[b][0]
elif len(candidate_cars[b]) < 4: # For the RAV4 2019 and Corolla 2020 LE Fingerprint problem
if frame > 180:
if any(("TOYOTA COROLLA TSS2 2019" in c) for c in candidate_cars[b]):
car_fingerprint = "TOYOTA COROLLA TSS2 2019"
if any(("TOYOTA COROLLA HYBRID TSS2 2019" in c) for c in candidate_cars[b]):
car_fingerprint = "TOYOTA COROLLA HYBRID TSS2 2019"
# bail if no cars left or we've been waiting for more than 2s
failed = all(len(cc) == 0 for cc in candidate_cars.values()) or frame > 200
succeeded = car_fingerprint is not None
done = failed or succeeded
frame += 1
source = car.CarParams.FingerprintSource.can
# If FW query returns exactly 1 candidate, use it
if len(fw_candidates) == 1:
car_fingerprint = list(fw_candidates)[0]
source = car.CarParams.FingerprintSource.fw
if fixed_fingerprint:
car_fingerprint = fixed_fingerprint
source = car.CarParams.FingerprintSource.fixed
cloudlog.warning("fingerprinted %s", car_fingerprint)
params.put("CachedFingerprint", json.dumps([car_fingerprint, source, {int(key): value for key, value in finger[0].items()}]))
return car_fingerprint, finger, vin, car_fw, source
def is_connected_to_internet(timeout=5):
try:
requests.get("https://sentry.io", timeout=timeout)
return True
except:
return False
def crash_log(candidate):
while True:
if is_connected_to_internet():
crash.capture_warning("fingerprinted %s" % candidate)
break
def crash_log2(fingerprints, fw):
while True:
if is_connected_to_internet():
crash.capture_warning("car doesn't match any fingerprints: %s" % fingerprints)
crash.capture_warning("car doesn't match any fw: %s" % fw)
break
def get_car(logcan, sendcan, has_relay=False):
candidate, fingerprints, vin, car_fw, source = fingerprint(logcan, sendcan, has_relay)
if candidate is None:
if not travis:
y = threading.Thread(target=crash_log2, args=(fingerprints,car_fw,))
y.start()
cloudlog.warning("car doesn't match any fingerprints: %r", fingerprints)
candidate = "mock"
candidate = "CADILLAC ESCALADE 2018"
if not travis:
x = threading.Thread(target=crash_log, args=(candidate,))
x.start()
CarInterface, CarController, CarState = interfaces[candidate]
car_params = CarInterface.get_params(candidate, fingerprints, has_relay, car_fw)
car_params.carVin = vin
car_params.carFw = car_fw
car_params.fingerprintSource = source
return CarInterface(car_params, CarController, CarState), car_params
|
/*! For license information please see 2.9bb25706.chunk.js.LICENSE.txt */
(this["webpackJsonppod-website"]=this["webpackJsonppod-website"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(113)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";e.exports=n(119)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(17);function o(e,t){if(null==e)return{};var n,o,i=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t,n){e.exports=n(120)()},function(e,t,n){"use strict";function r(e){var t,n,o="";if("string"===typeof e||"number"===typeof e)o+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}t.a=function(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(o&&(o+=" "),o+=t);return o}},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n.n(i),l=(n(4),n(39)),u=n.n(l),s=n(240),c=n(274),f=n(108),d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var i=t.defaultTheme,l=t.withTheme,d=void 0!==l&&l,p=t.name,h=Object(o.a)(t,["defaultTheme","withTheme","name"]);var v=p,m=Object(s.a)(e,Object(r.a)({defaultTheme:i,Component:n,name:p||n.displayName,classNamePrefix:v},h)),y=a.a.forwardRef((function(e,t){e.classes;var l,u=e.innerRef,s=Object(o.a)(e,["classes","innerRef"]),h=m(Object(r.a)({},n.defaultProps,e)),v=s;return("string"===typeof p||d)&&(l=Object(f.a)()||i,p&&(v=Object(c.a)({theme:l,name:p,props:s})),d&&!v.theme&&(v.theme=l)),a.a.createElement(n,Object(r.a)({ref:u||t,classes:h},v))}));return u()(y,n),y}},p=n(38);t.a=function(e,t){return d(e,Object(r.a)({defaultTheme:p.a},t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(109);function o(e){if("string"!==typeof e)throw new Error(Object(r.a)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=n(25);function i(e,t){return r.useMemo((function(){return null==e&&null==t?null:function(n){Object(o.a)(e,n),Object(o.a)(t,n)}}),[e,t])}},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(114)},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return E})),n.d(t,"d",(function(){return h})),n.d(t,"e",(function(){return b}));var r=n(14),o=n(0),i=n.n(o),a=(n(4),n(22)),l=n(75),u=n(21),s=n(1),c=n(76),f=n.n(c),d=(n(235),n(17)),p=(n(39),function(e){var t=Object(l.a)();return t.displayName=e,t}("Router-History")),h=function(e){var t=Object(l.a)();return t.displayName=e,t}("Router"),v=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(r.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return i.a.createElement(h.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},i.a.createElement(p.Provider,{children:this.props.children||null,value:this.props.history}))},t}(i.a.Component);i.a.Component;i.a.Component;var m={},y=0;function b(e,t){void 0===t&&(t={}),("string"===typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,l=void 0!==a&&a,u=n.sensitive,s=void 0!==u&&u;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=m[n]||(m[n]={});if(r[e])return r[e];var o=[],i={regexp:f()(e,o,t),keys:o};return y<1e4&&(r[e]=i,y++),i}(n,{end:i,strict:l,sensitive:s}),o=r.regexp,a=r.keys,u=o.exec(e);if(!u)return null;var c=u[0],d=u.slice(1),p=e===c;return i&&!p?null:{path:n,url:"/"===n&&""===c?"/":c,isExact:p,params:a.reduce((function(e,t,n){return e[t.name]=d[n],e}),{})}}),null)}var g=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return i.a.createElement(h.Consumer,null,(function(t){t||Object(u.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?b(n.pathname,e.props):t.match,o=Object(s.a)({},t,{location:n,match:r}),a=e.props,l=a.children,c=a.component,f=a.render;return Array.isArray(l)&&0===l.length&&(l=null),i.a.createElement(h.Provider,{value:o},o.match?l?"function"===typeof l?l(o):l:c?i.a.createElement(c,o):f?f(o):null:"function"===typeof l?l(o):null)}))},t}(i.a.Component);function w(e){return"/"===e.charAt(0)?e:"/"+e}function x(e,t){if(!e)return t;var n=w(e);return 0!==t.pathname.indexOf(n)?t:Object(s.a)({},t,{pathname:t.pathname.substr(n.length)})}function O(e){return"string"===typeof e?e:Object(a.e)(e)}function k(e){return function(){Object(u.a)(!1)}}function S(){}i.a.Component;var E=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return i.a.createElement(h.Consumer,null,(function(t){t||Object(u.a)(!1);var n,r,o=e.props.location||t.location;return i.a.Children.forEach(e.props.children,(function(e){if(null==r&&i.a.isValidElement(e)){n=e;var a=e.props.path||e.props.from;r=a?b(o.pathname,Object(s.a)({},e.props,{path:a})):t.match}})),r?i.a.cloneElement(n,{location:o,computedMatch:r}):null}))},t}(i.a.Component);i.a.useContext},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(108),o=(n(0),n(38));function i(){return Object(r.a)()||o.a}},function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(98);function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Object(r.a)(e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;function i(e){var t=r.useRef(e);return o((function(){t.current=e})),r.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}},function(e,t,n){"use strict";n.d(t,"c",(function(){return l})),n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return f}));var r=n(109);function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function i(e){if(e.type)return e;if("#"===e.charAt(0))return i(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Object(r.a)(3,e));var o=e.substring(t+1,e.length-1).split(",");return{type:n,values:o=o.map((function(e){return parseFloat(e)}))}}function a(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function l(e,t){var n=u(e),r=u(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function u(e){var t="hsl"===(e=i(e)).type?i(function(e){var t=(e=i(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,l=r*Math.min(o,1-o),u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-l*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",c=[Math.round(255*u(0)),Math.round(255*u(8)),Math.round(255*u(4))];return"hsla"===e.type&&(s+="a",c.push(t[3])),a({type:s,values:c})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function s(e,t){return e=i(e),t=o(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,a(e)}function c(e,t){if(e=i(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return a(e)}function f(e,t){if(e=i(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return a(e)}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return i}));var r=n(3),o={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},i={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function a(e){return"".concat(Math.round(e),"ms")}t.a={easing:o,duration:i,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,l=void 0===n?i.standard:n,u=t.easing,s=void 0===u?o.easeInOut:u,c=t.delay,f=void 0===c?0:c;Object(r.a)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof l?l:a(l)," ").concat(s," ").concat("string"===typeof f?f:a(f))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}));var r=function(e){return e.scrollTop};function o(e,t){var n=e.timeout,r=e.style,o=void 0===r?{}:r;return{duration:o.transitionDuration||"number"===typeof n?n:n[t.mode]||0,delay:o.transitionDelay}}},function(e,t,n){"use strict";var r="Invariant failed";t.a=function(e,t){if(!e)throw new Error(r)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return k})),n.d(t,"b",(function(){return _})),n.d(t,"d",(function(){return R})),n.d(t,"c",(function(){return v})),n.d(t,"f",(function(){return m})),n.d(t,"e",(function(){return h}));var r=n(1);function o(e){return"/"===e.charAt(0)}function i(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}var a=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],a=t&&t.split("/")||[],l=e&&o(e),u=t&&o(t),s=l||u;if(e&&o(e)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){var c=a[a.length-1];n="."===c||".."===c||""===c}else n=!1;for(var f=0,d=a.length;d>=0;d--){var p=a[d];"."===p?i(a,d):".."===p?(i(a,d),f++):f&&(i(a,d),f--)}if(!s)for(;f--;f)a.unshift("..");!s||""===a[0]||a[0]&&o(a[0])||a.unshift("");var h=a.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};function l(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"===typeof t||"object"===typeof n){var r=l(t),o=l(n);return r!==t||o!==n?e(r,o):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},s=n(21);function c(e){return"/"===e.charAt(0)?e:"/"+e}function f(e){return"/"===e.charAt(0)?e.substr(1):e}function d(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function p(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function h(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function v(e,t,n,o){var i;"string"===typeof e?(i=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(i=Object(r.a)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(i.key=n),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,o.pathname)):i.pathname=o.pathname:i.pathname||(i.pathname="/"),i}function m(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function y(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"===typeof e?e(t,n):e;"string"===typeof i?"function"===typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var b=!("undefined"===typeof window||!window.document||!window.document.createElement);function g(e,t){t(window.confirm(e))}var w="popstate",x="hashchange";function O(){try{return window.history.state||{}}catch(e){return{}}}function k(e){void 0===e&&(e={}),b||Object(s.a)(!1);var t=window.history,n=function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history}(),o=!(-1===window.navigator.userAgent.indexOf("Trident")),i=e,a=i.forceRefresh,l=void 0!==a&&a,u=i.getUserConfirmation,f=void 0===u?g:u,m=i.keyLength,k=void 0===m?6:m,S=e.basename?p(c(e.basename)):"";function E(e){var t=e||{},n=t.key,r=t.state,o=window.location,i=o.pathname+o.search+o.hash;return S&&(i=d(i,S)),v(i,r,n)}function j(){return Math.random().toString(36).substr(2,k)}var C=y();function P(e){Object(r.a)(W,e),W.length=t.length,C.notifyListeners(W.location,W.action)}function _(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||M(E(e.state))}function T(){M(E(O()))}var R=!1;function M(e){if(R)R=!1,P();else{C.confirmTransitionTo(e,"POP",f,(function(t){t?P({action:"POP",location:e}):function(e){var t=W.location,n=A.indexOf(t.key);-1===n&&(n=0);var r=A.indexOf(e.key);-1===r&&(r=0);var o=n-r;o&&(R=!0,I(o))}(e)}))}}var N=E(O()),A=[N.key];function L(e){return S+h(e)}function I(e){t.go(e)}var D=0;function z(e){1===(D+=e)&&1===e?(window.addEventListener(w,_),o&&window.addEventListener(x,T)):0===D&&(window.removeEventListener(w,_),o&&window.removeEventListener(x,T))}var F=!1;var W={length:t.length,action:"POP",location:N,createHref:L,push:function(e,r){var o="PUSH",i=v(e,r,j(),W.location);C.confirmTransitionTo(i,o,f,(function(e){if(e){var r=L(i),a=i.key,u=i.state;if(n)if(t.pushState({key:a,state:u},null,r),l)window.location.href=r;else{var s=A.indexOf(W.location.key),c=A.slice(0,s+1);c.push(i.key),A=c,P({action:o,location:i})}else window.location.href=r}}))},replace:function(e,r){var o="REPLACE",i=v(e,r,j(),W.location);C.confirmTransitionTo(i,o,f,(function(e){if(e){var r=L(i),a=i.key,u=i.state;if(n)if(t.replaceState({key:a,state:u},null,r),l)window.location.replace(r);else{var s=A.indexOf(W.location.key);-1!==s&&(A[s]=i.key),P({action:o,location:i})}else window.location.replace(r)}}))},go:I,goBack:function(){I(-1)},goForward:function(){I(1)},block:function(e){void 0===e&&(e=!1);var t=C.setPrompt(e);return F||(z(1),F=!0),function(){return F&&(F=!1,z(-1)),t()}},listen:function(e){var t=C.appendListener(e);return z(1),function(){z(-1),t()}}};return W}var S="hashchange",E={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+f(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:f,decodePath:c},slash:{encodePath:c,decodePath:c}};function j(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function C(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function P(e){window.location.replace(j(window.location.href)+"#"+e)}function _(e){void 0===e&&(e={}),b||Object(s.a)(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),o=n.getUserConfirmation,i=void 0===o?g:o,a=n.hashType,l=void 0===a?"slash":a,u=e.basename?p(c(e.basename)):"",f=E[l],m=f.encodePath,w=f.decodePath;function x(){var e=w(C());return u&&(e=d(e,u)),v(e)}var O=y();function k(e){Object(r.a)(W,e),W.length=t.length,O.notifyListeners(W.location,W.action)}var _=!1,T=null;function R(){var e,t,n=C(),r=m(n);if(n!==r)P(r);else{var o=x(),a=W.location;if(!_&&(t=o,(e=a).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(T===h(o))return;T=null,function(e){if(_)_=!1,k();else{var t="POP";O.confirmTransitionTo(e,t,i,(function(n){n?k({action:t,location:e}):function(e){var t=W.location,n=L.lastIndexOf(h(t));-1===n&&(n=0);var r=L.lastIndexOf(h(e));-1===r&&(r=0);var o=n-r;o&&(_=!0,I(o))}(e)}))}}(o)}}var M=C(),N=m(M);M!==N&&P(N);var A=x(),L=[h(A)];function I(e){t.go(e)}var D=0;function z(e){1===(D+=e)&&1===e?window.addEventListener(S,R):0===D&&window.removeEventListener(S,R)}var F=!1;var W={length:t.length,action:"POP",location:A,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=j(window.location.href)),n+"#"+m(u+h(e))},push:function(e,t){var n="PUSH",r=v(e,void 0,void 0,W.location);O.confirmTransitionTo(r,n,i,(function(e){if(e){var t=h(r),o=m(u+t);if(C()!==o){T=t,function(e){window.location.hash=e}(o);var i=L.lastIndexOf(h(W.location)),a=L.slice(0,i+1);a.push(t),L=a,k({action:n,location:r})}else k()}}))},replace:function(e,t){var n="REPLACE",r=v(e,void 0,void 0,W.location);O.confirmTransitionTo(r,n,i,(function(e){if(e){var t=h(r),o=m(u+t);C()!==o&&(T=t,P(o));var i=L.indexOf(h(W.location));-1!==i&&(L[i]=t),k({action:n,location:r})}}))},go:I,goBack:function(){I(-1)},goForward:function(){I(1)},block:function(e){void 0===e&&(e=!1);var t=O.setPrompt(e);return F||(z(1),F=!0),function(){return F&&(F=!1,z(-1)),t()}},listen:function(e){var t=O.appendListener(e);return z(1),function(){z(-1),t()}}};return W}function T(e,t,n){return Math.min(Math.max(e,t),n)}function R(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,o=t.initialEntries,i=void 0===o?["/"]:o,a=t.initialIndex,l=void 0===a?0:a,u=t.keyLength,s=void 0===u?6:u,c=y();function f(e){Object(r.a)(w,e),w.length=w.entries.length,c.notifyListeners(w.location,w.action)}function d(){return Math.random().toString(36).substr(2,s)}var p=T(l,0,i.length-1),m=i.map((function(e){return v(e,void 0,"string"===typeof e?d():e.key||d())})),b=h;function g(e){var t=T(w.index+e,0,w.entries.length-1),r=w.entries[t];c.confirmTransitionTo(r,"POP",n,(function(e){e?f({action:"POP",location:r,index:t}):f()}))}var w={length:m.length,action:"POP",location:m[p],index:p,entries:m,createHref:b,push:function(e,t){var r="PUSH",o=v(e,t,d(),w.location);c.confirmTransitionTo(o,r,n,(function(e){if(e){var t=w.index+1,n=w.entries.slice(0);n.length>t?n.splice(t,n.length-t,o):n.push(o),f({action:r,location:o,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",o=v(e,t,d(),w.location);c.confirmTransitionTo(o,r,n,(function(e){e&&(w.entries[w.index]=o,f({action:r,location:o}))}))},go:g,goBack:function(){g(-1)},goForward:function(){g(1)},canGo:function(e){var t=w.index+e;return t>=0&&t<w.entries.length},block:function(e){return void 0===e&&(e=!1),c.setPrompt(e)},listen:function(e){return c.appendListener(e)}};return w}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a}));var r=n(1),o=n(3),i=["xs","sm","md","lg","xl"];function a(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,a=e.unit,l=void 0===a?"px":a,u=e.step,s=void 0===u?5:u,c=Object(o.a)(e,["values","unit","step"]);function f(e){var t="number"===typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(l,")")}function d(e,t){var r=i.indexOf(t);return r===i.length-1?f(e):"@media (min-width:".concat("number"===typeof n[e]?n[e]:e).concat(l,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[i[r+1]]?n[i[r+1]]:t)-s/100).concat(l,")")}return Object(r.a)({keys:i,values:n,up:f,down:function(e){var t=i.indexOf(e)+1,r=n[i[t]];return t===i.length?f("xs"):"@media (max-width:".concat(("number"===typeof r&&t>0?r:e)-s/100).concat(l,")")},between:d,only:function(e){return d(e,e)},width:function(e){return n[e]}},c)}},function(e,t,n){var r=n(87),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t,n){"use strict";function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a=function(e,t){}},function(e,t,n){"use strict";function r(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=this,l=function(){e.apply(a,o)};clearTimeout(t),t=setTimeout(l,n)}return r.clear=function(){clearTimeout(t)},r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);function o(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(47);var o=n(99),i=n(60);function a(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(o.a)(e)||Object(i.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(100);var o=n(60),i=n(101);function a(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}}(e,t)||Object(o.a)(e,t)||Object(i.a)()}},,,function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";function r(e){return(r="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})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.apply(this,r),t.apply(this,r)}}),(function(){}))}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(175),o=n(178);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(13);function o(e){return Object(r.a)(e).defaultView||window}},function(e,t,n){"use strict";var r=n(107),o=Object(r.a)();t.a=o},function(e,t,n){"use strict";var r=n(122),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function u(e){return r.isMemo(e)?a:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=a;var s=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=c(n);f&&(a=a.concat(f(n)));for(var l=u(t),v=u(n),m=0;m<a.length;++m){var y=a[m];if(!i[y]&&(!r||!r[y])&&(!v||!v[y])&&(!l||!l[y])){var b=d(n,y);try{s(t,y,b)}catch(g){}}}}return t}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";var r=n(0),o=n.n(r);t.a=o.a.createContext(null)},function(e,t,n){"use strict";var r=n(0),o=r.createContext({});t.a=o},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(51),o=n(140),i=n(141),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n.d(t,"a",(function(){return i}))},,function(e,t,n){var r=n(44),o=n(45);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},function(e,t,n){var r=n(24).Symbol;e.exports=r},function(e,t,n){var r=n(36)(Object,"create");e.exports=r},function(e,t,n){var r=n(183),o=n(184),i=n(185),a=n(186),l=n(187);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=l,e.exports=u},function(e,t,n){var r=n(96);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(189);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(0),o=n(10),i=!0,a=!1,l=null,u={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function s(e){e.metaKey||e.altKey||e.ctrlKey||(i=!0)}function c(){i=!1}function f(){"hidden"===this.visibilityState&&a&&(i=!0)}function d(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return i||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!u[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function p(){a=!0,window.clearTimeout(l),l=window.setTimeout((function(){a=!1}),100)}function h(){return{isFocusVisible:d,onBlurVisible:p,ref:r.useCallback((function(e){var t,n=o.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",s,!0),t.addEventListener("mousedown",c,!0),t.addEventListener("pointerdown",c,!0),t.addEventListener("touchstart",c,!0),t.addEventListener("visibilitychange",f,!0))}),[])}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);function o(e){var t=e.controlled,n=e.default,o=(e.name,e.state,r.useRef(void 0!==t).current),i=r.useState(n),a=i[0],l=i[1];return[o?t:a,r.useCallback((function(e){o||l(e)}),[])]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(1),o=n(0),i=n.n(o),a=n(3),l=(n(4),n(5)),u=n(6),s=n(7),c=o.forwardRef((function(e,t){var n=e.children,i=e.classes,u=e.className,c=e.color,f=void 0===c?"inherit":c,d=e.component,p=void 0===d?"svg":d,h=e.fontSize,v=void 0===h?"default":h,m=e.htmlColor,y=e.titleAccess,b=e.viewBox,g=void 0===b?"0 0 24 24":b,w=Object(a.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return o.createElement(p,Object(r.a)({className:Object(l.a)(i.root,u,"inherit"!==f&&i["color".concat(Object(s.a)(f))],"default"!==v&&i["fontSize".concat(Object(s.a)(v))]),focusable:"false",viewBox:g,color:m,"aria-hidden":!y||void 0,role:y?"img":void 0,ref:t},w),n,y?o.createElement("title",null,y):null)}));c.muiName="SvgIcon";var f=Object(u.a)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(c);function d(e,t){var n=function(t,n){return i.a.createElement(f,Object(r.a)({ref:n},t),e)};return n.muiName=f.muiName,i.a.memo(i.a.forwardRef(n))}},function(e,t,n){"use strict";var r=n(0),o=n.n(r).a.createContext(null);t.a=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(47);function o(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for;t.a=r?Symbol.for("mui.nested"):"__THEME_NESTED__"},function(e,t,n){"use strict";t.a={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},function(e,t,n){"use strict";function r(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}}(e,t)||function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Flippy",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"FrontSide",{enumerable:!0,get:function(){return i.FrontSide}}),Object.defineProperty(t,"BackSide",{enumerable:!0,get:function(){return i.BackSide}}),t.default=void 0;var r,o=(r=n(131))&&r.__esModule?r:{default:r},i=n(134);var a=o.default;t.default=a},,function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,l,u=a(e),s=1;s<arguments.length;s++){for(var c in n=Object(arguments[s]))o.call(n,c)&&(u[c]=n[c]);if(r){l=r(n);for(var f=0;f<l.length;f++)i.call(n,l[f])&&(u[l[f]]=n[l[f]])}}return u}},function(e,t,n){"use strict";function r(e){return function(){return null}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";e.exports=n(128)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(172),o=n(188),i=n(190),a=n(191),l=n(192);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=l,e.exports=u},function(e,t,n){var r=n(36)(n(24),"Map");e.exports=r},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var l in r)n.call(r,l)&&r[l]&&e.push(l)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrowsPropTypes=t.arrowsDefaultProps=t.dotsPropTypes=t.dotsDefaultProps=t.autoplayProps=t.propTypes=t.defaultProps=void 0;var r=i(n(0)),o=i(n(4));function i(e){return e&&e.__esModule?e:{default:e}}t.autoplayProps={autoplaySpeed:3e3};var a={accessibility:!0,adaptiveHeight:!1,afterChange:null,appendDots:function(e){return r.default.createElement("ul",{style:{display:"block"}},e)},arrows:!0,autoplay:!1,autoplaySpeed:3e3,beforeChange:null,centerMode:!1,arrowsScroll:1,centerPadding:50,className:"",customPaging:function(e){return r.default.createElement("button",{type:"button"},e+1)},dots:!1,dotsClass:"carousel-dots",dotsScroll:1,draggable:!0,edgeFriction:.35,fade:!1,focusOnSelect:!1,initialSlide:!1,lazyLoad:null,nextArrow:null,onEdge:null,onInit:null,onLazyLoadError:null,onReInit:null,pauseOnDotsHover:!1,pauseOnFocus:!1,pauseOnHover:!0,prevArrow:null,responsive:null,rows:1,rtl:!1,slide:"div",slidesPerRow:1,slidesToShow:1,swipe:!0,swipeToSlide:!1,vertical:!1,duration:200,shift:0,gutter:0,fullWidth:!1,arrowsBlock:!0,autoplayScroll:1,onResize:function(){},onSwipe:function(){},wheel:!1,wheelScroll:1,virtualList:!1,overScan:2};t.defaultProps=a;var l={accessibility:o.default.bool,adaptiveHeight:o.default.bool,afterChange:o.default.func,appendDots:o.default.func,arrows:o.default.bool,arrowsScroll:o.default.number,autoplay:o.default.bool,autoplaySpeed:o.default.number,beforeChange:o.default.func,centerMode:o.default.bool,centerPadding:o.default.oneOfType([o.default.number,o.default.string]),className:o.default.string,cssEase:o.default.string,customPaging:o.default.func,dots:o.default.bool,dotsClass:o.default.string,dotsScroll:o.default.number,draggable:o.default.bool,easing:o.default.string,edgeFriction:o.default.number,fade:o.default.bool,focusOnSelect:o.default.bool,initialSlide:o.default.oneOfType([o.default.number,o.default.bool]),lazyLoad:o.default.bool,nextArrow:o.default.oneOfType([o.default.instanceOf("undefined"!==typeof Element&&Element),o.default.element]),onEdge:o.default.func,onInit:o.default.func,onLazyLoadError:o.default.func,onReInit:o.default.func,pauseOnDotsHover:o.default.bool,pauseOnFocus:o.default.bool,pauseOnHover:o.default.bool,prevArrow:o.default.oneOfType([o.default.instanceOf("undefined"!==typeof Element&&Element),o.default.element]),responsive:o.default.array,rows:o.default.number,rtl:o.default.bool,slide:o.default.string,slidesPerRow:o.default.number,slidesToShow:o.default.number,swipe:o.default.bool,swipeToSlide:o.default.bool,vertical:o.default.bool,duration:o.default.number,shift:o.default.number,gutter:o.default.number,fullWidth:o.default.bool,arrowsBlock:o.default.bool,autoplayScroll:o.default.number,onResize:o.default.func,onSwipe:o.default.func,virtualList:o.default.bool,overScan:o.default.number};t.propTypes=l;var u={slideCount:0,dotsScroll:1,slidesToShow:1,infinite:!0,currentSlide:0,clickHandler:function(){},onMouseEnter:function(){},onMouseOver:function(){},onMouseLeave:function(){},customPaging:function(e){return r.default.createElement("button",{type:"button"},e+1)},appendDots:function(e){return r.default.createElement("ul",{style:{display:"block"}},e)},dotsClass:""};t.dotsDefaultProps=u;var s={slideCount:o.default.number,dotsScroll:o.default.number,slidesToShow:o.default.number,infinite:o.default.bool,currentSlide:o.default.number,clickHandler:o.default.func,onMouseEnter:o.default.func,onMouseOver:o.default.func,onMouseLeave:o.default.func,customPaging:o.default.func,appendDots:o.default.func,dotsClass:o.default.string};t.dotsPropTypes=s;var c={arrows:o.default.bool,arrowsScroll:o.default.number,clickHandler:o.default.func,type:o.default.oneOf(["prev","next"]),prevArrow:o.default.oneOfType([o.default.array,o.default.element,o.default.instanceOf("undefined"!==typeof Element&&Element),o.default.oneOf([null])]),nextArrow:o.default.oneOfType([o.default.array,o.default.element,o.default.instanceOf("undefined"!==typeof Element&&Element),o.default.oneOf([null])]),arrowsBlock:o.default.bool};t.arrowsPropTypes=c;t.arrowsDefaultProps={arrows:!0,arrowsScroll:1,clickHandler:function(){},type:"prev",arrowsBlock:!0,prevArrow:null,nextArrow:null}},function(e,t,n){"use strict";(function(e){var r=n(0),o=n.n(r),i=n(14),a=n(4),l=n.n(a),u=1073741823,s="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:{};function c(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var f=o.a.createContext||function(e,t){var n,o,a="__create-react-context-"+function(){var e="__global_unique_id__";return s[e]=(s[e]||0)+1}()+"__",f=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=c(t.props.value),t}Object(i.a)(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[a]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,o=e.value;((i=r)===(a=o)?0!==i||1/i===1/a:i!==i&&a!==a)?n=0:(n="function"===typeof t?t(r,o):u,0!==(n|=0)&&this.emitter.set(e.value,n))}var i,a},r.render=function(){return this.props.children},n}(r.Component);f.childContextTypes=((n={})[a]=l.a.object.isRequired,n);var d=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!==((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}Object(i.a)(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=void 0===t||null===t?u:t},r.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=void 0===e||null===e?u:e},r.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},r.getValue=function(){return this.context[a]?this.context[a].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return d.contextTypes=((o={})[a]=l.a.object,o),{Provider:f,Consumer:d}};t.a=f}).call(this,n(70))},function(e,t,n){var r=n(234);e.exports=p,e.exports.parse=i,e.exports.compile=function(e,t){return l(i(e,t),t)},e.exports.tokensToFunction=l,e.exports.tokensToRegExp=d;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,r=[],i=0,a=0,l="",c=t&&t.delimiter||"/";null!=(n=o.exec(e));){var f=n[0],d=n[1],p=n.index;if(l+=e.slice(a,p),a=p+f.length,d)l+=d[1];else{var h=e[a],v=n[2],m=n[3],y=n[4],b=n[5],g=n[6],w=n[7];l&&(r.push(l),l="");var x=null!=v&&null!=h&&h!==v,O="+"===g||"*"===g,k="?"===g||"*"===g,S=n[2]||c,E=y||b;r.push({name:m||i++,prefix:v||"",delimiter:S,optional:k,repeat:O,partial:x,asterisk:!!w,pattern:E?s(E):w?".*":"[^"+u(S)+"]+?"})}}return a<e.length&&(l+=e.substr(a)),l&&r.push(l),r}function a(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function l(e,t){for(var n=new Array(e.length),o=0;o<e.length;o++)"object"===typeof e[o]&&(n[o]=new RegExp("^(?:"+e[o].pattern+")$",f(t)));return function(t,o){for(var i="",l=t||{},u=(o||{}).pretty?a:encodeURIComponent,s=0;s<e.length;s++){var c=e[s];if("string"!==typeof c){var f,d=l[c.name];if(null==d){if(c.optional){c.partial&&(i+=c.prefix);continue}throw new TypeError('Expected "'+c.name+'" to be defined')}if(r(d)){if(!c.repeat)throw new TypeError('Expected "'+c.name+'" to not repeat, but received `'+JSON.stringify(d)+"`");if(0===d.length){if(c.optional)continue;throw new TypeError('Expected "'+c.name+'" to not be empty')}for(var p=0;p<d.length;p++){if(f=u(d[p]),!n[s].test(f))throw new TypeError('Expected all "'+c.name+'" to match "'+c.pattern+'", but received `'+JSON.stringify(f)+"`");i+=(0===p?c.prefix:c.delimiter)+f}}else{if(f=c.asterisk?encodeURI(d).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):u(d),!n[s].test(f))throw new TypeError('Expected "'+c.name+'" to match "'+c.pattern+'", but received "'+f+'"');i+=c.prefix+f}}else i+=c}return i}}function u(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function c(e,t){return e.keys=t,e}function f(e){return e&&e.sensitive?"":"i"}function d(e,t,n){r(t)||(n=t||n,t=[]);for(var o=(n=n||{}).strict,i=!1!==n.end,a="",l=0;l<e.length;l++){var s=e[l];if("string"===typeof s)a+=u(s);else{var d=u(s.prefix),p="(?:"+s.pattern+")";t.push(s),s.repeat&&(p+="(?:"+d+p+")*"),a+=p=s.optional?s.partial?d+"("+p+")?":"(?:"+d+"("+p+"))?":d+"("+p+")"}}var h=u(n.delimiter||"/"),v=a.slice(-h.length)===h;return o||(a=(v?a.slice(0,-h.length):a)+"(?:"+h+"(?=$))?"),a+=i?"$":o&&v?"":"(?="+h+"|$)",c(new RegExp("^"+a,f(n)),t)}function p(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return c(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],o=0;o<e.length;o++)r.push(p(e[o],t,n).source);return c(new RegExp("(?:"+r.join("|")+")",f(n)),t)}(e,t,n):function(e,t,n){return d(i(e,n),t,n)}(e,t,n)}},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n.n(i),l=(n(4),n(10)),u=n(5),s=n(9),c=n(15),f=n(6),d=n(56),p=n(29),h=n(17),v=n(46),m=n(14),y=n(41);function b(e,t){var n=Object.create(null);return e&&i.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&Object(i.isValidElement)(e)?t(e):e}(e)})),n}function g(e,t,n){return null!=n[t]?n[t]:e.props[t]}function w(e,t,n){var r=b(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var l={};for(var u in t){if(o[u])for(r=0;r<o[u].length;r++){var s=o[u][r];l[o[u][r]]=n(s)}l[u]=n(u)}for(r=0;r<i.length;r++)l[i[r]]=n(i[r]);return l}(t,r);return Object.keys(o).forEach((function(a){var l=o[a];if(Object(i.isValidElement)(l)){var u=a in t,s=a in r,c=t[a],f=Object(i.isValidElement)(c)&&!c.props.in;!s||u&&!f?s||!u||f?s&&u&&Object(i.isValidElement)(c)&&(o[a]=Object(i.cloneElement)(l,{onExited:n.bind(null,l),in:c.props.in,exit:g(l,"exit",e),enter:g(l,"enter",e)})):o[a]=Object(i.cloneElement)(l,{in:!1}):o[a]=Object(i.cloneElement)(l,{onExited:n.bind(null,l),in:!0,exit:g(l,"exit",e),enter:g(l,"enter",e)})}})),o}var x=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},O=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(Object(v.a)(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}Object(m.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,o=t.children,a=t.handleExited;return{children:t.firstRender?(n=e,r=a,b(n.children,(function(e){return Object(i.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:g(e,"appear",n),enter:g(e,"enter",n),exit:g(e,"exit",n)})}))):w(e,o,a),firstRender:!1}},n.handleExited=function(e,t){var n=b(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=Object(r.a)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Object(h.a)(e,["component","childFactory"]),o=this.state.contextValue,i=x(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a.a.createElement(y.a.Provider,{value:o},i):a.a.createElement(y.a.Provider,{value:o},a.a.createElement(t,r,i))},t}(a.a.Component);O.propTypes={},O.defaultProps={component:"div",childFactory:function(e){return e}};var k=O,S="undefined"===typeof window?i.useEffect:i.useLayoutEffect;var E=function(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,o=e.rippleX,a=e.rippleY,l=e.rippleSize,s=e.in,f=e.onExited,d=void 0===f?function(){}:f,p=e.timeout,h=i.useState(!1),v=h[0],m=h[1],y=Object(u.a)(t.ripple,t.rippleVisible,r&&t.ripplePulsate),b={width:l,height:l,top:-l/2+a,left:-l/2+o},g=Object(u.a)(t.child,v&&t.childLeaving,r&&t.childPulsate),w=Object(c.a)(d);return S((function(){if(!s){m(!0);var e=setTimeout(w,p);return function(){clearTimeout(e)}}}),[w,s,p]),i.createElement("span",{className:y,style:b},i.createElement("span",{className:g}))},j=i.forwardRef((function(e,t){var n=e.center,a=void 0!==n&&n,l=e.classes,s=e.className,c=Object(o.a)(e,["center","classes","className"]),f=i.useState([]),d=f[0],h=f[1],v=i.useRef(0),m=i.useRef(null);i.useEffect((function(){m.current&&(m.current(),m.current=null)}),[d]);var y=i.useRef(!1),b=i.useRef(null),g=i.useRef(null),w=i.useRef(null);i.useEffect((function(){return function(){clearTimeout(b.current)}}),[]);var x=i.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,o=e.rippleSize,a=e.cb;h((function(e){return[].concat(Object(p.a)(e),[i.createElement(E,{key:v.current,classes:l,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o})])})),v.current+=1,m.current=a}),[l]),O=i.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,o=void 0!==r&&r,i=t.center,l=void 0===i?a||t.pulsate:i,u=t.fakeElement,s=void 0!==u&&u;if("mousedown"===e.type&&y.current)y.current=!1;else{"touchstart"===e.type&&(y.current=!0);var c,f,d,p=s?null:w.current,h=p?p.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(l||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(h.width/2),f=Math.round(h.height/2);else{var v=e.touches?e.touches[0]:e,m=v.clientX,O=v.clientY;c=Math.round(m-h.left),f=Math.round(O-h.top)}if(l)(d=Math.sqrt((2*Math.pow(h.width,2)+Math.pow(h.height,2))/3))%2===0&&(d+=1);else{var k=2*Math.max(Math.abs((p?p.clientWidth:0)-c),c)+2,S=2*Math.max(Math.abs((p?p.clientHeight:0)-f),f)+2;d=Math.sqrt(Math.pow(k,2)+Math.pow(S,2))}e.touches?null===g.current&&(g.current=function(){x({pulsate:o,rippleX:c,rippleY:f,rippleSize:d,cb:n})},b.current=setTimeout((function(){g.current&&(g.current(),g.current=null)}),80)):x({pulsate:o,rippleX:c,rippleY:f,rippleSize:d,cb:n})}}),[a,x]),S=i.useCallback((function(){O({},{pulsate:!0})}),[O]),j=i.useCallback((function(e,t){if(clearTimeout(b.current),"touchend"===e.type&&g.current)return e.persist(),g.current(),g.current=null,void(b.current=setTimeout((function(){j(e,t)})));g.current=null,h((function(e){return e.length>0?e.slice(1):e})),m.current=t}),[]);return i.useImperativeHandle(t,(function(){return{pulsate:S,start:O,stop:j}}),[S,O,j]),i.createElement("span",Object(r.a)({className:Object(u.a)(l.root,s),ref:w},c),i.createElement(k,{component:null,exit:!0},d))})),C=Object(f.a)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(i.memo(j)),P=i.forwardRef((function(e,t){var n=e.action,a=e.buttonRef,f=e.centerRipple,p=void 0!==f&&f,h=e.children,v=e.classes,m=e.className,y=e.component,b=void 0===y?"button":y,g=e.disabled,w=void 0!==g&&g,x=e.disableRipple,O=void 0!==x&&x,k=e.disableTouchRipple,S=void 0!==k&&k,E=e.focusRipple,j=void 0!==E&&E,P=e.focusVisibleClassName,_=e.onBlur,T=e.onClick,R=e.onFocus,M=e.onFocusVisible,N=e.onKeyDown,A=e.onKeyUp,L=e.onMouseDown,I=e.onMouseLeave,D=e.onMouseUp,z=e.onTouchEnd,F=e.onTouchMove,W=e.onTouchStart,$=e.onDragLeave,U=e.tabIndex,B=void 0===U?0:U,H=e.TouchRippleProps,V=e.type,q=void 0===V?"button":V,K=Object(o.a)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),X=i.useRef(null);var Y=i.useRef(null),Q=i.useState(!1),G=Q[0],J=Q[1];w&&G&&J(!1);var Z=Object(d.a)(),ee=Z.isFocusVisible,te=Z.onBlurVisible,ne=Z.ref;function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:S;return Object(c.a)((function(r){return t&&t(r),!n&&Y.current&&Y.current[e](r),!0}))}i.useImperativeHandle(n,(function(){return{focusVisible:function(){J(!0),X.current.focus()}}}),[]),i.useEffect((function(){G&&j&&!O&&Y.current.pulsate()}),[O,j,G]);var oe=re("start",L),ie=re("stop",$),ae=re("stop",D),le=re("stop",(function(e){G&&e.preventDefault(),I&&I(e)})),ue=re("start",W),se=re("stop",z),ce=re("stop",F),fe=re("stop",(function(e){G&&(te(e),J(!1)),_&&_(e)}),!1),de=Object(c.a)((function(e){X.current||(X.current=e.currentTarget),ee(e)&&(J(!0),M&&M(e)),R&&R(e)})),pe=function(){var e=l.findDOMNode(X.current);return b&&"button"!==b&&!("A"===e.tagName&&e.href)},he=i.useRef(!1),ve=Object(c.a)((function(e){j&&!he.current&&G&&Y.current&&" "===e.key&&(he.current=!0,e.persist(),Y.current.stop(e,(function(){Y.current.start(e)}))),e.target===e.currentTarget&&pe()&&" "===e.key&&e.preventDefault(),N&&N(e),e.target===e.currentTarget&&pe()&&"Enter"===e.key&&!w&&(e.preventDefault(),T&&T(e))})),me=Object(c.a)((function(e){j&&" "===e.key&&Y.current&&G&&!e.defaultPrevented&&(he.current=!1,e.persist(),Y.current.stop(e,(function(){Y.current.pulsate(e)}))),A&&A(e),T&&e.target===e.currentTarget&&pe()&&" "===e.key&&!e.defaultPrevented&&T(e)})),ye=b;"button"===ye&&K.href&&(ye="a");var be={};"button"===ye?(be.type=q,be.disabled=w):("a"===ye&&K.href||(be.role="button"),be["aria-disabled"]=w);var ge=Object(s.a)(a,t),we=Object(s.a)(ne,X),xe=Object(s.a)(ge,we),Oe=i.useState(!1),ke=Oe[0],Se=Oe[1];i.useEffect((function(){Se(!0)}),[]);var Ee=ke&&!O&&!w;return i.createElement(ye,Object(r.a)({className:Object(u.a)(v.root,m,G&&[v.focusVisible,P],w&&v.disabled),onBlur:fe,onClick:T,onFocus:de,onKeyDown:ve,onKeyUp:me,onMouseDown:oe,onMouseLeave:le,onMouseUp:ae,onDragLeave:ie,onTouchEnd:se,onTouchMove:ce,onTouchStart:ue,ref:xe,tabIndex:w?-1:B},be,K),h,Ee?i.createElement(C,Object(r.a)({ref:Y,center:p},H)):null)}));t.a=Object(f.a)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(P)},,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.requestAnimationFrame=t.targetFrameTime=t.snowfallBaseStyle=void 0;t.snowfallBaseStyle={pointerEvents:"none",backgroundColor:"transparent",position:"absolute",top:0,left:0,width:"100%",height:"100%"};t.targetFrameTime=1e3/60;var r=window.requestAnimationFrame||window.webkitRequestAnimationFrame;t.requestAnimationFrame=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.random=function(e,t){var n=Math.random()*(t-e+1)+e;return Number.isInteger(e)&&Number.isInteger(t)?Math.floor(n):n},t.lerp=function(e,t,n){return(1-n)*e+n*t},t.getSize=function(e){return e?{height:e.offsetHeight,width:e.offsetWidth}:{height:0,width:0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==y(e)&&"function"!==typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=v(n(136)),i=v(n(142)),a=v(n(165)),l=v(n(197)),u=v(n(73)),s=v(n(227)),c=v(n(228)),f=n(74),d=n(229),p=v(n(230)),h=n(231);function v(e){return e&&e.__esModule?e:{default:e}}function m(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function y(e){return(y="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})(e)}function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){j(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(233);var C=function(e,t){for(var n={},r=0;r<t.length;r+=1){var o=t[r];n[o]=e[o]}return n},P=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!==y(t)&&"function"!==typeof t?S(e):t}(this,k(t).call(this,e)),j(S(n),"isMounted",!0),j(S(n),"init",(function(){var e=n.state,t=e.settings,o=e.width,i=n.state.activeIndex;(t=x({},f.defaultProps,{},n.props)).fade&&(t.slidesToShow,t.slidesToShow=1);var u=n.props.children;u=r.default.Children.toArray(u).filter((function(e){return"string"===typeof e?!!e.trim():!!e}));var s=n.widthInit();o!==s&&(o=s);for(var c=[],d=0;d<u.length;d+=t.rows*t.slidesPerRow){for(var p=[],h=d;h<d+t.rows*t.slidesPerRow;h+=t.slidesPerRow){for(var v=[],m=h;m<h+t.slidesPerRow;m+=1)m<u.length&&v.push(r.default.cloneElement(u[m],{key:100*d+10*h+m,tabIndex:-1,style:{width:"".concat(100/t.slidesPerRow,"%"),display:"inline-block"}}));p.push(r.default.createElement("div",{className:"carousel-row",key:10*d+h},v))}c.push(r.default.createElement("div",{"data-carouselkey":d,key:d,className:"carousel-item",style:{width:"".concat(o,"px"),display:"none"}},p))}n.newChildren.length!==c.length?(n.rerender=!0,n.newChildren=c):(n.rerender=!1,n.newChildren=c,n.virtualList=c),t.virtualList&&n.items&&n.items.length===n.newChildren.length&&!n.rerender&&(n.endIndex===i&&(n.endIndex=null),n.virtualList=n.createVirtualList(),n.forceUpdate((function(){n.resizeHeight||n.connectObserver()}))),!(0,l.default)((0,a.default)(n.state,"settings"),t)&&n.isMounted&&n.setState({settings:t})})),j(S(n),"setRef",(function(e){return n.setState({SliderRef:e},(function(){var t=e.querySelectorAll(".carousel-item");n.state.settings.virtualList?(n.virtualList=n.newChildren,n.forceUpdate((function(){n.items=new c.default(e.querySelectorAll(".carousel-item")),n.virtualItem=null}))):n.items=new c.default(t),n.slideInit(),n.state.settings.slidesToShow<t.length?(n.signupListener(),n.autoPlay()):n.removeListener(),e.addEventListener("click",n.handleClick)}))})),j(S(n),"autoPlay",(function(){var e=n.state,t=e.SliderRef,r=e.settings,o=r.autoplay,i=r.autoplaySpeed,a=r.pauseOnHover;o&&i>0&&!n.autoplayTimer?(n.scrollType={type:"autoplay"},n.autoplayTimer=setInterval((function(){var e=n.props.autoplayScroll,t=n.state.activeIndex;n.beforeChangeTrigger=!1,n.slickNext(t+e)}),i),window.addEventListener("visibilitychange",n.handleVisibilityChange),a?(t.addEventListener("mouseover",n.handleAutoplayPause),t.removeEventListener("mouseleave",n.autoPlay)):(t.removeEventListener("mouseover",n.handleAutoplayPause),t.removeEventListener("mouseleave",n.autoPlay))):o&&i&&n.autoplayTimer&&(n.autoPlayInit(),a||(t.removeEventListener("mouseover",n.handleAutoplayPause),t.removeEventListener("mouseleave",n.autoPlay)))})),j(S(n),"autoPlayInit",(function(){var e=n.state.settings;e.autoplay?(n.handleAutoplayPause(),n.autoPlay()):n.isMounted&&n.setState({settings:x({},e,{autoplay:!0})},(function(){n.handleAutoplayPause(),n.autoPlay()}))})),j(S(n),"connectObserver",(function(){if(n.resizeObserver)n.disconnectObserver(),n.connectObserver();else{var e=n.state.SliderRef;n.resizeObserver=new s.default(n.handleResizeHeight),n.resizeObserver.observe(e.querySelector(".carousel-item"))}})),j(S(n),"disconnectObserver",(function(){n.resizeObserver&&(n.resizeObserver.disconnect(),n.resizeObserver=null)})),j(S(n),"track",(function(){var e=Date.now(),t=e-n.timestamp;n.timestamp=e;var r=n.offset-n.frame;n.frame=n.offset;var o=1e3*r/(1+t);n.velocity=.8*o+.2*n.velocity})),j(S(n),"autoScroll",(function(e){var t=n.state.settings;if(n.amplitude){var r=Date.now()-n.timestamp,o=n.amplitude*Math.exp(-r/t.duration);n.doubleTrigger?(n.beforeChangeTrigger=!1,n.scroll("auto",n.target-o),requestAnimationFrame(n.autoScroll),n.doubleTrigger=!1):o>2||o<-2?(n.scroll("start"===e?e:"auto",n.target-o),requestAnimationFrame(n.autoScroll)):n.changeWindow?(n.changeWindow=!1,n.scroll("auto",n.target)):n.scroll("end",n.target)}})),j(S(n),"getItem",(function(e,t){var r;if(n.state.settings.virtualList){var o=e.getKeyIndex(t);o>=0&&(r=e.get(o))}else r=e.get(t);return r})),j(S(n),"scroll",(function(e,t){var r,o,a=n.state,l=a.SliderRef,u=a.width,s=a.settings,f=a.activeIndex,d=s.centerMode,p=s.beforeChange,h=s.afterChange,v=s.slidesToShow,m=s.virtualList,y="translateX(0px)";n.offset=t?"number"===typeof t?t:n.offset:u*f*2,n.center=Math.floor((n.offset+n.dim/2)/n.dim);var b=n.offset-n.center*n.dim,g=b<0?1:-1,w=-g*b*2/n.dim;y=d?"translateX(".concat(v%2===0?u*(v/2):(l.clientWidth-u)/2-s.centerPadding,"px)"):"translateX(0px)";var x=n.scrollType,O=x.type,k=x.direction;l.classList.contains("scrolling")||"arrows"===O||"init"===e||"resize"===e||(n.swiping=!0,l.classList.add("scrolling"));var E=n.wrap(n.center);if(!n.beforeChangeTrigger&&"start"!==e&&"end"!==e&&"init"!==e){var j;switch(n.beforeChangeTrigger=!0,O){case"arrows":var C=s.arrowsScroll;n.scrollDistance=C,j=n.items.getIndex("prev"===k?f-C:f+C);break;case"dots":j=n.scrollOptions.index*n.scrollOptions.dotsScroll;break;case"autoplay":var P=s.autoplayScroll;n.scrollDistance=P,j=n.items.getIndex(f+P);break;case"wheel":var _=s.wheelScroll;n.scrollDistance=_,j=n.items.getIndex("prev"===k?f-_:f+_)}n.endIndex=j,p&&"function"===typeof p&&p(f,j)}"end"!==e&&n.scrollEnd&&(n.scrollEnd=!1),"end"===e?(h&&"function"===typeof h&&!n.scrollEnd&&h(n.wrap(n.center)),n.scrollEnd=!0,l.classList.remove("scrolling"),n.beforeChangeTrigger=!1,n.swiping=!1):n.scrollEnd&&n.scrollEnd(!0),n.virtualItem=n.virtualItem||new c.default(l.querySelectorAll(".carousel-item"),n.items);var T=m?n.virtualItem:n.items;if(T.length<=v){if(o=n.getItem(T,0)){o.classList.contains("active")&&((0,i.default)(l.querySelectorAll(".carousel-item"),(function(e){return e.classList.remove("active")})),o.classList.add("active"));var R="".concat(y," translateX(0px)");n.updateItemStyle(o,R)}}else if((!n.noWrap||n.center>=0&&n.center<T.length)&&(o=n.getItem(T,E))){o.classList.contains("active")&&((0,i.default)(l.querySelectorAll(".carousel-item"),(function(e){return e.classList.remove("active")})),o.classList.add("active"));var M="".concat(y," translateX(").concat(-b/2,"px) translateX(").concat(g*s.shift*w*r,"px)");n.updateItemStyle(o,M)}if(d){var N=Math.floor(T.length/2);for(r=1;r<=N;r+=1){if((!n.noWrap||n.center+r<T.length)&&(o=n.getItem(T,n.wrap(n.center+r)))){var A="".concat(y," translateX(").concat(s.shift+(n.dim*r-b)/2,"px)");n.updateItemStyle(o,A)}if((!n.noWrap||n.center-r>=0)&&(o=n.getItem(T,n.wrap(n.center-r)))){var L="".concat(y," translateX(").concat(-s.shift+(-n.dim*r-b)/2,"px)");n.updateItemStyle(o,L)}}}else if(T.length<=v){for(r=1;r<T.length;r+=1)if(o=n.getItem(T,r)){var I="".concat(y," translateX(").concat(s.shift+(n.dim*r-b)/2,"px)");n.updateItemStyle(o,I)}}else{for(r=1;r<v;r+=1)if(o=n.getItem(T,n.wrap(n.center+r))){var D="".concat(y," translateX(").concat(s.shift+(n.dim*r-b)/2,"px)");n.updateItemStyle(o,D)}var z=Math.ceil((T.length-v)/2);for(r=0;r<z;r+=1){if((!n.noWrap||n.center+v+r<T.length)&&(o=n.getItem(T,n.wrap(n.center+v+r)))){var F="".concat(y," translateX(").concat(s.shift+(n.dim*(v+r)-b)/2,"px)");n.updateItemStyle(o,F)}if((!n.noWrap||n.center+v+r<T.length)&&(o=n.getItem(T,n.wrap(n.center-r-1)))){var W="".concat(y," translateX(").concat(-s.shift+(-n.dim*(r+1)-b)/2,"px)");n.updateItemStyle(o,W)}}}if((!n.noWrap||n.center<n.items.length)&&v<T.length&&(o=n.getItem(T,n.center))){if(!o.classList.contains("active")){(0,i.default)(l.querySelectorAll(".carousel-item"),(function(e){return e.classList.remove("active")})),o.classList.add("active");var $=n.wrap(n.center);n.beforeChangeTrigger&&n.isMounted&&n.setState({activeIndex:$},(function(){n.virtualItem=null}))}var U="".concat(y," translateX(").concat(-b/2,"px) translateX(").concat(g*s.shift*w,"px)");n.updateItemStyle(o,U)}n.adaptHeight();var B=l.querySelectorAll(".carousel-item")[n.wrap(n.center)];"function"===typeof n.oneTimeCallback&&(n.oneTimeCallback.call(S(n),B,n.dragged),n.oneTimeCallback=null)})),j(S(n),"updateItemStyle",(function(e,t){var r=e;r.style[n.xform]=t,r.style.zIndex=1,r.style.display=""})),j(S(n),"widthInit",(function(){var e=n.state,t=e.settings,r=e.SliderRef,o=t.centerMode,i=t.centerPadding,a=t.slidesToShow;if(r){var l=0;if("string"===typeof i)l=g(i.match(/\d+/g),1)[0];else"number"===typeof i?l=i:(l=50,console.warn("centerPadding have to be number or string like 50px"));var u=r.offsetWidth;return u<=0&&(u=window.innerWidth),(o?u-2*l:u)/a}return 0})),j(S(n),"slideInit",(function(){var e=n.state,t=e.SliderRef,r=e.settings.initialSlide;if(t&&n.isMounted){var o=n.widthInit();n.setState({width:o},(function(){n.dim=2*o,n.scroll("init"),r&&("number"===typeof r?r>0&&!n.initialSet&&(n.slickSet(r),n.initialSet=!0):(n.slickSet(0),n.initialSet=!1,console.warn("initialSlide must be a number"))),n.connectObserver()}))}})),j(S(n),"adaptHeight",(function(){var e=n.state,t=e.settings,r=e.SliderRef,o=e.height;if(t.adaptiveHeight&&r){var i=n.wrap(n.center),a=n.items.get(i).offsetHeight;o!==a&&a>0&&n.isMounted&&n.setState({height:a})}})),j(S(n),"xpos",(function(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX})),j(S(n),"ypos",(function(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY})),j(S(n),"wrap",(function(e){return n.items.getIndex(e)})),j(S(n),"cycleTo",(function(e,t){var r=n.center%n.items.length-e;n.noWrap||(r<0?Math.abs(r+n.items.length)<Math.abs(r)&&(r+=n.items.length):r>0&&Math.abs(r-n.items.length)<r&&(r-=n.items.length)),n.target=n.dim*Math.round(n.offset/n.dim),r<0?n.target+=n.dim*Math.abs(r):r>0&&(n.target-=n.dim*r),"function"===typeof t&&(n.oneTimeCallback=t),n.offset!==n.target&&(n.amplitude=n.target-n.offset,n.timestamp=Date.now(),requestAnimationFrame((function(){n.autoScroll("start")})))})),j(S(n),"slickNext",(function(e){if("arrows"===n.scrollType.type&&(n.doubleTrigger=!0),"number"===typeof e)n.cycleTo(e);else{var t=n.state.activeIndex;n.cycleTo(t+1)}})),j(S(n),"slickPrev",(function(e){if("arrows"===n.scrollType.type&&(n.doubleTrigger=!0),"number"===typeof e)n.cycleTo(e);else{var t=n.state.activeIndex;n.cycleTo(t-1)}})),j(S(n),"slickSet",(function(e,t){return n.cycleTo(e,t)})),j(S(n),"createVirtualList",(function(){var e=n.state,t=e.settings,r=t.slidesToShow,o=t.overScan,i=e.activeIndex;if(n.virtualList.length>2*(r+o)+1){var a=[],l=[],u=i,s=n.scrollType,c=s.type,f=s.direction;switch(c){case"scroll":"left"===f?u+=1:u-=1;break;case"arrows":"next"===f?u+=1:u-=1;break;case"dots":"right"===f?u+=1:u-=1;break;case"wheel":"next"===f?u+=1:u-=1;break;case"autoplay":u+=1}for(var d=0;d<r+o;d+=1)if(0===d){var p=n.items.getIndex(u);l.push(p)}else{var h=n.items.getIndex(u+d),v=n.items.getIndex(u-d);l.push(h),l.unshift(v)}if(n.endIndex>=0&&"number"===typeof n.endIndex){var m=0;m=i+n.endIndex<n.newChildren.length+n.scrollDistance&&i+n.endIndex>=n.newChildren.length-n.scrollDistance&&(i>=n.newChildren.length-n.scrollDistance||n.endIndex>=n.newChildren.length-n.scrollDistance)?n.endIndex+i<n.newChildren.length?n.endIndex<i?n.newChildren.length-i+n.endIndex:n.newChildren.length-n.endIndex+i:n.endIndex<i?n.newChildren.length+n.scrollDistance-i+n.endIndex:n.newChildren.length+n.scrollDistance-n.endIndex+i:n.endIndex<i?i-n.endIndex:n.endIndex-i;for(var y=0;y<m;y+=1){var b=n.items.getIndex(u+d+y),g=n.items.getIndex(u-d-y);switch(c){case"arrows":"next"===f?l.push(b):l.unshift(g);break;case"dots":"right"===f?l.push(b):l.unshift(g);break;case"wheel":"next"===f?l.push(b):l.unshift(g);break;case"autoplay":l.push(b)}}}for(l.sort((function(e,t){return e-t})),d=0;d<l.length;d+=1){var w=l[d],x=n.newChildren[w];a.push(x)}return a}return n.virtualList})),n.state={SliderRef:null,width:0,height:0,autoplaying:null,settings:f.defaultProps,activeIndex:0},n.touchObject={},n.newChildren=[],n.virtualList=[],n.center=0,n.offset=0,n.target=0,n.items=null,n.virtualItem=null,n.dim=1,n.xform="",n.resizeObserver=null,n.autoplayTimer=null,["","Webkit","Moz","O","ms"].every((function(e){var t="".concat(e,"Transform");return"undefined"===typeof document||"undefined"===typeof document.body.style[t]||(n.xform=t,!1)})),n.doubleTrigger=!1,n.initialSet=!1,n.beforeChangeTrigger=!1,n.scrollEnd=!1,n.autoplayTimer=null,n.scrollType={},n.scrollOptions={},n.rerender=!1,n.resizeHeight=!1,n.endIndex=null,n.changeWindow=!1,n.scroll=n.scroll.bind(S(n)),n.setRef=n.setRef.bind(S(n)),n.slideInit=n.slideInit.bind(S(n)),n.slickNext=n.slickNext.bind(S(n)),n.slickPrev=n.slickPrev.bind(S(n)),n.slickSet=n.slickSet.bind(S(n)),n.cycleTo=n.cycleTo.bind(S(n)),n.autoPlay=n.autoPlay.bind(S(n)),n.handleCarouselTap=h.handleCarouselTap.bind(S(n)),n.signupListener=h.signupListener.bind(S(n)),n.removeListener=h.removeListener.bind(S(n)),n.handleCarouselDrag=h.handleCarouselDrag.bind(S(n)),n.handleCarouselRelease=h.handleCarouselRelease.bind(S(n)),n.handleAutoplayPause=h.handleAutoplayPause.bind(S(n)),n.handleResize=(0,o.default)(h.handleResize.bind(S(n)),1e3,{leading:!0}),n.handleResizeHeight=(0,o.default)(h.handleResizeHeight.bind(S(n)),500),n.handleVisibilityChange=h.handleVisibilityChange.bind(S(n)),n.handleKeyDown=h.handleKeyDown.bind(S(n)),n.handleClick=h.handleClick.bind(S(n)),n.handleWheel=h.handleWheel.bind(S(n)),n}var n,v,m;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(t,e),n=t,(v=[{key:"componentDidMount",value:function(){this.isMounted=!0,window.addEventListener("resize",this.handleResize),this.init();var e=this.props.onInit;e&&"function"===typeof e&&e(this)}},{key:"shouldComponentUpdate",value:function(e,t){this.init();var n=e.slidesPerRow,r=e.rows,o=this.state.settings,i=o.slidesPerRow,a=o.rows;return n===i&&r===a||(this.resizeHeight=!1),(0,l.default)(e,this.props)||(0,l.default)(t,this.state)}},{key:"componentDidUpdate",value:function(e){var t=this.state.SliderRef,n=x({},this.props,{children:[]}),r=x({},e,{children:[]}),o=this.props.children;if(!(0,l.default)(n,r)||e.children.length!==o.length){var i=this.props.onReInit;this.init(),this.setRef(t),i&&"function"===typeof i&&i(this)}}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.handleResize),this.isMounted=!1}},{key:"render",value:function(){var e,t,n,o=this,i=this.state,a=i.height,l=i.settings,s=i.activeIndex,c=x({},l,{},this.prop),f=l.centerPadding,h=l.centerMode,v="string"===typeof f?f:"".concat(f,"px"),m=C(c,["arrows","arrowsScroll","centerMode","currentSlide","slideCount","slidesToShow","prevArrow","nextArrow","arrowsBlock"]);if(l.arrows&&(e=r.default.createElement(d.PrevArrow,b({},m,{clickHandler:function(e){o.beforeChangeTrigger=!1,o.scrollType={type:"arrows",direction:"prev"},o.scrollOptions=e,o.slickPrev(s-e.arrowsScroll)}})),t=r.default.createElement(d.NextArrow,b({},m,{clickHandler:function(e){o.beforeChangeTrigger=!1,o.scrollType={type:"arrows",direction:"next"},o.scrollOptions=e,o.slickNext(s+e.arrowsScroll)}}))),!0===l.dots&&this.items&&this.items.length>=l.slidesToShow){var y=C(c,["dotsClass","slidesToShow","dotsScroll","clickHandler","children","customPaging","infinite","appendDots"]),g=l.pauseOnDotsHover;Object.assign(y,{activeIndex:s,slideCount:this.items.length,clickHandler:function(e){o.beforeChangeTrigger=!1;var t=null;t=s>e.index?o.newChildren.length-s+e.index<s-e.index?"right":"left":e.index-s<=o.newChildren.length-e.index+s?"right":"left",o.scrollType={type:"dots",direction:t},o.scrollOptions=e,o.slickSet(e.index*e.dotsScroll)},onMouseEnter:g?this.onDotsLeave:null,onMouseOver:g?this.onDotsOver:null,onMouseLeave:g?this.onDotsLeave:null}),n=r.default.createElement(p.default,y)}var w=!!this.items&&l.slidesToShow<this.items.length,O=r.default.createElement(r.Fragment,null,r.default.createElement("div",{ref:function(e){!o.state.SliderRef&&o.isMounted&&o.setRef(e)},className:"carousel-initialized",style:{padding:h?"0 ".concat(v):0}},!l.unslick&&w?e:"",r.default.createElement("div",{style:{height:"".concat(a,"px")},className:"carousel-track"},this.rerender?this.newChildren:this.virtualList),!l.unslick&&w?t:""),!l.unslick&&w?n:"");if("unslick"===l){var k="regular slider ".concat(l.className||"");O=r.default.createElement("div",{className:k},this.newChildren)}return r.default.createElement("div",{className:(0,u.default)(l.className)},O)}}])&&O(n.prototype,v),m&&O(n,m),t}(r.Component);P.propTypes=f.propTypes,P.defaultProps=f.defaultProps;var _=P;t.default=_},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(70))},function(e,t,n){var r=n(149),o=n(158),i=n(93);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t,n){(function(e){var r=n(24),o=n(153),i=t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,l=a&&a.exports===i?r.Buffer:void 0,u=(l?l.isBuffer:void 0)||o;e.exports=u}).call(this,n(90)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(155),o=n(156),i=n(157),a=i&&i.isTypedArray,l=a?o(a):r;e.exports=l},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){var r=n(94),o=n(92);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(44),o=n(43);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(t){}try{return e+""}catch(t){}}return""}},function(e,t){e.exports=function(e,t){return e===t||e!==e&&t!==t}},function(e,t,n){var r=n(206),o=n(209),i=n(210);e.exports=function(e,t,n,a,l,u){var s=1&n,c=e.length,f=t.length;if(c!=f&&!(s&&f>c))return!1;var d=u.get(e),p=u.get(t);if(d&&p)return d==t&&p==e;var h=-1,v=!0,m=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++h<c;){var y=e[h],b=t[h];if(a)var g=s?a(b,y,h,t,e,u):a(y,b,h,e,t,u);if(void 0!==g){if(g)continue;v=!1;break}if(m){if(!o(t,(function(e,t){if(!i(m,t)&&(y===e||l(y,e,n,a,u)))return m.push(t)}))){v=!1;break}}else if(y!==b&&!l(y,b,n,a,u)){v=!1;break}}return u.delete(e),u.delete(t),v}},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(124),o=n(125);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(0)),a=(0,r(n(127)).default)(i.createElement("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");t.default=a},function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=2)}([function(e,t,n){"use strict";e.exports=n(3)},function(e,t,n){e.exports=n(5)()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),i=u(o),a=u(n(1)),l=u(n(7));function u(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=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));return n.state={index:0,displayText:""},n.getRawText=n.getRawText.bind(n),n.type=n.type.bind(n),n.erase=n.erase.bind(n),n.startTyping=n.startTyping.bind(n),n}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,o.Component),r(t,[{key:"componentDidMount",value:function(){this.startTyping()}},{key:"componentWillUnmount",value:function(){this._timeout&&clearTimeout(this._timeout)}},{key:"startTyping",value:function(){var e=this;this._timeout=setTimeout((function(){e.type()}),this.props.typingDelay)}},{key:"getRawText",value:function(){var e=this.props.text;return"string"==typeof e?[e]:[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(e))}},{key:"type",value:function(){var e=this,t=this.state,n=t.index,r=t.displayText,o=this.getRawText()[n];o.length>r.length?(r=o.substr(0,r.length+1),this.setState({displayText:r},(function(){e._timeout=setTimeout((function(){e.type()}),e.props.speed)}))):this._timeout=setTimeout((function(){e.erase()}),this.props.eraseDelay)}},{key:"erase",value:function(){var e=this,t=this.state,n=t.index,r=t.displayText;0===r.length?(n=n+1===this.getRawText().length?0:n+1,this.setState({index:n},(function(){e.startTyping()}))):(r=r.substr(-r.length,r.length-1),this.setState({displayText:r},(function(){e._timeout=setTimeout((function(){e.erase()}),e.props.eraseSpeed)})))}},{key:"render",value:function(){var e=this.props,t=(e.speed,e.eraseSpeed,e.typingDelay,e.eraseDelay,e.staticText),n=(e.text,e.cursor),r=e.displayTextRenderer,o=e.cursorClassName,a=e.cursorRenderer,u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["speed","eraseSpeed","typingDelay","eraseDelay","staticText","text","cursor","displayTextRenderer","cursorClassName","cursorRenderer"]),s=this.state,c=s.displayText,f=s.index;return i.default.createElement("span",u,t?i.default.createElement("span",null,t,"\xa0"):null,i.default.createElement("div",{style:{display:"inline-block"}},r?r(c,f):c),i.default.createElement(l.default,{cursor:n,cursorRenderer:a,className:o}))}}]),t}();t.default=s,s.defaultProps={speed:200,eraseSpeed:200,eraseDelay:5e3,typingDelay:2500},s.propTypes={speed:a.default.number.isRequired,eraseSpeed:a.default.number.isRequired,typingDelay:a.default.number.isRequired,eraseDelay:a.default.number.isRequired,staticText:a.default.string,text:a.default.oneOfType([a.default.arrayOf(a.default.string),a.default.string]).isRequired,cursor:a.default.string,cursorClassName:a.default.string,displayTextRenderer:a.default.func,cursorRenderer:a.default.func}},function(e,t,n){"use strict";var r=n(4),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,l=o?Symbol.for("react.fragment"):60107,u=o?Symbol.for("react.strict_mode"):60108,s=o?Symbol.for("react.profiler"):60114,c=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,d=o?Symbol.for("react.forward_ref"):60112,p=o?Symbol.for("react.suspense"):60113,h=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116,m="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g={};function w(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||b}function x(){}function O(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||b}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(y(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=w.prototype;var k=O.prototype=new x;k.constructor=O,r(k,w.prototype),k.isPureReactComponent=!0;var S={current:null},E=Object.prototype.hasOwnProperty,j={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,n){var r,o={},a=null,l=null;if(null!=t)for(r in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(a=""+t.key),t)E.call(t,r)&&!j.hasOwnProperty(r)&&(o[r]=t[r]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];o.children=s}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===o[r]&&(o[r]=u[r]);return{$$typeof:i,type:e,key:a,ref:l,props:o,_owner:S.current}}function P(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var _=/\/+/g,T=[];function R(e,t,n,r){if(T.length){var o=T.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function M(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>T.length&&T.push(e)}function N(e,t,n){return null==e?0:function e(t,n,r,o){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var u=!1;if(null===t)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case i:case a:u=!0}}if(u)return r(o,t,""===n?"."+A(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;s<t.length;s++){var c=n+A(l=t[s],s);u+=e(l,c,r,o)}else if("function"==typeof(c=null===t||"object"!=typeof t?null:"function"==typeof(c=m&&t[m]||t["@@iterator"])?c:null))for(t=c.call(t),s=0;!(l=t.next()).done;)u+=e(l=l.value,c=n+A(l,s++),r,o);else if("object"===l)throw r=""+t,Error(y(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return u}(e,"",t,n)}function A(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function L(e,t){e.func.call(e.context,t,e.count++)}function I(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?D(e,r,n,(function(e){return e})):null!=e&&(P(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(_,"$&/")+"/")+n)),r.push(e))}function D(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(_,"$&/")+"/"),N(e,I,t=R(t,i,r,o)),M(t)}var z={current:null};function F(){var e=z.current;if(null===e)throw Error(y(321));return e}var W={ReactCurrentDispatcher:z,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:S,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return D(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;N(e,L,t=R(null,null,t,n)),M(t)},count:function(e){return N(e,(function(){return null}),null)},toArray:function(e){var t=[];return D(e,t,null,(function(e){return e})),t},only:function(e){if(!P(e))throw Error(y(143));return e}},t.Component=w,t.Fragment=l,t.Profiler=s,t.PureComponent=O,t.StrictMode=u,t.Suspense=p,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W,t.cloneElement=function(e,t,n){if(null==e)throw Error(y(267,e));var o=r({},e.props),a=e.key,l=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(l=t.ref,u=S.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)E.call(t,c)&&!j.hasOwnProperty(c)&&(o[c]=void 0===t[c]&&void 0!==s?s[c]:t[c])}var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){s=Array(c);for(var f=0;f<c;f++)s[f]=arguments[f+2];o.children=s}return{$$typeof:i,type:e.type,key:a,ref:l,props:o,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:c,_context:e},e.Consumer=e},t.createElement=C,t.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:d,render:e}},t.isValidElement=P,t.lazy=function(e){return{$$typeof:v,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return F().useCallback(e,t)},t.useContext=function(e,t){return F().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return F().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return F().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return F().useLayoutEffect(e,t)},t.useMemo=function(e,t){return F().useMemo(e,t)},t.useReducer=function(e,t,n){return F().useReducer(e,t,n)},t.useRef=function(e){return F().useRef(e)},t.useState=function(e){return F().useState(e)},t.version="16.13.1"},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u<arguments.length;u++){for(var s in n=Object(arguments[u]))o.call(n,s)&&(l[s]=n[s]);if(r){a=r(n);for(var c=0;c<a.length;c++)i.call(n,a[c])&&(l[a[c]]=n[a[c]])}}return l}},function(e,t,n){"use strict";var r=n(6);function o(){}e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),i=l(o),a=l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=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));return n.state={display:!0},n.animateCursor=n.animateCursor.bind(n),n}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,o.Component),r(t,[{key:"componentDidMount",value:function(){this.animateCursor()}},{key:"componentWillUnmount",value:function(){this._interval&&clearInterval(this._interval)}},{key:"animateCursor",value:function(){var e=this;this._interval=setInterval((function(){e.setState({display:!e.state.display})}),500)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.cursor,r=e.cursorRenderer,o=this.state.display,a=n||"|";return i.default.createElement("span",{className:t,style:s(o)},r?r(a):a)}}]),t}();t.default=u;var s=function(){return{display:"inline-block",MsTransition:"opacity 0.5s",WebkitTransition:"opacity 0.5s",MozTransition:"opacity 0.5s",transition:"opacity 0.5s",opacity:arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?0:1}};u.propTypes={cursor:a.default.string,className:a.default.string,cursorRenderer:a.default.func}}])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(0)),o=n(84),i=n(129);var a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.color,n=void 0===t?"#dee4fd":t,a=e.snowflakeCount,l=void 0===a?150:a,u=e.style,s=(0,i.useSnowfallStyle)(u),c=(0,r.useRef)(),f=(0,i.useComponentSize)(c),d=(0,r.useRef)(0),p=(0,r.useRef)(Date.now()),h=(0,r.useMemo)((function(){return{color:n}}),[n]),v=(0,i.useSnowflakes)(c,l,h),m=function(e){c.current=e},y=(0,r.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=c.current;if(t){v.forEach((function(n){return n.update(t,e)}));var n=t.getContext("2d");n&&(n.clearRect(0,0,t.offsetWidth,t.offsetHeight),v.forEach((function(e){return e.draw(t,n)})))}}),[v]),b=(0,r.useCallback)((function(){var e=Date.now(),t=Date.now()-p.current;p.current=e;var n=t/o.targetFrameTime;y(n),d.current=requestAnimationFrame(b)}),[y]);return(0,r.useEffect)((function(){return b(),function(){return cancelAnimationFrame(d.current)}}),[b]),r.default.createElement("canvas",{ref:m,height:f.height,width:f.width,style:s})};t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Slider",{enumerable:!0,get:function(){return o.default}}),t.default=void 0;var r=i(n(135)),o=i(n(86));function i(e){return e&&e.__esModule?e:{default:e}}var a=r.default;t.default=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(11),o=n(14),i=n(0),a=n.n(i),l=n(22),u=(n(4),n(1)),s=n(17),c=n(21),f=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).history=Object(l.a)(t.props),t}return Object(o.a)(t,e),t.prototype.render=function(){return a.a.createElement(r.b,{history:this.history,children:this.props.children})},t}(a.a.Component);a.a.Component;var d=function(e,t){return"function"===typeof e?e(t):e},p=function(e,t){return"string"===typeof e?Object(l.c)(e,null,null,t):e},h=function(e){return e},v=a.a.forwardRef;"undefined"===typeof v&&(v=h);var m=v((function(e,t){var n=e.innerRef,r=e.navigate,o=e.onClick,i=Object(s.a)(e,["innerRef","navigate","onClick"]),l=i.target,c=Object(u.a)({},i,{onClick:function(e){try{o&&o(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||l&&"_self"!==l||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return c.ref=h!==v&&t||n,a.a.createElement("a",c)}));var y=v((function(e,t){var n=e.component,o=void 0===n?m:n,i=e.replace,l=e.to,f=e.innerRef,y=Object(s.a)(e,["component","replace","to","innerRef"]);return a.a.createElement(r.d.Consumer,null,(function(e){e||Object(c.a)(!1);var n=e.history,r=p(d(l,e.location),e.location),s=r?n.createHref(r):"",m=Object(u.a)({},y,{href:s,navigate:function(){var t=d(l,e.location);(i?n.replace:n.push)(t)}});return h!==v?m.ref=t||f:m.innerRef=f,a.a.createElement(o,m)}))})),b=function(e){return e},g=a.a.forwardRef;"undefined"===typeof g&&(g=b);g((function(e,t){var n=e["aria-current"],o=void 0===n?"page":n,i=e.activeClassName,l=void 0===i?"active":i,f=e.activeStyle,h=e.className,v=e.exact,m=e.isActive,w=e.location,x=e.sensitive,O=e.strict,k=e.style,S=e.to,E=e.innerRef,j=Object(s.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return a.a.createElement(r.d.Consumer,null,(function(e){e||Object(c.a)(!1);var n=w||e.location,i=p(d(S,n),n),s=i.pathname,C=s&&s.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),P=C?Object(r.e)(n.pathname,{path:C,exact:v,sensitive:x,strict:O}):null,_=!!(m?m(P,n):P),T=_?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(h,l):h,R=_?Object(u.a)({},k,{},f):k,M=Object(u.a)({"aria-current":_&&o||null,className:T,style:R,to:i},j);return b!==g?M.ref=t||E:M.innerRef=E,a.a.createElement(y,M)}))}))},function(e,t,n){"use strict";var r=n(18),o=n(3),i=n(272),a=n(23),l=n(1);function u(e,t,n){var o;return Object(l.a)({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(l.a)({paddingLeft:t(2),paddingRight:t(2)},n,Object(r.a)({},e.up("sm"),Object(l.a)({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(o={minHeight:56},Object(r.a)(o,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Object(r.a)(o,e.up("sm"),{minHeight:64}),o)},n)}var s=n(109),c={black:"#000",white:"#fff"},f={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},d={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"},p={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"},h={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"},v={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"},m={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"},y={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"},b=n(16),g={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:c.white,default:f[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},w={text:{primary:c.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:f[800],default:"#303030"},action:{active:c.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function x(e,t,n,r){var o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=Object(b.d)(e.main,o):"dark"===t&&(e.dark=Object(b.a)(e.main,i)))}function O(e){var t=e.primary,n=void 0===t?{light:d[300],main:d[500],dark:d[700]}:t,r=e.secondary,a=void 0===r?{light:p.A200,main:p.A400,dark:p.A700}:r,u=e.error,O=void 0===u?{light:h[300],main:h[500],dark:h[700]}:u,k=e.warning,S=void 0===k?{light:v[300],main:v[500],dark:v[700]}:k,E=e.info,j=void 0===E?{light:m[300],main:m[500],dark:m[700]}:E,C=e.success,P=void 0===C?{light:y[300],main:y[500],dark:y[700]}:C,_=e.type,T=void 0===_?"light":_,R=e.contrastThreshold,M=void 0===R?3:R,N=e.tonalOffset,A=void 0===N?.2:N,L=Object(o.a)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function I(e){return Object(b.c)(e,w.text.primary)>=M?w.text.primary:g.text.primary}var D=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=Object(l.a)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(Object(s.a)(4,t));if("string"!==typeof e.main)throw new Error(Object(s.a)(5,JSON.stringify(e.main)));return x(e,"light",n,A),x(e,"dark",r,A),e.contrastText||(e.contrastText=I(e.main)),e},z={dark:w,light:g};return Object(i.a)(Object(l.a)({common:c,type:T,primary:D(n),secondary:D(a,"A400","A200","A700"),error:D(O),warning:D(S),info:D(j),success:D(P),grey:f,contrastThreshold:M,getContrastText:I,augmentColor:D,tonalOffset:A},z[T]),L)}function k(e){return Math.round(1e5*e)/1e5}var S={textTransform:"uppercase"},E='"Roboto", "Helvetica", "Arial", sans-serif';function j(e,t){var n="function"===typeof t?t(e):t,r=n.fontFamily,a=void 0===r?E:r,u=n.fontSize,s=void 0===u?14:u,c=n.fontWeightLight,f=void 0===c?300:c,d=n.fontWeightRegular,p=void 0===d?400:d,h=n.fontWeightMedium,v=void 0===h?500:h,m=n.fontWeightBold,y=void 0===m?700:m,b=n.htmlFontSize,g=void 0===b?16:b,w=n.allVariants,x=n.pxToRem,O=Object(o.a)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var j=s/14,C=x||function(e){return"".concat(e/g*j,"rem")},P=function(e,t,n,r,o){return Object(l.a)({fontFamily:a,fontWeight:e,fontSize:C(t),lineHeight:n},a===E?{letterSpacing:"".concat(k(r/t),"em")}:{},o,w)},_={h1:P(f,96,1.167,-1.5),h2:P(f,60,1.2,-.5),h3:P(p,48,1.167,0),h4:P(p,34,1.235,.25),h5:P(p,24,1.334,0),h6:P(v,20,1.6,.15),subtitle1:P(p,16,1.75,.15),subtitle2:P(v,14,1.57,.1),body1:P(p,16,1.5,.15),body2:P(p,14,1.43,.15),button:P(v,14,1.75,.4,S),caption:P(p,12,1.66,.4),overline:P(p,12,2.66,1,S)};return Object(i.a)(Object(l.a)({htmlFontSize:g,pxToRem:C,round:k,fontFamily:a,fontSize:s,fontWeightLight:f,fontWeightRegular:p,fontWeightMedium:v,fontWeightBold:y},_),O,{clone:!1})}function C(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var P=["none",C(0,2,1,-1,0,1,1,0,0,1,3,0),C(0,3,1,-2,0,2,2,0,0,1,5,0),C(0,3,3,-2,0,3,4,0,0,1,8,0),C(0,2,4,-1,0,4,5,0,0,1,10,0),C(0,3,5,-1,0,5,8,0,0,1,14,0),C(0,3,5,-1,0,6,10,0,0,1,18,0),C(0,4,5,-2,0,7,10,1,0,2,16,1),C(0,5,5,-3,0,8,10,1,0,3,14,2),C(0,5,6,-3,0,9,12,1,0,3,16,2),C(0,6,6,-3,0,10,14,1,0,4,18,3),C(0,6,7,-4,0,11,15,1,0,4,20,3),C(0,7,8,-4,0,12,17,2,0,5,22,4),C(0,7,8,-4,0,13,19,2,0,5,24,4),C(0,7,9,-4,0,14,21,2,0,5,26,4),C(0,8,9,-5,0,15,22,2,0,6,28,5),C(0,8,10,-5,0,16,24,2,0,6,30,5),C(0,8,11,-5,0,17,26,2,0,6,32,5),C(0,9,11,-5,0,18,28,2,0,7,34,6),C(0,9,12,-6,0,19,29,2,0,7,36,6),C(0,10,13,-6,0,20,31,3,0,8,38,7),C(0,10,13,-6,0,21,33,3,0,8,40,7),C(0,10,14,-6,0,22,35,3,0,8,42,7),C(0,11,14,-7,0,23,36,3,0,9,44,8),C(0,11,15,-7,0,24,38,3,0,9,46,8)],_={borderRadius:4},T=n(30),R=(n(29),n(34));n(4);var M=function(e,t){return t?Object(i.a)(e,t,{clone:!1}):e},N={xs:0,sm:600,md:960,lg:1280,xl:1920},A={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(N[e],"px)")}};var L={m:"margin",p:"padding"},I={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},D={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},z=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){if(e.length>2){if(!D[e])return[e];e=D[e]}var t=e.split(""),n=Object(T.a)(t,2),r=n[0],o=n[1],i=L[r],a=I[o]||"";return Array.isArray(a)?a.map((function(e){return i+e})):[i+a]})),F=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function W(e){var t=e.spacing||8;return"number"===typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"===typeof t?t:function(){}}function $(e,t){return function(n){return e.reduce((function(e,r){return e[r]=function(e,t){if("string"===typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}(t,n),e}),{})}}function U(e){var t=W(e.theme);return Object.keys(e).map((function(n){if(-1===F.indexOf(n))return null;var r=$(z(n),t),o=e[n];return function(e,t,n){if(Array.isArray(t)){var r=e.theme.breakpoints||A;return t.reduce((function(e,o,i){return e[r.up(r.keys[i])]=n(t[i]),e}),{})}if("object"===Object(R.a)(t)){var o=e.theme.breakpoints||A;return Object.keys(t).reduce((function(e,r){return e[o.up(r)]=n(t[r]),e}),{})}return n(t)}(e,o,r)})).reduce(M,{})}U.propTypes={},U.filterProps=F;function B(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=W({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"===typeof e)return e;var n=t(e);return"number"===typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}var H=n(19),V=n(62);t.a=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,l=void 0===r?{}:r,s=e.palette,c=void 0===s?{}:s,f=e.spacing,d=e.typography,p=void 0===d?{}:d,h=Object(o.a)(e,["breakpoints","mixins","palette","spacing","typography"]),v=O(c),m=Object(a.a)(n),y=B(f),b=Object(i.a)({breakpoints:m,direction:"ltr",mixins:u(m,y,l),overrides:{},palette:v,props:{},shadows:P,typography:j(v,p),spacing:y,shape:_,transitions:H.a,zIndex:V.a},h),g=arguments.length,w=new Array(g>1?g-1:0),x=1;x<g;x++)w[x-1]=arguments[x];return b=w.reduce((function(e,t){return Object(i.a)(e,t)}),b)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=n.n(r),i=n(59);function a(){return o.a.useContext(i.a)}},function(e,t,n){"use strict";function r(e){for(var t="https://material-ui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}n.d(t,"a",(function(){return r}))},,,,function(e,t,n){"use strict";var r=n(67),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,l=60110,u=60112;t.Suspense=60113;var s=60115,c=60116;if("function"===typeof Symbol&&Symbol.for){var f=Symbol.for;o=f("react.element"),i=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),a=f("react.provider"),l=f("react.context"),u=f("react.forward_ref"),t.Suspense=f("react.suspense"),s=f("react.memo"),c=f("react.lazy")}var d="function"===typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function m(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=m.prototype;var g=b.prototype=new y;g.constructor=b,r(g,m.prototype),g.isPureReactComponent=!0;var w={current:null},x=Object.prototype.hasOwnProperty,O={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,n){var r,i={},a=null,l=null;if(null!=t)for(r in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(a=""+t.key),t)x.call(t,r)&&!O.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:e,key:a,ref:l,props:i,_owner:w.current}}function S(e){return"object"===typeof e&&null!==e&&e.$$typeof===o}var E=/\/+/g;function j(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function C(e,t,n,r,a){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var u=!1;if(null===e)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case i:u=!0}}if(u)return a=a(u=e),e=""===r?"."+j(u,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(E,"$&/")+"/"),C(a,t,n,"",(function(e){return e}))):null!=a&&(S(a)&&(a=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(E,"$&/")+"/")+e)),t.push(a)),1;if(u=0,r=""===r?".":r+":",Array.isArray(e))for(var s=0;s<e.length;s++){var c=r+j(l=e[s],s);u+=C(l,t,n,c,a)}else if("function"===typeof(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e)))for(e=c.call(e),s=0;!(l=e.next()).done;)u+=C(l=l.value,t,n,c=r+j(l,s++),a);else if("object"===l)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return u}function P(e,t,n){if(null==e)return e;var r=[],o=0;return C(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function _(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var T={current:null};function R(){var e=T.current;if(null===e)throw Error(p(321));return e}var M={ReactCurrentDispatcher:T,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:P,forEach:function(e,t,n){P(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return P(e,(function(){t++})),t},toArray:function(e){return P(e,(function(e){return e}))||[]},only:function(e){if(!S(e))throw Error(p(143));return e}},t.Component=m,t.PureComponent=b,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(p(267,e));var i=r({},e.props),a=e.key,l=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(l=t.ref,u=w.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)x.call(t,c)&&!O.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==s?s[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){s=Array(c);for(var f=0;f<c;f++)s[f]=arguments[f+2];i.children=s}return{$$typeof:o,type:e.type,key:a,ref:l,props:i,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:l,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=k,t.createFactory=function(e){var t=k.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:_}},t.memo=function(e,t){return{$$typeof:s,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return R().useCallback(e,t)},t.useContext=function(e,t){return R().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return R().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return R().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return R().useLayoutEffect(e,t)},t.useMemo=function(e,t){return R().useMemo(e,t)},t.useReducer=function(e,t,n){return R().useReducer(e,t,n)},t.useRef=function(e){return R().useRef(e)},t.useState=function(e){return R().useState(e)},t.version="17.0.1"},function(e,t,n){"use strict";var r=n(0),o=n(67),i=n(115);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var l=new Set,u={};function s(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(u[e]=t,e=0;e<t.length;e++)l.add(t[e])}var f=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,h={},v={};function m(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){y[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];y[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){y[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){y[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){y[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){y[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){y[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){y[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){y[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var b=/[\-:]([a-z])/g;function g(e){return e[1].toUpperCase()}function w(e,t,n,r){var o=y.hasOwnProperty(t)?y[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!p.call(v,e)||!p.call(h,e)&&(d.test(e)?v[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(b,g);y[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(b,g);y[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(b,g);y[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){y[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),y.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){y[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var x=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,O=60103,k=60106,S=60107,E=60108,j=60114,C=60109,P=60110,_=60112,T=60113,R=60120,M=60115,N=60116,A=60121,L=60128,I=60129,D=60130,z=60131;if("function"===typeof Symbol&&Symbol.for){var F=Symbol.for;O=F("react.element"),k=F("react.portal"),S=F("react.fragment"),E=F("react.strict_mode"),j=F("react.profiler"),C=F("react.provider"),P=F("react.context"),_=F("react.forward_ref"),T=F("react.suspense"),R=F("react.suspense_list"),M=F("react.memo"),N=F("react.lazy"),A=F("react.block"),F("react.scope"),L=F("react.opaque.id"),I=F("react.debug_trace_mode"),D=F("react.offscreen"),z=F("react.legacy_hidden")}var W,$="function"===typeof Symbol&&Symbol.iterator;function U(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=$&&e[$]||e["@@iterator"])?e:null}function B(e){if(void 0===W)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);W=t&&t[1]||""}return"\n"+W+e}var H=!1;function V(e,t){if(!e||H)return"";H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"===typeof u.stack){for(var o=u.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,l=i.length-1;1<=a&&0<=l&&o[a]!==i[l];)l--;for(;1<=a&&0<=l;a--,l--)if(o[a]!==i[l]){if(1!==a||1!==l)do{if(a--,0>--l||o[a]!==i[l])return"\n"+o[a].replace(" at new "," at ")}while(1<=a&&0<=l);break}}}finally{H=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?B(e):""}function q(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return e=V(e.type,!1);case 11:return e=V(e.type.render,!1);case 22:return e=V(e.type._render,!1);case 1:return e=V(e.type,!0);default:return""}}function K(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case S:return"Fragment";case k:return"Portal";case j:return"Profiler";case E:return"StrictMode";case T:return"Suspense";case R:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case P:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case _:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case M:return K(e.type);case A:return K(e._render);case N:t=e._payload,e=e._init;try{return K(e(t))}catch(n){}}return null}function X(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Y(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Q(e){e._valueTracker||(e._valueTracker=function(e){var t=Y(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function G(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Y(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function J(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=X(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=X(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,X(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&J(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ie(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+X(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function le(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ue(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:X(n)}}function se(e,t){var n=X(t.value),r=X(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml",de="http://www.w3.org/2000/svg";function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function he(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ve,me,ye=(me=function(e,t){if(e.namespaceURI!==de||"innerHTML"in e)e.innerHTML=t;else{for((ve=ve||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ve.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return me(e,t)}))}:me);function be(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ge={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},we=["Webkit","ms","Moz","O"];function xe(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||ge.hasOwnProperty(e)&&ge[e]?(""+t).trim():t+"px"}function Oe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=xe(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(ge).forEach((function(e){we.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ge[t]=ge[e]}))}));var ke=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Se(e,t){if(t){if(ke[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function Ee(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function je(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ce=null,Pe=null,_e=null;function Te(e){if(e=eo(e)){if("function"!==typeof Ce)throw Error(a(280));var t=e.stateNode;t&&(t=no(t),Ce(e.stateNode,e.type,t))}}function Re(e){Pe?_e?_e.push(e):_e=[e]:Pe=e}function Me(){if(Pe){var e=Pe,t=_e;if(_e=Pe=null,Te(e),t)for(e=0;e<t.length;e++)Te(t[e])}}function Ne(e,t){return e(t)}function Ae(e,t,n,r,o){return e(t,n,r,o)}function Le(){}var Ie=Ne,De=!1,ze=!1;function Fe(){null===Pe&&null===_e||(Le(),Me())}function We(e,t){var n=e.stateNode;if(null===n)return null;var r=no(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var $e=!1;if(f)try{var Ue={};Object.defineProperty(Ue,"passive",{get:function(){$e=!0}}),window.addEventListener("test",Ue,Ue),window.removeEventListener("test",Ue,Ue)}catch(me){$e=!1}function Be(e,t,n,r,o,i,a,l,u){var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(c){this.onError(c)}}var He=!1,Ve=null,qe=!1,Ke=null,Xe={onError:function(e){He=!0,Ve=e}};function Ye(e,t,n,r,o,i,a,l,u){He=!1,Ve=null,Be.apply(Xe,arguments)}function Qe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ge(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Je(e){if(Qe(e)!==e)throw Error(a(188))}function Ze(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Qe(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Je(o),e;if(i===r)return Je(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var l=!1,u=o.child;u;){if(u===n){l=!0,n=o,r=i;break}if(u===r){l=!0,r=o,n=i;break}u=u.sibling}if(!l){for(u=i.child;u;){if(u===n){l=!0,n=i,r=o;break}if(u===r){l=!0,r=i,n=o;break}u=u.sibling}if(!l)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,ot,it=!1,at=[],lt=null,ut=null,st=null,ct=new Map,ft=new Map,dt=[],pt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ht(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:o,targetContainers:[r]}}function vt(e,t){switch(e){case"focusin":case"focusout":lt=null;break;case"dragenter":case"dragleave":ut=null;break;case"mouseover":case"mouseout":st=null;break;case"pointerover":case"pointerout":ct.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ft.delete(t.pointerId)}}function mt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=ht(t,n,r,o,i),null!==t&&(null!==(t=eo(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function yt(e){var t=Zr(e.target);if(null!==t){var n=Qe(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ge(n)))return e.blockedOn=t,void ot(e.lanePriority,(function(){i.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function bt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=eo(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function gt(e,t,n){bt(e)&&n.delete(t)}function wt(){for(it=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=eo(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&at.shift()}null!==lt&&bt(lt)&&(lt=null),null!==ut&&bt(ut)&&(ut=null),null!==st&&bt(st)&&(st=null),ct.forEach(gt),ft.forEach(gt)}function xt(e,t){e.blockedOn===t&&(e.blockedOn=null,it||(it=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,wt)))}function Ot(e){function t(t){return xt(t,e)}if(0<at.length){xt(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==lt&&xt(lt,e),null!==ut&&xt(ut,e),null!==st&&xt(st,e),ct.forEach(t),ft.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)yt(n),null===n.blockedOn&&dt.shift()}function kt(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var St={animationend:kt("Animation","AnimationEnd"),animationiteration:kt("Animation","AnimationIteration"),animationstart:kt("Animation","AnimationStart"),transitionend:kt("Transition","TransitionEnd")},Et={},jt={};function Ct(e){if(Et[e])return Et[e];if(!St[e])return e;var t,n=St[e];for(t in n)if(n.hasOwnProperty(t)&&t in jt)return Et[e]=n[t];return e}f&&(jt=document.createElement("div").style,"AnimationEvent"in window||(delete St.animationend.animation,delete St.animationiteration.animation,delete St.animationstart.animation),"TransitionEvent"in window||delete St.transitionend.transition);var Pt=Ct("animationend"),_t=Ct("animationiteration"),Tt=Ct("animationstart"),Rt=Ct("transitionend"),Mt=new Map,Nt=new Map,At=["abort","abort",Pt,"animationEnd",_t,"animationIteration",Tt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Rt,"transitionEnd","waiting","waiting"];function Lt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];o="on"+(o[0].toUpperCase()+o.slice(1)),Nt.set(r,t),Mt.set(r,o),s(o,[r])}}(0,i.unstable_now)();var It=8;function Dt(e){if(0!==(1&e))return It=15,1;if(0!==(2&e))return It=14,2;if(0!==(4&e))return It=13,4;var t=24&e;return 0!==t?(It=12,t):0!==(32&e)?(It=11,32):0!==(t=192&e)?(It=10,t):0!==(256&e)?(It=9,256):0!==(t=3584&e)?(It=8,t):0!==(4096&e)?(It=7,4096):0!==(t=4186112&e)?(It=6,t):0!==(t=62914560&e)?(It=5,t):67108864&e?(It=4,67108864):0!==(134217728&e)?(It=3,134217728):0!==(t=805306368&e)?(It=2,t):0!==(1073741824&e)?(It=1,1073741824):(It=8,e)}function zt(e,t){var n=e.pendingLanes;if(0===n)return It=0;var r=0,o=0,i=e.expiredLanes,a=e.suspendedLanes,l=e.pingedLanes;if(0!==i)r=i,o=It=15;else if(0!==(i=134217727&n)){var u=i&~a;0!==u?(r=Dt(u),o=It):0!==(l&=i)&&(r=Dt(l),o=It)}else 0!==(i=n&~a)?(r=Dt(i),o=It):0!==l&&(r=Dt(l),o=It);if(0===r)return 0;if(r=n&((0>(r=31-Ht(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&a)){if(Dt(t),o<=It)return t;It=o}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-Ht(t)),r|=e[n],t&=~o;return r}function Ft(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Wt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=$t(24&~t))?Wt(10,t):e;case 10:return 0===(e=$t(192&~t))?Wt(8,t):e;case 8:return 0===(e=$t(3584&~t))&&(0===(e=$t(4186112&~t))&&(e=512)),e;case 2:return 0===(t=$t(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function $t(e){return e&-e}function Ut(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Bt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Ht(t)]=n}var Ht=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Vt(e)/qt|0)|0},Vt=Math.log,qt=Math.LN2;var Kt=i.unstable_UserBlockingPriority,Xt=i.unstable_runWithPriority,Yt=!0;function Qt(e,t,n,r){De||Le();var o=Jt,i=De;De=!0;try{Ae(o,e,t,n,r)}finally{(De=i)||Fe()}}function Gt(e,t,n,r){Xt(Kt,Jt.bind(null,e,t,n,r))}function Jt(e,t,n,r){var o;if(Yt)if((o=0===(4&t))&&0<at.length&&-1<pt.indexOf(e))e=ht(null,e,t,n,r),at.push(e);else{var i=Zt(e,t,n,r);if(null===i)o&&vt(e,r);else{if(o){if(-1<pt.indexOf(e))return e=ht(i,e,t,n,r),void at.push(e);if(function(e,t,n,r,o){switch(t){case"focusin":return lt=mt(lt,e,t,n,r,o),!0;case"dragenter":return ut=mt(ut,e,t,n,r,o),!0;case"mouseover":return st=mt(st,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return ct.set(i,mt(ct.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,ft.set(i,mt(ft.get(i)||null,e,t,n,r,o)),!0}return!1}(i,e,t,n,r))return;vt(e,r)}Mr(e,t,r,null,n)}}}function Zt(e,t,n,r){var o=je(r);if(null!==(o=Zr(o))){var i=Qe(o);if(null===i)o=null;else{var a=i.tag;if(13===a){if(null!==(o=Ge(i)))return o;o=null}else if(3===a){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;o=null}else i!==o&&(o=null)}}return Mr(e,t,r,o,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,o="value"in en?en.value:en.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return nn=o.slice(e,1<t?1-t:void 0)}function on(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function ln(){return!1}function un(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?an:ln,this.isPropagationStopped=ln,this}return o(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var sn,cn,fn,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=un(dn),hn=o({},dn,{view:0,detail:0}),vn=un(hn),mn=o({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fn&&(fn&&"mousemove"===e.type?(sn=e.screenX-fn.screenX,cn=e.screenY-fn.screenY):cn=sn=0,fn=e),sn)},movementY:function(e){return"movementY"in e?e.movementY:cn}}),yn=un(mn),bn=un(o({},mn,{dataTransfer:0})),gn=un(o({},hn,{relatedTarget:0})),wn=un(o({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),xn=un(o({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),On=un(o({},dn,{data:0})),kn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},En={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=En[e])&&!!t[e]}function Cn(){return jn}var Pn=un(o({},hn,{key:function(e){if(e.key){var t=kn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=on(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cn,charCode:function(e){return"keypress"===e.type?on(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?on(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),_n=un(o({},mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tn=un(o({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cn})),Rn=un(o({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Mn=un(o({},mn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Nn=[9,13,27,32],An=f&&"CompositionEvent"in window,Ln=null;f&&"documentMode"in document&&(Ln=document.documentMode);var In=f&&"TextEvent"in window&&!Ln,Dn=f&&(!An||Ln&&8<Ln&&11>=Ln),zn=String.fromCharCode(32),Fn=!1;function Wn(e,t){switch(e){case"keyup":return-1!==Nn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $n(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1;var Bn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Bn[e.type]:"textarea"===t}function Vn(e,t,n,r){Re(r),0<(t=Ar(t,"onChange")).length&&(n=new pn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qn=null,Kn=null;function Xn(e){jr(e,0)}function Yn(e){if(G(to(e)))return e}function Qn(e,t){if("change"===e)return t}var Gn=!1;if(f){var Jn;if(f){var Zn="oninput"in document;if(!Zn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Zn="function"===typeof er.oninput}Jn=Zn}else Jn=!1;Gn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){qn&&(qn.detachEvent("onpropertychange",nr),Kn=qn=null)}function nr(e){if("value"===e.propertyName&&Yn(Kn)){var t=[];if(Vn(t,Kn,e,je(e)),e=Xn,De)e(t);else{De=!0;try{Ne(e,t)}finally{De=!1,Fe()}}}}function rr(e,t,n){"focusin"===e?(tr(),Kn=n,(qn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Yn(Kn)}function ir(e,t){if("click"===e)return Yn(t)}function ar(e,t){if("input"===e||"change"===e)return Yn(t)}var lr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},ur=Object.prototype.hasOwnProperty;function sr(e,t){if(lr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!ur.call(t,n[r])||!lr(e[n[r]],t[n[r]]))return!1;return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fr(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function pr(){for(var e=window,t=J();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=J((e=t.contentWindow).document)}return t}function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var vr=f&&"documentMode"in document&&11>=document.documentMode,mr=null,yr=null,br=null,gr=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;gr||null==mr||mr!==J(r)||("selectionStart"in(r=mr)&&hr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},br&&sr(br,r)||(br=r,0<(r=Ar(yr,"onSelect")).length&&(t=new pn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}Lt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Lt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Lt(At,2);for(var xr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Or=0;Or<xr.length;Or++)Nt.set(xr[Or],0);c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Sr=new Set("cancel close invalid load scroll toggle".split(" ").concat(kr));function Er(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,l,u,s){if(Ye.apply(this,arguments),He){if(!He)throw Error(a(198));var c=Ve;He=!1,Ve=null,qe||(qe=!0,Ke=c)}}(r,t,void 0,e),e.currentTarget=null}function jr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var l=r[a],u=l.instance,s=l.currentTarget;if(l=l.listener,u!==i&&o.isPropagationStopped())break e;Er(o,l,s),i=u}else for(a=0;a<r.length;a++){if(u=(l=r[a]).instance,s=l.currentTarget,l=l.listener,u!==i&&o.isPropagationStopped())break e;Er(o,l,s),i=u}}}if(qe)throw e=Ke,qe=!1,Ke=null,e}function Cr(e,t){var n=ro(t),r=e+"__bubble";n.has(r)||(Rr(t,e,2,!1),n.add(r))}var Pr="_reactListening"+Math.random().toString(36).slice(2);function _r(e){e[Pr]||(e[Pr]=!0,l.forEach((function(t){Sr.has(t)||Tr(t,!1,e,null),Tr(t,!0,e,null)})))}function Tr(e,t,n,r){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,i=n;if("selectionchange"===e&&9!==n.nodeType&&(i=n.ownerDocument),null!==r&&!t&&Sr.has(e)){if("scroll"!==e)return;o|=2,i=r}var a=ro(i),l=e+"__"+(t?"capture":"bubble");a.has(l)||(t&&(o|=4),Rr(i,e,o,t),a.add(l))}function Rr(e,t,n,r){var o=Nt.get(t);switch(void 0===o?2:o){case 0:o=Qt;break;case 1:o=Gt;break;default:o=Jt}n=o.bind(null,t,n,e),o=void 0,!$e||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Mr(e,t,n,r,o){var i=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var l=r.stateNode.containerInfo;if(l===o||8===l.nodeType&&l.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var u=a.tag;if((3===u||4===u)&&((u=a.stateNode.containerInfo)===o||8===u.nodeType&&u.parentNode===o))return;a=a.return}for(;null!==l;){if(null===(a=Zr(l)))return;if(5===(u=a.tag)||6===u){r=i=a;continue e}l=l.parentNode}}r=r.return}!function(e,t,n){if(ze)return e(t,n);ze=!0;try{Ie(e,t,n)}finally{ze=!1,Fe()}}((function(){var r=i,o=je(n),a=[];e:{var l=Mt.get(e);if(void 0!==l){var u=pn,s=e;switch(e){case"keypress":if(0===on(n))break e;case"keydown":case"keyup":u=Pn;break;case"focusin":s="focus",u=gn;break;case"focusout":s="blur",u=gn;break;case"beforeblur":case"afterblur":u=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=yn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=bn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Tn;break;case Pt:case _t:case Tt:u=wn;break;case Rt:u=Rn;break;case"scroll":u=vn;break;case"wheel":u=Mn;break;case"copy":case"cut":case"paste":u=xn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=_n}var c=0!==(4&t),f=!c&&"scroll"===e,d=c?null!==l?l+"Capture":null:l;c=[];for(var p,h=r;null!==h;){var v=(p=h).stateNode;if(5===p.tag&&null!==v&&(p=v,null!==d&&(null!=(v=We(h,d))&&c.push(Nr(h,v,p)))),f)break;h=h.return}0<c.length&&(l=new u(l,s,null,n,o),a.push({event:l,listeners:c}))}}if(0===(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(s=n.relatedTarget||n.fromElement)||!Zr(s)&&!s[Gr])&&(u||l)&&(l=o.window===o?o:(l=o.ownerDocument)?l.defaultView||l.parentWindow:window,u?(u=r,null!==(s=(s=n.relatedTarget||n.toElement)?Zr(s):null)&&(s!==(f=Qe(s))||5!==s.tag&&6!==s.tag)&&(s=null)):(u=null,s=r),u!==s)){if(c=yn,v="onMouseLeave",d="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=_n,v="onPointerLeave",d="onPointerEnter",h="pointer"),f=null==u?l:to(u),p=null==s?l:to(s),(l=new c(v,h+"leave",u,n,o)).target=f,l.relatedTarget=p,v=null,Zr(o)===r&&((c=new c(d,h+"enter",s,n,o)).target=p,c.relatedTarget=f,v=c),f=v,u&&s)e:{for(d=s,h=0,p=c=u;p;p=Lr(p))h++;for(p=0,v=d;v;v=Lr(v))p++;for(;0<h-p;)c=Lr(c),h--;for(;0<p-h;)d=Lr(d),p--;for(;h--;){if(c===d||null!==d&&c===d.alternate)break e;c=Lr(c),d=Lr(d)}c=null}else c=null;null!==u&&Ir(a,l,u,c,!1),null!==s&&null!==f&&Ir(a,f,s,c,!0)}if("select"===(u=(l=r?to(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===u&&"file"===l.type)var m=Qn;else if(Hn(l))if(Gn)m=ar;else{m=or;var y=rr}else(u=l.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(m=ir);switch(m&&(m=m(e,r))?Vn(a,m,n,o):(y&&y(e,l,r),"focusout"===e&&(y=l._wrapperState)&&y.controlled&&"number"===l.type&&oe(l,"number",l.value)),y=r?to(r):window,e){case"focusin":(Hn(y)||"true"===y.contentEditable)&&(mr=y,yr=r,br=null);break;case"focusout":br=yr=mr=null;break;case"mousedown":gr=!0;break;case"contextmenu":case"mouseup":case"dragend":gr=!1,wr(a,n,o);break;case"selectionchange":if(vr)break;case"keydown":case"keyup":wr(a,n,o)}var b;if(An)e:{switch(e){case"compositionstart":var g="onCompositionStart";break e;case"compositionend":g="onCompositionEnd";break e;case"compositionupdate":g="onCompositionUpdate";break e}g=void 0}else Un?Wn(e,n)&&(g="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(g="onCompositionStart");g&&(Dn&&"ko"!==n.locale&&(Un||"onCompositionStart"!==g?"onCompositionEnd"===g&&Un&&(b=rn()):(tn="value"in(en=o)?en.value:en.textContent,Un=!0)),0<(y=Ar(r,g)).length&&(g=new On(g,e,null,n,o),a.push({event:g,listeners:y}),b?g.data=b:null!==(b=$n(n))&&(g.data=b))),(b=In?function(e,t){switch(e){case"compositionend":return $n(t);case"keypress":return 32!==t.which?null:(Fn=!0,zn);case"textInput":return(e=t.data)===zn&&Fn?null:e;default:return null}}(e,n):function(e,t){if(Un)return"compositionend"===e||!An&&Wn(e,t)?(e=rn(),nn=tn=en=null,Un=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dn&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))&&(0<(r=Ar(r,"onBeforeInput")).length&&(o=new On("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=b))}jr(a,t)}))}function Nr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ar(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=We(e,n))&&r.unshift(Nr(e,i,o)),null!=(i=We(e,t))&&r.push(Nr(e,i,o))),e=e.return}return r}function Lr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Ir(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var l=n,u=l.alternate,s=l.stateNode;if(null!==u&&u===r)break;5===l.tag&&null!==s&&(l=s,o?null!=(u=We(n,i))&&a.unshift(Nr(n,u,l)):o||null!=(u=We(n,i))&&a.push(Nr(n,u,l))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function Dr(){}var zr=null,Fr=null;function Wr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function $r(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Ur="function"===typeof setTimeout?setTimeout:void 0,Br="function"===typeof clearTimeout?clearTimeout:void 0;function Hr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Vr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function qr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Kr=0;var Xr=Math.random().toString(36).slice(2),Yr="__reactFiber$"+Xr,Qr="__reactProps$"+Xr,Gr="__reactContainer$"+Xr,Jr="__reactEvents$"+Xr;function Zr(e){var t=e[Yr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Gr]||n[Yr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=qr(e);null!==e;){if(n=e[Yr])return n;e=qr(e)}return t}n=(e=n).parentNode}return null}function eo(e){return!(e=e[Yr]||e[Gr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function to(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function no(e){return e[Qr]||null}function ro(e){var t=e[Jr];return void 0===t&&(t=e[Jr]=new Set),t}var oo=[],io=-1;function ao(e){return{current:e}}function lo(e){0>io||(e.current=oo[io],oo[io]=null,io--)}function uo(e,t){io++,oo[io]=e.current,e.current=t}var so={},co=ao(so),fo=ao(!1),po=so;function ho(e,t){var n=e.type.contextTypes;if(!n)return so;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function vo(e){return null!==(e=e.childContextTypes)&&void 0!==e}function mo(){lo(fo),lo(co)}function yo(e,t,n){if(co.current!==so)throw Error(a(168));uo(co,t),uo(fo,n)}function bo(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,K(t)||"Unknown",i));return o({},n,r)}function go(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||so,po=co.current,uo(co,e),uo(fo,fo.current),!0}function wo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=bo(e,t,po),r.__reactInternalMemoizedMergedChildContext=e,lo(fo),lo(co),uo(co,e)):lo(fo),uo(fo,n)}var xo=null,Oo=null,ko=i.unstable_runWithPriority,So=i.unstable_scheduleCallback,Eo=i.unstable_cancelCallback,jo=i.unstable_shouldYield,Co=i.unstable_requestPaint,Po=i.unstable_now,_o=i.unstable_getCurrentPriorityLevel,To=i.unstable_ImmediatePriority,Ro=i.unstable_UserBlockingPriority,Mo=i.unstable_NormalPriority,No=i.unstable_LowPriority,Ao=i.unstable_IdlePriority,Lo={},Io=void 0!==Co?Co:function(){},Do=null,zo=null,Fo=!1,Wo=Po(),$o=1e4>Wo?Po:function(){return Po()-Wo};function Uo(){switch(_o()){case To:return 99;case Ro:return 98;case Mo:return 97;case No:return 96;case Ao:return 95;default:throw Error(a(332))}}function Bo(e){switch(e){case 99:return To;case 98:return Ro;case 97:return Mo;case 96:return No;case 95:return Ao;default:throw Error(a(332))}}function Ho(e,t){return e=Bo(e),ko(e,t)}function Vo(e,t,n){return e=Bo(e),So(e,t,n)}function qo(){if(null!==zo){var e=zo;zo=null,Eo(e)}Ko()}function Ko(){if(!Fo&&null!==Do){Fo=!0;var e=0;try{var t=Do;Ho(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Do=null}catch(n){throw null!==Do&&(Do=Do.slice(e+1)),So(To,qo),n}finally{Fo=!1}}}var Xo=x.ReactCurrentBatchConfig;function Yo(e,t){if(e&&e.defaultProps){for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Qo=ao(null),Go=null,Jo=null,Zo=null;function ei(){Zo=Jo=Go=null}function ti(e){var t=Qo.current;lo(Qo),e.type._context._currentValue=t}function ni(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function ri(e,t){Go=e,Zo=Jo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Aa=!0),e.firstContext=null)}function oi(e,t){if(Zo!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(Zo=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Jo){if(null===Go)throw Error(a(308));Jo=t,Go.dependencies={lanes:0,firstContext:t,responders:null}}else Jo=Jo.next=t;return e._currentValue}var ii=!1;function ai(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function li(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ui(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function si(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function ci(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function fi(e,t,n,r){var i=e.updateQueue;ii=!1;var a=i.firstBaseUpdate,l=i.lastBaseUpdate,u=i.shared.pending;if(null!==u){i.shared.pending=null;var s=u,c=s.next;s.next=null,null===l?a=c:l.next=c,l=s;var f=e.alternate;if(null!==f){var d=(f=f.updateQueue).lastBaseUpdate;d!==l&&(null===d?f.firstBaseUpdate=c:d.next=c,f.lastBaseUpdate=s)}}if(null!==a){for(d=i.baseState,l=0,f=c=s=null;;){u=a.lane;var p=a.eventTime;if((r&u)===u){null!==f&&(f=f.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,v=a;switch(u=t,p=n,v.tag){case 1:if("function"===typeof(h=v.payload)){d=h.call(p,d,u);break e}d=h;break e;case 3:h.flags=-4097&h.flags|64;case 0:if(null===(u="function"===typeof(h=v.payload)?h.call(p,d,u):h)||void 0===u)break e;d=o({},d,u);break e;case 2:ii=!0}}null!==a.callback&&(e.flags|=32,null===(u=i.effects)?i.effects=[a]:u.push(a))}else p={eventTime:p,lane:u,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===f?(c=f=p,s=d):f=f.next=p,l|=u;if(null===(a=a.next)){if(null===(u=i.shared.pending))break;a=u.next,u.next=null,i.lastBaseUpdate=u,i.shared.pending=null}}null===f&&(s=d),i.baseState=s,i.firstBaseUpdate=c,i.lastBaseUpdate=f,zl|=l,e.lanes=l,e.memoizedState=d}}function di(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!==typeof o)throw Error(a(191,o));o.call(r)}}}var pi=(new r.Component).refs;function hi(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:o({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var vi={isMounted:function(e){return!!(e=e._reactInternals)&&Qe(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=su(),o=cu(e),i=ui(r,o);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),si(e,i),fu(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=su(),o=cu(e),i=ui(r,o);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),si(e,i),fu(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=su(),r=cu(e),o=ui(n,r);o.tag=2,void 0!==t&&null!==t&&(o.callback=t),si(e,o),fu(e,r,n)}};function mi(e,t,n,r,o,i,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!sr(n,r)||!sr(o,i))}function yi(e,t,n){var r=!1,o=so,i=t.contextType;return"object"===typeof i&&null!==i?i=oi(i):(o=vo(t)?po:co.current,i=(r=null!==(r=t.contextTypes)&&void 0!==r)?ho(e,o):so),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=vi,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function bi(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&vi.enqueueReplaceState(t,t.state,null)}function gi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=pi,ai(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=oi(i):(i=vo(t)?po:co.current,o.context=ho(e,i)),fi(e,n,o,r),o.state=e.memoizedState,"function"===typeof(i=t.getDerivedStateFromProps)&&(hi(e,t,i,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&vi.enqueueReplaceState(o,o.state,null),fi(e,n,o,r),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.flags|=4)}var wi=Array.isArray;function xi(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:((t=function(e){var t=r.refs;t===pi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e})._stringRef=o,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Oi(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function ki(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Bu(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function l(t){return e&&null===t.alternate&&(t.flags=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Ku(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function s(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=xi(e,t,n),r.return=e,r):((r=Hu(n.type,n.key,n.props,null,e.mode,r)).ref=xi(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Xu(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Vu(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Ku(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case O:return(n=Hu(t.type,t.key,t.props,null,e.mode,n)).ref=xi(e,null,t),n.return=e,n;case k:return(t=Xu(t,e.mode,n)).return=e,t}if(wi(t)||U(t))return(t=Vu(t,e.mode,n,null)).return=e,t;Oi(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==o?null:u(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case O:return n.key===o?n.type===S?f(e,t,n.props.children,r,o):s(e,t,n,r):null;case k:return n.key===o?c(e,t,n,r):null}if(wi(n)||U(n))return null!==o?null:f(e,t,n,r,null);Oi(e,n)}return null}function h(e,t,n,r,o){if("string"===typeof r||"number"===typeof r)return u(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case O:return e=e.get(null===r.key?n:r.key)||null,r.type===S?f(t,e,r.props.children,o,r.key):s(t,e,r,o);case k:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(wi(r)||U(r))return f(t,e=e.get(n)||null,r,o,null);Oi(t,r)}return null}function v(o,a,l,u){for(var s=null,c=null,f=a,v=a=0,m=null;null!==f&&v<l.length;v++){f.index>v?(m=f,f=null):m=f.sibling;var y=p(o,f,l[v],u);if(null===y){null===f&&(f=m);break}e&&f&&null===y.alternate&&t(o,f),a=i(y,a,v),null===c?s=y:c.sibling=y,c=y,f=m}if(v===l.length)return n(o,f),s;if(null===f){for(;v<l.length;v++)null!==(f=d(o,l[v],u))&&(a=i(f,a,v),null===c?s=f:c.sibling=f,c=f);return s}for(f=r(o,f);v<l.length;v++)null!==(m=h(f,o,v,l[v],u))&&(e&&null!==m.alternate&&f.delete(null===m.key?v:m.key),a=i(m,a,v),null===c?s=m:c.sibling=m,c=m);return e&&f.forEach((function(e){return t(o,e)})),s}function m(o,l,u,s){var c=U(u);if("function"!==typeof c)throw Error(a(150));if(null==(u=c.call(u)))throw Error(a(151));for(var f=c=null,v=l,m=l=0,y=null,b=u.next();null!==v&&!b.done;m++,b=u.next()){v.index>m?(y=v,v=null):y=v.sibling;var g=p(o,v,b.value,s);if(null===g){null===v&&(v=y);break}e&&v&&null===g.alternate&&t(o,v),l=i(g,l,m),null===f?c=g:f.sibling=g,f=g,v=y}if(b.done)return n(o,v),c;if(null===v){for(;!b.done;m++,b=u.next())null!==(b=d(o,b.value,s))&&(l=i(b,l,m),null===f?c=b:f.sibling=b,f=b);return c}for(v=r(o,v);!b.done;m++,b=u.next())null!==(b=h(v,o,m,b.value,s))&&(e&&null!==b.alternate&&v.delete(null===b.key?m:b.key),l=i(b,l,m),null===f?c=b:f.sibling=b,f=b);return e&&v.forEach((function(e){return t(o,e)})),c}return function(e,r,i,u){var s="object"===typeof i&&null!==i&&i.type===S&&null===i.key;s&&(i=i.props.children);var c="object"===typeof i&&null!==i;if(c)switch(i.$$typeof){case O:e:{for(c=i.key,s=r;null!==s;){if(s.key===c){switch(s.tag){case 7:if(i.type===S){n(e,s.sibling),(r=o(s,i.props.children)).return=e,e=r;break e}break;default:if(s.elementType===i.type){n(e,s.sibling),(r=o(s,i.props)).ref=xi(e,s,i),r.return=e,e=r;break e}}n(e,s);break}t(e,s),s=s.sibling}i.type===S?((r=Vu(i.props.children,e.mode,u,i.key)).return=e,e=r):((u=Hu(i.type,i.key,i.props,null,e.mode,u)).ref=xi(e,r,i),u.return=e,e=u)}return l(e);case k:e:{for(s=i.key;null!==r;){if(r.key===s){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Xu(i,e.mode,u)).return=e,e=r}return l(e)}if("string"===typeof i||"number"===typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Ku(i,e.mode,u)).return=e,e=r),l(e);if(wi(i))return v(e,r,i,u);if(U(i))return m(e,r,i,u);if(c&&Oi(e,i),"undefined"===typeof i&&!s)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,K(e.type)||"Component"))}return n(e,r)}}var Si=ki(!0),Ei=ki(!1),ji={},Ci=ao(ji),Pi=ao(ji),_i=ao(ji);function Ti(e){if(e===ji)throw Error(a(174));return e}function Ri(e,t){switch(uo(_i,t),uo(Pi,e),uo(Ci,ji),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:he(null,"");break;default:t=he(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}lo(Ci),uo(Ci,t)}function Mi(){lo(Ci),lo(Pi),lo(_i)}function Ni(e){Ti(_i.current);var t=Ti(Ci.current),n=he(t,e.type);t!==n&&(uo(Pi,e),uo(Ci,n))}function Ai(e){Pi.current===e&&(lo(Ci),lo(Pi))}var Li=ao(0);function Ii(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Di=null,zi=null,Fi=!1;function Wi(e,t){var n=$u(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function $i(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Ui(e){if(Fi){var t=zi;if(t){var n=t;if(!$i(e,t)){if(!(t=Vr(n.nextSibling))||!$i(e,t))return e.flags=-1025&e.flags|2,Fi=!1,void(Di=e);Wi(Di,n)}Di=e,zi=Vr(t.firstChild)}else e.flags=-1025&e.flags|2,Fi=!1,Di=e}}function Bi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Di=e}function Hi(e){if(e!==Di)return!1;if(!Fi)return Bi(e),Fi=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!$r(t,e.memoizedProps))for(t=zi;t;)Wi(e,t),t=Vr(t.nextSibling);if(Bi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){zi=Vr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}zi=null}}else zi=Di?Vr(e.stateNode.nextSibling):null;return!0}function Vi(){zi=Di=null,Fi=!1}var qi=[];function Ki(){for(var e=0;e<qi.length;e++)qi[e]._workInProgressVersionPrimary=null;qi.length=0}var Xi=x.ReactCurrentDispatcher,Yi=x.ReactCurrentBatchConfig,Qi=0,Gi=null,Ji=null,Zi=null,ea=!1,ta=!1;function na(){throw Error(a(321))}function ra(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lr(e[n],t[n]))return!1;return!0}function oa(e,t,n,r,o,i){if(Qi=i,Gi=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Xi.current=null===e||null===e.memoizedState?Ta:Ra,e=n(r,o),ta){i=0;do{if(ta=!1,!(25>i))throw Error(a(301));i+=1,Zi=Ji=null,t.updateQueue=null,Xi.current=Ma,e=n(r,o)}while(ta)}if(Xi.current=_a,t=null!==Ji&&null!==Ji.next,Qi=0,Zi=Ji=Gi=null,ea=!1,t)throw Error(a(300));return e}function ia(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Zi?Gi.memoizedState=Zi=e:Zi=Zi.next=e,Zi}function aa(){if(null===Ji){var e=Gi.alternate;e=null!==e?e.memoizedState:null}else e=Ji.next;var t=null===Zi?Gi.memoizedState:Zi.next;if(null!==t)Zi=t,Ji=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Ji=e).memoizedState,baseState:Ji.baseState,baseQueue:Ji.baseQueue,queue:Ji.queue,next:null},null===Zi?Gi.memoizedState=Zi=e:Zi=Zi.next=e}return Zi}function la(e,t){return"function"===typeof t?t(e):t}function ua(e){var t=aa(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Ji,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var l=o.next;o.next=i.next,i.next=l}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var u=l=i=null,s=o;do{var c=s.lane;if((Qi&c)===c)null!==u&&(u=u.next={lane:0,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null}),r=s.eagerReducer===e?s.eagerState:e(r,s.action);else{var f={lane:c,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null};null===u?(l=u=f,i=r):u=u.next=f,Gi.lanes|=c,zl|=c}s=s.next}while(null!==s&&s!==o);null===u?i=r:u.next=l,lr(r,t.memoizedState)||(Aa=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function sa(e){var t=aa(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var l=o=o.next;do{i=e(i,l.action),l=l.next}while(l!==o);lr(i,t.memoizedState)||(Aa=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ca(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(null!==o?e=o===r:(e=e.mutableReadLanes,(e=(Qi&e)===e)&&(t._workInProgressVersionPrimary=r,qi.push(t))),e)return n(t._source);throw qi.push(t),Error(a(350))}function fa(e,t,n,r){var o=Tl;if(null===o)throw Error(a(349));var i=t._getVersion,l=i(t._source),u=Xi.current,s=u.useState((function(){return ca(o,t,n)})),c=s[1],f=s[0];s=Zi;var d=e.memoizedState,p=d.refs,h=p.getSnapshot,v=d.source;d=d.subscribe;var m=Gi;return e.memoizedState={refs:p,source:t,subscribe:r},u.useEffect((function(){p.getSnapshot=n,p.setSnapshot=c;var e=i(t._source);if(!lr(l,e)){e=n(t._source),lr(f,e)||(c(e),e=cu(m),o.mutableReadLanes|=e&o.pendingLanes),e=o.mutableReadLanes,o.entangledLanes|=e;for(var r=o.entanglements,a=e;0<a;){var u=31-Ht(a),s=1<<u;r[u]|=e,a&=~s}}}),[n,t,r]),u.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=cu(m);o.mutableReadLanes|=r&o.pendingLanes}catch(i){n((function(){throw i}))}}))}),[t,r]),lr(h,n)&&lr(v,t)&&lr(d,r)||((e={pending:null,dispatch:null,lastRenderedReducer:la,lastRenderedState:f}).dispatch=c=Pa.bind(null,Gi,e),s.queue=e,s.baseQueue=null,f=ca(o,t,n),s.memoizedState=s.baseState=f),f}function da(e,t,n){return fa(aa(),e,t,n)}function pa(e){var t=ia();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:la,lastRenderedState:e}).dispatch=Pa.bind(null,Gi,e),[t.memoizedState,e]}function ha(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Gi.updateQueue)?(t={lastEffect:null},Gi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function va(e){return e={current:e},ia().memoizedState=e}function ma(){return aa().memoizedState}function ya(e,t,n,r){var o=ia();Gi.flags|=e,o.memoizedState=ha(1|t,n,void 0,void 0===r?null:r)}function ba(e,t,n,r){var o=aa();r=void 0===r?null:r;var i=void 0;if(null!==Ji){var a=Ji.memoizedState;if(i=a.destroy,null!==r&&ra(r,a.deps))return void ha(t,n,i,r)}Gi.flags|=e,o.memoizedState=ha(1|t,n,i,r)}function ga(e,t){return ya(516,4,e,t)}function wa(e,t){return ba(516,4,e,t)}function xa(e,t){return ba(4,2,e,t)}function Oa(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ka(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ba(4,2,Oa.bind(null,t,e),n)}function Sa(){}function Ea(e,t){var n=aa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ra(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ja(e,t){var n=aa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ra(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ca(e,t){var n=Uo();Ho(98>n?98:n,(function(){e(!0)})),Ho(97<n?97:n,(function(){var n=Yi.transition;Yi.transition=1;try{e(!1),t()}finally{Yi.transition=n}}))}function Pa(e,t,n){var r=su(),o=cu(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?i.next=i:(i.next=a.next,a.next=i),t.pending=i,a=e.alternate,e===Gi||null!==a&&a===Gi)ta=ea=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var l=t.lastRenderedState,u=a(l,n);if(i.eagerReducer=a,i.eagerState=u,lr(u,l))return}catch(s){}fu(e,o,r)}}var _a={readContext:oi,useCallback:na,useContext:na,useEffect:na,useImperativeHandle:na,useLayoutEffect:na,useMemo:na,useReducer:na,useRef:na,useState:na,useDebugValue:na,useDeferredValue:na,useTransition:na,useMutableSource:na,useOpaqueIdentifier:na,unstable_isNewReconciler:!1},Ta={readContext:oi,useCallback:function(e,t){return ia().memoizedState=[e,void 0===t?null:t],e},useContext:oi,useEffect:ga,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ya(4,2,Oa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ya(4,2,e,t)},useMemo:function(e,t){var n=ia();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ia();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Pa.bind(null,Gi,e),[r.memoizedState,e]},useRef:va,useState:pa,useDebugValue:Sa,useDeferredValue:function(e){var t=pa(e),n=t[0],r=t[1];return ga((function(){var t=Yi.transition;Yi.transition=1;try{r(e)}finally{Yi.transition=t}}),[e]),n},useTransition:function(){var e=pa(!1),t=e[0];return va(e=Ca.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=ia();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},fa(r,e,t,n)},useOpaqueIdentifier:function(){if(Fi){var e=!1,t=function(e){return{$$typeof:L,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Kr++).toString(36))),Error(a(355))})),n=pa(t)[1];return 0===(2&Gi.mode)&&(Gi.flags|=516,ha(5,(function(){n("r:"+(Kr++).toString(36))}),void 0,null)),t}return pa(t="r:"+(Kr++).toString(36)),t},unstable_isNewReconciler:!1},Ra={readContext:oi,useCallback:Ea,useContext:oi,useEffect:wa,useImperativeHandle:ka,useLayoutEffect:xa,useMemo:ja,useReducer:ua,useRef:ma,useState:function(){return ua(la)},useDebugValue:Sa,useDeferredValue:function(e){var t=ua(la),n=t[0],r=t[1];return wa((function(){var t=Yi.transition;Yi.transition=1;try{r(e)}finally{Yi.transition=t}}),[e]),n},useTransition:function(){var e=ua(la)[0];return[ma().current,e]},useMutableSource:da,useOpaqueIdentifier:function(){return ua(la)[0]},unstable_isNewReconciler:!1},Ma={readContext:oi,useCallback:Ea,useContext:oi,useEffect:wa,useImperativeHandle:ka,useLayoutEffect:xa,useMemo:ja,useReducer:sa,useRef:ma,useState:function(){return sa(la)},useDebugValue:Sa,useDeferredValue:function(e){var t=sa(la),n=t[0],r=t[1];return wa((function(){var t=Yi.transition;Yi.transition=1;try{r(e)}finally{Yi.transition=t}}),[e]),n},useTransition:function(){var e=sa(la)[0];return[ma().current,e]},useMutableSource:da,useOpaqueIdentifier:function(){return sa(la)[0]},unstable_isNewReconciler:!1},Na=x.ReactCurrentOwner,Aa=!1;function La(e,t,n,r){t.child=null===e?Ei(t,null,n,r):Si(t,e.child,n,r)}function Ia(e,t,n,r,o){n=n.render;var i=t.ref;return ri(t,o),r=oa(e,t,n,r,i,o),null===e||Aa?(t.flags|=1,La(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,nl(e,t,o))}function Da(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!==typeof a||Uu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Hu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,za(e,t,a,r,o,i))}return a=e.child,0===(o&i)&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:sr)(o,r)&&e.ref===t.ref)?nl(e,t,i):(t.flags|=1,(e=Bu(a,r)).ref=t.ref,e.return=t,t.child=e)}function za(e,t,n,r,o,i){if(null!==e&&sr(e.memoizedProps,r)&&e.ref===t.ref){if(Aa=!1,0===(i&o))return t.lanes=e.lanes,nl(e,t,i);0!==(16384&e.flags)&&(Aa=!0)}return $a(e,t,n,r,i)}function Fa(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},gu(t,n);else{if(0===(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},gu(t,e),null;t.memoizedState={baseLanes:0},gu(t,null!==i?i.baseLanes:n)}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,gu(t,r);return La(e,t,o,n),t.child}function Wa(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function $a(e,t,n,r,o){var i=vo(n)?po:co.current;return i=ho(t,i),ri(t,o),n=oa(e,t,n,r,i,o),null===e||Aa?(t.flags|=1,La(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,nl(e,t,o))}function Ua(e,t,n,r,o){if(vo(n)){var i=!0;go(t)}else i=!1;if(ri(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),yi(t,n,r),gi(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,l=t.memoizedProps;a.props=l;var u=a.context,s=n.contextType;"object"===typeof s&&null!==s?s=oi(s):s=ho(t,s=vo(n)?po:co.current);var c=n.getDerivedStateFromProps,f="function"===typeof c||"function"===typeof a.getSnapshotBeforeUpdate;f||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(l!==r||u!==s)&&bi(t,a,r,s),ii=!1;var d=t.memoizedState;a.state=d,fi(t,r,a,o),u=t.memoizedState,l!==r||d!==u||fo.current||ii?("function"===typeof c&&(hi(t,n,c,r),u=t.memoizedState),(l=ii||mi(t,n,l,r,d,u,s))?(f||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4)):("function"===typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=s,r=l):("function"===typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,li(e,t),l=t.memoizedProps,s=t.type===t.elementType?l:Yo(t.type,l),a.props=s,f=t.pendingProps,d=a.context,"object"===typeof(u=n.contextType)&&null!==u?u=oi(u):u=ho(t,u=vo(n)?po:co.current);var p=n.getDerivedStateFromProps;(c="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(l!==f||d!==u)&&bi(t,a,r,u),ii=!1,d=t.memoizedState,a.state=d,fi(t,r,a,o);var h=t.memoizedState;l!==f||d!==h||fo.current||ii?("function"===typeof p&&(hi(t,n,p,r),h=t.memoizedState),(s=ii||mi(t,n,s,r,d,h,u))?(c||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,u),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,u)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof a.componentDidUpdate||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=u,r=s):("function"!==typeof a.componentDidUpdate||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Ba(e,t,n,r,i,o)}function Ba(e,t,n,r,o,i){Wa(e,t);var a=0!==(64&t.flags);if(!r&&!a)return o&&wo(t,n,!1),nl(e,t,i);r=t.stateNode,Na.current=t;var l=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Si(t,e.child,null,i),t.child=Si(t,null,l,i)):La(e,t,l,i),t.memoizedState=r.state,o&&wo(t,n,!0),t.child}function Ha(e){var t=e.stateNode;t.pendingContext?yo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&yo(0,t.context,!1),Ri(e,t.containerInfo)}var Va,qa,Ka,Xa={dehydrated:null,retryLane:0};function Ya(e,t,n){var r,o=t.pendingProps,i=Li.current,a=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&i)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(i|=1),uo(Li,1&i),null===e?(void 0!==o.fallback&&Ui(t),e=o.children,i=o.fallback,a?(e=Qa(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xa,e):"number"===typeof o.unstable_expectedLoadTime?(e=Qa(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xa,t.lanes=33554432,e):((n=qu({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(o=Ja(e,t,o.children,o.fallback,n),a=t.child,i=e.child.memoizedState,a.memoizedState=null===i?{baseLanes:n}:{baseLanes:i.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Xa,o):(n=Ga(e,t,o.children,n),t.memoizedState=null,n))}function Qa(e,t,n,r){var o=e.mode,i=e.child;return t={mode:"hidden",children:t},0===(2&o)&&null!==i?(i.childLanes=0,i.pendingProps=t):i=qu(t,o,0,null),n=Vu(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function Ga(e,t,n,r){var o=e.child;return e=o.sibling,n=Bu(o,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function Ja(e,t,n,r,o){var i=t.mode,a=e.child;e=a.sibling;var l={mode:"hidden",children:n};return 0===(2&i)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=l,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Bu(a,l),null!==e?r=Bu(e,r):(r=Vu(r,i,o,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Za(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ni(e.return,t)}function el(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o,a.lastEffect=i)}function tl(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(La(e,t,r.children,n),0!==(2&(r=Li.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Za(e,n);else if(19===e.tag)Za(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(uo(Li,r),0===(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Ii(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),el(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Ii(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}el(t,!0,n,null,i,t.lastEffect);break;case"together":el(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function nl(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),zl|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Bu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Bu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function rl(e,t){if(!Fi)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ol(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return vo(t.type)&&mo(),null;case 3:return Mi(),lo(fo),lo(co),Ki(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Hi(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Ai(t);var i=Ti(_i.current);if(n=t.type,null!==e&&null!=t.stateNode)qa(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Ti(Ci.current),Hi(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Yr]=t,r[Qr]=l,n){case"dialog":Cr("cancel",r),Cr("close",r);break;case"iframe":case"object":case"embed":Cr("load",r);break;case"video":case"audio":for(e=0;e<kr.length;e++)Cr(kr[e],r);break;case"source":Cr("error",r);break;case"img":case"image":case"link":Cr("error",r),Cr("load",r);break;case"details":Cr("toggle",r);break;case"input":ee(r,l),Cr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},Cr("invalid",r);break;case"textarea":ue(r,l),Cr("invalid",r)}for(var s in Se(n,l),e=null,l)l.hasOwnProperty(s)&&(i=l[s],"children"===s?"string"===typeof i?r.textContent!==i&&(e=["children",i]):"number"===typeof i&&r.textContent!==""+i&&(e=["children",""+i]):u.hasOwnProperty(s)&&null!=i&&"onScroll"===s&&Cr("scroll",r));switch(n){case"input":Q(r),re(r,l,!0);break;case"textarea":Q(r),ce(r);break;case"select":case"option":break;default:"function"===typeof l.onClick&&(r.onclick=Dr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(s=9===i.nodeType?i:i.ownerDocument,e===fe&&(e=pe(n)),e===fe?"script"===n?((e=s.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),"select"===n&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Yr]=t,e[Qr]=r,Va(e,t),t.stateNode=e,s=Ee(n,r),n){case"dialog":Cr("cancel",e),Cr("close",e),i=r;break;case"iframe":case"object":case"embed":Cr("load",e),i=r;break;case"video":case"audio":for(i=0;i<kr.length;i++)Cr(kr[i],e);i=r;break;case"source":Cr("error",e),i=r;break;case"img":case"image":case"link":Cr("error",e),Cr("load",e),i=r;break;case"details":Cr("toggle",e),i=r;break;case"input":ee(e,r),i=Z(e,r),Cr("invalid",e);break;case"option":i=ie(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=o({},r,{value:void 0}),Cr("invalid",e);break;case"textarea":ue(e,r),i=le(e,r),Cr("invalid",e);break;default:i=r}Se(n,i);var c=i;for(l in c)if(c.hasOwnProperty(l)){var f=c[l];"style"===l?Oe(e,f):"dangerouslySetInnerHTML"===l?null!=(f=f?f.__html:void 0)&&ye(e,f):"children"===l?"string"===typeof f?("textarea"!==n||""!==f)&&be(e,f):"number"===typeof f&&be(e,""+f):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(u.hasOwnProperty(l)?null!=f&&"onScroll"===l&&Cr("scroll",e):null!=f&&w(e,l,f,s))}switch(n){case"input":Q(e),re(e,r,!1);break;case"textarea":Q(e),ce(e);break;case"option":null!=r.value&&e.setAttribute("value",""+X(r.value));break;case"select":e.multiple=!!r.multiple,null!=(l=r.value)?ae(e,!!r.multiple,l,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Dr)}Wr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Ka(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));n=Ti(_i.current),Ti(Ci.current),Hi(t)?(r=t.stateNode,n=t.memoizedProps,r[Yr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Yr]=t,t.stateNode=r)}return null;case 13:return lo(Li),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Hi(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Li.current)?0===Ll&&(Ll=3):(0!==Ll&&3!==Ll||(Ll=4),null===Tl||0===(134217727&zl)&&0===(134217727&Fl)||vu(Tl,Ml))),(r||n)&&(t.flags|=4),null);case 4:return Mi(),null===e&&_r(t.stateNode.containerInfo),null;case 10:return ti(t),null;case 17:return vo(t.type)&&mo(),null;case 19:if(lo(Li),null===(r=t.memoizedState))return null;if(l=0!==(64&t.flags),null===(s=r.rendering))if(l)rl(r,!1);else{if(0!==Ll||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(s=Ii(e))){for(t.flags|=64,rl(r,!1),null!==(l=s.updateQueue)&&(t.updateQueue=l,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(l=n).flags&=2,l.nextEffect=null,l.firstEffect=null,l.lastEffect=null,null===(s=l.alternate)?(l.childLanes=0,l.lanes=e,l.child=null,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,l.type=s.type,e=s.dependencies,l.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return uo(Li,1&Li.current|2),t.child}e=e.sibling}null!==r.tail&&$o()>Bl&&(t.flags|=64,l=!0,rl(r,!1),t.lanes=33554432)}else{if(!l)if(null!==(e=Ii(s))){if(t.flags|=64,l=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),rl(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate&&!Fi)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*$o()-r.renderingStartTime>Bl&&1073741824!==n&&(t.flags|=64,l=!0,rl(r,!1),t.lanes=33554432);r.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=r.last)?n.sibling=s:t.child=s,r.last=s)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=$o(),n.sibling=null,t=Li.current,uo(Li,l?1&t|2:1&t),n):null;case 23:case 24:return wu(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function il(e){switch(e.tag){case 1:vo(e.type)&&mo();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Mi(),lo(fo),lo(co),Ki(),0!==(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Ai(e),null;case 13:return lo(Li),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return lo(Li),null;case 4:return Mi(),null;case 10:return ti(e),null;case 23:case 24:return wu(),null;default:return null}}function al(e,t){try{var n="",r=t;do{n+=q(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o}}function ll(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Va=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},qa=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ti(Ci.current);var a,l=null;switch(n){case"input":i=Z(e,i),r=Z(e,r),l=[];break;case"option":i=ie(e,i),r=ie(e,r),l=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),l=[];break;case"textarea":i=le(e,i),r=le(e,r),l=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Dr)}for(f in Se(n,r),n=null,i)if(!r.hasOwnProperty(f)&&i.hasOwnProperty(f)&&null!=i[f])if("style"===f){var s=i[f];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(u.hasOwnProperty(f)?l||(l=[]):(l=l||[]).push(f,null));for(f in r){var c=r[f];if(s=null!=i?i[f]:void 0,r.hasOwnProperty(f)&&c!==s&&(null!=c||null!=s))if("style"===f)if(s){for(a in s)!s.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&s[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(l||(l=[]),l.push(f,n)),n=c;else"dangerouslySetInnerHTML"===f?(c=c?c.__html:void 0,s=s?s.__html:void 0,null!=c&&s!==c&&(l=l||[]).push(f,c)):"children"===f?"string"!==typeof c&&"number"!==typeof c||(l=l||[]).push(f,""+c):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(u.hasOwnProperty(f)?(null!=c&&"onScroll"===f&&Cr("scroll",e),l||s===c||(l=[])):"object"===typeof c&&null!==c&&c.$$typeof===L?c.toString():(l=l||[]).push(f,c))}n&&(l=l||[]).push("style",n);var f=l;(t.updateQueue=f)&&(t.flags|=4)}},Ka=function(e,t,n,r){n!==r&&(t.flags|=4)};var ul="function"===typeof WeakMap?WeakMap:Map;function sl(e,t,n){(n=ui(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Kl||(Kl=!0,Xl=r),ll(0,t)},n}function cl(e,t,n){(n=ui(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return ll(0,t),r(o)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Yl?Yl=new Set([this]):Yl.add(this),ll(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var fl="function"===typeof WeakSet?WeakSet:Set;function dl(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){Du(e,n)}else t.current=null}function pl(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Yo(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Hr(t.stateNode.containerInfo));case 5:case 6:case 4:case 17:return}throw Error(a(163))}function hl(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var o=e;r=o.next,0!==(4&(o=o.tag))&&0!==(1&o)&&(Au(n,e),Nu(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Yo(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&di(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}di(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Wr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Ot(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(a(163))}function vl(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=void 0!==o&&null!==o&&o.hasOwnProperty("display")?o.display:null,r.style.display=xe("display",o)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function ml(e,t){if(Oo&&"function"===typeof Oo.onCommitFiberUnmount)try{Oo.onCommitFiberUnmount(xo,t)}catch(i){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,void 0!==o)if(0!==(4&r))Au(t,n);else{r=t;try{o()}catch(i){Du(r,i)}}n=n.next}while(n!==e)}break;case 1:if(dl(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){Du(t,i)}break;case 5:dl(t);break;case 4:Ol(e,t)}}function yl(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function bl(e){return 5===e.tag||3===e.tag||4===e.tag}function gl(e){e:{for(var t=e.return;null!==t;){if(bl(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(be(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||bl(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?wl(e,n,t):xl(e,n,t)}function wl(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Dr));else if(4!==r&&null!==(e=e.child))for(wl(e,t,n),e=e.sibling;null!==e;)wl(e,t,n),e=e.sibling}function xl(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(xl(e,t,n),e=e.sibling;null!==e;)xl(e,t,n),e=e.sibling}function Ol(e,t){for(var n,r,o=t,i=!1;;){if(!i){i=o.return;e:for(;;){if(null===i)throw Error(a(160));switch(n=i.stateNode,i.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}i=i.return}i=!0}if(5===o.tag||6===o.tag){e:for(var l=e,u=o,s=u;;)if(ml(l,s),null!==s.child&&4!==s.tag)s.child.return=s,s=s.child;else{if(s===u)break e;for(;null===s.sibling;){if(null===s.return||s.return===u)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}r?(l=n,u=o.stateNode,8===l.nodeType?l.parentNode.removeChild(u):l.removeChild(u)):n.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){n=o.stateNode.containerInfo,r=!0,o.child.return=o,o=o.child;continue}}else if(ml(e,o),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(i=!1)}o.sibling.return=o.return,o=o.sibling}}function kl(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Qr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Ee(e,o),t=Ee(e,r),o=0;o<i.length;o+=2){var l=i[o],u=i[o+1];"style"===l?Oe(n,u):"dangerouslySetInnerHTML"===l?ye(n,u):"children"===l?be(n,u):w(n,l,u,t)}switch(e){case"input":ne(n,r);break;case"textarea":se(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(i=r.value)?ae(n,!!r.multiple,i,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,Ot(n.containerInfo)));case 12:return;case 13:return null!==t.memoizedState&&(Ul=$o(),vl(t.child,!0)),void Sl(t);case 19:return void Sl(t);case 17:return;case 23:case 24:return void vl(t,null!==t.memoizedState)}throw Error(a(163))}function Sl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new fl),t.forEach((function(t){var r=Fu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function El(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var jl=Math.ceil,Cl=x.ReactCurrentDispatcher,Pl=x.ReactCurrentOwner,_l=0,Tl=null,Rl=null,Ml=0,Nl=0,Al=ao(0),Ll=0,Il=null,Dl=0,zl=0,Fl=0,Wl=0,$l=null,Ul=0,Bl=1/0;function Hl(){Bl=$o()+500}var Vl,ql=null,Kl=!1,Xl=null,Yl=null,Ql=!1,Gl=null,Jl=90,Zl=[],eu=[],tu=null,nu=0,ru=null,ou=-1,iu=0,au=0,lu=null,uu=!1;function su(){return 0!==(48&_l)?$o():-1!==ou?ou:ou=$o()}function cu(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===Uo()?1:2;if(0===iu&&(iu=Dl),0!==Xo.transition){0!==au&&(au=null!==$l?$l.pendingLanes:0),e=iu;var t=4186112&~au;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Uo(),0!==(4&_l)&&98===e?e=Wt(12,iu):e=Wt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),iu),e}function fu(e,t,n){if(50<nu)throw nu=0,ru=null,Error(a(185));if(null===(e=du(e,t)))return null;Bt(e,t,n),e===Tl&&(Fl|=t,4===Ll&&vu(e,Ml));var r=Uo();1===t?0!==(8&_l)&&0===(48&_l)?mu(e):(pu(e,n),0===_l&&(Hl(),qo())):(0===(4&_l)||98!==r&&99!==r||(null===tu?tu=new Set([e]):tu.add(e)),pu(e,n)),$l=e}function du(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function pu(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,l=e.pendingLanes;0<l;){var u=31-Ht(l),s=1<<u,c=i[u];if(-1===c){if(0===(s&r)||0!==(s&o)){c=t,Dt(s);var f=It;i[u]=10<=f?c+250:6<=f?c+5e3:-1}}else c<=t&&(e.expiredLanes|=s);l&=~s}if(r=zt(e,e===Tl?Ml:0),t=It,0===r)null!==n&&(n!==Lo&&Eo(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Lo&&Eo(n)}15===t?(n=mu.bind(null,e),null===Do?(Do=[n],zo=So(To,Ko)):Do.push(n),n=Lo):14===t?n=Vo(99,mu.bind(null,e)):n=Vo(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),hu.bind(null,e)),e.callbackPriority=t,e.callbackNode=n}}function hu(e){if(ou=-1,au=iu=0,0!==(48&_l))throw Error(a(327));var t=e.callbackNode;if(Mu()&&e.callbackNode!==t)return null;var n=zt(e,e===Tl?Ml:0);if(0===n)return null;var r=n,o=_l;_l|=16;var i=ku();for(Tl===e&&Ml===r||(Hl(),xu(e,r));;)try{ju();break}catch(u){Ou(e,u)}if(ei(),Cl.current=i,_l=o,null!==Rl?r=0:(Tl=null,Ml=0,r=Ll),0!==(Dl&Fl))xu(e,0);else if(0!==r){if(2===r&&(_l|=64,e.hydrate&&(e.hydrate=!1,Hr(e.containerInfo)),0!==(n=Ft(e))&&(r=Su(e,n))),1===r)throw t=Il,xu(e,0),vu(e,n),pu(e,$o()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:_u(e);break;case 3:if(vu(e,n),(62914560&n)===n&&10<(r=Ul+500-$o())){if(0!==zt(e,0))break;if(((o=e.suspendedLanes)&n)!==n){su(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Ur(_u.bind(null,e),r);break}_u(e);break;case 4:if(vu(e,n),(4186112&n)===n)break;for(r=e.eventTimes,o=-1;0<n;){var l=31-Ht(n);i=1<<l,(l=r[l])>o&&(o=l),n&=~i}if(n=o,10<(n=(120>(n=$o()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*jl(n/1960))-n)){e.timeoutHandle=Ur(_u.bind(null,e),n);break}_u(e);break;case 5:_u(e);break;default:throw Error(a(329))}}return pu(e,$o()),e.callbackNode===t?hu.bind(null,e):null}function vu(e,t){for(t&=~Wl,t&=~Fl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ht(t),r=1<<n;e[n]=-1,t&=~r}}function mu(e){if(0!==(48&_l))throw Error(a(327));if(Mu(),e===Tl&&0!==(e.expiredLanes&Ml)){var t=Ml,n=Su(e,t);0!==(Dl&Fl)&&(n=Su(e,t=zt(e,t)))}else n=Su(e,t=zt(e,0));if(0!==e.tag&&2===n&&(_l|=64,e.hydrate&&(e.hydrate=!1,Hr(e.containerInfo)),0!==(t=Ft(e))&&(n=Su(e,t))),1===n)throw n=Il,xu(e,0),vu(e,t),pu(e,$o()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,_u(e),pu(e,$o()),null}function yu(e,t){var n=_l;_l|=1;try{return e(t)}finally{0===(_l=n)&&(Hl(),qo())}}function bu(e,t){var n=_l;_l&=-2,_l|=8;try{return e(t)}finally{0===(_l=n)&&(Hl(),qo())}}function gu(e,t){uo(Al,Nl),Nl|=t,Dl|=t}function wu(){Nl=Al.current,lo(Al)}function xu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Br(n)),null!==Rl)for(n=Rl.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&mo();break;case 3:Mi(),lo(fo),lo(co),Ki();break;case 5:Ai(r);break;case 4:Mi();break;case 13:case 19:lo(Li);break;case 10:ti(r);break;case 23:case 24:wu()}n=n.return}Tl=e,Rl=Bu(e.current,null),Ml=Nl=Dl=t,Ll=0,Il=null,Wl=Fl=zl=0}function Ou(e,t){for(;;){var n=Rl;try{if(ei(),Xi.current=_a,ea){for(var r=Gi.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ea=!1}if(Qi=0,Zi=Ji=Gi=null,ta=!1,Pl.current=null,null===n||null===n.return){Ll=1,Il=t,Rl=null;break}e:{var i=e,a=n.return,l=n,u=t;if(t=Ml,l.flags|=2048,l.firstEffect=l.lastEffect=null,null!==u&&"object"===typeof u&&"function"===typeof u.then){var s=u;if(0===(2&l.mode)){var c=l.alternate;c?(l.updateQueue=c.updateQueue,l.memoizedState=c.memoizedState,l.lanes=c.lanes):(l.updateQueue=null,l.memoizedState=null)}var f=0!==(1&Li.current),d=a;do{var p;if(p=13===d.tag){var h=d.memoizedState;if(null!==h)p=null!==h.dehydrated;else{var v=d.memoizedProps;p=void 0!==v.fallback&&(!0!==v.unstable_avoidThisFallback||!f)}}if(p){var m=d.updateQueue;if(null===m){var y=new Set;y.add(s),d.updateQueue=y}else m.add(s);if(0===(2&d.mode)){if(d.flags|=64,l.flags|=16384,l.flags&=-2981,1===l.tag)if(null===l.alternate)l.tag=17;else{var b=ui(-1,1);b.tag=2,si(l,b)}l.lanes|=1;break e}u=void 0,l=t;var g=i.pingCache;if(null===g?(g=i.pingCache=new ul,u=new Set,g.set(s,u)):void 0===(u=g.get(s))&&(u=new Set,g.set(s,u)),!u.has(l)){u.add(l);var w=zu.bind(null,i,s,l);s.then(w,w)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(null!==d);u=Error((K(l.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Ll&&(Ll=2),u=al(u,l),d=a;do{switch(d.tag){case 3:i=u,d.flags|=4096,t&=-t,d.lanes|=t,ci(d,sl(0,i,t));break e;case 1:i=u;var x=d.type,O=d.stateNode;if(0===(64&d.flags)&&("function"===typeof x.getDerivedStateFromError||null!==O&&"function"===typeof O.componentDidCatch&&(null===Yl||!Yl.has(O)))){d.flags|=4096,t&=-t,d.lanes|=t,ci(d,cl(d,i,t));break e}}d=d.return}while(null!==d)}Pu(n)}catch(k){t=k,Rl===n&&null!==n&&(Rl=n=n.return);continue}break}}function ku(){var e=Cl.current;return Cl.current=_a,null===e?_a:e}function Su(e,t){var n=_l;_l|=16;var r=ku();for(Tl===e&&Ml===t||xu(e,t);;)try{Eu();break}catch(o){Ou(e,o)}if(ei(),_l=n,Cl.current=r,null!==Rl)throw Error(a(261));return Tl=null,Ml=0,Ll}function Eu(){for(;null!==Rl;)Cu(Rl)}function ju(){for(;null!==Rl&&!jo();)Cu(Rl)}function Cu(e){var t=Vl(e.alternate,e,Nl);e.memoizedProps=e.pendingProps,null===t?Pu(e):Rl=t,Pl.current=null}function Pu(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=ol(n,t,Nl)))return void(Rl=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Nl)||0===(4&n.mode)){for(var r=0,o=n.child;null!==o;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=il(t)))return n.flags&=2047,void(Rl=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Rl=t);Rl=t=e}while(null!==t);0===Ll&&(Ll=5)}function _u(e){var t=Uo();return Ho(99,Tu.bind(null,e,t)),null}function Tu(e,t){do{Mu()}while(null!==Gl);if(0!==(48&_l))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var l=e.eventTimes,u=e.expirationTimes;0<i;){var s=31-Ht(i),c=1<<s;o[s]=0,l[s]=-1,u[s]=-1,i&=~c}if(null!==tu&&0===(24&r)&&tu.has(e)&&tu.delete(e),e===Tl&&(Rl=Tl=null,Ml=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(o=_l,_l|=32,Pl.current=null,zr=Yt,hr(l=pr())){if("selectionStart"in l)u={start:l.selectionStart,end:l.selectionEnd};else e:if(u=(u=l.ownerDocument)&&u.defaultView||window,(c=u.getSelection&&u.getSelection())&&0!==c.rangeCount){u=c.anchorNode,i=c.anchorOffset,s=c.focusNode,c=c.focusOffset;try{u.nodeType,s.nodeType}catch(j){u=null;break e}var f=0,d=-1,p=-1,h=0,v=0,m=l,y=null;t:for(;;){for(var b;m!==u||0!==i&&3!==m.nodeType||(d=f+i),m!==s||0!==c&&3!==m.nodeType||(p=f+c),3===m.nodeType&&(f+=m.nodeValue.length),null!==(b=m.firstChild);)y=m,m=b;for(;;){if(m===l)break t;if(y===u&&++h===i&&(d=f),y===s&&++v===c&&(p=f),null!==(b=m.nextSibling))break;y=(m=y).parentNode}m=b}u=-1===d||-1===p?null:{start:d,end:p}}else u=null;u=u||{start:0,end:0}}else u=null;Fr={focusedElem:l,selectionRange:u},Yt=!1,lu=null,uu=!1,ql=r;do{try{Ru()}catch(j){if(null===ql)throw Error(a(330));Du(ql,j),ql=ql.nextEffect}}while(null!==ql);lu=null,ql=r;do{try{for(l=e;null!==ql;){var g=ql.flags;if(16&g&&be(ql.stateNode,""),128&g){var w=ql.alternate;if(null!==w){var x=w.ref;null!==x&&("function"===typeof x?x(null):x.current=null)}}switch(1038&g){case 2:gl(ql),ql.flags&=-3;break;case 6:gl(ql),ql.flags&=-3,kl(ql.alternate,ql);break;case 1024:ql.flags&=-1025;break;case 1028:ql.flags&=-1025,kl(ql.alternate,ql);break;case 4:kl(ql.alternate,ql);break;case 8:Ol(l,u=ql);var O=u.alternate;yl(u),null!==O&&yl(O)}ql=ql.nextEffect}}catch(j){if(null===ql)throw Error(a(330));Du(ql,j),ql=ql.nextEffect}}while(null!==ql);if(x=Fr,w=pr(),g=x.focusedElem,l=x.selectionRange,w!==g&&g&&g.ownerDocument&&dr(g.ownerDocument.documentElement,g)){null!==l&&hr(g)&&(w=l.start,void 0===(x=l.end)&&(x=w),"selectionStart"in g?(g.selectionStart=w,g.selectionEnd=Math.min(x,g.value.length)):(x=(w=g.ownerDocument||document)&&w.defaultView||window).getSelection&&(x=x.getSelection(),u=g.textContent.length,O=Math.min(l.start,u),l=void 0===l.end?O:Math.min(l.end,u),!x.extend&&O>l&&(u=l,l=O,O=u),u=fr(g,O),i=fr(g,l),u&&i&&(1!==x.rangeCount||x.anchorNode!==u.node||x.anchorOffset!==u.offset||x.focusNode!==i.node||x.focusOffset!==i.offset)&&((w=w.createRange()).setStart(u.node,u.offset),x.removeAllRanges(),O>l?(x.addRange(w),x.extend(i.node,i.offset)):(w.setEnd(i.node,i.offset),x.addRange(w))))),w=[];for(x=g;x=x.parentNode;)1===x.nodeType&&w.push({element:x,left:x.scrollLeft,top:x.scrollTop});for("function"===typeof g.focus&&g.focus(),g=0;g<w.length;g++)(x=w[g]).element.scrollLeft=x.left,x.element.scrollTop=x.top}Yt=!!zr,Fr=zr=null,e.current=n,ql=r;do{try{for(g=e;null!==ql;){var k=ql.flags;if(36&k&&hl(g,ql.alternate,ql),128&k){w=void 0;var S=ql.ref;if(null!==S){var E=ql.stateNode;switch(ql.tag){case 5:w=E;break;default:w=E}"function"===typeof S?S(w):S.current=w}}ql=ql.nextEffect}}catch(j){if(null===ql)throw Error(a(330));Du(ql,j),ql=ql.nextEffect}}while(null!==ql);ql=null,Io(),_l=o}else e.current=n;if(Ql)Ql=!1,Gl=e,Jl=t;else for(ql=r;null!==ql;)t=ql.nextEffect,ql.nextEffect=null,8&ql.flags&&((k=ql).sibling=null,k.stateNode=null),ql=t;if(0===(r=e.pendingLanes)&&(Yl=null),1===r?e===ru?nu++:(nu=0,ru=e):nu=0,n=n.stateNode,Oo&&"function"===typeof Oo.onCommitFiberRoot)try{Oo.onCommitFiberRoot(xo,n,void 0,64===(64&n.current.flags))}catch(j){}if(pu(e,$o()),Kl)throw Kl=!1,e=Xl,Xl=null,e;return 0!==(8&_l)||qo(),null}function Ru(){for(;null!==ql;){var e=ql.alternate;uu||null===lu||(0!==(8&ql.flags)?et(ql,lu)&&(uu=!0):13===ql.tag&&El(e,ql)&&et(ql,lu)&&(uu=!0));var t=ql.flags;0!==(256&t)&&pl(e,ql),0===(512&t)||Ql||(Ql=!0,Vo(97,(function(){return Mu(),null}))),ql=ql.nextEffect}}function Mu(){if(90!==Jl){var e=97<Jl?97:Jl;return Jl=90,Ho(e,Lu)}return!1}function Nu(e,t){Zl.push(t,e),Ql||(Ql=!0,Vo(97,(function(){return Mu(),null})))}function Au(e,t){eu.push(t,e),Ql||(Ql=!0,Vo(97,(function(){return Mu(),null})))}function Lu(){if(null===Gl)return!1;var e=Gl;if(Gl=null,0!==(48&_l))throw Error(a(331));var t=_l;_l|=32;var n=eu;eu=[];for(var r=0;r<n.length;r+=2){var o=n[r],i=n[r+1],l=o.destroy;if(o.destroy=void 0,"function"===typeof l)try{l()}catch(s){if(null===i)throw Error(a(330));Du(i,s)}}for(n=Zl,Zl=[],r=0;r<n.length;r+=2){o=n[r],i=n[r+1];try{var u=o.create;o.destroy=u()}catch(s){if(null===i)throw Error(a(330));Du(i,s)}}for(u=e.current.firstEffect;null!==u;)e=u.nextEffect,u.nextEffect=null,8&u.flags&&(u.sibling=null,u.stateNode=null),u=e;return _l=t,qo(),!0}function Iu(e,t,n){si(e,t=sl(0,t=al(n,t),1)),t=su(),null!==(e=du(e,1))&&(Bt(e,1,t),pu(e,t))}function Du(e,t){if(3===e.tag)Iu(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Iu(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Yl||!Yl.has(r))){var o=cl(n,e=al(t,e),1);if(si(n,o),o=su(),null!==(n=du(n,1)))Bt(n,1,o),pu(n,o);else if("function"===typeof r.componentDidCatch&&(null===Yl||!Yl.has(r)))try{r.componentDidCatch(t,e)}catch(i){}break}}n=n.return}}function zu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=su(),e.pingedLanes|=e.suspendedLanes&n,Tl===e&&(Ml&n)===n&&(4===Ll||3===Ll&&(62914560&Ml)===Ml&&500>$o()-Ul?xu(e,0):Wl|=n),pu(e,t)}function Fu(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===Uo()?1:2:(0===iu&&(iu=Dl),0===(t=$t(62914560&~iu))&&(t=4194304))),n=su(),null!==(e=du(e,t))&&(Bt(e,t,n),pu(e,n))}function Wu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function $u(e,t,n,r){return new Wu(e,t,n,r)}function Uu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Bu(e,t){var n=e.alternate;return null===n?((n=$u(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Hu(e,t,n,r,o,i){var l=2;if(r=e,"function"===typeof e)Uu(e)&&(l=1);else if("string"===typeof e)l=5;else e:switch(e){case S:return Vu(n.children,o,i,t);case I:l=8,o|=16;break;case E:l=8,o|=1;break;case j:return(e=$u(12,n,t,8|o)).elementType=j,e.type=j,e.lanes=i,e;case T:return(e=$u(13,n,t,o)).type=T,e.elementType=T,e.lanes=i,e;case R:return(e=$u(19,n,t,o)).elementType=R,e.lanes=i,e;case D:return qu(n,o,i,t);case z:return(e=$u(24,n,t,o)).elementType=z,e.lanes=i,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case C:l=10;break e;case P:l=9;break e;case _:l=11;break e;case M:l=14;break e;case N:l=16,r=null;break e;case A:l=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=$u(l,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Vu(e,t,n,r){return(e=$u(7,e,r,t)).lanes=n,e}function qu(e,t,n,r){return(e=$u(23,e,r,t)).elementType=D,e.lanes=n,e}function Ku(e,t,n){return(e=$u(6,e,null,t)).lanes=n,e}function Xu(e,t,n){return(t=$u(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Yu(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Ut(0),this.expirationTimes=Ut(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ut(0),this.mutableSourceEagerHydrationData=null}function Qu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:k,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Gu(e,t,n,r){var o=t.current,i=su(),l=cu(o);e:if(n){t:{if(Qe(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(vo(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var s=n.type;if(vo(s)){n=bo(n,s,u);break e}}n=u}else n=so;return null===t.context?t.context=n:t.pendingContext=n,(t=ui(i,l)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),si(o,t),fu(o,l,i),l}function Ju(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Zu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function es(e,t){Zu(e,t),(e=e.alternate)&&Zu(e,t)}function ts(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Yu(e,t,null!=n&&!0===n.hydrate),t=$u(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,ai(t),e[Gr]=n.current,_r(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var o=(t=r[e])._getVersion;o=o(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,o]:n.mutableSourceEagerHydrationData.push(t,o)}this._internalRoot=n}function ns(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function rs(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"===typeof o){var l=o;o=function(){var e=Ju(a);l.call(e)}}Gu(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new ts(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"===typeof o){var u=o;o=function(){var e=Ju(a);u.call(e)}}bu((function(){Gu(t,a,e,o)}))}return Ju(a)}function os(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ns(t))throw Error(a(200));return Qu(e,t,null,n)}Vl=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||fo.current)Aa=!0;else{if(0===(n&r)){switch(Aa=!1,t.tag){case 3:Ha(t),Vi();break;case 5:Ni(t);break;case 1:vo(t.type)&&go(t);break;case 4:Ri(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;uo(Qo,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?Ya(e,t,n):(uo(Li,1&Li.current),null!==(t=nl(e,t,n))?t.sibling:null);uo(Li,1&Li.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return tl(e,t,n);t.flags|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),uo(Li,Li.current),r)break;return null;case 23:case 24:return t.lanes=0,Fa(e,t,n)}return nl(e,t,n)}Aa=0!==(16384&e.flags)}else Aa=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=ho(t,co.current),ri(t,n),o=oa(null,t,r,e,o,n),t.flags|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,vo(r)){var i=!0;go(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,ai(t);var l=r.getDerivedStateFromProps;"function"===typeof l&&hi(t,r,l,e),o.updater=vi,t.stateNode=o,o._reactInternals=t,gi(t,r,e,n),t=Ba(null,t,r,!0,i,n)}else t.tag=0,La(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=(i=o._init)(o._payload),t.type=o,i=t.tag=function(e){if("function"===typeof e)return Uu(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===_)return 11;if(e===M)return 14}return 2}(o),e=Yo(o,e),i){case 0:t=$a(null,t,o,e,n);break e;case 1:t=Ua(null,t,o,e,n);break e;case 11:t=Ia(null,t,o,e,n);break e;case 14:t=Da(null,t,o,Yo(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,$a(e,t,r,o=t.elementType===r?o:Yo(r,o),n);case 1:return r=t.type,o=t.pendingProps,Ua(e,t,r,o=t.elementType===r?o:Yo(r,o),n);case 3:if(Ha(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,li(e,t),fi(t,r,null,n),(r=t.memoizedState.element)===o)Vi(),t=nl(e,t,n);else{if((i=(o=t.stateNode).hydrate)&&(zi=Vr(t.stateNode.containerInfo.firstChild),Di=t,i=Fi=!0),i){if(null!=(e=o.mutableSourceEagerHydrationData))for(o=0;o<e.length;o+=2)(i=e[o])._workInProgressVersionPrimary=e[o+1],qi.push(i);for(n=Ei(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else La(e,t,r,n),Vi();t=t.child}return t;case 5:return Ni(t),null===e&&Ui(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,l=o.children,$r(r,o)?l=null:null!==i&&$r(r,i)&&(t.flags|=16),Wa(e,t),La(e,t,l,n),t.child;case 6:return null===e&&Ui(t),null;case 13:return Ya(e,t,n);case 4:return Ri(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Si(t,null,r,n):La(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ia(e,t,r,o=t.elementType===r?o:Yo(r,o),n);case 7:return La(e,t,t.pendingProps,n),t.child;case 8:case 12:return La(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,l=t.memoizedProps,i=o.value;var u=t.type._context;if(uo(Qo,u._currentValue),u._currentValue=i,null!==l)if(u=l.value,0===(i=lr(u,i)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,i):1073741823))){if(l.children===o.children&&!fo.current){t=nl(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var s=u.dependencies;if(null!==s){l=u.child;for(var c=s.firstContext;null!==c;){if(c.context===r&&0!==(c.observedBits&i)){1===u.tag&&((c=ui(-1,n&-n)).tag=2,si(u,c)),u.lanes|=n,null!==(c=u.alternate)&&(c.lanes|=n),ni(u.return,n),s.lanes|=n;break}c=c.next}}else l=10===u.tag&&u.type===t.type?null:u.child;if(null!==l)l.return=u;else for(l=u;null!==l;){if(l===t){l=null;break}if(null!==(u=l.sibling)){u.return=l.return,l=u;break}l=l.return}u=l}La(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ri(t,n),r=r(o=oi(o,i.unstable_observedBits)),t.flags|=1,La(e,t,r,n),t.child;case 14:return i=Yo(o=t.type,t.pendingProps),Da(e,t,o,i=Yo(o.type,i),r,n);case 15:return za(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Yo(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,vo(r)?(e=!0,go(t)):e=!1,ri(t,n),yi(t,r,o),gi(t,r,o,n),Ba(null,t,r,!0,e,n);case 19:return tl(e,t,n);case 23:case 24:return Fa(e,t,n)}throw Error(a(156,t.tag))},ts.prototype.render=function(e){Gu(e,this._internalRoot,null,null)},ts.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Gu(null,e,null,(function(){t[Gr]=null}))},tt=function(e){13===e.tag&&(fu(e,4,su()),es(e,4))},nt=function(e){13===e.tag&&(fu(e,67108864,su()),es(e,67108864))},rt=function(e){if(13===e.tag){var t=su(),n=cu(e);fu(e,n,t),es(e,n)}},ot=function(e,t){return t()},Ce=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=no(r);if(!o)throw Error(a(90));G(r),ne(r,o)}}}break;case"textarea":se(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},Ne=yu,Ae=function(e,t,n,r,o){var i=_l;_l|=4;try{return Ho(98,e.bind(null,t,n,r,o))}finally{0===(_l=i)&&(Hl(),qo())}},Le=function(){0===(49&_l)&&(function(){if(null!==tu){var e=tu;tu=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,pu(e,$o())}))}qo()}(),Mu())},Ie=function(e,t){var n=_l;_l|=2;try{return e(t)}finally{0===(_l=n)&&(Hl(),qo())}};var is={Events:[eo,to,no,Re,Me,Mu,{current:!1}]},as={findFiberByHostInstance:Zr,bundleType:0,version:"17.0.1",rendererPackageName:"react-dom"},ls={bundleType:as.bundleType,version:as.version,rendererPackageName:as.rendererPackageName,rendererConfig:as.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ze(e))?null:e.stateNode},findFiberByHostInstance:as.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var us=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!us.isDisabled&&us.supportsFiber)try{xo=us.inject(ls),Oo=us}catch(me){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=is,t.createPortal=os,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=Ze(t))?null:e.stateNode},t.flushSync=function(e,t){var n=_l;if(0!==(48&n))return e(t);_l|=1;try{if(e)return Ho(99,e.bind(null,t))}finally{_l=n,qo()}},t.hydrate=function(e,t,n){if(!ns(t))throw Error(a(200));return rs(null,e,t,!0,n)},t.render=function(e,t,n){if(!ns(t))throw Error(a(200));return rs(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!ns(e))throw Error(a(40));return!!e._reactRootContainer&&(bu((function(){rs(null,null,e,!1,(function(){e._reactRootContainer=null,e[Gr]=null}))})),!0)},t.unstable_batchedUpdates=yu,t.unstable_createPortal=function(e,t){return os(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ns(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return rs(e,t,n,!1,r)},t.version="17.0.1"},function(e,t,n){"use strict";e.exports=n(116)},function(e,t,n){"use strict";var r,o,i,a;if("object"===typeof performance&&"function"===typeof performance.now){var l=performance;t.unstable_now=function(){return l.now()}}else{var u=Date,s=u.now();t.unstable_now=function(){return u.now()-s}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var c=null,f=null,d=function e(){if(null!==c)try{var n=t.unstable_now();c(!0,n),c=null}catch(r){throw setTimeout(e,0),r}};r=function(e){null!==c?setTimeout(r,0,e):(c=e,setTimeout(d,0))},o=function(e,t){f=setTimeout(e,t)},i=function(){clearTimeout(f)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,h=window.clearTimeout;if("undefined"!==typeof console){var v=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var m=!1,y=null,b=-1,g=5,w=0;t.unstable_shouldYield=function(){return t.unstable_now()>=w},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):g=0<e?Math.floor(1e3/e):5};var x=new MessageChannel,O=x.port2;x.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();w=e+g;try{y(!0,e)?O.postMessage(null):(m=!1,y=null)}catch(n){throw O.postMessage(null),n}}else m=!1},r=function(e){y=e,m||(m=!0,O.postMessage(null))},o=function(e,n){b=p((function(){e(t.unstable_now())}),n)},i=function(){h(b),b=-1}}function k(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<j(o,t)))break e;e[r]=t,e[n]=o,n=r}}function S(e){return void 0===(e=e[0])?null:e}function E(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],l=i+1,u=e[l];if(void 0!==a&&0>j(a,n))void 0!==u&&0>j(u,a)?(e[r]=u,e[l]=n,r=l):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==u&&0>j(u,n)))break e;e[r]=u,e[l]=n,r=l}}}return t}return null}function j(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var C=[],P=[],_=1,T=null,R=3,M=!1,N=!1,A=!1;function L(e){for(var t=S(P);null!==t;){if(null===t.callback)E(P);else{if(!(t.startTime<=e))break;E(P),t.sortIndex=t.expirationTime,k(C,t)}t=S(P)}}function I(e){if(A=!1,L(e),!N)if(null!==S(C))N=!0,r(D);else{var t=S(P);null!==t&&o(I,t.startTime-e)}}function D(e,n){N=!1,A&&(A=!1,i()),M=!0;var r=R;try{for(L(n),T=S(C);null!==T&&(!(T.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=T.callback;if("function"===typeof a){T.callback=null,R=T.priorityLevel;var l=a(T.expirationTime<=n);n=t.unstable_now(),"function"===typeof l?T.callback=l:T===S(C)&&E(C),L(n)}else E(C);T=S(C)}if(null!==T)var u=!0;else{var s=S(P);null!==s&&o(I,s.startTime-n),u=!1}return u}finally{T=null,R=r,M=!1}}var z=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){N||M||(N=!0,r(D))},t.unstable_getCurrentPriorityLevel=function(){return R},t.unstable_getFirstCallbackNode=function(){return S(C)},t.unstable_next=function(e){switch(R){case 1:case 2:case 3:var t=3;break;default:t=R}var n=R;R=t;try{return e()}finally{R=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=z,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=R;R=e;try{return t()}finally{R=n}},t.unstable_scheduleCallback=function(e,n,a){var l=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?l+a:l:a=l,e){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return e={id:_++,callback:n,priorityLevel:e,startTime:a,expirationTime:u=a+u,sortIndex:-1},a>l?(e.sortIndex=a,k(P,e),null===S(C)&&e===S(P)&&(A?i():A=!0,o(I,a-l))):(e.sortIndex=u,k(C,e),N||M||(N=!0,r(D))),e},t.unstable_wrapCallback=function(e){var t=R;return function(){var n=R;R=t;try{return e.apply(this,arguments)}finally{R=n}}}},,,function(e,t,n){"use strict";n(67);var r=n(0),o=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,n){var r,i={},s=null,c=null;for(r in void 0!==n&&(s=""+n),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(c=t.ref),t)l.call(t,r)&&!u.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:s,ref:c,props:i,_owner:a.current}}t.jsx=s,t.jsxs=s},function(e,t,n){"use strict";var r=n(121);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";e.exports=n(123)},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,l=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,v=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,b=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119;function O(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case d:case a:case u:case l:case h:return e;default:switch(e=e&&e.$$typeof){case c:case p:case y:case m:case s:return e;default:return t}}case i:return t}}}function k(e){return O(e)===d}t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=s,t.Element=o,t.ForwardRef=p,t.Fragment=a,t.Lazy=y,t.Memo=m,t.Portal=i,t.Profiler=u,t.StrictMode=l,t.Suspense=h,t.isAsyncMode=function(e){return k(e)||O(e)===f},t.isConcurrentMode=k,t.isContextConsumer=function(e){return O(e)===c},t.isContextProvider=function(e){return O(e)===s},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return O(e)===p},t.isFragment=function(e){return O(e)===a},t.isLazy=function(e){return O(e)===y},t.isMemo=function(e){return O(e)===m},t.isPortal=function(e){return O(e)===i},t.isProfiler=function(e){return O(e)===u},t.isStrictMode=function(e){return O(e)===l},t.isSuspense=function(e){return O(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===d||e===u||e===l||e===h||e===v||"object"===typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===p||e.$$typeof===g||e.$$typeof===w||e.$$typeof===x||e.$$typeof===b)},t.typeOf=O},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){var r=n(126);function o(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var l=i?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(n,a,l):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}},function(e,t){function n(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(238)},function(e,t,n){"use strict";var r=60103,o=60106,i=60107,a=60108,l=60114,u=60109,s=60110,c=60112,f=60113,d=60120,p=60115,h=60116,v=60121,m=60122,y=60117,b=60129,g=60131;if("function"===typeof Symbol&&Symbol.for){var w=Symbol.for;r=w("react.element"),o=w("react.portal"),i=w("react.fragment"),a=w("react.strict_mode"),l=w("react.profiler"),u=w("react.provider"),s=w("react.context"),c=w("react.forward_ref"),f=w("react.suspense"),d=w("react.suspense_list"),p=w("react.memo"),h=w("react.lazy"),v=w("react.block"),m=w("react.server.block"),y=w("react.fundamental"),b=w("react.debug_trace_mode"),g=w("react.legacy_hidden")}function x(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case l:case a:case f:case d:return e;default:switch(e=e&&e.$$typeof){case s:case c:case h:case p:case u:return e;default:return t}}case o:return t}}}var O=u,k=r,S=c,E=i,j=h,C=p,P=o,_=l,T=a,R=f;t.ContextConsumer=s,t.ContextProvider=O,t.Element=k,t.ForwardRef=S,t.Fragment=E,t.Lazy=j,t.Memo=C,t.Portal=P,t.Profiler=_,t.StrictMode=T,t.Suspense=R,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return x(e)===s},t.isContextProvider=function(e){return x(e)===u},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===c},t.isFragment=function(e){return x(e)===i},t.isLazy=function(e){return x(e)===h},t.isMemo=function(e){return x(e)===p},t.isPortal=function(e){return x(e)===o},t.isProfiler=function(e){return x(e)===l},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===f},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===l||e===b||e===a||e===f||e===d||e===g||"object"===typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===u||e.$$typeof===s||e.$$typeof===c||e.$$typeof===y||e.$$typeof===v||e[0]===m)},t.typeOf=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useSnowfallStyle=t.useComponentSize=t.useSnowflakes=void 0;var r,o=n(0),i=(r=n(130))&&r.__esModule?r:{default:r},a=n(84),l=n(85);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){o=!0,i=u}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}t.useSnowflakes=function(e,t,n){var r=c((0,o.useState)([]),2),a=r[0],l=r[1];return(0,o.useEffect)((function(){l((function(r){var o=t-r.length;return o>0?[].concat(s(r),s(function(e,t,n){for(var r=[],o=0;o<t;o++)r.push(new i.default(e.current,n));return r}(e,o,n))):o<0?r.slice(0,t):r}))}),[t,e,n]),(0,o.useEffect)((function(){l((function(e){return e.map((function(e){return e.config=n,e}))}))}),[n]),a};t.useComponentSize=function(e){var t=c((0,o.useState)((0,l.getSize)(e.current)),2),n=t[0],r=t[1],i=(0,o.useCallback)((function(){e.current&&r((0,l.getSize)(e.current))}),[e]);return(0,o.useLayoutEffect)((function(){var t=window.ResizeObserver;if(e.current){if(i(),"function"===typeof t){var n=new t(i);return n.observe(e.current),function(){return n.disconnect()}}return window.addEventListener("resize",i),function(){return window.removeEventListener("resize",i)}}}),[e,i]),n};t.useSnowfallStyle=function(e){return(0,o.useMemo)((function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){u(e,t,n[t])}))}return e}({},a.snowfallBaseStyle,e||{})}),[e])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(85);function o(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u={color:"#dee4fd",radius:[.5,3],speed:[1,3],wind:[-.5,2],changeFrequency:200},s=function(){function e(t){var n=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,e),l(this,"config",void 0),l(this,"params",void 0),l(this,"framesSinceLastUpdate",void 0),l(this,"draw",(function(e,t){var r=t||e.getContext("2d");r&&(r.beginPath(),r.arc(n.params.x,n.params.y,n.params.radius,0,2*Math.PI),r.fillStyle=n.fullConfig.color,r.closePath(),r.fill())})),l(this,"translate",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=n.params,i=o.x,a=o.y,l=o.wind,u=o.speed,s=o.nextWind,c=o.nextSpeed;n.params.x=(i+l*t)%e.offsetWidth,n.params.y=(a+u*t)%e.offsetHeight,n.params.speed=(0,r.lerp)(u,c,.01),n.params.wind=(0,r.lerp)(l,s,.01),n.framesSinceLastUpdate++>n.fullConfig.changeFrequency&&(n.updateTargetParams(),n.framesSinceLastUpdate=0)})),l(this,"updateTargetParams",(function(){n.params.nextSpeed=r.random.apply(void 0,o(n.fullConfig.speed)),n.params.nextWind=r.random.apply(void 0,o(n.fullConfig.wind))})),l(this,"update",(function(e,t){n.translate(e,t)})),this.config=a;var u=this.fullConfig,s=u.radius,c=u.wind,f=u.speed;this.params={x:(0,r.random)(0,t.offsetWidth),y:(0,r.random)(-t.offsetHeight,0),radius:r.random.apply(void 0,o(s)),speed:r.random.apply(void 0,o(f)),wind:r.random.apply(void 0,o(c)),nextSpeed:r.random.apply(void 0,o(c)),nextWind:r.random.apply(void 0,o(f))},this.framesSinceLastUpdate=0}var t,n,s;return t=e,(n=[{key:"fullConfig",get:function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){l(e,t,n[t])}))}return e}({},u,this.config)}}])&&a(t.prototype,n),s&&a(t,s),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(0)),o=i(n(132));function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return(a="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})(e)}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){p(e,t,n[t])}))}return e}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(133);var h=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!==a(t)&&"function"!==typeof t?f(e):t}(this,c(t).call(this,e)),p(f(n),"toggle",(function(){n.setState({isFlipped:!n.state.isFlipped})})),p(f(n),"handleFooterDotClick",(function(e,t){n.setState({isFlipped:0===e})})),p(f(n),"handleHoverOn",(function(e){n.setState({isFlipped:!0}),n.props.onMouseEnter(e)})),p(f(n),"handleTouchStart",(function(e){n.setState({isFlipped:!0,isTouchDevice:!0}),n.props.onTouchStart(e)})),p(f(n),"handleTouchEnd",(function(e){n.setState({isFlipped:!1}),n.props.onTouchEnd(e)})),p(f(n),"handleHoverOff",(function(e){n.setState({isFlipped:!1}),n.props.onMouseLeave(e)})),n.state={isFlipped:!1,isTouchDevice:!1},n}var n,i,h;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(t,e),n=t,h=[{key:"getDerivedStateFromProps",value:function(e,t){return u({},t,{isFlipped:"boolean"===typeof e.isFlipped?e.isFlipped:t.isFlipped})}}],(i=[{key:"render",value:function(){var e=this.props,t=e.children,n=e.style,i=e.flipDirection,a=e.flipOnHover,s=e.flipOnClick,c=this.state,f=c.isFlipped,d=c.activeCardIndex,p=c.isTouchDevice,h=a?{onMouseEnter:this.handleHoverOn,onMouseLeave:this.handleHoverOff,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}:s?{onClick:this.toggle}:{};return r.default.createElement("div",l({className:"flippy-container",style:u({},n)},h),r.default.createElement("div",{className:"flippy-cardContainer-wrapper ".concat(i)},r.default.createElement("div",{className:"flippy-cardContainer ".concat(f?"isActive":""," ").concat(p?"istouchdevice":"")},t),this.props.showNavigation&&r.default.createElement(o.default,{onDotClick:this.handleFooterDotClick,activeCardIndex:d,cards:this.props.children})))}}])&&s(n.prototype,i),h&&s(n,h),t}(r.default.Component);t.default=h,h.defaultProps={showNavigation:!1,flipDirection:"horizontal",flipOnHover:!1,flipOnClick:!0,usePrettyStyle:!0,onMouseEnter:function(){},onMouseLeave:function(){},onTouchStart:function(){},onTouchEnd:function(){},onClick:function(){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(0))&&r.__esModule?r:{default:r};t.default=function(e){var t=e.cards,n=e.activeCardIndex,r=e.onDotClick;return o.default.createElement("div",{className:"flippy-footer"},t.map((function(e,t){return o.default.createElement("span",{key:"flippyFooterItem".concat(t),className:"flippy-footer-item".concat(n===t?" isActive":""),onClick:r.bind(null,t)},"*")})))}},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackSide=t.FrontSide=void 0;var r,o=(r=n(0))&&r.__esModule?r:{default:r};function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function a(e){return(a="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})(e)}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){u(e,t,n[t])}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return!t||"object"!==a(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=function(e){function t(){return c(this,t),d(this,p(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this.props,t=e.className,n=e.cardType,r=e.style,i=e.elementType,a=e.animationDuration,u=s(e,["className","cardType","style","elementType","animationDuration"]);return o.default.createElement(i||"div",l({className:"flippy-card flippy-".concat(n," ").concat(t||"")},u,{style:l({},r||{},{transitionDuration:"".concat(a/1e3,"s")})}),this.props.children)}}])&&f(n.prototype,r),i&&f(n,i),t}(o.default.Component);t.FrontSide=function(e){e.isFlipped;var t=e.style,n=e.animationDuration,r=s(e,["isFlipped","style","animationDuration"]);return o.default.createElement(v,i({},r,{style:l({},t||{}),animationDuration:n,cardType:"front"}))};t.BackSide=function(e){e.isFlipped;var t=e.style,n=s(e,["isFlipped","style"]);return o.default.createElement(v,i({},n,{style:l({},t||{}),cardType:"back"}))},v.defaultProps={animationDuration:600}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==u(e)&&"function"!==typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(0)),o=a(n(4)),i=a(n(86));function a(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e){return(u="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})(e)}function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return!t||"object"!==u(t)&&"function"!==typeof t?h(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){function t(){var e,n;c(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return m(h(n=d(this,(e=p(t)).call.apply(e,[this].concat(o)))),"slickNext",(function(){return n.innerSlider.slickNext()})),m(h(n),"slickPrev",(function(){return n.innerSlider.slickPrev()})),m(h(n),"slickPlay",(function(){return n.innerSlider.autoPlayInit()})),m(h(n),"slickPause",(function(){return n.innerSlider.handleAutoplayPause()})),m(h(n),"slickGoTo",(function(e){return n.innerSlider.slickSet(e)})),n}var n,o,a;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(t,e),n=t,(o=[{key:"render",value:function(){var e=this,t=this.props.children;return r.default.createElement(i.default,s({},this.props,{ref:function(t){e.innerSlider=t}}),t)}}])&&f(n.prototype,o),a&&f(n,a),t}(r.Component);y.propTypes={children:o.default.oneOfType([o.default.arrayOf(o.default.element),o.default.arrayOf(o.default.instanceOf("undefined"!==typeof Element&&Element)),o.default.func,o.default.oneOf([null])]).isRequired};var b=y;t.default=b},function(e,t,n){var r=n(137),o=n(43);e.exports=function(e,t,n){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:i,maxWait:t,trailing:a})}},function(e,t,n){var r=n(43),o=n(138),i=n(139),a=Math.max,l=Math.min;e.exports=function(e,t,n){var u,s,c,f,d,p,h=0,v=!1,m=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var n=u,r=s;return u=s=void 0,h=t,f=e.apply(r,n)}function g(e){return h=e,d=setTimeout(x,t),v?b(e):f}function w(e){var n=e-p;return void 0===p||n>=t||n<0||m&&e-h>=c}function x(){var e=o();if(w(e))return O(e);d=setTimeout(x,function(e){var n=t-(e-p);return m?l(n,c-(e-h)):n}(e))}function O(e){return d=void 0,y&&u?b(e):(u=s=void 0,f)}function k(){var e=o(),n=w(e);if(u=arguments,s=this,p=e,n){if(void 0===d)return g(p);if(m)return clearTimeout(d),d=setTimeout(x,t),b(p)}return void 0===d&&(d=setTimeout(x,t)),f}return t=i(t)||0,r(n)&&(v=!!n.leading,c=(m="maxWait"in n)?a(i(n.maxWait)||0,t):c,y="trailing"in n?!!n.trailing:y),k.cancel=function(){void 0!==d&&clearTimeout(d),h=0,u=p=s=d=void 0},k.flush=function(){return void 0===d?f:O(o())},k}},function(e,t,n){var r=n(24);e.exports=function(){return r.Date.now()}},function(e,t,n){var r=n(43),o=n(50),i=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,s=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=l.test(e);return n||u.test(e)?s(e.slice(2),n?2:8):a.test(e)?NaN:+e}},function(e,t,n){var r=n(51),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(u){}var o=a.call(e);return r&&(t?e[l]=n:delete e[l]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){e.exports=n(143)},function(e,t,n){var r=n(144),o=n(145),i=n(163),a=n(33);e.exports=function(e,t){return(a(e)?r:o)(e,i(t))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t,n){var r=n(146),o=n(162)(r);e.exports=o},function(e,t,n){var r=n(147),o=n(88);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(148)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var u=a[e?l:++o];if(!1===n(i[u],u,i))break}return t}}},function(e,t,n){var r=n(150),o=n(151),i=n(33),a=n(89),l=n(154),u=n(91),s=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),c=!n&&o(e),f=!n&&!c&&a(e),d=!n&&!c&&!f&&u(e),p=n||c||f||d,h=p?r(e.length,String):[],v=h.length;for(var m in e)!t&&!s.call(e,m)||p&&("length"==m||f&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||l(m,v))||h.push(m);return h}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(152),o=n(45),i=Object.prototype,a=i.hasOwnProperty,l=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!l.call(e,"callee")};e.exports=u},function(e,t,n){var r=n(44),o=n(45);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(44),o=n(92),i=n(45),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(87),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,l=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=l}).call(this,n(90)(e))},function(e,t,n){var r=n(159),o=n(160),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(161)(Object.keys,Object);e.exports=r},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(93);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,l=Object(n);(t?a--:++a<i)&&!1!==o(l[a],a,l););return n}}},function(e,t,n){var r=n(164);e.exports=function(e){return"function"==typeof e?e:r}},function(e,t){e.exports=function(e){return e}},function(e,t,n){var r=n(166);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},function(e,t,n){var r=n(167),o=n(196);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}},function(e,t,n){var r=n(33),o=n(168),i=n(169),a=n(193);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},function(e,t,n){var r=n(33),o=n(50),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||(a.test(e)||!i.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var r=n(170),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)})),t}));e.exports=a},function(e,t,n){var r=n(171);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(71);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},function(e,t,n){var r=n(173),o=n(53),i=n(72);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(174),o=n(179),i=n(180),a=n(181),l=n(182);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=l,e.exports=u},function(e,t,n){var r=n(52);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t,n){var r=n(94),o=n(176),i=n(43),a=n(95),l=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,c=u.toString,f=s.hasOwnProperty,d=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?d:l).test(a(e))}},function(e,t,n){var r=n(177),o=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!o&&o in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(52),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(52),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(52);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(54),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(54);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(54);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(54);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(55);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(55);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(55);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(55);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t,n){var r=n(194);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(51),o=n(195),i=n(33),a=n(50),l=r?r.prototype:void 0,u=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},function(e,t,n){var r=n(50);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},function(e,t,n){var r=n(198);e.exports=function(e,t){return r(e,t)}},function(e,t,n){var r=n(199),o=n(45);e.exports=function e(t,n,i,a,l){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!==t&&n!==n:r(t,n,i,a,e,l))}},function(e,t,n){var r=n(200),o=n(97),i=n(211),a=n(215),l=n(222),u=n(33),s=n(89),c=n(91),f="[object Arguments]",d="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,v,m,y){var b=u(e),g=u(t),w=b?d:l(e),x=g?d:l(t),O=(w=w==f?p:w)==p,k=(x=x==f?p:x)==p,S=w==x;if(S&&s(e)){if(!s(t))return!1;b=!0,O=!1}if(S&&!O)return y||(y=new r),b||c(e)?o(e,t,n,v,m,y):i(e,t,w,n,v,m,y);if(!(1&n)){var E=O&&h.call(e,"__wrapped__"),j=k&&h.call(t,"__wrapped__");if(E||j){var C=E?e.value():e,P=j?t.value():t;return y||(y=new r),m(C,P,n,v,y)}}return!!S&&(y||(y=new r),a(e,t,n,v,m,y))}},function(e,t,n){var r=n(53),o=n(201),i=n(202),a=n(203),l=n(204),u=n(205);function s(e){var t=this.__data__=new r(e);this.size=t.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=l,s.prototype.set=u,e.exports=s},function(e,t,n){var r=n(53);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(53),o=n(72),i=n(71);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(71),o=n(207),i=n(208);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(51),o=n(212),i=n(96),a=n(97),l=n(213),u=n(214),s=r?r.prototype:void 0,c=s?s.valueOf:void 0;e.exports=function(e,t,n,r,s,f,d){switch(n){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||!f(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 p=l;case"[object Set]":var h=1&r;if(p||(p=u),e.size!=t.size&&!h)return!1;var v=d.get(e);if(v)return v==t;r|=2,d.set(e,t);var m=a(p(e),p(t),r,s,f,d);return d.delete(e),m;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},function(e,t,n){var r=n(24).Uint8Array;e.exports=r},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){var r=n(216),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,l){var u=1&n,s=r(e),c=s.length;if(c!=r(t).length&&!u)return!1;for(var f=c;f--;){var d=s[f];if(!(u?d in t:o.call(t,d)))return!1}var p=l.get(e),h=l.get(t);if(p&&h)return p==t&&h==e;var v=!0;l.set(e,t),l.set(t,e);for(var m=u;++f<c;){var y=e[d=s[f]],b=t[d];if(i)var g=u?i(b,y,d,t,e,l):i(y,b,d,e,t,l);if(!(void 0===g?y===b||a(y,b,n,i,l):g)){v=!1;break}m||(m="constructor"==d)}if(v&&!m){var w=e.constructor,x=t.constructor;w==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(v=!1)}return l.delete(e),l.delete(t),v}},function(e,t,n){var r=n(217),o=n(219),i=n(88);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(218),o=n(33);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t,n){var r=n(220),o=n(221),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,l=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=l},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(223),o=n(72),i=n(224),a=n(225),l=n(226),u=n(44),s=n(95),c="[object Map]",f="[object Promise]",d="[object Set]",p="[object WeakMap]",h="[object DataView]",v=s(r),m=s(o),y=s(i),b=s(a),g=s(l),w=u;(r&&w(new r(new ArrayBuffer(1)))!=h||o&&w(new o)!=c||i&&w(i.resolve())!=f||a&&w(new a)!=d||l&&w(new l)!=p)&&(w=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?s(n):"";if(r)switch(r){case v:return h;case m:return c;case y:return f;case b:return d;case g:return p}return t}),e.exports=w},function(e,t,n){var r=n(36)(n(24),"DataView");e.exports=r},function(e,t,n){var r=n(36)(n(24),"Promise");e.exports=r},function(e,t,n){var r=n(36)(n(24),"Set");e.exports=r},function(e,t,n){var r=n(36)(n(24),"WeakMap");e.exports=r},function(e,t,n){"use strict";n.r(t),function(e){var n=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}()}(),r="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,o="undefined"!==typeof e&&e.Math===Math?e:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")(),i="function"===typeof requestAnimationFrame?requestAnimationFrame.bind(o):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],l="undefined"!==typeof MutationObserver,u=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,o=0;function a(){n&&(n=!1,e()),r&&u()}function l(){i(a)}function u(){var e=Date.now();if(n){if(e-o<2)return;r=!0}else n=!0,r=!1,setTimeout(l,t);o=e}return u}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),s=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},c=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||o},f=y(0,0,0,0);function d(e){return parseFloat(e)||0}function p(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+d(e["border-"+n+"-width"])}),0)}function h(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return f;var r=c(e).getComputedStyle(e),o=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=e["padding-"+o];t[o]=d(i)}return t}(r),i=o.left+o.right,a=o.top+o.bottom,l=d(r.width),u=d(r.height);if("border-box"===r.boxSizing&&(Math.round(l+i)!==t&&(l-=p(r,"left","right")+i),Math.round(u+a)!==n&&(u-=p(r,"top","bottom")+a)),!function(e){return e===c(e).document.documentElement}(e)){var s=Math.round(l+i)-t,h=Math.round(u+a)-n;1!==Math.abs(s)&&(l-=s),1!==Math.abs(h)&&(u-=h)}return y(o.left,o.top,l,u)}var v="undefined"!==typeof SVGGraphicsElement?function(e){return e instanceof c(e).SVGGraphicsElement}:function(e){return e instanceof c(e).SVGElement&&"function"===typeof e.getBBox};function m(e){return r?v(e)?function(e){var t=e.getBBox();return y(0,0,t.width,t.height)}(e):h(e):f}function y(e,t,n,r){return{x:e,y:t,width:n,height:r}}var b=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=y(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=m(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),g=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,o=e.height,i="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(i.prototype);return s(a,{x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:o+n,left:t}),a}(t);s(this,{target:e,contentRect:n})},w=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!==typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new b(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new g(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),x="undefined"!==typeof WeakMap?new WeakMap:new n,O=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),r=new w(t,n,this);x.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){O.prototype[e]=function(){var t;return(t=x.get(this))[e].apply(t,arguments)}}));var k="undefined"!==typeof o.ResizeObserver?o.ResizeObserver:O;t.default=k}.call(this,n(70))},function(e,t,n){"use strict";function r(e){return(r="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})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=function(){var e,t,n;function l(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(o(this,l),a(this,"array",[]),a(this,"key",[]),a(this,"origin",null),a(this,"toString",(function(e){for(var n=[],o=e||t.array,i=0;i<o.length;i+=1){var a=o[i];"object"===r(a)&&a instanceof Array?n.push("[".concat(t.toString(a),"]")):"object"===r(a)?n.push(JSON.stringify(a)):n.push(a.toString())}return n.join(",")})),a(this,"get",(function(e){return e<0||e<t.length-t.array.length?t.array[-e%t.array.length===0?0:t.array.length+e%t.array.length]:t.array[e%t.array.length]})),a(this,"getKeyIndex",(function(e){var n=t.origin.get(e).dataset.carouselkey;return t.key.indexOf(n)})),a(this,"getIndex",(function(e){return e<0||e<t.length-t.array.length?-e%t.array.length===0?0:t.array.length+e%t.array.length:e%t.array.length})),a(this,"set",(function(e,n){if(e<0||e<t.length-t.array.length)throw new Error("can not set index < 0");if(e>=t.length){var r=new Array(e-t.length+1);t.array=t.array.concat(r),t.array.splice(e,1,n)}else t.array[t.getIndex(e)]=n})),this.array=[],"number"===typeof e)this.array=new Array(e);else if("object"===r(e)&&Array.isArray(e))this.array=e;else{if(!("object"===r(e)&&e.length>0&&e instanceof NodeList))throw new Error("can not create array");for(var i=0;i<e.length;i+=1)this.array.push(e[i]);this.key=this.array.map((function(e){return e.dataset.carouselkey}))}this.origin=n}return e=l,(t=[{key:"length",get:function(){return this.array.length}}])&&i(e.prototype,t),n&&i(e,n),l}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NextArrow=t.PrevArrow=void 0;var r=a(n(0)),o=a(n(73)),i=n(74);function a(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=function(e){var t=e.arrowsScroll,n=e.clickHandler,i=e.type,a=e.prevArrow,u=e.nextArrow,c=e.arrowsBlock,f={"carousel-arrow":!0,block:c},d={arrowsScroll:t};"prev"===i?(Object.assign(f,{"carousel-prev":!0}),a&&Object.assign(f,{custom:!0}),Object.assign(d,{message:"previous"})):(Object.assign(f,{"carousel-next":!0}),u&&Object.assign(f,{custom:!0}),Object.assign(d,{message:"next"}));var p={key:"prev"===i?"0":"1","data-role":"none",className:(0,o.default)(f),onClick:function(e){return function(e,t){t.preventDefault(),n(e,t)}(d,e)}};return a&&"prev"===i?r.default.cloneElement(a,s({},p)):u&&"next"===i?r.default.cloneElement(u,s({},p)):r.default.createElement("button",l({},p,{key:"prev"===i?"0":"1",type:"button"})," ","prev"===i?"Previous":"Next")};f.propTypes=i.arrowsPropTypes,f.defaultProps=i.arrowsDefaultProps;t.PrevArrow=function(e){return r.default.createElement(f,l({type:"prev"},e))};t.NextArrow=function(e){return r.default.createElement(f,l({type:"next"},e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(0)),o=a(n(73)),i=n(74);function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=function(e){var t,n=e.slideCount,i=e.dotsScroll,a=e.slidesToShow,s=e.infinite,c=e.activeIndex,f=e.clickHandler,d=e.onMouseEnter,p=e.onMouseOver,h=e.onMouseLeave,v=e.customPaging,m=e.appendDots,y=e.dotsClass,b=(t={slideCount:n,dotsScroll:i,slidesToShow:a,infinite:s},Math.ceil(t.slideCount/t.dotsScroll)),g=Array.apply([],Array(b+1).join("0").split("")).map((function(e,t){var n=t*i,a=t*i+(i-1),l=(0,o.default)({"carousel-dots-active":c>=n&&c<=a}),u={message:"dots",index:t,dotsScroll:i,activeIndex:c};return r.default.createElement("li",{className:"".concat(l," carousel-dot-").concat(t+1),key:"".concat((new Date).getTime()*t)},r.default.cloneElement(v(t),{onClick:function(e){return function(e,t){t.preventDefault(),f(e)}(u,e)}}))}));return r.default.cloneElement(m(g),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({className:y},{onMouseEnter:d,onMouseOver:p,onMouseLeave:h}))};s.defaultProps=i.dotsDefaultProps,s.propTypes=i.dotsPropTypes;var c=s;t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleCarouselTap=function(e){"mousedown"===e.type&&"IMG"===e.target.tagName&&e.preventDefault();this.pressed=!0,this.dragged=!1,this.verticalDragged=!1,this.reference=this.xpos(e),this.referenceY=this.ypos(e),this.touchObject=Object.assign(this.touchObject,{startX:this.reference,startY:this.referenceY}),this.velocity=0,this.amplitude=0,this.frame=this.offset,this.timestamp=Date.now(),clearInterval(this.ticker),this.ticker=setInterval(this.track,100)},t.handleCarouselDrag=function(e){if(this.pressed){var t=this.xpos(e),n=this.ypos(e),o=this.reference-t,i=Math.abs(this.referenceY-n),a=(0,r.getSwipeDirection)(Object.assign(this.touchObject,{endX:t,endY:n}));this.scrollType={type:"scroll",direction:a},i<30&&!this.verticalDragged?(o>2||o<-2)&&(this.dragged=!0,this.reference=t,this.scroll("drag",this.offset+o)):this.dragged?(e.preventDefault(),e.stopPropagation()):this.verticalDragged=!0}this.dragged&&(e.preventDefault(),e.stopPropagation())},t.handleCarouselRelease=function(e){if(!this.pressed)return;this.pressed=!1;this.beforeChangeTrigger=!1,(0,this.props.onSwipe)(this.scrollType.direction),clearInterval(this.ticker),this.target=this.offset,(this.velocity>10||this.velocity<-10)&&(this.amplitude=.9*this.velocity,this.target=this.offset+this.amplitude);this.target=Math.round(this.target/this.dim)*this.dim,this.noWrap&&(this.target>=this.dim*(this.items.length-1)?this.target=this.dim*(this.items.length-1):this.target<0&&(this.target=0));this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this.autoScroll),this.dragged&&(e.preventDefault(),e.stopPropagation())},t.handleResizeHeight=function(e){var t=this,n=this.state.height,r=e[e.length-1].target.offsetHeight;n!==r&&r>0&&this.isMounted&&this.setState({height:r},(function(){t.resizeHeight=!0}))},t.handleClick=function(){this.disconnectObserver()},t.handleAutoplayPause=function(){var e=this.state.SliderRef;this.autoplayTimer&&(clearInterval(this.autoplayTimer),this.autoplayTimer=null,e.removeEventListener("mouseover",this.handleAutoplayPause),e.addEventListener("mouseleave",this.autoPlay))},t.handleKeyDown=function(e){var t=this.state.settings,n=t.rtl,o=t.accessibility,i=(0,r.keyHandler)(e,o,n);"previous"===i?this.slickPrev():"next"===i&&this.slickNext()},t.handleResize=function(e){this.slideInit(),this.connectObserver();var t=this.state.settings,n=t.onResize;if(t.fullWidth){var r=this.state.width;this.dim=2*r+t.gutter,this.offset=2*this.center*r,this.target=this.offset}else this.scroll("resize");n(e)},t.handleWheel=function(e){e.stopPropagation(),e.preventDefault(),this.beforeChangeTrigger=!1;var t=this.state,n=t.settings.wheelScroll,r=t.activeIndex,o=e.deltaY;o>0?(this.scrollType={type:"wheel",direction:"next"},this.slickNext(r+n)):o<0&&(this.scrollType={type:"wheel",direction:"prev"},this.slickPrev(r-n))},t.handleVisibilityChange=function(){this.changeWindow="undefined"!==typeof document&&"visible"===document.visibilityState},t.signupListener=function(){var e=this.state,t=e.settings,n=e.SliderRef,r=t.swipe,o=t.accessibility,i=t.wheel;r?(n.addEventListener("touchstart",this.handleCarouselTap),n.addEventListener("touchmove",this.handleCarouselDrag),n.addEventListener("touchend",this.handleCarouselRelease)):(n.removeEventListener("touchstart",this.handleCarouselTap),n.removeEventListener("touchmove",this.handleCarouselDrag),n.removeEventListener("touchend",this.handleCarouselRelease));o?n.addEventListener("keydown",this.handleKeyDown):n.removeEventListener("keydown",this.handleKeyDown);i?n.addEventListener("wheel",this.handleWheel):n.removeEventListener("wheel",this.handleWheel);n.addEventListener("mousedown",this.handleCarouselTap),n.addEventListener("mousemove",this.handleCarouselDrag),n.addEventListener("mouseup",this.handleCarouselRelease),n.addEventListener("mouseleave",this.handleCarouselRelease)},t.removeListener=function(){var e=this.state,t=e.settings,n=e.SliderRef,r=t.swipe,o=t.accessibility,i=t.wheel,a=t.autoplay;r&&(n.removeEventListener("touchstart",this.handleCarouselTap),n.removeEventListener("touchmove",this.handleCarouselDrag),n.removeEventListener("touchend",this.handleCarouselRelease));o&&n.removeEventListener("keydown",this.handleKeyDown);i&&n.removeEventListener("wheel",this.handleWheel);a&&window.removeEventListener("visibilitychange",this.handleVisibilityChange);n.removeEventListener("mousedown",this.handleCarouselTap),n.removeEventListener("mousemove",this.handleCarouselDrag),n.removeEventListener("mouseup",this.handleCarouselRelease),n.removeEventListener("mouseleave",this.handleCarouselRelease)};var r=n(232)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keyHandler=t.getSwipeDirection=void 0;t.getSwipeDirection=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=0,o=0;r=e.startX-e.endX,o=e.startY-e.endY;var i=Math.atan2(o,r);return(t=Math.round(180*i/Math.PI))<0&&(t=360-Math.abs(t)),t<=45&&t>=0||t<=360&&t>=315?"left":t>=135&&t<=225?"right":!0===n?t>45&&t<135?"up":"down":"vertical"};t.keyHandler=function(e,t,n){return e.target.tagName.match("TEXTAREA|INPUT|SELECT")||!t?"":37===e.keyCode?n?"next":"previous":39===e.keyCode?n?"previous":"next":""}},function(e,t,n){},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t,n){"use strict";e.exports=n(236)},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,l=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,v=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,b=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119;function O(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case d:case a:case u:case l:case h:return e;default:switch(e=e&&e.$$typeof){case c:case p:case y:case m:case s:return e;default:return t}}case i:return t}}}function k(e){return O(e)===d}t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=s,t.Element=o,t.ForwardRef=p,t.Fragment=a,t.Lazy=y,t.Memo=m,t.Portal=i,t.Profiler=u,t.StrictMode=l,t.Suspense=h,t.isAsyncMode=function(e){return k(e)||O(e)===f},t.isConcurrentMode=k,t.isContextConsumer=function(e){return O(e)===c},t.isContextProvider=function(e){return O(e)===s},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return O(e)===p},t.isFragment=function(e){return O(e)===a},t.isLazy=function(e){return O(e)===y},t.isMemo=function(e){return O(e)===m},t.isPortal=function(e){return O(e)===i},t.isProfiler=function(e){return O(e)===u},t.isStrictMode=function(e){return O(e)===l},t.isSuspense=function(e){return O(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===d||e===u||e===l||e===h||e===v||"object"===typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===p||e.$$typeof===g||e.$$typeof===w||e.$$typeof===x||e.$$typeof===b)},t.typeOf=O},,function(e,t,n){"use strict";n.r(t),n.d(t,"capitalize",(function(){return r.a})),n.d(t,"createChainedFunction",(function(){return o.a})),n.d(t,"createSvgIcon",(function(){return i.a})),n.d(t,"debounce",(function(){return a.a})),n.d(t,"deprecatedPropType",(function(){return l})),n.d(t,"isMuiElement",(function(){return u.a})),n.d(t,"ownerDocument",(function(){return s.a})),n.d(t,"ownerWindow",(function(){return c.a})),n.d(t,"requirePropFactory",(function(){return f.a})),n.d(t,"setRef",(function(){return d.a})),n.d(t,"unsupportedProp",(function(){return p})),n.d(t,"useControlled",(function(){return h.a})),n.d(t,"useEventCallback",(function(){return v.a})),n.d(t,"useForkRef",(function(){return m.a})),n.d(t,"unstable_useId",(function(){return b})),n.d(t,"useIsFocusVisible",(function(){return g.a}));var r=n(7),o=n(35),i=n(58),a=n(27);function l(e,t){return function(){return null}}var u=n(28),s=n(13),c=n(37),f=n(68),d=n(25);function p(e,t,n,r,o){return null}var h=n(57),v=n(15),m=n(9),y=n(0);function b(e){var t=y.useState(e),n=t[0],r=t[1],o=e||n;return y.useEffect((function(){null==n&&r("mui-".concat(Math.round(1e5*Math.random())))}),[n]),o}var g=n(56)},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=(n(4),n(5)),l=n(6),u=i.forwardRef((function(e,t){var n=e.classes,l=e.className,u=e.component,s=void 0===u?"div":u,c=e.square,f=void 0!==c&&c,d=e.elevation,p=void 0===d?1:d,h=e.variant,v=void 0===h?"elevation":h,m=Object(r.a)(e,["classes","className","component","square","elevation","variant"]);return i.createElement(s,Object(o.a)({className:Object(a.a)(n.root,l,"outlined"===v?n.outlined:n["elevation".concat(p)],!f&&n.rounded),ref:t},m))}));t.a=Object(l.a)((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),Object(o.a)({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(u)},function(e,t,n){"use strict";n.d(t,"a",(function(){return vn}));var r=n(3),o=n(1),i=n(0),a=n.n(i),l="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},u="object"===("undefined"===typeof window?"undefined":l(window))&&"object"===("undefined"===typeof document?"undefined":l(document))&&9===document.nodeType,s=(n(26),n(40)),c=n(14),f=n(46),d=n(17),p={}.constructor;function h(e){if(null==e||"object"!==typeof e)return e;if(Array.isArray(e))return e.map(h);if(e.constructor!==p)return e;var t={};for(var n in e)t[n]=h(e[n]);return t}function v(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,o=h(t),i=r.plugins.onCreateRule(e,o,n);return i||(e[0],null)}var m=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},y=function(e,t){if(void 0===t&&(t=!1),!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=m(e[r]," ");else n=m(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n};function b(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function g(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var o=n.indent,i=void 0===o?0:o,a=t.fallbacks;if(e&&i++,a)if(Array.isArray(a))for(var l=0;l<a.length;l++){var u=a[l];for(var s in u){var c=u[s];null!=c&&(r&&(r+="\n"),r+=""+b(s+": "+y(c)+";",i))}}else for(var f in a){var d=a[f];null!=d&&(r&&(r+="\n"),r+=""+b(f+": "+y(d)+";",i))}for(var p in t){var h=t[p];null!=h&&"fallbacks"!==p&&(r&&(r+="\n"),r+=""+b(p+": "+y(h)+";",i))}return(r||n.allowEmpty)&&e?(r&&(r="\n"+r+"\n"),b(e+" {"+r,--i)+b("}",i)):r}var w=/([[\].#*$><+~=|^:(),"'`\s])/g,x="undefined"!==typeof CSS&&CSS.escape,O=function(e){return x?x(e):e.replace(w,"\\$1")},k=function(){function e(e,t,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,o=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:o&&(this.renderer=new o)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var o=t;n&&!1===n.process||(o=this.options.jss.plugins.onChangeValue(t,e,this));var i=null==o||!1===o,a=e in this.style;if(i&&!a&&!r)return this;var l=i&&a;if(l?delete this.style[e]:this.style[e]=o,this.renderable&&this.renderer)return l?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,o),this;var u=this.options.sheet;return u&&u.attached,this},e}(),S=function(e){function t(t,n,r){var o;(o=e.call(this,t,n,r)||this).selectorText=void 0,o.id=void 0,o.renderable=void 0;var i=r.selector,a=r.scoped,l=r.sheet,u=r.generateId;return i?o.selectorText=i:!1!==a&&(o.id=u(Object(f.a)(Object(f.a)(o)),l),o.selectorText="."+O(o.id)),o}Object(c.a)(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==typeof n?e[t]=n:Array.isArray(n)&&(e[t]=y(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Object(o.a)({},e,{allowEmpty:!0}):e;return g(this.selectorText,this.style,n)},Object(s.a)(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(k),E={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new S(e,t,n)}},j={indent:1,children:!0},C=/@([\w-]+)/,P=function(){function e(e,t,n){this.type="conditional",this.at=void 0,this.key=void 0,this.query=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e;var r=e.match(C);for(var i in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new G(Object(o.a)({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){if(void 0===e&&(e=j),null==e.indent&&(e.indent=j.indent),null==e.children&&(e.children=j.children),!1===e.children)return this.query+" {}";var t=this.rules.toString(e);return t?this.query+" {\n"+t+"\n}":""},e}(),_=/@media|@supports\s+/,T={onCreateRule:function(e,t,n){return _.test(e)?new P(e,t,n):null}},R={indent:1,children:!0},M=/@keyframes\s+([\w-]+)/,N=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var r=e.match(M);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,a=n.sheet,l=n.generateId;for(var u in this.id=!1===i?this.name:O(l(this,a)),this.rules=new G(Object(o.a)({},n,{parent:this})),t)this.rules.add(u,t[u],Object(o.a)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=R),null==e.indent&&(e.indent=R.indent),null==e.children&&(e.children=R.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),A=/@keyframes\s+/,L=/\$([\w-]+)/g,I=function(e,t){return"string"===typeof e?e.replace(L,(function(e,n){return n in t?t[n]:e})):e},D=function(e,t,n){var r=e[t],o=I(r,n);o!==r&&(e[t]=o)},z={onCreateRule:function(e,t,n){return"string"===typeof e&&A.test(e)?new N(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&D(e,"animation-name",n.keyframes),"animation"in e&&D(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return I(e,r.keyframes);default:return e}}},F=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).renderable=void 0,t}return Object(c.a)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Object(o.a)({},e,{allowEmpty:!0}):e;return g(this.key,this.style,n)},t}(k),W={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new F(e,t,n):null}},$=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.style)){for(var t="",n=0;n<this.style.length;n++)t+=g(this.at,this.style[n]),this.style[n+1]&&(t+="\n");return t}return g(this.at,this.style,e)},e}(),U=/@font-face/,B={onCreateRule:function(e,t,n){return U.test(e)?new $(e,t,n):null}},H=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return g(this.key,this.style,e)},e}(),V={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new H(e,t,n):null}},q=function(){function e(e,t,n){this.type="simple",this.key=void 0,this.value=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),K={"@charset":!0,"@import":!0,"@namespace":!0},X=[E,T,z,W,B,V,{onCreateRule:function(e,t,n){return e in K?new q(e,t,n):null}}],Y={process:!0},Q={force:!0,process:!0},G=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=void 0,this.classes=void 0,this.keyframes=void 0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,i=r.parent,a=r.sheet,l=r.jss,u=r.Renderer,s=r.generateId,c=r.scoped,f=Object(o.a)({classes:this.classes,parent:i,sheet:a,jss:l,Renderer:u,generateId:s,scoped:c,name:e,keyframes:this.keyframes,selector:void 0},n),d=e;e in this.raw&&(d=e+"-d"+this.counter++),this.raw[d]=t,d in this.classes&&(f.selector="."+O(this.classes[d]));var p=v(d,t,f);if(!p)return null;this.register(p);var h=void 0===f.index?this.index.length:f.index;return this.index.splice(h,0,p),p},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof S?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof N&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof S?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof N&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"===typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.map[e],t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=Y);var o=this.options,i=o.jss.plugins,a=o.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var l=t,u=l.style;if(i.onUpdate(n,t,a,r),r.process&&u&&u!==l.style){for(var s in i.onProcessStyle(l.style,l,a),l.style){var c=l.style[s];c!==u[s]&&l.prop(s,c,Q)}for(var f in u){var d=l.style[f],p=u[f];null==d&&d!==p&&l.prop(f,null,Q)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,o=0;o<this.index.length;o++){var i=this.index[o].toString(e);(i||r)&&(t&&(t+="\n"),t+=i)}return t},e}(),J=function(){function e(e,t){for(var n in this.options=void 0,this.deployed=void 0,this.attached=void 0,this.rules=void 0,this.renderer=void 0,this.classes=void 0,this.keyframes=void 0,this.queue=void 0,this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Object(o.a)({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new G(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var o=this.rules.add(e,t,n);return o?(this.options.jss.plugins.onProcessRule(o),this.attached?this.deployed?(r?r.push(o):(this.insertRule(o),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),o):o:(this.deployed=!1,o)):null},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var o=this.addRule(r,e[r],t);o&&n.push(o)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"===typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),Z=function(){function e(){this.plugins={internal:[],external:[]},this.registry=void 0}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var o=this.registry.onCreateRule[r](e,t,n);if(o)return o}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var o=0;o<this.registry.onUpdate.length;o++)this.registry.onUpdate[o](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,o=0;o<this.registry.onChangeValue.length;o++)r=this.registry.onChangeValue[o](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),ee=new(function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=Object(d.a)(t,["attached"]),o="",i=0;i<this.registry.length;i++){var a=this.registry[i];null!=n&&a.attached!==n||(o&&(o+="\n"),o+=a.toString(r))}return o},Object(s.a)(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}()),te="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),ne="2f1acc6c3a606b082e5eef5e54414ffb";null==te[ne]&&(te[ne]=0);var re=te[ne]++,oe=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var o="",i="";return r&&(r.options.classNamePrefix&&(i=r.options.classNamePrefix),null!=r.options.jss.id&&(o=String(r.options.jss.id))),e.minify?""+(i||"c")+re+o+t:i+n.key+"-"+re+(o?"-"+o:"")+"-"+t}},ie=function(e){var t;return function(){return t||(t=e()),t}},ae=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(n){return""}},le=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=y(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;e.attributeStyleMap?e.attributeStyleMap.set(t,r):e.style.setProperty(t,r)}catch(o){return!1}return!0},ue=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(n){}},se=function(e,t){return e.selectorText=t,e.selectorText===t},ce=ie((function(){return document.querySelector("head")}));function fe(e){var t=ee.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var o=function(e){for(var t=ce(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(o)return{parent:o.parentNode,node:o.nextSibling}}return!1}var de=ie((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),pe=function(e,t,n){try{if("insertRule"in e)e.insertRule(t,n);else if("appendRule"in e){e.appendRule(t)}}catch(r){return!1}return e.cssRules[n]},he=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},ve=function(){function e(e){this.getPropertyValue=ae,this.setProperty=le,this.removeProperty=ue,this.setSelector=se,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,this.cssRules=[],e&&ee.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,o=t.element;this.element=o||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var i=de();i&&this.element.setAttribute("nonce",i)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=fe(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"===typeof n.nodeType){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling)}else ce().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,o=n;if("conditional"===e.type||"keyframes"===e.type){var i=he(n,t);if(!1===(o=pe(n,r.toString({children:!1}),i)))return!1;this.refCssRule(e,i,o)}return this.insertRules(r.rules,o),o}var a=e.toString();if(!a)return!1;var l=he(n,t),u=pe(n,a,l);return!1!==u&&(this.hasInsertedRules=!0,this.refCssRule(e,l,u),u)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof J&&(this.cssRules[t]=n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),me=0,ye=function(){function e(e){this.id=me++,this.version="10.5.1",this.plugins=new Z,this.options={id:{minify:!1},createGenerateId:oe,Renderer:u?ve:null,plugins:[]},this.generateId=oe({minify:!1});for(var t=0;t<X.length;t++)this.plugins.use(X[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=Object(o.a)({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!==typeof n&&(n=0===ee.index?0:ee.index+1);var r=new J(e,Object(o.a)({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),ee.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"===typeof e)return this.createRule(void 0,e,t);var r=Object(o.a)({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var i=v(e,t,r);return i&&this.plugins.onProcessRule(i),i},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}();function be(e){var t=null;for(var n in e){var r=e[n],o=typeof r;if("function"===o)t||(t={}),t[n]=r;else if("object"===o&&null!==r&&!Array.isArray(r)){var i=be(r);i&&(t||(t={}),t[n]=i)}}return t}var ge="object"===typeof CSS&&null!=CSS&&"number"in CSS,we=function(e){return new ye(e)},xe=(we(),n(271)),Oe={set:function(e,t,n,r){var o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}},ke=n(108),Se=(n(4),n(61)),Ee=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var je=Date.now(),Ce="fnValues"+je,Pe="fnStyle"+ ++je,_e=function(){return{onCreateRule:function(e,t,n){if("function"!==typeof t)return null;var r=v(e,{},n);return r[Pe]=t,r},onProcessStyle:function(e,t){if(Ce in t||Pe in t)return e;var n={};for(var r in e){var o=e[r];"function"===typeof o&&(delete e[r],n[r]=o)}return t[Ce]=n,e},onUpdate:function(e,t,n,r){var o=t,i=o[Pe];i&&(o.style=i(e)||{});var a=o[Ce];if(a)for(var l in a)o.prop(l,a[l](e),r)}}},Te="@global",Re="@global ",Me=function(){function e(e,t,n){for(var r in this.type="global",this.at=Te,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new G(Object(o.a)({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),Ne=function(){function e(e,t,n){this.type="global",this.at=Te,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=n;var r=e.substr(Re.length);this.rule=n.jss.createRule(r,t,Object(o.a)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),Ae=/\s*,\s*/g;function Le(e,t){for(var n=e.split(Ae),r="",o=0;o<n.length;o++)r+=t+" "+n[o].trim(),n[o+1]&&(r+=", ");return r}var Ie=function(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===Te)return new Me(e,t,n);if("@"===e[0]&&e.substr(0,Re.length)===Re)return new Ne(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),!1===n.scoped&&(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,i=r?r[Te]:null;if(i){for(var a in i)t.addRule(a,i[a],Object(o.a)({},n,{selector:Le(a,e.selector)}));delete r[Te]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var i in r)if("@"===i[0]&&i.substr(0,Te.length)===Te){var a=Le(i.substr(Te.length),e.selector);t.addRule(a,r[i],Object(o.a)({},n,{selector:a})),delete r[i]}}(e,t))}}},De=/\s*,\s*/g,ze=/&/g,Fe=/\$([\w-]+)/g;var We=function(){function e(e,t){return function(n,r){var o=e.getRule(r)||t&&t.getRule(r);return o?(o=o).selector:r}}function t(e,t){for(var n=t.split(De),r=e.split(De),o="",i=0;i<n.length;i++)for(var a=n[i],l=0;l<r.length;l++){var u=r[l];o&&(o+=", "),o+=-1!==u.indexOf("&")?u.replace(ze,a):a+" "+u}return o}function n(e,t,n){if(n)return Object(o.a)({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var i=Object(o.a)({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete i.name,i}return{onProcessStyle:function(r,i,a){if("style"!==i.type)return r;var l,u,s=i,c=s.options.parent;for(var f in r){var d=-1!==f.indexOf("&"),p="@"===f[0];if(d||p){if(l=n(s,c,l),d){var h=t(f,s.selector);u||(u=e(c,a)),h=h.replace(Fe,u),c.addRule(h,r[f],Object(o.a)({},l,{selector:h}))}else p&&c.addRule(f,{},l).addRule(s.key,r[f],{selector:s.selector});delete r[f]}}return r}}},$e=/[A-Z]/g,Ue=/^ms-/,Be={};function He(e){return"-"+e.toLowerCase()}var Ve=function(e){if(Be.hasOwnProperty(e))return Be[e];var t=e.replace($e,He);return Be[e]=Ue.test(t)?"-"+t:t};function qe(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:Ve(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(qe):t.fallbacks=qe(e.fallbacks)),t}var Ke=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=qe(e[t]);return e}return qe(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=Ve(t);return t===r?e:(n.prop(r,e),null)}}},Xe=ge&&CSS?CSS.px:"px",Ye=ge&&CSS?CSS.ms:"ms",Qe=ge&&CSS?CSS.percent:"%";function Ge(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var o in e)r[o]=e[o],r[o.replace(t,n)]=e[o];return r}var Je=Ge({"animation-delay":Ye,"animation-duration":Ye,"background-position":Xe,"background-position-x":Xe,"background-position-y":Xe,"background-size":Xe,border:Xe,"border-bottom":Xe,"border-bottom-left-radius":Xe,"border-bottom-right-radius":Xe,"border-bottom-width":Xe,"border-left":Xe,"border-left-width":Xe,"border-radius":Xe,"border-right":Xe,"border-right-width":Xe,"border-top":Xe,"border-top-left-radius":Xe,"border-top-right-radius":Xe,"border-top-width":Xe,"border-width":Xe,"border-block":Xe,"border-block-end":Xe,"border-block-end-width":Xe,"border-block-start":Xe,"border-block-start-width":Xe,"border-block-width":Xe,"border-inline":Xe,"border-inline-end":Xe,"border-inline-end-width":Xe,"border-inline-start":Xe,"border-inline-start-width":Xe,"border-inline-width":Xe,"border-start-start-radius":Xe,"border-start-end-radius":Xe,"border-end-start-radius":Xe,"border-end-end-radius":Xe,margin:Xe,"margin-bottom":Xe,"margin-left":Xe,"margin-right":Xe,"margin-top":Xe,"margin-block":Xe,"margin-block-end":Xe,"margin-block-start":Xe,"margin-inline":Xe,"margin-inline-end":Xe,"margin-inline-start":Xe,padding:Xe,"padding-bottom":Xe,"padding-left":Xe,"padding-right":Xe,"padding-top":Xe,"padding-block":Xe,"padding-block-end":Xe,"padding-block-start":Xe,"padding-inline":Xe,"padding-inline-end":Xe,"padding-inline-start":Xe,"mask-position-x":Xe,"mask-position-y":Xe,"mask-size":Xe,height:Xe,width:Xe,"min-height":Xe,"max-height":Xe,"min-width":Xe,"max-width":Xe,bottom:Xe,left:Xe,top:Xe,right:Xe,inset:Xe,"inset-block":Xe,"inset-block-end":Xe,"inset-block-start":Xe,"inset-inline":Xe,"inset-inline-end":Xe,"inset-inline-start":Xe,"box-shadow":Xe,"text-shadow":Xe,"column-gap":Xe,"column-rule":Xe,"column-rule-width":Xe,"column-width":Xe,"font-size":Xe,"font-size-delta":Xe,"letter-spacing":Xe,"text-decoration-thickness":Xe,"text-indent":Xe,"text-stroke":Xe,"text-stroke-width":Xe,"word-spacing":Xe,motion:Xe,"motion-offset":Xe,outline:Xe,"outline-offset":Xe,"outline-width":Xe,perspective:Xe,"perspective-origin-x":Qe,"perspective-origin-y":Qe,"transform-origin":Qe,"transform-origin-x":Qe,"transform-origin-y":Qe,"transform-origin-z":Qe,"transition-delay":Ye,"transition-duration":Ye,"vertical-align":Xe,"flex-basis":Xe,"shape-margin":Xe,size:Xe,gap:Xe,grid:Xe,"grid-gap":Xe,"row-gap":Xe,"grid-row-gap":Xe,"grid-column-gap":Xe,"grid-template-rows":Xe,"grid-template-columns":Xe,"grid-auto-rows":Xe,"grid-auto-columns":Xe,"box-shadow-x":Xe,"box-shadow-y":Xe,"box-shadow-blur":Xe,"box-shadow-spread":Xe,"font-line-height":Xe,"text-shadow-x":Xe,"text-shadow-y":Xe,"text-shadow-blur":Xe});function Ze(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=Ze(e,t[r],n);else if("object"===typeof t)if("fallbacks"===e)for(var o in t)t[o]=Ze(o,t[o],n);else for(var i in t)t[i]=Ze(e+"-"+i,t[i],n);else if("number"===typeof t&&!Number.isNaN(t)){var a=n[e]||Je[e];return!a||0===t&&a===Xe?t.toString():"function"===typeof a?a(t).toString():""+t+a}return t}var et=function(e){void 0===e&&(e={});var t=Ge(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=Ze(r,e[r],t);return e},onChangeValue:function(e,n){return Ze(n,e,t)}}},tt=n(29),nt="",rt="",ot="",it="",at=u&&"ontouchstart"in document.documentElement;if(u){var lt={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},ut=document.createElement("p").style;for(var st in lt)if(st+"Transform"in ut){nt=st,rt=lt[st];break}"Webkit"===nt&&"msHyphens"in ut&&(nt="ms",rt=lt.ms,it="edge"),"Webkit"===nt&&"-apple-trailing-word"in ut&&(ot="apple")}var ct=nt,ft=rt,dt=ot,pt=it,ht=at;var vt={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===ct?"-webkit-"+e:ft+e)}},mt={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===ct?ft+"print-"+e:e)}},yt=/[-\s]+(.)?/g;function bt(e,t){return t?t.toUpperCase():""}function gt(e){return e.replace(yt,bt)}function wt(e){return gt("-"+e)}var xt,Ot={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===ct){var n="mask-image";if(gt(n)in t)return e;if(ct+wt(n)in t)return ft+e}return e}},kt={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==dt||ht?e:ft+e)}},St={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:ft+e)}},Et={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:ft+e)}},jt={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===ct||"ms"===ct&&"edge"!==pt?ft+e:e)}},Ct={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===ct||"ms"===ct||"apple"===dt?ft+e:e)}},Pt={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===ct?"WebkitColumn"+wt(e)in t&&ft+"column-"+e:"Moz"===ct&&("page"+wt(e)in t&&"page-"+e))}},_t={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===ct)return e;var n=e.replace("-inline","");return ct+wt(n)in t&&ft+n}},Tt={supportedProperty:function(e,t){return gt(e)in t&&e}},Rt={supportedProperty:function(e,t){var n=wt(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:ct+n in t?ft+e:"Webkit"!==ct&&"Webkit"+n in t&&"-webkit-"+e}},Mt={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===ct?""+ft+e:e)}},Nt={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===ct?ft+"scroll-chaining":e)}},At={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},Lt={supportedProperty:function(e,t){var n=At[e];return!!n&&(ct+wt(n)in t&&ft+n)}},It={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},Dt=Object.keys(It),zt=function(e){return ft+e},Ft=[vt,mt,Ot,kt,St,Et,jt,Ct,Pt,_t,Tt,Rt,Mt,Nt,Lt,{supportedProperty:function(e,t,n){var r=n.multiple;if(Dt.indexOf(e)>-1){var o=It[e];if(!Array.isArray(o))return ct+wt(o)in t&&ft+o;if(!r)return!1;for(var i=0;i<o.length;i++)if(!(ct+wt(o[0])in t))return!1;return o.map(zt)}return!1}}],Wt=Ft.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),$t=Ft.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Object(tt.a)(t.noPrefill)),e}),[]),Ut={};if(u){xt=document.createElement("p");var Bt=window.getComputedStyle(document.documentElement,"");for(var Ht in Bt)isNaN(Ht)||(Ut[Bt[Ht]]=Bt[Ht]);$t.forEach((function(e){return delete Ut[e]}))}function Vt(e,t){if(void 0===t&&(t={}),!xt)return e;if(null!=Ut[e])return Ut[e];"transition"!==e&&"transform"!==e||(t[e]=e in xt.style);for(var n=0;n<Wt.length&&(Ut[e]=Wt[n](e,xt.style,t),!Ut[e]);n++);try{xt.style[e]=""}catch(r){return!1}return Ut[e]}var qt,Kt={},Xt={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Yt=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function Qt(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?Vt(t):", "+Vt(n);return r||(t||n)}function Gt(e,t){var n=t;if(!qt||"content"===e)return t;if("string"!==typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=Kt[r])return Kt[r];try{qt.style[e]=n}catch(o){return Kt[r]=!1,!1}if(Xt[e])n=n.replace(Yt,Qt);else if(""===qt.style[e]&&("-ms-flex"===(n=ft+n)&&(qt.style[e]="-ms-flexbox"),qt.style[e]=n,""===qt.style[e]))return Kt[r]=!1,!1;return qt.style[e]="",Kt[r]=n,Kt[r]}u&&(qt=document.createElement("p"));var Jt=function(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var o=!1,i=Vt(n);i&&i!==n&&(o=!0);var a=!1,l=Gt(i,y(r));l&&l!==r&&(a=!0),(o||a)&&(o&&delete t[n],t[i||n]=l||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at="-"===(n=t.at)[1]||"ms"===ct?n:"@"+ft+"keyframes"+n.substr(10)}var n},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return Gt(t,y(e))||e}}};var Zt=function(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},o=Object.keys(t).sort(e),i=0;i<o.length;i++)r[o[i]]=t[o[i]];return r}}};function en(){return{plugins:[_e(),Ie(),We(),Ke(),et(),"undefined"===typeof window?null:Jt(),Zt()]}}var tn=we(en()),nn={disableGeneration:!1,generateClassName:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,o=void 0===r?"jss":r,i=e.seed,a=void 0===i?"":i,l=""===a?"":"".concat(a,"-"),u=0,s=function(){return u+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==Ee.indexOf(e.key))return"Mui-".concat(e.key);var i="".concat(l).concat(r,"-").concat(e.key);return t.options.theme[Se.a]&&""===a?"".concat(i,"-").concat(s()):i}return"".concat(l).concat(o).concat(s())}}(),jss:tn,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},rn=a.a.createContext(nn);var on=-1e9;function an(){return on+=1}n(34);var ln=n(272);function un(e){var t="function"===typeof e;return{create:function(n,r){var i;try{i=t?e(n):e}catch(u){throw u}if(!r||!n.overrides||!n.overrides[r])return i;var a=n.overrides[r],l=Object(o.a)({},i);return Object.keys(a).forEach((function(e){l[e]=Object(ln.a)(l[e],a[e])})),l},options:{}}}var sn={};function cn(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,o=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,o=!0),o&&(r.cacheClasses.value=Object(xe.a)({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function fn(e,t){var n=e.state,r=e.theme,i=e.stylesOptions,a=e.stylesCreator,l=e.name;if(!i.disableGeneration){var u=Oe.get(i.sheetsManager,a,r);u||(u={refs:0,staticSheet:null,dynamicStyles:null},Oe.set(i.sheetsManager,a,r,u));var s=Object(o.a)({},a.options,i,{theme:r,flip:"boolean"===typeof i.flip?i.flip:"rtl"===r.direction});s.generateId=s.serverGenerateClassName||s.generateClassName;var c=i.sheetsRegistry;if(0===u.refs){var f;i.sheetsCache&&(f=Oe.get(i.sheetsCache,a,r));var d=a.create(r,l);f||((f=i.jss.createStyleSheet(d,Object(o.a)({link:!1},s))).attach(),i.sheetsCache&&Oe.set(i.sheetsCache,a,r,f)),c&&c.add(f),u.staticSheet=f,u.dynamicStyles=be(d)}if(u.dynamicStyles){var p=i.jss.createStyleSheet(u.dynamicStyles,Object(o.a)({link:!0},s));p.update(t),p.attach(),n.dynamicSheet=p,n.classes=Object(xe.a)({baseClasses:u.staticSheet.classes,newClasses:p.classes}),c&&c.add(p)}else n.classes=u.staticSheet.classes;u.refs+=1}}function dn(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function pn(e){var t=e.state,n=e.theme,r=e.stylesOptions,o=e.stylesCreator;if(!r.disableGeneration){var i=Oe.get(r.sheetsManager,o,n);i.refs-=1;var a=r.sheetsRegistry;0===i.refs&&(Oe.delete(r.sheetsManager,o,n),r.jss.removeStyleSheet(i.staticSheet),a&&a.remove(i.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}function hn(e,t){var n,r=a.a.useRef([]),o=a.a.useMemo((function(){return{}}),t);r.current!==o&&(r.current=o,n=e()),a.a.useEffect((function(){return function(){n&&n()}}),[o])}function vn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,i=t.classNamePrefix,l=t.Component,u=t.defaultTheme,s=void 0===u?sn:u,c=Object(r.a)(t,["name","classNamePrefix","Component","defaultTheme"]),f=un(e),d=n||i||"makeStyles";f.options={index:an(),name:n,meta:d,classNamePrefix:d};var p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(ke.a)()||s,r=Object(o.a)({},a.a.useContext(rn),c),i=a.a.useRef(),u=a.a.useRef();hn((function(){var o={name:n,state:{},stylesCreator:f,stylesOptions:r,theme:t};return fn(o,e),u.current=!1,i.current=o,function(){pn(o)}}),[t,f]),a.a.useEffect((function(){u.current&&dn(i.current,e),u.current=!0}));var d=cn(i.current,e.classes,l);return d};return p}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(1),o=n(240),i=n(38);t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(o.a)(e,Object(r.a)({defaultTheme:i.a},t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1);function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var o=Object(r.a)({},t);return Object.keys(n).forEach((function(e){n[e]&&(o[e]="".concat(t[e]," ").concat(n[e]))})),o}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1),o=n(34);function i(e){return e&&"object"===Object(o.a)(e)&&e.constructor===Object}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},o=n.clone?Object(r.a)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((function(r){"__proto__"!==r&&(i(t[r])&&r in e?o[r]=a(e[r],t[r],n):o[r]=t[r])})),o}},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(5)),l=n(6),u=n(7),s=n(239),c=i.forwardRef((function(e,t){var n=e.classes,l=e.className,c=e.color,f=void 0===c?"primary":c,d=e.position,p=void 0===d?"fixed":d,h=Object(o.a)(e,["classes","className","color","position"]);return i.createElement(s.a,Object(r.a)({square:!0,component:"header",elevation:4,className:Object(a.a)(n.root,n["position".concat(Object(u.a)(p))],n["color".concat(Object(u.a)(f))],l,"fixed"===p&&"mui-fixed"),ref:t},h))}));t.a=Object(l.a)((function(e){var t="light"===e.palette.type?e.palette.grey[100]:e.palette.grey[900];return{root:{display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",zIndex:e.zIndex.appBar,flexShrink:0},positionFixed:{position:"fixed",top:0,left:"auto",right:0,"@media print":{position:"absolute"}},positionAbsolute:{position:"absolute",top:0,left:"auto",right:0},positionSticky:{position:"sticky",top:0,left:"auto",right:0},positionStatic:{position:"static"},positionRelative:{position:"relative"},colorDefault:{backgroundColor:t,color:e.palette.getContrastText(t)},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorInherit:{color:"inherit"},colorTransparent:{backgroundColor:"transparent",color:"inherit"}}}),{name:"MuiAppBar"})(c)},function(e,t,n){"use strict";function r(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var o,i=t.props[n];for(o in i)void 0===r[o]&&(r[o]=i[o]);return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(18),a=n(0),l=(n(4),n(5)),u=n(6),s=a.forwardRef((function(e,t){var n=e.classes,i=e.className,u=e.component,s=void 0===u?"div":u,c=e.disableGutters,f=void 0!==c&&c,d=e.variant,p=void 0===d?"regular":d,h=Object(o.a)(e,["classes","className","component","disableGutters","variant"]);return a.createElement(s,Object(r.a)({className:Object(l.a)(n.root,n[p],i,!f&&n.gutters),ref:t},h))}));t.a=Object(u.a)((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:Object(i.a)({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(s)},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=(n(4),n(5)),l=n(6),u=n(16),s=n(77),c=n(7),f=i.forwardRef((function(e,t){var n=e.children,l=e.classes,u=e.className,f=e.color,d=void 0===f?"default":f,p=e.component,h=void 0===p?"button":p,v=e.disabled,m=void 0!==v&&v,y=e.disableElevation,b=void 0!==y&&y,g=e.disableFocusRipple,w=void 0!==g&&g,x=e.endIcon,O=e.focusVisibleClassName,k=e.fullWidth,S=void 0!==k&&k,E=e.size,j=void 0===E?"medium":E,C=e.startIcon,P=e.type,_=void 0===P?"button":P,T=e.variant,R=void 0===T?"text":T,M=Object(r.a)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),N=C&&i.createElement("span",{className:Object(a.a)(l.startIcon,l["iconSize".concat(Object(c.a)(j))])},C),A=x&&i.createElement("span",{className:Object(a.a)(l.endIcon,l["iconSize".concat(Object(c.a)(j))])},x);return i.createElement(s.a,Object(o.a)({className:Object(a.a)(l.root,l[R],u,"inherit"===d?l.colorInherit:"default"!==d&&l["".concat(R).concat(Object(c.a)(d))],"medium"!==j&&[l["".concat(R,"Size").concat(Object(c.a)(j))],l["size".concat(Object(c.a)(j))]],b&&l.disableElevation,m&&l.disabled,S&&l.fullWidth),component:h,disabled:m,focusRipple:!w,focusVisibleClassName:Object(a.a)(l.focusVisible,O),ref:t,type:_},M),i.createElement("span",{className:l.label},N,n,A))}));t.a=Object(l.a)((function(e){return{root:Object(o.a)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:Object(u.b)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(u.b)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(u.b)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(Object(u.b)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:Object(u.b)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(Object(u.b)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:Object(u.b)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(f)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(5)),l=n(6),u=n(16),s=n(77),c=n(7),f=i.forwardRef((function(e,t){var n=e.edge,l=void 0!==n&&n,u=e.children,f=e.classes,d=e.className,p=e.color,h=void 0===p?"default":p,v=e.disabled,m=void 0!==v&&v,y=e.disableFocusRipple,b=void 0!==y&&y,g=e.size,w=void 0===g?"medium":g,x=Object(o.a)(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return i.createElement(s.a,Object(r.a)({className:Object(a.a)(f.root,d,"default"!==h&&f["color".concat(Object(c.a)(h))],m&&f.disabled,"small"===w&&f["size".concat(Object(c.a)(w))],{start:f.edgeStart,end:f.edgeEnd}[l]),centerRipple:!0,focusRipple:!b,disabled:m,ref:t},x),i.createElement("span",{className:f.label},u))}));t.a=Object(l.a)((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:Object(u.b)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(u.b)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(u.b)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(f)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(5)),l=n(6),u=n(42),s=i.forwardRef((function(e,t){var n=e.children,l=e.classes,s=e.className,c=e.component,f=void 0===c?"ul":c,d=e.dense,p=void 0!==d&&d,h=e.disablePadding,v=void 0!==h&&h,m=e.subheader,y=Object(o.a)(e,["children","classes","className","component","dense","disablePadding","subheader"]),b=i.useMemo((function(){return{dense:p}}),[p]);return i.createElement(u.a.Provider,{value:b},i.createElement(f,Object(r.a)({className:Object(a.a)(l.root,s,p&&l.dense,!v&&l.padding,m&&l.subheader),ref:t},y),m,n))}));t.a=Object(l.a)({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(s)},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(5)),l=n(6),u=n(77),s=n(28),c=n(9),f=n(42),d=n(10),p="undefined"===typeof window?i.useEffect:i.useLayoutEffect,h=i.forwardRef((function(e,t){var n=e.alignItems,l=void 0===n?"center":n,h=e.autoFocus,v=void 0!==h&&h,m=e.button,y=void 0!==m&&m,b=e.children,g=e.classes,w=e.className,x=e.component,O=e.ContainerComponent,k=void 0===O?"li":O,S=e.ContainerProps,E=(S=void 0===S?{}:S).className,j=Object(o.a)(S,["className"]),C=e.dense,P=void 0!==C&&C,_=e.disabled,T=void 0!==_&&_,R=e.disableGutters,M=void 0!==R&&R,N=e.divider,A=void 0!==N&&N,L=e.focusVisibleClassName,I=e.selected,D=void 0!==I&&I,z=Object(o.a)(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),F=i.useContext(f.a),W={dense:P||F.dense||!1,alignItems:l},$=i.useRef(null);p((function(){v&&$.current&&$.current.focus()}),[v]);var U=i.Children.toArray(b),B=U.length&&Object(s.a)(U[U.length-1],["ListItemSecondaryAction"]),H=i.useCallback((function(e){$.current=d.findDOMNode(e)}),[]),V=Object(c.a)(H,t),q=Object(r.a)({className:Object(a.a)(g.root,w,W.dense&&g.dense,!M&&g.gutters,A&&g.divider,T&&g.disabled,y&&g.button,"center"!==l&&g.alignItemsFlexStart,B&&g.secondaryAction,D&&g.selected),disabled:T},z),K=x||"li";return y&&(q.component=x||"div",q.focusVisibleClassName=Object(a.a)(g.focusVisible,L),K=u.a),B?(K=q.component||x?K:"div","li"===k&&("li"===K?K="div":"li"===q.component&&(q.component="div")),i.createElement(f.a.Provider,{value:W},i.createElement(k,Object(r.a)({className:Object(a.a)(g.container,E),ref:V},j),i.createElement(K,q,U),U.pop()))):i.createElement(f.a.Provider,{value:W},i.createElement(K,Object(r.a)({ref:V},q),U))}));t.a=Object(l.a)((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(h)},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=(n(4),n(5)),l=n(6),u=[0,1,2,3,4,5,6,7,8,9,10],s=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=parseFloat(e);return"".concat(n/t).concat(String(e).replace(String(n),"")||"px")}var f=i.forwardRef((function(e,t){var n=e.alignContent,l=void 0===n?"stretch":n,u=e.alignItems,s=void 0===u?"stretch":u,c=e.classes,f=e.className,d=e.component,p=void 0===d?"div":d,h=e.container,v=void 0!==h&&h,m=e.direction,y=void 0===m?"row":m,b=e.item,g=void 0!==b&&b,w=e.justify,x=void 0===w?"flex-start":w,O=e.lg,k=void 0!==O&&O,S=e.md,E=void 0!==S&&S,j=e.sm,C=void 0!==j&&j,P=e.spacing,_=void 0===P?0:P,T=e.wrap,R=void 0===T?"wrap":T,M=e.xl,N=void 0!==M&&M,A=e.xs,L=void 0!==A&&A,I=e.zeroMinWidth,D=void 0!==I&&I,z=Object(r.a)(e,["alignContent","alignItems","classes","className","component","container","direction","item","justify","lg","md","sm","spacing","wrap","xl","xs","zeroMinWidth"]),F=Object(a.a)(c.root,f,v&&[c.container,0!==_&&c["spacing-xs-".concat(String(_))]],g&&c.item,D&&c.zeroMinWidth,"row"!==y&&c["direction-xs-".concat(String(y))],"wrap"!==R&&c["wrap-xs-".concat(String(R))],"stretch"!==s&&c["align-items-xs-".concat(String(s))],"stretch"!==l&&c["align-content-xs-".concat(String(l))],"flex-start"!==x&&c["justify-xs-".concat(String(x))],!1!==L&&c["grid-xs-".concat(String(L))],!1!==C&&c["grid-sm-".concat(String(C))],!1!==E&&c["grid-md-".concat(String(E))],!1!==k&&c["grid-lg-".concat(String(k))],!1!==N&&c["grid-xl-".concat(String(N))]);return i.createElement(p,Object(o.a)({className:F,ref:t},z))})),d=Object(l.a)((function(e){return Object(o.a)({root:{},container:{boxSizing:"border-box",display:"flex",flexWrap:"wrap",width:"100%"},item:{boxSizing:"border-box",margin:"0"},zeroMinWidth:{minWidth:0},"direction-xs-column":{flexDirection:"column"},"direction-xs-column-reverse":{flexDirection:"column-reverse"},"direction-xs-row-reverse":{flexDirection:"row-reverse"},"wrap-xs-nowrap":{flexWrap:"nowrap"},"wrap-xs-wrap-reverse":{flexWrap:"wrap-reverse"},"align-items-xs-center":{alignItems:"center"},"align-items-xs-flex-start":{alignItems:"flex-start"},"align-items-xs-flex-end":{alignItems:"flex-end"},"align-items-xs-baseline":{alignItems:"baseline"},"align-content-xs-center":{alignContent:"center"},"align-content-xs-flex-start":{alignContent:"flex-start"},"align-content-xs-flex-end":{alignContent:"flex-end"},"align-content-xs-space-between":{alignContent:"space-between"},"align-content-xs-space-around":{alignContent:"space-around"},"justify-xs-center":{justifyContent:"center"},"justify-xs-flex-end":{justifyContent:"flex-end"},"justify-xs-space-between":{justifyContent:"space-between"},"justify-xs-space-around":{justifyContent:"space-around"},"justify-xs-space-evenly":{justifyContent:"space-evenly"}},function(e,t){var n={};return u.forEach((function(r){var o=e.spacing(r);0!==o&&(n["spacing-".concat(t,"-").concat(r)]={margin:"-".concat(c(o,2)),width:"calc(100% + ".concat(c(o),")"),"& > $item":{padding:c(o,2)}})})),n}(e,"xs"),e.breakpoints.keys.reduce((function(t,n){return function(e,t,n){var r={};s.forEach((function(e){var t="grid-".concat(n,"-").concat(e);if(!0!==e)if("auto"!==e){var o="".concat(Math.round(e/12*1e8)/1e6,"%");r[t]={flexBasis:o,flexGrow:0,maxWidth:o}}else r[t]={flexBasis:"auto",flexGrow:0,maxWidth:"none"};else r[t]={flexBasis:0,flexGrow:1,maxWidth:"100%"}})),"xs"===n?Object(o.a)(e,r):e[t.breakpoints.up(n)]=r}(t,e,n),t}),{}))}),{name:"MuiGrid"})(f);t.a=d},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(5)),l=n(6),u=n(7),s={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},c=i.forwardRef((function(e,t){var n=e.align,l=void 0===n?"inherit":n,c=e.classes,f=e.className,d=e.color,p=void 0===d?"initial":d,h=e.component,v=e.display,m=void 0===v?"initial":v,y=e.gutterBottom,b=void 0!==y&&y,g=e.noWrap,w=void 0!==g&&g,x=e.paragraph,O=void 0!==x&&x,k=e.variant,S=void 0===k?"body1":k,E=e.variantMapping,j=void 0===E?s:E,C=Object(o.a)(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),P=h||(O?"p":j[S]||s[S])||"span";return i.createElement(P,Object(r.a)({className:Object(a.a)(c.root,f,"inherit"!==S&&c[S],"initial"!==p&&c["color".concat(Object(u.a)(p))],w&&c.noWrap,b&&c.gutterBottom,O&&c.paragraph,"inherit"!==l&&c["align".concat(Object(u.a)(l))],"initial"!==m&&c["display".concat(Object(u.a)(m))]),ref:t},C))}));t.a=Object(l.a)((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(c)},function(e,t,n){"use strict";var r=n(1),o=n(0),i=n.n(o),a=(n(4),n(59)),l=n(108),u=n(61);t.a=function(e){var t=e.children,n=e.theme,o=Object(l.a)(),s=i.a.useMemo((function(){var e=null===o?n:function(e,t){return"function"===typeof t?t(e):Object(r.a)({},e,t)}(o,n);return null!=e&&(e[u.a]=null!==o),e}),[n,o]);return i.a.createElement(a.a.Provider,{value:s},t)}},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=(n(4),n(5)),l=n(109);function u(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e}),{})}var s=i.createContext();var c=s,f=n(6),d=n(7),p=n(9),h=n(27);function v(e,t){return parseInt(e[t],10)||0}var m="undefined"!==typeof window?i.useLayoutEffect:i.useEffect,y={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"},b=i.forwardRef((function(e,t){var n=e.onChange,a=e.rows,l=e.rowsMax,u=e.rowsMin,s=void 0===u?1:u,c=e.style,f=e.value,d=Object(o.a)(e,["onChange","rows","rowsMax","rowsMin","style","value"]),b=a||s,g=i.useRef(null!=f).current,w=i.useRef(null),x=Object(p.a)(t,w),O=i.useRef(null),k=i.useRef(0),S=i.useState({}),E=S[0],j=S[1],C=i.useCallback((function(){var t=w.current,n=window.getComputedStyle(t),r=O.current;r.style.width=n.width,r.value=t.value||e.placeholder||"x","\n"===r.value.slice(-1)&&(r.value+=" ");var o=n["box-sizing"],i=v(n,"padding-bottom")+v(n,"padding-top"),a=v(n,"border-bottom-width")+v(n,"border-top-width"),u=r.scrollHeight-i;r.value="x";var s=r.scrollHeight-i,c=u;b&&(c=Math.max(Number(b)*s,c)),l&&(c=Math.min(Number(l)*s,c));var f=(c=Math.max(c,s))+("border-box"===o?i+a:0),d=Math.abs(c-u)<=1;j((function(e){return k.current<20&&(f>0&&Math.abs((e.outerHeightStyle||0)-f)>1||e.overflow!==d)?(k.current+=1,{overflow:d,outerHeightStyle:f}):e}))}),[l,b,e.placeholder]);i.useEffect((function(){var e=Object(h.a)((function(){k.current=0,C()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[C]),m((function(){C()})),i.useEffect((function(){k.current=0}),[f]);return i.createElement(i.Fragment,null,i.createElement("textarea",Object(r.a)({value:f,onChange:function(e){k.current=0,g||C(),n&&n(e)},ref:x,rows:b,style:Object(r.a)({height:E.outerHeightStyle,overflow:E.overflow?"hidden":null},c)},d)),i.createElement("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:O,tabIndex:-1,style:Object(r.a)({},y,c)}))}));function g(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function w(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(g(e.value)&&""!==e.value||t&&g(e.defaultValue)&&""!==e.defaultValue)}var x="undefined"===typeof window?i.useEffect:i.useLayoutEffect,O=i.forwardRef((function(e,t){var n=e["aria-describedby"],f=e.autoComplete,h=e.autoFocus,v=e.classes,m=e.className,y=(e.color,e.defaultValue),g=e.disabled,O=e.endAdornment,k=(e.error,e.fullWidth),S=void 0!==k&&k,E=e.id,j=e.inputComponent,C=void 0===j?"input":j,P=e.inputProps,_=void 0===P?{}:P,T=e.inputRef,R=(e.margin,e.multiline),M=void 0!==R&&R,N=e.name,A=e.onBlur,L=e.onChange,I=e.onClick,D=e.onFocus,z=e.onKeyDown,F=e.onKeyUp,W=e.placeholder,$=e.readOnly,U=e.renderSuffix,B=e.rows,H=e.rowsMax,V=e.rowsMin,q=e.startAdornment,K=e.type,X=void 0===K?"text":K,Y=e.value,Q=Object(o.a)(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","startAdornment","type","value"]),G=null!=_.value?_.value:Y,J=i.useRef(null!=G).current,Z=i.useRef(),ee=i.useCallback((function(e){0}),[]),te=Object(p.a)(_.ref,ee),ne=Object(p.a)(T,te),re=Object(p.a)(Z,ne),oe=i.useState(!1),ie=oe[0],ae=oe[1],le=i.useContext(s);var ue=u({props:e,muiFormControl:le,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});ue.focused=le?le.focused:ie,i.useEffect((function(){!le&&g&&ie&&(ae(!1),A&&A())}),[le,g,ie,A]);var se=le&&le.onFilled,ce=le&&le.onEmpty,fe=i.useCallback((function(e){w(e)?se&&se():ce&&ce()}),[se,ce]);x((function(){J&&fe({value:G})}),[G,fe,J]);i.useEffect((function(){fe(Z.current)}),[]);var de=C,pe=Object(r.a)({},_,{ref:re});"string"!==typeof de?pe=Object(r.a)({inputRef:re,type:X},pe,{ref:null}):M?!B||H||V?(pe=Object(r.a)({rows:B,rowsMax:H},pe),de=b):de="textarea":pe=Object(r.a)({type:X},pe);return i.useEffect((function(){le&&le.setAdornedStart(Boolean(q))}),[le,q]),i.createElement("div",Object(r.a)({className:Object(a.a)(v.root,v["color".concat(Object(d.a)(ue.color||"primary"))],m,ue.disabled&&v.disabled,ue.error&&v.error,S&&v.fullWidth,ue.focused&&v.focused,le&&v.formControl,M&&v.multiline,q&&v.adornedStart,O&&v.adornedEnd,"dense"===ue.margin&&v.marginDense),onClick:function(e){Z.current&&e.currentTarget===e.target&&Z.current.focus(),I&&I(e)},ref:t},Q),q,i.createElement(c.Provider,{value:null},i.createElement(de,Object(r.a)({"aria-invalid":ue.error,"aria-describedby":n,autoComplete:f,autoFocus:h,defaultValue:y,disabled:ue.disabled,id:E,onAnimationStart:function(e){fe("mui-auto-fill-cancel"===e.animationName?Z.current:{value:"x"})},name:N,placeholder:W,readOnly:$,required:ue.required,rows:B,value:G,onKeyDown:z,onKeyUp:F},pe,{className:Object(a.a)(v.input,_.className,ue.disabled&&v.disabled,M&&v.inputMultiline,ue.hiddenLabel&&v.inputHiddenLabel,q&&v.inputAdornedStart,O&&v.inputAdornedEnd,"search"===X&&v.inputTypeSearch,"dense"===ue.margin&&v.inputMarginDense),onBlur:function(e){A&&A(e),_.onBlur&&_.onBlur(e),le&&le.onBlur?le.onBlur(e):ae(!1)},onChange:function(e){if(!J){var t=e.target||Z.current;if(null==t)throw new Error(Object(l.a)(1));fe({value:t.value})}for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];_.onChange&&_.onChange.apply(_,[e].concat(r)),L&&L.apply(void 0,[e].concat(r))},onFocus:function(e){ue.disabled?e.stopPropagation():(D&&D(e),_.onFocus&&_.onFocus(e),le&&le.onFocus?le.onFocus(e):ae(!0))}}))),O,U?U(Object(r.a)({},ue,{startAdornment:q})):null)})),k=Object(f.a)((function(e){var t="light"===e.palette.type,n={color:"currentColor",opacity:t?.42:.5,transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},o={opacity:"0 !important"},i={opacity:t?.42:.5};return{"@global":{"@keyframes mui-auto-fill":{},"@keyframes mui-auto-fill-cancel":{}},root:Object(r.a)({},e.typography.body1,{color:e.palette.text.primary,lineHeight:"1.1876em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center","&$disabled":{color:e.palette.text.disabled,cursor:"default"}}),formControl:{},focused:{},disabled:{},adornedStart:{},adornedEnd:{},error:{},marginDense:{},multiline:{padding:"".concat(6,"px 0 ").concat(7,"px"),"&$marginDense":{paddingTop:3}},colorSecondary:{},fullWidth:{width:"100%"},input:{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"".concat(6,"px 0 ").concat(7,"px"),border:0,boxSizing:"content-box",background:"none",height:"1.1876em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{"-webkit-appearance":"none"},"label[data-shrink=false] + $formControl &":{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus:-ms-input-placeholder":i,"&:focus::-ms-input-placeholder":i},"&$disabled":{opacity:1},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},inputMarginDense:{paddingTop:3},inputMultiline:{height:"auto",resize:"none",padding:0},inputTypeSearch:{"-moz-appearance":"textfield","-webkit-appearance":"textfield"},inputAdornedStart:{},inputAdornedEnd:{},inputHiddenLabel:{}}}),{name:"MuiInputBase"})(O),S=i.forwardRef((function(e,t){var n=e.disableUnderline,l=e.classes,u=e.fullWidth,s=void 0!==u&&u,c=e.inputComponent,f=void 0===c?"input":c,d=e.multiline,p=void 0!==d&&d,h=e.type,v=void 0===h?"text":h,m=Object(o.a)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return i.createElement(k,Object(r.a)({classes:Object(r.a)({},l,{root:Object(a.a)(l.root,!n&&l.underline),underline:null}),fullWidth:s,inputComponent:f,multiline:p,ref:t,type:v},m))}));S.muiName="Input";var E=Object(f.a)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(t),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(t)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}}),{name:"MuiInput"})(S),j=i.forwardRef((function(e,t){var n=e.disableUnderline,l=e.classes,u=e.fullWidth,s=void 0!==u&&u,c=e.inputComponent,f=void 0===c?"input":c,d=e.multiline,p=void 0!==d&&d,h=e.type,v=void 0===h?"text":h,m=Object(o.a)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return i.createElement(k,Object(r.a)({classes:Object(r.a)({},l,{root:Object(a.a)(l.root,!n&&l.underline),underline:null}),fullWidth:s,inputComponent:f,multiline:p,ref:t,type:v},m))}));j.muiName="Input";var C=Object(f.a)((function(e){var t="light"===e.palette.type,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:r,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:t?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:r}},"&$focused":{backgroundColor:t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)"},"&$disabled":{backgroundColor:t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(n),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:before":{borderBottom:"1px solid ".concat(e.palette.text.primary)},"&$disabled:before":{borderBottomStyle:"dotted"}},focused:{},disabled:{},adornedStart:{paddingLeft:12},adornedEnd:{paddingRight:12},error:{},marginDense:{},multiline:{padding:"27px 12px 10px","&$marginDense":{paddingTop:23,paddingBottom:6}},input:{padding:"27px 12px 10px","&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.type?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.type?null:"#fff",caretColor:"light"===e.palette.type?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},inputMarginDense:{paddingTop:23,paddingBottom:6},inputHiddenLabel:{paddingTop:18,paddingBottom:19,"&$inputMarginDense":{paddingTop:10,paddingBottom:11}},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiFilledInput"})(j),P=n(18),_=n(12),T=i.forwardRef((function(e,t){e.children;var n=e.classes,l=e.className,u=e.label,s=e.labelWidth,c=e.notched,f=e.style,p=Object(o.a)(e,["children","classes","className","label","labelWidth","notched","style"]),h="rtl"===Object(_.a)().direction?"right":"left";if(void 0!==u)return i.createElement("fieldset",Object(r.a)({"aria-hidden":!0,className:Object(a.a)(n.root,l),ref:t,style:f},p),i.createElement("legend",{className:Object(a.a)(n.legendLabelled,c&&n.legendNotched)},u?i.createElement("span",null,u):i.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}})));var v=s>0?.75*s+8:.01;return i.createElement("fieldset",Object(r.a)({"aria-hidden":!0,style:Object(r.a)(Object(P.a)({},"padding".concat(Object(d.a)(h)),8),f),className:Object(a.a)(n.root,l),ref:t},p),i.createElement("legend",{className:n.legend,style:{width:c?v:.01}},i.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}})))})),R=Object(f.a)((function(e){return{root:{position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden"},legend:{textAlign:"left",padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},legendLabelled:{display:"block",width:"auto",textAlign:"left",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),"& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},legendNotched:{maxWidth:1e3,transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}}),{name:"PrivateNotchedOutline"})(T),M=i.forwardRef((function(e,t){var n=e.classes,l=e.fullWidth,u=void 0!==l&&l,s=e.inputComponent,c=void 0===s?"input":s,f=e.label,d=e.labelWidth,p=void 0===d?0:d,h=e.multiline,v=void 0!==h&&h,m=e.notched,y=e.type,b=void 0===y?"text":y,g=Object(o.a)(e,["classes","fullWidth","inputComponent","label","labelWidth","multiline","notched","type"]);return i.createElement(k,Object(r.a)({renderSuffix:function(e){return i.createElement(R,{className:n.notchedOutline,label:f,labelWidth:p,notched:"undefined"!==typeof m?m:Boolean(e.startAdornment||e.filled||e.focused)})},classes:Object(r.a)({},n,{root:Object(a.a)(n.root,n.underline),notchedOutline:null}),fullWidth:u,inputComponent:c,multiline:v,ref:t,type:b},g))}));M.muiName="Input";var N=Object(f.a)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative",borderRadius:e.shape.borderRadius,"&:hover $notchedOutline":{borderColor:e.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:t}},"&$focused $notchedOutline":{borderColor:e.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:e.palette.error.main},"&$disabled $notchedOutline":{borderColor:e.palette.action.disabled}},colorSecondary:{"&$focused $notchedOutline":{borderColor:e.palette.secondary.main}},focused:{},disabled:{},adornedStart:{paddingLeft:14},adornedEnd:{paddingRight:14},error:{},marginDense:{},multiline:{padding:"18.5px 14px","&$marginDense":{paddingTop:10.5,paddingBottom:10.5}},notchedOutline:{borderColor:t},input:{padding:"18.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.type?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.type?null:"#fff",caretColor:"light"===e.palette.type?null:"#fff",borderRadius:"inherit"}},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiOutlinedInput"})(M);function A(){return i.useContext(c)}var L=i.forwardRef((function(e,t){var n=e.children,l=e.classes,s=e.className,c=(e.color,e.component),f=void 0===c?"label":c,p=(e.disabled,e.error,e.filled,e.focused,e.required,Object(o.a)(e,["children","classes","className","color","component","disabled","error","filled","focused","required"])),h=u({props:e,muiFormControl:A(),states:["color","required","focused","disabled","error","filled"]});return i.createElement(f,Object(r.a)({className:Object(a.a)(l.root,l["color".concat(Object(d.a)(h.color||"primary"))],s,h.disabled&&l.disabled,h.error&&l.error,h.filled&&l.filled,h.focused&&l.focused,h.required&&l.required),ref:t},p),n,h.required&&i.createElement("span",{"aria-hidden":!0,className:Object(a.a)(l.asterisk,h.error&&l.error)},"\u2009","*"))})),I=Object(f.a)((function(e){return{root:Object(r.a)({color:e.palette.text.secondary},e.typography.body1,{lineHeight:1,padding:0,"&$focused":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),colorSecondary:{"&$focused":{color:e.palette.secondary.main}},focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:e.palette.error.main}}}}),{name:"MuiFormLabel"})(L),D=i.forwardRef((function(e,t){var n=e.classes,l=e.className,s=e.disableAnimation,c=void 0!==s&&s,f=(e.margin,e.shrink),d=(e.variant,Object(o.a)(e,["classes","className","disableAnimation","margin","shrink","variant"])),p=A(),h=f;"undefined"===typeof h&&p&&(h=p.filled||p.focused||p.adornedStart);var v=u({props:e,muiFormControl:p,states:["margin","variant"]});return i.createElement(I,Object(r.a)({"data-shrink":h,className:Object(a.a)(n.root,l,p&&n.formControl,!c&&n.animated,h&&n.shrink,"dense"===v.margin&&n.marginDense,{filled:n.filled,outlined:n.outlined}[v.variant]),classes:{focused:n.focused,disabled:n.disabled,error:n.error,required:n.required,asterisk:n.asterisk},ref:t},d))})),z=Object(f.a)((function(e){return{root:{display:"block",transformOrigin:"top left"},focused:{},disabled:{},error:{},required:{},asterisk:{},formControl:{position:"absolute",left:0,top:0,transform:"translate(0, 24px) scale(1)"},marginDense:{transform:"translate(0, 21px) scale(1)"},shrink:{transform:"translate(0, 1.5px) scale(0.75)",transformOrigin:"top left"},animated:{transition:e.transitions.create(["color","transform"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},filled:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 20px) scale(1)","&$marginDense":{transform:"translate(12px, 17px) scale(1)"},"&$shrink":{transform:"translate(12px, 10px) scale(0.75)","&$marginDense":{transform:"translate(12px, 7px) scale(0.75)"}}},outlined:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 20px) scale(1)","&$marginDense":{transform:"translate(14px, 12px) scale(1)"},"&$shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}}),{name:"MuiInputLabel"})(D),F=n(28),W=i.forwardRef((function(e,t){var n=e.children,l=e.classes,u=e.className,s=e.color,f=void 0===s?"primary":s,p=e.component,h=void 0===p?"div":p,v=e.disabled,m=void 0!==v&&v,y=e.error,b=void 0!==y&&y,g=e.fullWidth,x=void 0!==g&&g,O=e.focused,k=e.hiddenLabel,S=void 0!==k&&k,E=e.margin,j=void 0===E?"none":E,C=e.required,P=void 0!==C&&C,_=e.size,T=e.variant,R=void 0===T?"standard":T,M=Object(o.a)(e,["children","classes","className","color","component","disabled","error","fullWidth","focused","hiddenLabel","margin","required","size","variant"]),N=i.useState((function(){var e=!1;return n&&i.Children.forEach(n,(function(t){if(Object(F.a)(t,["Input","Select"])){var n=Object(F.a)(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)}})),e})),A=N[0],L=N[1],I=i.useState((function(){var e=!1;return n&&i.Children.forEach(n,(function(t){Object(F.a)(t,["Input","Select"])&&w(t.props,!0)&&(e=!0)})),e})),D=I[0],z=I[1],W=i.useState(!1),$=W[0],U=W[1],B=void 0!==O?O:$;m&&B&&U(!1);var H=i.useCallback((function(){z(!0)}),[]),V={adornedStart:A,setAdornedStart:L,color:f,disabled:m,error:b,filled:D,focused:B,fullWidth:x,hiddenLabel:S,margin:("small"===_?"dense":void 0)||j,onBlur:function(){U(!1)},onEmpty:i.useCallback((function(){z(!1)}),[]),onFilled:H,onFocus:function(){U(!0)},registerEffect:undefined,required:P,variant:R};return i.createElement(c.Provider,{value:V},i.createElement(h,Object(r.a)({className:Object(a.a)(l.root,u,"none"!==j&&l["margin".concat(Object(d.a)(j))],x&&l.fullWidth),ref:t},M),n))})),$=Object(f.a)({root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}},{name:"MuiFormControl"})(W),U=i.forwardRef((function(e,t){var n=e.children,l=e.classes,s=e.className,c=e.component,f=void 0===c?"p":c,d=(e.disabled,e.error,e.filled,e.focused,e.margin,e.required,e.variant,Object(o.a)(e,["children","classes","className","component","disabled","error","filled","focused","margin","required","variant"])),p=u({props:e,muiFormControl:A(),states:["variant","margin","disabled","error","filled","focused","required"]});return i.createElement(f,Object(r.a)({className:Object(a.a)(l.root,("filled"===p.variant||"outlined"===p.variant)&&l.contained,s,p.disabled&&l.disabled,p.error&&l.error,p.filled&&l.filled,p.focused&&l.focused,p.required&&l.required,"dense"===p.margin&&l.marginDense),ref:t},d)," "===n?i.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):n)})),B=Object(f.a)((function(e){return{root:Object(r.a)({color:e.palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,margin:0,"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),error:{},disabled:{},marginDense:{marginTop:4},contained:{marginLeft:14,marginRight:14},focused:{},filled:{},required:{}}}),{name:"MuiFormHelperText"})(U),H=n(271),V=n(30),q=n(34),K=(n(69),n(13)),X=n(10),Y=n(37),Q=n(35),G=n(285),J=n(287),Z=n(20);function ee(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var te={entering:{opacity:1,transform:ee(1)},entered:{opacity:1,transform:"none"}},ne=i.forwardRef((function(e,t){var n=e.children,a=e.disableStrictModeCompat,l=void 0!==a&&a,u=e.in,s=e.onEnter,c=e.onEntered,f=e.onEntering,d=e.onExit,h=e.onExited,v=e.onExiting,m=e.style,y=e.timeout,b=void 0===y?"auto":y,g=e.TransitionComponent,w=void 0===g?J.a:g,x=Object(o.a)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),O=i.useRef(),k=i.useRef(),S=Object(_.a)(),E=S.unstable_strictMode&&!l,j=i.useRef(null),C=Object(p.a)(n.ref,t),P=Object(p.a)(E?j:void 0,C),T=function(e){return function(t,n){if(e){var r=E?[j.current,t]:[t,n],o=Object(V.a)(r,2),i=o[0],a=o[1];void 0===a?e(i):e(i,a)}}},R=T(f),M=T((function(e,t){Object(Z.b)(e);var n,r=Object(Z.a)({style:m,timeout:b},{mode:"enter"}),o=r.duration,i=r.delay;"auto"===b?(n=S.transitions.getAutoHeightDuration(e.clientHeight),k.current=n):n=o,e.style.transition=[S.transitions.create("opacity",{duration:n,delay:i}),S.transitions.create("transform",{duration:.666*n,delay:i})].join(","),s&&s(e,t)})),N=T(c),A=T(v),L=T((function(e){var t,n=Object(Z.a)({style:m,timeout:b},{mode:"exit"}),r=n.duration,o=n.delay;"auto"===b?(t=S.transitions.getAutoHeightDuration(e.clientHeight),k.current=t):t=r,e.style.transition=[S.transitions.create("opacity",{duration:t,delay:o}),S.transitions.create("transform",{duration:.666*t,delay:o||.333*t})].join(","),e.style.opacity="0",e.style.transform=ee(.75),d&&d(e)})),I=T(h);return i.useEffect((function(){return function(){clearTimeout(O.current)}}),[]),i.createElement(w,Object(r.a)({appear:!0,in:u,nodeRef:E?j:void 0,onEnter:M,onEntered:N,onEntering:R,onExit:L,onExited:I,onExiting:A,addEndListener:function(e,t){var n=E?e:t;"auto"===b&&(O.current=setTimeout(n,k.current||0))},timeout:"auto"===b?null:b},x),(function(e,t){return i.cloneElement(n,Object(r.a)({style:Object(r.a)({opacity:0,transform:ee(.75),visibility:"exited"!==e||u?void 0:"hidden"},te[e],m,n.props.style),ref:P},t))}))}));ne.muiSupportAuto=!0;var re=ne,oe=n(239);function ie(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function ae(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function le(e){return[e.horizontal,e.vertical].map((function(e){return"number"===typeof e?"".concat(e,"px"):e})).join(" ")}function ue(e){return"function"===typeof e?e():e}var se=i.forwardRef((function(e,t){var n=e.action,l=e.anchorEl,u=e.anchorOrigin,s=void 0===u?{vertical:"top",horizontal:"left"}:u,c=e.anchorPosition,f=e.anchorReference,d=void 0===f?"anchorEl":f,p=e.children,v=e.classes,m=e.className,y=e.container,b=e.elevation,g=void 0===b?8:b,w=e.getContentAnchorEl,x=e.marginThreshold,O=void 0===x?16:x,k=e.onEnter,S=e.onEntered,E=e.onEntering,j=e.onExit,C=e.onExited,P=e.onExiting,_=e.open,T=e.PaperProps,R=void 0===T?{}:T,M=e.transformOrigin,N=void 0===M?{vertical:"top",horizontal:"left"}:M,A=e.TransitionComponent,L=void 0===A?re:A,I=e.transitionDuration,D=void 0===I?"auto":I,z=e.TransitionProps,F=void 0===z?{}:z,W=Object(o.a)(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),$=i.useRef(),U=i.useCallback((function(e){if("anchorPosition"===d)return c;var t=ue(l),n=(t&&1===t.nodeType?t:Object(K.a)($.current).body).getBoundingClientRect(),r=0===e?s.vertical:"center";return{top:n.top+ie(n,r),left:n.left+ae(n,s.horizontal)}}),[l,s.horizontal,s.vertical,c,d]),B=i.useCallback((function(e){var t=0;if(w&&"anchorEl"===d){var n=w(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}0}return t}),[s.vertical,d,w]),H=i.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:ie(e,N.vertical)+t,horizontal:ae(e,N.horizontal)}}),[N.horizontal,N.vertical]),V=i.useCallback((function(e){var t=B(e),n={width:e.offsetWidth,height:e.offsetHeight},r=H(n,t);if("none"===d)return{top:null,left:null,transformOrigin:le(r)};var o=U(t),i=o.top-r.vertical,a=o.left-r.horizontal,u=i+n.height,s=a+n.width,c=Object(Y.a)(ue(l)),f=c.innerHeight-O,p=c.innerWidth-O;if(i<O){var h=i-O;i-=h,r.vertical+=h}else if(u>f){var v=u-f;i-=v,r.vertical+=v}if(a<O){var m=a-O;a-=m,r.horizontal+=m}else if(s>p){var y=s-p;a-=y,r.horizontal+=y}return{top:"".concat(Math.round(i),"px"),left:"".concat(Math.round(a),"px"),transformOrigin:le(r)}}),[l,d,U,B,H,O]),q=i.useCallback((function(){var e=$.current;if(e){var t=V(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[V]),J=i.useCallback((function(e){$.current=X.findDOMNode(e)}),[]);i.useEffect((function(){_&&q()})),i.useImperativeHandle(n,(function(){return _?{updatePosition:function(){q()}}:null}),[_,q]),i.useEffect((function(){if(_){var e=Object(h.a)((function(){q()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[_,q]);var Z=D;"auto"!==D||L.muiSupportAuto||(Z=void 0);var ee=y||(l?Object(K.a)(ue(l)).body:void 0);return i.createElement(G.a,Object(r.a)({container:ee,open:_,ref:t,BackdropProps:{invisible:!0},className:Object(a.a)(v.root,m)},W),i.createElement(L,Object(r.a)({appear:!0,in:_,onEnter:k,onEntered:S,onExit:j,onExited:C,onExiting:P,timeout:Z},F,{onEntering:Object(Q.a)((function(e,t){E&&E(e,t),q()}),F.onEntering)}),i.createElement(oe.a,Object(r.a)({elevation:g,ref:J},R,{className:Object(a.a)(v.paper,R.className)}),p)))})),ce=Object(f.a)({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(se),fe=n(278),de=n(63);function pe(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function he(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function ve(e,t){if(void 0===t)return!0;var n=e.innerText;return void 0===n&&(n=e.textContent),0!==(n=n.trim().toLowerCase()).length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function me(e,t,n,r,o,i){for(var a=!1,l=o(e,t,!!t&&n);l;){if(l===e.firstChild){if(a)return;a=!0}var u=!r&&(l.disabled||"true"===l.getAttribute("aria-disabled"));if(l.hasAttribute("tabindex")&&ve(l,i)&&!u)return void l.focus();l=o(e,l,n)}}var ye="undefined"===typeof window?i.useEffect:i.useLayoutEffect,be=i.forwardRef((function(e,t){var n=e.actions,a=e.autoFocus,l=void 0!==a&&a,u=e.autoFocusItem,s=void 0!==u&&u,c=e.children,f=e.className,d=e.disabledItemsFocusable,h=void 0!==d&&d,v=e.disableListWrap,m=void 0!==v&&v,y=e.onKeyDown,b=e.variant,g=void 0===b?"selectedMenu":b,w=Object(o.a)(e,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),x=i.useRef(null),O=i.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});ye((function(){l&&x.current.focus()}),[l]),i.useImperativeHandle(n,(function(){return{adjustStyleForScrollbar:function(e,t){var n=!x.current.style.width;if(e.clientHeight<x.current.clientHeight&&n){var r="".concat(Object(de.a)(!0),"px");x.current.style["rtl"===t.direction?"paddingLeft":"paddingRight"]=r,x.current.style.width="calc(100% + ".concat(r,")")}return x.current}}}),[]);var k=i.useCallback((function(e){x.current=X.findDOMNode(e)}),[]),S=Object(p.a)(k,t),E=-1;i.Children.forEach(c,(function(e,t){i.isValidElement(e)&&(e.props.disabled||("selectedMenu"===g&&e.props.selected||-1===E)&&(E=t))}));var j=i.Children.map(c,(function(e,t){if(t===E){var n={};return s&&(n.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===g&&(n.tabIndex=0),i.cloneElement(e,n)}return e}));return i.createElement(fe.a,Object(r.a)({role:"menu",ref:S,className:f,onKeyDown:function(e){var t=x.current,n=e.key,r=Object(K.a)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),me(t,r,m,h,pe);else if("ArrowUp"===n)e.preventDefault(),me(t,r,m,h,he);else if("Home"===n)e.preventDefault(),me(t,null,m,h,pe);else if("End"===n)e.preventDefault(),me(t,null,m,h,he);else if(1===n.length){var o=O.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);var l=r&&!o.repeating&&ve(r,o);o.previousKeyMatched&&(l||me(t,r,!1,h,pe,o))?e.preventDefault():o.previousKeyMatched=!1}y&&y(e)},tabIndex:l?0:-1},w),j)})),ge=n(25),we={vertical:"top",horizontal:"right"},xe={vertical:"top",horizontal:"left"},Oe=i.forwardRef((function(e,t){var n=e.autoFocus,l=void 0===n||n,u=e.children,s=e.classes,c=e.disableAutoFocusItem,f=void 0!==c&&c,d=e.MenuListProps,p=void 0===d?{}:d,h=e.onClose,v=e.onEntering,m=e.open,y=e.PaperProps,b=void 0===y?{}:y,g=e.PopoverClasses,w=e.transitionDuration,x=void 0===w?"auto":w,O=e.variant,k=void 0===O?"selectedMenu":O,S=Object(o.a)(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","variant"]),E=Object(_.a)(),j=l&&!f&&m,C=i.useRef(null),P=i.useRef(null),T=-1;i.Children.map(u,(function(e,t){i.isValidElement(e)&&(e.props.disabled||("menu"!==k&&e.props.selected||-1===T)&&(T=t))}));var R=i.Children.map(u,(function(e,t){return t===T?i.cloneElement(e,{ref:function(t){P.current=X.findDOMNode(t),Object(ge.a)(e.ref,t)}}):e}));return i.createElement(ce,Object(r.a)({getContentAnchorEl:function(){return P.current},classes:g,onClose:h,onEntering:function(e,t){C.current&&C.current.adjustStyleForScrollbar(e,E),v&&v(e,t)},anchorOrigin:"rtl"===E.direction?we:xe,transformOrigin:"rtl"===E.direction?we:xe,PaperProps:Object(r.a)({},b,{classes:Object(r.a)({},b.classes,{root:s.paper})}),open:m,ref:t,transitionDuration:x},S),i.createElement(be,Object(r.a)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),h&&h(e,"tabKeyDown"))},actions:C,autoFocus:l&&(-1===T||f),autoFocusItem:j,variant:k},p,{className:Object(a.a)(s.list,p.className)}),R))})),ke=Object(f.a)({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(Oe),Se=n(57);function Ee(e,t){return"object"===Object(q.a)(t)&&null!==t?e===t:String(e)===String(t)}var je=i.forwardRef((function(e,t){var n=e["aria-label"],u=e.autoFocus,s=e.autoWidth,c=e.children,f=e.classes,h=e.className,v=e.defaultValue,m=e.disabled,y=e.displayEmpty,b=e.IconComponent,g=e.inputRef,x=e.labelId,O=e.MenuProps,k=void 0===O?{}:O,S=e.multiple,E=e.name,j=e.onBlur,C=e.onChange,P=e.onClose,_=e.onFocus,T=e.onOpen,R=e.open,M=e.readOnly,N=e.renderValue,A=e.SelectDisplayProps,L=void 0===A?{}:A,I=e.tabIndex,D=(e.type,e.value),z=e.variant,F=void 0===z?"standard":z,W=Object(o.a)(e,["aria-label","autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"]),$=Object(Se.a)({controlled:D,default:v,name:"Select"}),U=Object(V.a)($,2),B=U[0],H=U[1],q=i.useRef(null),X=i.useState(null),Y=X[0],Q=X[1],G=i.useRef(null!=R).current,J=i.useState(),Z=J[0],ee=J[1],te=i.useState(!1),ne=te[0],re=te[1],oe=Object(p.a)(t,g);i.useImperativeHandle(oe,(function(){return{focus:function(){Y.focus()},node:q.current,value:B}}),[Y,B]),i.useEffect((function(){u&&Y&&Y.focus()}),[u,Y]),i.useEffect((function(){if(Y){var e=Object(K.a)(Y).getElementById(x);if(e){var t=function(){getSelection().isCollapsed&&Y.focus()};return e.addEventListener("click",t),function(){e.removeEventListener("click",t)}}}}),[x,Y]);var ie,ae,le=function(e,t){e?T&&T(t):P&&P(t),G||(ee(s?null:Y.clientWidth),re(e))},ue=i.Children.toArray(c),se=function(e){return function(t){var n;if(S||le(!1,t),S){n=Array.isArray(B)?B.slice():[];var r=B.indexOf(e.props.value);-1===r?n.push(e.props.value):n.splice(r,1)}else n=e.props.value;e.props.onClick&&e.props.onClick(t),B!==n&&(H(n),C&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:n,name:E}}),C(t,e)))}},ce=null!==Y&&(G?R:ne);delete W["aria-invalid"];var fe=[],de=!1;(w({value:B})||y)&&(N?ie=N(B):de=!0);var pe=ue.map((function(e){if(!i.isValidElement(e))return null;var t;if(S){if(!Array.isArray(B))throw new Error(Object(l.a)(2));(t=B.some((function(t){return Ee(t,e.props.value)})))&&de&&fe.push(e.props.children)}else(t=Ee(B,e.props.value))&&de&&(ae=e.props.children);return t&&!0,i.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:se(e),onKeyUp:function(t){" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));de&&(ie=S?fe.join(", "):ae);var he,ve=Z;!s&&G&&Y&&(ve=Y.clientWidth),he="undefined"!==typeof I?I:m?null:0;var me=L.id||(E?"mui-component-select-".concat(E):void 0);return i.createElement(i.Fragment,null,i.createElement("div",Object(r.a)({className:Object(a.a)(f.root,f.select,f.selectMenu,f[F],h,m&&f.disabled),ref:Q,tabIndex:he,role:"button","aria-disabled":m?"true":void 0,"aria-expanded":ce?"true":void 0,"aria-haspopup":"listbox","aria-label":n,"aria-labelledby":[x,me].filter(Boolean).join(" ")||void 0,onKeyDown:function(e){if(!M){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),le(!0,e))}},onMouseDown:m||M?null:function(e){0===e.button&&(e.preventDefault(),Y.focus(),le(!0,e))},onBlur:function(e){!ce&&j&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:B,name:E}}),j(e))},onFocus:_},L,{id:me}),function(e){return null==e||"string"===typeof e&&!e.trim()}(ie)?i.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):ie),i.createElement("input",Object(r.a)({value:Array.isArray(B)?B.join(","):B,name:E,ref:q,"aria-hidden":!0,onChange:function(e){var t=ue.map((function(e){return e.props.value})).indexOf(e.target.value);if(-1!==t){var n=ue[t];H(n.props.value),C&&C(e,n)}},tabIndex:-1,className:f.nativeInput,autoFocus:u},W)),i.createElement(b,{className:Object(a.a)(f.icon,f["icon".concat(Object(d.a)(F))],ce&&f.iconOpen,m&&f.disabled)}),i.createElement(ke,Object(r.a)({id:"menu-".concat(E||""),anchorEl:Y,open:ce,onClose:function(e){le(!1,e)}},k,{MenuListProps:Object(r.a)({"aria-labelledby":x,role:"listbox",disableListWrap:!0},k.MenuListProps),PaperProps:Object(r.a)({},k.PaperProps,{style:Object(r.a)({minWidth:ve},null!=k.PaperProps?k.PaperProps.style:null)})}),pe))})),Ce=n(58),Pe=Object(Ce.a)(i.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),_e=i.forwardRef((function(e,t){var n=e.classes,l=e.className,u=e.disabled,s=e.IconComponent,c=e.inputRef,f=e.variant,p=void 0===f?"standard":f,h=Object(o.a)(e,["classes","className","disabled","IconComponent","inputRef","variant"]);return i.createElement(i.Fragment,null,i.createElement("select",Object(r.a)({className:Object(a.a)(n.root,n.select,n[p],l,u&&n.disabled),disabled:u,ref:c||t},h)),e.multiple?null:i.createElement(s,{className:Object(a.a)(n.icon,n["icon".concat(Object(d.a)(p))],u&&n.disabled)}))})),Te=function(e){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},"&$disabled":{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:e.palette.background.paper},"&&":{paddingRight:24}},filled:{"&&":{paddingRight:32}},outlined:{borderRadius:e.shape.borderRadius,"&&":{paddingRight:32}},selectMenu:{height:"auto",minHeight:"1.1876em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",pointerEvents:"none",color:e.palette.action.active,"&$disabled":{color:e.palette.action.disabled}},iconOpen:{transform:"rotate(180deg)"},iconFilled:{right:7},iconOutlined:{right:7},nativeInput:{bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%"}}},Re=i.createElement(E,null),Me=i.forwardRef((function(e,t){var n=e.children,a=e.classes,l=e.IconComponent,s=void 0===l?Pe:l,c=e.input,f=void 0===c?Re:c,d=e.inputProps,p=(e.variant,Object(o.a)(e,["children","classes","IconComponent","input","inputProps","variant"])),h=u({props:e,muiFormControl:A(),states:["variant"]});return i.cloneElement(f,Object(r.a)({inputComponent:_e,inputProps:Object(r.a)({children:n,classes:a,IconComponent:s,variant:h.variant,type:void 0},d,f?f.props.inputProps:{}),ref:t},p))}));Me.muiName="Select";Object(f.a)(Te,{name:"MuiNativeSelect"})(Me);var Ne=Te,Ae=i.createElement(E,null),Le=i.createElement(C,null),Ie=i.forwardRef((function e(t,n){var a=t.autoWidth,l=void 0!==a&&a,s=t.children,c=t.classes,f=t.displayEmpty,d=void 0!==f&&f,p=t.IconComponent,h=void 0===p?Pe:p,v=t.id,m=t.input,y=t.inputProps,b=t.label,g=t.labelId,w=t.labelWidth,x=void 0===w?0:w,O=t.MenuProps,k=t.multiple,S=void 0!==k&&k,E=t.native,j=void 0!==E&&E,C=t.onClose,P=t.onOpen,_=t.open,T=t.renderValue,R=t.SelectDisplayProps,M=t.variant,L=void 0===M?"standard":M,I=Object(o.a)(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","label","labelId","labelWidth","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"]),D=j?_e:je,z=u({props:t,muiFormControl:A(),states:["variant"]}).variant||L,F=m||{standard:Ae,outlined:i.createElement(N,{label:b,labelWidth:x}),filled:Le}[z];return i.cloneElement(F,Object(r.a)({inputComponent:D,inputProps:Object(r.a)({children:s,IconComponent:h,variant:z,type:void 0,multiple:S},j?{id:v}:{autoWidth:l,displayEmpty:d,labelId:g,MenuProps:O,onClose:C,onOpen:P,open:_,renderValue:T,SelectDisplayProps:Object(r.a)({id:v},R)},y,{classes:y?Object(H.a)({baseClasses:c,newClasses:y.classes,Component:e}):c},m?m.props.inputProps:{}),ref:n},I))}));Ie.muiName="Select";var De=Object(f.a)(Ne,{name:"MuiSelect"})(Ie),ze={standard:E,filled:C,outlined:N},Fe=i.forwardRef((function(e,t){var n=e.autoComplete,l=e.autoFocus,u=void 0!==l&&l,s=e.children,c=e.classes,f=e.className,d=e.color,p=void 0===d?"primary":d,h=e.defaultValue,v=e.disabled,m=void 0!==v&&v,y=e.error,b=void 0!==y&&y,g=e.FormHelperTextProps,w=e.fullWidth,x=void 0!==w&&w,O=e.helperText,k=e.hiddenLabel,S=e.id,E=e.InputLabelProps,j=e.inputProps,C=e.InputProps,P=e.inputRef,_=e.label,T=e.multiline,R=void 0!==T&&T,M=e.name,N=e.onBlur,A=e.onChange,L=e.onFocus,I=e.placeholder,D=e.required,F=void 0!==D&&D,W=e.rows,U=e.rowsMax,H=e.select,V=void 0!==H&&H,q=e.SelectProps,K=e.type,X=e.value,Y=e.variant,Q=void 0===Y?"standard":Y,G=Object(o.a)(e,["autoComplete","autoFocus","children","classes","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","select","SelectProps","type","value","variant"]);var J={};if("outlined"===Q&&(E&&"undefined"!==typeof E.shrink&&(J.notched=E.shrink),_)){var Z,ee=null!==(Z=null===E||void 0===E?void 0:E.required)&&void 0!==Z?Z:F;J.label=i.createElement(i.Fragment,null,_,ee&&"\xa0*")}V&&(q&&q.native||(J.id=void 0),J["aria-describedby"]=void 0);var te=O&&S?"".concat(S,"-helper-text"):void 0,ne=_&&S?"".concat(S,"-label"):void 0,re=ze[Q],oe=i.createElement(re,Object(r.a)({"aria-describedby":te,autoComplete:n,autoFocus:u,defaultValue:h,fullWidth:x,multiline:R,name:M,rows:W,rowsMax:U,type:K,value:X,id:S,inputRef:P,onBlur:N,onChange:A,onFocus:L,placeholder:I,inputProps:j},J,C));return i.createElement($,Object(r.a)({className:Object(a.a)(c.root,f),disabled:m,error:b,fullWidth:x,hiddenLabel:k,ref:t,required:F,color:p,variant:Q},G),_&&i.createElement(z,Object(r.a)({htmlFor:S,id:ne},E),_),V?i.createElement(De,Object(r.a)({"aria-describedby":te,id:S,labelId:ne,value:X,input:oe},q),s):oe,O&&i.createElement(B,Object(r.a)({id:te},g),O))}));t.a=Object(f.a)({root:{}},{name:"MuiTextField"})(Fe)},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=(n(4),n(10)),l=n(274),u=n(5),s=n(285),c=n(6),f=n(30),d=n(287),p=n(19),h=n(12),v=n(20),m=n(9),y={entering:{opacity:1},entered:{opacity:1}},b={enter:p.b.enteringScreen,exit:p.b.leavingScreen},g=i.forwardRef((function(e,t){var n=e.children,a=e.disableStrictModeCompat,l=void 0!==a&&a,u=e.in,s=e.onEnter,c=e.onEntered,p=e.onEntering,g=e.onExit,w=e.onExited,x=e.onExiting,O=e.style,k=e.TransitionComponent,S=void 0===k?d.a:k,E=e.timeout,j=void 0===E?b:E,C=Object(r.a)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),P=Object(h.a)(),_=P.unstable_strictMode&&!l,T=i.useRef(null),R=Object(m.a)(n.ref,t),M=Object(m.a)(_?T:void 0,R),N=function(e){return function(t,n){if(e){var r=_?[T.current,t]:[t,n],o=Object(f.a)(r,2),i=o[0],a=o[1];void 0===a?e(i):e(i,a)}}},A=N(p),L=N((function(e,t){Object(v.b)(e);var n=Object(v.a)({style:O,timeout:j},{mode:"enter"});e.style.webkitTransition=P.transitions.create("opacity",n),e.style.transition=P.transitions.create("opacity",n),s&&s(e,t)})),I=N(c),D=N(x),z=N((function(e){var t=Object(v.a)({style:O,timeout:j},{mode:"exit"});e.style.webkitTransition=P.transitions.create("opacity",t),e.style.transition=P.transitions.create("opacity",t),g&&g(e)})),F=N(w);return i.createElement(S,Object(o.a)({appear:!0,in:u,nodeRef:_?T:void 0,onEnter:L,onEntered:I,onEntering:A,onExit:z,onExited:F,onExiting:D,timeout:j},C),(function(e,t){return i.cloneElement(n,Object(o.a)({style:Object(o.a)({opacity:0,visibility:"exited"!==e||u?void 0:"hidden"},y[e],O,n.props.style),ref:M},t))}))})),w=i.forwardRef((function(e,t){var n=e.children,a=e.classes,l=e.className,s=e.invisible,c=void 0!==s&&s,f=e.open,d=e.transitionDuration,p=e.TransitionComponent,h=void 0===p?g:p,v=Object(r.a)(e,["children","classes","className","invisible","open","transitionDuration","TransitionComponent"]);return i.createElement(h,Object(o.a)({in:f,timeout:d},v),i.createElement("div",{className:Object(u.a)(a.root,l,c&&a.invisible),"aria-hidden":!0,ref:t},n))})),x=Object(c.a)({root:{zIndex:-1,position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},{name:"MuiBackdrop"})(w),O=n(27);function k(e,t){var n=function(e,t){var n,r=t.getBoundingClientRect();if(t.fakeTransform)n=t.fakeTransform;else{var o=window.getComputedStyle(t);n=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("transform")}var i=0,a=0;if(n&&"none"!==n&&"string"===typeof n){var l=n.split("(")[1].split(")")[0].split(",");i=parseInt(l[4],10),a=parseInt(l[5],10)}return"left"===e?"translateX(".concat(window.innerWidth,"px) translateX(").concat(i-r.left,"px)"):"right"===e?"translateX(-".concat(r.left+r.width-i,"px)"):"up"===e?"translateY(".concat(window.innerHeight,"px) translateY(").concat(a-r.top,"px)"):"translateY(-".concat(r.top+r.height-a,"px)")}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}var S={enter:p.b.enteringScreen,exit:p.b.leavingScreen},E=i.forwardRef((function(e,t){var n=e.children,l=e.direction,u=void 0===l?"down":l,s=e.in,c=e.onEnter,f=e.onEntered,p=e.onEntering,y=e.onExit,b=e.onExited,g=e.onExiting,w=e.style,x=e.timeout,E=void 0===x?S:x,j=e.TransitionComponent,C=void 0===j?d.a:j,P=Object(r.a)(e,["children","direction","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),_=Object(h.a)(),T=i.useRef(null),R=i.useCallback((function(e){T.current=a.findDOMNode(e)}),[]),M=Object(m.a)(n.ref,R),N=Object(m.a)(M,t),A=function(e){return function(t){e&&(void 0===t?e(T.current):e(T.current,t))}},L=A((function(e,t){k(u,e),Object(v.b)(e),c&&c(e,t)})),I=A((function(e,t){var n=Object(v.a)({timeout:E,style:w},{mode:"enter"});e.style.webkitTransition=_.transitions.create("-webkit-transform",Object(o.a)({},n,{easing:_.transitions.easing.easeOut})),e.style.transition=_.transitions.create("transform",Object(o.a)({},n,{easing:_.transitions.easing.easeOut})),e.style.webkitTransform="none",e.style.transform="none",p&&p(e,t)})),D=A(f),z=A(g),F=A((function(e){var t=Object(v.a)({timeout:E,style:w},{mode:"exit"});e.style.webkitTransition=_.transitions.create("-webkit-transform",Object(o.a)({},t,{easing:_.transitions.easing.sharp})),e.style.transition=_.transitions.create("transform",Object(o.a)({},t,{easing:_.transitions.easing.sharp})),k(u,e),y&&y(e)})),W=A((function(e){e.style.webkitTransition="",e.style.transition="",b&&b(e)})),$=i.useCallback((function(){T.current&&k(u,T.current)}),[u]);return i.useEffect((function(){if(!s&&"down"!==u&&"right"!==u){var e=Object(O.a)((function(){T.current&&k(u,T.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[u,s]),i.useEffect((function(){s||$()}),[s,$]),i.createElement(C,Object(o.a)({nodeRef:T,onEnter:L,onEntered:D,onEntering:I,onExit:F,onExited:W,onExiting:z,appear:!0,in:s,timeout:E},P),(function(e,t){return i.cloneElement(n,Object(o.a)({ref:N,style:Object(o.a)({visibility:"exited"!==e||s?void 0:"hidden"},w,n.props.style)},t))}))})),j=n(239),C=n(7),P={left:"right",right:"left",top:"down",bottom:"up"};function _(e){return-1!==["left","right"].indexOf(e)}function T(e,t){return"rtl"===e.direction&&_(t)?P[t]:t}var R={enter:p.b.enteringScreen,exit:p.b.leavingScreen},M=i.forwardRef((function(e,t){var n=e.anchor,a=void 0===n?"left":n,l=e.BackdropProps,c=e.children,f=e.classes,d=e.className,p=e.elevation,v=void 0===p?16:p,m=e.ModalProps,y=(m=void 0===m?{}:m).BackdropProps,b=Object(r.a)(m,["BackdropProps"]),g=e.onClose,w=e.open,O=void 0!==w&&w,k=e.PaperProps,S=void 0===k?{}:k,_=e.SlideProps,M=e.TransitionComponent,N=void 0===M?E:M,A=e.transitionDuration,L=void 0===A?R:A,I=e.variant,D=void 0===I?"temporary":I,z=Object(r.a)(e,["anchor","BackdropProps","children","classes","className","elevation","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"]),F=Object(h.a)(),W=i.useRef(!1);i.useEffect((function(){W.current=!0}),[]);var $=T(F,a),U=i.createElement(j.a,Object(o.a)({elevation:"temporary"===D?v:0,square:!0},S,{className:Object(u.a)(f.paper,f["paperAnchor".concat(Object(C.a)($))],S.className,"temporary"!==D&&f["paperAnchorDocked".concat(Object(C.a)($))])}),c);if("permanent"===D)return i.createElement("div",Object(o.a)({className:Object(u.a)(f.root,f.docked,d),ref:t},z),U);var B=i.createElement(N,Object(o.a)({in:O,direction:P[$],timeout:L,appear:W.current},_),U);return"persistent"===D?i.createElement("div",Object(o.a)({className:Object(u.a)(f.root,f.docked,d),ref:t},z),B):i.createElement(s.a,Object(o.a)({BackdropProps:Object(o.a)({},l,y,{transitionDuration:L}),BackdropComponent:x,className:Object(u.a)(f.root,f.modal,d),open:O,onClose:g,ref:t},z,b),B)})),N=Object(c.a)((function(e){return{root:{},docked:{flex:"0 0 auto"},paper:{overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:e.zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},paperAnchorLeft:{left:0,right:"auto"},paperAnchorRight:{left:"auto",right:0},paperAnchorTop:{top:0,left:0,bottom:"auto",right:0,height:"auto",maxHeight:"100%"},paperAnchorBottom:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},paperAnchorDockedLeft:{borderRight:"1px solid ".concat(e.palette.divider)},paperAnchorDockedTop:{borderBottom:"1px solid ".concat(e.palette.divider)},paperAnchorDockedRight:{borderLeft:"1px solid ".concat(e.palette.divider)},paperAnchorDockedBottom:{borderTop:"1px solid ".concat(e.palette.divider)},modal:{}}}),{name:"MuiDrawer",flip:!1})(M),A=n(13),L=n(15),I="undefined"!==typeof window?i.useLayoutEffect:i.useEffect;var D=function(e){var t=e.children,n=e.defer,r=void 0!==n&&n,o=e.fallback,a=void 0===o?null:o,l=i.useState(!1),u=l[0],s=l[1];return I((function(){r||s(!0)}),[r]),i.useEffect((function(){r&&s(!0)}),[r]),i.createElement(i.Fragment,null,u?t:a)},z=n(18),F=i.forwardRef((function(e,t){var n=e.anchor,a=e.classes,l=e.className,s=e.width,c=Object(r.a)(e,["anchor","classes","className","width"]);return i.createElement("div",Object(o.a)({className:Object(u.a)(a.root,a["anchor".concat(Object(C.a)(n))],l),ref:t,style:Object(z.a)({},_(n)?"width":"height",s)},c))})),W=Object(c.a)((function(e){return{root:{position:"fixed",top:0,left:0,bottom:0,zIndex:e.zIndex.drawer-1},anchorLeft:{right:"auto"},anchorRight:{left:"auto",right:0},anchorTop:{bottom:"auto",right:0},anchorBottom:{top:"auto",bottom:0,right:0}}}),{name:"PrivateSwipeArea"})(F),$=null;function U(e,t){return"right"===e?document.body.offsetWidth-t[0].pageX:t[0].pageX}function B(e,t){return"bottom"===e?window.innerHeight-t[0].clientY:t[0].clientY}function H(e,t){return e?t.clientWidth:t.clientHeight}function V(e,t,n,r){return Math.min(Math.max(n?t-e:r+t-e,0),r)}var q="undefined"!==typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent),K={enter:p.b.enteringScreen,exit:p.b.leavingScreen},X="undefined"!==typeof window?i.useLayoutEffect:i.useEffect,Y=i.forwardRef((function(e,t){var n=Object(h.a)(),u=Object(l.a)({name:"MuiSwipeableDrawer",props:Object(o.a)({},e),theme:n}),s=u.anchor,c=void 0===s?"left":s,f=u.disableBackdropTransition,d=void 0!==f&&f,p=u.disableDiscovery,m=void 0!==p&&p,y=u.disableSwipeToOpen,b=void 0===y?q:y,g=u.hideBackdrop,w=u.hysteresis,x=void 0===w?.52:w,O=u.minFlingVelocity,k=void 0===O?450:O,S=u.ModalProps,E=(S=void 0===S?{}:S).BackdropProps,j=Object(r.a)(S,["BackdropProps"]),C=u.onClose,P=u.onOpen,R=u.open,M=u.PaperProps,I=void 0===M?{}:M,z=u.SwipeAreaProps,F=u.swipeAreaWidth,Y=void 0===F?20:F,Q=u.transitionDuration,G=void 0===Q?K:Q,J=u.variant,Z=void 0===J?"temporary":J,ee=Object(r.a)(u,["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"]),te=i.useState(!1),ne=te[0],re=te[1],oe=i.useRef({isSwiping:null}),ie=i.useRef(),ae=i.useRef(),le=i.useRef(),ue=i.useRef(!1),se=i.useRef();X((function(){se.current=null}),[R]);var ce=i.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.mode,o=void 0===r?null:r,i=t.changeTransition,a=void 0===i||i,l=T(n,c),u=-1!==["right","bottom"].indexOf(l)?1:-1,s=_(c),f=s?"translate(".concat(u*e,"px, 0)"):"translate(0, ".concat(u*e,"px)"),p=le.current.style;p.webkitTransform=f,p.transform=f;var h="";if(o&&(h=n.transitions.create("all",Object(v.a)({timeout:G},{mode:o}))),a&&(p.webkitTransition=h,p.transition=h),!d&&!g){var m=ae.current.style;m.opacity=1-e/H(s,le.current),a&&(m.webkitTransition=h,m.transition=h)}}),[c,d,g,n,G]),fe=Object(L.a)((function(e){if(ue.current)if($=null,ue.current=!1,re(!1),oe.current.isSwiping){oe.current.isSwiping=null;var t,r=T(n,c),o=_(c);t=o?U(r,e.changedTouches):B(r,e.changedTouches);var i=o?oe.current.startX:oe.current.startY,a=H(o,le.current),l=V(t,i,R,a),u=l/a;Math.abs(oe.current.velocity)>k&&(se.current=1e3*Math.abs((a-l)/oe.current.velocity)),R?oe.current.velocity>k||u>x?C():ce(0,{mode:"exit"}):oe.current.velocity<-k||1-u>x?P():ce(H(o,le.current),{mode:"enter"})}else oe.current.isSwiping=null})),de=Object(L.a)((function(e){if(le.current&&ue.current&&(null==$||$===oe.current)){var t=T(n,c),r=_(c),o=U(t,e.touches),i=B(t,e.touches);if(R&&le.current.contains(e.target)&&null==$){var a=function(e){var t=e.domTreeShapes,n=e.start,r=e.current,o=e.anchor,i={x:"scrollLeft",y:"scrollTop"},a={x:"scrollWidth",y:"scrollHeight"},l={x:"clientWidth",y:"clientHeight"};return t.some((function(e){var t=r>=n;"top"!==o&&"left"!==o||(t=!t);var u="left"===o||"right"===o?"x":"y",s=e[i[u]],c=s>0,f=s+e[l[u]]<e[a[u]];return t&&f||!t&&c?e:null}))}({domTreeShapes:function(e,t){for(var n=[];e&&e!==t;){var r=window.getComputedStyle(e);"absolute"===r.getPropertyValue("position")||"hidden"===r.getPropertyValue("overflow-x")?n=[]:(e.clientWidth>0&&e.scrollWidth>e.clientWidth||e.clientHeight>0&&e.scrollHeight>e.clientHeight)&&n.push(e),e=e.parentElement}return n}(e.target,le.current),start:r?oe.current.startX:oe.current.startY,current:r?o:i,anchor:c});if(a)return void($=a);$=oe.current}if(null==oe.current.isSwiping){var l=Math.abs(o-oe.current.startX),u=Math.abs(i-oe.current.startY);l>u&&e.cancelable&&e.preventDefault();var s=r?l>u&&l>3:u>l&&u>3;if(!0===s||(r?u>3:l>3)){if(oe.current.isSwiping=s,!s)return void fe(e);oe.current.startX=o,oe.current.startY=i,m||R||(r?oe.current.startX-=Y:oe.current.startY-=Y)}}if(oe.current.isSwiping){var f=H(r,le.current),d=r?oe.current.startX:oe.current.startY;R&&!oe.current.paperHit&&(d=Math.min(d,f));var p=V(r?o:i,d,R,f);if(R)if(oe.current.paperHit)0===p&&(oe.current.startX=o,oe.current.startY=i);else{if(!(r?o<f:i<f))return;oe.current.paperHit=!0,oe.current.startX=o,oe.current.startY=i}null===oe.current.lastTranslate&&(oe.current.lastTranslate=p,oe.current.lastTime=performance.now()+1);var h=(p-oe.current.lastTranslate)/(performance.now()-oe.current.lastTime)*1e3;oe.current.velocity=.4*oe.current.velocity+.6*h,oe.current.lastTranslate=p,oe.current.lastTime=performance.now(),e.cancelable&&e.preventDefault(),ce(p)}}})),pe=Object(L.a)((function(e){if(!e.defaultPrevented&&!e.muiHandled&&(!R||ae.current.contains(e.target)||le.current.contains(e.target))){var t=T(n,c),r=_(c),o=U(t,e.touches),i=B(t,e.touches);if(!R){if(b||e.target!==ie.current)return;if(r){if(o>Y)return}else if(i>Y)return}e.muiHandled=!0,$=null,oe.current.startX=o,oe.current.startY=i,re(!0),!R&&le.current&&ce(H(r,le.current)+(m?20:-Y),{changeTransition:!1}),oe.current.velocity=0,oe.current.lastTime=null,oe.current.lastTranslate=null,oe.current.paperHit=!1,ue.current=!0}}));i.useEffect((function(){if("temporary"===Z){var e=Object(A.a)(le.current);return e.addEventListener("touchstart",pe),e.addEventListener("touchmove",de,{passive:!1}),e.addEventListener("touchend",fe),function(){e.removeEventListener("touchstart",pe),e.removeEventListener("touchmove",de,{passive:!1}),e.removeEventListener("touchend",fe)}}}),[Z,pe,de,fe]),i.useEffect((function(){return function(){$===oe.current&&($=null)}}),[]),i.useEffect((function(){R||re(!1)}),[R]);var he=i.useCallback((function(e){ae.current=a.findDOMNode(e)}),[]);return i.createElement(i.Fragment,null,i.createElement(N,Object(o.a)({open:!("temporary"!==Z||!ne)||R,variant:Z,ModalProps:Object(o.a)({BackdropProps:Object(o.a)({},E,{ref:he})},j),PaperProps:Object(o.a)({},I,{style:Object(o.a)({pointerEvents:"temporary"!==Z||R?"":"none"},I.style),ref:le}),anchor:c,transitionDuration:se.current||G,onClose:C,ref:t},ee)),!b&&"temporary"===Z&&i.createElement(D,null,i.createElement(W,Object(o.a)({anchor:c,ref:ie,width:Y},z))))}));t.a=Y},function(e,t,n){"use strict";var r=n(3),o=n(1),i=n(0),a=n(10),l=(n(4),n(108)),u=n(274),s=n(13),c=n(25),f=n(9);var d="undefined"!==typeof window?i.useLayoutEffect:i.useEffect;var p=i.forwardRef((function(e,t){var n=e.children,r=e.container,o=e.disablePortal,l=void 0!==o&&o,u=e.onRendered,s=i.useState(null),p=s[0],h=s[1],v=Object(f.a)(i.isValidElement(n)?n.ref:null,t);return d((function(){l||h(function(e){return e="function"===typeof e?e():e,a.findDOMNode(e)}(r)||document.body)}),[r,l]),d((function(){if(p&&!l)return Object(c.a)(t,p),function(){Object(c.a)(t,null)}}),[t,p,l]),d((function(){u&&(p||l)&&u()}),[u,p,l]),l?i.isValidElement(n)?i.cloneElement(n,{ref:v}):n:p?a.createPortal(n,p):p})),h=n(35),v=n(15),m=n(62);var y=n(40),b=n(29),g=n(63),w=n(37);function x(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function O(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function k(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0,i=[t,n].concat(Object(b.a)(r)),a=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===i.indexOf(e)&&-1===a.indexOf(e.tagName)&&x(e,o)}))}function S(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function E(e,t){var n,r=[],o=[],i=e.container;if(!t.disableScrollLock){if(function(e){var t=Object(s.a)(e);return t.body===e?Object(w.a)(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(i)){var a=Object(g.a)();r.push({value:i.style.paddingRight,key:"padding-right",el:i}),i.style["padding-right"]="".concat(O(i)+a,"px"),n=Object(s.a)(i).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){o.push(e.style.paddingRight),e.style.paddingRight="".concat(O(e)+a,"px")}))}var l=i.parentElement,u="HTML"===l.nodeName&&"scroll"===window.getComputedStyle(l)["overflow-y"]?l:i;r.push({value:u.style.overflow,key:"overflow",el:u}),u.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){o[t]?e.style.paddingRight=o[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var j=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return Object(y.a)(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&x(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);k(t,e.mountNode,e.modalRef,r,!0);var o=S(this.containers,(function(e){return e.container===t}));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=S(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=E(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=S(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&x(e.modalRef,!0),k(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var o=r.modals[r.modals.length-1];o.modalRef&&x(o.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();var C=function(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,o=e.disableEnforceFocus,l=void 0!==o&&o,u=e.disableRestoreFocus,c=void 0!==u&&u,d=e.getDoc,p=e.isEnabled,h=e.open,v=i.useRef(),m=i.useRef(null),y=i.useRef(null),b=i.useRef(),g=i.useRef(null),w=i.useCallback((function(e){g.current=a.findDOMNode(e)}),[]),x=Object(f.a)(t.ref,w),O=i.useRef();return i.useEffect((function(){O.current=h}),[h]),!O.current&&h&&"undefined"!==typeof window&&(b.current=d().activeElement),i.useEffect((function(){if(h){var e=Object(s.a)(g.current);r||!g.current||g.current.contains(e.activeElement)||(g.current.hasAttribute("tabIndex")||g.current.setAttribute("tabIndex",-1),g.current.focus());var t=function(){null!==g.current&&(e.hasFocus()&&!l&&p()&&!v.current?g.current&&!g.current.contains(e.activeElement)&&g.current.focus():v.current=!1)},n=function(t){!l&&p()&&9===t.keyCode&&e.activeElement===g.current&&(v.current=!0,t.shiftKey?y.current.focus():m.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var o=setInterval((function(){t()}),50);return function(){clearInterval(o),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),c||(b.current&&b.current.focus&&b.current.focus(),b.current=null)}}}),[r,l,c,p,h]),i.createElement(i.Fragment,null,i.createElement("div",{tabIndex:0,ref:m,"data-test":"sentinelStart"}),i.cloneElement(t,{ref:x}),i.createElement("div",{tabIndex:0,ref:y,"data-test":"sentinelEnd"}))},P={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},_=i.forwardRef((function(e,t){var n=e.invisible,a=void 0!==n&&n,l=e.open,u=Object(r.a)(e,["invisible","open"]);return l?i.createElement("div",Object(o.a)({"aria-hidden":!0,ref:t},u,{style:Object(o.a)({},P.root,a?P.invisible:{},u.style)})):null}));var T=new j,R=i.forwardRef((function(e,t){var n=Object(l.a)(),c=Object(u.a)({name:"MuiModal",props:Object(o.a)({},e),theme:n}),d=c.BackdropComponent,y=void 0===d?_:d,b=c.BackdropProps,g=c.children,w=c.closeAfterTransition,O=void 0!==w&&w,k=c.container,S=c.disableAutoFocus,E=void 0!==S&&S,j=c.disableBackdropClick,P=void 0!==j&&j,R=c.disableEnforceFocus,M=void 0!==R&&R,N=c.disableEscapeKeyDown,A=void 0!==N&&N,L=c.disablePortal,I=void 0!==L&&L,D=c.disableRestoreFocus,z=void 0!==D&&D,F=c.disableScrollLock,W=void 0!==F&&F,$=c.hideBackdrop,U=void 0!==$&&$,B=c.keepMounted,H=void 0!==B&&B,V=c.manager,q=void 0===V?T:V,K=c.onBackdropClick,X=c.onClose,Y=c.onEscapeKeyDown,Q=c.onRendered,G=c.open,J=Object(r.a)(c,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),Z=i.useState(!0),ee=Z[0],te=Z[1],ne=i.useRef({}),re=i.useRef(null),oe=i.useRef(null),ie=Object(f.a)(oe,t),ae=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(c),le=function(){return Object(s.a)(re.current)},ue=function(){return ne.current.modalRef=oe.current,ne.current.mountNode=re.current,ne.current},se=function(){q.mount(ue(),{disableScrollLock:W}),oe.current.scrollTop=0},ce=Object(v.a)((function(){var e=function(e){return e="function"===typeof e?e():e,a.findDOMNode(e)}(k)||le().body;q.add(ue(),e),oe.current&&se()})),fe=i.useCallback((function(){return q.isTopModal(ue())}),[q]),de=Object(v.a)((function(e){re.current=e,e&&(Q&&Q(),G&&fe()?se():x(oe.current,!0))})),pe=i.useCallback((function(){q.remove(ue())}),[q]);if(i.useEffect((function(){return function(){pe()}}),[pe]),i.useEffect((function(){G?ce():ae&&O||pe()}),[G,pe,ae,O,ce]),!H&&!G&&(!ae||ee))return null;var he=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:m.a}),ve={};return void 0===g.props.tabIndex&&(ve.tabIndex=g.props.tabIndex||"-1"),ae&&(ve.onEnter=Object(h.a)((function(){te(!1)}),g.props.onEnter),ve.onExited=Object(h.a)((function(){te(!0),O&&pe()}),g.props.onExited)),i.createElement(p,{ref:de,container:k,disablePortal:I},i.createElement("div",Object(o.a)({ref:ie,onKeyDown:function(e){"Escape"===e.key&&fe()&&(Y&&Y(e),A||(e.stopPropagation(),X&&X(e,"escapeKeyDown")))},role:"presentation"},J,{style:Object(o.a)({},he.root,!G&&ee?he.hidden:{},J.style)}),U?null:i.createElement(y,Object(o.a)({open:G,onClick:function(e){e.target===e.currentTarget&&(K&&K(e),!P&&X&&X(e,"backdropClick"))}},b)),i.createElement(C,{disableEnforceFocus:M,disableAutoFocus:E,disableRestoreFocus:z,getDoc:le,isEnabled:fe,open:G},i.cloneElement(g,ve))))}));t.a=R},function(e,t,n){"use strict";var r=n(1),o=n(3),i=n(0),a=n(4),l=n.n(a),u=n(274),s=n(39),c=n.n(s),f=n(12),d=n(23),p=n(108);function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(p.a)(),o=Object(u.a)({theme:n,name:"MuiUseMediaQuery",props:{}});var a="function"===typeof e?e(n):e;a=a.replace(/^@media( ?)/m,"");var l="undefined"!==typeof window&&"undefined"!==typeof window.matchMedia,s=Object(r.a)({},o,t),c=s.defaultMatches,f=void 0!==c&&c,d=s.matchMedia,h=void 0===d?l?window.matchMedia:null:d,v=s.noSsr,m=void 0!==v&&v,y=s.ssrMatchMedia,b=void 0===y?null:y,g=i.useState((function(){return m&&l?h(a).matches:b?b(a).matches:f})),w=g[0],x=g[1];return i.useEffect((function(){var e=!0;if(l){var t=h(a),n=function(){e&&x(t.matches)};return n(),t.addListener(n),function(){e=!1,t.removeListener(n)}}}),[a,h,l]),w}var v=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return n?d.b.indexOf(e)<=d.b.indexOf(t):d.b.indexOf(e)<d.b.indexOf(t)},m=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return n?d.b.indexOf(t)<=d.b.indexOf(e):d.b.indexOf(t)<d.b.indexOf(e)},y="undefined"===typeof window?i.useEffect:i.useLayoutEffect,b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=e.withTheme,a=void 0!==n&&n,l=e.noSSR,s=void 0!==l&&l,d=e.initialWidth;function p(e){var n=Object(f.a)(),l=e.theme||n,c=Object(u.a)({theme:l,name:"MuiWithWidth",props:Object(r.a)({},e)}),p=c.initialWidth,v=c.width,m=Object(o.a)(c,["initialWidth","width"]),b=i.useState(!1),g=b[0],w=b[1];y((function(){w(!0)}),[]);var x=l.breakpoints.keys.slice().reverse().reduce((function(e,t){var n=h(l.breakpoints.up(t));return!e&&n?t:e}),null),O=Object(r.a)({width:v||(g||s?x:void 0)||p||d},a?{theme:l}:{},m);return void 0===O.width?null:i.createElement(t,O)}return c()(p,t),p}};function g(e){var t=e.children,n=e.only,r=e.width,o=Object(f.a)(),i=!0;if(n)if(Array.isArray(n))for(var a=0;a<n.length;a+=1){if(r===n[a]){i=!1;break}}else n&&r===n&&(i=!1);if(i)for(var l=0;l<o.breakpoints.keys.length;l+=1){var u=o.breakpoints.keys[l],s=e["".concat(u,"Up")],c=e["".concat(u,"Down")];if(s&&v(u,r)||c&&m(u,r)){i=!1;break}}return i?t:null}g.propTypes={children:l.a.node,className:l.a.string,implementation:l.a.oneOf(["js","css"]),initialWidth:l.a.oneOf(["xs","sm","md","lg","xl"]),lgDown:l.a.bool,lgUp:l.a.bool,mdDown:l.a.bool,mdUp:l.a.bool,only:l.a.oneOfType([l.a.oneOf(["xs","sm","md","lg","xl"]),l.a.arrayOf(l.a.oneOf(["xs","sm","md","lg","xl"]))]),smDown:l.a.bool,smUp:l.a.bool,width:l.a.string.isRequired,xlDown:l.a.bool,xlUp:l.a.bool,xsDown:l.a.bool,xsUp:l.a.bool};var w=b()(g),x=n(18),O=n(7),k=n(6);var S=Object(k.a)((function(e){var t={display:"none"};return e.breakpoints.keys.reduce((function(n,r){return n["only".concat(Object(O.a)(r))]=Object(x.a)({},e.breakpoints.only(r),t),n["".concat(r,"Up")]=Object(x.a)({},e.breakpoints.up(r),t),n["".concat(r,"Down")]=Object(x.a)({},e.breakpoints.down(r),t),n}),{})}),{name:"PrivateHiddenCss"})((function(e){var t=e.children,n=e.classes,r=e.className,a=e.only,l=(Object(o.a)(e,["children","classes","className","only"]),Object(f.a)()),u=[];r&&u.push(r);for(var s=0;s<l.breakpoints.keys.length;s+=1){var c=l.breakpoints.keys[s],d=e["".concat(c,"Up")],p=e["".concat(c,"Down")];d&&u.push(n["".concat(c,"Up")]),p&&u.push(n["".concat(c,"Down")])}return a&&(Array.isArray(a)?a:[a]).forEach((function(e){u.push(n["only".concat(Object(O.a)(e))])})),i.createElement("div",{className:u.join(" ")},t)}));t.a=function(e){var t=e.implementation,n=void 0===t?"js":t,a=e.lgDown,l=void 0!==a&&a,u=e.lgUp,s=void 0!==u&&u,c=e.mdDown,f=void 0!==c&&c,d=e.mdUp,p=void 0!==d&&d,h=e.smDown,v=void 0!==h&&h,m=e.smUp,y=void 0!==m&&m,b=e.xlDown,g=void 0!==b&&b,x=e.xlUp,O=void 0!==x&&x,k=e.xsDown,E=void 0!==k&&k,j=e.xsUp,C=void 0!==j&&j,P=Object(o.a)(e,["implementation","lgDown","lgUp","mdDown","mdUp","smDown","smUp","xlDown","xlUp","xsDown","xsUp"]);return"js"===n?i.createElement(w,Object(r.a)({lgDown:l,lgUp:s,mdDown:f,mdUp:p,smDown:v,smUp:y,xlDown:g,xlUp:O,xsDown:E,xsUp:C},P)):i.createElement(S,Object(r.a)({lgDown:l,lgUp:s,mdDown:f,mdUp:p,smDown:v,smUp:y,xlDown:g,xlUp:O,xsDown:E,xsUp:C},P))}},function(e,t,n){"use strict";var r=n(17),o=n(14),i=(n(4),n(0)),a=n.n(i),l=n(10),u=n.n(l),s=!1,c=n(41),f="unmounted",d="exited",p="entering",h="entered",v="exiting",m=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=d,r.appearStatus=p):o=h:o=t.unmountOnExit||t.mountOnEnter?f:d,r.state={status:o},r.nextCallback=null,r}Object(o.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===f?{status:d}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==p&&n!==h&&(t=p):n!==p&&n!==h||(t=v)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===p?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===d&&this.setState({status:f})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[u.a.findDOMNode(this),r],i=o[0],a=o[1],l=this.getTimeouts(),c=r?l.appear:l.enter;!e&&!n||s?this.safeSetState({status:h},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,a),this.safeSetState({status:p},(function(){t.props.onEntering(i,a),t.onTransitionEnd(c,(function(){t.safeSetState({status:h},(function(){t.props.onEntered(i,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:u.a.findDOMNode(this);t&&!s?(this.props.onExit(r),this.safeSetState({status:v},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:d},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:d},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:u.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===f)return null;var t=this.props,n=t.children,o=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(r.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return a.a.createElement(c.a.Provider,{value:null},"function"===typeof n?n(e,o):a.a.cloneElement(a.a.Children.only(n),o))},t}(a.a.Component);function y(){}m.contextType=c.a,m.propTypes={},m.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:y,onEntering:y,onEntered:y,onExit:y,onExiting:y,onExited:y},m.UNMOUNTED=f,m.EXITED=d,m.ENTERING=p,m.ENTERED=h,m.EXITING=v;t.a=m}]]);
//# sourceMappingURL=2.9bb25706.chunk.js.map
|
"use strict";
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Immutable = require("immutable");
var core_1 = require("./core");
var primitives_1 = require("./primitives");
var html_1 = require("./html");
var combinators_1 = require("./combinators");
exports.simple_inner_form = function (mode, model_name, entries) {
return function (c) { return combinators_1.repeat(model_name(c.model) + "_repeater")(function (c) {
return combinators_1.any(model_name(c.model) + "_inner_form")(entries.map(function (e) {
return e.kind == "string" ?
combinators_1.retract(model_name(c.model) + "_" + e.field_name + "_retract")(function (c) { return e.in(c.model); }, function (c) { return function (s) {
var new_c = e.out(c.model)(s);
var errors = e.get_errors(new_c);
return { model: new_c, errors: errors.length > 0 ? c.errors.set(e.field_name, errors) : c.errors.remove(e.field_name) };
}; }, html_1.label(e.field_name, true)(html_1.div("monadic-field " + (c.errors.has(e.field_name) ? "monadic-field-error" : ""))(primitives_1.string(mode, "text", model_name(c.model) + "_" + e.field_name))))
: e.kind == "number" ?
combinators_1.retract(model_name(c.model) + "_" + e.field_name + "_retract")(function (c) { return e.in(c.model); }, function (c) { return function (s) {
var new_c = e.out(c.model)(s);
var errors = e.get_errors(new_c);
return { model: new_c, errors: errors.length > 0 ? c.errors.set(e.field_name, errors) : c.errors.remove(e.field_name) };
}; }, html_1.label(e.field_name, true)(html_1.div("monadic-field " + (c.errors.has(e.field_name) ? "monadic-field-error" : ""))(primitives_1.number(mode, model_name(c.model) + "_" + e.field_name))))
: e.kind == "image" ?
combinators_1.retract(model_name(c.model) + "_" + e.field_name + "_retract")(function (c) { return e.in(c.model); }, function (c) { return function (s) {
var new_c = e.out(c.model)(s);
var errors = e.get_errors(new_c);
return { model: new_c, errors: errors.length > 0 ? c.errors.set(e.field_name, errors) : c.errors.remove(e.field_name) };
}; }, html_1.label(e.field_name, true)(html_1.div("monadic-field " + (c.errors.has(e.field_name) ? "monadic-field-error" : ""))(html_1.image(mode, model_name(c.model) + "_" + e.field_name))))
: e.kind == "lazy image" ?
combinators_1.retract(model_name(c.model) + "_" + e.field_name + "_retract")(function (c) { return null; }, function (c) { return function (_) { return c; }; }, function (_) { return e.download(c.model).then(model_name(c.model) + "_" + e.field_name + "_downloader", function (src) {
return combinators_1.repeat()(function (src) {
return html_1.label(e.field_name, true)(html_1.image(mode, model_name(c.model) + "_" + e.field_name))(src).then(model_name(c.model) + "_" + e.field_name + "_uploader", function (new_src) {
return e.upload(c.model)(new_src);
});
})(src);
}).ignore(); })
: e.kind == "file" ?
combinators_1.retract(model_name(c.model) + "_" + e.field_name + "_retract")(function (c) { return e.in(c.model); }, function (c) { return function (s) {
var new_c = e.out(c.model)(s);
var errors = e.get_errors(new_c);
return { model: new_c, errors: errors.length > 0 ? c.errors.set(e.field_name, errors) : c.errors.remove(e.field_name) };
}; }, html_1.label(e.field_name, true)(html_1.div("monadic-field " + (c.errors.has(e.field_name) ? "monadic-field-error" : ""))(function (_) { return html_1.file(mode, e.filename(c.model), e.url(c.model)).ignore_with(null); })))
: e.kind == "lazy file" ?
combinators_1.retract(model_name(c.model) + "_" + e.field_name + "_retract")(function (c) { return null; }, function (c) { return function (f) { return (__assign({}, c, { model: e.out(c.model)(f) })); }; }, function (_) { return html_1.label(e.field_name, true)(function (_) {
return html_1.file(mode, e.filename(c.model), e.url(c.model)).then(model_name(c.model) + "_" + e.field_name + "_uploader", function (f) {
return e.upload(c.model)(f).ignore_with(f);
});
})(null); })
: e.kind == "datetime" ?
combinators_1.retract(model_name(c.model) + "_" + e.field_name + "_retract")(function (c) { return e.in(c.model); }, function (c) { return function (s) {
var new_c = e.out(c.model)(s);
var errors = e.get_errors(new_c);
return { model: new_c, errors: errors.length > 0 ? c.errors.set(e.field_name, errors) : c.errors.remove(e.field_name) };
}; }, primitives_1.date_time(mode, e.field_name, function () { return "Creating date_time formfield"; }))
:
null;
}))(c);
})(c); };
};
exports.form_errors = function (model_name, entries) {
return function (fd) { return combinators_1.any("form-errors")(entries.map(function (e) {
return e.kind != "lazy image" && e.kind != "image" ?
function (c) { return c.errors.has(e.field_name) ?
primitives_1.string("view", "text", model_name(c.model) + "_" + e.field_name)("" + c.errors.get(e.field_name)).ignore(model_name(c.model) + "_" + e.field_name + "_error_ignore").never()
:
core_1.unit(null).never(); }
:
function (c) { return core_1.unit(null).never(); };
}))(fd).filter(function (_) { return false; }); };
};
exports.simple_form_with_autosave = function (mode, model_name, entries, download_M, upload_M) {
return download_M.then(undefined, function (c) {
return exports.simple_inner_form(mode, model_name, entries)({ model: c, errors: Immutable.Map() })
.then(model_name(c) + "_error_recap", combinators_1.any()([
function (c) { return exports.form_errors(model_name, entries)(c).ignore_with(c).filter(function (_) { return false; }); },
function (c) { return core_1.unit(c); }
]))
.filter(function (c) { return c.errors.isEmpty(); }, model_name(c) + "_error_filter")
.map(function (c) { return c.model; }).then(model_name(c) + "_uploader", combinators_1.delay(200, model_name(c) + "_delay")(upload_M)).ignore();
});
};
exports.simple_form_with_save_button = function (mode, model_name, entries, download_M, upload_M) {
return download_M.then(undefined, function (c) {
return exports.simple_inner_form(mode, model_name, entries)({ model: c, errors: Immutable.Map() }).then(model_name(c) + "_form", function (c) {
return combinators_1.any()([
exports.form_errors(model_name, entries),
function (c) { return html_1.button("save", !c.errors.isEmpty())(c); }
])(c);
}).map(function (c) { return c.model; }).then(model_name(c) + "_uploader", combinators_1.delay(200, model_name(c) + "_delayer")(upload_M)).ignore();
});
};
exports.simple_form_with_prev_and_next_buttons = function (mode, model_name, entries, prev_enabled, next_enabled, prev_visible, next_visible, on_prev, on_next) {
return function (c) {
return exports.simple_inner_form(mode, model_name, entries)(c).then(model_name(c.model) + "_form", function (c) {
return combinators_1.any()([
exports.form_errors(model_name, entries),
function (c) { return prev_visible(c) ? html_1.button("prev", prev_enabled(c))(c).map(function (c) { return (__assign({}, c, { model: on_prev(c.model) })); }) : core_1.unit(c).filter(function (_) { return false; }); },
function (c) { return next_visible(c) ? html_1.button("next", next_enabled(c))(c).map(function (c) { return (__assign({}, c, { model: on_next(c.model) })); }) : core_1.unit(c).filter(function (_) { return false; }); }
])(c);
});
};
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcmVhY3RfbW9uYWQvZm9ybXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUdBLHFDQUFzQztBQUN0QywrQkFBMEM7QUFDMUMsMkNBQXdFO0FBQ3hFLCtCQUFnRjtBQUNoRiw2Q0FBNEY7QUFpQmpGLFFBQUEsaUJBQWlCLEdBQUcsVUFBWSxJQUFTLEVBQUUsVUFBd0IsRUFBRSxPQUFzQjtJQUNwRyxPQUFPLFVBQUEsQ0FBQyxJQUFJLE9BQUEsb0JBQU0sQ0FBaUIsVUFBVSxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsY0FBVyxDQUFDLENBQUMsVUFBQSxDQUFDO1FBQ2xFLE9BQUEsaUJBQUcsQ0FBOEIsVUFBVSxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsZ0JBQWEsQ0FBQyxDQUNoRSxPQUFPLENBQUMsR0FBRyxDQUFDLFVBQUEsQ0FBQztZQUNYLE9BQUEsQ0FBQyxDQUFDLElBQUksSUFBSSxRQUFRLENBQUMsQ0FBQztnQkFDbEIscUJBQU8sQ0FBeUIsVUFBVSxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsU0FBSSxDQUFDLENBQUMsVUFBVSxhQUFVLENBQUMsQ0FDNUUsVUFBQSxDQUFDLElBQUksT0FBQSxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsRUFBYixDQUFhLEVBQUUsVUFBQSxDQUFDLElBQUksT0FBQSxVQUFBLENBQUM7b0JBQ3hCLElBQUksS0FBSyxHQUFHLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFBO29CQUM3QixJQUFJLE1BQU0sR0FBRyxDQUFDLENBQUMsVUFBVSxDQUFDLEtBQUssQ0FBQyxDQUFBO29CQUNoQyxPQUFPLEVBQUUsS0FBSyxFQUFDLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxVQUFVLEVBQUUsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxVQUFVLENBQUMsRUFBQyxDQUFBO2dCQUFDLENBQUMsRUFIaEcsQ0FHZ0csRUFDekgsWUFBSyxDQUFpQixDQUFDLENBQUMsVUFBVSxFQUFFLElBQUksQ0FBQyxDQUFDLFVBQUcsQ0FBaUIsb0JBQWlCLENBQUMsQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLENBQUMscUJBQXFCLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBRSxDQUFDLENBS3hJLG1CQUFNLENBQUMsSUFBSSxFQUFFLE1BQU0sRUFBSyxVQUFVLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxTQUFJLENBQUMsQ0FBQyxVQUFZLENBQUMsQ0FBQyxDQUFDLENBQUM7Z0JBQ3RFLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBSSxJQUFJLFFBQVEsQ0FBQyxDQUFDO29CQUNwQixxQkFBTyxDQUF5QixVQUFVLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxTQUFJLENBQUMsQ0FBQyxVQUFVLGFBQVUsQ0FBQyxDQUM1RSxVQUFBLENBQUMsSUFBSSxPQUFBLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxFQUFiLENBQWEsRUFBRSxVQUFBLENBQUMsSUFBSSxPQUFBLFVBQUEsQ0FBQzt3QkFDeEIsSUFBSSxLQUFLLEdBQUcsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUE7d0JBQzdCLElBQUksTUFBTSxHQUFHLENBQUMsQ0FBQyxVQUFVLENBQUMsS0FBSyxDQUFDLENBQUE7d0JBQ2hDLE9BQU8sRUFBRSxLQUFLLEVBQUMsS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLFVBQVUsRUFBRSxNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxFQUFDLENBQUE7b0JBQUMsQ0FBQyxFQUhoRyxDQUdnRyxFQUN6SCxZQUFLLENBQWlCLENBQUMsQ0FBQyxVQUFVLEVBQUUsSUFBSSxDQUFDLENBQUMsVUFBRyxDQUFpQixvQkFBaUIsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxxQkFBcUIsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFFLENBQUMsQ0FDeEksbUJBQU0sQ0FBQyxJQUFJLEVBQUssVUFBVSxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsU0FBSSxDQUFDLENBQUMsVUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFDO29CQUM5RCxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksSUFBSSxPQUFPLENBQUMsQ0FBQzt3QkFDbkIscUJBQU8sQ0FBeUIsVUFBVSxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsU0FBSSxDQUFDLENBQUMsVUFBVSxhQUFVLENBQUMsQ0FDNUUsVUFBQSxDQUFDLElBQUksT0FBQSxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsRUFBYixDQUFhLEVBQUUsVUFBQSxDQUFDLElBQUksT0FBQSxVQUFBLENBQUM7NEJBQ3hCLElBQUksS0FBSyxHQUFHLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFBOzRCQUM3QixJQUFJLE1BQU0sR0FBRyxDQUFDLENBQUMsVUFBVSxDQUFDLEtBQUssQ0FBQyxDQUFBOzRCQUNoQyxPQUFPLEVBQUUsS0FBSyxFQUFDLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxVQUFVLEVBQUUsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxVQUFVLENBQUMsRUFBQyxDQUFBO3dCQUFDLENBQUMsRUFIaEcsQ0FHZ0csRUFDekgsWUFBSyxDQUFpQixDQUFDLENBQUMsVUFBVSxFQUFFLElBQUksQ0FBQyxDQUFDLFVBQUcsQ0FBaUIsb0JBQWlCLENBQUMsQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLENBQUMscUJBQXFCLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBRSxDQUFDLENBQ3hJLFlBQUssQ0FBQyxJQUFJLEVBQUssVUFBVSxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsU0FBSSxDQUFDLENBQUMsVUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFDO3dCQUM3RCxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksSUFBSSxZQUFZLENBQUMsQ0FBQzs0QkFDeEIscUJBQU8sQ0FBdUIsVUFBVSxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsU0FBSSxDQUFDLENBQUMsVUFBVSxhQUFVLENBQUMsQ0FDMUUsVUFBQSxDQUFDLElBQUksT0FBQSxJQUFJLEVBQUosQ0FBSSxFQUFFLFVBQUEsQ0FBQyxJQUFJLE9BQUEsVUFBQSxDQUFDLElBQUksT0FBQSxDQUFDLEVBQUQsQ0FBQyxFQUFOLENBQU0sRUFDdEIsVUFBQSxDQUFDLElBQUksT0FBQSxDQUFDLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQyxJQUFJLENBQUksVUFBVSxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsU0FBSSxDQUFDLENBQUMsVUFBVSxnQkFBYSxFQUFFLFVBQUEsR0FBRztnQ0FDdEYsT0FBQSxvQkFBTSxFQUFVLENBQUMsVUFBQyxHQUFVO29DQUMxQixPQUFBLFlBQUssQ0FBaUIsQ0FBQyxDQUFDLFVBQVUsRUFBRSxJQUFJLENBQUMsQ0FBQyxZQUFLLENBQUMsSUFBSSxFQUFLLFVBQVUsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLFNBQUksQ0FBQyxDQUFDLFVBQVksQ0FBQyxDQUFDLENBQUMsR0FBRyxDQUFDLENBQUMsSUFBSSxDQUFJLFVBQVUsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLFNBQUksQ0FBQyxDQUFDLFVBQVUsY0FBVyxFQUFFLFVBQUEsT0FBTzt3Q0FDckssT0FBQSxDQUFDLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQyxPQUFPLENBQUM7b0NBQTFCLENBQTBCLENBQUM7Z0NBRDNCLENBQzJCLENBQUMsQ0FBQyxHQUFHLENBQUM7NEJBRm5DLENBRW1DLENBQUMsQ0FBQyxNQUFNLEVBQUUsRUFIeEMsQ0FHd0MsQ0FBQzs0QkFDbEQsQ0FBQyxDQUFDLENBQUMsQ0FBQyxJQUFJLElBQUksTUFBTSxDQUFDLENBQUM7Z0NBQ2xCLHFCQUFPLENBQXVCLFVBQVUsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLFNBQUksQ0FBQyxDQUFDLFVBQVUsYUFBVSxDQUFDLENBQzFFLFVBQUEsQ0FBQyxJQUFJLE9BQUEsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLEVBQWIsQ0FBYSxFQUFFLFVBQUEsQ0FBQyxJQUFJLE9BQUEsVUFBQSxDQUFDO29DQUN4QixJQUFJLEtBQUssR0FBRyxDQUFDLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQTtvQ0FDN0IsSUFBSSxNQUFNLEdBQUcsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxLQUFLLENBQUMsQ0FBQTtvQ0FDaEMsT0FBTyxFQUFFLEtBQUssRUFBQyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsVUFBVSxFQUFFLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsVUFBVSxDQUFDLEVBQUMsQ0FBQTtnQ0FBQyxDQUFDLEVBSGhHLENBR2dHLEVBQ3pILFlBQUssQ0FBYSxDQUFDLENBQUMsVUFBVSxFQUFFLElBQUksQ0FBQyxDQUFDLFVBQUcsQ0FBYSxvQkFBaUIsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxxQkFBcUIsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFFLENBQUMsQ0FDaEksVUFBQSxDQUFDLElBQUksT0FBQSxXQUFJLENBQUMsSUFBSSxFQUFFLENBQUMsQ0FBQyxRQUFRLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxFQUFFLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsV0FBVyxDQUFPLElBQUksQ0FBQyxFQUF2RSxDQUF1RSxDQUFDLENBQUMsQ0FBQztnQ0FDcEYsQ0FBQyxDQUFDLENBQUMsQ0FBQyxJQUFJLElBQUksV0FBVyxDQUFDLENBQUM7b0NBQ3ZCLHFCQUFPLENBQXVCLFVBQVUsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLFNBQUksQ0FBQyxDQUFDLFVBQVUsYUFBVSxDQUFDLENBQzFFLFVBQUEsQ0FBQyxJQUFJLE9BQUEsSUFBSSxFQUFKLENBQUksRUFBRSxVQUFBLENBQUMsSUFBSSxPQUFBLFVBQUEsQ0FBQyxJQUFJLE9BQUEsY0FBSyxDQUFDLElBQUUsS0FBSyxFQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxJQUFFLEVBQWpDLENBQWlDLEVBQXRDLENBQXNDLEVBQ3RELFVBQUEsQ0FBQyxJQUFJLE9BQUEsWUFBSyxDQUFhLENBQUMsQ0FBQyxVQUFVLEVBQUUsSUFBSSxDQUFDLENBQUMsVUFBQSxDQUFDO3dDQUN0QyxPQUFBLFdBQUksQ0FBQyxJQUFJLEVBQUUsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLEVBQUUsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUksVUFBVSxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsU0FBSSxDQUFDLENBQUMsVUFBVSxjQUFXLEVBQUUsVUFBQSxDQUFDOzRDQUN6RyxPQUFBLENBQUMsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLFdBQVcsQ0FBQyxDQUFDLENBQUM7d0NBQW5DLENBQW1DLENBQUM7b0NBRHBDLENBQ29DLENBQUMsQ0FBQyxJQUFJLENBQUMsRUFGNUMsQ0FFNEMsQ0FBQztvQ0FDdEQsQ0FBQyxDQUFDLENBQUMsQ0FBQyxJQUFJLElBQUksVUFBVSxDQUFDLENBQUM7d0NBQ3RCLHFCQUFPLENBQWdDLFVBQVUsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLFNBQUksQ0FBQyxDQUFDLFVBQVUsYUFBVSxDQUFDLENBQ25GLFVBQUEsQ0FBQyxJQUFJLE9BQUEsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLEVBQWIsQ0FBYSxFQUFFLFVBQUEsQ0FBQyxJQUFJLE9BQUEsVUFBQSxDQUFDOzRDQUN4QixJQUFJLEtBQUssR0FBRyxDQUFDLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQTs0Q0FDN0IsSUFBSSxNQUFNLEdBQUcsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxLQUFLLENBQUMsQ0FBQTs0Q0FDaEMsT0FBTyxFQUFFLEtBQUssRUFBQyxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsVUFBVSxFQUFFLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsVUFBVSxDQUFDLEVBQUMsQ0FBQTt3Q0FBQyxDQUFDLEVBSGhHLENBR2dHLEVBQ3ZILHNCQUFTLENBQUMsSUFBSSxFQUFFLENBQUMsQ0FBQyxVQUFVLEVBQUUsY0FBTSxPQUFBLDhCQUE4QixFQUE5QixDQUE4QixDQUFDLENBQ3RFO3dDQUNILENBQUM7NENBQ0MsSUFBSTtRQTFETixDQTBETSxDQUNQLENBQUMsQ0FBQyxDQUFDLENBQUM7SUE3RFAsQ0E2RE8sQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQTlERCxDQThEQyxDQUFBO0FBQ2YsQ0FBQyxDQUFBO0FBRVUsUUFBQSxXQUFXLEdBQUcsVUFBWSxVQUF3QixFQUFFLE9BQXNCO0lBQ25GLE9BQU8sVUFBQSxFQUFFLElBQUksT0FBQSxpQkFBRyxDQUEyQixhQUFhLENBQUMsQ0FDbkQsT0FBTyxDQUFDLEdBQUcsQ0FBQyxVQUFBLENBQUM7UUFDWCxPQUFBLENBQUMsQ0FBQyxJQUFJLElBQUksWUFBWSxJQUFJLENBQUMsQ0FBQyxJQUFJLElBQUksT0FBTyxDQUFDLENBQUM7WUFDM0MsVUFBQSxDQUFDLElBQUksT0FBQSxDQUFDLENBQUMsTUFBTSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQztnQkFDL0IsbUJBQU0sQ0FBQyxNQUFNLEVBQUUsTUFBTSxFQUFLLFVBQVUsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLFNBQUksQ0FBQyxDQUFDLFVBQVksQ0FBQyxDQUFDLEtBQUcsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLFVBQVUsQ0FBRyxDQUFDLENBQUMsTUFBTSxDQUFJLFVBQVUsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLFNBQUksQ0FBQyxDQUFDLFVBQVUsa0JBQWUsQ0FBQyxDQUFDLEtBQUssRUFBZTtnQkFDdEwsQ0FBQztvQkFDQyxXQUFJLENBQU8sSUFBSSxDQUFDLENBQUMsS0FBSyxFQUFlLEVBSGxDLENBR2tDO1lBQ3pDLENBQUM7Z0JBQ0MsVUFBQSxDQUFDLElBQUksT0FBQSxXQUFJLENBQU8sSUFBSSxDQUFDLENBQUMsS0FBSyxFQUFlLEVBQXJDLENBQXFDO0lBTjVDLENBTTRDLENBQzNDLENBQ0osQ0FBQyxFQUFFLENBQUMsQ0FBQyxNQUFNLENBQUMsVUFBQSxDQUFDLElBQUksT0FBQSxLQUFLLEVBQUwsQ0FBSyxDQUFDLEVBVmYsQ0FVZSxDQUFBO0FBQzlCLENBQUMsQ0FBQTtBQUVVLFFBQUEseUJBQXlCLEdBQUcsVUFBWSxJQUFTLEVBQUUsVUFBd0IsRUFBRSxPQUFzQixFQUMxRyxVQUFlLEVBQUUsUUFBb0I7SUFDdkMsT0FBTyxVQUFVLENBQUMsSUFBSSxDQUFDLFNBQVMsRUFBRSxVQUFBLENBQUM7UUFDbkMsT0FBQSx5QkFBaUIsQ0FBSSxJQUFJLEVBQUUsVUFBVSxFQUFFLE9BQU8sQ0FBQyxDQUFDLEVBQUUsS0FBSyxFQUFDLENBQUMsRUFBRSxNQUFNLEVBQUMsU0FBUyxDQUFDLEdBQUcsRUFBd0IsRUFBRSxDQUFDO2FBQ3pHLElBQUksQ0FBSSxVQUFVLENBQUMsQ0FBQyxDQUFDLGlCQUFjLEVBQ3BDLGlCQUFHLEVBQTRCLENBQUM7WUFDOUIsVUFBQSxDQUFDLElBQUksT0FBQSxtQkFBVyxDQUFJLFVBQVUsRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxXQUFXLENBQUMsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLFVBQUEsQ0FBQyxJQUFJLE9BQUEsS0FBSyxFQUFMLENBQUssQ0FBQyxFQUF4RSxDQUF3RTtZQUM3RSxVQUFBLENBQUMsSUFBSSxPQUFBLFdBQUksQ0FBYyxDQUFDLENBQUMsRUFBcEIsQ0FBb0I7U0FDMUIsQ0FBQyxDQUFDO2FBQ0YsTUFBTSxDQUFDLFVBQUEsQ0FBQyxJQUFJLE9BQUEsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxPQUFPLEVBQUUsRUFBbEIsQ0FBa0IsRUFBSyxVQUFVLENBQUMsQ0FBQyxDQUFDLGtCQUFlLENBQUM7YUFDaEUsR0FBRyxDQUFJLFVBQUEsQ0FBQyxJQUFJLE9BQUEsQ0FBQyxDQUFDLEtBQUssRUFBUCxDQUFPLENBQUMsQ0FBQyxJQUFJLENBQUksVUFBVSxDQUFDLENBQUMsQ0FBQyxjQUFXLEVBQ3RELG1CQUFLLENBQUksR0FBRyxFQUFLLFVBQVUsQ0FBQyxDQUFDLENBQUMsV0FBUSxDQUFDLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxNQUFNLEVBQUU7SUFSM0QsQ0FRMkQsQ0FBQyxDQUFBO0FBQzlELENBQUMsQ0FBQTtBQUdVLFFBQUEsNEJBQTRCLEdBQUcsVUFBWSxJQUFTLEVBQUUsVUFBd0IsRUFBRSxPQUFzQixFQUM3RyxVQUFlLEVBQUUsUUFBb0I7SUFDdkMsT0FBTyxVQUFVLENBQUMsSUFBSSxDQUFDLFNBQVMsRUFBRSxVQUFBLENBQUM7UUFDakMsT0FBQSx5QkFBaUIsQ0FBSSxJQUFJLEVBQUUsVUFBVSxFQUFFLE9BQU8sQ0FBQyxDQUFDLEVBQUUsS0FBSyxFQUFDLENBQUMsRUFBRSxNQUFNLEVBQUMsU0FBUyxDQUFDLEdBQUcsRUFBd0IsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFJLFVBQVUsQ0FBQyxDQUFDLENBQUMsVUFBTyxFQUFFLFVBQUEsQ0FBQztZQUN4SSxPQUFBLGlCQUFHLEVBQTRCLENBQUM7Z0JBQzlCLG1CQUFXLENBQUksVUFBVSxFQUFFLE9BQU8sQ0FBQztnQkFDbkMsVUFBQSxDQUFDLElBQUksT0FBQSxhQUFNLENBQWMsTUFBTSxFQUFFLENBQUMsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxPQUFPLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFuRCxDQUFtRDthQUN6RCxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBSEwsQ0FHSyxDQUNOLENBQUMsR0FBRyxDQUFJLFVBQUEsQ0FBQyxJQUFJLE9BQUEsQ0FBQyxDQUFDLEtBQUssRUFBUCxDQUFPLENBQUMsQ0FBQyxJQUFJLENBQUksVUFBVSxDQUFDLENBQUMsQ0FBQyxjQUFXLEVBQ3ZELG1CQUFLLENBQUksR0FBRyxFQUFLLFVBQVUsQ0FBQyxDQUFDLENBQUMsYUFBVSxDQUFDLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxNQUFNLEVBQUU7SUFON0QsQ0FNNkQsQ0FBQyxDQUFBO0FBQ2xFLENBQUMsQ0FBQTtBQUVVLFFBQUEsc0NBQXNDLEdBQUcsVUFBWSxJQUFTLEVBQUUsVUFBd0IsRUFBRSxPQUFzQixFQUN2SCxZQUFxQyxFQUFFLFlBQXFDLEVBQzVFLFlBQXFDLEVBQUUsWUFBcUMsRUFDNUUsT0FBZ0IsRUFBRSxPQUFnQjtJQUNwQyxPQUFPLFVBQUEsQ0FBQztRQUNOLE9BQUEseUJBQWlCLENBQUksSUFBSSxFQUFFLFVBQVUsRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUksVUFBVSxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsVUFBTyxFQUFFLFVBQUEsQ0FBQztZQUN0RixPQUFBLGlCQUFHLEVBQTRCLENBQUM7Z0JBQzlCLG1CQUFXLENBQUksVUFBVSxFQUFFLE9BQU8sQ0FBQztnQkFDbkMsVUFBQSxDQUFDLElBQUksT0FBQSxZQUFZLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLGFBQU0sQ0FBYyxNQUFNLEVBQUUsWUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsR0FBRyxDQUFjLFVBQUEsQ0FBQyxJQUFJLE9BQUEsY0FBSyxDQUFDLElBQUUsS0FBSyxFQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLElBQUUsRUFBaEMsQ0FBZ0MsQ0FBQyxDQUFDLENBQUMsQ0FBQyxXQUFJLENBQWMsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLFVBQUEsQ0FBQyxJQUFJLE9BQUEsS0FBSyxFQUFMLENBQUssQ0FBQyxFQUFuSyxDQUFtSztnQkFDeEssVUFBQSxDQUFDLElBQUksT0FBQSxZQUFZLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLGFBQU0sQ0FBYyxNQUFNLEVBQUUsWUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsR0FBRyxDQUFjLFVBQUEsQ0FBQyxJQUFJLE9BQUEsY0FBSyxDQUFDLElBQUUsS0FBSyxFQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLElBQUUsRUFBaEMsQ0FBZ0MsQ0FBQyxDQUFDLENBQUMsQ0FBQyxXQUFJLENBQWMsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLFVBQUEsQ0FBQyxJQUFJLE9BQUEsS0FBSyxFQUFMLENBQUssQ0FBQyxFQUFuSyxDQUFtSzthQUN6SyxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBSkwsQ0FJSyxDQUNOO0lBTkQsQ0FNQyxDQUFBO0FBQ0wsQ0FBQyxDQUFBIn0=
|
/* global assert, setup, suite, test */
require('aframe');
require('../index.js');
var entityFactory = require('./helpers').entityFactory;
suite('aframe-soundscape component', function () {
var component;
var el;
setup(function (done) {
el = entityFactory();
el.addEventListener('componentinitialized', function (evt) {
if (evt.detail.name !== 'aframe-soundscape') { return; }
component = el.components['aframe-soundscape'];
done();
});
el.setAttribute('aframe-soundscape', {});
});
suite('foo property', function () {
test('is good', function () {
assert.equal(1, 1);
});
});
});
|
module.exports = function parseStringAsArray(arrayAsString){
return arrayAsString.split(',').map(string => string.trim());
}
|
console.log('hi from node ' + process.version);
|
########################################################################
# Note: keep classes flat so dict unpacking (fromdict) continues to work
########################################################################
class PackageInstall:
def __init__(
self,
*,
package,
name="package-install",
):
self.name = name
self.package = package
class PackageInstallResponse:
def __init__(
self,
*,
package,
result,
error,
name="package-install-response",
):
self.name = name
self.package = package
self.result = result
self.error = error
class PackageRemove:
def __init__(
self,
*,
package,
name="package-remove",
):
self.name = name
self.package = package
class PackageRemoveResponse:
def __init__(
self,
*,
package,
result,
error,
name="package-remove-response",
):
self.name = name
self.package = package
self.result = result
self.error = error
class FileDelete:
def __init__(
self,
*,
path,
name="file-delete",
):
self.name = name
self.path = path
class FileDeleteResponse:
def __init__(
self,
*,
path,
result,
error,
name="file-delete-response",
):
self.name = name
self.path = path
self.result = result
self.error = error
class FileGetProps:
def __init__(
self,
*,
path,
name="file-get-props",
):
self.name = name
self.path = path
class FileGetPropsResponse:
def __init__(
self,
*,
path,
result,
error,
hash,
group,
user,
mode,
name="file-get-props-response",
):
self.name = name
self.path = path
self.result = result
self.error = error
self.hash = hash
self.group = group
self.user = user
self.mode = mode
class FileSetProps:
def __init__(
self,
*,
path,
group,
user,
mode,
name="file-set-props",
):
self.name = name
self.path = path
self.group = group
self.user = user
self.mode = mode
class FileSetPropsResponse:
def __init__(
self,
*,
path,
result,
error,
name="file-set-props-response",
):
self.name = name
self.path = path
self.result = result
self.error = error
class ServiceRestart:
def __init__(
self,
*,
service,
name="service-restart",
):
self.name = name
self.service = service
class ServiceRestartResponse:
def __init__(
self,
*,
service,
result,
error,
name="service-restart-response",
):
self.name = name
self.service = service
self.result = result
self.error = error
class RehearsalStart:
def __init__(self, *, name="rehearsal-start"):
self.name = name
class RehearsalStartResponse:
def __init__(self, *, result, error, name="rehearsal-start-response"):
self.name = name
self.result = result
self.error = error
def fromdict(d):
cmd_name = d["name"]
if cmd_name == "package-install":
return PackageInstall(**d)
elif cmd_name == "package-install-response":
return PackageInstallResponse(**d)
elif cmd_name == "package-remove":
return PackageRemove(**d)
elif cmd_name == "package-remove-response":
return PackageRemoveResponse(**d)
elif cmd_name == "file-get-props":
return FileGetProps(**d)
elif cmd_name == "file-get-props-response":
return FileGetPropsResponse(**d)
elif cmd_name == "file-set-props":
return FileSetProps(**d)
elif cmd_name == "file-set-props-response":
return FileSetPropsResponse(**d)
elif cmd_name == "file-delete":
return FileDelete(**d)
elif cmd_name == "file-delete-response":
return FileDeleteResponse(**d)
elif cmd_name == "service-restart":
return ServiceRestart(**d)
elif cmd_name == "service-restart-response":
return ServiceRestartResponse(**d)
elif cmd_name == "rehearsal-start":
return RehearsalStart(**d)
elif cmd_name == "rehearsal-start-response":
return RehearsalStartResponse(**d)
|
const options = [
{ value: 'add', label: 'add' },
{ value: 'commit', label: 'commit' },
{ value: 'revert', label: 'revert/reset' },
{ value: 'initialize', label: 'initialize' },
{ value: 'modify', label: 'modify' },
{ value: 'show', label: 'show/view' },
{ value: 'delete', label: 'delete/remove' },
{ value: 'compareCommits', label: 'compare two commits' },
{ value: 'configure', label: 'configure' },
{ value: 'clone', label: 'clone' },
{ value: 'ignore', label: 'ignore' },
{ value: 'rename', label: 'rename' },
{ value: 'merge', label: 'merge' },
{ value: 'squash', label: 'squash' },
{ value: 'stash', label: 'stash' },
{ value: 'debug', label: 'debug' },
{ value: 'recover', label: 'recover' },
{ value: 'synchronize', label: 'synchronize' },
{ value: 'rebase', label: 'rebase' },
{ value: 'cherrypick', label: 'cherry-pick' },
];
const options_fa = [
{ value: 'add', label: 'اضافه کردن' },
{ value: 'commit', label: 'کامیت' },
{ value: 'revert', label: 'برگرداندن' },
{ value: 'initialize', label: 'مقداردهی اولیه' },
{ value: 'modify', label: 'اصلاح کردن' },
{ value: 'show', label: 'نشان دادن' },
{ value: 'delete', label: 'حذف کردن' },
{ value: 'compareCommits', label: 'مقایسه دو کامیت' },
{ value: 'configure', label: 'پیکربندی' },
{ value: 'clone', label: 'کلون' },
{ value: 'ignore', label: 'نادیده گرفتن' },
{ value: 'rename', label: 'تغییر نام' },
{ value: 'merge', label: 'ادغام' },
{ value: 'squash', label: 'اسکواش' },
{ value: 'stash', label: 'ذخیره کردن' },
{ value: 'debug', label: 'اشکال زدایی' },
{ value: 'recover', label: 'بازیافتن' },
{ value: 'synchronize', label: 'همگام سازی' },
{ value: 'rebase', label: 'پایه گذاری مجدد' },
{ value: 'cherrypick', label: 'انتخاب بهترین ' },
];
export const primaryOptions = options_fa.sort((x, y) => {
if (x.value < y.value) {
return -1;
}
if (x.value > y.value) {
return 1;
}
return 0;
});
|
from summarize.nn.beam_search.length_penalizers.length_penalizer import LengthPenalizer
from summarize.nn.beam_search.length_penalizers.average import AverageLengthPenalizer
from summarize.nn.beam_search.length_penalizers.wu import WuLengthPenalizer
|
class Solution:
def increasingTriplet(self, nums: List[int]) -> bool:
first = second = math.inf
for num in nums:
if num <= first:
first = num
elif num <= second:
second = num
else:
return True
return False
|
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.extensionForMediaMessage = exports.decryptMediaMessageBuffer = exports.encryptedStream = exports.getGotStream = exports.generateThumbnail = exports.getStream = exports.toReadable = exports.getAudioDuration = exports.mediaMessageSHA256B64 = exports.ProxyAgent = exports.generateProfilePicture = exports.compressImage = exports.getMediaKeys = exports.decryptWA = exports.generateMessageID = exports.generateClientID = exports.generateMessageTag = exports.promiseTimeout = exports.delayCancellable = exports.delay = exports.debouncedTimeout = exports.unixTimestampSeconds = exports.randomBytes = exports.hkdf = exports.sha256 = exports.hmacSign = exports.aesEncrypWithIV = exports.aesEncrypt = exports.aesDecryptWithIV = exports.aesDecrypt = exports.shallowChanges = exports.newMessagesDB = exports.isGroupID = exports.whatsappID = exports.GET_MESSAGE_ID = exports.WA_MESSAGE_ID = exports.waMessageKey = exports.waChatKey = exports.toNumber = exports.Browsers = void 0;
const Crypto = __importStar(require("crypto"));
const stream_1 = require("stream");
const futoin_hkdf_1 = __importDefault(require("futoin-hkdf"));
const jimp_1 = __importDefault(require("jimp"));
const fs_1 = require("fs");
const child_process_1 = require("child_process");
const os_1 = require("os");
const https_proxy_agent_1 = __importDefault(require("https-proxy-agent"));
const Constants_1 = require("./Constants");
const keyed_db_1 = __importDefault(require("@adiwajshing/keyed-db"));
const got_1 = __importDefault(require("got"));
const path_1 = require("path");
const platformMap = {
'aix': 'AIX',
'darwin': 'Mac OS',
'win32': 'Windows',
'android': 'Android'
};
exports.Browsers = {
ubuntu: browser => ['Ubuntu', browser, '18.04'],
macOS: browser => ['Mac OS', browser, '10.15.3'],
baileys: browser => ['Baileys', browser, '3.0'],
/** The appropriate browser based on your OS & release */
appropriate: browser => [platformMap[os_1.platform()] || 'Ubuntu', browser, os_1.release()]
};
const toNumber = (t) => (t['low'] || t);
exports.toNumber = toNumber;
const waChatKey = (pin) => ({
key: (c) => (pin ? (c.pin ? '1' : '0') : '') + (c.archive === 'true' ? '0' : '1') + c.t.toString(16).padStart(8, '0') + c.jid,
compare: (k1, k2) => k2.localeCompare(k1)
});
exports.waChatKey = waChatKey;
exports.waMessageKey = {
key: (m) => (5000 + (m['epoch'] || 0)).toString(16).padStart(6, '0') + exports.toNumber(m.messageTimestamp).toString(16).padStart(8, '0'),
compare: (k1, k2) => k1.localeCompare(k2)
};
const WA_MESSAGE_ID = (m) => exports.GET_MESSAGE_ID(m.key);
exports.WA_MESSAGE_ID = WA_MESSAGE_ID;
const GET_MESSAGE_ID = (key) => `${key.id}|${key.fromMe ? 1 : 0}`;
exports.GET_MESSAGE_ID = GET_MESSAGE_ID;
const whatsappID = (jid) => jid === null || jid === void 0 ? void 0 : jid.replace('@c.us', '@s.whatsapp.net');
exports.whatsappID = whatsappID;
const isGroupID = (jid) => jid === null || jid === void 0 ? void 0 : jid.endsWith('@g.us');
exports.isGroupID = isGroupID;
const newMessagesDB = (messages = []) => {
const db = new keyed_db_1.default(exports.waMessageKey, exports.WA_MESSAGE_ID);
messages.forEach(m => !db.get(exports.WA_MESSAGE_ID(m)) && db.insert(m));
return db;
};
exports.newMessagesDB = newMessagesDB;
function shallowChanges(old, current, { lookForDeletedKeys }) {
let changes = {};
for (let key in current) {
if (old[key] !== current[key]) {
changes[key] = current[key] || null;
}
}
if (lookForDeletedKeys) {
for (let key in old) {
if (!changes[key] && old[key] !== current[key]) {
changes[key] = current[key] || null;
}
}
}
return changes;
}
exports.shallowChanges = shallowChanges;
/** decrypt AES 256 CBC; where the IV is prefixed to the buffer */
function aesDecrypt(buffer, key) {
return aesDecryptWithIV(buffer.slice(16, buffer.length), key, buffer.slice(0, 16));
}
exports.aesDecrypt = aesDecrypt;
/** decrypt AES 256 CBC */
function aesDecryptWithIV(buffer, key, IV) {
const aes = Crypto.createDecipheriv('aes-256-cbc', key, IV);
return Buffer.concat([aes.update(buffer), aes.final()]);
}
exports.aesDecryptWithIV = aesDecryptWithIV;
// encrypt AES 256 CBC; where a random IV is prefixed to the buffer
function aesEncrypt(buffer, key) {
const IV = randomBytes(16);
const aes = Crypto.createCipheriv('aes-256-cbc', key, IV);
return Buffer.concat([IV, aes.update(buffer), aes.final()]); // prefix IV to the buffer
}
exports.aesEncrypt = aesEncrypt;
// encrypt AES 256 CBC with a given IV
function aesEncrypWithIV(buffer, key, IV) {
const aes = Crypto.createCipheriv('aes-256-cbc', key, IV);
return Buffer.concat([aes.update(buffer), aes.final()]); // prefix IV to the buffer
}
exports.aesEncrypWithIV = aesEncrypWithIV;
// sign HMAC using SHA 256
function hmacSign(buffer, key) {
return Crypto.createHmac('sha256', key).update(buffer).digest();
}
exports.hmacSign = hmacSign;
function sha256(buffer) {
return Crypto.createHash('sha256').update(buffer).digest();
}
exports.sha256 = sha256;
// HKDF key expansion
function hkdf(buffer, expandedLength, info = null) {
return futoin_hkdf_1.default(buffer, expandedLength, { salt: Buffer.alloc(32), info: info, hash: 'SHA-256' });
}
exports.hkdf = hkdf;
// generate a buffer with random bytes of the specified length
function randomBytes(length) {
return Crypto.randomBytes(length);
}
exports.randomBytes = randomBytes;
/** unix timestamp of a date in seconds */
const unixTimestampSeconds = (date = new Date()) => Math.floor(date.getTime() / 1000);
exports.unixTimestampSeconds = unixTimestampSeconds;
const debouncedTimeout = (intervalMs = 1000, task = undefined) => {
let timeout;
return {
start: (newIntervalMs, newTask) => {
task = newTask || task;
intervalMs = newIntervalMs || intervalMs;
timeout && clearTimeout(timeout);
timeout = setTimeout(task, intervalMs);
},
cancel: () => {
timeout && clearTimeout(timeout);
timeout = undefined;
},
setTask: (newTask) => task = newTask,
setInterval: (newInterval) => intervalMs = newInterval
};
};
exports.debouncedTimeout = debouncedTimeout;
const delay = (ms) => exports.delayCancellable(ms).delay;
exports.delay = delay;
const delayCancellable = (ms) => {
const stack = new Error().stack;
let timeout;
let reject;
const delay = new Promise((resolve, _reject) => {
timeout = setTimeout(resolve, ms);
reject = _reject;
});
const cancel = () => {
clearTimeout(timeout);
reject(Constants_1.CancelledError(stack));
};
return { delay, cancel };
};
exports.delayCancellable = delayCancellable;
async function promiseTimeout(ms, promise) {
if (!ms)
return new Promise(promise);
const stack = new Error().stack;
// Create a promise that rejects in <ms> milliseconds
let { delay, cancel } = exports.delayCancellable(ms);
const p = new Promise((resolve, reject) => {
delay
.then(() => reject(Constants_1.TimedOutError(stack)))
.catch(err => reject(err));
promise(resolve, reject);
})
.finally(cancel);
return p;
}
exports.promiseTimeout = promiseTimeout;
// whatsapp requires a message tag for every message, we just use the timestamp as one
function generateMessageTag(epoch) {
let tag = exports.unixTimestampSeconds().toString();
if (epoch)
tag += '.--' + epoch; // attach epoch if provided
return tag;
}
exports.generateMessageTag = generateMessageTag;
// generate a random 16 byte client ID
function generateClientID() {
return randomBytes(16).toString('base64');
}
exports.generateClientID = generateClientID;
// generate a random 16 byte ID to attach to a message
function generateMessageID() {
return '3EB0' + randomBytes(4).toString('hex').toUpperCase();
}
exports.generateMessageID = generateMessageID;
function decryptWA(message, macKey, encKey, decoder, fromMe = false) {
let commaIndex = message.indexOf(','); // all whatsapp messages have a tag and a comma, followed by the actual message
if (commaIndex < 0)
throw new Constants_1.BaileysError('invalid message', { message }); // if there was no comma, then this message must be not be valid
if (message[commaIndex + 1] === ',')
commaIndex += 1;
let data = message.slice(commaIndex + 1, message.length);
// get the message tag.
// If a query was done, the server will respond with the same message tag we sent the query with
const messageTag = message.slice(0, commaIndex).toString();
let json;
let tags;
if (data.length > 0) {
if (typeof data === 'string') {
json = JSON.parse(data); // parse the JSON
}
else {
if (!macKey || !encKey) {
throw new Constants_1.BaileysError('recieved encrypted buffer when auth creds unavailable', { message });
}
/*
If the data recieved was not a JSON, then it must be an encrypted message.
Such a message can only be decrypted if we're connected successfully to the servers & have encryption keys
*/
if (fromMe) {
tags = [data[0], data[1]];
data = data.slice(2, data.length);
}
const checksum = data.slice(0, 32); // the first 32 bytes of the buffer are the HMAC sign of the message
data = data.slice(32, data.length); // the actual message
const computedChecksum = hmacSign(data, macKey); // compute the sign of the message we recieved using our macKey
if (checksum.equals(computedChecksum)) {
// the checksum the server sent, must match the one we computed for the message to be valid
const decrypted = aesDecrypt(data, encKey); // decrypt using AES
json = decoder.read(decrypted); // decode the binary message into a JSON array
}
else {
throw new Constants_1.BaileysError('checksum failed', {
received: checksum.toString('hex'),
computed: computedChecksum.toString('hex'),
data: data.slice(0, 80).toString(),
tag: messageTag,
message: message.slice(0, 80).toString()
});
}
}
}
return [messageTag, json, tags];
}
exports.decryptWA = decryptWA;
/** generates all the keys required to encrypt/decrypt & sign a media message */
function getMediaKeys(buffer, mediaType) {
if (typeof buffer === 'string') {
buffer = Buffer.from(buffer.replace('data:;base64,', ''), 'base64');
}
// expand using HKDF to 112 bytes, also pass in the relevant app info
const expandedMediaKey = hkdf(buffer, 112, Constants_1.HKDFInfoKeys[mediaType]);
return {
iv: expandedMediaKey.slice(0, 16),
cipherKey: expandedMediaKey.slice(16, 48),
macKey: expandedMediaKey.slice(48, 80),
};
}
exports.getMediaKeys = getMediaKeys;
/** Extracts video thumb using FFMPEG */
const extractVideoThumb = async (path, destPath, time, size) => new Promise((resolve, reject) => {
const cmd = `ffmpeg -ss ${time} -i ${path} -y -s ${size.width}x${size.height} -vframes 1 -f image2 ${destPath}`;
child_process_1.exec(cmd, (err) => {
if (err)
reject(err);
else
resolve();
});
});
const compressImage = async (bufferOrFilePath) => {
const jimp = await jimp_1.default.read(bufferOrFilePath);
const result = await jimp.resize(48, 48).getBufferAsync(jimp_1.default.MIME_JPEG);
return result;
};
exports.compressImage = compressImage;
const generateProfilePicture = async (buffer) => {
const jimp = await jimp_1.default.read(buffer);
const min = Math.min(jimp.getWidth(), jimp.getHeight());
const cropped = jimp.crop(0, 0, min, min);
return {
img: await cropped.resize(640, 640).getBufferAsync(jimp_1.default.MIME_JPEG),
preview: await cropped.resize(96, 96).getBufferAsync(jimp_1.default.MIME_JPEG)
};
};
exports.generateProfilePicture = generateProfilePicture;
const ProxyAgent = (host) => https_proxy_agent_1.default(host);
exports.ProxyAgent = ProxyAgent;
/** gets the SHA256 of the given media message */
const mediaMessageSHA256B64 = (message) => {
const media = Object.values(message)[0];
return (media === null || media === void 0 ? void 0 : media.fileSha256) && Buffer.from(media.fileSha256).toString('base64');
};
exports.mediaMessageSHA256B64 = mediaMessageSHA256B64;
async function getAudioDuration(buffer) {
const musicMetadata = await Promise.resolve().then(() => __importStar(require('music-metadata')));
let metadata;
if (Buffer.isBuffer(buffer)) {
metadata = await musicMetadata.parseBuffer(buffer, null, { duration: true });
}
else {
const rStream = fs_1.createReadStream(buffer);
metadata = await musicMetadata.parseStream(rStream, null, { duration: true });
rStream.close();
}
return metadata.format.duration;
}
exports.getAudioDuration = getAudioDuration;
const toReadable = (buffer) => {
const readable = new stream_1.Readable({ read: () => { } });
readable.push(buffer);
readable.push(null);
return readable;
};
exports.toReadable = toReadable;
const getStream = async (item) => {
if (Buffer.isBuffer(item))
return { stream: exports.toReadable(item), type: 'buffer' };
if (item.url.toString().startsWith('http://') || item.url.toString().startsWith('https://')) {
return { stream: await exports.getGotStream(item.url), type: 'remote' };
}
return { stream: fs_1.createReadStream(item.url), type: 'file' };
};
exports.getStream = getStream;
/** generates a thumbnail for a given media, if required */
async function generateThumbnail(file, mediaType, info) {
if ('thumbnail' in info) {
// don't do anything if the thumbnail is already provided, or is null
if (mediaType === Constants_1.MessageType.audio) {
throw new Error('audio messages cannot have thumbnails');
}
}
else if (mediaType === Constants_1.MessageType.image) {
const buff = await exports.compressImage(file);
info.thumbnail = buff.toString('base64');
}
else if (mediaType === Constants_1.MessageType.video) {
const imgFilename = path_1.join(os_1.tmpdir(), generateMessageID() + '.jpg');
try {
await extractVideoThumb(file, imgFilename, '00:00:00', { width: 48, height: 48 });
const buff = await fs_1.promises.readFile(imgFilename);
info.thumbnail = buff.toString('base64');
await fs_1.promises.unlink(imgFilename);
}
catch (err) {
console.log('could not generate video thumb: ' + err);
}
}
}
exports.generateThumbnail = generateThumbnail;
const getGotStream = async (url, options = {}) => {
const fetched = got_1.default.stream(url, { ...options, isStream: true });
await new Promise((resolve, reject) => {
fetched.once('error', reject);
fetched.once('response', ({ statusCode: status }) => {
if (status >= 400) {
reject(new Constants_1.BaileysError('Invalid code (' + status + ') returned', { status }));
}
else {
resolve(undefined);
}
});
});
return fetched;
};
exports.getGotStream = getGotStream;
const encryptedStream = async (media, mediaType, saveOriginalFileIfRequired = true) => {
const { stream, type } = await exports.getStream(media);
const mediaKey = randomBytes(32);
const { cipherKey, iv, macKey } = getMediaKeys(mediaKey, mediaType);
// random name
const encBodyPath = path_1.join(os_1.tmpdir(), mediaType + generateMessageID() + '.enc');
const encWriteStream = fs_1.createWriteStream(encBodyPath);
let bodyPath;
let writeStream;
if (type === 'file') {
bodyPath = media.url;
}
else if (saveOriginalFileIfRequired) {
bodyPath = path_1.join(os_1.tmpdir(), mediaType + generateMessageID());
writeStream = fs_1.createWriteStream(bodyPath);
}
let fileLength = 0;
const aes = Crypto.createCipheriv('aes-256-cbc', cipherKey, iv);
let hmac = Crypto.createHmac('sha256', macKey).update(iv);
let sha256Plain = Crypto.createHash('sha256');
let sha256Enc = Crypto.createHash('sha256');
const onChunk = (buff) => {
sha256Enc = sha256Enc.update(buff);
hmac = hmac.update(buff);
encWriteStream.write(buff);
};
for await (const data of stream) {
fileLength += data.length;
sha256Plain = sha256Plain.update(data);
writeStream && writeStream.write(data);
onChunk(aes.update(data));
}
onChunk(aes.final());
const mac = hmac.digest().slice(0, 10);
sha256Enc = sha256Enc.update(mac);
const fileSha256 = sha256Plain.digest();
const fileEncSha256 = sha256Enc.digest();
encWriteStream.write(mac);
encWriteStream.close();
writeStream && writeStream.close();
return {
mediaKey,
encBodyPath,
bodyPath,
mac,
fileEncSha256,
fileSha256,
fileLength,
didSaveToTmpPath: type !== 'file'
};
};
exports.encryptedStream = encryptedStream;
/**
* Decode a media message (video, image, document, audio) & return decrypted buffer
* @param message the media message you want to decode
*/
async function decryptMediaMessageBuffer(message) {
var _a;
/*
One can infer media type from the key in the message
it is usually written as [mediaType]Message. Eg. imageMessage, audioMessage etc.
*/
const type = Object.keys(message)[0];
if (!type) {
throw new Constants_1.BaileysError('unknown message type', message);
}
if (type === Constants_1.MessageType.text || type === Constants_1.MessageType.extendedText) {
throw new Constants_1.BaileysError('cannot decode text message', message);
}
if (type === Constants_1.MessageType.location || type === Constants_1.MessageType.liveLocation) {
const buffer = Buffer.from(message[type].jpegThumbnail);
const readable = new stream_1.Readable({ read: () => { } });
readable.push(buffer);
readable.push(null);
return readable;
}
let messageContent;
if (message.productMessage) {
const product = (_a = message.productMessage.product) === null || _a === void 0 ? void 0 : _a.productImage;
if (!product)
throw new Constants_1.BaileysError('product has no image', message);
messageContent = product;
}
else {
messageContent = message[type];
}
// download the message
const fetched = await exports.getGotStream(messageContent.url, {
headers: { Origin: Constants_1.DEFAULT_ORIGIN }
});
let remainingBytes = Buffer.from([]);
const { cipherKey, iv } = getMediaKeys(messageContent.mediaKey, type);
const aes = Crypto.createDecipheriv("aes-256-cbc", cipherKey, iv);
const output = new stream_1.Transform({
transform(chunk, _, callback) {
let data = Buffer.concat([remainingBytes, chunk]);
const decryptLength = Math.floor(data.length / 16) * 16;
remainingBytes = data.slice(decryptLength);
data = data.slice(0, decryptLength);
try {
this.push(aes.update(data));
callback();
}
catch (error) {
callback(error);
}
},
final(callback) {
try {
this.push(aes.final());
callback();
}
catch (error) {
callback(error);
}
},
});
return fetched.pipe(output, { end: true });
}
exports.decryptMediaMessageBuffer = decryptMediaMessageBuffer;
function extensionForMediaMessage(message) {
const getExtension = (mimetype) => mimetype.split(';')[0].split('/')[1];
const type = Object.keys(message)[0];
let extension;
if (type === Constants_1.MessageType.location || type === Constants_1.MessageType.liveLocation || type === Constants_1.MessageType.product) {
extension = '.jpeg';
}
else {
const messageContent = message[type];
extension = getExtension(messageContent.mimetype);
}
return extension;
}
exports.extensionForMediaMessage = extensionForMediaMessage;
|
({"months-format-abbr":["جنو","فبروری","مارچ","اپریل","مـی","جون","جول","اگست","سپتمبر","اکتوبر","نومبر","دسم"],"months-format-wide":["جنوری","فبروری","مارچ","اپریل","می","جون","جولای","اگست","سپتمبر","اکتوبر","نومبر","دسمبر"],"months-format-narrow":["ج","ف","م","ا","م","ج","ج","ا","س","ا","ن","د"],"months-standAlone-wide":["جنوری","فبروری","مارچ","اپریل","می","جون","جولای","اگست","سپتمبر","اکتوبر","نومبر","دسمبر"],"months-standAlone-abbr":["جنو","فبروری","مارچ","اپریل","مـی","جون","جول","اگست","سپتمبر","اکتوبر","نومبر","دسم"],"months-standAlone-narrow":["ج","ف","م","ا","م","ج","ج","ا","س","ا","ن","د"],"quarters-standAlone-narrow":["۱","۲","۳","۴"],"field-weekday":"روز هفته","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"E yyyy/M/d","dateFormatItem-MMMEd":"E d LLL","eraNarrow":["ق","م"],"dateTimeFormats-appendItem-Day-Of-Week":"{1} {0}","dateFormat-long":"MMMM d, y","dateTimeFormat-medium":"{1}، {0}","dateFormatItem-EEEd":"EEE d","dayPeriods-format-wide-pm":"بعد از ظهر","dateFormat-full":"EEEE, MMMM d, y","dateFormatItem-Md":"M/d","field-era":"دوره","dateFormatItem-yM":"yyyy/M","timeFormat-short":"H:mm","quarters-format-wide":["سهماههٔ اول","سهماههٔ دوم","سهماههٔ سوم","سهماههٔ چهارم"],"timeFormat-long":"H:mm:ss (z)","field-year":"سال","dateFormatItem-yMMM":"MMM y","dateFormatItem-yQ":"yyyy Q","dateFormatItem-yyyyMMMM":"MMMM y","field-hour":"ساعت","timeFormat-full":"H:mm:ss (zzzz)","dateFormatItem-GGGGyyyyMMMMd":"d MMMM y GGGG","field-day-relative+0":"امروز","field-day-relative+1":"فردا","field-day-relative+2":"پسفردا","dateFormatItem-H":"H","field-day-relative+3":"سه روز بعد","quarters-format-abbr":["سم۱","سم۲","سم۳","سم۴"],"quarters-standAlone-wide":["سهماههٔ اول","سهماههٔ دوم","سهماههٔ سوم","سهماههٔ چهارم"],"dateFormatItem-M":"L","days-standAlone-wide":["یکشنبه","دوشنبه","سهشنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],"dateFormatItem-MMMMd":"d LLLL","timeFormat-medium":"H:mm:ss","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["سم۱","سم۲","سم۳","سم۴"],"eraAbbr":["ق.م.","ب. م."],"field-minute":"دقیقه","field-dayperiod":"قبل/بعد از ظهر","days-standAlone-abbr":["یکشنبه","دوشنبه","سهشنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["۱","۲","۳","۴"],"field-day-relative+-1":"دیروز","dateTimeFormat-long":"{1}، ساعت {0}","field-day-relative+-2":"پریروز","field-day-relative+-3":"سه روز پیش","dateFormatItem-MMMd":"d LLL","dateFormatItem-MEd":"E M/d","dateTimeFormat-full":"{1}، ساعت {0}","dateFormatItem-yMMMM":"MMMM y","field-day":"روز","days-format-wide":["یکشنبه","دوشنبه","سهشنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],"field-zone":"منطقهٔ زمانی","dateFormatItem-y":"y","days-format-abbr":["یکشنبه","دوشنبه","سهشنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],"eraNames":["قبل از میلاد","میلادی"],"days-format-narrow":["ی","د","س","چ","پ","ج","ش"],"field-month":"ماه","dateFormatItem-HHmmZ":"HH:mm (Z)","days-standAlone-narrow":["ی","د","س","چ","پ","ج","ش"],"dateFormatItem-MMM":"LLL","dayPeriods-format-wide-am":"قبل از ظهر","dateFormatItem-MMMMEd":"E d LLLL","dateFormat-short":"M/d/yy","dateFormatItem-yyyyMMMMEEEEd":"EEEE d MMMM y","field-second":"ثانیه","dateFormatItem-yMMMEd":"E d MMM y","field-week":"هفته","dateFormat-medium":"MMM d, y","dateFormatItem-yyyyM":"yyyy/M","dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1}، {0}","dateFormatItem-Hms":"H:mm:ss","dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","dateFormatItem-h":"h a","dayPeriods-format-narrow-am":"AM","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}","dayPeriods-format-narrow-pm":"PM","dateFormatItem-hms":"h:mm:ss a"})
|
import { html } from 'https://unpkg.com/lit-html?module';
const aboutus = () => {
return html`
<footer id="about-us">
Sharity is a meeting place for those interested in helping and those who
help every day.
<br />
<div id="developed">Developed by: MeredixStudio</div>
</footer>
`;
};
export default aboutus;
|
import pickle
import sys
import os
import urllib
import gzip
import cPickle
import time
import lasagne
import theano
import numpy as np
import theano.tensor as T
from lasagne import layers
from lasagne.updates import nesterov_momentum
from nolearn.lasagne import NeuralNet
from nolearn.lasagne import BatchIterator
from theano.sandbox.neighbours import neibs2images
from lasagne.nonlinearities import sigmoid, rectify, leaky_rectify, identity
from lasagne.nonlinearities import softmax
from lasagne import regularization
from scipy import misc
from PIL import Image
from lasagne import init
from math import floor
from shape import ReshapeLayer
from batch_norms import batch_norm, SoftThresPerc
from extensive_data_aug_100x100 import data_aug
from ch_inner_prod import ChInnerProd, ChInnerProdMerge
PS = 100;
BatchSize = 64;
filename_code = 21;
filename_model_ae = 'model_vals/deep_conv_autoencoder_spsparse_alt{}_model_{}.pkl'.format(filename_code, 6);
filename_mu = 'model_vals/deep_conv_autoencoder_spsparse_alt{}_mu.pkl'.format(filename_code);
filename_sigma = 'model_vals/deep_conv_autoencoder_spsparse_alt{}_sigma.pkl'.format(filename_code);
def load_data():
nbuf = 0;
X_train = np.zeros(shape=(500000, 3, 100, 100), dtype=np.float32);
lines = [line.rstrip('\n') for line in open('./data/vals/random_patches_for_all_svs/label.txt')];
for line in lines[::1000]:
full_path = './data/vals/random_patches_for_all_svs/image_' + line.split()[0];
png = np.array(Image.open(full_path).convert('RGB')).transpose() / 255.0;
X_train[nbuf, :, :, :] = png;
nbuf += 1;
X_train = X_train[0:nbuf];
print "Loading mean and std";
mu = pickle.load(open(filename_mu, 'rb'));
sigma = pickle.load(open(filename_sigma, 'rb'));
X_train = (X_train - mu) / sigma;
print "Data Loaded", X_train.shape[0];
return X_train, mu, sigma;
def iterate_minibatches_ae(inputs, batchsize, shuffle=False):
if shuffle:
indices = np.arange(len(inputs));
np.random.shuffle(indices);
for start_idx in range(0, len(inputs) - batchsize + 1, batchsize):
if shuffle:
excerpt = indices[start_idx:start_idx + batchsize];
else:
excerpt = slice(start_idx, start_idx + batchsize);
yield inputs[excerpt];
def build_autoencoder_network():
input_var = T.tensor4('input_var');
layer = layers.InputLayer(shape=(None, 3, PS, PS), input_var=input_var);
layer = batch_norm(layers.Conv2DLayer(layer, 100, filter_size=(5,5), stride=1, pad='same', nonlinearity=leaky_rectify));
layer = batch_norm(layers.Conv2DLayer(layer, 120, filter_size=(5,5), stride=1, pad='same', nonlinearity=leaky_rectify));
layer = layers.Pool2DLayer(layer, pool_size=(2,2), stride=2, mode='average_inc_pad');
layer = batch_norm(layers.Conv2DLayer(layer, 240, filter_size=(3,3), stride=1, pad='same', nonlinearity=leaky_rectify));
layer = batch_norm(layers.Conv2DLayer(layer, 320, filter_size=(3,3), stride=1, pad='same', nonlinearity=leaky_rectify));
layer = layers.Pool2DLayer(layer, pool_size=(2,2), stride=2, mode='average_inc_pad');
layer = batch_norm(layers.Conv2DLayer(layer, 640, filter_size=(3,3), stride=1, pad='same', nonlinearity=leaky_rectify));
prely = batch_norm(layers.Conv2DLayer(layer, 1024, filter_size=(3,3), stride=1, pad='same', nonlinearity=leaky_rectify));
featm = batch_norm(layers.Conv2DLayer(prely, 640, filter_size=(1,1), nonlinearity=leaky_rectify));
feat_map = batch_norm(layers.Conv2DLayer(featm, 100, filter_size=(1,1), nonlinearity=rectify, name="feat_map"));
maskm = batch_norm(layers.Conv2DLayer(prely, 100, filter_size=(1,1), nonlinearity=leaky_rectify));
mask_rep = batch_norm(layers.Conv2DLayer(maskm, 1, filter_size=(1,1), nonlinearity=None), beta=None, gamma=None);
mask_map = SoftThresPerc(mask_rep, perc=98.4, alpha=0.1, beta=init.Constant(0.5), tight=100.0, name="mask_map");
layer = ChInnerProdMerge(feat_map, mask_map, name="encoder");
layer = batch_norm(layers.Deconv2DLayer(layer, 1024, filter_size=(3,3), stride=1, crop='same', nonlinearity=leaky_rectify));
layer = batch_norm(layers.Deconv2DLayer(layer, 640, filter_size=(3,3), stride=1, crop='same', nonlinearity=leaky_rectify));
layer = batch_norm(layers.Deconv2DLayer(layer, 640, filter_size=(4,4), stride=2, crop=(1,1), nonlinearity=leaky_rectify));
layer = batch_norm(layers.Deconv2DLayer(layer, 320, filter_size=(3,3), stride=1, crop='same', nonlinearity=leaky_rectify));
layer = batch_norm(layers.Deconv2DLayer(layer, 320, filter_size=(3,3), stride=1, crop='same', nonlinearity=leaky_rectify));
layer = batch_norm(layers.Deconv2DLayer(layer, 240, filter_size=(4,4), stride=2, crop=(1,1), nonlinearity=leaky_rectify));
layer = batch_norm(layers.Deconv2DLayer(layer, 120, filter_size=(5,5), stride=1, crop='same', nonlinearity=leaky_rectify));
layer = batch_norm(layers.Deconv2DLayer(layer, 100, filter_size=(5,5), stride=1, crop='same', nonlinearity=leaky_rectify));
nulay = layers.Deconv2DLayer(layer, 3, filter_size=(1,1), stride=1, crop='same', nonlinearity=identity);
glblf = batch_norm(layers.Conv2DLayer(prely, 128, filter_size=(1,1), nonlinearity=leaky_rectify));
glblf = layers.Pool2DLayer(glblf, pool_size=(5,5), stride=5, mode='average_inc_pad');
glblf = batch_norm(layers.Conv2DLayer(glblf, 64, filter_size=(3,3), stride=1, pad='same', nonlinearity=leaky_rectify));
glblf = batch_norm(layers.Conv2DLayer(glblf, 5, filter_size=(1,1), nonlinearity=rectify), name="global_feature");
glblf = batch_norm(layers.Deconv2DLayer(glblf, 256, filter_size=(3,3), stride=1, crop='same', nonlinearity=leaky_rectify));
glblf = batch_norm(layers.Deconv2DLayer(glblf, 128, filter_size=(3,3), stride=1, crop='same', nonlinearity=leaky_rectify));
glblf = batch_norm(layers.Deconv2DLayer(glblf, 128, filter_size=(9,9), stride=5, crop=(2,2), nonlinearity=leaky_rectify));
glblf = batch_norm(layers.Deconv2DLayer(glblf, 128, filter_size=(3,3), stride=1, crop='same', nonlinearity=leaky_rectify));
glblf = batch_norm(layers.Deconv2DLayer(glblf, 128, filter_size=(3,3), stride=1, crop='same', nonlinearity=leaky_rectify));
glblf = batch_norm(layers.Deconv2DLayer(glblf, 64, filter_size=(4,4), stride=2, crop=(1,1), nonlinearity=leaky_rectify));
glblf = batch_norm(layers.Deconv2DLayer(glblf, 64, filter_size=(3,3), stride=1, crop='same', nonlinearity=leaky_rectify));
glblf = batch_norm(layers.Deconv2DLayer(glblf, 64, filter_size=(3,3), stride=1, crop='same', nonlinearity=leaky_rectify));
glblf = batch_norm(layers.Deconv2DLayer(glblf, 32, filter_size=(4,4), stride=2, crop=(1,1), nonlinearity=leaky_rectify));
glblf = batch_norm(layers.Deconv2DLayer(glblf, 32, filter_size=(3,3), stride=1, crop='same', nonlinearity=leaky_rectify));
glblf = batch_norm(layers.Deconv2DLayer(glblf, 32, filter_size=(3,3), stride=1, crop='same', nonlinearity=leaky_rectify));
glblf = layers.Deconv2DLayer(glblf, 3, filter_size=(1,1), stride=1, crop='same', nonlinearity=identity);
layer = layers.ElemwiseSumLayer([nulay, glblf]);
network = ReshapeLayer(layer, ([0], -1));
layers.set_all_param_values(network, pickle.load(open(filename_model_ae, 'rb')));
feat_var = lasagne.layers.get_output(feat_map, deterministic=True);
mask_var = lasagne.layers.get_output(mask_map, deterministic=True);
nucl_var = lasagne.layers.get_output(nulay, deterministic=True);
glob_var = lasagne.layers.get_output(glblf, deterministic=True);
outp_var = lasagne.layers.get_output(network, deterministic=True);
return network, input_var, feat_var, mask_var, nucl_var, glob_var, outp_var;
def build_testing_function(network, input_var, feat_var, mask_var, nucl_var, glob_var, outp_var):
print("building testing function");
encode_decode_func = theano.function([input_var], [feat_var, mask_var, nucl_var, glob_var, outp_var]);
print("finish building testing function");
return encode_decode_func;
def save_visual(all_imag, all_feat, all_mask, all_nucl, all_glob, all_outp, mu, sigma):
for xi in range(all_imag.shape[0]):
imag = ((all_imag[xi].transpose() * sigma + mu) * 255.0).astype(np.uint8);
outp = np.clip(((all_outp[xi].transpose() * sigma + mu) * 255.0), 0.1, 254.9).astype(np.uint8);
mask = (all_mask[xi].transpose() * 255.0).astype(np.uint8);
nucl = np.clip(((all_nucl[xi].transpose() * sigma + mu) * 255.0), 0.1, 254.9).astype(np.uint8);
glob = np.clip(((all_glob[xi].transpose() * sigma + mu) * 255.0), 0.1, 254.9).astype(np.uint8);
misc.imsave("./visual_autoencoder/imag_{}.png".format(xi), np.squeeze(imag));
misc.imsave("./visual_autoencoder/outp_{}.png".format(xi), np.squeeze(outp));
misc.imsave("./visual_autoencoder/mask_{}.png".format(xi), np.squeeze(mask));
misc.imsave("./visual_autoencoder/nucl_{}.png".format(xi), np.squeeze(nucl));
misc.imsave("./visual_autoencoder/glob_{}.png".format(xi), np.squeeze(glob));
def exc_test(encode_decode_func, X_train):
all_imag = np.zeros(shape=(10000, 3, PS, PS), dtype=np.float32);
all_feat = np.zeros(shape=(10000, 100, PS/4, PS/4), dtype=np.float32);
all_mask = np.zeros(shape=(10000, 1, PS/4, PS/4), dtype=np.float32);
all_nucl = np.zeros(shape=(10000, 3, PS, PS), dtype=np.float32);
all_glob = np.zeros(shape=(10000, 3, PS, PS), dtype=np.float32);
all_outp = np.zeros(shape=(10000, 3, PS, PS), dtype=np.float32);
buf_n = 0;
print("Starting testing...");
# Iterate through mini batches
for batch in iterate_minibatches_ae(X_train, BatchSize, shuffle=True):
batch = data_aug(batch, deterministic=True);
feat, mask, nucl, glob, outp = encode_decode_func(batch);
all_imag[buf_n:buf_n+BatchSize, :, :, :] = batch;
all_feat[buf_n:buf_n+BatchSize, :, :, :] = feat;
all_mask[buf_n:buf_n+BatchSize, :, :, :] = mask;
all_nucl[buf_n:buf_n+BatchSize, :, :, :] = nucl;
all_glob[buf_n:buf_n+BatchSize, :, :, :] = glob;
all_outp[buf_n:buf_n+BatchSize, :, :, :] = outp.reshape((BatchSize, 3, PS, PS));
buf_n += BatchSize;
all_imag = all_imag[0:buf_n];
all_feat = all_feat[0:buf_n];
all_mask = all_mask[0:buf_n];
all_nucl = all_nucl[0:buf_n];
all_glob = all_glob[0:buf_n];
all_outp = all_outp[0:buf_n];
return all_imag, all_feat, all_mask, all_nucl, all_glob, all_outp;
def main():
X_train, mu, sigma = load_data();
# Build network
network, input_var, feat_var, mask_var, nucl_var, glob_var, outp_var = build_autoencoder_network();
encode_decode_func = build_testing_function(network, input_var, feat_var, mask_var, nucl_var, glob_var, outp_var);
all_imag, all_feat, all_mask, all_nucl, all_glob, all_outp = exc_test(encode_decode_func, X_train);
save_visual(all_imag, all_feat, all_mask, all_nucl, all_glob, all_outp, mu, sigma);
print("DONE !");
if __name__ == "__main__":
main();
|
/* eslint-disable import/no-extraneous-dependencies */
const { pathsToModuleNameMapper } = require("ts-jest/utils");
// Load the config which holds the path aliases.
const { compilerOptions } = require("../../tsconfig.json");
const path = require('path');
module.exports = {
preset: "ts-jest",
moduleNameMapper: {
// '^@aardvarkxr/aardvark-shared$': path.resolve(__dirname, '../packages/aardvark-shared/src/index.ts'),
// '^@aardvarkxr/aardvark-react$': path.resolve(__dirname, '../packages/aardvark-react/src/index.ts'),
'^@aardvarkxr/room-shared$': path.resolve(__dirname, '../room-shared/src/shared_index.ts'),
},
};
|
import $ from 'jquery';
$(() => {
let sessionL = 25;
let breakL = 5;
let hasStart = false;
let isSession = true;
let isPaused = false;
let currentTimer;
let animation;
const fill = document.getElementById('fill');
const keyFrames = [{ height: '0' }, { height: '100%' }];
const timingOptions = {
easing: 'cubic-bezier(.2,.6,.8,.4)',
duration: 25 * 1000,
delay: 1000
};
// timer operation
function timer(durationS, durationB) {
let min = durationS;
let sec = 0;
function set() {
if (!isPaused) {
if (min === 0 && sec === 0) {
clearInterval(currentTimer);
isSession = !isSession;
if (isSession) {
$('.mode').text('Session');
min = durationS;
fill.style.background = '#99FF33';
timingOptions.duration = min * 60 * 1000;
animation = fill.animate(keyFrames, timingOptions);
currentTimer = setInterval(() => {
set();
}, 1000);
} else {
min = durationB;
fill.style.background = '#FF3333';
timingOptions.duration = min * 60 * 1000;
animation = fill.animate(keyFrames, timingOptions);
currentTimer = setInterval(() => {
set();
}, 1000);
$('.mode').text('Break!');
}
} else if (sec === 0) {
sec = 59;
min -= 1;
} else {
sec -= 1;
}
$('.timer').text(`${`0${min}`.slice(-2)}:${`0${sec}`.slice(-2)}`);
}
}
timingOptions.duration = min * 60 * 1000;
animation = fill.animate(keyFrames, timingOptions);
currentTimer = setInterval(() => {
set();
}, 1000);
}
// Configure timer
$('.break .fa-minus').on('click', () => {
if (!hasStart && breakL > 1) {
breakL -= 1;
$('#breakL').text(breakL);
}
});
$('.break .fa-plus').on('click', () => {
if (!hasStart) {
breakL += 1;
$('#breakL').text(breakL);
}
});
$('.session .fa-minus').on('click', () => {
if (!hasStart && sessionL > 1) {
sessionL -= 1;
$('#sessionL').text(sessionL);
$('.timer').text(sessionL);
}
});
$('.session .fa-plus').on('click', () => {
if (!hasStart) {
sessionL += 1;
$('#sessionL').text(sessionL);
$('.timer').text(sessionL);
}
});
// Pause Button
$('#P').on('click', function pause() {
if (hasStart) {
if (!isPaused) {
$(this).text('RESUME');
$('#R').fadeIn('slow');
animation.pause();
} else {
$(this).text('PAUSE');
$('#R').fadeOut('slow');
animation.play();
}
isPaused = !isPaused;
}
});
// Start button
$('#S').on('click', function start() {
if (!hasStart) {
hasStart = true;
$(this).fadeOut('slow', () => {
$('.fa-minus, .fa-plus').fadeOut('slow');
$('#P').fadeIn('slow');
});
timer(sessionL, breakL);
}
});
// Reset button
$('#R').on('click', () => {
if (isPaused) {
clearInterval(currentTimer);
animation.cancel();
hasStart = false;
isPaused = false;
isSession = true;
$('.mode').text('Session');
$('.timer').text(sessionL);
fill.style.background = '#99FF33';
$('#P').text('PAUSE');
$('#P, #R').fadeOut('slow', () => {
$('.fa-minus, .fa-plus').fadeIn('slow');
$('#S').fadeIn('slow');
});
}
});
});
|
var json = require('json-file');
var file = json.read('./pageObjects/footerLink.page.json');
class footerLink {
get PrivacyPolicylink() { return $(file.get('footerLink.selector.PrivacyPolicylink')); }
get PrivacyPolicyHeadertag() { return $(file.get('footerLink.selector.PrivacyPolicyHeadertag')); }
get TermsOfUseHeadertag() { return $(file.get('footerLink.selector.TermsOfUseHeadertag')); }
get FacebookFooterLink() { return $(file.get('footerLink.selector.facebookFooterLink')); }
get FacebookVisibleText() { return $(file.get('footerLink.selector.facebookVisibleText')); }
get TwitterVisibleText() { return $(file.get('footerLink.selector.twitterVisibleText')); }
get YoutubeVisibleText() { return $(file.get('footerLink.selector.youtubeVisibleText')); }
get PuddleDuckVisibleText() { return $(file.get('footerLink.selector.puddleDuckVisibleText')); }
//Footer Media Link
}
module.exports = new footerLink();
|
/*
* Copyright (c) 2022 Anton Bagdatyev (Tonix)
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* Utility functions related to the coordinates of a map.
*/
/**
* Clamps a latitude value so that it is always between -90 and 90.
*
* Latitude ranges between -90 and 90 degrees, inclusive.
* Values above or below this range will be clamped to the range [-90, 90].
* This means that if the value specified is less than -90, it will be set to -90.
* And if the value is greater than 90, it will be set to 90.
*
* @param {number|string} lat Latitude. Either a number or a string which can be casted to a number.
* @return {number} Latitude, clamped.
*/
export const clampLat = lat => Number(lat < -90 ? -90 : lat > 90 ? 90 : lat);
/**
* Wraps a longitude value so that it is always between -180 and 180.
*
* Longitude ranges between -180 and 180 degrees, inclusive.
* Values above or below this range will be wrapped so that they fall within the range.
* For example, a value of -190 will be converted to 170.
* A value of 190 will be converted to -170.
* This reflects the fact that longitudes wrap around the globe.
*
* @param {number|string} lng Longitude. Either a number or a string which can be casted to a number.
* @return {number} lng Longitude, wrapped.
*/
export const wrapLng = lng => {
lng = Number(lng);
while (lng > 180) {
lng -= 360;
}
while (lng < -180) {
lng += 360;
}
return lng;
};
/**
* Normalizes a latitude so that it is within the range [0, 180].
*
* 1. normalizeLat(90) === 0;
* 2. normalizeLat(0) === 90;
* 3. normalizeLat(-90) === 180;
*
* @param {number|string} lat Latitude. Either a number or a string which can be casted to a number.
* @return {number} Latitude, normalized.
*/
export const normalizeLat = lat => {
lat = clampLat(lat);
if (lat >= 0) {
// 1. + 2.
return 90 - lat;
} else {
// 3.
return 90 + Math.abs(lat);
}
};
/**
* Normalizes a longitude so that it is within the range [0, 360].
*
* 1. normalizeLng(-180) === 0;
* 2. normalizeLng(0) === 180;
* 3. normalizeLng(180) === 360;
*
* @param {number} lng Longitude. Either a number or a string which can be casted to a number.
* @return {number} Longitude, normalized.
*/
export const normalizeLng = lng => {
lng = wrapLng(lng);
return lng + 180;
};
|
import { useWeb3React } from '@web3-react/core'
import { useContext, useState, useCallback, useEffect } from 'react'
import debounce from 'lodash.debounce'
import PureContext from '../components/context/Pure'
import Layout from '../components/Layout'
import Input from '../components/Input'
import Button from '../components/Button'
import { fromUnit, toFixed, watchAsset } from '../utils'
import useTranslation from 'next-translate/useTranslation'
function MerkleClaims() {
const { t } = useTranslation('common')
const { active, account, chainId } = useWeb3React()
const [claimID, setClaimID] = useState('')
const [claimInProgress, setClaimInProgress] = useState(false)
const [holding, setHolding] = useState({ amount: '', isClaimable: false })
const [feedback, setFeedback] = useState({ color: 'text-black', message: '' })
const { merkle } = useContext(PureContext)
const clearFeedback = () => setFeedback({ color: 'text-black', message: '' })
const setErrorMessage = (message) =>
setFeedback({ color: 'text-red-600', message })
const setInfoMessage = (message) =>
setFeedback({ color: 'text-black', message })
const setSuccessMessage = (message) =>
setFeedback({ color: 'text-green-600', message })
const getHolding = (claimID) =>
claimID &&
merkle
.getHolding(claimID)
.then((h) => {
if (h.isClaimable) {
clearFeedback()
} else {
setErrorMessage(t('already-claimed'))
}
setHolding(h)
})
.catch((e) => setErrorMessage(e.message))
const delayedClaimID = useCallback(
debounce((cID) => getHolding(cID), 500),
[merkle]
)
const handleClaimIDChange = function (e) {
const re = /^[0-9\b]+$/
if (e.target.value === '' || re.test(e.target.value)) {
clearFeedback()
setClaimID(e.target.value)
delayedClaimID(e.target.value)
}
}
const handleClaimSubmit = () => {
setClaimInProgress(true)
setInfoMessage(t('claim-in-progress'))
return merkle
.claim(claimID, holding.amount, holding.proof)
.then(function () {
setSuccessMessage(t('claim-succeeded'))
setClaimID('')
})
.catch((e) => setErrorMessage(e.message))
.finally(() => setClaimInProgress(false))
.then(() => watchAsset({ account, chainId, token: holding.token }))
}
useEffect(() => {
clearFeedback()
setClaimID('')
}, [active, account])
useEffect(() => setHolding({ amount: '', isClaimable: false }), [claimID])
return (
<Layout title={t('merkle-claims')} walletConnection>
<div className="flex flex-wrap justify-center w-full max-w-lg mx-auto mt-10 space-y-3">
<Input
disabled={!active || claimInProgress}
onChange={handleClaimIDChange}
title={`${t('claim-id')}:`}
value={claimID}
/>
<Input
disabled
suffix={holding && holding.token && holding.token.symbol}
title={`${t('balance')}:`}
value={
holding.amount &&
toFixed(fromUnit(holding.amount, holding.token.decimals), 6)
}
/>
</div>
<div className="flex justify-center mt-7.5">
<Button
className="flex justify-center mt-7.5"
disabled={!active || !holding.isClaimable || claimInProgress}
onClick={handleClaimSubmit}
>
{t('claim').toUpperCase()}
</Button>
</div>
<p className={`text-center text-sm mt-6 ${feedback.color}`}>
{feedback.message}
</p>
</Layout>
)
}
export default MerkleClaims
|
$(document).bind("mobileinit", function () {
$.mobile.ajaxEnabled = false;
});
$(document).ready(function(){
if (md5('hello') != '5d41402abc4b2a76b9719d911017c592') {
alert('There is a problem, please contact us at contact@eslam.me');
}
//Open all external links in the browser
$('a[href^=http]').click(function(e){
e.preventDefault();
var activity = new MozActivity({
name: "view",
data: {
type: "url",
url: $(this).attr("href")
}
});
});
//Get the image of the email from gravatar
$('#email').on('input', function() {
$('#contact img').attr('src', "http://www.gravatar.com/avatar/"+md5($(this).val())+"?s=200&d=monsterid");
});
//Button clicked
$('#save, #save_no_img').on('click', function(event){
//Stop form submittion
event.preventDefault();
var name = $('#name').val();
var phone = $('#phone').val();
var email = $('#email').val();
var imgURL = $('#contact img').attr('src');
if (!name || !phone) {
alert('Name & Phone are required');
return;
}
var data = {
name: name,
phone: phone,
email: email,
imgURL: imgURL
};
//Remove the image if could not download it
if ($(this).attr('id') == 'save_no_img') {
data.imgURL = null;
}
//Save the data
saveContact(data);
});
});
function saveContact(data, blob){
var person = new mozContact();
person.name = [data.name];
person.givenName = [data.name];
person.tel = [];
person.tel[0] = {type:['mobile'], value:data.phone};
person.email = [];
person.email[0] = {type:['work'], value:data.email};
//If there image try to download it then save the contact
if (data.imgURL) {
var oReq = new XMLHttpRequest();
oReq.onload = function (e) {
var arrayBufferView = new Uint8Array(this.response);
person.photo = [];
person.photo[0] = new Blob([arrayBufferView], {type: 'image/png'});
//Save the contact to contacts list
savePerson(person);
};
//IF there was error loading the image display the other button for download
oReq.onerror = function (e) {
alert('Error could not get your contact image');
$('#save_no_img').attr('style','display:table');
}
oReq.open("GET", data.imgURL, true);
oReq.responseType = "arraybuffer";
oReq.send();
} else {
savePerson(person)
}
}
//Save the contact into contact list
function savePerson(person) {
// save the new contact
var saving = navigator.mozContacts.save(person);
//Alert the user if the contact saved
saving.onsuccess = function() {
alert('New contact saved');
init();
};
//Get if there was error and display the message
saving.onerror = function(err) {
if (err.target.error.name == 'PERMISSION_DENIED') {
alert('Error: We need your permission to add new contact, please allow the app to add contacts');
} else if (err.target.error.message) {
alert('Error: ' + err.target.error.message);
} else {
alert('Error, Please contact us at contact@eslam.me');
}
};
}
//Reset the app after saving
function init() {
$('#contact input').val(null);
$('#save_no_img').hide();
$('#contact img').attr('src', '/img/face.jpg');
}
|
// browser support list see here: https://github.com/ai/browserslist#queries
module.exports = {
plugins: [
require('postcss-import')(),
require('autoprefixer')({
browsers: [
'> 1%',
'last 2 versions',
'Chrome >= 15',
'Explorer >= 9',
'Firefox >= 12',
'Safari >= 5.1',
'Opera >= 12',
'Android >= 4.1',
'iOS >= 8'
],
cascade: true, // 是否美化属性值 默认:true 像这样:
remove: true // 是否去掉不必要的前缀 默认:true
}), // CSS浏览器兼容
require('cssnano')() // 压缩css
]
};
|
var path = require('path');
module.exports = {
entry: {
app: ['@babel/polyfill', './src/main/frontend/index.js']
},
devtool: 'sourcemaps',
cache: true,
mode: 'development',
output: {
path: __dirname,
filename: './src/main/resources/static/built/bundle.js'
},
module: {
rules: [
{
test: path.join(__dirname, '.'),
exclude: /(node_modules)/,
use: [{
loader: 'babel-loader',
options: {
presets: ["@babel/preset-env", "@babel/preset-react"]
}
}]
},
{
test: /\.css$/,
use: [
'style-loader',
'css-loader'
]
}
]
},
};
|
'use strict';
const { EOL } = require('os');
const path = require('path');
const Manifest = require('../../lib/manifest');
const Browserconfig = require('../../lib/browserconfig');
module.exports = {
description: 'Generates a configuration for web app manifest.',
normalizeEntityName() {},
locals(options) {
return {
name: options.project.name(),
};
},
afterInstall() {
let index = path.join('app', 'index.html');
let content = `${EOL} ${Manifest.tag}${EOL} ${Browserconfig.tag}`;
let after = `{{content-for "head"}}${EOL}`;
return this.insertIntoFile(index, content, { after });
},
};
|
import { computed, reactive, ref, toRefs, watch } from '@vue/composition-api';
import { CustomLink } from '~/base/index.js';
import { useRipplePlugin } from '~/ripple/ripple-plugin.js';
export default {
name: 'mcw-fab',
inheritAttrs: false,
props: {
icon: String,
mini: Boolean,
exited: Boolean,
label: String,
},
components: { CustomLink },
setup(props, { slots, listeners }) {
const root = ref(null);
const uiState = reactive({
classes: {
'mdc-fab': 1,
'mdc-fab--mini': props.mini,
'mdc-fab--extended': props.label || slots.default,
'mdc-fab--exited': props.exited,
},
});
const { classes: rippleClasses, styles } = useRipplePlugin(root);
const classes = computed(() => {
return { ...rippleClasses.value, ...uiState.classes };
});
watch(
() => props.icon,
nv => {
uiState.classes = { ...uiState.classes, 'material-icons': nv };
},
);
watch(
() => props.mini,
nv => {
uiState.classes = { ...uiState.classes, 'mdc-fab--mini': nv };
},
);
watch(
() => props.exited,
nv => {
uiState.classes = { ...uiState.classes, 'mdc-fab--exited': nv };
},
);
return { ...toRefs(uiState), classes, root, styles, listeners };
},
};
|
'use strict';
if ( ! window.baseURL) {
window.baseURL = "https://www.sciencebase.gov";
}
//angular does not check for null
function isDefined(obj) {
return angular.isDefined(obj) && obj !== null;
}
var GLRICatalogApp = angular.module('GLRICatalogApp', ['ui.bootstrap','ngSanitize', 'ui.select']);
GLRICatalogApp.value('Status', {
//State of loading from ScienceBase. Possible values: 'loading or 'done'
projectsLoadStatus : 'loading',
//State of loading from ScienceBase. Possible values: 'loading' or 'done'
publicationsLoadStatus : 'loading',
// the currently selected project
currentItem : undefined,
// not sure if this is used any longer, it was used to prevent cyclical nav settings
isCaptureHistory : true,
currentFocusArea: undefined,
//A filtered (or all) list of projects to be displayed on the browse tab
currentProjectList : [],
// all the publication for a all projects
allPublications : [],
CONST : {
FOCUS_AREA_SCHEME : baseURL+"/vocab/category/Great%20Lakes%20Restoration%20Initiative/GLRIFocusArea",
TEMPLATE_SCHEME : baseURL+"/vocab/category/Great%20Lakes%20Restoration%20Initiative/GLRITemplates",
BASE_QUERY_URL : "ScienceBaseService?",
},
});
/**
* A small service to find and cache the current username.
* The entire app is reloaded if the user logs in, so its OK to cache the value
* after we search for it.
*/
GLRICatalogApp.service('userService', function(){
var _checked = false;
var _userName = null;
this._findUserName = function() {
var un = $('#user-name');
if (un) {
this._userName = un.text();
}
return this._userName;
};
this.getUserName = function() {
if (_userName != null || _checked) {
return this._userName;
} else {
return this._findUserName();
}
};
});
|
// Copyright OHMEC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
function featureStyle(feature) {
// default styles
let strokeOn = true; // hides feature boundaries if false
let strokeOpacity = 1.0;
let strokeColor = 'white';
let strokeWeight = 2.0;
let strokeDash = '3';
let fillOn = true;
let fillColor = '#c0c0c0';
let fidelity = feature.properties.fidelity;
let fillOpacity = 0.2 + fidelity/10;
// returning all style contents even if default, just to have as reference
// (see https://leafletjs.com/reference-1.7.1.html#path-option)
if("style" in feature) {
return {
stroke: feature.style.strokeOn,
opacity: feature.style.strokeOpacity,
color: feature.style.strokeColor,
weight: feature.style.strokeWeight,
dashArray: feature.style.strokeDash,
fill: feature.style.fillOn,
fillOpacity: feature.style.fillOpacity,
fillColor: feature.style.fillColor
};
} else {
return {
stroke: strokeOn,
opacity: strokeOpacity,
color: strokeColor,
weight: strokeWeight,
dashArray: strokeDash,
fill: fillOn,
fillOpacity: fillOpacity,
fillColor: fillColor
};
}
}
function getFeatureLabel(feature) {
if("entity2name" in feature.properties) {
return feature.properties.entity2name;
} else if(feature.properties.entity1type === 'geography' && feature.properties.entity1name === 'icecap') {
return ' '
} else {
return feature.properties.entity1name;
}
}
function getFeatureFont(feature) {
// default styles
let fontchoice = 9;
let fontname = 'sans serif';
let fontscale = 80;
let fontcolor = "black";
if("style" in feature) {
// scale the font based upon the family, since some are wider than others
switch(feature.style.fontname) {
case 'Rubik': fontscale = 81; break;
case 'Cabin Sketch': fontscale = 87; break;
case 'Corben': fontscale = 77; break;
case 'New Tegomin': fontscale = 84; break;
case 'Special Elite': fontscale = 81; break;
case 'Fredericka the Great': fontscale = 81; break;
case 'Rye': fontscale = 73; break;
case 'Akaya Telivigala': fontscale = 94; break;
case 'MedievalSharp': fontscale = 85; break;
case 'Benne': fontscale = 91; break;
}
return {
name: feature.style.fontname,
scale: fontscale,
color: feature.style.fontcolor
};
} else {
return {
name: fontname,
scale: fontscale,
color: fontcolor
};
}
}
|
var loadDatafileSteps = function(){
this.Given(/^the command as (.*)$/, function (command, callback) {
// Write code here that turns the phrase above into concrete actions
callback();
});
this.When(/^I add the parameters as (.*)$/, function (parameters, callback) {
// Write code here that turns the phrase above into concrete actions
var config = require(parameters);
var run = require('./../../../lib/run.js');
run.main(config);
callback();
});
this.Then(/^I got the output as (.*)$/, function (result, callback) {
// Write code here that turns the phrase above into concrete actions
callback.pending();
});
}
module.exports = loadDatafileSteps;
|
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
from parlai.core.build_data import DownloadableFile
import parlai.core.build_data as build_data
RESOURCES = [
DownloadableFile(
'http://parl.ai/downloads/dstc7/dstc7_v2.tgz',
'dstc7_v2.tgz',
'cc8fd830f9894768ab4f7b104cddd4105456812ab614041337ec12c5a3a56685',
)
]
def build(opt):
dpath = os.path.join(opt['datapath'], 'dstc7')
version = '2.0'
if not build_data.built(dpath, version_string=version):
print('[building data: ' + dpath + ']')
if build_data.built(dpath):
# An older version exists, so remove these outdated files.
build_data.remove_dir(dpath)
build_data.make_dir(dpath)
# Download the data.
for downloadable_file in RESOURCES:
downloadable_file.download_file(dpath)
# Mark the data as built.
build_data.mark_done(dpath, version_string=version)
|
var MailGrabberMessageInlineAttachments = {
/**
* Render inline images of the message. Change the cid:something12345 with
* the encoded image content.
*
* @param {Object} messageParts - the parts of the message
* @param {Object} messageHtmlPart - the HTML part of the message
*
* @return {Object} messageHtmlPart - the modified HTML part of the message
*/
render: function(messageParts, messageHtmlPart) {
messageParts.forEach(function(messagePart) {
if(messagePart.is_attachment === 1 && messagePart.is_inline === 1) {
messageHtmlPart = messageHtmlPart.replace('cid:' + messagePart.cid,
'data:' + messagePart.mime_type + ';base64,' + messagePart.body);
}
});
return messageHtmlPart;
}
};
|
'use strict'
require('./check-versions')()
const config = require('../config')
if (!process.env.NODE_ENV) {
process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV)
}
const opn = require('opn')
const path = require('path')
const express = require('express')
const webpack = require('webpack')
const proxyMiddleware = require('http-proxy-middleware')
const webpackConfig = require('./webpack.dev.conf')
// default port where dev server listens for incoming traffic
const port = process.env.PORT || config.dev.port
// automatically open browser, if not set will be false
const autoOpenBrowser = !!config.dev.autoOpenBrowser
// Define HTTP proxies to your custom API backend
// https://github.com/chimurai/http-proxy-middleware
const proxyTable = config.dev.proxyTable
const app = express()
const compiler = webpack(webpackConfig)
const devMiddleware = require('webpack-dev-middleware')(compiler, {
publicPath: webpackConfig.output.publicPath,
quiet: true
})
const hotMiddleware = require('webpack-hot-middleware')(compiler, {
log: false
})
// force page reload when html-webpack-plugin template changes
compiler.plugin('compilation', function (compilation) {
compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
hotMiddleware.publish({ action: 'reload' })
cb()
})
})
// enable hot-reload and state-preserving
// compilation error display
app.use(hotMiddleware)
// proxy api requests
Object.keys(proxyTable).forEach(function (context) {
let options = proxyTable[context]
if (typeof options === 'string') {
options = { target: options }
}
app.use(proxyMiddleware(options.filter || context, options))
})
// handle fallback for HTML5 history API
app.use(require('connect-history-api-fallback')())
// serve webpack bundle output
app.use(devMiddleware)
// serve pure static assets
const staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory)
app.use(staticPath, express.static('./static'))
const uri = 'http://localhost:' + port
let _resolve
const readyPromise = new Promise(resolve => {
_resolve = resolve
})
console.log('> Starting dev server...')
devMiddleware.waitUntilValid(() => {
console.log('> Listening at ' + uri + '\n')
// when env is testing, don't need open it
if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') {
opn(uri)
}
_resolve()
})
const server = app.listen(port)
module.exports = {
ready: readyPromise,
close: () => {
server.close()
}
}
|
export default {
entry: 'dist/esm/plugins/bootstrap/index.js',
dest: '.tmp/angular2-modal.bootstrap.umd.js',
format: 'umd',
moduleName: 'angular2Modal.plugins.bootstrap',
globals: {
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'@angular/compiler': 'ng.compiler',
'@angular/platform-browser': 'ng.platformBrowser',
'@angular/platform-browser-dynamic': 'ng.platformBrowserDynamic',
'angular2-modal': 'angular2Modal',
'rxjs/Subject': 'Rx',
'rxjs/observable/PromiseObservable': 'Rx',
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx'
}
}
|
var device__interface_8h =
[
[ "halide_device_interface_impl_t", "structhalide__device__interface__impl__t.html", "structhalide__device__interface__impl__t" ],
[ "halide_default_device_and_host_malloc", "device__interface_8h.html#a0d16a7c74441060c469123b0d943dda2", null ],
[ "halide_default_device_and_host_free", "device__interface_8h.html#a33cdc0856fa621545808001d613e531b", null ],
[ "halide_default_buffer_copy", "device__interface_8h.html#a8dbf15ff241033f5896112cc448ce5af", null ],
[ "halide_default_device_crop", "device__interface_8h.html#a7f4d60e2de977137831345c09c9e5d7b", null ],
[ "halide_default_device_slice", "device__interface_8h.html#a9d505b1ce67df6316ef71fec41e10019", null ],
[ "halide_default_device_release_crop", "device__interface_8h.html#a9c011274c9a5ba9f60eac58cc48f90ae", null ],
[ "halide_default_device_wrap_native", "device__interface_8h.html#a4309f7cc266a519a60747c4a8ce70d7a", null ],
[ "halide_default_device_detach_native", "device__interface_8h.html#a44c40c11a9ab9f7809538fa502d55a65", null ]
];
|
"use strict"
const const_strings = {
AppName: 'WowApp',
TipCalculator: 'TipCalculator',
TipKey: 'Tip',
BroadcastEvenetName: 'LocalStorageModule.notification.setitem'
};
var tipCalculator = function ($scope, localStorageService) {
//I define an object with set method
var tip = {
bill: undefined,
tenPercent: undefined,
fifteenPercent: undefined,
inputs: [],
set: function (t) {
console.log('value received', [t]);
this.bill = t.bill;
this.tenPercent = t.tenPercent;
this.fifteenPercent = t.fifteenPercent;
this.inputs.length = 0; //this is to ensure there are no references left to old object
if (!(t.inputs === undefined)) {
this.inputs = t.inputs;
}
}
}
//**ADVANCED TOPIC** I am listening on event being broadcasted
$scope.$on(const_strings.BroadcastEvenetName, function (data) {
console.log('Event received: ', [JSON.stringify(data[0])]);
computeTip();
});
//I assign the tip object to the $scope so any changes to tip object should propegate to view
$scope.tip = tip;
$scope.typed = function (input) {
console.debug('Typed input:', [input]);
tip.inputs.length = 0;
tip.inputs.push(input);
//I save the object via the service: note this will only save properties not function and then broadcast the changes
localStorageService.set(const_strings.TipKey, tip);
}
$scope.press = function (input) {
console.debug('Pressed number:', [input]);
tip.inputs.push(input);
//I save the object via the service: note this will only save properties not function and then broadcast the changes
localStorageService.set(const_strings.TipKey, tip);
};
$scope.reset = function () {
//I reset the object and then broadcast the changes
localStorageService.set(const_strings.TipKey, {});
};
//this is the core business logic
var computeTip = function () {
tip.set(localStorageService.get(const_strings.TipKey));
var result = tip.inputs.join('') * 10 / 100;
tip.tenPercent = result === 0 ? '' : result;
result = tip.inputs.join('') * 15 / 100;
tip.fifteenPercent = result === 0 ? '' : result;
tip.bill = tip.inputs.join('');
};
}
angular.module(const_strings.AppName, ['LocalStorageModule'])
.config(function (localStorageServiceProvider) {
localStorageServiceProvider.setPrefix(const_strings.AppName);
localStorageServiceProvider.setDefaultToCookie(false);
localStorageServiceProvider.setNotify(true, true);
})
.controller(const_strings.TipCalculator, this.tipCalculator);
|
import ChessRules from "/base_rules.js";
import PiPo from "/utils/PiPo.js";
import Move from "/utils/Move.js";
export default class AtomicRules extends ChessRules {
static get Options() {
return {
select: C.Options.select,
input: [
{
label: "Balanced",
variable: "rempawn",
type: "checkbox",
defaut: false
}
].concat(C.Options.input.filter(i => i.variable == "pawnfall")),
styles: C.Options.styles.filter(s => s != "atomic")
};
}
constructor(o) {
o.options["atomic"] = true;
super(o);
}
canIplay(x, y) {
if (this.options["rempawn"] && this.movesCount == 0)
return (this.playerColor == this.turn && this.getPiece(x, y) == "p");
return super.canIplay(x, y);
}
getPotentialMovesFrom([x, y], color) {
if (this.options["rempawn"] && this.movesCount == 0) {
if ([1, 6].includes(x)) {
const c = this.getColor(x, y);
return [
new Move({
appear: [],
vanish: [
new PiPo({
x: x,
y: y,
p: "p",
c: c
})
],
start: { x: x, y: y },
end: { x: x, y: y }
})
];
}
return [];
}
return super.getPotentialMovesFrom([x, y], color);
}
doClick(square) {
if (!this.options["rempawn"] || this.movesCount >= 1)
return super.doClick(square);
const [x, y] = [square[0], square[1]];
const moves = this.getPotentialMovesFrom([x, y]);
return (moves.length >= 1 ? moves[0] : null);
}
};
|
const websiteSiteSections = require('./website-site-sections');
/**
* Each function will receive the following args:
*
* The object that contains the result returned from the resolver on the parent field
* The current operation values object - includes query and sort.
* The GraphQL variables object.
* The GraphQL context object.
* The GraphQL info object.
*
* Functions can be async, as they are awaited by the directives.
* Each function must return an object containing the new query and sort.
*/
const builders = {
websiteSiteSections,
};
module.exports = async (key, {
doc = {},
currentValues = {},
variables = {},
ctx,
info,
} = {}) => {
if (!key) return currentValues;
const fn = builders[key];
if (fn) {
const { query, sort } = await fn(doc, currentValues, variables, ctx, info);
return {
query: query || currentValues.query,
sort: sort || currentValues.sort,
};
}
throw new Error(`No ref query builder function was found for '${key}'`);
};
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LevelItem = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const LevelItem = (_a) => {
var { children = null } = _a, props = tslib_1.__rest(_a, ["children"]);
return (React.createElement("div", Object.assign({}, props), children));
};
exports.LevelItem = LevelItem;
exports.LevelItem.displayName = 'LevelItem';
//# sourceMappingURL=LevelItem.js.map
|
import React, { useState } from "react";
import "./WorkAndEducationComponentSection.css";
import _ from "lodash"
import { WorkAndEducationComponentAddButton } from "../WorkAndEducationComponentAddButton";
import { WorkAndEducationComponentNotNullSection } from "../WorkAndEducationComponentNotNullSection";
import { WorkAndEducationComponentSectionActiveInputs } from "../WorkAndEducationComponentSectionActiveInputs";
export const WorkAndEducationComponentSection = (props) => {
const [activeComponent, setActiveComponent] = useState(false);
const toggleActiveComponent = (boolean) => {
boolean ? setActiveComponent(true) : setActiveComponent(false);
};
switch (activeComponent) {
case false:
return (
<div className={"WorkAndEducationComponent__section"}>
<div className={"WorkAndEducationComponent__sectionTitle"}>
<span>{props.titleBold}</span>
</div>
{props.user === null ? null : Array.isArray(
props.componentArguments
) ? (
props.componentArguments.length === 0 ? (
<WorkAndEducationComponentAddButton
{...props}
toggleActiveComponent={toggleActiveComponent}
/>
) : (
props.componentArguments.map((e, index) => {
let resultTitle = "";
for (const [key, value] of Object.entries(e)) {
resultTitle += `${key}: «${value}». `;
}
return (
<WorkAndEducationComponentNotNullSection
{...props}
index={index}
key={_.uniqueId(e)}
toggleActiveComponent={toggleActiveComponent}
mainTitle={resultTitle}
/>
);
})
)
) : props.componentArguments === "" ? (
<WorkAndEducationComponentAddButton
toggleActiveComponent={toggleActiveComponent}
{...props}
/>
) : (
<WorkAndEducationComponentNotNullSection
mainTitle={props.componentArguments}
toggleActiveComponent={toggleActiveComponent}
{...props}
/>
)}
</div>
);
case true:
return (
<>
<div className={"WorkAndEducationComponent__sectionTitle"}>
<span>{props.titleBold}</span>
</div>
<WorkAndEducationComponentSectionActiveInputs
{...props}
toggleActiveComponent={toggleActiveComponent}
/>
</>
);
default:
return null;
}
};
|
var exec = require('./exec');
module.exports = function tag(version) {
var history = require('./history')(version);
var tagname = 'v' + version;
exec('git tag -a "' + tagname + '" -m "' + history + '"');
};
|
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage/aplicacao'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};
|
'use strict';
var gulp = require('gulp'),
eslint = require('gulp-eslint'),
mocha = require('gulp-mocha'),
coverage = require('gulp-coverage'),
exec = require('child_process').exec,
rs = require('run-sequence');
gulp.task('lint', function () {
return gulp
.src(['lib/**/*', 'test/**/*', 'index.js', 'gulpfile.js'])
.pipe(eslint({
configFile: '.eslintrc'
}))
.pipe(eslint.format())
.pipe(eslint.failOnError())
;
});
gulp.task('test', function () {
return gulp
.src(['test/**/*.test.js'], { read: false })
.pipe(coverage.instrument({
pattern: ['lib/**/*', 'index.js'],
debugDirectory: 'dist/debug'
}))
.pipe(mocha())
.pipe(coverage.gather())
.pipe(coverage.format([
{
reporter: 'lcov',
outFile: 'coverage.lcov'
},
{
reporter: 'html',
outFile: 'report.html'
}
]))
.pipe(gulp.dest('dist/'))
;
});
gulp.task('ccm', function (done) {
exec(
'CODECLIMATE_REPO_TOKEN=9d7be636d8c5a527bb4e1273cbd4dea57fc3124f7b46a411d1e668c1dffd9684 ./node_modules/.bin/codeclimate-test-reporter < ./dist/coverage.lcov',
function (err) {
done(err);
});
});
gulp.task('default', function (done) {
rs('lint', 'test', 'ccm', done);
});
|
# Generated by Django 4.0.2 on 2022-02-26 14:16
import cloudinary.models
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('gallery', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='image',
name='image',
field=cloudinary.models.CloudinaryField(max_length=255, verbose_name='image'),
),
]
|
import Vue from 'vue'
import Vuex from 'vuex'
import manage from './modules/manage.js'
const debug = process.env.NODE_ENV !== 'production'
Vue.use(Vuex)
Vue.config.debug = debug
//导出store对象
export default new Vuex.Store({
//组合各个模块
modules:{
manage
},
strict: debug
})
|
/**
* Toolbars and menus: Reorderable Toolbars
* tested on:
* desktop:
* Chrome 49, 51
* Firefox 38, 45
* IE 11
* Opera 36
* tablet:
* Chrome 49
* Edge 13
* Safari 7
* mobile:
* Chrome 49
* Edge 13
* themes:
* Triton
* Neptune
* Neptune Touch
* Classic
* Crisp
* OS:
* Windows 7, 8, 10
* Android 5,6
* OSX - Safari 7
* WP 10
*/
describe("Checking all buttons", function() {
//------------------------------------------------variables-------------------------------------------------------//
var buttons = ['Copy', 'Format'];
var splitButtons = ['Menu Button', 'Cut'];
var menuButtons = ['Paste'];
var menuItems = ['Menu Button 1', 'Cut Menu Item', 'Paste Menu Item'];
//------------------------------------------------functions-------------------------------------------------------//
//functions in file LibraryFunctions.js
//------------------------------------------------navigation------------------------------------------------------//
beforeAll(function() {
KitchenSink.app.redirectTo("#basic-toolbar");
});
//------------------------------------------------tests-----------------------------------------------------------//
//var panelText = "panel[@componentCls=x-panel]";
var panelText = "null][@componentCls=x-panel";
describe('Check if panel is rendered', function () {
Lib.panelRendered(panelText);
});
panelText = "panel[title=null][@componentCls=x-panel]";
describe('Reorder buttons', function () {
for (var i = 0; i < splitButtons.length; i++) {
Lib.moveButtons(panelText, splitButtons[i]);
}
for (i = 0; i < menuButtons.length; i++) {
Lib.moveButtons(panelText, menuButtons[i]);
}
for (i = 0; i < buttons.length; i++) {
Lib.moveButtons(panelText, buttons[i]);
}
});
});
|
// @flow
import type {
QueryIdType,
} from '../types';
import createUlid from './createUlid';
export default (): QueryIdType => {
// eslint-disable-next-line no-extra-parens, flowtype/no-weak-types
return (createUlid(): any);
};
|
import React from 'react';
import {StyleSheet, TouchableOpacity} from 'react-native';
import {colors} from '../utils/colors';
import ArrowUpSvg from '../../assets/svg/arrow-up.svg';
export default ({onPress}) => (
<TouchableOpacity onPress={onPress} style={styles.backButtonContainer}>
<ArrowUpSvg color={colors.BLUE} />
</TouchableOpacity>
);
const styles = StyleSheet.create({
backButtonContainer: {
marginVertical: 10,
marginHorizontal: 15,
paddingHorizontal: 15,
borderRadius: 20,
backgroundColor: 'rgba(38,56,124, 0.03)',
borderColor: 'rgba(38,56,124, 0.08)',
height: 40,
width: 40,
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
alignSelf: 'flex-start',
transform: [{rotate: '90deg'}],
},
});
|
import { fromJS } from 'immutable';
import uploadDocumentsReducer from '../reducer';
describe('uploadDocumentsReducer', () => {
it('returns the initial state', () => {
expect(uploadDocumentsReducer(undefined, {})).toEqual(fromJS({}));
});
});
|
JobEntryTableExistsDialog = Ext.extend(KettleDialog, {
title: '检查表是否存在',
width: 450,
height: 210,
initComponent: function() {
var me = this,cell = getActiveGraph().getGraph().getSelectionCell();
var wConnection = new Ext.form.ComboBox({
flex: 1,
displayField: 'name',
valueField: 'name',
typeAhead: true,
mode: 'remote',
forceSelection: true,
triggerAction: 'all',
selectOnFocus:true,
store: getActiveGraph().getDatabaseStoreAll(),
value: cell.getAttribute('connection')
});
var onDatabaseCreate = function(dialog) {
getActiveGraph().onDatabaseMerge(dialog.getValue());
wConnection.setValue(dialog.getValue().name);
dialog.close();
};
var wSchema = new Ext.form.TextField({ flex: 1, value: cell.getAttribute('schema')});
var wTable = new Ext.form.TextField({ flex: 1, value: cell.getAttribute('table')});
this.initData = function() {
var cell = this.getInitData();
JobEntryTableExistsDialog.superclass.initData.apply(this, [cell]);
wConnection.setValue(cell.getAttribute('connection'));
wSchema.setValue(cell.getAttribute('schemaname'));
wTable.setValue(cell.getAttribute('tablename'));
};
this.saveData = function(){
var data = {};
data.connection = wConnection.getValue();
data.schemaname = wSchema.getValue();
data.tablename = wTable.getValue();
return data;
};
this.fitItems = [{
xtype: 'KettleForm',
items: [{
xtype: 'compositefield',
fieldLabel: '数据库连接',
anchor: '-10',
items: [wConnection, {
xtype: 'button', text: '编辑...', handler: function() {
var databaseDialog = new DatabaseDialog();
databaseDialog.on('create', onDatabaseCreate);
databaseDialog.show(null, function() {
databaseDialog.initTransDatabase(wConnection.getValue());
});
}
}, {
xtype: 'button', text: '新建...', handler: function() {
var databaseDialog = new DatabaseDialog();
databaseDialog.on('create', onDatabaseCreate);
databaseDialog.show(null, function() {
databaseDialog.initTransDatabase(null);
});
}
}, {
xtype: 'button', text: '向导...'
}]
},{
fieldLabel: '目的模式',
xtype: 'compositefield',
anchor: '-10',
items: [wSchema, {
xtype: 'button', text: '浏览...', handler: function() {
me.selectSchema(wConnection, wSchema);
}
}]
},{
fieldLabel: '目标表',
xtype: 'compositefield',
anchor: '-10',
items: [wTable, {
xtype: 'button', text: '浏览...', handler: function() {
me.selectTable(wConnection, wSchema, wTable);
}
}]
}]
}];
JobEntryTableExistsDialog.superclass.initComponent.call(this);
},
selectSchema: function(wConnection, wSchema) {
/*var store = getActiveGraph().getDatabaseStore();
store.each(function(item) {
if(item.get('name') == wConnection.getValue()) {
var dialog = new DatabaseExplorerDialog({includeElement: 1});
dialog.on('select', function(schema) {
wSchema.setValue(schema);
dialog.close();
});
dialog.show(null, function() {
dialog.initDatabase(item.json);
});
return false;
}
});*/
var dialog = new DatabaseExplorerDialog({includeElement: 1});
dialog.on('select', function(schema) {
wSchema.setValue(schema);
dialog.close();
});
dialog.show(null, function() {
dialog.initDatabase(wConnection.getValue());
});
return false;
},
selectTable: function(wConnection, wSchema, wTable) {
/*var store = getActiveGraph().getDatabaseStore();
store.each(function(item) {
if(item.get('name') == wConnection.getValue()) {
var dialog = new DatabaseExplorerDialog();
dialog.on('select', function(table, schema) {
wTable.setValue(table);
wSchema.setValue(schema);
dialog.close();
});
dialog.show(null, function() {
dialog.initDatabase(item.json);
});
return false;
}
});*/
var dialog = new DatabaseExplorerDialog();
dialog.on('select', function(table, schema) {
wTable.setValue(table);
wSchema.setValue(schema);
dialog.close();
});
dialog.show(null, function() {
dialog.initDatabase(wConnection.getValue());
});
return false;
}
});
Ext.reg('TABLE_EXISTS', JobEntryTableExistsDialog);
|
draft.types.Color = class Color {
constructor(color) {
color = new RegExp(`^(?:${this.regex})$`, 'i').exec(
isNaN(color) ? color : color.toString(16));
if (color !== null) {
this.color = color[0].toLowerCase();
for (let i = 1; i <= 3; i++) {
color[i] = parseInt(color[i] ||
parseInt(color[i + 3] || color[i + 6].repeat(2), 16), 10);
}
this.red = color[1];
this.green = color[2];
this.blue = color[3];
}
}
get type() {
return 'color';
}
get regex() {
var rgbColor = '([01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])';
var rgb = `rgb\\(${rgbColor}, ?${rgbColor}, ?${rgbColor}\\)`;
var hexColor = '([0-9a-f]{2})'.repeat(3);
var hex = `#?(?:${hexColor}|${hexColor.replace(/\{2\}/g, '')})`;
// var hex = '#?(?:[0-9a-f]{3}){1,2}';
return `${rgb}|${hex}`;
}
valueOf() {
return (this.red << 16) | (this.green << 8) | this.blue;
}
toString() {
return this.color;
}
};
draft.types.color = function color(value) {
return value == undefined ? value : new draft.types.Color(value);
};
|
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. 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.
*/
import _ from 'lodash';
import { ORIGIN } from 'ui/vis/map/origin';
export function mapToLayerWithId(prefix, layer) {
const clonedLayer = _.cloneDeep(layer);
clonedLayer.layerId = prefix + '.' + layer.name;
clonedLayer.isEMS = ORIGIN.EMS === prefix ? true : false;
return clonedLayer;
}
|
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: {
app: [
'./src/index.js',
],
},
output: {
filename: '[name]-dist.js',
path: path.resolve(__dirname, 'dist'),
},
module: {
rules: [
{
test: /\.(css|scss)$/,
use: [
'style-loader',
'css-loader',
],
},
{
test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/],
loader: 'elm-webpack-loader?verbose=true&warn=true',
},
],
noParse: /\.elm$/,
},
plugins: [
new HtmlWebpackPlugin({
title: 'Space Junker',
template: 'src/index.template.ejs',
inject: 'body',
}),
],
devServer: {
inline: true,
stats: { colors: true },
},
};
|
/*
Template Name: Color Admin - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.3.5
Version: 1.8.0
Author: Sean Ngu
Website: http://www.seantheme.com/color-admin-v1.8/admin/
*/
// white
var white = 'rgba(255,255,255,1.0)';
var fillBlack = 'rgba(45, 53, 60, 0.6)';
var fillBlackLight = 'rgba(45, 53, 60, 0.2)';
var strokeBlack = 'rgba(45, 53, 60, 0.8)';
var highlightFillBlack = 'rgba(45, 53, 60, 0.8)';
var highlightStrokeBlack = 'rgba(45, 53, 60, 1)';
// blue
var fillBlue = 'rgba(52, 143, 226, 0.6)';
var fillBlueLight = 'rgba(52, 143, 226, 0.2)';
var strokeBlue = 'rgba(52, 143, 226, 0.8)';
var highlightFillBlue = 'rgba(52, 143, 226, 0.8)';
var highlightStrokeBlue = 'rgba(52, 143, 226, 1)';
// grey
var fillGrey = 'rgba(182, 194, 201, 0.6)';
var fillGreyLight = 'rgba(182, 194, 201, 0.2)';
var strokeGrey = 'rgba(182, 194, 201, 0.8)';
var highlightFillGrey = 'rgba(182, 194, 201, 0.8)';
var highlightStrokeGrey = 'rgba(182, 194, 201, 1)';
// green
var fillGreen = 'rgba(0, 172, 172, 0.6)';
var fillGreenLight = 'rgba(0, 172, 172, 0.2)';
var strokeGreen = 'rgba(0, 172, 172, 0.8)';
var highlightFillGreen = 'rgba(0, 172, 172, 0.8)';
var highlightStrokeGreen = 'rgba(0, 172, 172, 1)';
// purple
var fillPurple = 'rgba(114, 124, 182, 0.6)';
var fillPurpleLight = 'rgba(114, 124, 182, 0.2)';
var strokePurple = 'rgba(114, 124, 182, 0.8)';
var highlightFillPurple = 'rgba(114, 124, 182, 0.8)';
var highlightStrokePurple = 'rgba(114, 124, 182, 1)';
var randomScalingFactor = function() {
return Math.round(Math.random()*100)
};
var barChartData = {
labels : ['January','February','March','April','May','June','July'],
datasets : [
{
fillColor : fillBlackLight,
strokeColor : strokeBlack,
highlightFill: highlightFillBlack,
highlightStroke: highlightStrokeBlack,
data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()]
},
{
fillColor : fillBlueLight,
strokeColor : strokeBlue,
highlightFill: highlightFillBlue,
highlightStroke: highlightStrokeBlue,
data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()]
}
]
};
var doughnutData = [
{
value: 300,
color: fillGrey,
highlight: highlightFillGrey,
label: 'Grey'
},
{
value: 50,
color: fillGreen,
highlight: highlightFillGreen,
label: 'Green'
},
{
value: 100,
color: fillBlue,
highlight: highlightFillBlue,
label: 'Blue'
},
{
value: 40,
color: fillPurple,
highlight: highlightFillPurple,
label: 'Purple'
},
{
value: 120,
color: fillBlack,
highlight: highlightFillBlack,
label: 'Black'
}
];
var lineChartData = {
labels : ['January','February','March','April','May','June','July'],
datasets : [
{
label: 'My First dataset',
fillColor : fillBlackLight,
strokeColor : strokeBlack,
pointColor : strokeBlack,
pointStrokeColor : white,
pointHighlightFill : white,
pointHighlightStroke : strokeBlack,
data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()]
},
{
label: 'My Second dataset',
fillColor : 'rgba(52,143,226,0.2)',
strokeColor : 'rgba(52,143,226,1)',
pointColor : 'rgba(52,143,226,1)',
pointStrokeColor : '#fff',
pointHighlightFill : '#fff',
pointHighlightStroke : 'rgba(52,143,226,1)',
data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()]
}
]
};
var pieData = [
{
value: 300,
color: strokePurple,
highlight: highlightStrokePurple,
label: 'Purple'
},
{
value: 50,
color: strokeBlue,
highlight: highlightStrokeBlue,
label: 'Blue'
},
{
value: 100,
color: strokeGreen,
highlight: highlightStrokeGreen,
label: 'Green'
},
{
value: 40,
color: strokeGrey,
highlight: highlightStrokeGrey,
label: 'Grey'
},
{
value: 120,
color: strokeBlack,
highlight: highlightStrokeBlack,
label: 'Black'
}
];
var polarData = [
{
value: 300,
color: strokePurple,
highlight: highlightStrokePurple,
label: 'Purple'
},
{
value: 50,
color: strokeBlue,
highlight: highlightStrokeBlue,
label: 'Blue'
},
{
value: 100,
color: strokeGreen,
highlight: highlightStrokeGreen,
label: 'Green'
},
{
value: 40,
color: strokeGrey,
highlight: highlightStrokeGrey,
label: 'Grey'
},
{
value: 120,
color: strokeBlack,
highlight: highlightStrokeBlack,
label: 'Black'
}
];
var radarChartData = {
labels: ['Eating', 'Drinking', 'Sleeping', 'Designing', 'Coding', 'Cycling', 'Running'],
datasets: [
{
label: 'My First dataset',
fillColor: 'rgba(45,53,60,0.2)',
strokeColor: 'rgba(45,53,60,1)',
pointColor: 'rgba(45,53,60,1)',
pointStrokeColor: '#fff',
pointHighlightFill: '#fff',
pointHighlightStroke: 'rgba(45,53,60,1)',
data: [65,59,90,81,56,55,40]
},
{
label: 'My Second dataset',
fillColor: 'rgba(52,143,226,0.2)',
strokeColor: 'rgba(52,143,226,1)',
pointColor: 'rgba(52,143,226,1)',
pointStrokeColor: '#fff',
pointHighlightFill: '#fff',
pointHighlightStroke: 'rgba(52,143,226,1)',
data: [28,48,40,19,96,27,100]
}
]
};
var handleGenerateGraph = function(animationOption) {
var animationOption = (animationOption) ? animationOption : false;
var ctx = document.getElementById('line-chart').getContext('2d');
var lineChart = new Chart(ctx).Line(lineChartData, {
animation: animationOption
});
var ctx2 = document.getElementById('bar-chart').getContext('2d');
var barChart = new Chart(ctx2).Bar(barChartData, {
animation: animationOption
});
var ctx3 = document.getElementById('radar-chart').getContext('2d');
var radarChart = new Chart(ctx3).Radar(radarChartData, {
animation: animationOption
});
var ctx4 = document.getElementById('polar-area-chart').getContext('2d');
var polarAreaChart = new Chart(ctx4).PolarArea(polarData, {
animation: animationOption
});
var ctx5 = document.getElementById('pie-chart').getContext('2d');
window.myPie = new Chart(ctx5).Pie(pieData, {
animation: animationOption
});
var ctx6 = document.getElementById('doughnut-chart').getContext('2d');
window.myDoughnut = new Chart(ctx6).Doughnut(doughnutData, {
animation: animationOption
});
};
var handleChartJs = function() {
handleGenerateGraph(true);
$(window).resize( function() {
handleGenerateGraph();
});
};
var ChartJs = function () {
"use strict";
return {
//main function
init: function () {
$.getScript('assets/plugins/chart-js/chart.js').done(function() {
Chart.defaults.global = {
animation: true,
animationSteps: 60,
animationEasing: 'easeOutQuart',
showScale: true,
scaleOverride: false,
scaleSteps: null,
scaleStepWidth: null,
scaleStartValue: null,
scaleLineColor: 'rgba(0,0,0,.1)',
scaleLineWidth: 1,
scaleShowLabels: true,
scaleLabel: '<%=value%>',
scaleIntegersOnly: true,
scaleBeginAtZero: false,
scaleFontFamily: '"Open Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif',
scaleFontSize: 12,
scaleFontStyle: 'normal',
scaleFontColor: '#707478',
responsive: true,
maintainAspectRatio: true,
showTooltips: true,
customTooltips: false,
tooltipEvents: ['mousemove', 'touchstart', 'touchmove'],
tooltipFillColor: 'rgba(0,0,0,0.8)',
tooltipFontFamily: '"Open Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif',
tooltipFontSize: 12,
tooltipFontStyle: 'normal',
tooltipFontColor: '#ccc',
tooltipTitleFontFamily: '"Open Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif',
tooltipTitleFontSize: 12,
tooltipTitleFontStyle: 'bold',
tooltipTitleFontColor: '#fff',
tooltipYPadding: 10,
tooltipXPadding: 10,
tooltipCaretSize: 8,
tooltipCornerRadius: 3,
tooltipXOffset: 10,
tooltipTemplate: '<%if (label){%><%=label%>: <%}%><%= value %>',
multiTooltipTemplate: '<%= value %>',
onAnimationProgress: function(){},
onAnimationComplete: function(){}
}
handleChartJs();
});
}
};
}();
|
var scienceQuestions = [
{
title: "Which of the following is NOT an arachnid?",
choices: ["Mite", "Spider", "Wasp", "Scorpion"],
answer: "Wasp"
},
{
title: "Which of the following whales is the smallest?",
choices: ["Blue Whale", "Humpback Whale", "Sperm Whale", "Beluga Whale"],
answer: "Beluga Whale"
},
{
title: "Which is the largest of the inner planets?",
choices: ["Mercury", "Venus", "Earth", "Mars"],
answer: "Earth"
},
{
title: "What is Callisto?",
choices: ["A Comet", "A Moon", "An Asteroid", "A Planet"],
answer: "A Moon"
},
{
title: "Which is the smallest?",
choices: ["Picogram", "Milligram", "Nanogram", "Microgram"],
answer: "Picogram"
},
{
title: "Which geologic period is the oldest?",
choices: ["Triassic", "Cretaceous", "Jurassic", "Cambrian"],
answer: "Cambrian"
},
{
title: "Which of the following bones is NOT found in the leg?",
choices: ["Femur", "Ulna", "Patella", "Tibia"],
answer: "Ulna"
},
{
title: "Which of the following human organs is the heaviest?",
choices: ["Liver", "Heart", "Kidneys", "Lungs"],
answer: "Liver"
},
{
title: "What gas makes up the greatest portion of Earth's atmosphere?",
choices: ["Carbon Dioxide", "Nitrogen", "Oxygen", "Argon"],
answer: "Nitrogen"
},
{
title: "Which color of light has the shortest wavelength?",
choices: ["Green", "Yellow", "Red", "Violet"],
answer: "Violet"
}
]
var science = {
name: "Science",
questions: scienceQuestions
}
|
import React from "react"
import styled from "styled-components"
import {Router} from "@reach/router"
const Container = styled.div`
background-color: #d7d7d7;
width: 100%;
height: 100vh;
`
const One = () => <div>One</div>
const Two = () => <div>Two</div>
const Map = () => {
return (
<div>
<Container>Container</Container>
</div>
)
}
export default Map
|
/*!
* apiai
* Copyright(c) 2015 http://api.ai/
* Apache 2.0 Licensed
*/
'use strict';
var util = require('util');
var TextRequest = require('./text_request').TextRequest;
var VoiceRequest = require('./voice_request').VoiceRequest;
var UserEntitiesRequest = require('./user_entities_request').UserEntitiesRequest;
var version = '20150910'
var language = 'en'
var hostname = 'api.api.ai'
var endpoint = '/v1/'
var defaultSource = 'node'
function createApplicationDeprecated(clientAccessToken, subscriptionKey, options) {
var options = options || {};
if (!clientAccessToken) {
throw new Error('\'clientAccessToken\' cannot be empty.');
}
return new Application(clientAccessToken, options);
}
function createApplicationNew(clientAccessToken, options) {
var options = options || {};
if (!clientAccessToken) {
throw new Error('\'clientAccessToken\' cannot be empty.');
}
return new Application(clientAccessToken, options);
}
function createApplication(args) {
if (arguments.length > 1) {
if (typeof arguments[1] == "string") {
return createApplicationDeprecated.apply(this, arguments)
} else if (typeof arguments[1] == "object") {
return createApplicationNew.apply(this, arguments)
} else {
throw new Error('Wrong parameters of initialization.');
}
} else {
return createApplicationNew.apply(this, arguments)
}
}
exports = module.exports = createApplication;
function Application (clientAccessToken, options) {
var self = this;
self.language = options.language || language;
self.clientAccessToken = clientAccessToken;
self.hostname = options.hostname || hostname;
self.version = options.version || version;
self.endpoint = options.endpoint || endpoint;
self.requestSource = options.requestSource || defaultSource;
};
Application.prototype.textRequest = function(query, options) {
var self = this;
var opt = options || {};
if (!('endpoint' in opt)) {
opt.endpoint = self.endpoint;
}
if (!('version' in opt)) {
opt.version = self.version
}
return new TextRequest(self, query, opt);
};
Application.prototype.voiceRequest = function(options) {
var self = this;
var opt = options || {};
if (!('endpoint' in opt)) {
opt.endpoint = self.endpoint;
}
if (!('version' in opt)) {
opt.version = self.version
}
return new VoiceRequest(self, opt);
};
Application.prototype.userEntitiesRequest = function(user_entities, options) {
var self = this;
var opt = options || {};
if (!('endpoint' in opt)) {
opt.endpoint = self.endpoint;
}
return new UserEntitiesRequest(self, user_entities, opt);
};
|
"""
Face detection using dlib CNN face detector using a pre-trained model (712 KB)
from http://dlib.net/files/mmod_human_face_detector.dat.bz2.
"""
# Import required packages:
import cv2
import dlib
from matplotlib import pyplot as plt
def show_img_with_matplotlib(color_img, title, pos):
"""Shows an image using matplotlib capabilities"""
img_RGB = color_img[:, :, ::-1]
ax = plt.subplot(1, 1, pos)
plt.imshow(img_RGB)
plt.title(title)
plt.axis('off')
def show_detection(image, faces):
"""Draws a rectangle over each detected face"""
# faces contains a list of mmod_rectangle objects
# The mmod_rectangle object has two member variables, a dlib.rectangle object, and a confidence score
# Therefore, we iterate over the detected mmod_rectangle objects accessing dlib.rect to draw the rectangle
for face in faces:
cv2.rectangle(image, (face.rect.left(), face.rect.top()), (face.rect.right(), face.rect.bottom()), (255, 0, 0),
10)
return image
# Load CNN detector from dlib:
cnn_face_detector = dlib.cnn_face_detection_model_v1("mmod_human_face_detector.dat")
# Load image and convert to grayscale:
img = cv2.imread("test_face_detection.jpg")
# Resize the image to attain reasonable speed:
# img = cv2.resize(img, (0, 0), fx=0.5, fy=0.5)
# Detect faces:
rects = cnn_face_detector(img, 0)
# Draw face detections:
img_faces = show_detection(img.copy(), rects)
# Create the dimensions of the figure and set title:
fig = plt.figure(figsize=(10, 5))
plt.suptitle("Face detection using dlib CNN face detector", fontsize=14, fontweight='bold')
fig.patch.set_facecolor('silver')
# Plot the images:
show_img_with_matplotlib(img_faces, "cnn_face_detector(img, 0): " + str(len(rects)), 1)
# Show the Figure:
plt.show()
|
import {request} from "./request";
export function getHomeMultidata(){
return request({
url: '/home/multidata'
})
}
export function getHomeGoods(type, page){
return request({
url: '/home/data',
params: {
type,
page
}
})
}
|
const express = require("express");
const app = module.exports = express.Router();
const Joi = require("joi");
const { r } = require("../ConstantStore");
const Util = require("../Util");
app.use(async (req, res, next) => {
const token = req.headers.authorization;
if (!token) return res.status(400).json({error: "You need a Authorization header with a valid Bot Token."});
const bot = (await r.table("bots").filter({apiToken: token}).run())[0];
if (!bot) {
res.status(403).json({error: "not_authenticated"});
} else {
req.bot = await Util.attachPropBot(bot);
if (req.bot.servers == "N/A") req.bot.servers = null;
delete req.bot._markedDescription;
delete req.bot._discordAvatarURL;
delete req.bot._ownerViewing;
next();
}
});
app.get("/", (req, res) => {
res.json({ok: "You found the Public API!"});
});
app.get("/bot/me", (req, res) => {
res.json({ok: "View data property", data: req.bot});
});
app.get("/bot/:id", async (req, res) => {
let bot = await r.table("bots").get(req.params.id).run();
if (!bot || !bot.verified) return res.status(404).json({error: "Bot not found"});
if (bot) bot = Util.hidePropsBot(await Util.attachPropBot(bot));
res.status(200).json({ok: "View data property", data: bot});
});
app.get("/user/:id", async (req, res) => {
let user = await r.table("users").get(req.params.id).run();
if (!user) return res.status(404).json({error: "Users not found"});
if (user) user = Util.hidePropsUser(await Util.attachPropUser(user), false);
user._bots = (await Promise.all(user._bots.map(bot => Util.attachPropBot(bot)))).map(bot => Util.hidePropsBot(bot));
res.status(200).json({ok: "View data property", data: user});
});
const botPostServersSchema = Joi.object().keys({
server_count: Joi.number().max(10000000) // Just to make sure they arent super crazy.
});
app.post("/bot/stats", async (req, res) => {
if (Util.handleJoi(botPostServersSchema, req, res)) return;
const { server_count } = req.body;
await r.table("bots").get(req.bot.id).update({servers: server_count});
res.status(200).json({ok: "updated server count"});
});
app.use((req, res) => {
res.status(404).json({error: "Invalid Endpoint"});
});
|
// Load modules
var Hoek = require('hoek');
var Reporters = require('./index');
// Declare internals
var internals = {};
exports = module.exports = internals.Reporter = function (options) {
var self = this;
self._reporters = [];
options.reporter.forEach(function (reporter, index) {
var reporterOptions = Hoek.clone(options);
reporterOptions.reporter = reporter;
if (options.output[index] === 'stdout') {
options.output[index] = process.stdout;
}
reporterOptions.output = options.output[index] || options.output;
var reporterKey = reporterOptions.reporter;
var reporterIndex = 2;
while (self._reporters.hasOwnProperty(reporterKey)) {
reporterKey = reporterOptions.reporter + reporterIndex;
reporterIndex++;
}
self._reporters[reporterKey] = Reporters.generate(reporterOptions);
});
this.settings = options;
};
internals.Reporter.prototype.start = function (notebook) {
for (var key in this._reporters) {
this._reporters[key].start(notebook);
}
};
internals.Reporter.prototype.test = function (test) {
for (var key in this._reporters) {
this._reporters[key].test(test);
}
};
internals.Reporter.prototype.end = function (notebook) {
for (var key in this._reporters) {
this._reporters[key].end(notebook);
}
};
internals.Reporter.prototype.report = function (text) {
for (var key in this._reporters) {
this._reporters[key].report(text);
}
};
internals.Reporter.prototype.finalize = function (notebook, callback) {
this._results = { err: false, code: [], output: [], count: 0 };
for (var key in this._reporters) {
this._reporters[key].finalize(notebook, this.finalizeSingle(key, callback));
}
};
internals.Reporter.prototype.finalizeSingle = function (key, callback) {
var self = this;
return function (err, code, output) {
self._results.count++;
self._results.err = self._results.err || err;
self._results.code[key] = code;
self._results.output[key] = output;
self._results.processCode = self._results.processCode || code;
if (self._results.count === Object.keys(self._reporters).length) {
if (callback) {
return callback(self._results.err, self._results.code, self._results.output);
}
process.exit(self._results.processCode);
}
};
};
|
'use strict'
const deepSeal = require('deep-seal')
const dotProp = require('dot-prop')
let globalState
const GlobalState = {
reset() {
globalState = deepSeal({
galleryUrl: '',
galleryData: {
title: '',
items: [],
actualGalleryUrl: '',
},
aria2: {
sessionFile: {
path: '',
isExisting: false,
},
},
tasks: {
data: null,
jsonFilePath: '',
},
outputDir: '',
})
},
get(key) {
return dotProp.get(globalState, key)
},
set(key, value) {
if (arguments.length < 2) {
throw new Error('value is required.')
}
dotProp.set(globalState, key, value)
return value
},
}
GlobalState.reset()
module.exports = GlobalState
|
"""Bootleg data utils."""
import os
from bootleg.symbols.constants import FINAL_LOSS, SPECIAL_TOKENS
from bootleg.utils import utils
def correct_not_augmented_dict_values(gold, dict_values):
"""
Correct gold label dict values in data prep.
Modifies the dict_values to only contain those mentions that are gold
labels. The new dictionary has the alias indices be corrected to start at 0
and end at the number of gold mentions.
Args:
gold: List of T/F values if mention is gold label or not
dict_values: Dict of slice_name -> Dict[alias_idx] -> slice probability
Returns: adjusted dict_values such that only gold = True aliases are kept (dict is reindexed to start at 0)
"""
new_dict_values = {}
gold_idx = [i for i in range(len(gold)) if gold[i] is True]
for slice_name in list(dict_values.keys()):
alias_dict = dict_values[slice_name]
# i will not be in gold_idx if it wasn't an gold to being with
new_dict_values[slice_name] = {
str(gold_idx.index(int(i))): alias_dict[i]
for i in alias_dict
if int(i) in gold_idx
}
if len(new_dict_values[slice_name]) <= 0:
del new_dict_values[slice_name]
return new_dict_values
# eval_slices must include FINAL_LOSS
def get_eval_slices(eval_slices):
"""
Get eval slices in data prep.
Given input eval slices (passed in config), ensure FINAL_LOSS is in the
eval slices. FINAL_LOSS gives overall metrics.
Args:
eval_slices: list of input eval slices
Returns: list of eval slices to use in the model
"""
slice_names = eval_slices[:]
# FINAL LOSS is in ALL MODELS for ALL SLICES
if FINAL_LOSS not in slice_names:
slice_names.insert(0, FINAL_LOSS)
return slice_names
def get_save_data_folder(data_args, use_weak_label, dataset):
"""
Get save data folder for the prepped data.
Args:
data_args: data config
use_weak_label: whether to use weak labelling or not
dataset: dataset name
Returns: folder string path
"""
name = os.path.splitext(os.path.basename(dataset))[0]
direct = os.path.dirname(dataset)
bert_mod = data_args.word_embedding.bert_model.replace("/", "_")
fold_name = (
f"{name}_{bert_mod}_L{data_args.max_seq_len}_E{data_args.max_ent_len}"
f"_W{data_args.max_seq_window_len}"
f"_T{data_args.entity_type_data.use_entity_types}"
f"_K{data_args.entity_kg_data.use_entity_kg}"
f"_D{data_args.use_entity_desc}"
f"_InC{int(data_args.train_in_candidates)}"
f"_Aug{int(use_weak_label)}"
)
return os.path.join(direct, data_args.data_prep_dir, fold_name)
def get_save_data_folder_candgen(data_args, use_weak_label, dataset):
"""Give save data folder for the prepped data.
Args:
data_args: data config
use_weak_label: whether to use weak labelling or not
dataset: dataset name
Returns: folder string path
"""
name = os.path.splitext(os.path.basename(dataset))[0]
direct = os.path.dirname(dataset)
bert_mod = data_args.word_embedding.bert_model.replace("/", "_")
fold_name = (
f"{name}_{bert_mod}_L{data_args.max_seq_len}_E{data_args.max_ent_len}"
f"_W{data_args.max_seq_window_len}"
f"_A{data_args.use_entity_akas}"
f"_D{data_args.use_entity_desc}"
f"_InC{int(data_args.train_in_candidates)}"
f"_Aug{int(use_weak_label)}"
)
return os.path.join(direct, data_args.data_prep_dir, fold_name)
def generate_slice_name(data_args, slice_names, use_weak_label, dataset):
"""
Generate name for slice datasets, taking into account the config eval slices.
Args:
data_args: data args
slice_names: slice names
use_weak_label: if using weak labels or not
dataset: dataset name
Returns: dataset name for saving slice data
"""
dataset_name = os.path.join(
get_save_data_folder(data_args, use_weak_label, dataset), "slices.pt"
)
names_for_dataset = str(hash(slice_names))
dataset_name = os.path.splitext(dataset_name)[0] + "_" + names_for_dataset + ".pt"
return dataset_name
def get_emb_prep_dir(data_config):
"""
Get embedding prep directory for saving prep files.
Args:
data_config: data config
Returns: directory path
"""
prep_dir = os.path.join(data_config.entity_dir, data_config.entity_prep_dir)
utils.ensure_dir(prep_dir)
return prep_dir
def get_data_prep_dir(data_config):
"""
Get data prep directory for saving prep files.
Args:
data_config: data config
Returns: directory path
"""
prep_dir = os.path.join(data_config.data_dir, data_config.data_prep_dir)
utils.ensure_dir(prep_dir)
return prep_dir
def get_chunk_dir(prep_dir):
"""
Get directory for saving data chunks.
Args:
prep_dir: prep directory
Returns: directory path
"""
return os.path.join(prep_dir, "chunks")
def add_special_tokens(tokenizer):
"""
Add special tokens.
Args:
tokenizer: tokenizer
data_config: data config
entitysymbols: entity symbols
"""
# Add standard tokens
tokenizer.add_special_tokens(SPECIAL_TOKENS)
def read_in_akas(entitysymbols):
"""Read in alias to QID mappings and generates a QID to list of alternate names.
Args:
entitysymbols: entity symbols
Returns: dictionary of QID to type names
"""
# take the first type; UNK type is 0
qid2aliases = {}
for al in entitysymbols.get_all_aliases():
for qid in entitysymbols.get_qid_cands(al):
if qid not in qid2aliases:
qid2aliases[qid] = set()
qid2aliases[qid].add(al)
# Turn into sets for dumping
for qid in qid2aliases:
qid2aliases[qid] = list(qid2aliases[qid])
return qid2aliases
|
/*******************************************************************************
* Copyright (c) 2016, Institute for Pervasive Computing, ETH Zurich.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* This file is part of the Copper (Cu) CoAP user-agent.
******************************************************************************/
/**
* Creates a new option object.
* @header: option header
*/
Copper.CoapMessage.Option = function(header){
if (!(header instanceof Copper.CoapMessage.OptionHeader)) throw new Error("Illegal Arguments");
this.header = header;
this.resetValue();
};
/**
* Resets the value of this option to empty
* @return: option (for method chaining)
*/
Copper.CoapMessage.Option.prototype.resetValue = function() {
this.val = [];
return this;
};
Copper.CoapMessage.Option.prototype.clone = function() {
let res = new Copper.CoapMessage.Option(this.header.clone());
res.val = this.val.slice(0);
};
/**
* Sets the option value or adds a value in case of options that support multiple values.
* @byteVal: ArrayBuffer containing the data
* @return: option (for method chaining)
*/
Copper.CoapMessage.Option.prototype.addByteValue = function(byteVal) {
if (byteVal !== null && !(byteVal instanceof ArrayBuffer)){
throw new Error("Option value must be a byte array");
}
if (byteVal !== null && (this.header.minLen > byteVal.byteLength || this.header.maxLen < byteVal.byteLength)){
throw new Error("Invalid option value size");
}
if (byteVal === null && this.header.minLen > 0){
throw new Error("Invalid option value size");
}
if (this.header.multipleValues) {
this.val.push(byteVal);
}
else {
if (this.val.length > 0) {
throw new Error("Option value already set");
}
this.val.push(byteVal);
}
return this;
};
/*
* Sets or overwrites the option value
* @val: ArrayBuffer containing the data
* @return: option (for method chaining)
*/
Copper.CoapMessage.Option.prototype.setByteValue = function(val) {
if (this.val.length > 0){
this.resetValue();
}
return this.addByteValue(val);
};
/**
* Sets the option value or adds a value in case of options that support multiple values.
* @val: Data in the right format
* @arg opts: object with optional options. The following can be set:
* useUtf8 --> set to false if ascii encoding should be used
* strict --> set to true in order to throw errors instead of skipping error parts
* @return: option (for method chaining)
*/
Copper.CoapMessage.Option.prototype.addValue = function(val, opts) {
let ascii = opts !== undefined && opts.useUtf8 === false;
let strict = opts !== undefined && opts.strict === true;
let Types = Copper.CoapMessage.OptionHeader;
switch(this.header.type) {
case Types.TYPE_EMPTY:
if (val === undefined || val === null || val === 0){
this.addByteValue(new ArrayBuffer(0));
break;
}
throw new Error("Illegal Argument for " + this.header.name + " - Expected Empty Type");
case Types.TYPE_OPAQUE:
this.addByteValue(Copper.ByteUtils.convertToByteArray(val, ascii, strict));
break;
case Types.TYPE_UINT:
if (Number.isInteger(val) && val >= 0){
this.addByteValue(Copper.ByteUtils.convertUintToBytes(val));
break;
}
throw new Error("Illegal Argument for " + this.header.name + " - Expected Positive Integer");
case Types.TYPE_STRING:
if (typeof(val) === "string"){
this.addByteValue(Copper.ByteUtils.convertStringToBytes(val, ascii, strict));
break;
}
throw new Error("Illegal Argument for " + this.header.name + " - Expected String");
case Types.TYPE_BLOCK:
if (val instanceof Copper.CoapMessage.BlockOption) {
this.addByteValue(Copper.ByteUtils.convertUintToBytes(Copper.CoapMessage.BlockOption.convertBlockOptionToUint(val)));
break;
}
throw new Error("Illegal Argument for " + this.header.name + " - Expected Block Type");
default:
throw new Error("Illegal Argument for " + this.header.name);
}
return this;
};
/*
* Sets or overwrites the option value
* @val: Data in the right format (depending on the option header)
* @arg opts: object with optional options. The following can be set:
* useUtf8 --> set to false if ascii encoding should be used
* strict --> set to true in order to throw errors instead of skipping error parts
* @return: option (for method chaining)
*/
Copper.CoapMessage.Option.prototype.setValue = function(val, opts) {
if (this.val.length > 0){
this.resetValue();
}
return this.addValue(val, opts);
};
/*
* @arg opts: object with optional options. The following can be set:
* useUtf8 --> set to false if ascii encoding should be used
* strict --> set to true in order to throw errors instead of skipping error parts
* @return: array containing all converted values, empty if no value set
*/
Copper.CoapMessage.Option.prototype.getValue = function(opts) {
let ascii = opts !== undefined && opts.useUtf8 === false;
let strict = opts !== undefined && opts.strict === true;
let val = this.val;
if (val.length === 0){
return [];
}
else {
let Types = Copper.CoapMessage.OptionHeader;
let res = [];
for (let i=0; i<val.length; i++){
switch(this.header.type) {
case Types.TYPE_EMPTY:
res.push(null);
break;
case Types.TYPE_OPAQUE:
res.push(Copper.ByteUtils.convertBytesToHexString(val[i]));
break;
case Types.TYPE_STRING:
res.push(Copper.ByteUtils.convertBytesToString(val[i], undefined, undefined, ascii, strict));
break;
case Types.TYPE_UINT:
res.push(Copper.ByteUtils.convertBytesToUint(val[i]));
break;
case Types.TYPE_BLOCK:
res.push(Copper.CoapMessage.BlockOption.convertUintToBlockOption(
Copper.ByteUtils.convertBytesToUint(val[i])));
break;
default:
throw new Error("Unknown Type");
}
}
return res;
}
};
|
import {Bend} from '../../src/Cirsim/Bend';
describe('Bend', function() {
it('Construct', function() {
var b = new Bend();
expect(b.x).toBe(0);
expect(b.y).toBe(0);
});
});
|