text
stringlengths
3
1.05M
import React, { Component } from 'react'; import { Text, TouchableWithoutFeedback, View } from 'react-native'; import { Actions } from 'react-native-router-flux'; import { CardSection } from './common'; class ListItem extends Component { onRowPress() { Actions.employeeEdit({ employee: this.props.employee }); } render() { const { name } = this.props.employee; return ( <TouchableWithoutFeedback onPress={this.onRowPress.bind(this)}> <View> <CardSection> <Text style={styles.titleStyle}>{name}</Text> </CardSection> </View> </TouchableWithoutFeedback> ); } } const styles = { titleStyle: { fontSize: 18, paddingLeft: 15 } }; export default ListItem;
### tensorflow==2.3.0 import tensorflow as tf import coremltools as ct #mlmodel = ct.convert('saved_model_deeplab_v3_plus_mnv2_aspp_decoder_256', source='tensorflow') #mlmodel.save("deeplab_v3_plus_mnv2_aspp_decoder_256_float32.mlmodel") mlmodel = ct.convert('saved_model_deeplab_v3_plus_mnv2_decoder_256', source='tensorflow') mlmodel.save("deeplab_v3_plus_mnv2_decoder_256_float32.mlmodel") #mlmodel = ct.convert('saved_model_deeplab_v3_plus_mnv2_decoder_513', source='tensorflow') #mlmodel.save("deeplab_v3_plus_mnv2_decoder_513_float32.mlmodel") #mlmodel = ct.convert('saved_model_deeplab_v3_plus_mnv3_decoder_256', source='tensorflow') #mlmodel.save("deeplab_v3_plus_mnv3_decoder_256_float32.mlmodel")
import os from pnet import utils, measure import theano.tensor as T import numpy as np if __name__ == '__main__': # Options P = 1 model_type = 'PC-FCN.P_{}'.format(P) network_type = 'pc_fcn' test_measure_type = 'auc_y_classwise' # test_measure_type = 'ap_y_classwise' # Dirs and fps model_dir = os.path.join('data/MagnaTagATune/models', model_type) # Downloading data to this dir exp_data_dir = 'data/MagnaTagATune/exp_data/' print(model_type) # Network options network_type = 'pc_fcn' pl_seg_size = 32 network_options = { 'early_conv_dict': { 'conv_filter_list': [(64, 8, 1)], 'pool_filter_list': [4], 'pool_stride_list': [None] }, 'middle_conv_dict': { 'conv_filter_list': [(3200, 1, 1)], 'pool_filter_list': [pl_seg_size], 'pool_stride_list': [None], }, 'pl_dict': { 'num_lambda': P, 'num_points': 10, 'value_range': (0, 5), 'seg_size': pl_seg_size, 'seg_step': pl_seg_size }, 'late_conv_dict': { 'conv_filter_list': [(512, 1), (512, 1)], 'pool_filter_list': [None, None], 'pool_stride_list': [None, None], }, 'dense_filter_size': 1, 'final_pool_function': T.mean, 'input_size': 128, 'output_size': 50, 'p_dropout': 0.5 } # Load data X_te, y_te = utils.load_data('te', exp_data_dir=exp_data_dir, use_real_data=True) # Make network network, input_var, pr_func = utils.make_network_test( network_type, network_options ) fn_list = sorted(os.listdir(model_dir)) score_list = list() for fn in fn_list: print('Processing model {}'.format(fn)) param_fp = os.path.join(model_dir, fn) # Load params utils.load_model(param_fp, network) # Predict pred_list_raw = utils.predict( X_te, pr_func ) pred_all_raw = np.vstack(pred_list_raw) pred_all = pred_all_raw anno_all = y_te # out_dict = dict() measure_func = getattr(measure, test_measure_type) score = measure_func(anno_all, pred_all) print('Model {}: {}'.format(fn, score.mean())) score_list.append(score.mean()) print('Average: {}'.format(np.mean(score_list)))
/*====================================================================* * * Copyright (c) 2013 Qualcomm Atheros, Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or * without modification, are permitted (subject to the limitations * in the disclaimer below) provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * * Neither the name of Qualcomm Atheros nor the names of * its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. * * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE * COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER * 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. * *--------------------------------------------------------------------*/ /*====================================================================* * * signed PushButton (struct plc * plc); * * plc.h * * THis plugin for program plc emulates pushbutton functionality * using a MS_PB_ENC message; * * * Contributor(s): * Charles Maier * *--------------------------------------------------------------------*/ #ifndef PUSHBUTTON_SOURCE #define PUSHBUTTON_SOURCE #include <stdint.h> #include <memory.h> #include "../tools/error.h" #include "../tools/memory.h" #include "../plc/plc.h" signed PushButton (struct plc * plc) { struct channel * channel = (struct channel *)(plc->channel); struct message * message = (struct message *)(plc->message); #ifndef __GNUC__ #pragma pack (push,1) #endif struct __packed ms_pb_enc_request { struct ethernet_hdr ethernet; struct homeplug_hdr homeplug; uint8_t PBACTION; } * request = (struct ms_pb_enc_request *) (message); struct __packed ms_pb_enc_confirm { struct ethernet_hdr ethernet; struct homeplug_hdr homeplug; uint8_t MSTATUS; uint8_t AVLNSTAT; } * confirm = (struct ms_pb_enc_confirm *) (message); #ifndef __GNUC__ #pragma pack (pop) #endif if (plc->pushbutton == 1) { Request (plc, "Join Network"); } if (plc->pushbutton == 2) { Request (plc, "Leave Network"); } if (plc->pushbutton == 3) { Request (plc, "Fetch Network Status"); } memset (message, 0, sizeof (* message)); EthernetHeader (&request->ethernet, channel->peer, channel->host, channel->type); request->homeplug.MMV = 0; request->homeplug.MMTYPE = HTOLE16 (MS_PB_ENC | MMTYPE_REQ); request->PBACTION = plc->pushbutton; plc->packetsize = (ETHER_MIN_LEN - ETHER_CRC_LEN); if (SendMME (plc) <= 0) { error (PLC_EXIT (plc), errno, CHANNEL_CANTSEND); return (-1); } if (ReadMFG (plc, 0, (MS_PB_ENC | MMTYPE_CNF)) <= 0) { error (PLC_EXIT (plc), errno, CHANNEL_CANTREAD); return (-1); } if (confirm->MSTATUS) { Failure (plc, PLC_WONTDOIT); return (-1); } if (plc->pushbutton == 1) { Confirm (plc, "Joining ..."); return (0); } if (plc->pushbutton == 2) { Confirm (plc, "Leaving ..."); return (0); } if (plc->pushbutton == 3) { Confirm (plc, "Membership Status %d", confirm->AVLNSTAT); return (0); } Failure (plc, "Unexpected pushbutton action code"); return (-1); } #endif
#!/usr/bin/python # -*- coding: utf-8 -*- """ MIT License Copyright (c) 2013-2016 Frantisek Uhrecky 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. """ import logging from DbController import DbController from PyQt4 import QtGui import sys from MainWindow import MainWindow import os from LoginDialog import LoginDialog import AppSettings import TransController import shutil import time def ifNotExCreate(directory): """ If does not exists dir, create it. @param directory: directory to check and create """ if (not os.path.exists(AppSettings.decodePath(directory))): # missing data dir logging.info("creating dir: '%s'", directory) os.makedirs(AppSettings.decodePath(directory)) def main(): app = QtGui.QApplication(sys.argv) logging.info("Absolute app root: '%s'", AppSettings.APP_ABS_ROOT) # set application icon app.setWindowIcon(QtGui.QIcon(AppSettings.APP_ICON_PATH)) # create neccessary paths if missing ifNotExCreate(AppSettings.TMP_PATH) ifNotExCreate(AppSettings.BACKUP_PATH) ifNotExCreate(AppSettings.DATA_PATH) ifNotExCreate(AppSettings.DB_PATH) ifNotExCreate(AppSettings.ICONS_PATH) # preapare languages AppSettings.writeLanguage("sk") AppSettings.LANG = AppSettings.readLanguage() TransController.loadTranslation("sk") TransController.loadTranslation("en") # DB controller instance db_con = DbController() # login dialog instance login_dialog = LoginDialog(db_con) db_path = AppSettings.readDbFilePath() logging.info("DB path: '%s'", db_path) if (not os.path.exists(AppSettings.decodePath(db_path))): # if default DB file doesnt exists, run create DB dialog login_dialog.enLogIn(False) else: # leave only last 10 backups backups = sorted(os.listdir(AppSettings.BACKUP_PATH), reverse=True) if len(backups) >= 10: for i in range(9, len(backups)): os.remove(AppSettings.BACKUP_PATH + backups[i]) # first backup database backup_file = AppSettings.BACKUP_PATH + time.strftime("%Y-%m-%dT%H:%M:%S_", time.localtime()) + os.path.basename(db_path) logging.info("backup file: '%s'", backup_file) shutil.copyfile(AppSettings.decodePath(db_path), AppSettings.decodePath(backup_file)) login_dialog.show() w = MainWindow(db_con) # when succesfully logged load main window login_dialog.signalSuccessfullyLogged.connect(w.setUserReloadShow) sys.exit(app.exec_()) if (__name__ == "__main__"): logging.basicConfig(format='[%(asctime)s] %(levelname)s::%(module)s::%(funcName)s() %(message)s', level=logging.WARNING) main()
/** * Created by Vadym Yatsyuk on 24.08.17 */ const Router = require('express').Router; const request = require('request'); const config = require('../../../config'); const News = require('./news.model'); const Comment = require('./comment.model'); const SORT_TYPES = require('./sort-types'); let router = new Router(); function handleError(res, statusCode) { statusCode = statusCode || 500; return function(err) { res.status(statusCode).send(err); }; } function handleEntityNotFound(res) { return function(entity) { if (!entity) { res.status(404).end(); return null; } return entity; }; } function getSort(sort) { if (SORT_TYPES.TOP === sort) { return { likes: -1 } } return { createdAt: -1 }; } router.get('/', (req, res) => { let pageSize = 20; let sort = getSort(req.query.sort); let page = parseInt(req.query.page, 10) || 1; News.find() .sort(sort) .skip((page - 1) * pageSize) .limit(pageSize) .select('_id title nickname likes link comments createdAt') .lean() .execAsync() .then(news => { news.forEach(item => { item.comments = item.comments.length; }); res.status(200).json(news); }) .catch(handleError(res, 400)); }); router.get('/:id', (req, res) => { News.findById(req.params.id) .select('_id title nickname likes link comments createdAt') .lean() .execAsync() .then(handleEntityNotFound(res)) .then(news => { if (news) { news.comments = news.comments.length; res.status(200).json(news); } }) .catch(handleError(res, 400)); }); router.get('/:id/comments', (req, res) => { let pageSize = 20; let page = parseInt(req.query.page, 10) || 1; News.findByIdAsync(req.params.id) .then(handleEntityNotFound(res)) .then(news => { if (!news) { return null; } Comment.find({ news: news._id, parentComment: null }) .skip((page - 1) * pageSize) .limit(pageSize) .populate('comments') .execAsync() .then(comments => { res.status(200).json(comments); }) .catch(handleError(res, 400)); }) .catch(handleError(res, 400)); }); router.put('/:id/likes', (req, res) => { News.findOneAndUpdate({ _id: req.params.id }, { $inc: { likes: 1 } }, (err, news) => { if (err) { res.status(400).end(); return null; } res.status(200).json(news); }); }); router.post('/', (req, res) => { News.createAsync({ title: req.body.title, link: req.body.link, nickname: req.body.nickname }) .then(news => { res.status(200).json(news); sendNotification(news); }) .catch(handleError(res, 400)); }); router.post('/:id/comments', (req, res) => { News.findByIdAsync(req.params.id) .then(handleEntityNotFound(res)) .then(news => { if (!news) { return null; } Comment.createAsync({ nickname: req.body.nickname, content: req.body.content, news: news._id, comments: [] }) .then(comment => { news.comments.push(comment._id); news.saveAsync() .then(() => { res.status(200).json(comment); }) .catch(handleError(res, 400)); }) .catch(handleError(res, 400)); }) .catch(handleError(res, 400)); }); router.post('/:id/comments/:commentId', (req, res) => { Comment.findOneAsync({ _id: req.params.commentId, news: req.params.id }) .then(handleEntityNotFound(res)) .then(parentComment => { if (!parentComment) { return null; } Comment.createAsync({ nickname: req.body.nickname, content: req.body.content, news: parentComment.news, parentComment: parentComment._id, comments: [] }) .then(comment => { parentComment.comments.push(comment._id); parentComment.saveAsync() .then(() => { res.status(200).json(comment); }) .catch(handleError(res, 400)); }) .catch(handleError(res, 400)); }) .catch(handleError(res, 400)); }); module.exports = router; function sendNotification(news) { request({ url: 'https://onesignal.com/api/v1/notifications', method: 'POST', headers: { 'content-type': 'application/json', "Authorization": `Basic ${ config.oneSignal.token }` }, body: JSON.stringify({ app_id: config.oneSignal.app_id, contents: { en: `New ite: "${ news.title }"` }, included_segments: ["All"] }) }, (err, response, body) => { if (!err) { } }); }
""" Main file for quail carotenoid data """ # import modules import ANDfunctions_Main as m # main function def main(): headers = "" bird, except_files, list_except, alt_calc, outfile_name = m.storeData() m.modifyData(bird, except_files, list_except, alt_calc) m.getOutput(bird, headers, outfile_name) if __name__ == "__main__": main()
// Copyright (c) 2019 Tim Perkins // Licensed under an MIT style license, see LICENSE.md for details. // You are free to copy and modify this code. Happy hacking! #include "grid_engine/engine.h" #include "SDL2/SDL.h" #include "grid_engine/log.h" static void abort_on_null(const void* ptr); static uint32_t pixel_rbga(uint8_t pixel_value); static void destroy_engine_sdl(); typedef struct ge_engine { bool inited; const ge_grid_t* grid; ge_gfx_opts_t gfx_opts; bool has_window; SDL_Window* sdl_window; SDL_Renderer* sdl_renderer; SDL_Texture* sdl_texture; bool should_quit; } ge_engine_t; // clang-format off #define GE_ENGINE_DEFAULTS_K { \ .inited = false, \ .grid = NULL, \ .gfx_opts = GE_GFX_OPTS_DEFAULTS_K, \ .has_window = false, \ .sdl_window = NULL, \ .should_quit = false, \ } // clang-format on const ge_gfx_opts_t GE_GFX_OPTS_DEFAULTS = GE_GFX_OPTS_DEFAULTS_K; static const ge_engine_t GE_ENGINE_DEFAULTS = GE_ENGINE_DEFAULTS_K; // TODO Calculating this from a ratio might be better? static const size_t GE_SCREEN_BORDER = 100; static ge_engine_t ge_engine = GE_ENGINE_DEFAULTS_K; ge_error_t ge_init(void) { if (ge_engine.inited) { return GE_ERROR_ALREADY_INITED; } GE_LOG_INFO("Grid engine initializing!"); if (SDL_Init(SDL_INIT_VIDEO) != 0) { return GE_ERROR_ENGINE_INIT; } ge_engine = GE_ENGINE_DEFAULTS; ge_engine.inited = true; return GE_OK; } void ge_quit(void) { if (!ge_engine.inited) { return; } GE_LOG_INFO("Grid engine is exiting!"); SDL_Quit(); ge_engine.inited = false; } ge_error_t ge_set_grid(const ge_grid_t* grid) { abort_on_null(grid); if (!ge_engine.inited) { return GE_ERROR_NOT_INITED; } ge_engine.grid = grid; return GE_OK; } ge_error_t ge_set_gfx_opts(const ge_gfx_opts_t* gfx_opts) { abort_on_null(gfx_opts); if (!ge_engine.inited) { return GE_ERROR_NOT_INITED; } ge_engine.gfx_opts = *gfx_opts; return GE_OK; } size_t ge_auto_detect_pixel_multiplier(void) { const size_t FALLBACK_PIXEL_MULTIPLIER = 1; if (!ge_engine.inited) { return FALLBACK_PIXEL_MULTIPLIER; } else if (!ge_engine.grid) { return FALLBACK_PIXEL_MULTIPLIER; } SDL_Rect disp_rect; if (SDL_GetDisplayBounds(0, &disp_rect) != 0) { return FALLBACK_PIXEL_MULTIPLIER; } // Check minimum screen size if ((size_t) disp_rect.w < 3 * GE_SCREEN_BORDER || (size_t) disp_rect.h < 3 * GE_SCREEN_BORDER) { return FALLBACK_PIXEL_MULTIPLIER; } // Essentially the size of the screen divided by the number of grid pixels const size_t grid_width = ge_grid_get_width(ge_engine.grid); const size_t grid_height = ge_grid_get_height(ge_engine.grid); const size_t width_px_mul = (disp_rect.w - 2 * GE_SCREEN_BORDER) / grid_width; const size_t height_px_mul = (disp_rect.h - 2 * GE_SCREEN_BORDER) / grid_height; const size_t min_px_mul = (width_px_mul < height_px_mul ? width_px_mul : height_px_mul); return (min_px_mul != 0 ? min_px_mul : 1); } ge_error_t ge_create_window() { if (!ge_engine.inited) { return GE_ERROR_NOT_INITED; } else if (ge_engine.has_window) { return GE_ERROR_ALREADY_HAS_WINDOW; } else if (!ge_engine.grid) { return GE_ERROR_NO_GRID_SET; } GE_LOG_INFO("Grid engine window being created!"); const size_t width = ge_grid_get_width(ge_engine.grid); const size_t height = ge_grid_get_height(ge_engine.grid); const size_t window_width = width * ge_engine.gfx_opts.pixel_multiplier; const size_t window_height = height * ge_engine.gfx_opts.pixel_multiplier; ge_engine.sdl_window = SDL_CreateWindow(ge_engine.gfx_opts.window_name, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, window_width, window_height, 0); if (ge_engine.sdl_window == NULL) { return GE_ERROR_CREATE_WINDOW; } ge_engine.sdl_renderer = SDL_CreateRenderer(ge_engine.sdl_window, -1, 0); if (ge_engine.sdl_renderer == NULL) { destroy_engine_sdl(); return GE_ERROR_CREATE_WINDOW; } if (SDL_RenderSetLogicalSize(ge_engine.sdl_renderer, width, height) != 0) { destroy_engine_sdl(); return GE_ERROR_CREATE_WINDOW; } SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "nearest"); ge_engine.sdl_texture = SDL_CreateTexture(ge_engine.sdl_renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_STREAMING, width, height); if (ge_engine.sdl_texture == NULL) { destroy_engine_sdl(); return GE_ERROR_CREATE_WINDOW; } SDL_SetRenderDrawColor(ge_engine.sdl_renderer, 0, 0, 0, 255); if (SDL_RenderClear(ge_engine.sdl_renderer) != 0) { destroy_engine_sdl(); return GE_ERROR_CREATE_WINDOW; } SDL_RenderPresent(ge_engine.sdl_renderer); ge_engine.has_window = true; return GE_OK; } ge_error_t ge_destroy_window() { if (!ge_engine.inited) { return GE_ERROR_NOT_INITED; } else if (!ge_engine.has_window) { return GE_ERROR_NO_WINDOW; } GE_LOG_INFO("Grid engine window being destroyed!"); destroy_engine_sdl(); ge_engine.has_window = false; return GE_OK; } ge_error_t ge_redraw_window() { if (!ge_engine.inited) { return GE_ERROR_NOT_INITED; } else if (!ge_engine.has_window) { return GE_ERROR_NO_WINDOW; } const size_t width = ge_grid_get_width(ge_engine.grid); const size_t height = ge_grid_get_height(ge_engine.grid); const uint8_t* const pixel_arr = ge_grid_get_pixel_arr(ge_engine.grid); void* tex_pixel_arr_raw = NULL; int tex_pitch_b = 0; if (SDL_LockTexture(ge_engine.sdl_texture, NULL, &tex_pixel_arr_raw, &tex_pitch_b) != 0) { return GE_ERROR_DRAWING; } uint8_t* const tex_pixel_arr = tex_pixel_arr_raw; for (size_t jj = 0; jj < height; jj++) { uint32_t* const tex_pixel_row = (uint32_t*) &tex_pixel_arr[tex_pitch_b * jj]; for (size_t ii = 0; ii < width; ii++) { uint32_t* const tex_pixel = &tex_pixel_row[ii]; const uint8_t pixel_value = pixel_arr[jj * width + ii]; *tex_pixel = pixel_rbga(pixel_value); } } SDL_UnlockTexture(ge_engine.sdl_texture); if (SDL_RenderClear(ge_engine.sdl_renderer) != 0) { return GE_ERROR_DRAWING; } if (SDL_RenderCopy(ge_engine.sdl_renderer, ge_engine.sdl_texture, NULL, NULL) != 0) { return GE_ERROR_DRAWING; } SDL_RenderPresent(ge_engine.sdl_renderer); return GE_OK; } bool ge_poll_events(ge_event_t* event) { if (!ge_engine.inited) { return false; } SDL_Event sdl_event; while (SDL_PollEvent(&sdl_event)) { if (sdl_event.type == SDL_QUIT) { // Handle quiting, but this isn't a GE event GE_LOG_INFO("Grid engine going to quit!"); ge_engine.should_quit = true; } else if (ge_fill_event(event, &sdl_event)) { // If this is a GE event, we are done return true; } } return false; } bool ge_should_quit(void) { return ge_engine.should_quit; } uint32_t ge_get_time_ms(void) { return SDL_GetTicks(); } void ge_sleep_ms(uint32_t duration_ms) { SDL_Delay(duration_ms); } static void abort_on_null(const void* ptr) { if (ptr == NULL) { GE_LOG_ERROR("Null pointer!"); abort(); } } #if SDL_BYTEORDER == SDL_LIL_ENDIAN #define RGBA_R_SHIFT 24 #define RGBA_G_SHIFT 16 #define RGBA_B_SHIFT 8 #define RGBA_A_SHIFT 0 #else #define RGBA_R_SHIFT 0 #define RGBA_G_SHIFT 8 #define RGBA_B_SHIFT 16 #define RGBA_A_SHIFT 24 #endif static uint32_t pixel_rbga(uint8_t pixel_value) { // Assumes texture format is SDL_PIXELFORMAT_RGBA8888 return ((pixel_value << RGBA_R_SHIFT) | (pixel_value << RGBA_G_SHIFT) | (pixel_value << RGBA_B_SHIFT) | (255 << RGBA_A_SHIFT)); } #undef RGBA_R_SHIFT #undef RGBA_G_SHIFT #undef RGBA_B_SHIFT #undef RGBA_A_SHIFT static void destroy_engine_sdl() { if (ge_engine.sdl_texture) { SDL_DestroyTexture(ge_engine.sdl_texture); } if (ge_engine.sdl_renderer) { SDL_DestroyRenderer(ge_engine.sdl_renderer); } if (ge_engine.sdl_window) { SDL_DestroyWindow(ge_engine.sdl_window); } ge_engine.sdl_texture = NULL; ge_engine.sdl_renderer = NULL; ge_engine.sdl_window = NULL; }
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * Discover the ID of installed cast extension. * @constructor * @struct */ function CastExtensionDiscoverer() {} /** * Tentatice IDs to try. * @type {!Array<string>} * @const */ CastExtensionDiscoverer.CAST_EXTENSION_IDS = [ 'pkedcjkdefgpdelpbcmbmeomcjbeemfm', // MR official 'boadgeojelhgndaghljhdicfkmllpafd', // release 'dliochdbjfkdbacpmhlcpmleaejidimm', // beta 'enhhojjnijigcajfphajepfemndkmdlo', // dev 'fmfcbgogabcbclcofgocippekhfcmgfj', // staging 'fjhoaacokmgbjemoflkofnenfaiekifl' // stable used during MR development. ]; /** * @param {function(?string)} callback Callback called with the extension ID. * The ID may be null if extension is not found. */ CastExtensionDiscoverer.findInstalledExtension = function(callback) { CastExtensionDiscoverer.findInstalledExtensionHelper_(0, callback); }; /** * @param {number} index Current index which is tried to check. * @param {function(?string)} callback Callback function which will be called * the extension is found. * @private */ CastExtensionDiscoverer.findInstalledExtensionHelper_ = function(index, callback) { if (index === CastExtensionDiscoverer.CAST_EXTENSION_IDS.length) { // no extension found. callback(null); return; } CastExtensionDiscoverer.isExtensionInstalled_( CastExtensionDiscoverer.CAST_EXTENSION_IDS[index], function(installed) { if (installed) { callback(CastExtensionDiscoverer.CAST_EXTENSION_IDS[index]); } else { CastExtensionDiscoverer.findInstalledExtensionHelper_(index + 1, callback); } }); }; /** * The result will be notified on |callback|. True if installed, false not. * @param {string} extensionId Id to be checked. * @param {function(boolean)} callback Callback to notify the result. * @private */ CastExtensionDiscoverer.isExtensionInstalled_ = function(extensionId, callback) { var xhr = new XMLHttpRequest(); var url = 'chrome-extension://' + extensionId + '/cast_sender.js'; xhr.open('GET', url, true); xhr.onerror = function() { callback(false); }; /** @param {*} event */ xhr.onreadystatechange = function(event) { if (xhr.readyState == 4 && xhr.status === 200) { // Cast extension found. callback(true); } }.wrap(this); xhr.send(); };
import React, { useState } from 'react'; export default function Main (props) { return ( <div> <h1 style={{marginLeft: "25px", marginTop: "40px"}}>Coming soon</h1> </div> ); }
global head global yawModifier global pitchModifier global rollModifier def update(): global head global yaw yaw = yawModifier*filters.continuousRotation(head.yaw) global pitch pitch = pitchModifier*filters.continuousRotation(head.pitch) global roll roll = rollModifier*filters.continuousRotation(head.roll) global x x = head.x global y y = head.y global z z = head.z if starting: head = OSVR.head() yawModifier = 1.0 pitchModifier = -1.0 rollModifier = 1.0 centerYaw = 0 centerPitch = 0 centerRoll = 0 centerX = 0 centerY = 0 centerZ = 0 yaw = 0 pitch = 0 roll = 0 x = 0 y = 0 z = 0 freeTrack.roll = roll - centerRoll freeTrack.yaw = yaw - centerYaw freeTrack.pitch = pitch - centerPitch freeTrack.x = x - centerX freeTrack.y = y - centerY freeTrack.z = z - centerZ update() if keyboard.getKeyDown(Key.LeftControl) and keyboard.getPressed(Key.C): centerYaw = yaw centerPitch = pitch centerRoll = roll centerX = x centerY = y centerZ = z if keyboard.getKeyDown(Key.PageDown): yawModifier *= -1 if keyboard.getKeyDown(Key.PageUp): pitchModifier *= -1 if keyboard.getKeyDown(Key.Home): rollModifier *= -1 diagnostics.watch(freeTrack.yaw) diagnostics.watch(freeTrack.pitch) diagnostics.watch(freeTrack.roll) diagnostics.watch(freeTrack.x) diagnostics.watch(freeTrack.y) diagnostics.watch(freeTrack.z) diagnostics.watch(yawModifier) diagnostics.watch(pitchModifier) diagnostics.watch(rollModifier)
/* * BlueALSA - bluealsa-dbus.c * Copyright (c) 2016-2020 Arkadiusz Bokowy * * This file is a part of bluez-alsa. * * This project is licensed under the terms of the MIT license. * */ #include "bluealsa-dbus.h" #include <errno.h> #include <fcntl.h> #include <pthread.h> #include <stdbool.h> #include <stdint.h> #include <string.h> #include <sys/socket.h> #include <unistd.h> #include <bluetooth/hci.h> #include <gio/gio.h> #include <gio/gunixfdlist.h> #include <glib-object.h> #include <glib.h> #include "a2dp.h" #include "a2dp-codecs.h" #include "ba-adapter.h" #include "ba-device.h" #include "bluealsa-iface.h" #include "bluealsa.h" #include "dbus.h" #include "hfp.h" #include "utils.h" #include "shared/defs.h" #include "shared/log.h" static GVariant *ba_variant_new_device_path(const struct ba_device *d) { return g_variant_new_object_path(d->bluez_dbus_path); } static GVariant *ba_variant_new_device_battery(const struct ba_device *d) { return g_variant_new_byte(d->battery_level); } static GVariant *ba_variant_new_transport_type(const struct ba_transport *t) { if (t->type.profile & BA_TRANSPORT_PROFILE_A2DP_SOURCE) return g_variant_new_string(BLUEALSA_TRANSPORT_TYPE_A2DP_SOURCE); if (t->type.profile & BA_TRANSPORT_PROFILE_A2DP_SINK) return g_variant_new_string(BLUEALSA_TRANSPORT_TYPE_A2DP_SINK); if (t->type.profile & BA_TRANSPORT_PROFILE_HFP_AG) return g_variant_new_string(BLUEALSA_TRANSPORT_TYPE_HFP_AG); if (t->type.profile & BA_TRANSPORT_PROFILE_HFP_HF) return g_variant_new_string(BLUEALSA_TRANSPORT_TYPE_HFP_HF); if (t->type.profile & BA_TRANSPORT_PROFILE_HSP_AG) return g_variant_new_string(BLUEALSA_TRANSPORT_TYPE_HSP_AG); if (t->type.profile & BA_TRANSPORT_PROFILE_HSP_HS) return g_variant_new_string(BLUEALSA_TRANSPORT_TYPE_HSP_HS); warn("Unsupported transport type: %#x", t->type.profile); return g_variant_new_string("<null>"); } static GVariant *ba_variant_new_rfcomm_features(const struct ba_rfcomm *r) { return g_variant_new_uint32(r->hfp_features); } static GVariant *ba_variant_new_pcm_mode(const struct ba_transport_pcm *pcm) { if (pcm->mode == BA_TRANSPORT_PCM_MODE_SOURCE) return g_variant_new_string(BLUEALSA_PCM_MODE_SOURCE); return g_variant_new_string(BLUEALSA_PCM_MODE_SINK); } static GVariant *ba_variant_new_pcm_format(const struct ba_transport_pcm *pcm) { return g_variant_new_uint16(pcm->format); } static GVariant *ba_variant_new_pcm_channels(const struct ba_transport_pcm *pcm) { return g_variant_new_byte(pcm->channels); } static GVariant *ba_variant_new_pcm_sampling(const struct ba_transport_pcm *pcm) { return g_variant_new_uint32(pcm->sampling); } static GVariant *ba_variant_new_pcm_codec(const struct ba_transport_pcm *pcm) { const struct ba_transport *t = pcm->t; const char *codec = NULL; if (t->type.profile & BA_TRANSPORT_PROFILE_MASK_A2DP) codec = ba_transport_codecs_a2dp_to_string(t->type.codec); if (t->type.profile & BA_TRANSPORT_PROFILE_MASK_SCO) codec = ba_transport_codecs_hfp_to_string(t->type.codec); if (codec != NULL) return g_variant_new_string(codec); return g_variant_new_string("<null>"); } static GVariant *ba_variant_new_pcm_delay(const struct ba_transport_pcm *pcm) { return g_variant_new_uint16(ba_transport_pcm_get_delay(pcm)); } static GVariant *ba_variant_new_pcm_soft_volume(const struct ba_transport_pcm *pcm) { return g_variant_new_boolean(pcm->soft_volume); } static uint8_t ba_volume_pack_dbus_volume(bool muted, int value) { return (muted << 7) | (((uint8_t)value) & 0x7F); } static GVariant *ba_variant_new_pcm_volume(const struct ba_transport_pcm *pcm) { uint8_t ch1 = ba_volume_pack_dbus_volume(pcm->volume[0].muted, ba_transport_pcm_volume_level_to_bt(pcm, pcm->volume[0].level)); uint8_t ch2 = ba_volume_pack_dbus_volume(pcm->volume[1].muted, ba_transport_pcm_volume_level_to_bt(pcm, pcm->volume[1].level)); return g_variant_new_uint16((ch1 << 8) | (pcm->channels == 1 ? 0 : ch2)); } static void ba_variant_populate_pcm(GVariantBuilder *props, const struct ba_transport_pcm *pcm) { g_variant_builder_init(props, G_VARIANT_TYPE("a{sv}")); g_variant_builder_add(props, "{sv}", "Device", ba_variant_new_device_path(pcm->t->d)); g_variant_builder_add(props, "{sv}", "Transport", ba_variant_new_transport_type(pcm->t)); g_variant_builder_add(props, "{sv}", "Mode", ba_variant_new_pcm_mode(pcm)); g_variant_builder_add(props, "{sv}", "Format", ba_variant_new_pcm_format(pcm)); g_variant_builder_add(props, "{sv}", "Channels", ba_variant_new_pcm_channels(pcm)); g_variant_builder_add(props, "{sv}", "Sampling", ba_variant_new_pcm_sampling(pcm)); g_variant_builder_add(props, "{sv}", "Codec", ba_variant_new_pcm_codec(pcm)); g_variant_builder_add(props, "{sv}", "Delay", ba_variant_new_pcm_delay(pcm)); g_variant_builder_add(props, "{sv}", "SoftVolume", ba_variant_new_pcm_soft_volume(pcm)); g_variant_builder_add(props, "{sv}", "Volume", ba_variant_new_pcm_volume(pcm)); } static bool ba_variant_populate_sep(GVariantBuilder *props, const struct a2dp_sep *sep) { const struct a2dp_codec *codec; if ((codec = a2dp_codec_lookup(sep->codec_id, !sep->dir)) == NULL) return false; uint8_t caps[32]; size_t size = MIN(sep->capabilities_size, sizeof(caps)); if (a2dp_filter_capabilities(codec, memcpy(caps, sep->capabilities, size), size) != 0) { error("Couldn't filter %s capabilities: %s", ba_transport_codecs_a2dp_to_string(sep->codec_id), strerror(errno)); return false; } g_variant_builder_init(props, G_VARIANT_TYPE("a{sv}")); GVariantBuilder vcaps; g_variant_builder_init(&vcaps, G_VARIANT_TYPE("ay")); size_t i; for (i = 0; i < size; i++) g_variant_builder_add(&vcaps, "y", caps[i]); g_variant_builder_add(props, "{sv}", "Capabilities", g_variant_builder_end(&vcaps)); switch (codec->codec_id) { case A2DP_CODEC_SBC: break; #if ENABLE_MPEG case A2DP_CODEC_MPEG12: break; #endif #if ENABLE_AAC case A2DP_CODEC_MPEG24: break; #endif #if ENABLE_APTX case A2DP_CODEC_VENDOR_APTX: break; #endif #if ENABLE_APTX_HD case A2DP_CODEC_VENDOR_APTX_HD: break; #endif #if ENABLE_FASTSTREAM case A2DP_CODEC_VENDOR_FASTSTREAM: break; #endif #if ENABLE_LDAC case A2DP_CODEC_VENDOR_LDAC: break; #endif #if FHG_USAC_IN_A2DP #if ENABLE_USAC case A2DP_CODEC_MPEGD: break; #endif #endif /* FHG_USAC_IN_A2DP */ default: g_assert_not_reached(); } return true; } static void bluealsa_manager_get_pcms(GDBusMethodInvocation *inv) { GVariantBuilder pcms; g_variant_builder_init(&pcms, G_VARIANT_TYPE("a{oa{sv}}")); struct ba_adapter *a; size_t i; for (i = 0; i < HCI_MAX_DEV; i++) { if ((a = ba_adapter_lookup(i)) == NULL) continue; GHashTableIter iter_d, iter_t; GVariantBuilder props; struct ba_device *d; struct ba_transport *t; pthread_mutex_lock(&a->devices_mutex); g_hash_table_iter_init(&iter_d, a->devices); while (g_hash_table_iter_next(&iter_d, NULL, (gpointer)&d)) { pthread_mutex_lock(&d->transports_mutex); g_hash_table_iter_init(&iter_t, d->transports); while (g_hash_table_iter_next(&iter_t, NULL, (gpointer)&t)) { if (t->type.profile & BA_TRANSPORT_PROFILE_MASK_A2DP) { ba_variant_populate_pcm(&props, &t->a2dp.pcm); g_variant_builder_add(&pcms, "{oa{sv}}", t->a2dp.pcm.ba_dbus_path, &props); g_variant_builder_clear(&props); } else if (t->type.profile & BA_TRANSPORT_PROFILE_MASK_SCO) { ba_variant_populate_pcm(&props, &t->sco.spk_pcm); g_variant_builder_add(&pcms, "{oa{sv}}", t->sco.spk_pcm.ba_dbus_path, &props); g_variant_builder_clear(&props); ba_variant_populate_pcm(&props, &t->sco.mic_pcm); g_variant_builder_add(&pcms, "{oa{sv}}", t->sco.mic_pcm.ba_dbus_path, &props); g_variant_builder_clear(&props); } } pthread_mutex_unlock(&d->transports_mutex); } pthread_mutex_unlock(&a->devices_mutex); ba_adapter_unref(a); } g_dbus_method_invocation_return_value(inv, g_variant_new("(a{oa{sv}})", &pcms)); g_variant_builder_clear(&pcms); } static void bluealsa_manager_method_call(GDBusConnection *conn, const char *sender, const char *path, const char *interface, const char *method, GVariant *params, GDBusMethodInvocation *invocation, void *userdata) { (void)conn; (void)params; (void)userdata; static const GDBusMethodCallDispatcher dispatchers[] = { { .method = "GetPCMs", .handler = bluealsa_manager_get_pcms }, { NULL }, }; if (!g_dbus_dispatch_method_call(dispatchers, sender, path, interface, method, invocation)) error("Couldn't dispatch D-Bus method call: %s.%s()", interface, method); } /** * Register BlueALSA D-Bus manager interface. */ unsigned int bluealsa_dbus_manager_register(GError **error) { static const GDBusInterfaceVTable vtable = { .method_call = bluealsa_manager_method_call }; return g_dbus_connection_register_object(config.dbus, "/org/bluealsa", (GDBusInterfaceInfo *)&bluealsa_iface_manager, &vtable, NULL, NULL, error); } static gboolean bluealsa_pcm_controller(GIOChannel *ch, GIOCondition condition, void *userdata) { (void)condition; struct ba_transport_pcm *pcm = (struct ba_transport_pcm *)userdata; struct ba_transport *t = pcm->t; char command[32]; size_t len; switch (g_io_channel_read_chars(ch, command, sizeof(command), &len, NULL)) { case G_IO_STATUS_ERROR: error("Couldn't read controller channel"); return TRUE; case G_IO_STATUS_NORMAL: if (strncmp(command, BLUEALSA_PCM_CTRL_DRAIN, len) == 0) { if (pcm->mode == BA_TRANSPORT_PCM_MODE_SINK) ba_transport_pcm_drain(pcm); g_io_channel_write_chars(ch, "OK", -1, &len, NULL); } else if (strncmp(command, BLUEALSA_PCM_CTRL_DROP, len) == 0) { if (pcm->mode == BA_TRANSPORT_PCM_MODE_SINK) ba_transport_pcm_drop(pcm); g_io_channel_write_chars(ch, "OK", -1, &len, NULL); } else if (strncmp(command, BLUEALSA_PCM_CTRL_PAUSE, len) == 0) { ba_transport_pcm_pause(pcm); g_io_channel_write_chars(ch, "OK", -1, &len, NULL); } else if (strncmp(command, BLUEALSA_PCM_CTRL_RESUME, len) == 0) { ba_transport_pcm_resume(pcm); g_io_channel_write_chars(ch, "OK", -1, &len, NULL); } else { warn("Invalid PCM control command: %*s", (int)len, command); g_io_channel_write_chars(ch, "Invalid", -1, &len, NULL); } g_io_channel_flush(ch, NULL); return TRUE; case G_IO_STATUS_AGAIN: return TRUE; case G_IO_STATUS_EOF: ba_transport_pcm_release(pcm); ba_transport_send_signal(t, BA_TRANSPORT_SIGNAL_PCM_CLOSE); /* remove channel from watch */ return FALSE; } return TRUE; } static void bluealsa_pcm_open(GDBusMethodInvocation *inv) { void *userdata = g_dbus_method_invocation_get_user_data(inv); struct ba_transport_pcm *pcm = (struct ba_transport_pcm *)userdata; const bool is_sink = pcm->mode == BA_TRANSPORT_PCM_MODE_SINK; struct ba_transport *t = pcm->t; int pcm_fds[4] = { -1, -1, -1, -1 }; bool locked = false; size_t i; /* preliminary check whether HFP codes is selected */ if (t->type.profile & BA_TRANSPORT_PROFILE_MASK_SCO && t->type.codec == HFP_CODEC_UNDEFINED) { g_dbus_method_invocation_return_error(inv, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "HFP audio codec not selected"); goto fail; } /* We must ensure that transport release is not in progress before * accessing transport critical section. Otherwise, we might have * the IO thread close it in the middle of open procedure! */ ba_transport_pthread_cleanup_lock(t); locked = true; if (pcm->fd != -1) { g_dbus_method_invocation_return_error(inv, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "%s", strerror(EBUSY)); goto fail; } /* create PCM stream PIPE and PCM control socket */ if (pipe2(&pcm_fds[0], O_CLOEXEC) == -1 || socketpair(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC | SOCK_NONBLOCK, 0, &pcm_fds[2]) == -1) { g_dbus_method_invocation_return_error(inv, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Create PIPE: %s", strerror(errno)); goto fail; } /* set our internal endpoint as non-blocking. */ if (fcntl(pcm_fds[is_sink ? 0 : 1], F_SETFL, O_NONBLOCK) == -1) { g_dbus_method_invocation_return_error(inv, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Setup PIPE: %s", strerror(errno)); goto fail; } /* Source profiles (A2DP Source and SCO Audio Gateway) should be initialized * only if the audio is about to be transferred. It is most likely, that BT * headset will not run voltage converter (power-on its circuit board) until * the transport is acquired in order to extend battery life. For profiles * like A2DP Sink and HFP headset, we will wait for incoming connection. */ if (t->type.profile & BA_TRANSPORT_PROFILE_A2DP_SOURCE || t->type.profile & BA_TRANSPORT_PROFILE_MASK_AG) if (t->acquire(t) == -1) { g_dbus_method_invocation_return_error(inv, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Acquire transport: %s", strerror(errno)); goto fail; } /* get correct PIPE endpoint - PIPE is unidirectional */ pcm->fd = pcm_fds[is_sink ? 0 : 1]; GIOChannel *ch = g_io_channel_unix_new(pcm_fds[2]); g_io_add_watch_full(ch, G_PRIORITY_DEFAULT, G_IO_IN, bluealsa_pcm_controller, ba_transport_pcm_ref(pcm), (GDestroyNotify)ba_transport_pcm_unref); g_io_channel_set_close_on_unref(ch, TRUE); g_io_channel_set_encoding(ch, NULL, NULL); g_io_channel_unref(ch); /* notify our IO thread that the FIFO is ready */ ba_transport_send_signal(t, BA_TRANSPORT_SIGNAL_PCM_OPEN); ba_transport_pthread_cleanup_unlock(t); ba_transport_pcm_unref(pcm); int fds[2] = { pcm_fds[is_sink ? 1 : 0], pcm_fds[3] }; GUnixFDList *fd_list = g_unix_fd_list_new_from_array(fds, 2); g_dbus_method_invocation_return_value_with_unix_fd_list(inv, g_variant_new("(hh)", 0, 1), fd_list); g_object_unref(fd_list); return; fail: if (locked) ba_transport_pthread_cleanup_unlock(t); ba_transport_pcm_unref(pcm); /* clean up created file descriptors */ for (i = 0; i < ARRAYSIZE(pcm_fds); i++) if (pcm_fds[i] != -1) close(pcm_fds[i]); } static void bluealsa_pcm_get_codecs(GDBusMethodInvocation *inv) { void *userdata = g_dbus_method_invocation_get_user_data(inv); struct ba_transport_pcm *pcm = (struct ba_transport_pcm *)userdata; const struct ba_transport *t = pcm->t; const GArray *seps = t->d->seps; GVariantBuilder codecs; g_variant_builder_init(&codecs, G_VARIANT_TYPE("a{sa{sv}}")); if (t->type.profile & BA_TRANSPORT_PROFILE_MASK_A2DP) { size_t i; for (i = 0; seps != NULL && i < seps->len; i++) { const struct a2dp_sep *sep = &g_array_index(seps, struct a2dp_sep, i); /* match complementary PCM directions, e.g. A2DP-source with SEP-sink */ if (t->a2dp.codec->dir == !sep->dir) { GVariantBuilder props; if (ba_variant_populate_sep(&props, sep)) { g_variant_builder_add(&codecs, "{sa{sv}}", ba_transport_codecs_a2dp_to_string(sep->codec_id), &props); g_variant_builder_clear(&props); } } } } else if (t->type.profile & BA_TRANSPORT_PROFILE_MASK_SCO) { g_variant_builder_add(&codecs, "{sa{sv}}", ba_transport_codecs_hfp_to_string(HFP_CODEC_CVSD), NULL); #if ENABLE_MSBC if (t->sco.rfcomm->msbc) g_variant_builder_add(&codecs, "{sa{sv}}", ba_transport_codecs_hfp_to_string(HFP_CODEC_MSBC), NULL); #endif } g_dbus_method_invocation_return_value(inv, g_variant_new("(a{sa{sv}})", &codecs)); g_variant_builder_clear(&codecs); ba_transport_pcm_unref(pcm); } static void bluealsa_pcm_select_codec(GDBusMethodInvocation *inv) { GVariant *params = g_dbus_method_invocation_get_parameters(inv); void *userdata = g_dbus_method_invocation_get_user_data(inv); struct ba_transport_pcm *pcm = (struct ba_transport_pcm *)userdata; struct ba_transport *t = pcm->t; GVariantIter *properties; GVariant *value = NULL; const char *errmsg = NULL; const char *property; const char *codec; void *a2dp_configuration = NULL; size_t a2dp_configuration_size = 0; g_variant_get(params, "(sa{sv})", &codec, &properties); while (g_variant_iter_next(properties, "{&sv}", &property, &value)) { if (strcmp(property, "Configuration") == 0 && g_variant_validate_value(value, G_VARIANT_TYPE_BYTESTRING, property)) { const void *data = g_variant_get_fixed_array(value, &a2dp_configuration_size, sizeof(char)); g_free(a2dp_configuration); a2dp_configuration = g_memdup(data, a2dp_configuration_size); } g_variant_unref(value); value = NULL; } if (t->type.profile & BA_TRANSPORT_PROFILE_MASK_A2DP) { /* support for Stream End-Points not enabled in BlueZ */ if (t->d->seps == NULL) { errmsg = "No BlueZ SEP support"; goto fail; } uint16_t codec_id = ba_transport_codecs_a2dp_from_string(codec); enum a2dp_dir dir = !t->a2dp.codec->dir; const GArray *seps = t->d->seps; struct a2dp_sep *sep = NULL; size_t i; for (i = 0; i < seps->len; i++) if (g_array_index(seps, struct a2dp_sep, i).dir == dir && g_array_index(seps, struct a2dp_sep, i).codec_id == codec_id) { sep = &g_array_index(seps, struct a2dp_sep, i); break; } /* requested codec not available */ if (sep == NULL) { errmsg = "SEP codec not available"; goto fail; } const struct a2dp_codec *codec; if ((codec = a2dp_codec_lookup(codec_id, !dir)) == NULL) { errmsg = "SEP codec not supported"; goto fail; } /* setup default codec configuration */ memcpy(sep->configuration, sep->capabilities, sep->capabilities_size); if (a2dp_select_configuration(codec, sep->configuration, sep->capabilities_size) == -1) goto fail; /* use codec configuration blob provided by user */ if (a2dp_configuration != NULL) { if (a2dp_check_configuration(codec, a2dp_configuration, a2dp_configuration_size) != A2DP_CHECK_OK) { errmsg = "Invalid configuration blob"; goto fail; } memcpy(sep->configuration, a2dp_configuration, sep->capabilities_size); } if (ba_transport_select_codec_a2dp(t, sep) == -1) goto fail; } else { uint16_t codec_id = ba_transport_codecs_hfp_from_string(codec); if (ba_transport_select_codec_sco(t, codec_id) == -1) goto fail; } g_dbus_method_invocation_return_value(inv, NULL); goto final; fail: if (errmsg == NULL) errmsg = strerror(errno); error("Couldn't select codec: %s: %s", codec, errmsg); g_dbus_method_invocation_return_error(inv, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "%s", errmsg); final: ba_transport_pcm_unref(pcm); g_free(a2dp_configuration); g_variant_iter_free(properties); if (value != NULL) g_variant_unref(value); } static void bluealsa_pcm_method_call(GDBusConnection *conn, const char *sender, const char *path, const char *interface, const char *method, GVariant *params, GDBusMethodInvocation *invocation, void *userdata) { (void)conn; (void)params; static const GDBusMethodCallDispatcher dispatchers[] = { { .method = "Open", .handler = bluealsa_pcm_open, .asynchronous_call = true }, { .method = "GetCodecs", .handler = bluealsa_pcm_get_codecs, .asynchronous_call = true }, { .method = "SelectCodec", .handler = bluealsa_pcm_select_codec, .asynchronous_call = true }, { NULL }, }; struct ba_transport_pcm *pcm = (struct ba_transport_pcm *)userdata; ba_transport_pcm_ref(pcm); if (!g_dbus_dispatch_method_call(dispatchers, sender, path, interface, method, invocation)) { error("Couldn't dispatch D-Bus method call: %s.%s()", interface, method); ba_transport_pcm_unref(pcm); } } static void bluealsa_rfcomm_open(GDBusMethodInvocation *inv) { void *userdata = g_dbus_method_invocation_get_user_data(inv); struct ba_rfcomm *r = (struct ba_rfcomm *)userdata; int fds[2] = { -1, -1 }; if (r->handler_fd != -1) { g_dbus_method_invocation_return_error(inv, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "%s", strerror(EBUSY)); return; } if (socketpair(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC | SOCK_NONBLOCK, 0, fds) == -1) { g_dbus_method_invocation_return_error(inv, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Create socket: %s", strerror(errno)); return; } r->handler_fd = fds[0]; ba_rfcomm_send_signal(r, BA_RFCOMM_SIGNAL_PING); GUnixFDList *fd_list = g_unix_fd_list_new_from_array(&fds[1], 1); g_dbus_method_invocation_return_value_with_unix_fd_list(inv, g_variant_new("(h)", 0), fd_list); g_object_unref(fd_list); } static void bluealsa_rfcomm_method_call(GDBusConnection *conn, const char *sender, const char *path, const char *interface, const char *method, GVariant *params, GDBusMethodInvocation *invocation, void *userdata) { (void)conn; (void)params; (void)userdata; static const GDBusMethodCallDispatcher dispatchers[] = { { .method = "Open", .handler = bluealsa_rfcomm_open }, { NULL }, }; if (!g_dbus_dispatch_method_call(dispatchers, sender, path, interface, method, invocation)) error("Couldn't dispatch D-Bus method call: %s.%s()", interface, method); } static GVariant *bluealsa_pcm_get_property(GDBusConnection *conn, const char *sender, const char *path, const char *interface, const char *property, GError **error, void *userdata) { (void)conn; (void)sender; (void)path; (void)interface; struct ba_transport_pcm *pcm = (struct ba_transport_pcm *)userdata; struct ba_device *d = pcm->t->d; if (strcmp(property, "Device") == 0) return ba_variant_new_device_path(d); if (strcmp(property, "Transport") == 0) return ba_variant_new_transport_type(pcm->t); if (strcmp(property, "Mode") == 0) return ba_variant_new_pcm_mode(pcm); if (strcmp(property, "Format") == 0) return ba_variant_new_pcm_format(pcm); if (strcmp(property, "Channels") == 0) return ba_variant_new_pcm_channels(pcm); if (strcmp(property, "Sampling") == 0) return ba_variant_new_pcm_sampling(pcm); if (strcmp(property, "Codec") == 0) return ba_variant_new_pcm_codec(pcm); if (strcmp(property, "Delay") == 0) return ba_variant_new_pcm_delay(pcm); if (strcmp(property, "SoftVolume") == 0) return ba_variant_new_pcm_soft_volume(pcm); if (strcmp(property, "Volume") == 0) return ba_variant_new_pcm_volume(pcm); *error = g_error_new(G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "Property not supported '%s'", property); return NULL; } static GVariant *bluealsa_rfcomm_get_property(GDBusConnection *conn, const char *sender, const char *path, const char *interface, const char *property, GError **error, void *userdata) { (void)conn; (void)sender; (void)path; (void)interface; struct ba_rfcomm *r = (struct ba_rfcomm *)userdata; struct ba_transport *t = r->sco; struct ba_device *d = t->d; if (strcmp(property, "Transport") == 0) return ba_variant_new_transport_type(t); if (strcmp(property, "Features") == 0) return ba_variant_new_rfcomm_features(r); if (strcmp(property, "Battery") == 0) return ba_variant_new_device_battery(d); *error = g_error_new(G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "Property not supported '%s'", property); return NULL; } static gboolean bluealsa_pcm_set_property(GDBusConnection *conn, const gchar *sender, const gchar *path, const gchar *interface, const gchar *property, GVariant *value, GError **error, gpointer userdata) { (void)conn; (void)sender; (void)path; (void)interface; struct ba_transport_pcm *pcm = (struct ba_transport_pcm *)userdata; if (strcmp(property, "SoftVolume") == 0) { pcm->soft_volume = g_variant_get_boolean(value); bluealsa_dbus_pcm_update(pcm, BA_DBUS_PCM_UPDATE_SOFT_VOLUME); return TRUE; } if (strcmp(property, "Volume") == 0) { uint16_t packed = g_variant_get_uint16(value); uint8_t ch1 = packed >> 8; uint8_t ch2 = packed & 0xFF; pcm->volume[0].level = ba_transport_pcm_volume_bt_to_level(pcm, ch1 & 0x7F); pcm->volume[0].muted = !!(ch1 & 0x80); pcm->volume[1].level = ba_transport_pcm_volume_bt_to_level(pcm, ch2 & 0x7F); pcm->volume[1].muted = !!(ch2 & 0x80); debug("Setting volume: %u [%.2f dB] %c%c %u [%.2f dB]", ch1 & 0x7F, 0.01 * pcm->volume[0].level, pcm->volume[0].muted ? 'x' : '<', pcm->volume[1].muted ? 'x' : '>', ch2 & 0x7F, 0.01 * pcm->volume[1].level); ba_transport_pcm_volume_update(pcm); return TRUE; } *error = g_error_new(G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "Property not supported '%s'", property); return FALSE; } /** * Register BlueALSA D-Bus PCM interface. */ unsigned int bluealsa_dbus_pcm_register(struct ba_transport_pcm *pcm, GError **error) { static const GDBusInterfaceVTable vtable = { .method_call = bluealsa_pcm_method_call, .get_property = bluealsa_pcm_get_property, .set_property = bluealsa_pcm_set_property, }; if ((pcm->ba_dbus_id = g_dbus_connection_register_object(config.dbus, pcm->ba_dbus_path, (GDBusInterfaceInfo *)&bluealsa_iface_pcm, &vtable, pcm, (GDestroyNotify)ba_transport_pcm_unref, error)) != 0) { ba_transport_pcm_ref(pcm); GVariantBuilder props; ba_variant_populate_pcm(&props, pcm); g_dbus_connection_emit_signal(config.dbus, NULL, "/org/bluealsa", BLUEALSA_IFACE_MANAGER, "PCMAdded", g_variant_new("(oa{sv})", pcm->ba_dbus_path, &props), NULL); g_variant_builder_clear(&props); } return pcm->ba_dbus_id; } void bluealsa_dbus_pcm_update(struct ba_transport_pcm *pcm, unsigned int mask) { GVariantBuilder props; g_variant_builder_init(&props, G_VARIANT_TYPE("a{sv}")); if (mask & BA_DBUS_PCM_UPDATE_FORMAT) g_variant_builder_add(&props, "{sv}", "Format", ba_variant_new_pcm_format(pcm)); if (mask & BA_DBUS_PCM_UPDATE_CHANNELS) g_variant_builder_add(&props, "{sv}", "Channels", ba_variant_new_pcm_channels(pcm)); if (mask & BA_DBUS_PCM_UPDATE_SAMPLING) g_variant_builder_add(&props, "{sv}", "Sampling", ba_variant_new_pcm_sampling(pcm)); if (mask & BA_DBUS_PCM_UPDATE_CODEC) g_variant_builder_add(&props, "{sv}", "Codec", ba_variant_new_pcm_codec(pcm)); if (mask & BA_DBUS_PCM_UPDATE_DELAY) g_variant_builder_add(&props, "{sv}", "Delay", ba_variant_new_pcm_delay(pcm)); if (mask & BA_DBUS_PCM_UPDATE_SOFT_VOLUME) g_variant_builder_add(&props, "{sv}", "SoftVolume", ba_variant_new_pcm_soft_volume(pcm)); if (mask & BA_DBUS_PCM_UPDATE_VOLUME) g_variant_builder_add(&props, "{sv}", "Volume", ba_variant_new_pcm_volume(pcm)); g_dbus_connection_emit_signal(config.dbus, NULL, pcm->ba_dbus_path, DBUS_IFACE_PROPERTIES, "PropertiesChanged", g_variant_new("(sa{sv}as)", BLUEALSA_IFACE_PCM, &props, NULL), NULL); g_variant_builder_clear(&props); } void bluealsa_dbus_pcm_unregister(struct ba_transport_pcm *pcm) { if (pcm->ba_dbus_id == 0) return; g_dbus_connection_unregister_object(config.dbus, pcm->ba_dbus_id); pcm->ba_dbus_id = 0; g_dbus_connection_emit_signal(config.dbus, NULL, "/org/bluealsa", BLUEALSA_IFACE_MANAGER, "PCMRemoved", g_variant_new("(o)", pcm->ba_dbus_path), NULL); } /** * Register BlueALSA D-Bus RFCOMM interface. */ unsigned int bluealsa_dbus_rfcomm_register(struct ba_rfcomm *r, GError **error) { static const GDBusInterfaceVTable vtable = { .method_call = bluealsa_rfcomm_method_call, .get_property = bluealsa_rfcomm_get_property, }; r->ba_dbus_id = g_dbus_connection_register_object(config.dbus, r->ba_dbus_path, (GDBusInterfaceInfo *)&bluealsa_iface_rfcomm, &vtable, r, NULL, error); return r->ba_dbus_id; } void bluealsa_dbus_rfcomm_update(struct ba_rfcomm *r, unsigned int mask) { GVariantBuilder props; g_variant_builder_init(&props, G_VARIANT_TYPE("a{sv}")); if (mask & BA_DBUS_RFCOMM_UPDATE_FEATURES) g_variant_builder_add(&props, "{sv}", "Features", ba_variant_new_rfcomm_features(r)); if (mask & BA_DBUS_RFCOMM_UPDATE_BATTERY) g_variant_builder_add(&props, "{sv}", "Battery", ba_variant_new_device_battery(r->sco->d)); g_dbus_connection_emit_signal(config.dbus, NULL, r->ba_dbus_path, DBUS_IFACE_PROPERTIES, "PropertiesChanged", g_variant_new("(sa{sv}as)", BLUEALSA_IFACE_RFCOMM, &props, NULL), NULL); g_variant_builder_clear(&props); } void bluealsa_dbus_rfcomm_unregister(struct ba_rfcomm *r) { if (r->ba_dbus_id == 0) return; g_dbus_connection_unregister_object(config.dbus, r->ba_dbus_id); r->ba_dbus_id = 0; }
let express = require( 'express' ); let app = express(); let server = require( 'http' ).Server( app ); let io = require( 'socket.io' )( server ); let stream = require( './ws/stream' ); let path = require( 'path' ); let favicon = require( 'serve-favicon' ); app.use( favicon( path.join( __dirname, 'favicon.ico' ) ) ); app.use( '/assets', express.static( path.join( __dirname, 'assets' ) ) ); app.get( '/', ( req, res ) => { res.sendFile( __dirname + '/index.html' ); } ); io.of( '/stream' ).on( 'connection', stream ); console.log("Server running...") server.listen( 3000 );
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strncat.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: yoelguer <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/04/02 12:09:23 by yoelguer #+# #+# */ /* Updated: 2019/04/18 00:05:07 by yoelguer ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" char *ft_strncat(char *s1, const char *s2, size_t n) { int i; size_t j; char *p_s2; i = 0; j = 0; p_s2 = (char*)s2; while (s1[i] != '\0') { i++; } while (p_s2[j] != '\0' && j < n) { s1[i] = p_s2[j]; i++; j++; } s1[i] = '\0'; return (s1); }
import EmberObject from '@ember/object'; import { assign } from '@ember/polyfills'; import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; import metadataRoutes from '../../../helpers/metadata-routes'; import Pretender from 'pretender'; const Response1 = { rows: [ { id: 1, description: 'foo', meta: 'ember' }, { id: 2, description: 'bar', meta: 'bard' }, { id: 3, description: 'gar', meta: 'navi' } ] }; const MetaObj = { meta: { pagination: { rowsPerPage: 3, numberOfResults: 3, currentPage: 1 } } }; const Response2 = assign(MetaObj, Response1); const Record1 = { id: 1, description: 'foo', meta: 'ember' }, Record2 = { id: 2, description: 'bar', meta: 'bard' }, Record3 = { id: 3, description: 'gar', meta: 'navi' }, Records = [Record1, Record2, Record3]; let Adapter, Keg, Server; module('Unit | Adapters | Dimensions | Keg', function(hooks) { setupTest(hooks); hooks.beforeEach(function() { this.owner.register('model:dimension/dimensionOne', EmberObject.extend({ name: 'dimensionOne' })); Adapter = this.owner.lookup('adapter:dimensions/keg'); Keg = Adapter.get('keg'); Keg.pushMany('dimension/dimensionOne', Records); //Load metadata Server = new Pretender(metadataRoutes); return this.owner.lookup('service:bard-metadata').loadMetadata(); }); hooks.afterEach(function() { Server.shutdown(); }); test('_buildResponse', function(assert) { assert.expect(2); assert.deepEqual( Adapter._buildResponse(Records), Response1, '_buildResponse correctly built the response for the provided records' ); assert.deepEqual( Adapter._buildResponse(Records, { page: 1, perPage: 3 }), Response2, '_buildResponse correctly built the response with pagination options for the provided records' ); }); test('all', function(assert) { assert.expect(1); return Adapter.all('dimensionOne').then(result => { assert.deepEqual( result.rows.mapBy('id'), [1, 2, 3], 'all() contains the expected response object for Test dimension without any filters' ); }); }); test('find', function(assert) { assert.expect(2); assert.throws( () => { Adapter.find('dimensionOne', { operator: 'contains' }); }, /Only 'in' operation is currently supported in Keg/, 'throws error when doing a contains search, which is not supported yet' ); return Adapter.find('dimensionOne', { field: 'description', values: 'bar,gar' }).then(result => { assert.deepEqual( result.rows.mapBy('id'), [2, 3], 'find() returns expected response using navi-data query object interface.' ); }); }); test('findById', function(assert) { assert.expect(1); return Adapter.findById('dimensionOne', '1').then(result => { assert.deepEqual( result.get('id'), 1, 'findById() returns the expected response object for Test dimension, identifierField and query' ); }); }); test('getById', function(assert) { assert.expect(3); assert.deepEqual( Adapter.getById('unknownDimensionName', '1'), undefined, 'getById() returns undefined for an unknown dimension' ); assert.deepEqual( Adapter.getById('dimensionOne', 'unkownDimensionId'), undefined, 'getById() returns undefined for an known dimension with an unknown id' ); assert.deepEqual( Adapter.getById('dimensionOne', '1').get('id'), 1, 'getById() returns the expected response object for Test dimension, identifierField and query' ); }); test('pushMany', function(assert) { assert.expect(2); Adapter.pushMany('dimensionOne', [{ id: 22, foo: 'bar' }, { id: 44, foo: 'baz' }]); let { foo: bar } = Keg.getById('dimension/dimensionOne', 22); assert.deepEqual(bar, 'bar', 'pushMany stores records into the keg'); let { foo: baz } = Keg.getById('dimension/dimensionOne', 44); assert.deepEqual(baz, 'baz', 'pushMany stores records into the keg'); }); });
#!/usr/bin/env python3 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. import gc import os import statistics import sys import textwrap import time from argparse import Namespace from operator import attrgetter import click MAX_DAG_RUNS_ALLOWED = 1 class ShortCircuitExecutorMixin: """ Mixin class to manage the scheduler state during the performance test run. """ def __init__(self, dag_ids_to_watch, num_runs): super().__init__() self.num_runs_per_dag = num_runs self.reset(dag_ids_to_watch) def reset(self, dag_ids_to_watch): """ Capture the value that will determine when the scheduler is reset. """ self.dags_to_watch = { dag_id: Namespace( waiting_for=self.num_runs_per_dag, # A "cache" of DagRun row, so we don't have to look it up each # time. This is to try and reduce the impact of our # benchmarking code on runtime, runs={}, ) for dag_id in dag_ids_to_watch } def change_state(self, key, state, info=None): """ Change the state of scheduler by waiting till the tasks is complete and then shut down the scheduler after the task is complete """ from airflow.utils.state import State super().change_state(key, state, info=info) dag_id, _, execution_date, __ = key if dag_id not in self.dags_to_watch: return # This fn is called before the DagRun state is updated, so we can't # check the DR.state - so instead we need to check the state of the # tasks in that run run = self.dags_to_watch[dag_id].runs.get(execution_date) if not run: import airflow.models # odd `list()` is to work across Airflow versions. run = list(airflow.models.DagRun.find(dag_id=dag_id, execution_date=execution_date))[0] self.dags_to_watch[dag_id].runs[execution_date] = run if run and all(t.state == State.SUCCESS for t in run.get_task_instances()): self.dags_to_watch[dag_id].runs.pop(execution_date) self.dags_to_watch[dag_id].waiting_for -= 1 if self.dags_to_watch[dag_id].waiting_for == 0: self.dags_to_watch.pop(dag_id) if not self.dags_to_watch: self.log.warning("STOPPING SCHEDULER -- all runs complete") self.scheduler_job.processor_agent._done = True return self.log.warning( "WAITING ON %d RUNS", sum(map(attrgetter('waiting_for'), self.dags_to_watch.values())) ) def get_executor_under_test(dotted_path): """ Create and return a MockExecutor """ from airflow.executors.executor_loader import ExecutorLoader if dotted_path == "MockExecutor": from tests.test_utils.mock_executor import MockExecutor as executor else: executor = ExecutorLoader.load_executor(dotted_path) executor_cls = type(executor) # Change this to try other executors class ShortCircuitExecutor(ShortCircuitExecutorMixin, executor_cls): """ Placeholder class that implements the inheritance hierarchy """ scheduler_job = None return ShortCircuitExecutor def reset_dag(dag, session): """ Delete all dag and task instances and then un_pause the Dag. """ import airflow.models DR = airflow.models.DagRun DM = airflow.models.DagModel TI = airflow.models.TaskInstance TF = airflow.models.TaskFail dag_id = dag.dag_id session.query(DM).filter(DM.dag_id == dag_id).update({'is_paused': False}) session.query(DR).filter(DR.dag_id == dag_id).delete() session.query(TI).filter(TI.dag_id == dag_id).delete() session.query(TF).filter(TF.dag_id == dag_id).delete() def pause_all_dags(session): """ Pause all Dags """ from airflow.models.dag import DagModel session.query(DagModel).update({'is_paused': True}) def create_dag_runs(dag, num_runs, session): """ Create `num_runs` of dag runs for sub-sequent schedules """ from airflow.utils import timezone from airflow.utils.state import State try: from airflow.utils.types import DagRunType id_prefix = f'{DagRunType.SCHEDULED.value}__' except ImportError: from airflow.models.dagrun import DagRun id_prefix = DagRun.ID_PREFIX last_dagrun_data_interval = None for _ in range(num_runs): next_info = dag.next_dagrun_info(last_dagrun_data_interval) logical_date = next_info.logical_date dag.create_dagrun( run_id=f"{id_prefix}{logical_date.isoformat()}", execution_date=logical_date, start_date=timezone.utcnow(), state=State.RUNNING, external_trigger=False, session=session, ) last_dagrun_data_interval = next_info.data_interval @click.command() @click.option('--num-runs', default=1, help='number of DagRun, to run for each DAG') @click.option('--repeat', default=3, help='number of times to run test, to reduce variance') @click.option( '--pre-create-dag-runs', is_flag=True, default=False, help='''Pre-create the dag runs and stop the scheduler creating more. Warning: this makes the scheduler do (slightly) less work so may skew your numbers. Use sparingly! ''', ) @click.option( '--executor-class', default='MockExecutor', help=textwrap.dedent( ''' Dotted path Executor class to test, for example 'airflow.executors.local_executor.LocalExecutor'. Defaults to MockExecutor which doesn't run tasks. ''' ), ) @click.argument('dag_ids', required=True, nargs=-1) def main(num_runs, repeat, pre_create_dag_runs, executor_class, dag_ids): """ This script can be used to measure the total "scheduler overhead" of Airflow. By overhead we mean if the tasks executed instantly as soon as they are executed (i.e. they do nothing) how quickly could we schedule them. It will monitor the task completion of the Mock/stub executor (no actual tasks are run) and after the required number of dag runs for all the specified dags have completed all their tasks, it will cleanly shut down the scheduler. The dags you run with need to have an early enough start_date to create the desired number of runs. Care should be taken that other limits (DAG max_active_tasks, pool size etc) are not the bottleneck. This script doesn't help you in that regard. It is recommended to repeat the test at least 3 times (`--repeat=3`, the default) so that you can get somewhat-accurate variance on the reported timing numbers, but this can be disabled for longer runs if needed. """ # Turn on unit test mode so that we don't do any sleep() in the scheduler # loop - not needed on main, but this script can run against older # releases too! os.environ['AIRFLOW__CORE__UNIT_TEST_MODE'] = 'True' os.environ['AIRFLOW__CORE__MAX_ACTIVE_TASKS_PER_DAG'] = '500' # Set this so that dags can dynamically configure their end_date os.environ['AIRFLOW_BENCHMARK_MAX_DAG_RUNS'] = str(num_runs) os.environ['PERF_MAX_RUNS'] = str(num_runs) if pre_create_dag_runs: os.environ['AIRFLOW__SCHEDULER__USE_JOB_SCHEDULE'] = 'False' from airflow.jobs.scheduler_job import SchedulerJob from airflow.models.dagbag import DagBag from airflow.utils import db dagbag = DagBag() dags = [] with db.create_session() as session: pause_all_dags(session) for dag_id in dag_ids: dag = dagbag.get_dag(dag_id) dag.sync_to_db(session=session) dags.append(dag) reset_dag(dag, session) next_info = dag.next_dagrun_info(None) for _ in range(num_runs - 1): next_info = dag.next_dagrun_info(next_info.data_interval) end_date = dag.end_date or dag.default_args.get('end_date') if end_date != next_info.logical_date: message = ( f"DAG {dag_id} has incorrect end_date ({end_date}) for number of runs! " f"It should be " f" {next_info.logical_date}" ) sys.exit(message) if pre_create_dag_runs: create_dag_runs(dag, num_runs, session) ShortCircuitExecutor = get_executor_under_test(executor_class) executor = ShortCircuitExecutor(dag_ids_to_watch=dag_ids, num_runs=num_runs) scheduler_job = SchedulerJob(dag_ids=dag_ids, do_pickle=False, executor=executor) executor.scheduler_job = scheduler_job total_tasks = sum(len(dag.tasks) for dag in dags) if 'PYSPY' in os.environ: pid = str(os.getpid()) filename = os.environ.get('PYSPY_O', 'flame-' + pid + '.html') os.spawnlp(os.P_NOWAIT, 'sudo', 'sudo', 'py-spy', 'record', '-o', filename, '-p', pid, '--idle') times = [] # Need a lambda to refer to the _latest_ value for scheduler_job, not just # the initial one code_to_test = lambda: scheduler_job.run() for count in range(repeat): gc.disable() start = time.perf_counter() code_to_test() times.append(time.perf_counter() - start) gc.enable() print("Run %d time: %.5f" % (count + 1, times[-1])) if count + 1 != repeat: with db.create_session() as session: for dag in dags: reset_dag(dag, session) executor.reset(dag_ids) scheduler_job = SchedulerJob(dag_ids=dag_ids, do_pickle=False, executor=executor) executor.scheduler_job = scheduler_job print() print() msg = "Time for %d dag runs of %d dags with %d total tasks: %.4fs" if len(times) > 1: print( (msg + " (±%.3fs)") % (num_runs, len(dags), total_tasks, statistics.mean(times), statistics.stdev(times)) ) else: print(msg % (num_runs, len(dags), total_tasks, times[0])) print() print() if __name__ == "__main__": main()
var searchData= [ ['offset',['offset',['../structHashing_1_1Address.html#a5fdf9448c3cd7f359bc205af025d0a44',1,'Hashing::Address']]], ['overflow',['overflow',['../structBlock.html#a1237d54d9931ab568c6560b4142765bc',1,'Block::overflow()'],['../structHashing_1_1Address.html#a615264c23722dbcef607000ba2b5f445',1,'Hashing::Address::overflow()']]], ['overflowarea',['OverflowArea',['../structHashing_1_1OverflowArea.html',1,'Hashing::OverflowArea'],['../structHashing_1_1OverflowArea.html#ac81881ba9462c56b4055920424c2564b',1,'Hashing::OverflowArea::OverflowArea()'],['../structHashing_1_1OverflowArea.html#ab42729d835e8c990455a3fcd77fca563',1,'Hashing::OverflowArea::OverflowArea(const char *path)']]] ];
from .monkey_meadow import MonkeyMeadow
"""Deep learning and Reinforcement learning library for Researchers and Engineers""" from __future__ import absolute_import try: install_instr = "Please make sure you install a recent enough version of TensorFlow." import tensorflow except ImportError: raise ImportError("__init__.py : Could not import TensorFlow." + install_instr) from . import activation from . import cost from . import files from . import iterate from . import layers from . import models from . import utils from . import visualize from . import prepro from . import nlp from . import rein from . import distributed # alias act = activation vis = visualize __version__ = "1.8.4" global_flag = {} global_dict = {}
/* * Copyright (c) 2017-2020, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause * */ #include "ps_tests.h" #include <stdio.h> #include "psa/protected_storage.h" #include "tfm_memory_utils.h" #include "s_test_helpers.h" #include "test_framework_helpers.h" /* Test UIDs */ #define TEST_UID 2UL /* UID 1 cannot be used as it references a write once * asset, created in psa_ps_s_interface_testsuite.c */ /* Test suite defines */ #define LOOP_ITERATIONS_001 15U #define LOOP_ITERATIONS_002 15U /* Write data */ #define WRITE_DATA "THE_FIVE_BOXING_WIZARDS_JUMP_QUICKLY" #define WRITE_DATA_SIZE (sizeof(WRITE_DATA) - 1) #define READ_DATA "############################################" #define RESULT_DATA ("####" WRITE_DATA "####") /* Define test suite for PS reliability tests */ /* List of tests */ static void tfm_ps_test_2001(struct test_result_t *ret); static void tfm_ps_test_2002(struct test_result_t *ret); static struct test_t reliability_tests[] = { {&tfm_ps_test_2001, "TFM_S_PS_TEST_2001", "repetitive sets and gets in/from an asset", {TEST_PASSED} }, {&tfm_ps_test_2002, "TFM_S_PS_TEST_2002", "repetitive sets, gets and removes", {TEST_PASSED} }, }; void register_testsuite_s_psa_ps_reliability(struct test_suite_t *p_test_suite) { uint32_t list_size = (sizeof(reliability_tests) / sizeof(reliability_tests[0])); set_testsuite("PS reliability tests (TFM_PS_TEST_3XXX)", reliability_tests, list_size, p_test_suite); } /** * \brief Tests repetitive sets and gets in/from an asset. */ static void tfm_ps_test_2001(struct test_result_t *ret) { psa_status_t status; const psa_storage_uid_t uid = TEST_UID; const psa_storage_create_flags_t flags = PSA_STORAGE_FLAG_NONE; const uint32_t data_len = WRITE_DATA_SIZE; const uint32_t offset = 0; uint32_t itr; const uint8_t write_data[] = WRITE_DATA; uint8_t read_data[] = READ_DATA; size_t read_data_len = 0; for (itr = 0; itr < LOOP_ITERATIONS_001; itr++) { TEST_LOG(" > Iteration %d of %d\r", itr + 1, LOOP_ITERATIONS_001); /* Set a data in the asset */ status = psa_ps_set(uid, data_len, write_data, flags); if (status != PSA_SUCCESS) { TEST_FAIL("Set should not fail with valid UID"); return; } /* Get data from the asset */ status = psa_ps_get(uid, offset, data_len, (read_data + HALF_PADDING_SIZE), &read_data_len); if (status != PSA_SUCCESS) { TEST_FAIL("Get should not fail"); return; } /* Check that the data has not changed */ if (tfm_memcmp(read_data, RESULT_DATA, sizeof(read_data)) != 0) { TEST_FAIL("The data should not have changed"); return; } /* Set the original data into read buffer */ tfm_memcpy(read_data, READ_DATA, sizeof(read_data)); } TEST_LOG("\n"); /* Remove the asset to clean up storage for the next test */ status = psa_ps_remove(uid); if (status != PSA_SUCCESS) { TEST_FAIL("Remove should not fail with valid UID"); return; } ret->val = TEST_PASSED; } /** * \brief Tests repetitive sets, gets and removes. */ static void tfm_ps_test_2002(struct test_result_t *ret) { psa_status_t status; const psa_storage_uid_t uid = TEST_UID; const psa_storage_create_flags_t flags = PSA_STORAGE_FLAG_NONE; const uint32_t data_len = WRITE_DATA_SIZE; const uint32_t offset = 0; uint32_t itr; const uint8_t write_data[] = WRITE_DATA; uint8_t read_data[] = READ_DATA; size_t read_data_len = 0; for (itr = 0; itr < LOOP_ITERATIONS_002; itr++) { TEST_LOG(" > Iteration %d of %d\r", itr + 1, LOOP_ITERATIONS_002); /* Set a data in the asset */ status = psa_ps_set(uid, data_len, write_data, flags); if (status != PSA_SUCCESS) { TEST_FAIL("Set should not fail with valid UID"); return; } /* Get data from the asset */ status = psa_ps_get(uid, offset, data_len, (read_data + HALF_PADDING_SIZE), &read_data_len); if (status != PSA_SUCCESS) { TEST_FAIL("Get should not fail"); return; } /* Check that the data has not changed */ if (tfm_memcmp(read_data, RESULT_DATA, sizeof(read_data)) != 0) { TEST_FAIL("The data should not have changed"); return; } /* Remove the asset from the protected storage */ status = psa_ps_remove(uid); if (status != PSA_SUCCESS) { TEST_FAIL("Remove should not fail with valid UID"); return; } /* Set the original data into read buffer */ tfm_memcpy(read_data, READ_DATA, sizeof(read_data)); } TEST_LOG("\n"); ret->val = TEST_PASSED; }
$traceurRuntime.ModuleStore.getAnonymousModule(function() { "use strict"; angular.module("kao.page-title", []).service("PageTitle", function($window, $interpolate) { var getTitle = function(template, scope) { var title = template; if (typeof scope !== "undefined" && scope !== null) { title = $interpolate(template)(scope); } return title; }; this.set = function(template, scope) { var title = getTitle(template, scope); $window.document.title = title; }; }).provider("FormattedPageTitle", function() { var format = void 0; var isSetup = false; this.setFormat = function(templateFormat) { format = templateFormat; isSetup = true; }; this.$get = function($interpolate, PageTitle) { var FormattedPageTitle = function() {}; FormattedPageTitle.prototype.isSetup = function() { return isSetup; }; FormattedPageTitle.prototype.format = function(scope) { return $interpolate(format)(scope); }; FormattedPageTitle.prototype.set = function(scope) { return PageTitle.set(format, scope); }; return new FormattedPageTitle(); }; }); return {}; });
""" This file contains all high-level functionality for preprocessing sequencing data into character matrices ready for phylogenetic inference. This file is mainly invoked by cassiopeia_preprocess.py. """ import warnings from functools import partial import os from pathlib import Path import time from typing import List, Optional, Tuple, Union from Bio import SeqIO from joblib import delayed import matplotlib.pyplot as plt import ngs_tools as ngs import numpy as np import pandas as pd import pysam from tqdm.auto import tqdm from typing_extensions import Literal from cassiopeia.mixins import logger, PreprocessError from cassiopeia.mixins.warnings import PreprocessWarning from cassiopeia.preprocess import ( alignment_utilities, constants, map_utils, doublet_utils, lineage_utils, UMI_utils, utilities, ) DNA_SUBSTITUTION_MATRIX = constants.DNA_SUBSTITUTION_MATRIX BAM_CONSTANTS = constants.BAM_CONSTANTS progress = tqdm @logger.namespaced("convert") @utilities.log_kwargs @utilities.log_runtime def convert_fastqs_to_unmapped_bam( fastq_fps: List[str], chemistry: Literal["dropseq", "10xv2", "10xv3", "indropsv3", "slideseq2"], output_directory: str, name: Optional[str] = None, n_threads: int = 1, ) -> str: """Converts FASTQs into an unmapped BAM based on a chemistry. This function converts a set of FASTQs into an unmapped BAM with appropriate BAM tags. Args: fastq_fps: List of paths to FASTQ files. Usually, this argument contains two FASTQs, where the first contains the barcode and UMI sequences and the second contains cDNA. The FASTQs may be gzipped. chemistry: Sample-prep/sequencing chemistry used. The following chemistries are supported: * dropseq: Droplet-based scRNA-seq chemistry described in Macosco et al. 2015 * 10xv2: 10x Genomics 3' version 2 * 10xv3: 10x Genomics 3' version 3 * indropsv3: inDrops version 3 by Zilionis et al. 2017 * slideseq2: Slide-seq version 2 output_directory: The output directory where the unmapped BAM will be written to. This directory must exist prior to calling this function. name: Name of the reads in the FASTQs. This name is set as the read group name for the reads in the output BAM, as well as the filename prefix of the output BAM. If not provided, a short random UUID is used as the read group name, but not as the filename prefix of the BAM. n_threads: Number of threads to use. Defaults to 1. Returns: Path to written BAM Raises: PreprocessError if the provided chemistry does not exist. """ if chemistry not in constants.CHEMISTRY_BAM_TAGS: raise PreprocessError(f"Unknown chemistry {chemistry}") tag_map = constants.CHEMISTRY_BAM_TAGS[chemistry] chemistry = ngs.chemistry.get_chemistry(chemistry) logger.info(f"Using {chemistry} chemistry.") bam_fp = os.path.join( output_directory, f"{name}_unmapped.bam" if name else "unmapped.bam" ) ngs.fastq.fastqs_to_bam_with_chemistry( fastq_fps, chemistry, tag_map, bam_fp, name=name, show_progress=True, n_threads=n_threads, ) return bam_fp @logger.namespaced("filter_bam") @utilities.log_kwargs @utilities.log_runtime def filter_bam( bam_fp: str, output_directory: str, quality_threshold: int = 10, n_threads: int = 1, ) -> str: """Filter reads in a BAM that have low quality barcode or UMIs. Args: bam_fp: Input BAM filepath containing reads to filter. output_directory: The output directory where the filtered BAM will be written to. This directory must exist prior to calling this function. quality_threshold: Every base of the barcode and UMI sequence for a given read must have at least this PHRED quality score for it to pass the filtering. n_threads: Number of threads to use. Defaults to 1. Returns: Path to filtered BAM """ n_filtered = 0 def filter_func(aln): # False means this read will be filtered out filter_bool = all( q >= quality_threshold for q in pysam.qualitystring_to_array( aln.get_tag(BAM_CONSTANTS["RAW_CELL_BC_QUALITY_TAG"]) ) ) and all( q >= quality_threshold for q in pysam.qualitystring_to_array( aln.get_tag(BAM_CONSTANTS["UMI_QUALITY_TAG"]) ) ) nonlocal n_filtered n_filtered += not filter_bool return filter_bool prefix, ext = os.path.splitext(os.path.basename(bam_fp)) filtered_fp = os.path.join(output_directory, f"{prefix}_filtered{ext}") ngs.bam.filter_bam( bam_fp, filter_func, filtered_fp, show_progress=True, n_threads=n_threads, ) logger.info(f"Filtered {n_filtered} reads that didn't pass the filter.") return filtered_fp @logger.namespaced("error_correct_cellbcs_to_whitelist") @utilities.log_kwargs @utilities.log_runtime def error_correct_cellbcs_to_whitelist( bam_fp: str, whitelist: Union[str, List[str]], output_directory: str, n_threads: int = 1, ) -> str: """Error-correct cell barcodes in the input BAM. The barcode correction procedure used in Cell Ranger by 10X Genomics is used. https://kb.10xgenomics.com/hc/en-us/articles/115003822406-How-does-Cell-Ranger-correct-barcode-sequencing-errors This function can either take a list of whitelisted barcodes or a plaintext file containing these barcodes. Args: bam_fp: Input BAM filepath containing raw barcodes whitelist: May be either a single path to a plaintext file containing the barcode whitelist, one barcode per line, or a list of barcodes. output_directory: The output directory where the corrected BAM will be written to. This directory must exist prior to calling this function. n_threads: Number of threads to use. Defaults to 1. Todo: Currently, the user must provide their own whitelist, and Cassiopeia does not use any of the whitelists provided by the ngs-tools library. At some point, we should update the pipeline so that if ngs-tools provides a pre-packaged whitelists, it uses that for those chemistries. Returns: Path to corrected BAM """ if isinstance(whitelist, list): whitelist_set = set(whitelist) else: with open(whitelist, "r") as f: whitelist_set = set( line.strip() for line in f if not line.isspace() ) whitelist = list(whitelist_set) # Extract all raw barcodes and their qualities barcodes = [] qualities = [] with pysam.AlignmentFile( bam_fp, "rb", check_sq=False, threads=n_threads ) as f: for read in f: barcodes.append(read.get_tag(BAM_CONSTANTS["RAW_CELL_BC_TAG"])) qualities.append( read.get_tag(BAM_CONSTANTS["RAW_CELL_BC_QUALITY_TAG"]) ) logger.info(f"Detected {len(set(barcodes))} raw barcodes.") # Correct corrections = ngs.sequence.correct_sequences_to_whitelist( barcodes, qualities, whitelist, show_progress=True, n_threads=n_threads ) # Write corrected BAM prefix, ext = os.path.splitext(os.path.basename(bam_fp)) corrected_fp = os.path.join(output_directory, f"{prefix}_corrected{ext}") with pysam.AlignmentFile( bam_fp, "rb", check_sq=False, threads=n_threads ) as f_in: with pysam.AlignmentFile( corrected_fp, "wb", template=f_in, threads=n_threads ) as f_out: for i, read in enumerate(f_in): if corrections[i]: read.set_tag(BAM_CONSTANTS["CELL_BC_TAG"], corrections[i]) f_out.write(read) return corrected_fp @logger.namespaced("collapse") @utilities.log_kwargs @utilities.log_runtime def collapse_umis( bam_fp: str, output_directory: str, max_hq_mismatches: int = 3, max_indels: int = 2, method: Literal["cutoff", "likelihood"] = "cutoff", n_threads: int = 1, ) -> pd.DataFrame: """Collapses close UMIs together from a bam file. On a basic level, it aggregates together identical or close reads to count how many times a UMI was read. Performs basic error correction, allowing UMIs to be collapsed together which differ by at most a certain number of high quality mismatches and indels in the sequence read itself. Writes out a dataframe of the collapsed UMIs table. Args: bam_file_name: File path of the bam_file. Just the bam file name can be specified if the bam already exists in the output directory output_directory: The output directory where the sorted bam directory, the collapsed bam directory, and the final collapsed table are written to max_hq_mismatches: A threshold specifying the max number of high quality mismatches between the seqeunces of 2 aligned segments to be collapsed max_indels: A threshold specifying the maximum number of differing indels allowed between the sequences of 2 aligned segments to be collapsed method: Which method to use to form initial sequence clusters. Must be one of the following: * cutoff: Uses a quality score hard cutoff of 30, and any mismatches below this quality are ignored. Initial sequence clusters are formed by selecting the most common base at each position (with quality at least 30). * likelihood: Utilizes the error probability encoded in the quality score. Initial sequence clusters are formed by selecting the most probable at each position. n_threads: Number of threads to use. Returns: A DataFrame of collapsed reads. """ # pathing written such that the bam file that is being converted does not # have to exist currently in the output directory if output_directory[-1] == "/": output_directory = output_directory[:-1] sorted_file_name = Path( output_directory + "/" + ".".join(bam_fp.split("/")[-1].split(".")[:-1]) + "_sorted.bam" ) cell_bc_tag = UMI_utils.detect_cell_bc_tag(bam_fp) logger.info(f"Using BAM tag `{cell_bc_tag}` as cell barcodes") max_read_length, total_reads_out = UMI_utils.sort_bam( bam_fp, str(sorted_file_name), sort_key=lambda al: ( al.get_tag(cell_bc_tag), al.get_tag(BAM_CONSTANTS["UMI_TAG"]), ), filter_func=lambda al: al.has_tag(cell_bc_tag), ) logger.info("Sorted bam directory saved to " + str(sorted_file_name)) logger.info("Max read length of " + str(max_read_length)) logger.info("Total reads: " + str(total_reads_out)) collapsed_file_name = sorted_file_name.with_suffix(".collapsed.bam") UMI_utils.form_collapsed_clusters( str(sorted_file_name), str(collapsed_file_name), max_hq_mismatches, max_indels, cell_key=lambda al: al.get_tag(cell_bc_tag), method=method, n_threads=n_threads, ) collapsed_df_file_name = sorted_file_name.with_suffix(".collapsed.txt") df = utilities.convert_bam_to_df(str(collapsed_file_name)) df.to_csv(str(collapsed_df_file_name), sep="\t", index=False) logger.info("Collapsed bam directory saved to " + str(collapsed_file_name)) logger.info("Converted dataframe saved to " + str(collapsed_df_file_name)) return df @logger.namespaced("resolve") @utilities.log_kwargs @utilities.log_runtime def resolve_umi_sequence( molecule_table: pd.DataFrame, output_directory: str, min_umi_per_cell: int = 10, min_avg_reads_per_umi: float = 2.0, plot: bool = True, ) -> pd.DataFrame: """Resolve a consensus sequence for each UMI. This procedure will perform UMI and cellBC filtering on the basis of reads per UMI and UMIs per cell and then assign the most abundant sequence to each UMI if there is a set of conflicting sequences per UMI. Args: molecule_table: molecule table to resolve output_directory: Directory to store results min_umi_per_cell: The threshold specifying the minimum number of UMIs in a cell needed to be retained during filtering min_avg_reads_per_umi: The threshold specifying the minimum coverage (i.e. average) reads per UMI in a cell needed for that cell to be retained during filtering Returns: A molecule table with unique mappings between cellBC-UMI pairs. """ if plot: # -------------------- Plot # of sequences per UMI -------------------- # equivClass_group = ( molecule_table.groupby(["cellBC", "UMI"]) .agg({"grpFlag": "count"}) .sort_values("grpFlag", ascending=False) .reset_index() ) _ = plt.figure(figsize=(8, 5)) plt.hist( equivClass_group["grpFlag"], bins=range(1, equivClass_group["grpFlag"].max()), ) plt.title("Unique Seqs per cellBC+UMI") plt.yscale("log", basey=10) plt.xlabel("Number of Unique Seqs") plt.ylabel("Count (Log)") plt.savefig(os.path.join(output_directory, "seqs_per_equivClass.png")) plt.close() # ----------------- Select most abundant sequence ------------------ # mt_filter = {} total_numReads = {} top_reads = {} second_reads = {} first_reads = {} unique_pairs = molecule_table.groupby(["cellBC", "UMI"], sort=False) for _, group in tqdm( unique_pairs, total=len(unique_pairs.size()), desc="Resolving UMI sequences", ): # base case - only one sequence if group.shape[0] == 1: good_readName = group["readName"].iloc[0] mt_filter[good_readName] = False total_numReads[good_readName] = group["readCount"] top_reads[good_readName] = group["readCount"] # more commonly - many sequences for a given UMI else: group_sort = group.sort_values( "readCount", ascending=False, ignore_index=True ) good_readName = group_sort["readName"].iloc[0] # keep the first entry (highest readCount) mt_filter[good_readName] = False total_numReads[good_readName] = group_sort["readCount"].sum() top_reads[good_readName] = group_sort["readCount"].iloc[0] second_reads[good_readName] = group_sort["readCount"].iloc[1] first_reads[good_readName] = group_sort["readCount"].iloc[0] # mark remaining UMIs for filtering for i in range(1, group.shape[0]): bad_readName = group_sort["readName"].iloc[i] mt_filter[bad_readName] = True # apply the filter using the hash table created above molecule_table["filter"] = molecule_table["readName"].map(mt_filter) n_filtered = molecule_table[molecule_table["filter"]].shape[0] logger.info(f"Filtered out {n_filtered} reads.") # filter based on status & reindex filt_molecule_table = molecule_table[~molecule_table["filter"]].copy() filt_molecule_table.drop(columns=["filter"], inplace=True) if plot: # ---------------- Plot Diagnositics after Resolving ---------------- # h = plt.figure(figsize=(14, 10)) plt.plot(list(top_reads.values()), list(total_numReads.values()), "r.") plt.ylabel("Total Reads") plt.xlabel("Number Reads for Picked Sequence") plt.title("Total vs. Top Reads for Picked Sequence") plt.savefig( os.path.join(output_directory, "total_vs_top_reads_pickSeq.png") ) plt.close() h = plt.figure(figsize=(14, 10)) plt.plot(list(first_reads.values()), list(second_reads.values()), "r.") plt.ylabel("Number Reads for Second Best Sequence") plt.xlabel("Number Reads for Picked Sequence") plt.title("Second Best vs. Top Reads for Picked Sequence") plt.savefig( os.path.join(output_directory, "second_vs_top_reads_pickSeq.png") ) plt.close() filt_molecule_table = utilities.filter_cells( filt_molecule_table, min_umi_per_cell=min_umi_per_cell, min_avg_reads_per_umi=min_avg_reads_per_umi, ) return filt_molecule_table @logger.namespaced("align") @utilities.log_kwargs @utilities.log_runtime def align_sequences( queries: pd.DataFrame, ref_filepath: Optional[str] = None, ref: Optional[str] = None, gap_open_penalty: float = 20, gap_extend_penalty: float = 1, method: Literal["local", "global"] = "local", n_threads: int = 1, ) -> pd.DataFrame: """Align reads to the TargetSite reference. Take in several queries stored in a DataFrame mapping cellBC-UMIs to a sequence of interest and align each to a reference sequence. Either local or global alignment may be performed, depending on the `method` argument. The defaults for the gap open and gap extend penalties were selected via in-silico simulation (and are functionally equivalent to the values used in the GESTALT technology described in McKenna et al, 2016). The desired output consists of the best alignment score and the CIGAR string storing the indel locations in the query sequence. Args: queries: DataFrame storing a list of sequences to align. ref_filepath: Filepath to the reference FASTA. ref: Reference sequence. gap_open_penalty: Gap open penalty gap_extend_penalty: Gap extension penalty method: What alignment algorithm to use. Can be either "local" to perform local alignment using Smith-Waterman or "global" to perform global alignment using Needleman Wunsch. n_threads: Number of threads to use. Returns: A DataFrame mapping each sequence name to the CIGAR string, quality, and original query sequence. Raises: PreprocessError if both or neither `ref_filepath` and `ref` are provided, or if the `method` is not either "local" or "global". """ if (ref is None) == (ref_filepath is None): raise PreprocessError( "Either `ref_filepath` or `ref` must be provided." ) if method == "local": align = alignment_utilities.align_local elif method == "global": align = alignment_utilities.align_global else: raise PreprocessError("`method` must be either 'local' or 'global'.") alignment_dictionary = {} if ref_filepath: ref = str(list(SeqIO.parse(ref_filepath, "fasta"))[0].seq) # First, align all unique sequences and save results into dictionary. align_partial = partial( align, substitution_matrix=DNA_SUBSTITUTION_MATRIX, gap_open_penalty=gap_open_penalty, gap_extend_penalty=gap_extend_penalty, ) all_sequences = list(set(queries["seq"])) alignments = [] for seq, aln in zip( all_sequences, ngs.utils.ParallelWithProgress( n_jobs=n_threads, total=len(all_sequences), desc="Aligning sequences to reference", )(delayed(align_partial)(ref, seq) for seq in all_sequences), ): alignments.append(aln) alignment_table = pd.DataFrame( alignments, columns=[ "CIGAR", "QueryBegin", "ReferenceBegin", "AlignmentScore", "seq", ], ) # Merge alignments into input dataframe alignment_df = pd.merge( queries[["readName", "cellBC", "UMI", "readCount", "seq"]], alignment_table, how="left", on="seq", ) alignment_df.rename(columns={"seq": "Seq"}, inplace=True) return alignment_df @logger.namespaced("call_alleles") @utilities.log_kwargs @utilities.log_runtime def call_alleles( alignments: pd.DataFrame, ref_filepath: Optional[str] = None, ref: Optional[str] = None, barcode_interval: Tuple[int, int] = (20, 34), cutsite_locations: List[int] = [112, 166, 220], cutsite_width: int = 12, context: bool = True, context_size: int = 5, ) -> pd.DataFrame: """Call indels from CIGAR strings. Given many alignments, we extract the indels by comparing the CIGAR strings of each alignment to the reference sequence. Args: alignments: Alignments provided in DataFrame ref_filepath: Filepath to the reference sequence ref: Nucleotide sequence of the reference barcode_interval: Interval in reference corresponding to the integration barcode cutsite_locations: A list of all cutsite positions in the reference cutsite_width: Number of nucleotides left and right of cutsite location that indels can appear in. context: Include sequence context around indels context_size: Number of bases to the right and left to include as context Returns: A DataFrame mapping each sequence alignment to the called indels. """ if (ref is None) == (ref_filepath is None): raise PreprocessError( "Either `ref_filepath` or `ref` must be provided." ) alignment_to_indel = {} alignment_to_intBC = {} if ref_filepath: ref = str(list(SeqIO.parse(ref_filepath, "fasta"))[0].seq) for _, row in tqdm( alignments.iterrows(), total=alignments.shape[0], desc="Parsing CIGAR strings into indels", ): intBC, indels = alignment_utilities.parse_cigar( row.CIGAR, row.Seq, ref, row.ReferenceBegin, row.QueryBegin, barcode_interval, cutsite_locations, cutsite_width, context=context, context_size=context_size, ) alignment_to_indel[row.readName] = indels alignment_to_intBC[row.readName] = intBC indel_df = pd.DataFrame.from_dict( alignment_to_indel, orient="index", columns=[f"r{i}" for i in range(1, len(cutsite_locations) + 1)], ) indel_df["allele"] = indel_df.apply( lambda x: "".join([str(i) for i in x.values]), axis=1 ) indel_df["intBC"] = indel_df.index.map(alignment_to_intBC) alignments.set_index("readName", inplace=True) alignments = alignments.join(indel_df) alignments.reset_index(inplace=True) # check cut-sites and raise a warning if any missing data is detected cutsites = utilities.get_default_cut_site_columns(alignments) if np.any((alignments[cutsites] == "").sum(axis=0) > 0): warnings.warn( "Detected missing data in alleles. You might" " consider re-running align_sequences with a" " lower gap-open penalty, or using a separate" " alignment strategy.", PreprocessWarning, ) return alignments @logger.namespaced("error_correct_intbcs_to_whitelist") @utilities.log_kwargs @utilities.log_runtime def error_correct_intbcs_to_whitelist( input_df: pd.DataFrame, whitelist: Union[str, List[str]], intbc_dist_thresh: int = 1, ) -> pd.DataFrame: """Corrects all intBCs to the provided whitelist. This function can either take a list of whitelisted intBCs or a plaintext file containing these intBCs. Args: input_df: Input DataFrame of alignments. whitelist: May be either a single path to a plaintext file containing the barcode whitelist, one barcode per line, or a list of barcodes. intbc_dist_thresh: The threshold specifying the maximum Levenshtein distance between the read sequence and whitelist to be corrected. Returns: A DataFrame of error corrected intBCs. """ if isinstance(whitelist, list): whitelist_set = set(whitelist) else: with open(whitelist, "r") as f: whitelist_set = set( line.strip() for line in f if not line.isspace() ) whitelist = list(whitelist_set) unique_intbcs = list(input_df["intBC"].unique()) corrections = {intbc: intbc for intbc in whitelist_set} logger.info(f"{len(unique_intbcs)} intBCs detected.") for intbc in progress(unique_intbcs, desc="Correcting intBCs to whitelist"): min_distance = np.inf min_wls = [] if intbc not in whitelist_set: for wl_intbc in whitelist: distance = ngs.sequence.levenshtein_distance(intbc, wl_intbc) if distance < min_distance: min_distance = distance min_wls = [wl_intbc] elif distance == min_distance: min_wls.append(wl_intbc) # Correct only if there is one matching whitelist. Discard if there # are multiple possible corrections. if len(min_wls) == 1 and min_distance <= intbc_dist_thresh: corrections[intbc] = min_wls[0] input_df["intBC"] = input_df["intBC"].map(corrections) return input_df[~input_df["intBC"].isna()] @logger.namespaced("error_correct_umis") @utilities.log_kwargs @utilities.log_runtime def error_correct_umis( input_df: pd.DataFrame, max_umi_distance: int = 2, allow_allele_conflicts: bool = False, n_threads: int = 1, ) -> pd.DataFrame: """Within cellBC-intBC pairs, collapses UMIs that have close sequences. Error correct UMIs together within cellBC-intBC pairs. UMIs that have a Hamming Distance between their sequences less than a threshold are corrected towards whichever UMI is more abundant. The `allow_allele_conflicts` option may be used to also group on the actual allele. Args: input_df: Input DataFrame of alignments. max_umi_distance: The threshold specifying the Maximum Hamming distance between UMIs for one to be corrected to another. allow_allele_conflicts: Whether or not to include the allele when splitting UMIs into allele groups. When True, UMIs are grouped by cellBC-intBC-allele triplets. When False, UMIs are grouped by cellBC-intBC pairs. This option is used when it is possible for each cellBC-intBC pair to have >1 allele state, such as for spatial data. n_threads: Number of threads to use. Returns: A DataFrame of error corrected UMIs. """ if ( len( [ i for i in input_df.groupby(["cellBC", "intBC", "UMI"]).size() if i > 1 ] ) != 0 ): raise PreprocessError( "Non-unique cellBC-UMI pair exists, please resolve UMIs." ) sorted_df = input_df.sort_values( ["cellBC", "intBC", "readCount", "UMI"], ascending=[True, True, False, False], ) if max_umi_distance == 0: logger.info( "Distance of 0, no correction occurred, all alignments returned" ) return sorted_df num_corrected = 0 total = 0 alignment_df = pd.DataFrame() groupby = ["cellBC", "intBC"] if allow_allele_conflicts: groupby.append("allele") allele_groups = sorted_df.groupby(groupby) alignment_dfs = [] for allele_group, num_corr in ngs.utils.ParallelWithProgress( n_jobs=n_threads, total=len(allele_groups), desc="Error-correcting UMIs" )( delayed(UMI_utils.correct_umis_in_group)(allele_group, max_umi_distance) for _, allele_group in allele_groups ): num_corrected += num_corr total += allele_group.shape[0] alignment_dfs.append(allele_group) alignment_df = pd.concat(alignment_dfs, sort=True) logger.info( f"{num_corrected} UMIs Corrected of {total}" + f"({round(float(num_corrected) / total, 5) * 100}%)" ) alignment_df["readName"] = alignment_df.apply( lambda x: "_".join([x.cellBC, x.UMI, str(int(x.readCount))]), axis=1 ) alignment_df.set_index("readName", inplace=True) alignment_df.reset_index(inplace=True) return alignment_df @logger.namespaced("filter_molecule_table") @utilities.log_kwargs @utilities.log_runtime def filter_molecule_table( input_df: pd.DataFrame, output_directory: str, min_umi_per_cell: int = 10, min_avg_reads_per_umi: float = 2.0, min_reads_per_umi: int = -1, intbc_prop_thresh: float = 0.5, intbc_umi_thresh: int = 10, intbc_dist_thresh: int = 1, doublet_threshold: float = 0.35, allow_allele_conflicts: bool = False, plot: bool = False, ) -> pd.DataFrame: """Filters and corrects a molecule table of cellBC-UMI pairs. Performs the following steps on the alignments in a DataFrame: 1. Filters out UMIs with read count < `min_reads_per_umi`. If `min_reads_per_umi` is less than 0, a dynamic threshold is calculated as `(99th percentile of read counts) // 10`. 2. Filters out cellBCs with unique UMIs < `min_umi_per_cell` and average read count per UMI < `min_avg_reads_per_umi`. 3. Error corrects intBCs by changing intBCs with low UMI counts to intBCs with the same allele and a close sequence 4. Filters out cellBCs that contain too much conflicting allele information as intra-lineage doublets 5. Chooses one allele for each cellBC-intBC pair, by selecting the most common. This is not performed when `allow_allele_conflicts` is True. Args: input_df: A molecule table, i.e. cellBC-UMI pairs. Note that each cellBC should only contain one instance of each UMI output_directory: The output directory path to store plots min_umi_per_cell: The threshold specifying the minimum number of UMIs in a cell needed to be retained during filtering min_avg_reads_per_umi: The threshold specifying the minimum coverage (i.e. average) reads per UMI in a cell needed in order for that cell to be retained during filtering min_reads_per_umi: The threshold specifying the minimum read count needed for a UMI to be retained during filtering. Set dynamically if value is < 0. intbc_prop_thresh: The threshold specifying the maximum proportion of the total UMI counts for a intBC to be corrected to another intbc_umi_thresh: The threshold specifying the maximum UMI count for an intBC needs to be corrected to another intbc_dist_thresh: The threshold specifying the maximum Levenshtein Distance between sequences for an intBC to be corrected to another doublet_threshold: The threshold specifying the maximum proportion of conflicting alleles information allowed to for an intBC to be retained in doublet filtering. Set to None to skip doublet filtering allow_allele_conflicts: Whether or not to allow multiple alleles to be assigned to each cellBC-intBC pair. For fully single-cell data, this option should be set to False, since each cell is expected to have a single allele state for each intBC. However, this option should be set to True for chemistries that may result in multiple physical cells being captured for each barcode. plot: Indicates whether to plot the change in intBC and cellBC counts across filtering stages Returns: A filtered and corrected allele table of cellBC-UMI-allele groups """ input_df["status"] = "good" input_df.sort_values("readCount", ascending=False, inplace=True) rc_profile, upi_profile, upc_profile = {}, {}, {} logger.info("Logging initial stats...") if plot: ( rc_profile["Init"], upi_profile["Init"], upc_profile["Init"], ) = utilities.record_stats(input_df) if min_reads_per_umi < 0: R = input_df["readCount"] if list(R): min_reads_per_umi = np.percentile(R, 99) // 10 else: min_reads_per_umi = 0 logger.info(f"Filtering UMIs with less than {min_reads_per_umi} reads...") filtered_df = utilities.filter_umis( input_df, min_reads_per_umi=min_reads_per_umi ) if plot: ( rc_profile["Filtered_UMI"], upi_profile["Filtered_UMI"], upc_profile["Filtered_UMI"], ) = utilities.record_stats(filtered_df) logger.info( f"Filtering out cellBCs with fewer than {min_umi_per_cell} UMIs and" f"less than {min_avg_reads_per_umi} average reads per UMI..." ) filtered_df = utilities.filter_cells( filtered_df, min_umi_per_cell=min_umi_per_cell, min_avg_reads_per_umi=min_avg_reads_per_umi, ) if plot: ( rc_profile["CellFilter"], upi_profile["CellFilter"], upc_profile["CellFilter"], ) = utilities.record_stats(filtered_df) if intbc_dist_thresh > 0: logger.info("Error correcting intBCs...") filtered_df = utilities.error_correct_intbc( filtered_df, prop=intbc_prop_thresh, umi_count_thresh=intbc_umi_thresh, dist_thresh=intbc_dist_thresh, ) if plot: ( rc_profile["Process_intBC"], upi_profile["Process_intBC"], upc_profile["Process_intBC"], ) = utilities.record_stats(filtered_df) if doublet_threshold and not allow_allele_conflicts: logger.info( f"Filtering out intra-lineage group doublets with proportion {doublet_threshold}..." ) filtered_df = doublet_utils.filter_intra_doublets( filtered_df, prop=doublet_threshold ) if not allow_allele_conflicts: logger.info("Mapping remaining intBC conflicts...") filtered_df = map_utils.map_intbcs(filtered_df) if plot: ( rc_profile["Final"], upi_profile["Final"], upc_profile["Final"], ) = utilities.record_stats(filtered_df) # Count total filtered cellBCs cellBC_count = 0 for name, grp in filtered_df.groupby(["cellBC"]): cellBC_count += 1 if plot: stages = [ "Init", "CellFilter", "Filtered_UMI", "Process_intBC", "Final", ] # Plot Read Per UMI Histogram h = plt.figure(figsize=(14, 10)) for n in stages: ax = plt.hist( rc_profile[n], label=n, histtype="step", log=True, bins=200 ) plt.legend() plt.ylabel("Frequency") plt.xlabel("Number of Reads") plt.title("Reads Per UMI") plt.savefig(os.path.join(output_directory, "reads_per_umi.png")) plt.close() h = plt.figure(figsize=(14, 10)) for n in stages: ax = plt.plot(upc_profile[n], label=n) plt.legend() plt.ylabel("Number of UMIs") plt.xlabel("Rank Order") plt.xscale("log", basex=10) plt.yscale("log", basey=10) plt.title("UMIs per CellBC") plt.savefig(os.path.join(output_directory, "umis_per_cellbc.png")) plt.close() h = plt.figure(figsize=(14, 10)) for n in stages: ax = plt.hist( upi_profile[n], label=n, histtype="step", log=True, bins=200 ) plt.legend() plt.ylabel("Frequency") plt.xlabel("Number of UMIs") plt.title("UMIs per intBC") plt.savefig(os.path.join(output_directory, "umis_per_intbc.png")) plt.close() logger.info( f"Overall, filtered {cellBC_count} cells, with {filtered_df.shape[0]} UMIs." ) filtered_df.set_index("readName", inplace=True) filtered_df.reset_index(inplace=True) return filtered_df @logger.namespaced("call_lineages") @utilities.log_kwargs @utilities.log_runtime def call_lineage_groups( input_df: pd.DataFrame, output_directory: str, min_umi_per_cell: int = 10, min_avg_reads_per_umi: float = 2.0, min_cluster_prop: float = 0.005, min_intbc_thresh: float = 0.05, inter_doublet_threshold: float = 0.35, kinship_thresh: float = 0.25, plot: bool = False, ) -> pd.DataFrame: """Assigns cells to their clonal populations. Performs multiple rounds of filtering and assigning to lineage groups: 1. Iteratively generates putative lineage groups by forming intBC groups for each lineage group and then assigning cells based on how many intBCs they share with each intBC group (kinship). 2. Refines these putative groups by removing non-informative intBCs and reassigning cells through kinship. 3. Removes all inter-lineage doublets, defined as cells that have relatively equal kinship scores across multiple lineages and whose assignments are therefore ambigious. 4. Finally, performs one more round of filtering non-informative intBCs and cellBCs with low UMI counts before returning a final table of lineage assignments, allele information, and read and umi counts for each sample. Args: input_df: The allele table of cellBC-UMI-allele groups to be annotated with lineage assignments output_directory: The folder to store the final table as well as plots min_umi_per_cell: The threshold specifying the minimum number of UMIs a cell needs in order to not be filtered during filtering min_avg_reads_per_umi: The threshold specifying the minimum coverage (i.e. average) reads per UMI in a cell needed in order for that cell not to be filtered during filtering min_cluster_prop: The minimum cluster size in the putative lineage assignment step, as a proportion of the number of cells min_intbc_thresh: The threshold specifying the minimum proportion of cells in a lineage group that need to have an intBC in order for it be retained during filtering. Also specifies the minimum proportion of cells that share an intBC with the most frequent intBC in forming putative lineage groups inter_doublet_threshold: The threshold specifying the minimum proportion of kinship a cell shares with its assigned lineage group out of all lineage groups for it to be retained during doublet filtering kinship_thresh: The threshold specifying the minimum proportion of intBCs shared between a cell and the intBC set of a lineage group needed to assign that cell to that lineage group in putative assignment plot: Indicates whether to generate plots Returns: None, saves output allele table to file. """ logger.info( f"{input_df.shape[0]} UMIs (rows), with {input_df.shape[1]} attributes (columns)" ) logger.info(str(len(input_df["cellBC"].unique())) + " Cells") # Create a pivot_table piv = pd.pivot_table( input_df, index="cellBC", columns="intBC", values="UMI", aggfunc="count" ) piv = piv.div(piv.sum(axis=1), axis=0) # Reorder piv columns by binarized intBC frequency pivbin = piv.copy() pivbin[pivbin > 0] = 1 intBC_sums = pivbin.sum(0) ordered_intBCs = intBC_sums.sort_values(ascending=False).index.tolist() piv = piv[ordered_intBCs] min_clust_size = int(min_cluster_prop * piv.shape[0]) logger.info("Assigning initial lineage groups...") logger.info(f"Clustering with minimum cluster size {min_clust_size}...") piv_assigned = lineage_utils.assign_lineage_groups( piv, min_clust_size, min_intbc_thresh=min_intbc_thresh, kinship_thresh=kinship_thresh, ) logger.info("Refining lineage groups...") logger.info( "Redefining lineage groups by removing low proportion intBCs..." ) master_LGs, master_intBCs = lineage_utils.filter_intbcs_lg_sets( piv_assigned, min_intbc_thresh=min_intbc_thresh ) logger.info("Reassigning cells to refined lineage groups by kinship...") kinship_scores = lineage_utils.score_lineage_kinships( piv_assigned, master_LGs, master_intBCs ) logger.info("Annotating alignment table with refined lineage groups...") allele_table = lineage_utils.annotate_lineage_groups( input_df, kinship_scores, master_intBCs ) if inter_doublet_threshold: logger.info( f"Filtering out inter-lineage group doublets with proportion {inter_doublet_threshold}..." ) allele_table = doublet_utils.filter_inter_doublets( allele_table, rule=inter_doublet_threshold ) logger.info( "Filtering out low proportion intBCs in finalized lineage groups..." ) filtered_lgs = lineage_utils.filter_intbcs_final_lineages( allele_table, min_intbc_thresh=min_intbc_thresh ) allele_table = lineage_utils.filtered_lineage_group_to_allele_table( filtered_lgs ) logger.debug("Final lineage group assignments:") for n, g in allele_table.groupby(["lineageGrp"]): logger.debug(f"LG {n}: " + str(len(g["cellBC"].unique())) + " cells") logger.info("Filtering out low UMI cell barcodes...") allele_table = utilities.filter_cells( allele_table, min_umi_per_cell=int(min_umi_per_cell), min_avg_reads_per_umi=min_avg_reads_per_umi, ) allele_table["lineageGrp"] = allele_table["lineageGrp"].astype(int) if plot: logger.info("Producing Plots...") at_pivot_I = pd.pivot_table( allele_table, index="cellBC", columns="intBC", values="UMI", aggfunc="count", ) at_pivot_I.fillna(value=0, inplace=True) at_pivot_I[at_pivot_I > 0] = 1 logger.info("Producing pivot table heatmap...") lineage_utils.plot_overlap_heatmap( allele_table, at_pivot_I, output_directory ) logger.info("Plotting filtered lineage group pivot table heatmap...") lineage_utils.plot_overlap_heatmap_lg( allele_table, at_pivot_I, output_directory ) return allele_table
import React from "react"; import Directory from "./pages/Directory"; import Navbar from "./components/Navbar"; import Footer from "./components/Footer"; import Wrapper from "./components/Wrapper"; function App() { return ( <div> <Navbar /> <Wrapper> <Directory /> </Wrapper> <Footer /> </div> ); } export default App;
angular.module("magiciansBattle").directive("selectField", function ($rootScope) { return { restrict: "A", scope: true, require: "field", replace: true, templateUrl: $rootScope.templateUrl("directives/field/selectField.html"), controller: function ($scope, $element) { $scope.field = $element.attr("field-name"); $scope.class = ""; if ($element[0].hasAttribute("add-class")) { $scope.class = $element.attr("add-class"); } $scope.description = ""; if ($element[0].hasAttribute("field-description")) { $scope.description = $element.attr("field-description"); } $scope.selectName = $element.attr("options"); var valueName = null; if ($element[0].hasAttribute("options-value")) { valueName = $element.attr("options-value"); } var textName = null; if ($element[0].hasAttribute("options-text")) { textName = $element.attr("options-text"); } $scope.getOptionValue = function (option) { if (valueName == null) return option; else return option[valueName]; }; $scope.getOptionText = function (option) { if (textName == null) return option; else return option[textName]; }; } }; });
# Copyright (c) 2020 BlenderNPR and contributors. MIT license. from re import split import bpy from Malt.Parameter import * from Malt import Scene from BlenderMalt import MaltPipeline, MaltTextures # WORKAROUND: We can't declare color ramps from python, # so we store them as nodes inside a material def get_color_ramp(material, name): #TODO: Create a node tree for each ID with Malt Properties to store ramps ??? (Node Trees are ID types) if material.use_nodes == False: material.use_nodes = True nodes = material.node_tree.nodes if name not in nodes: node = nodes.new('ShaderNodeValToRGB') node.name = name return nodes[name] class MaltTexturePropertyWrapper(bpy.types.PropertyGroup): texture : bpy.props.PointerProperty(type=bpy.types.Image) class MaltMaterialPropertyWrapper(bpy.types.PropertyGroup): material : bpy.props.PointerProperty(type=bpy.types.Material) extension : bpy.props.StringProperty() class MaltBoolPropertyWrapper(bpy.types.PropertyGroup): boolean : bpy.props.BoolProperty() class MaltPropertyGroup(bpy.types.PropertyGroup): bools : bpy.props.CollectionProperty(type=MaltBoolPropertyWrapper) textures : bpy.props.CollectionProperty(type=MaltTexturePropertyWrapper) materials : bpy.props.CollectionProperty(type=MaltMaterialPropertyWrapper) def get_rna(self): if '_RNA_UI' not in self.keys(): self['_RNA_UI'] = {} return self['_RNA_UI'] def setup(self, parameters, replace_parameters=True): rna = self.get_rna() def setup_parameter(name, parameter): if name not in rna.keys(): rna[name] = {} type_changed = 'type' not in rna[name].keys() or rna[name]['type'] != parameter.type size_changed = 'size' in rna[name].keys() and rna[name]['size'] != parameter.size def to_basic_type(value): try: return tuple(value) except: return value def equals(a, b): return to_basic_type(a) == to_basic_type(b) def resize(): if parameter.size == 1: self[name] = self[name][0] else: if rna[name]['size'] > parameter.size: self[name] = self[name][:parameter.size] else: first = self[name] try: first = list(first) except: first = [first] second = list(parameter.default_value) self[name] = first + second[rna[name]['size']:] if parameter.type in (Type.INT, Type.FLOAT): if type_changed or equals(rna[name]['default'], self[name]): self[name] = parameter.default_value elif size_changed: resize() if parameter.type == Type.BOOL: if name not in self.bools: self.bools.add().name = name if type_changed or equals(rna[name]['default'], self.bools[name].boolean): self.bools[name].boolean = parameter.default_value elif size_changed: resize() if parameter.type == Type.TEXTURE: if name not in self.textures: self.textures.add().name = name if parameter.type == Type.GRADIENT: get_color_ramp(self.id_data, name) if parameter.type == Type.MATERIAL: if name not in self.materials: self.materials.add().name = name self.materials[name].extension = parameter.extension shader_path = parameter.default_value if shader_path and shader_path != '': if shader_path not in bpy.data.materials: bpy.data.materials.new(shader_path) material = bpy.data.materials[shader_path] material.malt.shader_source = shader_path material.malt.update_source(bpy.context) material = self.materials[name].material if type_changed or (material and rna[name]['default'] == material.malt.shader_source): self.materials[name].material = bpy.data.materials[shader_path] rna[name]['active'] = True rna[name]["default"] = parameter.default_value rna[name]['type'] = parameter.type rna[name]['size'] = parameter.size rna[name]['filter'] = parameter.filter #TODO: We should purge non active properties (specially textures) # at some point, likely on file save or load # so we don't lose them immediately when changing shaders/pipelines if replace_parameters: for key, value in rna.items(): if '@' not in key: rna[key]['active'] = False for name, parameter in parameters.items(): if name.isupper() or name.startswith('_'): # We treat underscored and all caps uniforms as "private" continue setup_parameter(name, parameter) for key, value in rna.items(): if '@' in key and key not in parameters.keys(): main_name = key.split(' @ ')[0] rna[key]['active'] = rna[main_name]['active'] and rna[key]['active'] if rna[key]['active']: parameter = Parameter(rna[main_name]['default'], rna[main_name]['type'], rna[main_name]['size']) setup_parameter(key, parameter) for key, value in rna.items(): #TODO: for now we assume we want floats as colors # ideally it should be opt-in in the UI, # so we can give them propper min/max values if rna[key]['type'] == Type.FLOAT and rna[key]['size'] >= 3: rna[key]['subtype'] = 'COLOR' rna[key]['use_soft_limits'] = True rna[key]['soft_min'] = 0.0 rna[key]['soft_max'] = 1.0 else: rna[key]['subtype'] = 'NONE' rna[key]['use_soft_limits'] = False # Force a depsgraph update. # Otherwise these won't be available inside scene_eval self.id_data.update_tag() for screen in bpy.data.screens: for area in screen.areas: area.tag_redraw() def add_override(self, property_name, override_name): main_prop = self.get_rna()[property_name] new_name = property_name + ' @ ' + override_name property = {} if main_prop['type'] == Type.MATERIAL: property[new_name] = MaterialParameter(main_prop['default'], self.materials[property_name].extension) else: property[new_name] = Parameter(main_prop['default'], main_prop['type'], main_prop['size']) self.setup(property, replace_parameters= False) def remove_override(self, property): rna = self.get_rna() if property in rna: rna[property]['active'] = False self.id_data.update_tag() def get_parameters(self, overrides, resources): if '_RNA_UI' not in self.keys(): return {} rna = self.get_rna() parameters = {} for key in rna.keys(): if '@' in key: continue if rna[key]['active'] == False: continue result_key = key for override in reversed(overrides): override_key = key + ' @ ' + override if override_key in rna.keys(): if rna[override_key]['active']: key = override_key if rna[key]['type'] in (Type.INT, Type.FLOAT): try: parameters[result_key] = tuple(self[key]) except: parameters[result_key] = self[key] elif rna[key]['type'] == Type.BOOL: parameters[result_key] = bool(self.bools[key].boolean) elif rna[key]['type'] == Type.TEXTURE: texture = self.textures[key].texture if texture: parameters[result_key] = MaltTextures.get_texture(texture) else: parameters[result_key] = None elif rna[key]['type'] == Type.GRADIENT: #TODO: Only works for materials color_ramp = get_color_ramp(self.id_data, key).color_ramp parameters[result_key] = MaltTextures.get_gradient(color_ramp, self.id_data.name_full, key) elif rna[key]['type'] == Type.MATERIAL: material = self.materials[key].material extension = self.materials[key].extension if material: materials = resources['materials'] material_name = material.name_full if material_name not in materials.keys(): shader = { 'path': bpy.path.abspath(material.malt.shader_source, library=material.library), 'parameters': material.malt.parameters.get_parameters(overrides, resources) } material_parameters = material.malt_parameters.get_parameters(overrides, resources) materials[material_name] = Scene.Material(shader, material_parameters) parameters[result_key] = materials[material_name] else: parameters[result_key] = None return parameters def draw_ui(self, layout, filter=None): if '_RNA_UI' not in self.keys(): return #Can't modify ID classes from here rna = self.get_rna() import re def natual_sort_key(k): return [int(c) if c.isdigit() else c for c in re.split('([0-9]+)', k)] # Most drivers sort the uniforms in alphabetical order anyway, # so there's no point in tracking the actual index since it doesn't follow # the declaration order keys = sorted(rna.keys(), key=natual_sort_key) #layout.use_property_split = True layout.use_property_decorate = False namespace_stack = [(None, layout)] for key in keys: if rna[key]['active'] == False: continue if filter and rna[key]['filter'] and rna[key]['filter'] != filter: continue names = key.split('.') if len(names) == 1: namespace_stack = namespace_stack[:1] layout = namespace_stack[0][1] else: for i in range(0, len(names) - 1): name = names[i] stack_i = i+1 if len(namespace_stack) > stack_i and namespace_stack[stack_i][0] != name: namespace_stack = namespace_stack[:stack_i] if len(namespace_stack) < stack_i+1: box = namespace_stack[stack_i - 1][1].box() box.label(text=name + " :") namespace_stack.append((name, box)) layout = namespace_stack[stack_i][1] names = [name.replace('_',' ') for name in names] name = names[-1] def make_row(label_only = False): is_override = False label = name if '@' in name: is_override = True label = '⇲ '+name.split(' @ ')[1] row = layout.row(align=True) result = row.split() if not label_only: result = result.split(factor=0.66) result.alignment = 'RIGHT' result.label(text=label) if is_override: delete_op = row.operator('wm.malt_delete_override', text='', icon='X') delete_op.properties_path = to_json_rna_path(self) delete_op.property = key else: override_op = row.operator('wm.malt_new_override', text='', icon='DECORATE_OVERRIDE') override_op.properties_path = to_json_rna_path(self) override_op.property = key return result if rna[key]['type'] in (Type.INT, Type.FLOAT): #TODO: add subtype toggle make_row().prop(self, '["'+key+'"]', text='') elif rna[key]['type'] == Type.BOOL: make_row().prop(self.bools[key], 'boolean', text='') elif rna[key]['type'] == Type.TEXTURE: make_row(True) row = layout.row() if self.textures[key].texture: row = row.split(factor=0.8) row.template_ID(self.textures[key], "texture", new="image.new", open="image.open") if self.textures[key].texture: row.prop(self.textures[key].texture.colorspace_settings, 'name', text='') elif rna[key]['type'] == Type.GRADIENT: make_row(True) layout.template_color_ramp(get_color_ramp(self.id_data, key), 'color_ramp') elif rna[key]['type'] == Type.MATERIAL: make_row(True) row = layout.row(align=True) row.template_ID(self.materials[key], "material") material_path = to_json_rna_path(self.materials[key]) if self.materials[key].material: extension = self.materials[key].extension row.operator('material.malt_add_material', text='', icon='DUPLICATE').material_path = material_path material = self.materials[key].material material.malt.draw_ui(layout.box(), extension, material.malt_parameters) else: row.operator('material.malt_add_material', text='New', icon='ADD').material_path = material_path import json def to_json_rna_path(prop): blend_id = prop.id_data id_type = str(blend_id.__class__).split('.')[-1] id_name = blend_id.name_full path = prop.path_from_id() return json.dumps((id_type, id_name, path)) def from_json_rna_path(prop): id_type, id_name, path = json.loads(prop) data_map = { 'Object' : bpy.data.objects, 'Mesh' : bpy.data.meshes, 'Light' : bpy.data.lights, 'Camera' : bpy.data.cameras, 'Material' : bpy.data.materials, 'World': bpy.data.worlds, 'Scene': bpy.data.scenes, } for class_name, data in data_map.items(): if class_name in id_type: return data[id_name].path_resolve(path) return None class OT_MaltNewMaterial(bpy.types.Operator): bl_idname = "material.malt_add_material" bl_label = "Malt Add Material" bl_options = {'INTERNAL'} material_path : bpy.props.StringProperty() def execute(self, context): material_wrapper = from_json_rna_path(self.material_path) if material_wrapper.material: material_wrapper.material = material_wrapper.material.copy() else: material_wrapper.material = bpy.data.materials.new('Material') material_wrapper.id_data.update_tag() return {'FINISHED'} class OT_MaltNewOverride(bpy.types.Operator): bl_idname = "wm.malt_new_override" bl_label = "Malt Add A Property Override" bl_options = {'INTERNAL'} properties_path : bpy.props.StringProperty() property : bpy.props.StringProperty() def get_override_enums(self, context): overrides = context.scene.world.malt.overrides.split(',') result = [] for i, override in enumerate(overrides): result.append((override, override, '', i)) return result override : bpy.props.EnumProperty(items=get_override_enums) def invoke(self, context, event): return context.window_manager.invoke_props_dialog(self) def draw(self, context): layout = self.layout layout.prop(self, "override") def execute(self, context): properties = from_json_rna_path(self.properties_path) properties.add_override(self.property, self.override) return {'FINISHED'} class OT_MaltDeleteOverride(bpy.types.Operator): bl_idname = "wm.malt_delete_override" bl_label = "Malt Delete A Property Override" bl_options = {'INTERNAL'} properties_path : bpy.props.StringProperty() property : bpy.props.StringProperty() def execute(self, context): properties = from_json_rna_path(self.properties_path) properties.remove_override(self.property) return {'FINISHED'} class MALT_PT_Base(bpy.types.Panel): bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' bl_context = "disabled" bl_label = "Malt Settings" COMPAT_ENGINES = {'MALT'} @classmethod def get_malt_property_owner(cls, context): return None @classmethod def poll(cls, context): return context.scene.render.engine == 'MALT' and cls.get_malt_property_owner(context) def draw(self, context): owner = self.__class__.get_malt_property_owner(context) if owner: self.layout.active = owner.library is None #Only local data can be edited owner.malt_parameters.draw_ui(self.layout) class MALT_PT_Scene(MALT_PT_Base): bl_context = "scene" @classmethod def get_malt_property_owner(cls, context): return context.scene class MALT_PT_World(MALT_PT_Base): bl_context = "world" @classmethod def get_malt_property_owner(cls, context): return context.scene.world class MALT_PT_Camera(MALT_PT_Base): bl_context = "data" @classmethod def get_malt_property_owner(cls, context): if context.object.type == 'CAMERA': return context.object.data else: return None class MALT_PT_Object(MALT_PT_Base): bl_context = "object" @classmethod def get_malt_property_owner(cls, context): return context.object # In MaltMaterials ''' class MALT_PT_Material(MALT_PT_Base): bl_context = "material" @classmethod def get_malt_property_owner(cls, context): if context.material: return context.material ''' class MALT_PT_Mesh(MALT_PT_Base): bl_context = "data" @classmethod def get_malt_property_owner(cls, context): if context.object and context.object.data and context.object.type in ('MESH', 'CURVE', 'SURFACE', 'META', 'FONT'): return context.object.data class MALT_PT_Light(MALT_PT_Base): bl_context = "data" @classmethod def get_malt_property_owner(cls, context): if context.object.type == 'LIGHT': return context.object.data else: return None def draw(self, context): layout = self.layout owner = self.__class__.get_malt_property_owner(context) if owner and owner.type != 'AREA': ''' layout.prop(owner, 'color') if owner.type == 'POINT': layout.prop(owner, 'shadow_soft_size', text='Radius') elif owner.type == 'SPOT': layout.prop(owner, 'cutoff_distance', text='Distance') layout.prop(owner, 'spot_size', text='Spot Angle') layout.prop(owner, 'spot_blend', text='Spot Blend') ''' owner.malt.draw_ui(layout) owner.malt_parameters.draw_ui(layout) classes = ( MaltTexturePropertyWrapper, MaltMaterialPropertyWrapper, MaltBoolPropertyWrapper, MaltPropertyGroup, OT_MaltNewMaterial, OT_MaltNewOverride, OT_MaltDeleteOverride, MALT_PT_Base, MALT_PT_Scene, MALT_PT_World, MALT_PT_Camera, MALT_PT_Object, MALT_PT_Mesh, MALT_PT_Light, ) def register(): for _class in classes: bpy.utils.register_class(_class) bpy.types.Scene.malt_parameters = bpy.props.PointerProperty(type=MaltPropertyGroup) bpy.types.World.malt_parameters = bpy.props.PointerProperty(type=MaltPropertyGroup) bpy.types.Camera.malt_parameters = bpy.props.PointerProperty(type=MaltPropertyGroup) bpy.types.Object.malt_parameters = bpy.props.PointerProperty(type=MaltPropertyGroup) bpy.types.Material.malt_parameters = bpy.props.PointerProperty(type=MaltPropertyGroup) bpy.types.Mesh.malt_parameters = bpy.props.PointerProperty(type=MaltPropertyGroup) bpy.types.Curve.malt_parameters = bpy.props.PointerProperty(type=MaltPropertyGroup) bpy.types.MetaBall.malt_parameters = bpy.props.PointerProperty(type=MaltPropertyGroup) bpy.types.Light.malt_parameters = bpy.props.PointerProperty(type=MaltPropertyGroup) def unregister(): for _class in classes: bpy.utils.unregister_class(_class) del bpy.types.Scene.malt_parameters del bpy.types.World.malt_parameters del bpy.types.Camera.malt_parameters del bpy.types.Object.malt_parameters del bpy.types.Material.malt_parameters del bpy.types.Mesh.malt_parameters del bpy.types.Curve.malt_parameters del bpy.types.Light.malt_parameters
import Dispatcher from '../dispatcher'; import Constants from '../constants'; export function setSettings(settings) { Dispatcher.dispatch({ type: Constants.SettingsActions.SET_SETTINGS, settings }); }
from mlagents_envs.base_env import ( BehaviorSpec, ActionType, DecisionSteps, TerminalSteps, ) from mlagents_envs.exception import UnityObservationException from mlagents_envs.timers import hierarchical_timer, timed from mlagents_envs.communicator_objects.agent_info_pb2 import AgentInfoProto from mlagents_envs.communicator_objects.observation_pb2 import ( ObservationProto, NONE as COMPRESSION_TYPE_NONE, ) from mlagents_envs.communicator_objects.brain_parameters_pb2 import BrainParametersProto import numpy as np import io from typing import cast, List, Tuple, Union, Collection, Optional, Iterable from PIL import Image def behavior_spec_from_proto( brain_param_proto: BrainParametersProto, agent_info: AgentInfoProto ) -> BehaviorSpec: """ Converts brain parameter and agent info proto to BehaviorSpec object. :param brain_param_proto: protobuf object. :param agent_info: protobuf object. :return: BehaviorSpec object. """ observation_shape = [tuple(obs.shape) for obs in agent_info.observations] action_type = ( ActionType.DISCRETE if brain_param_proto.vector_action_space_type == 0 else ActionType.CONTINUOUS ) if action_type == ActionType.CONTINUOUS: action_shape: Union[ int, Tuple[int, ...] ] = brain_param_proto.vector_action_size[0] else: action_shape = tuple(brain_param_proto.vector_action_size) return BehaviorSpec(observation_shape, action_type, action_shape) @timed def process_pixels(image_bytes: bytes, gray_scale: bool) -> np.ndarray: """ Converts byte array observation image into numpy array, re-sizes it, and optionally converts it to grey scale :param gray_scale: Whether to convert the image to grayscale. :param image_bytes: input byte array corresponding to image :return: processed numpy array of observation from environment """ with hierarchical_timer("image_decompress"): image_bytearray = bytearray(image_bytes) image = Image.open(io.BytesIO(image_bytearray)) # Normally Image loads lazily, this forces it to do loading in the timer scope. image.load() s = np.array(image, dtype=np.float32) / 255.0 if gray_scale: s = np.mean(s, axis=2) s = np.reshape(s, [s.shape[0], s.shape[1], 1]) return s @timed def observation_to_np_array( obs: ObservationProto, expected_shape: Optional[Iterable[int]] = None ) -> np.ndarray: """ Converts observation proto into numpy array of the appropriate size. :param obs: observation proto to be converted :param expected_shape: optional shape information, used for sanity checks. :return: processed numpy array of observation from environment """ if expected_shape is not None: if list(obs.shape) != list(expected_shape): raise UnityObservationException( f"Observation did not have the expected shape - got {obs.shape} but expected {expected_shape}" ) gray_scale = obs.shape[2] == 1 if obs.compression_type == COMPRESSION_TYPE_NONE: img = np.array(obs.float_data.data, dtype=np.float32) img = np.reshape(img, obs.shape) return img else: img = process_pixels(obs.compressed_data, gray_scale) # Compare decompressed image size to observation shape and make sure they match if list(obs.shape) != list(img.shape): raise UnityObservationException( f"Decompressed observation did not have the expected shape - " f"decompressed had {img.shape} but expected {obs.shape}" ) return img @timed def _process_visual_observation( obs_index: int, shape: Tuple[int, int, int], agent_info_list: Collection[ AgentInfoProto ], # pylint: disable=unsubscriptable-object ) -> np.ndarray: if len(agent_info_list) == 0: return np.zeros((0, shape[0], shape[1], shape[2]), dtype=np.float32) batched_visual = [ observation_to_np_array(agent_obs.observations[obs_index], shape) for agent_obs in agent_info_list ] return np.array(batched_visual, dtype=np.float32) def _raise_on_nan_and_inf(data: np.array, source: str) -> np.array: # Check for NaNs or Infinite values in the observation or reward data. # If there's a NaN in the observations, the np.mean() result will be NaN # If there's an Infinite value (either sign) then the result will be Inf # See https://stackoverflow.com/questions/6736590/fast-check-for-nan-in-numpy for background # Note that a very large values (larger than sqrt(float_max)) will result in an Inf value here # Raise a Runtime error in the case that NaNs or Infinite values make it into the data. if data.size == 0: return data d = np.mean(data) has_nan = np.isnan(d) has_inf = not np.isfinite(d) if has_nan: raise RuntimeError(f"The {source} provided had NaN values.") if has_inf: raise RuntimeError(f"The {source} provided had Infinite values.") @timed def _process_vector_observation( obs_index: int, shape: Tuple[int, ...], agent_info_list: Collection[ AgentInfoProto ], # pylint: disable=unsubscriptable-object ) -> np.ndarray: if len(agent_info_list) == 0: return np.zeros((0, shape[0]), dtype=np.float32) np_obs = np.array( [ agent_obs.observations[obs_index].float_data.data for agent_obs in agent_info_list ], dtype=np.float32, ) _raise_on_nan_and_inf(np_obs, "observations") return np_obs @timed def steps_from_proto( agent_info_list: Collection[ AgentInfoProto ], # pylint: disable=unsubscriptable-object behavior_spec: BehaviorSpec, ) -> Tuple[DecisionSteps, TerminalSteps]: decision_agent_info_list = [ agent_info for agent_info in agent_info_list if not agent_info.done ] terminal_agent_info_list = [ agent_info for agent_info in agent_info_list if agent_info.done ] decision_obs_list: List[np.ndarray] = [] terminal_obs_list: List[np.ndarray] = [] for obs_index, obs_shape in enumerate(behavior_spec.observation_shapes): is_visual = len(obs_shape) == 3 if is_visual: obs_shape = cast(Tuple[int, int, int], obs_shape) decision_obs_list.append( _process_visual_observation( obs_index, obs_shape, decision_agent_info_list ) ) terminal_obs_list.append( _process_visual_observation( obs_index, obs_shape, terminal_agent_info_list ) ) else: decision_obs_list.append( _process_vector_observation( obs_index, obs_shape, decision_agent_info_list ) ) terminal_obs_list.append( _process_vector_observation( obs_index, obs_shape, terminal_agent_info_list ) ) decision_rewards = np.array( [agent_info.reward for agent_info in decision_agent_info_list], dtype=np.float32 ) terminal_rewards = np.array( [agent_info.reward for agent_info in terminal_agent_info_list], dtype=np.float32 ) _raise_on_nan_and_inf(decision_rewards, "rewards") _raise_on_nan_and_inf(terminal_rewards, "rewards") max_step = np.array( [agent_info.max_step_reached for agent_info in terminal_agent_info_list], dtype=np.bool, ) decision_agent_id = np.array( [agent_info.id for agent_info in decision_agent_info_list], dtype=np.int32 ) terminal_agent_id = np.array( [agent_info.id for agent_info in terminal_agent_info_list], dtype=np.int32 ) action_mask = None if behavior_spec.is_action_discrete(): if any( [agent_info.action_mask is not None] for agent_info in decision_agent_info_list ): n_agents = len(decision_agent_info_list) a_size = np.sum(behavior_spec.discrete_action_branches) mask_matrix = np.ones((n_agents, a_size), dtype=np.bool) for agent_index, agent_info in enumerate(decision_agent_info_list): if agent_info.action_mask is not None: if len(agent_info.action_mask) == a_size: mask_matrix[agent_index, :] = [ False if agent_info.action_mask[k] else True for k in range(a_size) ] action_mask = (1 - mask_matrix).astype(np.bool) indices = _generate_split_indices(behavior_spec.discrete_action_branches) action_mask = np.split(action_mask, indices, axis=1) return ( DecisionSteps( decision_obs_list, decision_rewards, decision_agent_id, action_mask ), TerminalSteps(terminal_obs_list, terminal_rewards, max_step, terminal_agent_id), ) def _generate_split_indices(dims): if len(dims) <= 1: return () result = (dims[0],) for i in range(len(dims) - 2): result += (dims[i + 1] + result[i],) return result
from .models import UserProfile from rest_framework import serializers, permissions, viewsets, mixins, authentication from rest_framework.views import APIView from rest_framework.response import Response from django.shortcuts import get_object_or_404 from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver class UserSerializer(serializers.ModelSerializer): class Meta: model = User fields = ('username', 'last_login', 'is_staff', 'date_joined', 'email',) class UserProfileSerializer(serializers.ModelSerializer): metadata = UserSerializer(source='user') class Meta: model = UserProfile fields = ('id', 'metadata') depth = 2 class UserPermission(permissions.BasePermission): def has_object_permission(self, request, view, obj): if request.user.is_staff: return True return obj.user == request.user class UsersMeView(APIView): permission_classes = (permissions.IsAuthenticated,) def get(self, request): user_obj = get_object_or_404(UserProfile, user=request.user) serializer = UserProfileSerializer(user_obj) return Response(serializer.data) class UserProfileViewSet(mixins.RetrieveModelMixin, mixins.UpdateModelMixin, mixins.DestroyModelMixin, mixins.ListModelMixin, viewsets.GenericViewSet): queryset = UserProfile.objects.all() serializer_class = UserProfileSerializer permission_classes = (permissions.IsAuthenticated, UserPermission,) def get_queryset(self): if self.request.user.is_staff: return UserProfile.objects.all() else: userProfile = get_object_or_404(UserProfile, user=self.request.user) return UserProfile.objects.filter(owner=userProfile) @receiver(post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): if created: UserProfile.objects.create(user=instance)
#!/usr/bin/env python # -*- coding: utf-8 -*- from eegpy.misc import FATALERROR from integrators import rk4int, eulerint import sys import time import pylab as p try: import numpy as np from numpy.fft import * from scipy.integrate import odeint except ImportError: raise FATALERROR('SciPy or NumPy not found!\nPlease visit www.scipy.org or numeric.scipy.org for more information.') try: import pyosd except ImportError: pyosd=None def roessler_ode(y,t,omega=1,a=0.165,b=0.2,c=10): dy = np.zeros((3)) dy[0] = -1.0*(omega*y[1] + y[2]) #+ e1*(y[3]-y[0]) dy[1] = omega * y[0] + a * y[1] dy[2] = b + y[2] * (y[0] - c) return dy class Roessler(object): u"""A single coupled Rössler oscillators""" def __init__(self, y=None, omega=1.0, a=0.165,b=0.2,c=10): self.omega = omega self.a = a self.b = b self.c = c if y==None: self.y = np.random.random((3))+0.5 else: self.y = y def ode(self,y,t): dy = roessler_ode(y[:],t,self.omega,self.a,self.b,self.c) return dy def integrate(self,ts): rv = odeint(self.ode,self.y,ts) self.y = rv[-1,:] return rv class TwoRoessler(object): u"""Two coupled Rössler oscillators""" def __init__(self, y=None, omega1=1.03, omega2=0.97, e1=0, e2=0, a1=0.165, a2=0.165, b1=0.2, b2=0.2, c1=10, c2=10): self.omega1 = omega1 self.omega2 = omega2 self.e1 = e1 self.e2 = e2 self.a1 = a1 self.b1 = b1 self.c1 = c1 self.a2 = a2 self.b2 = b2 self.c2 = c2 if y==None: self.y = np.random.random((6))+0.5 else: self.y = y def ode(self,y,t): dy = np.zeros((6)) dy[:3] = roessler_ode(y[:3],t,self.omega1,self.a1,self.b1,self.c1) dy[3:] = roessler_ode(y[3:],t,self.omega2,self.a2,self.b2,self.c2) dy[0] += self.e1 * (y[3]-y[0]) dy[3] += self.e2 * (y[0]-y[3]) return dy def integrate(self,ts): rv = odeint(self.ode,self.y,ts) self.y = rv[-1,:] return rv class NRoessler(object): u"""Implements a network of N coupled Rössler oscillators""" def __init__(self, omegasOrN = None, es=None, as_=None, bs=None, cs=None): if omegasOrN == None and es == None: raise ValueError("I need either omegas, epsilons or number of oscillators to go on.") if type(omegasOrN) == type(np.ones((2))): self.omegas = omegasOrN self.N = self.omegas.shape[0] if es != None: assert self.omegas.shape[0] == es.shape[0] self.es = es else: self.es = np.zeros((self.N,self.N)) self.y = np.random.random((3*self.N))+0.5 elif omegasOrN == None: self.es = es self.N = self.es.shape[0] self.omegas = np.random.normal(1.0,0.03,(self.N)) self.y = np.random.random((3*self.N))+0.5 elif type(omegasOrN) == type(1): self.N = omegasOrN self.omegas = np.random.normal(1.0,0.03,(self.N)) self.es = np.zeros((self.N,self.N)) self.y = np.random.random((3*self.N))+0.5 else: raise ValueError("Illegal combination of paramters") # Store attractor-parameters if as_ == None: self._as = np.ones((self.N))*0.165 else: self._as = as_ if bs == None: self._bs = np.ones((self.N))*0.2 else: self._bs = bs if cs == None: self._cs = np.ones((self.N))*10. else: self._cs = cs def ode(self,y,t): dy = np.zeros((self.N*3)) for i in range(self.N): # Dynamics dy[(i*3):((i+1)*3)] = roessler_ode(y[(i*3):((i+1)*3)],t,self.omegas[i],self._as[i],self._bs[i],self._cs[i]) # Couplings for j in range(self.N): if i!=j: dy[i*3] += self.es[i,j] * (y[j*3]-y[i*3]) return dy def integrate(self,ts): rv = odeint(self.ode,self.y,ts)#,rtol=1e-4,atol=1e-8) #,hmin=0.0001) self.y = rv[-1,:] return rv class NRoesslerTransientCouplings(NRoessler): """Network of N coupled Roessler oscillators. The first one is regarded as external oscillator. During the transient disturbations, the coupling from this external oscillator is enabled. The external oscillator is reset at the beginning of each transient coupling. """ def __init__(self, omegasOrN = None, es=None, as_=None, bs=None, cs=None, transient_couplings = [], reset_offset = 100): """Like NRoessler, but with transient forces. trans_couplings: list of tuples (t_start, t_end, factor) """ NRoessler.__init__(self,omegasOrN,es,as_,bs,cs) self.original_es = self.es.copy() print "original_es", self.original_es #for tf in transient_couplings: # assert tf[0]>=0 and tf[0]<self.N self.transient_couplings = transient_couplings self.__last_t = 0 self._reset_offset = reset_offset self._external_reset = None self._external_reset_power = 5 def ode(self,y,t): # set reset values? if self._external_reset == None: if t>self._reset_offset: print "Setting reset_offset:", t, y[:3] self._external_reset = y[:3].copy() #adapt epsilons, with or without external oscillator? self.es[:,0] = np.zeros((self.N)) do_pull = False for tf in self.transient_couplings: if t>=tf[0] and t<tf[1]: self.es[:,0] = tf[2] * self.original_es[:,0] if abs(t-tf[0])<1: do_pull = True break #then normal dynamics dy = NRoessler.ode(self,y,t) # pulling external oscillator to reset value if self._external_reset != None: if do_pull: #print "pulling ext. osc. to", self._external_reset, "now:", y[:3] dy[:3] = (self._external_reset[:3]-y[:3])*self._external_reset_power if time.time()-self.__last_t > 10: print t self.__last_t = time.time() return dy class RoesslerBrainModel(NRoesslerTransientCouplings): """This system is designed to be a model for (visual) stimulus processing in the brain. It consists of (i) an external oscillator, during stimulus coupled to (ii) a collection of coupled oscillators repr. the visual cortex. From there, connections exist to (iii + iv) two other clusters of oscillators, repr. higher order brain structures. Each of these clusters has stronger internal couplings and some connections to the other cluster. No couplings go back to VC. """ def __init__(self,n_vc=20,n_c1=20,n_c2=20,e_v1=0.3,e_v2=0.3,e_12=0,e_21=0,transient_couplings=[],*args,**kwargs): n_all = 1+n_vc+n_c1+n_c2 # Gesamtzahl von Oszillatoren #Set connectivities epsilons = np.zeros((n_all,n_all),"d") epsilons[1+n_vc:1+n_vc+n_c1,1:1+n_vc] = np.random.random((n_c1,n_vc))*e_v1 # VC -> C1 epsilons[1+n_vc+n_c1:1+n_vc+n_c1+n_c2,1:1+n_vc] = np.random.random((n_c2,n_vc))*e_v2 # VC -> C2 epsilons[1+n_vc:1+n_vc+n_c1,1+n_vc+n_c1:1+n_vc+n_c1+n_c2] = np.random.random((n_c1,n_c2))*e_21 # C2 -> C1 epsilons[1+n_vc+n_c1:1+n_vc+n_c1+n_c2,1+n_vc:1+n_vc+n_c1] = np.random.random((n_c2,n_c1)) # C1 -> C2 NRoesslerTransientCouplings.__init__(self, n_all, es=epsilons, transient_couplings = transient_couplings, *args, **kwargs) self.original_es[1+n_vc:] = 0 # Keine Kopplung von externem Oszillator auf C1 / C2 class TwoRoesslerPulseCoupling(TwoRoessler): """Same as normal coupled Roessler Oscillators, but other coupling. A pulse-coupling, like in neurons, is implemented. The z-component of the driver makes the responder move outwards, away from the center of rotation. After each 'flip' in z-direction, each responder has a 'dead time' where it doesn't react to external driving.""" def __init__(self, y=None, omega1=1.03, omega2=0.97, e1=0, e2=0, deadtime1=5, deadtime2=5): TwoRoessler.__init__(self,y,omega1,omega2,e1,e2) self.dtime1 = deadtime1 self.dtime2 = deadtime2 self.fire_ts = [0,0] # Parameters which are changeable but not in contructor self.z_thres = 3 # when is a flip in z-direction regarded as firing? def ode(self,y,t): """Implements the dynamics. First, normal Roessler. Then coupling: if not in deadtime, the additional dy is in direction of (dy[0],dy[1]) and is scaled by dy[5], the z-component of the other oscillator""" dy = np.zeros((6)) dy[:3] = roessler_ode(y[:3],t,self.omega1) dy[3:] = roessler_ode(y[3:],t,self.omega2) #Coupling; Movement in xy-plane dxy = y[0:2]/np.sqrt(np.sum(y[0:2]**2)) * self.e1 * y[5] * int((t-self.fire_ts[0])>self.dtime1) #print dxy, y[0:2] #print dxy, dy[0:2], np.sqrt(np.sum(dy[0:2]**2)), self.e1, y[5], int((t-self.fire_ts[0])>self.dtime1) #print "dxy:", dxy, dy[0] += dxy[0] dy[1] += dxy[1] dxy = y[3:5]/np.sqrt(np.sum(y[3:5]**2)) * self.e2 * y[2] * int((t-self.fire_ts[1])>self.dtime2) #print " ", dxy, y[3:5] #time.sleep(0.1) #print " ", dxy, dy[3:5], np.sqrt(np.sum(dy[3:5]**2)), self.e1, y[2], int((t-self.fire_ts[1])>self.dtime2) #print "dxy:", dxy dy[3] += dxy[0] dy[4] += dxy[1] if abs(y[2]-self.z_thres)<0.1 and dy[2]>0: #when z goes up and near thres: start dead-time self.fire_ts[0] = t #print t if abs(y[5]-self.z_thres)<0.1 and dy[5]>0: #when z goes up and near thres: start dead-time self.fire_ts[1] = t #print " ", t return dy #TODO: implement! class StochasticRoessler(Roessler): """Roessler-Oszillator with intrinsic noise. Uses rk4 instead of odeint. """ def __init__(self, y=None, omega=1.0, a=0.165,b=0.2,c=10,sigma=1.5): Roessler.__init__(self,y,omega,a,b,c) if not 0<=sigma: raise ValueError("StochasticRoessler: sigma must be non-negative float") self.sigma = sigma def ode(self,y,t): dy = roessler_ode(y[:],t,self.omega,self.a,self.b,self.c) dy[0] += self.sigma*np.random.normal(0,1) return dy def integrate(self,ts): #rv = eulerint(self.ode,self.y,ts,h=10**-2) rv = rk4int(self.ode,self.y,ts,h=1e-3) #rv = odeint(self.ode,self.y,ts) self.y = rv[-1,:] return rv class TwoStochasticRoessler(TwoRoessler): """Two coupled stochastic Roessler oscillators""" def __init__(self, y=None, omega1=1.03, omega2=0.97, e1=0, e2=0, a1=0.165, a2=0.165, b1=0.2, b2=0.2, c1=10, c2=10, sigma1=1.5, sigma2=1.5): TwoRoessler.__init__(self,y,omega1,omega2,e1,e2,a1,a2,b1,b2,c1,c2) if not 0<=sigma1: raise ValueError("StochasticRoessler: sigma1 must be non-negative float") if not 0<=sigma2: raise ValueError("StochasticRoessler: sigma2 must be non-negative float") self.sigma1 = sigma1 self.sigma2 = sigma2 def ode(self,y,t): dy = np.zeros((6)) dy[:3] = roessler_ode(y[:3],t,self.omega1,self.a1,self.b1,self.c1) dy[3:] = roessler_ode(y[3:],t,self.omega2,self.a2,self.b2,self.c2) dy[0] += self.e1 * (y[3]-y[0]) dy[3] += self.e2 * (y[0]-y[3]) dy[0] += self.sigma1*np.random.normal(0,1) dy[3] += self.sigma2*np.random.normal(0,1) return dy def integrate(self,ts): #rv = eulerint(self.ode,self.y,ts,h=10**-2) rv = rk4int(self.ode,self.y,ts,h=1e-3) #rv = odeint(self.ode,self.y,ts) self.y = rv[-1,:] return rv #if __name__ == "__main__": #import matplotlib as mpl #from mpl_toolkits.mplot3d import Axes3D #import matplotlib.pyplot as plt #mpl.rcParams['legend.fontsize'] = 10 ############################ ##Test 1: Zwei unabhängige Rössler #fig = plt.figure(1) ##p.subplot(121) #ax = fig.gca(projection='3d') ##theta = np.linspace(-4 * np.pi, 4 * np.pi, 100) ##z = np.linspace(-2, 2, 100) ##r = z**2 + 1 ##x = r * np.sin(theta) ##y = r * np.cos(theta) #v = odeint(roessler_ode, np.random.random((3))*2-1, np.arange(1000,1200,0.01),args=(1.03,0.165,0.2,10)) #x1 = v[:,0] #y1 = v[:,1] #z1 = v[:,2] #ax.plot(x1, y1, z1, label='omega = 1.03') #v = odeint(roessler_ode, np.random.random((3))*2-1, np.arange(1000,1200,0.01),args=(0.97,0.165,0.2,10)) #x2 = v[:,0] #y2 = v[:,1] #z2 = v[:,2] #ax.plot(x2-30, y2, z2, label='omega = 0.97') #ax.legend() #plt.figure(2) ##p.subplot(122) #p.plot(x1[::10]) #p.plot(x2[::10]) #plt.show() #Test 2: Zwei symmetrisch gekoppelte Rössler #fig = plt.figure(1) #plt.subplot(121) ##ax = fig.gca(projection='3d') #tr = TwoRoessler(e1=0.01,e2=0.01) #v = tr.integrate(np.arange(0,2200,0.01))[-20000:] #x1 = v[:,0] #y1 = v[:,1] #z1 = v[:,2] #x2 = v[:,3] #y2 = v[:,4] #z2 = v[:,5] #ax.plot(x1, y1, z1, label='omega = 1.03') #ax.plot(x2-30, y2, z2, label='omega = 0.97') #ax.legend() #plt.figure(2) #p.subplot(122) #p.plot(x1[::10]) #p.plot(x2[::10]) #plt.show() # #from eegpy.analysis.phases import phase_coherence #for e in np.arange(0.0,0.16,0.02): # print "e=%f"%e # tr = TwoRoessler(e1=e,e2=e) # v = tr.integrate(np.arange(0,2200,0.01))[-20000:] # pc = phase_coherence(v[:,0],v[:,3]) # print "R=%.3f"%pc ##Test 3: Zehn Rössler mit 2 Treibern #fig = plt.figure(1) #epsilons = np.zeros((10,10)) #epsilons[:,3] = np.ones((10))*0.1 #epsilons[:,-3] = np.ones((10))*0.2 #epsilons[3,-3] = epsilons[-3,3] = 0 #print "epsilons", epsilons #nr = NRoessler(es=epsilons) #v = nr.integrate(np.arange(0,2200,0.01))[-20000:] #from eegpy.analysis.phases import phase_coherence #pcs = np.ones((10,10)) #for i in range(10): # for j in range(i): # pcs[i,j] = pcs[j,i] = phase_coherence(v[:,i*3],v[:,j*3]) #p.hot() #p.imshow(pcs,interpolation="nearest",vmin=0,vmax=1) ##Test 4: Zehn Rössler mit 2 Treibern und transienter Kraft #n_roe = 30#30 #omegas = np.random.normal(0.89,0.05,(n_roe)) #epsilons = np.zeros((n_roe,n_roe)) ##epsilons = np.random.random((n_roe,n_roe))*0.003 #epsilons[2:10,2:10] = np.random.random((8,8))*0.03 #epsilons[20:25,20:25] = np.random.random((5,5))*0.03 #epsilons[0,:] = np.zeros((n_roe)) #epsilons[:,0] = np.random.random((n_roe))*0.03+0.03 ##epsilons[:,3] = np.ones((10))*0.1 ##epsilons[:,-3] = np.ones((10))*0.06 ##epsilons[3,-3] = epsilons[-3,3] = 0 #print "omegas", omegas #print "epsilons", epsilons #transient_couplings = [(300,340,5.0)] #for i in range(7): # offset = np.random.randint(80,120) # transient_couplings.append((transient_couplings[-1][0]+offset, transient_couplings[-1][1]+offset,5.0)) #nr = NRoesslerTransientCouplings(omegas,es=epsilons,transient_couplings=transient_couplings, reset_offset=100) #v = nr.integrate(np.arange(0,1100,0.1)) #print v.shape #p.figure(1) #for tc in transient_couplings: # p.axvspan(tc[0],tc[1],color="b",alpha=0.1) #for i in range(n_roe): # p.plot(np.arange(0,1100,0.1),v[:,i*3]-i*30) #p.fill_between(np.arange(0,1100,0.1),v[:,::3].mean(axis=1)-(i+1)*30-v[:,::3].std(axis=1),v[:,::3].mean(axis=1)-(i+1)*30+v[:,::3].std(axis=1),alpha=0.2) #p.plot(np.arange(0,1100,0.1),v[:,::3].mean(axis=1)-(i+1)*30,"k-",lw=2) #p.figure(2) #from eegpy.analysis.phases import phase_coherence #coherence = np.ones((n_roe,n_roe)) #for i in range(n_roe): # for j in range(i): # coherence[i,j] = coherence[j,i] = phase_coherence(v[:,i*3],v[:,j*3]) #p.hot() #p.imshow(coherence,vmin=0,vmax=1,interpolation="nearest") ##Test 5: Stochastic Roessler #fig = plt.figure(1) #tr = StochasticRoessler(sigma=1.5) ##tr = Roessler() ##assert 1==0 #v = tr.integrate(np.arange(0,200,0.01))[-20000:] ##assert 1==0 #x1 = v[:,0] #y1 = v[:,1] #z1 = v[:,2] #plt.plot(x1, label='x') #plt.plot(y1, label='y') #plt.plot(z1, label='z') #plt.legend() ##plt.figure(2) ##plt.show() ##Test 6: Two Stochastic Roessler #fig = plt.figure(1) #tr = TwoStochasticRoessler(e1=0,e2=0.05,sigma1=1.5,sigma2=1.5) ##tr = Roessler() ##assert 1==0 #v = tr.integrate(np.arange(0,500,0.01))[-20000:] ##assert 1==0 #x1 = v[:,0] #y1 = v[:,1] #z1 = v[:,2] #x2 = v[:,3] #plt.plot(x1, label='x1') ##plt.plot(y1, label='y') ##plt.plot(z1, label='z') #plt.plot(x2, label='x2') #plt.legend() ##plt.figure(2) ##plt.show() #Test 7: Two Roessler, one with damping, transient coupling #roe = NRoesslerTransientCouplings(omegasOrN=np.array([1.0,3.0]),es=np.array([[0,0.0],[3.5,0]]),as_=[0.165,-0.05],transient_couplings=[(300,350,1.)]) #v = roe.integrate(np.arange(10,1000,0.5)) #p.plot(np.arange(10,1000,0.5),v[:,0],"b") #p.plot(np.arange(10,1000,0.5),v[:,3]-30,"r") #p.plot(np.arange(10,1000,0.5),v[:,4]-50,"r") #p.plot(np.arange(10,1000,0.5),v[:,5]-70,"r")
from pyecharts.charts import Sunburst from pyecharts import options as opts """ Gallery 使用 pyecharts 1.2.1 参考地址: https://www.echartsjs.com/examples/editor.html?c=sunburst-simple 目前无法实现的功能: 1、暂无 """ data = [ { "name": "Flora", "itemStyle": {"color": "#da0d68"}, "children": [ {"name": "Black Tea", "value": 1, "itemStyle": {"color": "#975e6d"}}, { "name": "Floral", "itemStyle": {"color": "#e0719c"}, "children": [ { "name": "Chamomile", "value": 1, "itemStyle": {"color": "#f99e1c"}, }, {"name": "Rose", "value": 1, "itemStyle": {"color": "#ef5a78"}}, {"name": "Jasmine", "value": 1, "itemStyle": {"color": "#f7f1bd"}}, ], }, ], }, { "name": "Fruity", "itemStyle": {"color": "#da1d23"}, "children": [ { "name": "Berry", "itemStyle": {"color": "#dd4c51"}, "children": [ { "name": "Blackberry", "value": 1, "itemStyle": {"color": "#3e0317"}, }, { "name": "Raspberry", "value": 1, "itemStyle": {"color": "#e62969"}, }, { "name": "Blueberry", "value": 1, "itemStyle": {"color": "#6569b0"}, }, { "name": "Strawberry", "value": 1, "itemStyle": {"color": "#ef2d36"}, }, ], }, { "name": "Dried Fruit", "itemStyle": {"color": "#c94a44"}, "children": [ {"name": "Raisin", "value": 1, "itemStyle": {"color": "#b53b54"}}, {"name": "Prune", "value": 1, "itemStyle": {"color": "#a5446f"}}, ], }, { "name": "Other Fruit", "itemStyle": {"color": "#dd4c51"}, "children": [ {"name": "Coconut", "value": 1, "itemStyle": {"color": "#f2684b"}}, {"name": "Cherry", "value": 1, "itemStyle": {"color": "#e73451"}}, { "name": "Pomegranate", "value": 1, "itemStyle": {"color": "#e65656"}, }, { "name": "Pineapple", "value": 1, "itemStyle": {"color": "#f89a1c"}, }, {"name": "Grape", "value": 1, "itemStyle": {"color": "#aeb92c"}}, {"name": "Apple", "value": 1, "itemStyle": {"color": "#4eb849"}}, {"name": "Peach", "value": 1, "itemStyle": {"color": "#f68a5c"}}, {"name": "Pear", "value": 1, "itemStyle": {"color": "#baa635"}}, ], }, { "name": "Citrus Fruit", "itemStyle": {"color": "#f7a128"}, "children": [ { "name": "Grapefruit", "value": 1, "itemStyle": {"color": "#f26355"}, }, {"name": "Orange", "value": 1, "itemStyle": {"color": "#e2631e"}}, {"name": "Lemon", "value": 1, "itemStyle": {"color": "#fde404"}}, {"name": "Lime", "value": 1, "itemStyle": {"color": "#7eb138"}}, ], }, ], }, { "name": "Sour/\nFermented", "itemStyle": {"color": "#ebb40f"}, "children": [ { "name": "Sour", "itemStyle": {"color": "#e1c315"}, "children": [ { "name": "Sour Aromatics", "value": 1, "itemStyle": {"color": "#9ea718"}, }, { "name": "Acetic Acid", "value": 1, "itemStyle": {"color": "#94a76f"}, }, { "name": "Butyric Acid", "value": 1, "itemStyle": {"color": "#d0b24f"}, }, { "name": "Isovaleric Acid", "value": 1, "itemStyle": {"color": "#8eb646"}, }, { "name": "Citric Acid", "value": 1, "itemStyle": {"color": "#faef07"}, }, { "name": "Malic Acid", "value": 1, "itemStyle": {"color": "#c1ba07"}, }, ], }, { "name": "Alcohol/\nFremented", "itemStyle": {"color": "#b09733"}, "children": [ {"name": "Winey", "value": 1, "itemStyle": {"color": "#8f1c53"}}, {"name": "Whiskey", "value": 1, "itemStyle": {"color": "#b34039"}}, { "name": "Fremented", "value": 1, "itemStyle": {"color": "#ba9232"}, }, {"name": "Overripe", "value": 1, "itemStyle": {"color": "#8b6439"}}, ], }, ], }, { "name": "Green/\nVegetative", "itemStyle": {"color": "#187a2f"}, "children": [ {"name": "Olive Oil", "value": 1, "itemStyle": {"color": "#a2b029"}}, {"name": "Raw", "value": 1, "itemStyle": {"color": "#718933"}}, { "name": "Green/\nVegetative", "itemStyle": {"color": "#3aa255"}, "children": [ { "name": "Under-ripe", "value": 1, "itemStyle": {"color": "#a2bb2b"}, }, {"name": "Peapod", "value": 1, "itemStyle": {"color": "#62aa3c"}}, {"name": "Fresh", "value": 1, "itemStyle": {"color": "#03a653"}}, { "name": "Dark Green", "value": 1, "itemStyle": {"color": "#038549"}, }, { "name": "Vegetative", "value": 1, "itemStyle": {"color": "#28b44b"}, }, {"name": "Hay-like", "value": 1, "itemStyle": {"color": "#a3a830"}}, { "name": "Herb-like", "value": 1, "itemStyle": {"color": "#7ac141"}, }, ], }, {"name": "Beany", "value": 1, "itemStyle": {"color": "#5e9a80"}}, ], }, { "name": "Other", "itemStyle": {"color": "#0aa3b5"}, "children": [ { "name": "Papery/Musty", "itemStyle": {"color": "#9db2b7"}, "children": [ {"name": "Stale", "value": 1, "itemStyle": {"color": "#8b8c90"}}, { "name": "Cardboard", "value": 1, "itemStyle": {"color": "#beb276"}, }, {"name": "Papery", "value": 1, "itemStyle": {"color": "#fefef4"}}, {"name": "Woody", "value": 1, "itemStyle": {"color": "#744e03"}}, { "name": "Moldy/Damp", "value": 1, "itemStyle": {"color": "#a3a36f"}, }, { "name": "Musty/Dusty", "value": 1, "itemStyle": {"color": "#c9b583"}, }, { "name": "Musty/Earthy", "value": 1, "itemStyle": {"color": "#978847"}, }, {"name": "Animalic", "value": 1, "itemStyle": {"color": "#9d977f"}}, { "name": "Meaty Brothy", "value": 1, "itemStyle": {"color": "#cc7b6a"}, }, {"name": "Phenolic", "value": 1, "itemStyle": {"color": "#db646a"}}, ], }, { "name": "Chemical", "itemStyle": {"color": "#76c0cb"}, "children": [ {"name": "Bitter", "value": 1, "itemStyle": {"color": "#80a89d"}}, {"name": "Salty", "value": 1, "itemStyle": {"color": "#def2fd"}}, { "name": "Medicinal", "value": 1, "itemStyle": {"color": "#7a9bae"}, }, { "name": "Petroleum", "value": 1, "itemStyle": {"color": "#039fb8"}, }, {"name": "Skunky", "value": 1, "itemStyle": {"color": "#5e777b"}}, {"name": "Rubber", "value": 1, "itemStyle": {"color": "#120c0c"}}, ], }, ], }, { "name": "Roasted", "itemStyle": {"color": "#c94930"}, "children": [ {"name": "Pipe Tobacco", "value": 1, "itemStyle": {"color": "#caa465"}}, {"name": "Tobacco", "value": 1, "itemStyle": {"color": "#dfbd7e"}}, { "name": "Burnt", "itemStyle": {"color": "#be8663"}, "children": [ {"name": "Acrid", "value": 1, "itemStyle": {"color": "#b9a449"}}, {"name": "Ashy", "value": 1, "itemStyle": {"color": "#899893"}}, {"name": "Smoky", "value": 1, "itemStyle": {"color": "#a1743b"}}, { "name": "Brown, Roast", "value": 1, "itemStyle": {"color": "#894810"}, }, ], }, { "name": "Cereal", "itemStyle": {"color": "#ddaf61"}, "children": [ {"name": "Grain", "value": 1, "itemStyle": {"color": "#b7906f"}}, {"name": "Malt", "value": 1, "itemStyle": {"color": "#eb9d5f"}}, ], }, ], }, { "name": "Spices", "itemStyle": {"color": "#ad213e"}, "children": [ {"name": "Pungent", "value": 1, "itemStyle": {"color": "#794752"}}, {"name": "Pepper", "value": 1, "itemStyle": {"color": "#cc3d41"}}, { "name": "Brown Spice", "itemStyle": {"color": "#b14d57"}, "children": [ {"name": "Anise", "value": 1, "itemStyle": {"color": "#c78936"}}, {"name": "Nutmeg", "value": 1, "itemStyle": {"color": "#8c292c"}}, {"name": "Cinnamon", "value": 1, "itemStyle": {"color": "#e5762e"}}, {"name": "Clove", "value": 1, "itemStyle": {"color": "#a16c5a"}}, ], }, ], }, { "name": "Nutty/\nCocoa", "itemStyle": {"color": "#a87b64"}, "children": [ { "name": "Nutty", "itemStyle": {"color": "#c78869"}, "children": [ {"name": "Peanuts", "value": 1, "itemStyle": {"color": "#d4ad12"}}, {"name": "Hazelnut", "value": 1, "itemStyle": {"color": "#9d5433"}}, {"name": "Almond", "value": 1, "itemStyle": {"color": "#c89f83"}}, ], }, { "name": "Cocoa", "itemStyle": {"color": "#bb764c"}, "children": [ { "name": "Chocolate", "value": 1, "itemStyle": {"color": "#692a19"}, }, { "name": "Dark Chocolate", "value": 1, "itemStyle": {"color": "#470604"}, }, ], }, ], }, { "name": "Sweet", "itemStyle": {"color": "#e65832"}, "children": [ { "name": "Brown Sugar", "itemStyle": {"color": "#d45a59"}, "children": [ {"name": "Molasses", "value": 1, "itemStyle": {"color": "#310d0f"}}, { "name": "Maple Syrup", "value": 1, "itemStyle": {"color": "#ae341f"}, }, { "name": "Caramelized", "value": 1, "itemStyle": {"color": "#d78823"}, }, {"name": "Honey", "value": 1, "itemStyle": {"color": "#da5c1f"}}, ], }, {"name": "Vanilla", "value": 1, "itemStyle": {"color": "#f89a80"}}, {"name": "Vanillin", "value": 1, "itemStyle": {"color": "#f37674"}}, {"name": "Overall Sweet", "value": 1, "itemStyle": {"color": "#e75b68"}}, {"name": "Sweet Aromatics", "value": 1, "itemStyle": {"color": "#d0545f"}}, ], }, ] c = ( Sunburst(init_opts=opts.InitOpts(width="1000px", height="600px")) .add( "", data_pair=data, highlight_policy="ancestor", radius=[0, "95%"], sort_="null", levels=[ {}, { "r0": "15%", "r": "35%", "itemStyle": {"borderWidth": 2}, "label": {"rotate": "tangential"}, }, {"r0": "35%", "r": "70%", "label": {"align": "right"}}, { "r0": "70%", "r": "72%", "label": {"position": "outside", "padding": 3, "silent": False}, "itemStyle": {"borderWidth": 3}, }, ], ) .set_global_opts(title_opts=opts.TitleOpts(title="Sunburst-官方示例")) .set_series_opts(label_opts=opts.LabelOpts(formatter="{b}")) .render("drink_flavors.html") )
'use strict'; // STEP 1 // This is a standard function expression. You may also be familiar with function declarations, which begin with the "function" keyword. const theOldWay = function(course) { return `I am currently enrolled in ${course}`; }; // TODO: Uncomment the following line of code to see the output in the browser console console.log('The old way:', theOldWay('Code 301')); // STEP 2 // We can refactor our first function to use an arrow function. // The word "function" is removed and an arrow is added in between the parameter and the opening curly brace const theNewWay = (course) => { return `I am currently enrolled in ${course}`; }; // TODO: Uncomment the following line of code to see the output in the browser console console.log('The new way:', theNewWay('Code 301')); // STEP 3 // When we have one parameter, we can omit the parentheses const withoutParens = course => { return `I am currently enrolled in ${course}`; }; // TODO: Uncomment the following line of code to see the output in the browser console console.log('Without parens:', withoutParens('Code 301')); // STEP 4 // If the code block contains a single line of code, we can write everything on one line // We no longer need the curly braces and the return is implicit // Without an arrow function, we need to explicitly type "return" const oneLiner = course => `I cam currently enrolled in ${course}`; // TODO: Uncomment the following line of code to see the output in the browser console console.log('As a one-liner:', oneLiner('Code 301')); // STEP 5 // What if we have multiple parameters? // In a function expression, they all go in the parentheses const add = function(num1, num2) { return `${num1} + ${num2} = ${num1 + num2}`; }; // TODO: Uncomment the following line of code to see the output in the browser console console.log('Let\'s do some math:', add(4, 5)); // STEP 6 // When we have multiple parameters, they must be wrapped in parentheses // We can only remove the parentheses when there is a single parameter const addOneLiner = (num1, num2) => `${num1} + ${num2} = ${num1 + num2}`; // TODO: Uncomment the following line of code to see the output in the browser console console.log('Add as a one-liner:', addOneLiner(4, 5)); // STEP 7 // What if we have multiple lines of code? // We need to use a code block const multiLiner = word => { word = word.toUpperCase(); return word; }; // TODO: Uncomment the following line of code to see the output in the browser console console.log('Multi-line arrow function:', multiLiner('hello')); // STEP 8 // The way an object is returned is different with an arrow function, too. // Here is how we return an object without arrow functions const oldObject = function(array) { return { firstValue: array[0], secondValue: array[1], thirdValue: array[2] }; }; // TODO: Uncomment the following line of code to see the output in the browser console console.log('Hello from the old object function', oldObject(['hi', 'hello', 'are you there?'])); // STEP 9 // With an arrow function, we need to wrap our object in parentheses // Otherwise, it will be interpreted as a code block const newObject = array => ({ firstValue: array[0], secondValue: array[1], thirdValue: array[2] }); // TODO: Uncomment the following line of code to see the output in the browser console console.log('Hello from the new object function', newObject(['hi', 'hello', 'are you there?'])); // STEP 10 // Uncomment the console.log lines to view the output of each function in the browser console. // Refactor each function into an arrow function. // Write your solutions on a single line wherever possible. let sum = function(a, b, c, d) { return a + b + c + d; }; let newSum = (a, b, c, d) => a + b + c + d; // TODO: Uncomment the following line of code to see the output in the browser console console.log(sum(1, 2, 3, 4)); console.log(newSum(1, 2, 3, 4)); let objectLit = function() { return { key1: 'value1', key2: 'value2', key3: 'value3', }; }; let newObjectList = () => ({ key1: 'value1', key2: 'value2', key3: 'value3', }); // TODO: Uncomment the following line of code to see the output in the browser console console.log(objectLit()); console.log(newObjectList()); let sumAndProduct = function(a, b) { let sum = a + b; let product = a * b; return [sum, product]; }; let newSumAndProduct = (a, b) => { let sum = a + b; let product = a * b; return [sum, product]; } // TODO: Uncomment the following line of code to see the output in the browser console console.log(sumAndProduct(3, 9)); console.log(newSumAndProduct(3, 9)); let message = function(name) { return `Hello, ${name}!`; }; let newMessage = (name) => `Hello, ${name}!`; // TODO: Uncomment the following line of code to see the output in the browser console console.log(message('Allie')); console.log(newMessage ('Allie')); let Student = function(name, age, hometown) { this.name = name; this.age = age; this.hometown = hometown; }; let joe = new Student('Joe', 'Schmoe', 100); let Student2 = (name, age, hometown) => { this.name = name; this.age = age; this.hometown = hometown; } let joe2 = ('Joe', 'Schmoe', 100); // TODO: Uncomment the following line of code to see the output in the browser console // Note that the arrow function will cause this code to break! console.log(joe); console.log(joe2); // TODO: After viewing the previous console.log(), return the code to a working state. Student.prototype.greeting = function() { return `Hi, my name is ${this.name}`; }; // TODO: Uncomment the following line of code to see the output in the browser console // Note that the arrow function will cause this method to break! console.log(joe.greeting()); // TODO: After viewing the previous console.log(), return the code to a working state. Student.courseName = function() { return 'This student is enrolled in Code 301.'; }; // TODO: Uncomment the following line of code to see the output in the browser console console.log(Student.courseName()); // STEP 11 // How do arrow functions affect constructor functions? Student.prototype.scope = function() { console.log(this); }; // TODO: Uncomment the following line of code to see the output in the browser console // console.log(joe.scope()); Student.prototype.scopeArrow = () => console.log(this); // TODO: Uncomment the following line of code to see the output in the browser console // console.log(joe.scopeArrow()); // TODO: Write a COMMENT below to answer the following questions. // 1. What is "this" when joe.scope() is invoked? // // 2. What is "this" when joe.scopeArrow() is invoked? // // 3. Explain why "this" is different when an arrow function is used. //
""" Route factories and other reusable code --------------------------------------- Factories for utility functions and API routes are defined in this module along with some `FastAPI`_ dependencies. The route factories perform the repetitive grunt work required to set up the typical 'create', 'read', 'update', 'delete' and 'list' functions needed for basic object management. In order to avoid extra levels of metaprogramming, the parameter name for the record ID of the main object involved in a factory-generated API call is ``item_id``, since it is clear, brief and generic. Apologies to future subclassors who want an 'items' table. These route factories are used to create all the routes for :mod:`~chapps.rest.routers.users`, :mod:`~chapps.rest.routers.emails`, :mod:`~chapps.rest.routers.domains`, and :mod:`~chapps.rest.routers.quotas`. """ from typing import Optional, List from sqlalchemy.orm import sessionmaker from sqlalchemy.exc import IntegrityError from fastapi import status, Depends, Body, HTTPException from functools import wraps import inspect import logging from chapps.dbsession import sql_engine from chapps.models import ( CHAPPSModel, CHAPPSResponse, AssocOperation, DeleteResp, TextResp, ) from chapps.dbmodels import JoinAssoc import chapps.logging logger = logging.getLogger(__name__) logger.setLevel(chapps.logging.DEFAULT_LEVEL) async def list_query_params( skip: Optional[int] = 0, limit: Optional[int] = 1000, q: Optional[str] = "%", ) -> dict: """FastAPI dependency for list queries""" return dict(q=q, skip=skip, limit=limit) def model_name(cls) -> str: """Convenience function to get the lowercase name of a model""" return cls.__name__.lower() def load_model_with_assoc(cls, assoc: List[JoinAssoc], engine=sql_engine): """Create a closure which loads an object along with arbitrary associations This isn't meant to create an API route on its own, but it may be used in API routes. It is mainly used in :mod:`~chapps.rest.routers.live` routes, which are currently all one-offs, not created by factories. In order to return a closure which can work in any context, it does not return a coroutine but a standard synchronous closure. :param ~.CHAPPSModel cls: a data model class :param assoc: a list of associations (as :class:`~.JoinAssoc` objects) :param Optional[~sqlalchemy.engine.Engine] engine: defaults to :const:`chapps.dbsession.sql_engine` if not specified :rtype: callable :returns: a closure as follows: .. py:function:: f(item_id: int, name: Optional[str]) :param int item_id: if non-zero, the ID of the main record :param Optional[str] name: if `item_id` is 0, the `name` of the record to match. :rtype: Tuple[~.CHAPPSModel, Dict[str, List[~.CHAPPSModel]], List[str]] :returns: a :obj:`tuple` containing: 1. the object loaded by ID or name 2. that object's associations in a :obj:`dict` keyed on attribute name (e.g. 'quota', 'domains') 3. a list of string remarks, which may have no contents """ mname = model_name(cls) assoc_s = "_".join([a.assoc_name for a in assoc]) fname = f"load_{mname}_with_{assoc_s}" Session = sessionmaker(engine) def get_model_and_assoc(item_id: int, name: Optional[str]): remarks = [] items = {k: None for k in [mname, *[a.assoc_name for a in assoc]]} with Session() as sess: if item_id: items[mname] = sess.scalar(cls.select_by_id(item_id)) if name and not items[mname]: items[mname] = sess.scalar(cls.select_by_name(name)) if items[mname] and item_id: remarks.append( f"Selecting {mname} {items[mname].name} with " f"id {items[mname].id} by name because " "provided id does not exist." ) if not items[mname] and not (item_id or name): logger.debug( # log this, as it is weird f"{fname}({item_id!r}, {name!r}): unable to load {mname}" ) raise HTTPException( # describe error to the caller status_code=status.HTTP_400_BAD_REQUEST, detail=( f"One of {cls.id_name()} or name must be provided. " "If both are provided, {cls.id_name()} is preferred." ), ) if items[mname]: for a in assoc: items[a.assoc_name] = getattr(items[mname], a.assoc_name) else: detail = "No {mname} could be found with " if item_id: detail += "id {item_id}" if name: detail += f" or with " if name: detail += "name {name}" raise HTTPException( status_code=status.HTTP_404_NOT_FOUND, detail=detail ) return (items.pop(mname), items, remarks) get_model_and_assoc.__name__ = fname return get_model_and_assoc def db_interaction( # a decorator with parameters *, cls, engine=sql_engine, exception_message: str = ("{route_name}:{model}"), empty_set_message: str = ("Unable to find a matching {model}"), ): """Decorator for database interactions :param ~chapps.models.CHAPPSModel cls: the data model class :param ~sqlalchemy.engine.Engine engine: an :mod:`SQLAlchemy` engine, which defaults to the package-wide one declared in :mod:`~chapps.dbsession` :param str exception_message: a message to include if any untrapped exception occurs; defaults to ``{route_name}:{model}``. Only those two symbols are available for expansion. All arguments are appended. :param str empty_set_message: included if a SELECT results in an empty set; defaults to ``Unable to find a matching {model}`` and supports both substitutions that `exception_message` does :returns: a `decorator`_ closure, which will be called with the function to be `decorated`_ as its argument. In this case, the function is expected to be a coroutine which is being manufactured for use in the API, and so the decorator closure returned by this routine defines a `coroutine`_ to wrap and await its argument, which is ultimately returned and used as the API route. :rtype: callable which wraps and returns a coroutine The decorator sets up some global symbols for use inside the API route coroutines: :session: a :class:`~sqlalchemy.orm.Session` instance created in a context containing the execution of the wrapped coroutine, suitable for performing database interactions, and which will be automatically closed after the coroutine completes :model_name: a string containing the lowercase name of the model .. _decorator: https://docs.python.org/3/glossary.html#term-decorator .. _decorated: https://peps.python.org/pep-0318/ .. _coroutine: https://docs.python.org/3/library/asyncio-task.html#coroutines """ mname = model_name(cls) Session = sessionmaker(engine) def interaction_wrapper(rt_coro): exc = exception_message.format( route_name=rt_coro.__name__, model=mname ) empty = empty_set_message.format( route_name=rt_coro.__name__, model=mname ) @wraps(rt_coro) async def wrapped_interaction(*args, **kwargs): with Session() as session: rt_coro.__globals__["session"] = session rt_coro.__globals__["model_name"] = mname try: result = await rt_coro(*args, **kwargs) if result: return result except Exception: logger.exception(exc + f"({args!r},{kwargs!r})") raise HTTPException(status_code=404, detail=empty) wrapped_interaction.__doc__ = rt_coro.__doc__ return wrapped_interaction # a coroutine return interaction_wrapper # a regular function def get_item_by_id( cls, *, response_model, engine=sql_engine, assoc: Optional[List[JoinAssoc]] = None, ): """Build a route coroutine to get an item by ID :param ~chapps.models.CHAPPSModel cls: the main data model for the request :param ~chapps.models.CHAPPSResponse response_model: the response model :param ~sqlalchemy.engine.Engine engine: defaults to :const:`~chapps.dbsession.sql_engine` :param List[~chapps.rest.dbmodels.JoinAssoc] assoc: if included, these associations will be included as optional keys in the response At present there is no provision for dealing with extremely long association lists. Even if there were 500 elements, the response would not be extremely large. .. note:: An alternate closure factory for creating routes which specifically list associations does provide pagination, etc. See :func:`~.list_associated` The factory produces a coroutine decorated with the :func:`~.db_interaction` decorator, as do all the route factories. Its signature is: .. code:: python async def get_i(item_id: int) -> response_model The factory sets the final closure's name and doc metadata properly to ensure that the automatic documentation is coherent and accurate. All the route factories do this to a greater or lesser extent. .. todo:: provide option for API user to suppress each association perhaps something like `no_list_domains` as part of the query params """ mname = model_name(cls) @db_interaction(cls=cls, engine=engine) async def get_i(item_id: int): stmt = cls.select_by_id(item_id) item = session.scalar(stmt) if item: if assoc: extra_args = { a.assoc_name: a.assoc_model.wrap( getattr(item, a.assoc_name) ) for a in assoc } return response_model.send(cls.wrap(item), **extra_args) else: return response_model.send(cls.wrap(item)) get_i.__name__ = f"get_{model_name(cls)}" get_i.__doc__ = ( f"Retrieve **{mname}** records by ID, " "along with all (up to 1000) associated records." ) return get_i def list_items(cls, *, response_model, engine=sql_engine): """Build a route coroutine to list items :param ~chapps.models.CHAPPSModel cls: the main data model for the request :param ~chapps.models.CHAPPSResponse response_model: the response model :param ~sqlalchemy.engine.Engine engine: defaults to :const:`~chapps.dbsession.sql_engine` The returned closure expects to receive the query parameters as a dict, since that is what the dependency will return. Its signature is .. code:: python async def list_i(qparams: dict = Depends(list_query_params)) The closure's name and document metadata are updated to ensure coherence and accuracy of the automatic API documentation. For an example of using this factory, see :ref:`Listing Domains <listing-domains>`. """ mname = model_name(cls) @db_interaction(cls=cls, engine=engine) async def list_i(qparams: dict = Depends(list_query_params)): stmt = cls.windowed_list(**qparams) items = cls.wrap(session.scalars(stmt)) if items: return response_model.send(items) list_i.__name__ = f"list_{model_name(cls)}" list_i.__doc__ = f""" List **{mname}** records.<br/> Pass a substring to match as `q`.<br/> Paginate by providing `skip` and `limit`. """ return list_i def list_associated( cls: CHAPPSModel, *, assoc: JoinAssoc, response_model: CHAPPSResponse, engine=sql_engine, ): """Build a route to list associated items with pagination :param cls: the main data model :param assoc: the association to list :param response_model: the response model :param sqlalchemy.engine.Engine engine: defaults to :const:`~chapps.dbsession.sql_engine` The returned coroutine will paginate a list of the associated objects, given the ID of a main (source) object to use to select associations. The `qparams` parameter is a bundle of standard listing query parameters defined by :func:`.list_query_params` via the :class:`fastapi.Depends` mechanism. .. code:: python async def assoc_list(item_id: int, qparams: dict) -> response_model It returns in the `response` key of its output a list of the associated object, goverened by the search and window parameters in `qparams`. """ mname = model_name(cls) fname = f"{mname}_list_{assoc.assoc_name}" @db_interaction(cls=cls, engine=engine) async def assoc_list( item_id: int, qparams: dict = Depends(list_query_params) ): stmt = assoc.assoc_model.windowed_list_by_ids( subquery=assoc.select_ids_by_source_id(item_id), **qparams ) assocs = assoc.assoc_model.wrap(session.scalars(stmt)) if assocs: return response_model.send(assocs) assoc_list.__name__ = fname assoc_list.__doc__ = ( f"List **{assoc.assoc_name}** associated with a particular **{mname}**," " identified by ID.<br/>Supply standard query parameters for matching and" " pagination." ) return assoc_list def delete_item(cls, *, response_model=DeleteResp, engine=sql_engine): """Build a route coroutine to delete an item by ID :param ~chapps.models.CHAPPSModel cls: the data model to manage :param ~chapps.models.CHAPPSResponse response_model: defaults to :class:`~chapps.models.DeleteResp` :param ~sqlalchemy.engine.Engine engine: defaults to :const:`~chapps.dbsession.sql_engine` The returned coroutine accepts a list of record IDs for the specified object type and delete them. Its signature is: .. code:: python async def delete_i(item_ids: List[int]) -> DeleteResp """ mname = model_name(cls) @db_interaction(cls=cls, engine=engine) async def delete_i(item_ids: List[int]): try: session.execute(cls.remove_by_id(item_ids)) session.commit() except IntegrityError: logger.exception("trying to delete {mname} with {args!r}") raise HTTPException( status_code=status.HTTP_409_CONFLICT, detail="Database integrity conflict.", ) return response_model.send() delete_i.__name__ = f"delete_{mname}" delete_i.__doc__ = f""" Accepts a list of **{mname}** object IDs. Deletes the records with those IDs.""" return delete_i def adjust_associations( cls, *, assoc: List[JoinAssoc], assoc_op: AssocOperation, params: dict = None, response_model=TextResp, engine=sql_engine, ): """Build a route to add or subtract association lists, or set unitary ones :param ~chapps.models.CHAPPSModel cls: a data model class :param List[~chapps.rest.dbmodels.JoinAssoc] assoc: list of associations to operate on :param ~chapps.models.AssocOperation assoc_op: operation to perform on the association :param ~chapps.models.CHAPPSResponse response_model: the response model to send :param ~sqlalchemy.engine.Engine engine: defaults to :const:`~chapps.dbsession.sql_engine` The returned coroutine provides logic for a route which adds or subtracts elements to or from those already associated with the main object. Its exact signature is dependent on what associations are listed. After `item_id`, which is an ID to use to look up the main object, it will expect further arguments named as the association (`assoc_name`) which are of the specified type (`assoc_type`). If only one association is adjusted by the route, there will be just the one list (or scalar) as a body argument, which doesn't get a label, making the API call very easy to format and looking very clean in the API docs. If more than one are specified, :mod:`FastAPI` will expect a JSON object in the body with keys named as the ID columns and values which are lists of IDs. It all seems quite complicated when stated this way, but when viewed in the API documentation, it makes much more sense. For an example of using this factory, see :ref:`Handling Associations <handling-associations>` """ mname = model_name(cls) assoc_s = "_".join([a.assoc_name for a in assoc]) fname = f"{mname}_{assoc_op}_{assoc_s}" params = params or dict(item_id=int) assoc_params = {a.assoc_name: a.assoc_type for a in assoc} @db_interaction(cls=cls, engine=engine) async def assoc_op_i(*pargs, **args): # item_id will be used for the source object, and assoc_names will # be a list of associated ids to either remove or add associations # for, ignoring integrity errors arising from attempting to insert # duplicate associations; non-existent associations should not cause # errors when a query attempts to delete them. extras = { a.assoc_name: (a, args.pop(a.assoc_name)) for a in assoc if a.assoc_name in args } item_id = args["item_id"] if extras: for assoc_name, (assc, vals) in extras.items(): if not vals: continue if assoc_op == AssocOperation.add: stmt = assc.insert_assoc(item_id, vals) elif assoc_op == AssocOperation.replace: stmt = assc.update_assoc(item_id, vals) else: stmt = assc.delete_assoc(item_id, vals) try: session.execute(stmt) except IntegrityError: pass # ignoring as stated above session.commit() return response_model.send("Updated.") return response_model.send("Empty request.") # this approach may seem laborious, but it supports multicolumn prikeys routeparams = [ inspect.Parameter( name=param, kind=inspect.Parameter.POSITIONAL_OR_KEYWORD, annotation=type_, ) for param, type_ in params.items() ] routeparams.extend( [ inspect.Parameter( name=param, kind=inspect.Parameter.POSITIONAL_OR_KEYWORD, annotation=type_, ) for param, type_ in assoc_params.items() ] ) assoc_op_i.__signature__ = inspect.Signature(routeparams) assoc_op_i.__annotations__ = params assoc_op_i.__name__ = fname assoc_op_i.__doc__ = f""" {str(assoc_op).capitalize()} **{', '.join([a.assoc_name for a in assoc])}** objects {'to' if assoc_op==AssocOperation.add else 'from'} **{mname}**<br/> Accepts **{mname}** ID as `item_id`. """ return assoc_op_i def update_item( cls, *, response_model, assoc: List[JoinAssoc] = None, engine=sql_engine ): """Build a route to update items. :param ~chapps.models.CHAPPSModel cls: the main data model :param ~chapps.models.CHAPPSResponse response_model: the response model :param ~chapps.rest.dbmodels.JoinAssoc assoc: the association to list :param ~sqlalchemy.engine.Engine engine: defaults to :const:`~chapps.dbsession.sql_engine` The returned coroutine implements an API route for updating an item by ID, optionally including any associations included when the route coroutine is built. If association data is provided to the route, it will completely replace any existing associations to that type of record with the new list of IDs. Its signature is determined by the contents of the :class:`~chapps.rest.dbmodels.JoinAssoc` passed to it. The factory constructs :mod:`~inspect.Parameter` elements and uses them to create a correct :mod:`~inspect.Signature` for the new, decorated closure. It also sets the `__doc__` and `__name__` metadata so that `FastAPI`_ will be able to find all the required data to create an API route with good documentation. For an example of how to use this factory, see :ref:`Updating Domains <updating-domains>` .. todo:: in a generalized version of this for wider use in gluing `SQLAlchemy`_ to `FastAPI`_, it would need to allow arbitrary attributes of the model to be optional/required/defaulted. This might easily be achieved through the use of an additional alternate Pydantic_ data model for updates, wherein those elements which ought to be optional may be marked as such. """ mname = model_name(cls) fname = f"update_{mname}" params = {mname: cls} # we are updating objects of this type @db_interaction(cls=cls, engine=engine) async def update_i(*pargs, **args): extras = {} assoc_ret = {} if assoc: extras = { a.assoc_name: (a, args.pop(a.assoc_name)) for a in assoc if a.assoc_name in args } item_id = args[mname].id stmt = cls.update_by_id(args[mname]) try: result = session.execute(stmt) if result.rowcount > 0: # commit if changes were made session.commit() else: # return None if there is no record to update -> 404 return except Exception: logger.exception(f"{fname}: {args!r}") raise HTTPException( status_code=status.HTTP_500_INTERNAL_SERVER_ERROR ) item = session.scalar(cls.select_by_id(item_id)) if extras: for assoc_name, (assc, vals) in extras.items(): if not vals: continue try: session.execute( assc.delete().where( getattr(assc.table.c, assc.source_id) == item_id ) ) session.execute(assc.insert(), assc.values(item, vals)) session.commit() assoc_ret[assoc_name] = assc.assoc_model.wrap( getattr(item, assoc_name) ) except IntegrityError: logger.exception( f"{fname}: associating {item} with" f" {assoc_name}s {vals!r}" ) raise HTTPException( status_code=status.HTTP_409_CONFLICT, detail=( "Unable to create requested association to" f"{assc.assoc_model.__name__.lower()} entries." " Please check object ids and try again." ), ) return response_model.send(cls.wrap(item), **assoc_ret) routeparams = [ inspect.Parameter( name=param, kind=inspect.Parameter.POSITIONAL_OR_KEYWORD, default=Body(...), annotation=type_, ) for param, type_ in params.items() ] if assoc: routeparams.extend( [ inspect.Parameter( name=a.assoc_name, kind=inspect.Parameter.POSITIONAL_OR_KEYWORD, default=Body(None), annotation=a.assoc_type, ) for a in assoc ] ) update_i.__signature__ = inspect.Signature(routeparams) update_i.__annotations__ = params update_i.__name__ = fname update_i.__doc__ = f""" Update a **{mname}** record by ID.<br/> All **{mname}** attributes are required.<br/> Associations are not required, but if provided (by ID), will completely replace any existing association relationships of the same type. """ return update_i def create_item( cls, *, response_model, params=None, assoc=None, engine=sql_engine ): """Build a route coroutine to create new item records :param ~chapps.models.CHAPPSModel cls: the main data model :param ~chapps.models.CHAPPSResponse response_model: the response model :param dict params: defaults to ``dict(name=str)``; specify to provide additional column names and types, and be sure to include `name`, as all models currently are expected to have a `name` column, which is not allowed to be null. :param ~.JoinAssoc assoc: the associations to attach, if any :param ~sqlalchemy.engine.Engine engine: defaults to :const:`~chapps.dbsession.sql_engine` The returned coroutine implements an API route for creating an item, setting all its elements (other than ID) to whatever values are provided. Currently all values must be provided. If desired, associations may also be provided to the factory, and they will be accommodated by the coroutine. For an example invocation of this factory, see :ref:`Creating Users <creating-users>` """ params = params or dict(name=str) mname = model_name(cls) fname = f"create_{mname}" @db_interaction(cls=cls, engine=engine) async def create_i(*pargs, **args): """Bogus create item docstring""" extras = {} assoc_ret = {} if assoc: extras = { a.assoc_name: (a, args.pop(a.assoc_name)) for a in assoc if a.assoc_name in args } item = cls.Meta.orm_model(**args) try: session.add(item) session.commit() except IntegrityError: raise HTTPException( status_code=status.HTTP_409_CONFLICT, detail=f"Unique key conflict creating {mname}.", ) except Exception: logger.exception(f"{fname}: {args!r}") raise HTTPException( status_code=status.HTTP_500_INTERNAL_SERVER_ERROR ) if extras: for assoc_name, (assc, vals) in extras.items(): if not vals: # no empty inserts continue try: session.execute(assc.insert(), assc.values(item, vals)) session.commit() assoc_ret[assoc_name] = assc.assoc_model.wrap( getattr(item, assoc_name) ) except IntegrityError: raise HTTPException( status_code=status.HTTP_409_CONFLICT, detail=( "Unable to create requested association to" f"{assc.assoc_model.__name__.lower()} entries." " Please check object ids and try again." ), ) return response_model.send(cls.wrap(item), **assoc_ret) routeparams = [ # assemble signature for FastAPI inspect.Parameter( name=param, kind=inspect.Parameter.POSITIONAL_OR_KEYWORD, default=Body(...), annotation=type_, ) for param, type_ in params.items() ] if assoc: routeparams.extend( [ inspect.Parameter( name=a.assoc_name, kind=inspect.Parameter.POSITIONAL_OR_KEYWORD, default=Body(None), annotation=a.assoc_type, ) for a in assoc ] ) create_i.__signature__ = inspect.Signature(routeparams) create_i.__annotations__ = params create_i.__name__ = fname create_i.__doc__ = f""" Create a new **{mname}** record in the database.<br/> All attributes are required.<br/> The new object will be returned, including its ID.<br/> Raises descriptive errors on 409; checking the detail of the error may aid in debugging. """ return create_i
/** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ 'use strict'; // MODULES // var join = require( 'path' ).join; var tape = require( 'tape' ); var proxyquire = require( 'proxyquire' ); var isArray = require( '@stdlib/assert/is-array' ); var isObjectArray = require( '@stdlib/assert/is-plain-object-array' ); var lint = require( './../lib/sync.js' ); // TESTS // tape( 'main export is a function', function test( t ) { t.ok( true, __filename ); t.equal( typeof lint, 'function', 'main export is a function' ); t.end(); }); tape( 'the function throws an error if provided an invalid option', function test( t ) { t.throws( foo, TypeError, 'throws error' ); t.end(); function foo() { var opts = { 'pattern': null }; lint( opts ); } }); tape( 'the function returns an empty array if unable to resolve files', function test( t ) { var names; var bool; var lint; lint = proxyquire( './../lib/sync.js', { 'glob': { 'sync': glob } }); names = lint(); bool = ( isArray( names ) && names.length === 0 ); t.equal( bool, true, 'returns an empty array' ); t.end(); function glob() { return []; } }); tape( 'the function returns an empty array if all filenames are valid', function test( t ) { var names; var bool; var opts; opts = { 'dir': join( __dirname, 'fixtures', 'good' ) }; names = lint( opts ); bool = ( isArray( names ) && names.length === 0 ); t.equal( bool, true, 'returns an empty array' ); t.end(); }); tape( 'the function returns an object array if filenames are not valid', function test( t ) { var names; var opts; opts = { 'dir': join( __dirname, 'fixtures', 'bad' ) }; names = lint( opts ); t.equal( isObjectArray( names ), true, 'returns an object array' ); t.end(); });
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.timeout = void 0; exports.timeout = function (millies, f) { if (millies === "INFINITELY") { return f(function () { return false; }); } var done = false; var doneF = function () { return done; }; return new Promise(function (resolve, reject) { var timeoutRef = setTimeout(function () { done = true; reject(new Error("Timeout after " + millies + "ms")); }, millies); var result = f(doneF); // result.finally(() => clearTimeout(timeoutRef)); result.then(function (r) { resolve(r); clearTimeout(timeoutRef); }, function (e) { reject(e); clearTimeout(timeoutRef); }); }); }; //# sourceMappingURL=timeout.js.map
/* * Academic License - for use in teaching, academic research, and meeting * course requirements at degree granting institutions only. Not for * government, commercial, or other organizational use. * * mexable_calculateLOS.h * * Code generation for function 'mexable_calculateLOS' * */ #pragma once /* Include files */ #include "multiscattering_core_loop_wrapper_types.h" #include "rtwtypes.h" #include "emlrt.h" #include "mex.h" #include "omp.h" #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> /* Function Declarations */ void adjustterrain(const emlrtStack *sp, const emxArray_real_T *arclen, const emxArray_real_T *zin, real_T apparentradius, emxArray_real_T * x, emxArray_real_T *z); void sampleGreatCircle(const emlrtStack *sp, real_T lat1, real_T lon1, real_T lat2, real_T lon2, real_T spacingInDegrees, emxArray_real_T *lat, emxArray_real_T *lon, emxArray_real_T *arclenInRadians); /* End of code generation (mexable_calculateLOS.h) */
/** * @license * Copyright (c) 2014, 2020, Oracle and/or its affiliates. * The Universal Permissive License (UPL), Version 1.0 * @ignore */ define(["ojs/ojcore"],function(e){"use strict";class t{addEventListener(e,t){this._eventListeners||(this._eventListeners=[]),this._eventListeners.push({type:e.toLowerCase(),listener:t})}removeEventListener(e,t){if(this._eventListeners){let s;for(s=this._eventListeners.length-1;s>=0;s--)this._eventListeners[s].type==e&&this._eventListeners[s].listener==t&&this._eventListeners.splice(s,1)}}dispatchEvent(e){if(this._eventListeners){var t,s=this._eventListeners.slice(0);for(t=0;t<s.length;t++){var i=s[t];if(e&&e.type&&i.type==e.type.toLowerCase()&&!1===i.listener.apply(this,[e]))return!1}}return!0}static applyMixin(e){[t].forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(s=>{"constructor"!==s&&(e.prototype[s]=t.prototype[s])})})}}e.EventTargetMixin=t;e.GenericEvent=class{constructor(e,t){this.type=e,this.options=t,null!=t&&(this.detail=t.detail)}}});
const Promise = require('bluebird'); const dataSet = [ { title: 'Mr', firstName: 'John', lastName: 'Jones', bio: 'Lots of text would be here.' }, { title: 'Mrs', firstName: 'Jane', lastName: 'Rivera', bio: 'Even more text would be here.' } ]; const dataItemsSet = [ { item: 'Lemmons', price: .99 }, { item: 'Limes', price: .59 } ]; exports.getData = (key) => { return Promise.resolve(dataSet[key]); }; exports.getItemData = (key) => { return Promise.resolve(dataItemsSet[key]); };
/* * * Entity actions * */ // Entity import { FETCH_ENTITY, FETCH_ENTITY_FAILED, FETCH_ENTITY_SUCCESS, } from './constants'; export const fetchEntity = url => ({ type: FETCH_ENTITY, url, }); export const fetchEntitySuccess = entities => ({ type: FETCH_ENTITY_SUCCESS, entities, }); export const fetchEntityFailed = error => ({ type: FETCH_ENTITY_FAILED, error, });
var user_updates = new Object(); var update_frequency = 10; var new_messages = new Array(); $(document).ready(function(){ init_updates(); getUpdates(); }); function toggle_notifications(){ if($(".footer_console .node.notifications").hasClass('open')){ $(".footer_console .node.notifications .popup").slideUp(250); $(".footer_console .node.notifications").removeClass('open'); } else { $(".footer_console .node.messages .popup").hide(); $(".footer_console .node.messages").removeClass('open'); $("#page_footer .footer_console .node.notifications .scroll_content .popup_content").load(site_url + "app/getUserNotifications/"); $(".footer_console .node.notifications .popup").slideDown(250); $(".footer_console .node.notifications").addClass('open'); } } function toggle_messages(){ if($(".footer_console .node.messages").hasClass('open')){ $(".footer_console .node.messages .popup").slideUp(250); $(".footer_console .node.messages").removeClass('open'); chat_update_frequency = 20; } else { //$("#page_footer .footer_console .node.messages .scroll_content .popup_content ").load(site_url + "app/getUsermessages/"); $(".footer_console .node.notifications .popup").hide(); $(".footer_console .node.notifications").removeClass('open'); $(".footer_console .node.messages .popup").slideDown(250); $(".footer_console .node.messages").addClass('open'); } } function init_updates(){ setInterval(getUpdates, update_frequency * 1000); } function getUpdates(){ $.post(site_url + "app/getUserUpdates/", { 'null' : 0 }, function(data){ if(data.success){ new_messages = Array(); if(data.new_messages.length > 0){new_messages = data.new_messages.split(',');} var no_new_notifications = data.new_notifications; if(no_new_notifications > 99){no_new_notifications = "99+";} var no_new_messages = data.new_messages.split(',').length; if(no_new_messages > 99){no_new_messages = "99+";} if(data.new_notifications > 0){ $("#page_footer .footer_console .node.notifications .touch span").show(); } else { $("#page_footer .footer_console .node.notifications .touch span").hide(); } if(data.new_messages > 0){ $("#page_footer .footer_console .node.messages .touch span").show(); } else { $("#page_footer .footer_console .node.messages .touch span").hide(); } highlightActiveThreads(); $("#page_footer .footer_console .node.notifications .touch span").text(no_new_notifications); $("#page_footer .footer_console .node.messages .touch span").text(no_new_messages); } }, "json"); } function newMessage(targetUser){ $("#page_footer #new_message").load(site_url + "app/newmessage/?u=" + targetUser); $("#page_footer #new_message").slideDown(250); } function close_messages(){ $("#page_footer #new_message").slideUp(250); }
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import argparse import os import threading import time import torch import torch.distributed as dist NUM_TRIALS = 20 def all_reduce_helper(tensor, group, multiplier, num_iterations): dist.barrier() start_time = time.time() for i in range(num_iterations): dist.all_reduce(tensor=tensor, group=group) dist.barrier() size = tensor.size()[0] bandwidth = (size * 4. * NUM_TRIALS * multiplier) / ((time.time() - start_time) * 10**6) print("Bandwidth for tensor size %s: %.2f MB/s" % (size, bandwidth)) if __name__ == '__main__': parser = argparse.ArgumentParser( description='Test lightweight communication library') parser.add_argument("--backend", type=str, default='gloo', help="Backend") parser.add_argument("--master_addr", required=True, type=str, help="IP address of master") parser.add_argument("--rank", required=True, type=int, help="Rank of current worker") parser.add_argument("--local_rank", default=0, type=int, help="Local rank of current worker") parser.add_argument("--world_size", required=True, type=int, help="World size") parser.add_argument('-p', "--master_port", default=12345, help="Port used to communicate tensors") args = parser.parse_args() torch.cuda.set_device(args.local_rank) os.environ['MASTER_ADDR'] = args.master_addr os.environ['MASTER_PORT'] = str(args.master_port) dist.init_process_group(args.backend, rank=args.rank, world_size=args.world_size) tensor_sizes = [10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000] groups = [] for tag in range(len(tensor_sizes)): group = dist.new_group(list(range(args.world_size))) groups.append(group) multiplier = (2. * (args.world_size-1)) / args.world_size for tag, tensor_size in enumerate(tensor_sizes): group = groups[tag] tensor = torch.tensor(range(tensor_size), dtype=torch.float32).cuda(args.local_rank) all_reduce_helper(tensor, group, multiplier, NUM_TRIALS)
/* * Copyright (C) 2016 Apple Inc. 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. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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. */ const SkipSeconds = 15; const MinimumSizeToShowAnyControl = 47; const MaximumSizeToShowSmallProminentControl = 88; let mediaControlsHost; // This is called from HTMLMediaElement::ensureMediaControlsInjectedScript(). function createControls(shadowRoot, media, host) { if (host) { mediaControlsHost = host; iconService.mediaControlsHost = host; shadowRoot.appendChild(document.createElement("style")).textContent = host.shadowRootCSSText; } return new MediaController(shadowRoot, media, host); } function UIString(stringToLocalize, replacementString) { let allLocalizedStrings = {}; try { allLocalizedStrings = UIStrings; } catch (error) {} const localizedString = allLocalizedStrings[stringToLocalize]; if (!localizedString) return stringToLocalize; if (replacementString) return localizedString.replace("%s", replacementString); return localizedString; } function formatTimeByUnit(value) { const time = value || 0; const absTime = Math.abs(time); return { seconds: Math.floor(absTime % 60).toFixed(0), minutes: Math.floor((absTime / 60) % 60).toFixed(0), hours: Math.floor(absTime / (60 * 60)).toFixed(0) }; } function unitizeTime(value, unit) { let returnedUnit = UIString(unit); if (value > 1) returnedUnit = UIString(`${unit}s`); return `${value} ${returnedUnit}`; } function formattedStringForDuration(timeInSeconds) { if (mediaControlsHost) return mediaControlsHost.formattedStringForDuration(Math.abs(timeInSeconds)); else return ""; }
!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=125)}([function(e,t,n){(function(e){!function(t,n){e.exports=n()}(0,function(){"use strict";function t(){return vr.apply(null,arguments)}function r(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e){var t;for(t in e)return!1;return!0}function s(e){return void 0===e}function o(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){for(var n in t)l(t,n)&&(e[n]=t[n]);return l(t,"toString")&&(e.toString=t.toString),l(t,"valueOf")&&(e.valueOf=t.valueOf),e}function _(e,t,n,r){return gt(e,t,n,r,!0).utc()}function f(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function h(e){return null==e._pf&&(e._pf=f()),e._pf}function m(e){if(null==e._isValid){var t=h(e),n=Yr.call(t.parsedDateParts,function(e){return null!=e}),r=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return r;e._isValid=r}return e._isValid}function p(e){var t=_(NaN);return null!=e?c(h(t),e):h(t).userInvalidated=!0,t}function y(e,t){var n,r,i;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=h(t)),s(t._locale)||(e._locale=t._locale),kr.length>0)for(n=0;n<kr.length;n++)r=kr[n],i=t[r],s(i)||(e[r]=i);return e}function M(e){y(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===wr&&(wr=!0,t.updateOffset(this),wr=!1)}function g(e){return e instanceof M||null!=e&&null!=e._isAMomentObject}function v(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function L(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=v(t)),n}function Y(e,t,n){var r,i=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),s=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&L(e[r])!==L(t[r]))&&s++;return s+a}function k(e){!1===t.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn}function w(e,n){var r=!0;return c(function(){if(null!=t.deprecationHandler&&t.deprecationHandler(null,e),r){for(var i,a=[],s=0;s<arguments.length;s++){if(i="","object"==typeof arguments[s]){i+="\n["+s+"] ";for(var o in arguments[0])i+=o+": "+arguments[0][o]+", ";i=i.slice(0,-2)}else i=arguments[s];a.push(i)}k(e+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),r=!1}return n.apply(this,arguments)},n)}function D(e,n){null!=t.deprecationHandler&&t.deprecationHandler(e,n),Dr[e]||(k(n),Dr[e]=!0)}function T(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function b(e){var t,n;for(n in e)t=e[n],T(t)?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function x(e,t){var n,r=c({},e);for(n in t)l(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},c(r[n],e[n]),c(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)l(e,n)&&!l(t,n)&&i(e[n])&&(r[n]=c({},r[n]));return r}function S(e){null!=e&&this.set(e)}function j(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return T(r)?r.call(t,n):r}function H(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])}function E(){return this._invalidDate}function O(e){return this._ordinal.replace("%d",e)}function A(e,t,n,r){var i=this._relativeTime[n];return T(i)?i(e,t,n,r):i.replace(/%d/i,e)}function P(e,t){var n=this._relativeTime[e>0?"future":"past"];return T(n)?n(t):n.replace(/%s/i,t)}function C(e,t){var n=e.toLowerCase();Or[n]=Or[n+"s"]=Or[t]=e}function W(e){return"string"==typeof e?Or[e]||Or[e.toLowerCase()]:void 0}function F(e){var t,n,r={};for(n in e)l(e,n)&&(t=W(n))&&(r[t]=e[n]);return r}function N(e,t){Ar[e]=t}function $(e){var t=[];for(var n in e)t.push({unit:n,priority:Ar[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}function R(e,n){return function(r){return null!=r?(I(this,e,r),t.updateOffset(this,n),this):z(this,e)}}function z(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function I(e,t,n){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](n)}function U(e){return e=W(e),T(this[e])?this[e]():this}function J(e,t){if("object"==typeof e){e=F(e);for(var n=$(e),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit])}else if(e=W(e),T(this[e]))return this[e](t);return this}function q(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}function B(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(Fr[e]=i),t&&(Fr[t[0]]=function(){return q(i.apply(this,arguments),t[1],t[2])}),n&&(Fr[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function V(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function G(e){var t,n,r=e.match(Pr);for(t=0,n=r.length;t<n;t++)Fr[r[t]]?r[t]=Fr[r[t]]:r[t]=V(r[t]);return function(t){var i,a="";for(i=0;i<n;i++)a+=T(r[i])?r[i].call(t,e):r[i];return a}}function K(e,t){return e.isValid()?(t=Z(t,e.localeData()),Wr[t]=Wr[t]||G(t),Wr[t](e)):e.localeData().invalidDate()}function Z(e,t){function n(e){return t.longDateFormat(e)||e}var r=5;for(Cr.lastIndex=0;r>=0&&Cr.test(e);)e=e.replace(Cr,n),Cr.lastIndex=0,r-=1;return e}function Q(e,t,n){ni[e]=T(t)?t:function(e,r){return e&&n?n:t}}function X(e,t){return l(ni,e)?ni[e](t._strict,t._locale):new RegExp(ee(e))}function ee(e){return te(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i}))}function te(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ne(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),o(t)&&(r=function(e,n){n[t]=L(e)}),n=0;n<e.length;n++)ri[e[n]]=r}function re(e,t){ne(e,function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)})}function ie(e,t,n){null!=t&&l(ri,e)&&ri[e](t,n._a,n,e)}function ae(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}function se(e,t){return e?r(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||hi).test(t)?"format":"standalone"][e.month()]:r(this._months)?this._months:this._months.standalone}function oe(e,t){return e?r(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[hi.test(t)?"format":"standalone"][e.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ue(e,t,n){var r,i,a,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=_([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===t?(i=fi.call(this._shortMonthsParse,s),-1!==i?i:null):(i=fi.call(this._longMonthsParse,s),-1!==i?i:null):"MMM"===t?-1!==(i=fi.call(this._shortMonthsParse,s))?i:(i=fi.call(this._longMonthsParse,s),-1!==i?i:null):-1!==(i=fi.call(this._longMonthsParse,s))?i:(i=fi.call(this._shortMonthsParse,s),-1!==i?i:null)}function de(e,t,n){var r,i,a;if(this._monthsParseExact)return ue.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=_([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function le(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=L(t);else if(t=e.localeData().monthsParse(t),!o(t))return e;return n=Math.min(e.date(),ae(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function ce(e){return null!=e?(le(this,e),t.updateOffset(this,!0),this):z(this,"Month")}function _e(){return ae(this.year(),this.month())}function fe(e){return this._monthsParseExact?(l(this,"_monthsRegex")||me.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=yi),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function he(e){return this._monthsParseExact?(l(this,"_monthsRegex")||me.call(this),e?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=Mi),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function me(){function e(e,t){return t.length-e.length}var t,n,r=[],i=[],a=[];for(t=0;t<12;t++)n=_([2e3,t]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(e),i.sort(e),a.sort(e),t=0;t<12;t++)r[t]=te(r[t]),i[t]=te(i[t]);for(t=0;t<24;t++)a[t]=te(a[t]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function pe(e){return ye(e)?366:365}function ye(e){return e%4==0&&e%100!=0||e%400==0}function Me(){return ye(this.year())}function ge(e,t,n,r,i,a,s){var o=new Date(e,t,n,r,i,a,s);return e<100&&e>=0&&isFinite(o.getFullYear())&&o.setFullYear(e),o}function ve(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Le(e,t,n){var r=7+t-n;return-(7+ve(e,0,r).getUTCDay()-t)%7+r-1}function Ye(e,t,n,r,i){var a,s,o=(7+n-r)%7,u=Le(e,r,i),d=1+7*(t-1)+o+u;return d<=0?(a=e-1,s=pe(a)+d):d>pe(e)?(a=e+1,s=d-pe(e)):(a=e,s=d),{year:a,dayOfYear:s}}function ke(e,t,n){var r,i,a=Le(e.year(),t,n),s=Math.floor((e.dayOfYear()-a-1)/7)+1;return s<1?(i=e.year()-1,r=s+we(i,t,n)):s>we(e.year(),t,n)?(r=s-we(e.year(),t,n),i=e.year()+1):(i=e.year(),r=s),{week:r,year:i}}function we(e,t,n){var r=Le(e,t,n),i=Le(e+1,t,n);return(pe(e)-r+i)/7}function De(e){return ke(e,this._week.dow,this._week.doy).week}function Te(){return this._week.dow}function be(){return this._week.doy}function xe(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Se(e){var t=ke(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function je(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function He(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Ee(e,t){return e?r(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:r(this._weekdays)?this._weekdays:this._weekdays.standalone}function Oe(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ae(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Pe(e,t,n){var r,i,a,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=_([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?(i=fi.call(this._weekdaysParse,s),-1!==i?i:null):"ddd"===t?(i=fi.call(this._shortWeekdaysParse,s),-1!==i?i:null):(i=fi.call(this._minWeekdaysParse,s),-1!==i?i:null):"dddd"===t?-1!==(i=fi.call(this._weekdaysParse,s))?i:-1!==(i=fi.call(this._shortWeekdaysParse,s))?i:(i=fi.call(this._minWeekdaysParse,s),-1!==i?i:null):"ddd"===t?-1!==(i=fi.call(this._shortWeekdaysParse,s))?i:-1!==(i=fi.call(this._weekdaysParse,s))?i:(i=fi.call(this._minWeekdaysParse,s),-1!==i?i:null):-1!==(i=fi.call(this._minWeekdaysParse,s))?i:-1!==(i=fi.call(this._weekdaysParse,s))?i:(i=fi.call(this._shortWeekdaysParse,s),-1!==i?i:null)}function Ce(e,t,n){var r,i,a;if(this._weekdaysParseExact)return Pe.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=_([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function We(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=je(e,this.localeData()),this.add(e-t,"d")):t}function Fe(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Ne(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=He(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function $e(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Ie.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=wi),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Re(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Ie.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Di),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ze(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Ie.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ti),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ie(){function e(e,t){return t.length-e.length}var t,n,r,i,a,s=[],o=[],u=[],d=[];for(t=0;t<7;t++)n=_([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),a=this.weekdays(n,""),s.push(r),o.push(i),u.push(a),d.push(r),d.push(i),d.push(a);for(s.sort(e),o.sort(e),u.sort(e),d.sort(e),t=0;t<7;t++)o[t]=te(o[t]),u[t]=te(u[t]),d[t]=te(d[t]);this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ue(){return this.hours()%12||12}function Je(){return this.hours()||24}function qe(e,t){B(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Be(e,t){return t._meridiemParse}function Ve(e){return"p"===(e+"").toLowerCase().charAt(0)}function Ge(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}function Ke(e){return e?e.toLowerCase().replace("_","-"):e}function Ze(e){for(var t,n,r,i,a=0;a<e.length;){for(i=Ke(e[a]).split("-"),t=i.length,n=Ke(e[a+1]),n=n?n.split("-"):null;t>0;){if(r=Qe(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&Y(i,n,!0)>=t-1)break;t--}a++}return null}function Qe(t){var r=null;if(!Hi[t]&&void 0!==e&&e&&e.exports)try{r=bi._abbr,n(151)("./"+t),Xe(r)}catch(e){}return Hi[t]}function Xe(e,t){var n;return e&&(n=s(t)?nt(e):et(e,t))&&(bi=n),bi._abbr}function et(e,t){if(null!==t){var n=ji;if(t.abbr=e,null!=Hi[e])D("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Hi[e]._config;else if(null!=t.parentLocale){if(null==Hi[t.parentLocale])return Ei[t.parentLocale]||(Ei[t.parentLocale]=[]),Ei[t.parentLocale].push({name:e,config:t}),null;n=Hi[t.parentLocale]._config}return Hi[e]=new S(x(n,t)),Ei[e]&&Ei[e].forEach(function(e){et(e.name,e.config)}),Xe(e),Hi[e]}return delete Hi[e],null}function tt(e,t){if(null!=t){var n,r=ji;null!=Hi[e]&&(r=Hi[e]._config),t=x(r,t),n=new S(t),n.parentLocale=Hi[e],Hi[e]=n,Xe(e)}else null!=Hi[e]&&(null!=Hi[e].parentLocale?Hi[e]=Hi[e].parentLocale:null!=Hi[e]&&delete Hi[e]);return Hi[e]}function nt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return bi;if(!r(e)){if(t=Qe(e))return t;e=[e]}return Ze(e)}function rt(){return xr(Hi)}function it(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[ai]<0||n[ai]>11?ai:n[si]<1||n[si]>ae(n[ii],n[ai])?si:n[oi]<0||n[oi]>24||24===n[oi]&&(0!==n[ui]||0!==n[di]||0!==n[li])?oi:n[ui]<0||n[ui]>59?ui:n[di]<0||n[di]>59?di:n[li]<0||n[li]>999?li:-1,h(e)._overflowDayOfYear&&(t<ii||t>si)&&(t=si),h(e)._overflowWeeks&&-1===t&&(t=ci),h(e)._overflowWeekday&&-1===t&&(t=_i),h(e).overflow=t),e}function at(e){var t,n,r,i,a,s,o=e._i,u=Oi.exec(o)||Ai.exec(o);if(u){for(h(e).iso=!0,t=0,n=Ci.length;t<n;t++)if(Ci[t][1].exec(u[1])){i=Ci[t][0],r=!1!==Ci[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=Wi.length;t<n;t++)if(Wi[t][1].exec(u[3])){a=(u[2]||" ")+Wi[t][0];break}if(null==a)return void(e._isValid=!1)}if(!r&&null!=a)return void(e._isValid=!1);if(u[4]){if(!Pi.exec(u[4]))return void(e._isValid=!1);s="Z"}e._f=i+(a||"")+(s||""),_t(e)}else e._isValid=!1}function st(e){var t,n,r,i,a,s,o,u,d={" GMT":" +0000"," EDT":" -0400"," EST":" -0500"," CDT":" -0500"," CST":" -0600"," MDT":" -0600"," MST":" -0700"," PDT":" -0700"," PST":" -0800"},l="YXWVUTSRQPONZABCDEFGHIKLM";if(t=e._i.replace(/\([^\)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s|\s$/g,""),n=Ni.exec(t)){if(r=n[1]?"ddd"+(5===n[1].length?", ":" "):"",i="D MMM "+(n[2].length>10?"YYYY ":"YY "),a="HH:mm"+(n[4]?":ss":""),n[1]){var c=new Date(n[2]),_=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][c.getDay()];if(n[1].substr(0,3)!==_)return h(e).weekdayMismatch=!0,void(e._isValid=!1)}switch(n[5].length){case 2:0===u?o=" +0000":(u=l.indexOf(n[5][1].toUpperCase())-12,o=(u<0?" -":" +")+(""+u).replace(/^-?/,"0").match(/..$/)[0]+"00");break;case 4:o=d[n[5]];break;default:o=d[" GMT"]}n[5]=o,e._i=n.splice(1).join(""),s=" ZZ",e._f=r+i+a+s,_t(e),h(e).rfc2822=!0}else e._isValid=!1}function ot(e){var n=Fi.exec(e._i);if(null!==n)return void(e._d=new Date(+n[1]));at(e),!1===e._isValid&&(delete e._isValid,st(e),!1===e._isValid&&(delete e._isValid,t.createFromInputFallback(e)))}function ut(e,t,n){return null!=e?e:null!=t?t:n}function dt(e){var n=new Date(t.now());return e._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function lt(e){var t,n,r,i,a=[];if(!e._d){for(r=dt(e),e._w&&null==e._a[si]&&null==e._a[ai]&&ct(e),null!=e._dayOfYear&&(i=ut(e._a[ii],r[ii]),(e._dayOfYear>pe(i)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=ve(i,0,e._dayOfYear),e._a[ai]=n.getUTCMonth(),e._a[si]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[oi]&&0===e._a[ui]&&0===e._a[di]&&0===e._a[li]&&(e._nextDay=!0,e._a[oi]=0),e._d=(e._useUTC?ve:ge).apply(null,a),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[oi]=24)}}function ct(e){var t,n,r,i,a,s,o,u;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)a=1,s=4,n=ut(t.GG,e._a[ii],ke(vt(),1,4).year),r=ut(t.W,1),((i=ut(t.E,1))<1||i>7)&&(u=!0);else{a=e._locale._week.dow,s=e._locale._week.doy;var d=ke(vt(),a,s);n=ut(t.gg,e._a[ii],d.year),r=ut(t.w,d.week),null!=t.d?((i=t.d)<0||i>6)&&(u=!0):null!=t.e?(i=t.e+a,(t.e<0||t.e>6)&&(u=!0)):i=a}r<1||r>we(n,a,s)?h(e)._overflowWeeks=!0:null!=u?h(e)._overflowWeekday=!0:(o=Ye(n,r,i,a,s),e._a[ii]=o.year,e._dayOfYear=o.dayOfYear)}function _t(e){if(e._f===t.ISO_8601)return void at(e);if(e._f===t.RFC_2822)return void st(e);e._a=[],h(e).empty=!0;var n,r,i,a,s,o=""+e._i,u=o.length,d=0;for(i=Z(e._f,e._locale).match(Pr)||[],n=0;n<i.length;n++)a=i[n],r=(o.match(X(a,e))||[])[0],r&&(s=o.substr(0,o.indexOf(r)),s.length>0&&h(e).unusedInput.push(s),o=o.slice(o.indexOf(r)+r.length),d+=r.length),Fr[a]?(r?h(e).empty=!1:h(e).unusedTokens.push(a),ie(a,r,e)):e._strict&&!r&&h(e).unusedTokens.push(a);h(e).charsLeftOver=u-d,o.length>0&&h(e).unusedInput.push(o),e._a[oi]<=12&&!0===h(e).bigHour&&e._a[oi]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[oi]=ft(e._locale,e._a[oi],e._meridiem),lt(e),it(e)}function ft(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(r=e.isPM(n),r&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function ht(e){var t,n,r,i,a;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<e._f.length;i++)a=0,t=y({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],_t(t),m(t)&&(a+=h(t).charsLeftOver,a+=10*h(t).unusedTokens.length,h(t).score=a,(null==r||a<r)&&(r=a,n=t));c(e,n||t)}function mt(e){if(!e._d){var t=F(e._i);e._a=d([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),lt(e)}}function pt(e){var t=new M(it(yt(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function yt(e){var t=e._i,n=e._f;return e._locale=e._locale||nt(e._l),null===t||void 0===n&&""===t?p({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),g(t)?new M(it(t)):(u(t)?e._d=t:r(n)?ht(e):n?_t(e):Mt(e),m(e)||(e._d=null),e))}function Mt(e){var n=e._i;s(n)?e._d=new Date(t.now()):u(n)?e._d=new Date(n.valueOf()):"string"==typeof n?ot(e):r(n)?(e._a=d(n.slice(0),function(e){return parseInt(e,10)}),lt(e)):i(n)?mt(e):o(n)?e._d=new Date(n):t.createFromInputFallback(e)}function gt(e,t,n,s,o){var u={};return!0!==n&&!1!==n||(s=n,n=void 0),(i(e)&&a(e)||r(e)&&0===e.length)&&(e=void 0),u._isAMomentObject=!0,u._useUTC=u._isUTC=o,u._l=n,u._i=e,u._f=t,u._strict=s,pt(u)}function vt(e,t,n,r){return gt(e,t,n,r,!1)}function Lt(e,t){var n,i;if(1===t.length&&r(t[0])&&(t=t[0]),!t.length)return vt();for(n=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][e](n)||(n=t[i]);return n}function Yt(){return Lt("isBefore",[].slice.call(arguments,0))}function kt(){return Lt("isAfter",[].slice.call(arguments,0))}function wt(e){for(var t in e)if(-1===Ii.indexOf(t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<Ii.length;++r)if(e[Ii[r]]){if(n)return!1;parseFloat(e[Ii[r]])!==L(e[Ii[r]])&&(n=!0)}return!0}function Dt(){return this._isValid}function Tt(){return Jt(NaN)}function bt(e){var t=F(e),n=t.year||0,r=t.quarter||0,i=t.month||0,a=t.week||0,s=t.day||0,o=t.hour||0,u=t.minute||0,d=t.second||0,l=t.millisecond||0;this._isValid=wt(t),this._milliseconds=+l+1e3*d+6e4*u+1e3*o*60*60,this._days=+s+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=nt(),this._bubble()}function xt(e){return e instanceof bt}function St(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function jt(e,t){B(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+q(~~(e/60),2)+t+q(~~e%60,2)})}function Ht(e,t){var n=(t||"").match(e);if(null===n)return null;var r=n[n.length-1]||[],i=(r+"").match(Ui)||["-",0,0],a=60*i[1]+L(i[2]);return 0===a?0:"+"===i[0]?a:-a}function Et(e,n){var r,i;return n._isUTC?(r=n.clone(),i=(g(e)||u(e)?e.valueOf():vt(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+i),t.updateOffset(r,!1),r):vt(e).local()}function Ot(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function At(e,n,r){var i,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ht(Xr,e)))return this}else Math.abs(e)<16&&!r&&(e*=60);return!this._isUTC&&n&&(i=Ot(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),a!==e&&(!n||this._changeInProgress?Kt(this,Jt(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:Ot(this)}function Pt(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Ct(e){return this.utcOffset(0,e)}function Wt(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ot(this),"m")),this}function Ft(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ht(Qr,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Nt(e){return!!this.isValid()&&(e=e?vt(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function $t(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Rt(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),e=yt(e),e._a){var t=e._isUTC?_(e._a):vt(e._a);this._isDSTShifted=this.isValid()&&Y(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function zt(){return!!this.isValid()&&!this._isUTC}function It(){return!!this.isValid()&&this._isUTC}function Ut(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Jt(e,t){var n,r,i,a=e,s=null;return xt(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:o(e)?(a={},t?a[t]=e:a.milliseconds=e):(s=Ji.exec(e))?(n="-"===s[1]?-1:1,a={y:0,d:L(s[si])*n,h:L(s[oi])*n,m:L(s[ui])*n,s:L(s[di])*n,ms:L(St(1e3*s[li]))*n}):(s=qi.exec(e))?(n="-"===s[1]?-1:1,a={y:qt(s[2],n),M:qt(s[3],n),w:qt(s[4],n),d:qt(s[5],n),h:qt(s[6],n),m:qt(s[7],n),s:qt(s[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=Vt(vt(a.from),vt(a.to)),a={},a.ms=i.milliseconds,a.M=i.months),r=new bt(a),xt(e)&&l(e,"_locale")&&(r._locale=e._locale),r}function qt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Bt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Vt(e,t){var n;return e.isValid()&&t.isValid()?(t=Et(t,e),e.isBefore(t)?n=Bt(e,t):(n=Bt(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Gt(e,t){return function(n,r){var i,a;return null===r||isNaN(+r)||(D(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),n="string"==typeof n?+n:n,i=Jt(n,r),Kt(this,i,e),this}}function Kt(e,n,r,i){var a=n._milliseconds,s=St(n._days),o=St(n._months);e.isValid()&&(i=null==i||i,a&&e._d.setTime(e._d.valueOf()+a*r),s&&I(e,"Date",z(e,"Date")+s*r),o&&le(e,z(e,"Month")+o*r),i&&t.updateOffset(e,s||o))}function Zt(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Qt(e,n){var r=e||vt(),i=Et(r,this).startOf("day"),a=t.calendarFormat(this,i)||"sameElse",s=n&&(T(n[a])?n[a].call(this,r):n[a]);return this.format(s||this.localeData().calendar(a,this,vt(r)))}function Xt(){return new M(this)}function en(e,t){var n=g(e)?e:vt(e);return!(!this.isValid()||!n.isValid())&&(t=W(s(t)?"millisecond":t),"millisecond"===t?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function tn(e,t){var n=g(e)?e:vt(e);return!(!this.isValid()||!n.isValid())&&(t=W(s(t)?"millisecond":t),"millisecond"===t?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function nn(e,t,n,r){return r=r||"()",("("===r[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===r[1]?this.isBefore(t,n):!this.isAfter(t,n))}function rn(e,t){var n,r=g(e)?e:vt(e);return!(!this.isValid()||!r.isValid())&&(t=W(t||"millisecond"),"millisecond"===t?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function an(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function sn(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function on(e,t,n){var r,i,a,s;return this.isValid()?(r=Et(e,this),r.isValid()?(i=6e4*(r.utcOffset()-this.utcOffset()),t=W(t),"year"===t||"month"===t||"quarter"===t?(s=un(this,r),"quarter"===t?s/=3:"year"===t&&(s/=12)):(a=this-r,s="second"===t?a/1e3:"minute"===t?a/6e4:"hour"===t?a/36e5:"day"===t?(a-i)/864e5:"week"===t?(a-i)/6048e5:a),n?s:v(s)):NaN):NaN}function un(e,t){var n,r,i=12*(t.year()-e.year())+(t.month()-e.month()),a=e.clone().add(i,"months");return t-a<0?(n=e.clone().add(i-1,"months"),r=(t-a)/(a-n)):(n=e.clone().add(i+1,"months"),r=(t-a)/(n-a)),-(i+r)||0}function dn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ln(){if(!this.isValid())return null;var e=this.clone().utc();return e.year()<0||e.year()>9999?K(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):T(Date.prototype.toISOString)?this.toDate().toISOString():K(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function cn(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)}function _n(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var n=K(this,e);return this.localeData().postformat(n)}function fn(e,t){return this.isValid()&&(g(e)&&e.isValid()||vt(e).isValid())?Jt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function hn(e){return this.from(vt(),e)}function mn(e,t){return this.isValid()&&(g(e)&&e.isValid()||vt(e).isValid())?Jt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function pn(e){return this.to(vt(),e)}function yn(e){var t;return void 0===e?this._locale._abbr:(t=nt(e),null!=t&&(this._locale=t),this)}function Mn(){return this._locale}function gn(e){switch(e=W(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this}function vn(e){return void 0===(e=W(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))}function Ln(){return this._d.valueOf()-6e4*(this._offset||0)}function Yn(){return Math.floor(this.valueOf()/1e3)}function kn(){return new Date(this.valueOf())}function wn(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Dn(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Tn(){return this.isValid()?this.toISOString():null}function bn(){return m(this)}function xn(){return c({},h(this))}function Sn(){return h(this).overflow}function jn(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Hn(e,t){B(0,[e,e.length],0,t)}function En(e){return Cn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function On(e){return Cn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function An(){return we(this.year(),1,4)}function Pn(){var e=this.localeData()._week;return we(this.year(),e.dow,e.doy)}function Cn(e,t,n,r,i){var a;return null==e?ke(this,r,i).year:(a=we(e,r,i),t>a&&(t=a),Wn.call(this,e,t,n,r,i))}function Wn(e,t,n,r,i){var a=Ye(e,t,n,r,i),s=ve(a.year,0,a.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function Fn(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function Nn(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function $n(e,t){t[li]=L(1e3*("0."+e))}function Rn(){return this._isUTC?"UTC":""}function zn(){return this._isUTC?"Coordinated Universal Time":""}function In(e){return vt(1e3*e)}function Un(){return vt.apply(null,arguments).parseZone()}function Jn(e){return e}function qn(e,t,n,r){var i=nt(),a=_().set(r,t);return i[n](a,e)}function Bn(e,t,n){if(o(e)&&(t=e,e=void 0),e=e||"",null!=t)return qn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=qn(e,r,n,"month");return i}function Vn(e,t,n,r){"boolean"==typeof e?(o(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,o(t)&&(n=t,t=void 0),t=t||"");var i=nt(),a=e?i._week.dow:0;if(null!=n)return qn(t,(n+a)%7,r,"day");var s,u=[];for(s=0;s<7;s++)u[s]=qn(t,(s+a)%7,r,"day");return u}function Gn(e,t){return Bn(e,t,"months")}function Kn(e,t){return Bn(e,t,"monthsShort")}function Zn(e,t,n){return Vn(e,t,n,"weekdays")}function Qn(e,t,n){return Vn(e,t,n,"weekdaysShort")}function Xn(e,t,n){return Vn(e,t,n,"weekdaysMin")}function er(){var e=this._data;return this._milliseconds=ra(this._milliseconds),this._days=ra(this._days),this._months=ra(this._months),e.milliseconds=ra(e.milliseconds),e.seconds=ra(e.seconds),e.minutes=ra(e.minutes),e.hours=ra(e.hours),e.months=ra(e.months),e.years=ra(e.years),this}function tr(e,t,n,r){var i=Jt(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function nr(e,t){return tr(this,e,t,1)}function rr(e,t){return tr(this,e,t,-1)}function ir(e){return e<0?Math.floor(e):Math.ceil(e)}function ar(){var e,t,n,r,i,a=this._milliseconds,s=this._days,o=this._months,u=this._data;return a>=0&&s>=0&&o>=0||a<=0&&s<=0&&o<=0||(a+=864e5*ir(or(o)+s),s=0,o=0),u.milliseconds=a%1e3,e=v(a/1e3),u.seconds=e%60,t=v(e/60),u.minutes=t%60,n=v(t/60),u.hours=n%24,s+=v(n/24),i=v(sr(s)),o+=i,s-=ir(or(i)),r=v(o/12),o%=12,u.days=s,u.months=o,u.years=r,this}function sr(e){return 4800*e/146097}function or(e){return 146097*e/4800}function ur(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=W(e))||"year"===e)return t=this._days+r/864e5,n=this._months+sr(t),"month"===e?n:n/12;switch(t=this._days+Math.round(or(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function dr(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*L(this._months/12):NaN}function lr(e){return function(){return this.as(e)}}function cr(e){return e=W(e),this.isValid()?this[e+"s"]():NaN}function _r(e){return function(){return this.isValid()?this._data[e]:NaN}}function fr(){return v(this.days()/7)}function hr(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function mr(e,t,n){var r=Jt(e).abs(),i=ga(r.as("s")),a=ga(r.as("m")),s=ga(r.as("h")),o=ga(r.as("d")),u=ga(r.as("M")),d=ga(r.as("y")),l=i<=va.ss&&["s",i]||i<va.s&&["ss",i]||a<=1&&["m"]||a<va.m&&["mm",a]||s<=1&&["h"]||s<va.h&&["hh",s]||o<=1&&["d"]||o<va.d&&["dd",o]||u<=1&&["M"]||u<va.M&&["MM",u]||d<=1&&["y"]||["yy",d];return l[2]=t,l[3]=+e>0,l[4]=n,hr.apply(null,l)}function pr(e){return void 0===e?ga:"function"==typeof e&&(ga=e,!0)}function yr(e,t){return void 0!==va[e]&&(void 0===t?va[e]:(va[e]=t,"s"===e&&(va.ss=t-1),!0))}function Mr(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=mr(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)}function gr(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r=La(this._milliseconds)/1e3,i=La(this._days),a=La(this._months);e=v(r/60),t=v(e/60),r%=60,e%=60,n=v(a/12),a%=12;var s=n,o=a,u=i,d=t,l=e,c=r,_=this.asSeconds();return _?(_<0?"-":"")+"P"+(s?s+"Y":"")+(o?o+"M":"")+(u?u+"D":"")+(d||l||c?"T":"")+(d?d+"H":"")+(l?l+"M":"")+(c?c+"S":""):"P0D"}var vr,Lr;Lr=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var Yr=Lr,kr=t.momentProperties=[],wr=!1,Dr={};t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;var Tr;Tr=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)l(e,t)&&n.push(t);return n};var br,xr=Tr,Sr={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},jr={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Hr=/\d{1,2}/,Er={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Or={},Ar={},Pr=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Cr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Wr={},Fr={},Nr=/\d/,$r=/\d\d/,Rr=/\d{3}/,zr=/\d{4}/,Ir=/[+-]?\d{6}/,Ur=/\d\d?/,Jr=/\d\d\d\d?/,qr=/\d\d\d\d\d\d?/,Br=/\d{1,3}/,Vr=/\d{1,4}/,Gr=/[+-]?\d{1,6}/,Kr=/\d+/,Zr=/[+-]?\d+/,Qr=/Z|[+-]\d\d:?\d\d/gi,Xr=/Z|[+-]\d\d(?::?\d\d)?/gi,ei=/[+-]?\d+(\.\d{1,3})?/,ti=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,ni={},ri={},ii=0,ai=1,si=2,oi=3,ui=4,di=5,li=6,ci=7,_i=8;br=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};var fi=br;B("M",["MM",2],"Mo",function(){return this.month()+1}),B("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),B("MMMM",0,0,function(e){return this.localeData().months(this,e)}),C("month","M"),N("month",8),Q("M",Ur),Q("MM",Ur,$r),Q("MMM",function(e,t){return t.monthsShortRegex(e)}),Q("MMMM",function(e,t){return t.monthsRegex(e)}),ne(["M","MM"],function(e,t){t[ai]=L(e)-1}),ne(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[ai]=i:h(n).invalidMonth=e});var hi=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,mi="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),pi="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),yi=ti,Mi=ti;B("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),B(0,["YY",2],0,function(){return this.year()%100}),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),C("year","y"),N("year",1),Q("Y",Zr),Q("YY",Ur,$r),Q("YYYY",Vr,zr),Q("YYYYY",Gr,Ir),Q("YYYYYY",Gr,Ir),ne(["YYYYY","YYYYYY"],ii),ne("YYYY",function(e,n){n[ii]=2===e.length?t.parseTwoDigitYear(e):L(e)}),ne("YY",function(e,n){n[ii]=t.parseTwoDigitYear(e)}),ne("Y",function(e,t){t[ii]=parseInt(e,10)}),t.parseTwoDigitYear=function(e){return L(e)+(L(e)>68?1900:2e3)};var gi=R("FullYear",!0);B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),C("week","w"),C("isoWeek","W"),N("week",5),N("isoWeek",5),Q("w",Ur),Q("ww",Ur,$r),Q("W",Ur),Q("WW",Ur,$r),re(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=L(e)});var vi={dow:0,doy:6};B("d",0,"do","day"),B("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),B("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),B("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),C("day","d"),C("weekday","e"),C("isoWeekday","E"),N("day",11),N("weekday",11),N("isoWeekday",11),Q("d",Ur),Q("e",Ur),Q("E",Ur),Q("dd",function(e,t){return t.weekdaysMinRegex(e)}),Q("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Q("dddd",function(e,t){return t.weekdaysRegex(e)}),re(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:h(n).invalidWeekday=e}),re(["d","e","E"],function(e,t,n,r){t[r]=L(e)});var Li="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Yi="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ki="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),wi=ti,Di=ti,Ti=ti;B("H",["HH",2],0,"hour"),B("h",["hh",2],0,Ue),B("k",["kk",2],0,Je),B("hmm",0,0,function(){return""+Ue.apply(this)+q(this.minutes(),2)}),B("hmmss",0,0,function(){return""+Ue.apply(this)+q(this.minutes(),2)+q(this.seconds(),2)}),B("Hmm",0,0,function(){return""+this.hours()+q(this.minutes(),2)}),B("Hmmss",0,0,function(){return""+this.hours()+q(this.minutes(),2)+q(this.seconds(),2)}),qe("a",!0),qe("A",!1),C("hour","h"),N("hour",13),Q("a",Be),Q("A",Be),Q("H",Ur),Q("h",Ur),Q("k",Ur),Q("HH",Ur,$r),Q("hh",Ur,$r),Q("kk",Ur,$r),Q("hmm",Jr),Q("hmmss",qr),Q("Hmm",Jr),Q("Hmmss",qr),ne(["H","HH"],oi),ne(["k","kk"],function(e,t,n){var r=L(e);t[oi]=24===r?0:r}),ne(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ne(["h","hh"],function(e,t,n){t[oi]=L(e),h(n).bigHour=!0}),ne("hmm",function(e,t,n){var r=e.length-2;t[oi]=L(e.substr(0,r)),t[ui]=L(e.substr(r)),h(n).bigHour=!0}),ne("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[oi]=L(e.substr(0,r)),t[ui]=L(e.substr(r,2)),t[di]=L(e.substr(i)),h(n).bigHour=!0}),ne("Hmm",function(e,t,n){var r=e.length-2;t[oi]=L(e.substr(0,r)),t[ui]=L(e.substr(r))}),ne("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[oi]=L(e.substr(0,r)),t[ui]=L(e.substr(r,2)),t[di]=L(e.substr(i))});var bi,xi=/[ap]\.?m?\.?/i,Si=R("Hours",!0),ji={calendar:Sr,longDateFormat:jr,invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:Hr,relativeTime:Er,months:mi,monthsShort:pi,week:vi,weekdays:Li,weekdaysMin:ki,weekdaysShort:Yi,meridiemParse:xi},Hi={},Ei={},Oi=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ai=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Pi=/Z|[+-]\d\d(?::?\d\d)?/,Ci=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Wi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Fi=/^\/?Date\((\-?\d+)/i,Ni=/^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/;t.createFromInputFallback=w("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),t.ISO_8601=function(){},t.RFC_2822=function(){};var $i=w("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=vt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:p()}),Ri=w("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=vt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:p()}),zi=function(){return Date.now?Date.now():+new Date},Ii=["year","quarter","month","week","day","hour","minute","second","millisecond"];jt("Z",":"),jt("ZZ",""),Q("Z",Xr),Q("ZZ",Xr),ne(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Ht(Xr,e)});var Ui=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var Ji=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,qi=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Jt.fn=bt.prototype,Jt.invalid=Tt;var Bi=Gt(1,"add"),Vi=Gt(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Gi=w("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});B(0,["gg",2],0,function(){return this.weekYear()%100}),B(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Hn("gggg","weekYear"),Hn("ggggg","weekYear"),Hn("GGGG","isoWeekYear"),Hn("GGGGG","isoWeekYear"),C("weekYear","gg"),C("isoWeekYear","GG"),N("weekYear",1),N("isoWeekYear",1),Q("G",Zr),Q("g",Zr),Q("GG",Ur,$r),Q("gg",Ur,$r),Q("GGGG",Vr,zr),Q("gggg",Vr,zr),Q("GGGGG",Gr,Ir),Q("ggggg",Gr,Ir),re(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=L(e)}),re(["gg","GG"],function(e,n,r,i){n[i]=t.parseTwoDigitYear(e)}),B("Q",0,"Qo","quarter"),C("quarter","Q"),N("quarter",7),Q("Q",Nr),ne("Q",function(e,t){t[ai]=3*(L(e)-1)}),B("D",["DD",2],"Do","date"),C("date","D"),N("date",9),Q("D",Ur),Q("DD",Ur,$r),Q("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ne(["D","DD"],si),ne("Do",function(e,t){t[si]=L(e.match(Ur)[0],10)});var Ki=R("Date",!0);B("DDD",["DDDD",3],"DDDo","dayOfYear"),C("dayOfYear","DDD"),N("dayOfYear",4),Q("DDD",Br),Q("DDDD",Rr),ne(["DDD","DDDD"],function(e,t,n){n._dayOfYear=L(e)}),B("m",["mm",2],0,"minute"),C("minute","m"),N("minute",14),Q("m",Ur),Q("mm",Ur,$r),ne(["m","mm"],ui);var Zi=R("Minutes",!1);B("s",["ss",2],0,"second"),C("second","s"),N("second",15),Q("s",Ur),Q("ss",Ur,$r),ne(["s","ss"],di);var Qi=R("Seconds",!1);B("S",0,0,function(){return~~(this.millisecond()/100)}),B(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,function(){return 10*this.millisecond()}),B(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),B(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),B(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),B(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),B(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),C("millisecond","ms"),N("millisecond",16),Q("S",Br,Nr),Q("SS",Br,$r),Q("SSS",Br,Rr);var Xi;for(Xi="SSSS";Xi.length<=9;Xi+="S")Q(Xi,Kr);for(Xi="S";Xi.length<=9;Xi+="S")ne(Xi,$n);var ea=R("Milliseconds",!1);B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var ta=M.prototype;ta.add=Bi,ta.calendar=Qt,ta.clone=Xt,ta.diff=on,ta.endOf=vn,ta.format=_n,ta.from=fn,ta.fromNow=hn,ta.to=mn,ta.toNow=pn,ta.get=U,ta.invalidAt=Sn,ta.isAfter=en,ta.isBefore=tn,ta.isBetween=nn,ta.isSame=rn,ta.isSameOrAfter=an,ta.isSameOrBefore=sn,ta.isValid=bn,ta.lang=Gi,ta.locale=yn,ta.localeData=Mn,ta.max=Ri,ta.min=$i,ta.parsingFlags=xn,ta.set=J,ta.startOf=gn,ta.subtract=Vi,ta.toArray=wn,ta.toObject=Dn,ta.toDate=kn,ta.toISOString=ln,ta.inspect=cn,ta.toJSON=Tn,ta.toString=dn,ta.unix=Yn,ta.valueOf=Ln,ta.creationData=jn,ta.year=gi,ta.isLeapYear=Me,ta.weekYear=En,ta.isoWeekYear=On,ta.quarter=ta.quarters=Fn,ta.month=ce,ta.daysInMonth=_e,ta.week=ta.weeks=xe,ta.isoWeek=ta.isoWeeks=Se,ta.weeksInYear=Pn,ta.isoWeeksInYear=An,ta.date=Ki,ta.day=ta.days=We,ta.weekday=Fe,ta.isoWeekday=Ne,ta.dayOfYear=Nn,ta.hour=ta.hours=Si,ta.minute=ta.minutes=Zi,ta.second=ta.seconds=Qi,ta.millisecond=ta.milliseconds=ea,ta.utcOffset=At,ta.utc=Ct,ta.local=Wt,ta.parseZone=Ft,ta.hasAlignedHourOffset=Nt,ta.isDST=$t,ta.isLocal=zt,ta.isUtcOffset=It,ta.isUtc=Ut,ta.isUTC=Ut,ta.zoneAbbr=Rn,ta.zoneName=zn,ta.dates=w("dates accessor is deprecated. Use date instead.",Ki),ta.months=w("months accessor is deprecated. Use month instead",ce),ta.years=w("years accessor is deprecated. Use year instead",gi),ta.zone=w("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Pt),ta.isDSTShifted=w("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Rt);var na=S.prototype;na.calendar=j,na.longDateFormat=H,na.invalidDate=E,na.ordinal=O,na.preparse=Jn,na.postformat=Jn,na.relativeTime=A,na.pastFuture=P,na.set=b,na.months=se,na.monthsShort=oe,na.monthsParse=de,na.monthsRegex=he,na.monthsShortRegex=fe,na.week=De,na.firstDayOfYear=be,na.firstDayOfWeek=Te,na.weekdays=Ee,na.weekdaysMin=Ae,na.weekdaysShort=Oe,na.weekdaysParse=Ce,na.weekdaysRegex=$e,na.weekdaysShortRegex=Re,na.weekdaysMinRegex=ze,na.isPM=Ve,na.meridiem=Ge,Xe("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===L(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),t.lang=w("moment.lang is deprecated. Use moment.locale instead.",Xe),t.langData=w("moment.langData is deprecated. Use moment.localeData instead.",nt);var ra=Math.abs,ia=lr("ms"),aa=lr("s"),sa=lr("m"),oa=lr("h"),ua=lr("d"),da=lr("w"),la=lr("M"),ca=lr("y"),_a=_r("milliseconds"),fa=_r("seconds"),ha=_r("minutes"),ma=_r("hours"),pa=_r("days"),ya=_r("months"),Ma=_r("years"),ga=Math.round,va={ss:44,s:45,m:45,h:22,d:26,M:11},La=Math.abs,Ya=bt.prototype;return Ya.isValid=Dt,Ya.abs=er,Ya.add=nr,Ya.subtract=rr,Ya.as=ur,Ya.asMilliseconds=ia,Ya.asSeconds=aa,Ya.asMinutes=sa,Ya.asHours=oa,Ya.asDays=ua,Ya.asWeeks=da,Ya.asMonths=la,Ya.asYears=ca,Ya.valueOf=dr,Ya._bubble=ar,Ya.get=cr,Ya.milliseconds=_a,Ya.seconds=fa,Ya.minutes=ha,Ya.hours=ma,Ya.days=pa,Ya.weeks=fr,Ya.months=ya,Ya.years=Ma,Ya.humanize=Mr,Ya.toISOString=gr,Ya.toString=gr,Ya.toJSON=gr,Ya.locale=yn,Ya.localeData=Mn,Ya.toIsoString=w("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",gr),Ya.lang=Gi,B("X",0,0,"unix"),B("x",0,0,"valueOf"),Q("x",Zr),Q("X",ei),ne("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),ne("x",function(e,t,n){n._d=new Date(L(e))}),t.version="2.18.1",function(e){vr=e}(vt),t.fn=ta,t.min=Yt,t.max=kt,t.now=zi,t.utc=_,t.unix=In,t.months=Gn,t.isDate=u,t.locale=Xe,t.invalid=p,t.duration=Jt,t.isMoment=g,t.weekdays=Zn,t.parseZone=Un,t.localeData=nt,t.isDuration=xt,t.monthsShort=Kn,t.weekdaysMin=Xn,t.defineLocale=et,t.updateLocale=tt,t.locales=rt,t.weekdaysShort=Qn,t.normalizeUnits=W,t.relativeTimeRounding=pr,t.relativeTimeThreshold=yr,t.calendarFormat=Zt,t.prototype=ta,t})}).call(t,n(4)(e))},function(e,t,n){"use strict";function r(e){return"[object Array]"===w.call(e)}function i(e){return"[object ArrayBuffer]"===w.call(e)}function a(e){return"undefined"!=typeof FormData&&e instanceof FormData}function s(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function o(e){return"string"==typeof e}function u(e){return"number"==typeof e}function d(e){return void 0===e}function l(e){return null!==e&&"object"==typeof e}function c(e){return"[object Date]"===w.call(e)}function _(e){return"[object File]"===w.call(e)}function f(e){return"[object Blob]"===w.call(e)}function h(e){return"[object Function]"===w.call(e)}function m(e){return l(e)&&h(e.pipe)}function p(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function y(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function M(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function g(e,t){if(null!==e&&void 0!==e)if("object"==typeof e||r(e)||(e=[e]),r(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.call(null,e[a],a,e)}function v(){function e(e,n){"object"==typeof t[n]&&"object"==typeof e?t[n]=v(t[n],e):t[n]=e}for(var t={},n=0,r=arguments.length;n<r;n++)g(arguments[n],e);return t}function L(e,t,n){return g(t,function(t,r){e[r]=n&&"function"==typeof t?Y(t,n):t}),e}var Y=n(5),k=n(133),w=Object.prototype.toString;e.exports={isArray:r,isArrayBuffer:i,isBuffer:k,isFormData:a,isArrayBufferView:s,isString:o,isNumber:u,isObject:l,isUndefined:d,isDate:c,isFile:_,isBlob:f,isFunction:h,isStream:m,isURLSearchParams:p,isStandardBrowserEnv:M,forEach:g,merge:v,extend:L,trim:y}},function(e,t,n){"use strict";(function(t){function r(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var i=n(1),a=n(136),s={"Content-Type":"application/x-www-form-urlencoded"},o={adapter:function(){var e;return"undefined"!=typeof XMLHttpRequest?e=n(6):void 0!==t&&(e=n(6)),e}(),transformRequest:[function(e,t){return a(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};o.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(e){o.headers[e]={}}),i.forEach(["post","put","patch"],function(e){o.headers[e]=i.merge(s)}),e.exports=o}).call(t,n(135))},function(e,t,n){(function(e,r){var i;(function(){function a(e,t){return e.set(t[0],t[1]),e}function s(e,t){return e.add(t),e}function o(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function u(e,t,n,r){for(var i=-1,a=null==e?0:e.length;++i<a;){var s=e[i];t(r,s,n(s),e)}return r}function d(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function l(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function c(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function _(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var s=e[n];t(s,n,e)&&(a[i++]=s)}return a}function f(e,t){return!!(null==e?0:e.length)&&w(e,t,0)>-1}function h(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function m(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function p(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function y(e,t,n,r){var i=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function M(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function g(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 v(e){return e.split("")}function L(e){return e.match($t)||[]}function Y(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function k(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function w(e,t,n){return t===t?Z(e,t,n):k(e,T,n)}function D(e,t,n,r){for(var i=n-1,a=e.length;++i<a;)if(r(e[i],t))return i;return-1}function T(e){return e!==e}function b(e,t){var n=null==e?0:e.length;return n?E(e,t)/n:Pe}function x(e){return function(t){return null==t?ie:t[e]}}function S(e){return function(t){return null==e?ie:e[t]}}function j(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function H(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function E(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==ie&&(n=n===ie?a:n+a)}return n}function O(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function A(e,t){return m(t,function(t){return[t,e[t]]})}function P(e){return function(t){return e(t)}}function C(e,t){return m(t,function(t){return e[t]})}function W(e,t){return e.has(t)}function F(e,t){for(var n=-1,r=e.length;++n<r&&w(t,e[n],0)>-1;);return n}function N(e,t){for(var n=e.length;n--&&w(t,e[n],0)>-1;);return n}function $(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}function R(e){return"\\"+xn[e]}function z(e,t){return null==e?ie:e[t]}function I(e){return gn.test(e)}function U(e){return vn.test(e)}function J(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function q(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function B(e,t){return function(n){return e(t(n))}}function V(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var s=e[n];s!==t&&s!==le||(e[n]=le,a[i++]=n)}return a}function G(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function K(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function Z(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function Q(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}function X(e){return I(e)?te(e):Jn(e)}function ee(e){return I(e)?ne(e):v(e)}function te(e){for(var t=yn.lastIndex=0;yn.test(e);)++t;return t}function ne(e){return e.match(yn)||[]}function re(e){return e.match(Mn)||[]}var ie,ae=200,se="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",oe="Expected a function",ue="__lodash_hash_undefined__",de=500,le="__lodash_placeholder__",ce=1,_e=2,fe=4,he=1,me=2,pe=1,ye=2,Me=4,ge=8,ve=16,Le=32,Ye=64,ke=128,we=256,De=512,Te=30,be="...",xe=800,Se=16,je=1,He=2,Ee=1/0,Oe=9007199254740991,Ae=1.7976931348623157e308,Pe=NaN,Ce=4294967295,We=Ce-1,Fe=Ce>>>1,Ne=[["ary",ke],["bind",pe],["bindKey",ye],["curry",ge],["curryRight",ve],["flip",De],["partial",Le],["partialRight",Ye],["rearg",we]],$e="[object Arguments]",Re="[object Array]",ze="[object AsyncFunction]",Ie="[object Boolean]",Ue="[object Date]",Je="[object DOMException]",qe="[object Error]",Be="[object Function]",Ve="[object GeneratorFunction]",Ge="[object Map]",Ke="[object Number]",Ze="[object Null]",Qe="[object Object]",Xe="[object Proxy]",et="[object RegExp]",tt="[object Set]",nt="[object String]",rt="[object Symbol]",it="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ot="[object ArrayBuffer]",ut="[object DataView]",dt="[object Float32Array]",lt="[object Float64Array]",ct="[object Int8Array]",_t="[object Int16Array]",ft="[object Int32Array]",ht="[object Uint8Array]",mt="[object Uint8ClampedArray]",pt="[object Uint16Array]",yt="[object Uint32Array]",Mt=/\b__p \+= '';/g,gt=/\b(__p \+=) '' \+/g,vt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Lt=/&(?:amp|lt|gt|quot|#39);/g,Yt=/[&<>"']/g,kt=RegExp(Lt.source),wt=RegExp(Yt.source),Dt=/<%-([\s\S]+?)%>/g,Tt=/<%([\s\S]+?)%>/g,bt=/<%=([\s\S]+?)%>/g,xt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,St=/^\w*$/,jt=/^\./,Ht=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Et=/[\\^$.*+?()[\]{}|]/g,Ot=RegExp(Et.source),At=/^\s+|\s+$/g,Pt=/^\s+/,Ct=/\s+$/,Wt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ft=/\{\n\/\* \[wrapped with (.+)\] \*/,Nt=/,? & /,$t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Rt=/\\(\\)?/g,zt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,It=/\w*$/,Ut=/^[-+]0x[0-9a-f]+$/i,Jt=/^0b[01]+$/i,qt=/^\[object .+?Constructor\]$/,Bt=/^0o[0-7]+$/i,Vt=/^(?:0|[1-9]\d*)$/,Gt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kt=/($^)/,Zt=/['\n\r\u2028\u2029\\]/g,Qt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Xt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",en="["+Xt+"]",tn="["+Qt+"]",nn="[a-z\\xdf-\\xf6\\xf8-\\xff]",rn="[^\\ud800-\\udfff"+Xt+"\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",an="\\ud83c[\\udffb-\\udfff]",sn="(?:\\ud83c[\\udde6-\\uddff]){2}",on="[\\ud800-\\udbff][\\udc00-\\udfff]",un="[A-Z\\xc0-\\xd6\\xd8-\\xde]",dn="(?:"+nn+"|"+rn+")",ln="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",cn="(?:\\u200d(?:"+["[^\\ud800-\\udfff]",sn,on].join("|")+")[\\ufe0e\\ufe0f]?"+ln+")*",_n="[\\ufe0e\\ufe0f]?"+ln+cn,fn="(?:"+["[\\u2700-\\u27bf]",sn,on].join("|")+")"+_n,hn="(?:"+["[^\\ud800-\\udfff]"+tn+"?",tn,sn,on,"[\\ud800-\\udfff]"].join("|")+")",mn=RegExp("['’]","g"),pn=RegExp(tn,"g"),yn=RegExp(an+"(?="+an+")|"+hn+_n,"g"),Mn=RegExp([un+"?"+nn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[en,un,"$"].join("|")+")","(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[en,un+dn,"$"].join("|")+")",un+"?"+dn+"+(?:['’](?:d|ll|m|re|s|t|ve))?",un+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)","\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)","\\d+",fn].join("|"),"g"),gn=RegExp("[\\u200d\\ud800-\\udfff"+Qt+"\\ufe0e\\ufe0f]"),vn=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ln=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Yn=-1,kn={};kn[dt]=kn[lt]=kn[ct]=kn[_t]=kn[ft]=kn[ht]=kn[mt]=kn[pt]=kn[yt]=!0,kn[$e]=kn[Re]=kn[ot]=kn[Ie]=kn[ut]=kn[Ue]=kn[qe]=kn[Be]=kn[Ge]=kn[Ke]=kn[Qe]=kn[et]=kn[tt]=kn[nt]=kn[at]=!1;var wn={};wn[$e]=wn[Re]=wn[ot]=wn[ut]=wn[Ie]=wn[Ue]=wn[dt]=wn[lt]=wn[ct]=wn[_t]=wn[ft]=wn[Ge]=wn[Ke]=wn[Qe]=wn[et]=wn[tt]=wn[nt]=wn[rt]=wn[ht]=wn[mt]=wn[pt]=wn[yt]=!0,wn[qe]=wn[Be]=wn[at]=!1;var Dn={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Tn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},bn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},xn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Sn=parseFloat,jn=parseInt,Hn="object"==typeof e&&e&&e.Object===Object&&e,En="object"==typeof self&&self&&self.Object===Object&&self,On=Hn||En||Function("return this")(),An="object"==typeof t&&t&&!t.nodeType&&t,Pn=An&&"object"==typeof r&&r&&!r.nodeType&&r,Cn=Pn&&Pn.exports===An,Wn=Cn&&Hn.process,Fn=function(){try{return Wn&&Wn.binding&&Wn.binding("util")}catch(e){}}(),Nn=Fn&&Fn.isArrayBuffer,$n=Fn&&Fn.isDate,Rn=Fn&&Fn.isMap,zn=Fn&&Fn.isRegExp,In=Fn&&Fn.isSet,Un=Fn&&Fn.isTypedArray,Jn=x("length"),qn=S(Dn),Bn=S(Tn),Vn=S(bn),Gn=function e(t){function n(e){if(au(e)&&!p_(e)&&!(e instanceof v)){if(e instanceof i)return e;if(pl.call(e,"__wrapped__"))return ts(e)}return new i(e)}function r(){}function i(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=ie}function v(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ce,this.__views__=[]}function S(){var e=new v(this.__wrapped__);return e.__actions__=Wi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Wi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Wi(this.__views__),e}function Z(){if(this.__filtered__){var e=new v(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function te(){var e=this.__wrapped__.value(),t=this.__dir__,n=p_(e),r=t<0,i=n?e.length:0,a=Ta(0,i,this.__views__),s=a.start,o=a.end,u=o-s,d=r?o:s-1,l=this.__iteratees__,c=l.length,_=0,f=ql(u,this.__takeCount__);if(!n||!r&&i==u&&f==u)return Mi(e,this.__actions__);var h=[];e:for(;u--&&_<f;){d+=t;for(var m=-1,p=e[d];++m<c;){var y=l[m],M=y.iteratee,g=y.type,v=M(p);if(g==He)p=v;else if(!v){if(g==je)continue e;break e}}h[_++]=p}return h}function ne(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])}}function $t(){this.__data__=nc?nc(null):{},this.size=0}function Qt(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Xt(e){var t=this.__data__;if(nc){var n=t[e];return n===ue?ie:n}return pl.call(t,e)?t[e]:ie}function en(e){var t=this.__data__;return nc?t[e]!==ie:pl.call(t,e)}function tn(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=nc&&t===ie?ue:t,this}function nn(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])}}function rn(){this.__data__=[],this.size=0}function an(e){var t=this.__data__,n=Kn(t,e);return!(n<0)&&(n==t.length-1?t.pop():jl.call(t,n,1),--this.size,!0)}function sn(e){var t=this.__data__,n=Kn(t,e);return n<0?ie:t[n][1]}function on(e){return Kn(this.__data__,e)>-1}function un(e,t){var n=this.__data__,r=Kn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function dn(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])}}function ln(){this.size=0,this.__data__={hash:new ne,map:new(Ql||nn),string:new ne}}function cn(e){var t=Ya(this,e).delete(e);return this.size-=t?1:0,t}function _n(e){return Ya(this,e).get(e)}function fn(e){return Ya(this,e).has(e)}function hn(e,t){var n=Ya(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function yn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new dn;++t<n;)this.add(e[t])}function Mn(e){return this.__data__.set(e,ue),this}function gn(e){return this.__data__.has(e)}function vn(e){var t=this.__data__=new nn(e);this.size=t.size}function Dn(){this.__data__=new nn,this.size=0}function Tn(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function bn(e){return this.__data__.get(e)}function xn(e){return this.__data__.has(e)}function Hn(e,t){var n=this.__data__;if(n instanceof nn){var r=n.__data__;if(!Ql||r.length<ae-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new dn(r)}return n.set(e,t),this.size=n.size,this}function En(e,t){var n=p_(e),r=!n&&m_(e),i=!n&&!r&&M_(e),a=!n&&!r&&!i&&k_(e),s=n||r||i||a,o=s?O(e.length,dl):[],u=o.length;for(var d in e)!t&&!pl.call(e,d)||s&&("length"==d||i&&("offset"==d||"parent"==d)||a&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||Aa(d,u))||o.push(d);return o}function An(e){var t=e.length;return t?e[Xr(0,t-1)]:ie}function Pn(e,t){return Za(Wi(e),nr(t,0,e.length))}function Wn(e){return Za(Wi(e))}function Fn(e,t,n){(n===ie||Jo(e[t],n))&&(n!==ie||t in e)||er(e,t,n)}function Jn(e,t,n){var r=e[t];pl.call(e,t)&&Jo(r,n)&&(n!==ie||t in e)||er(e,t,n)}function Kn(e,t){for(var n=e.length;n--;)if(Jo(e[n][0],t))return n;return-1}function Zn(e,t,n,r){return hc(e,function(e,i,a){t(r,e,n(e),a)}),r}function Qn(e,t){return e&&Fi(t,$u(t),e)}function Xn(e,t){return e&&Fi(t,Ru(t),e)}function er(e,t,n){"__proto__"==t&&Al?Al(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function tr(e,t){for(var n=-1,r=t.length,i=nl(r),a=null==e;++n<r;)i[n]=a?ie:Wu(e,t[n]);return i}function nr(e,t,n){return e===e&&(n!==ie&&(e=e<=n?e:n),t!==ie&&(e=e>=t?e:t)),e}function rr(e,t,n,r,i,a){var s,o=t&ce,u=t&_e,l=t&fe;if(n&&(s=i?n(e,r,i,a):n(e)),s!==ie)return s;if(!iu(e))return e;var c=p_(e);if(c){if(s=Sa(e),!o)return Wi(e,s)}else{var _=Tc(e),f=_==Be||_==Ve;if(M_(e))return Di(e,o);if(_==Qe||_==$e||f&&!i){if(s=u||f?{}:ja(e),!o)return u?$i(e,Xn(s,e)):Ni(e,Qn(s,e))}else{if(!wn[_])return i?e:{};s=Ha(e,_,rr,o)}}a||(a=new vn);var h=a.get(e);if(h)return h;a.set(e,s);var m=l?u?Ma:ya:u?Ru:$u,p=c?ie:m(e);return d(p||e,function(r,i){p&&(i=r,r=e[i]),Jn(s,i,rr(r,t,n,i,e,a))}),s}function ir(e){var t=$u(e);return function(n){return ar(n,e,t)}}function ar(e,t,n){var r=n.length;if(null==e)return!r;for(e=ol(e);r--;){var i=n[r],a=t[i],s=e[i];if(s===ie&&!(i in e)||!a(s))return!1}return!0}function sr(e,t,n){if("function"!=typeof e)throw new ll(oe);return Sc(function(){e.apply(ie,n)},t)}function or(e,t,n,r){var i=-1,a=f,s=!0,o=e.length,u=[],d=t.length;if(!o)return u;n&&(t=m(t,P(n))),r?(a=h,s=!1):t.length>=ae&&(a=W,s=!1,t=new yn(t));e:for(;++i<o;){var l=e[i],c=null==n?l:n(l);if(l=r||0!==l?l:0,s&&c===c){for(var _=d;_--;)if(t[_]===c)continue e;u.push(l)}else a(t,c,r)||u.push(l)}return u}function ur(e,t){var n=!0;return hc(e,function(e,r,i){return n=!!t(e,r,i)}),n}function dr(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],s=t(a);if(null!=s&&(o===ie?s===s&&!pu(s):n(s,o)))var o=s,u=a}return u}function lr(e,t,n,r){var i=e.length;for(n=Yu(n),n<0&&(n=-n>i?0:i+n),r=r===ie||r>i?i:Yu(r),r<0&&(r+=i),r=n>r?0:ku(r);n<r;)e[n++]=t;return e}function cr(e,t){var n=[];return hc(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function _r(e,t,n,r,i){var a=-1,s=e.length;for(n||(n=Oa),i||(i=[]);++a<s;){var o=e[a];t>0&&n(o)?t>1?_r(o,t-1,n,r,i):p(i,o):r||(i[i.length]=o)}return i}function fr(e,t){return e&&pc(e,t,$u)}function hr(e,t){return e&&yc(e,t,$u)}function mr(e,t){return _(t,function(t){return tu(e[t])})}function pr(e,t){t=ki(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[Qa(t[n++])];return n&&n==r?e:ie}function yr(e,t,n){var r=t(e);return p_(e)?r:p(r,n(e))}function Mr(e){return null==e?e===ie?it:Ze:Ol&&Ol in ol(e)?Da(e):Ja(e)}function gr(e,t){return e>t}function vr(e,t){return null!=e&&pl.call(e,t)}function Lr(e,t){return null!=e&&t in ol(e)}function Yr(e,t,n){return e>=ql(t,n)&&e<Jl(t,n)}function kr(e,t,n){for(var r=n?h:f,i=e[0].length,a=e.length,s=a,o=nl(a),u=1/0,d=[];s--;){var l=e[s];s&&t&&(l=m(l,P(t))),u=ql(l.length,u),o[s]=!n&&(t||i>=120&&l.length>=120)?new yn(s&&l):ie}l=e[0];var c=-1,_=o[0];e:for(;++c<i&&d.length<u;){var p=l[c],y=t?t(p):p;if(p=n||0!==p?p:0,!(_?W(_,y):r(d,y,n))){for(s=a;--s;){var M=o[s];if(!(M?W(M,y):r(e[s],y,n)))continue e}_&&_.push(y),d.push(p)}}return d}function wr(e,t,n,r){return fr(e,function(e,i,a){t(r,n(e),i,a)}),r}function Dr(e,t,n){t=ki(t,e),e=Ba(e,t);var r=null==e?e:e[Qa(vs(t))];return null==r?ie:o(r,e,n)}function Tr(e){return au(e)&&Mr(e)==$e}function br(e){return au(e)&&Mr(e)==ot}function xr(e){return au(e)&&Mr(e)==Ue}function Sr(e,t,n,r,i){return e===t||(null==e||null==t||!au(e)&&!au(t)?e!==e&&t!==t:jr(e,t,n,r,Sr,i))}function jr(e,t,n,r,i,a){var s=p_(e),o=p_(t),u=s?Re:Tc(e),d=o?Re:Tc(t);u=u==$e?Qe:u,d=d==$e?Qe:d;var l=u==Qe,c=d==Qe,_=u==d;if(_&&M_(e)){if(!M_(t))return!1;s=!0,l=!1}if(_&&!l)return a||(a=new vn),s||k_(e)?fa(e,t,n,r,i,a):ha(e,t,u,n,r,i,a);if(!(n&he)){var f=l&&pl.call(e,"__wrapped__"),h=c&&pl.call(t,"__wrapped__");if(f||h){var m=f?e.value():e,p=h?t.value():t;return a||(a=new vn),i(m,p,n,r,a)}}return!!_&&(a||(a=new vn),ma(e,t,n,r,i,a))}function Hr(e){return au(e)&&Tc(e)==Ge}function Er(e,t,n,r){var i=n.length,a=i,s=!r;if(null==e)return!a;for(e=ol(e);i--;){var o=n[i];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<a;){o=n[i];var u=o[0],d=e[u],l=o[1];if(s&&o[2]){if(d===ie&&!(u in e))return!1}else{var c=new vn;if(r)var _=r(d,l,u,e,t,c);if(!(_===ie?Sr(l,d,he|me,r,c):_))return!1}}return!0}function Or(e){return!(!iu(e)||Na(e))&&(tu(e)?Yl:qt).test(Xa(e))}function Ar(e){return au(e)&&Mr(e)==et}function Pr(e){return au(e)&&Tc(e)==tt}function Cr(e){return au(e)&&ru(e.length)&&!!kn[Mr(e)]}function Wr(e){return"function"==typeof e?e:null==e?jd:"object"==typeof e?p_(e)?Ir(e[0],e[1]):zr(e):Fd(e)}function Fr(e){if(!$a(e))return Ul(e);var t=[];for(var n in ol(e))pl.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Nr(e){if(!iu(e))return Ua(e);var t=$a(e),n=[];for(var r in e)("constructor"!=r||!t&&pl.call(e,r))&&n.push(r);return n}function $r(e,t){return e<t}function Rr(e,t){var n=-1,r=qo(e)?nl(e.length):[];return hc(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function zr(e){var t=ka(e);return 1==t.length&&t[0][2]?za(t[0][0],t[0][1]):function(n){return n===e||Er(n,e,t)}}function Ir(e,t){return Ca(e)&&Ra(t)?za(Qa(e),t):function(n){var r=Wu(n,e);return r===ie&&r===t?Nu(n,e):Sr(t,r,he|me)}}function Ur(e,t,n,r,i){e!==t&&pc(t,function(a,s){if(iu(a))i||(i=new vn),Jr(e,t,s,n,Ur,r,i);else{var o=r?r(e[s],a,s+"",e,t,i):ie;o===ie&&(o=a),Fn(e,s,o)}},Ru)}function Jr(e,t,n,r,i,a,s){var o=e[n],u=t[n],d=s.get(u);if(d)return void Fn(e,n,d);var l=a?a(o,u,n+"",e,t,s):ie,c=l===ie;if(c){var _=p_(u),f=!_&&M_(u),h=!_&&!f&&k_(u);l=u,_||f||h?p_(o)?l=o:Bo(o)?l=Wi(o):f?(c=!1,l=Di(u,!0)):h?(c=!1,l=Ei(u,!0)):l=[]:fu(u)||m_(u)?(l=o,m_(o)?l=Du(o):(!iu(o)||r&&tu(o))&&(l=ja(u))):c=!1}c&&(s.set(u,l),i(l,u,r,a,s),s.delete(u)),Fn(e,n,l)}function qr(e,t){var n=e.length;if(n)return t+=t<0?n:0,Aa(t,n)?e[t]:ie}function Br(e,t,n){var r=-1;return t=m(t.length?t:[jd],P(La())),H(Rr(e,function(e,n,i){return{criteria:m(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return Ai(e,t,n)})}function Vr(e,t){return Gr(e,t,function(t,n){return Nu(e,n)})}function Gr(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var s=t[r],o=pr(e,s);n(o,s)&&ai(a,ki(s,e),o)}return a}function Kr(e){return function(t){return pr(t,e)}}function Zr(e,t,n,r){var i=r?D:w,a=-1,s=t.length,o=e;for(e===t&&(t=Wi(t)),n&&(o=m(e,P(n)));++a<s;)for(var u=0,d=t[a],l=n?n(d):d;(u=i(o,l,u,r))>-1;)o!==e&&jl.call(o,u,1),jl.call(e,u,1);return e}function Qr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==a){var a=i;Aa(i)?jl.call(e,i,1):mi(e,i)}}return e}function Xr(e,t){return e+Nl(Gl()*(t-e+1))}function ei(e,t,n,r){for(var i=-1,a=Jl(Fl((t-e)/(n||1)),0),s=nl(a);a--;)s[r?a:++i]=e,e+=n;return s}function ti(e,t){var n="";if(!e||t<1||t>Oe)return n;do{t%2&&(n+=e),(t=Nl(t/2))&&(e+=e)}while(t);return n}function ni(e,t){return jc(qa(e,t,jd),e+"")}function ri(e){return An(Xu(e))}function ii(e,t){var n=Xu(e);return Za(n,nr(t,0,n.length))}function ai(e,t,n,r){if(!iu(e))return e;t=ki(t,e);for(var i=-1,a=t.length,s=a-1,o=e;null!=o&&++i<a;){var u=Qa(t[i]),d=n;if(i!=s){var l=o[u];d=r?r(l,u,o):ie,d===ie&&(d=iu(l)?l:Aa(t[i+1])?[]:{})}Jn(o,u,d),o=o[u]}return e}function si(e){return Za(Xu(e))}function oi(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=nl(i);++r<i;)a[r]=e[r+t];return a}function ui(e,t){var n;return hc(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}function di(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t===t&&i<=Fe){for(;r<i;){var a=r+i>>>1,s=e[a];null!==s&&!pu(s)&&(n?s<=t:s<t)?r=a+1:i=a}return i}return li(e,t,jd,n)}function li(e,t,n,r){t=n(t);for(var i=0,a=null==e?0:e.length,s=t!==t,o=null===t,u=pu(t),d=t===ie;i<a;){var l=Nl((i+a)/2),c=n(e[l]),_=c!==ie,f=null===c,h=c===c,m=pu(c);if(s)var p=r||h;else p=d?h&&(r||_):o?h&&_&&(r||!f):u?h&&_&&!f&&(r||!m):!f&&!m&&(r?c<=t:c<t);p?i=l+1:a=l}return ql(a,We)}function ci(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var s=e[n],o=t?t(s):s;if(!n||!Jo(o,u)){var u=o;a[i++]=0===s?0:s}}return a}function _i(e){return"number"==typeof e?e:pu(e)?Pe:+e}function fi(e){if("string"==typeof e)return e;if(p_(e))return m(e,fi)+"";if(pu(e))return _c?_c.call(e):"";var t=e+"";return"0"==t&&1/e==-Ee?"-0":t}function hi(e,t,n){var r=-1,i=f,a=e.length,s=!0,o=[],u=o;if(n)s=!1,i=h;else if(a>=ae){var d=t?null:Yc(e);if(d)return G(d);s=!1,i=W,u=new yn}else u=t?[]:o;e:for(;++r<a;){var l=e[r],c=t?t(l):l;if(l=n||0!==l?l:0,s&&c===c){for(var _=u.length;_--;)if(u[_]===c)continue e;t&&u.push(c),o.push(l)}else i(u,c,n)||(u!==o&&u.push(c),o.push(l))}return o}function mi(e,t){return t=ki(t,e),null==(e=Ba(e,t))||delete e[Qa(vs(t))]}function pi(e,t,n,r){return ai(e,t,n(pr(e,t)),r)}function yi(e,t,n,r){for(var i=e.length,a=r?i:-1;(r?a--:++a<i)&&t(e[a],a,e););return n?oi(e,r?0:a,r?a+1:i):oi(e,r?a+1:0,r?i:a)}function Mi(e,t){var n=e;return n instanceof v&&(n=n.value()),y(t,function(e,t){return t.func.apply(t.thisArg,p([e],t.args))},n)}function gi(e,t,n){var r=e.length;if(r<2)return r?hi(e[0]):[];for(var i=-1,a=nl(r);++i<r;)for(var s=e[i],o=-1;++o<r;)o!=i&&(a[i]=or(a[i]||s,e[o],t,n));return hi(_r(a,1),t,n)}function vi(e,t,n){for(var r=-1,i=e.length,a=t.length,s={};++r<i;){var o=r<a?t[r]:ie;n(s,e[r],o)}return s}function Li(e){return Bo(e)?e:[]}function Yi(e){return"function"==typeof e?e:jd}function ki(e,t){return p_(e)?e:Ca(e,t)?[e]:Hc(bu(e))}function wi(e,t,n){var r=e.length;return n=n===ie?r:n,!t&&n>=r?e:oi(e,t,n)}function Di(e,t){if(t)return e.slice();var n=e.length,r=Tl?Tl(n):new e.constructor(n);return e.copy(r),r}function Ti(e){var t=new e.constructor(e.byteLength);return new Dl(t).set(new Dl(e)),t}function bi(e,t){var n=t?Ti(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function xi(e,t,n){return y(t?n(q(e),ce):q(e),a,new e.constructor)}function Si(e){var t=new e.constructor(e.source,It.exec(e));return t.lastIndex=e.lastIndex,t}function ji(e,t,n){return y(t?n(G(e),ce):G(e),s,new e.constructor)}function Hi(e){return cc?ol(cc.call(e)):{}}function Ei(e,t){var n=t?Ti(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Oi(e,t){if(e!==t){var n=e!==ie,r=null===e,i=e===e,a=pu(e),s=t!==ie,o=null===t,u=t===t,d=pu(t);if(!o&&!d&&!a&&e>t||a&&s&&u&&!o&&!d||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!d&&e<t||d&&n&&i&&!r&&!a||o&&n&&i||!s&&i||!u)return-1}return 0}function Ai(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,s=i.length,o=n.length;++r<s;){var u=Oi(i[r],a[r]);if(u){if(r>=o)return u;return u*("desc"==n[r]?-1:1)}}return e.index-t.index}function Pi(e,t,n,r){for(var i=-1,a=e.length,s=n.length,o=-1,u=t.length,d=Jl(a-s,0),l=nl(u+d),c=!r;++o<u;)l[o]=t[o];for(;++i<s;)(c||i<a)&&(l[n[i]]=e[i]);for(;d--;)l[o++]=e[i++];return l}function Ci(e,t,n,r){for(var i=-1,a=e.length,s=-1,o=n.length,u=-1,d=t.length,l=Jl(a-o,0),c=nl(l+d),_=!r;++i<l;)c[i]=e[i];for(var f=i;++u<d;)c[f+u]=t[u];for(;++s<o;)(_||i<a)&&(c[f+n[s]]=e[i++]);return c}function Wi(e,t){var n=-1,r=e.length;for(t||(t=nl(r));++n<r;)t[n]=e[n];return t}function Fi(e,t,n,r){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var o=t[a],u=r?r(n[o],e[o],o,n,e):ie;u===ie&&(u=e[o]),i?er(n,o,u):Jn(n,o,u)}return n}function Ni(e,t){return Fi(e,wc(e),t)}function $i(e,t){return Fi(e,Dc(e),t)}function Ri(e,t){return function(n,r){var i=p_(n)?u:Zn,a=t?t():{};return i(n,e,La(r,2),a)}}function zi(e){return ni(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:ie,s=i>2?n[2]:ie;for(a=e.length>3&&"function"==typeof a?(i--,a):ie,s&&Pa(n[0],n[1],s)&&(a=i<3?ie:a,i=1),t=ol(t);++r<i;){var o=n[r];o&&e(t,o,r,a)}return t})}function Ii(e,t){return function(n,r){if(null==n)return n;if(!qo(n))return e(n,r);for(var i=n.length,a=t?i:-1,s=ol(n);(t?a--:++a<i)&&!1!==r(s[a],a,s););return n}}function Ui(e){return function(t,n,r){for(var i=-1,a=ol(t),s=r(t),o=s.length;o--;){var u=s[e?o:++i];if(!1===n(a[u],u,a))break}return t}}function Ji(e,t,n){function r(){return(this&&this!==On&&this instanceof r?a:e).apply(i?n:this,arguments)}var i=t&pe,a=Vi(e);return r}function qi(e){return function(t){t=bu(t);var n=I(t)?ee(t):ie,r=n?n[0]:t.charAt(0),i=n?wi(n,1).join(""):t.slice(1);return r[e]()+i}}function Bi(e){return function(t){return y(Dd(ad(t).replace(mn,"")),e,"")}}function Vi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=fc(e.prototype),r=e.apply(n,t);return iu(r)?r:n}}function Gi(e,t,n){function r(){for(var a=arguments.length,s=nl(a),u=a,d=va(r);u--;)s[u]=arguments[u];var l=a<3&&s[0]!==d&&s[a-1]!==d?[]:V(s,d);return(a-=l.length)<n?sa(e,t,Qi,r.placeholder,ie,s,l,ie,ie,n-a):o(this&&this!==On&&this instanceof r?i:e,this,s)}var i=Vi(e);return r}function Ki(e){return function(t,n,r){var i=ol(t);if(!qo(t)){var a=La(n,3);t=$u(t),n=function(e){return a(i[e],e,i)}}var s=e(t,n,r);return s>-1?i[a?t[s]:s]:ie}}function Zi(e){return pa(function(t){var n=t.length,r=n,a=i.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new ll(oe);if(a&&!o&&"wrapper"==ga(s))var o=new i([],!0)}for(r=o?r:n;++r<n;){s=t[r];var u=ga(s),d="wrapper"==u?kc(s):ie;o=d&&Fa(d[0])&&d[1]==(ke|ge|Le|we)&&!d[4].length&&1==d[9]?o[ga(d[0])].apply(o,d[3]):1==s.length&&Fa(s)?o[u]():o.thru(s)}return function(){var e=arguments,r=e[0];if(o&&1==e.length&&p_(r))return o.plant(r).value();for(var i=0,a=n?t[i].apply(this,e):r;++i<n;)a=t[i].call(this,a);return a}})}function Qi(e,t,n,r,i,a,s,o,u,d){function l(){for(var y=arguments.length,M=nl(y),g=y;g--;)M[g]=arguments[g];if(h)var v=va(l),L=$(M,v);if(r&&(M=Pi(M,r,i,h)),a&&(M=Ci(M,a,s,h)),y-=L,h&&y<d){var Y=V(M,v);return sa(e,t,Qi,l.placeholder,n,M,Y,o,u,d-y)}var k=_?n:this,w=f?k[e]:e;return y=M.length,o?M=Va(M,o):m&&y>1&&M.reverse(),c&&u<y&&(M.length=u),this&&this!==On&&this instanceof l&&(w=p||Vi(w)),w.apply(k,M)}var c=t&ke,_=t&pe,f=t&ye,h=t&(ge|ve),m=t&De,p=f?ie:Vi(e);return l}function Xi(e,t){return function(n,r){return wr(n,e,t(r),{})}}function ea(e,t){return function(n,r){var i;if(n===ie&&r===ie)return t;if(n!==ie&&(i=n),r!==ie){if(i===ie)return r;"string"==typeof n||"string"==typeof r?(n=fi(n),r=fi(r)):(n=_i(n),r=_i(r)),i=e(n,r)}return i}}function ta(e){return pa(function(t){return t=m(t,P(La())),ni(function(n){var r=this;return e(t,function(e){return o(e,r,n)})})})}function na(e,t){t=t===ie?" ":fi(t);var n=t.length;if(n<2)return n?ti(t,e):t;var r=ti(t,Fl(e/X(t)));return I(t)?wi(ee(r),0,e).join(""):r.slice(0,e)}function ra(e,t,n,r){function i(){for(var t=-1,u=arguments.length,d=-1,l=r.length,c=nl(l+u),_=this&&this!==On&&this instanceof i?s:e;++d<l;)c[d]=r[d];for(;u--;)c[d++]=arguments[++t];return o(_,a?n:this,c)}var a=t&pe,s=Vi(e);return i}function ia(e){return function(t,n,r){return r&&"number"!=typeof r&&Pa(t,n,r)&&(n=r=ie),t=Lu(t),n===ie?(n=t,t=0):n=Lu(n),r=r===ie?t<n?1:-1:Lu(r),ei(t,n,r,e)}}function aa(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=wu(t),n=wu(n)),e(t,n)}}function sa(e,t,n,r,i,a,s,o,u,d){var l=t&ge,c=l?s:ie,_=l?ie:s,f=l?a:ie,h=l?ie:a;t|=l?Le:Ye,(t&=~(l?Ye:Le))&Me||(t&=~(pe|ye));var m=[e,t,i,f,c,h,_,o,u,d],p=n.apply(ie,m);return Fa(e)&&xc(p,m),p.placeholder=r,Ga(p,e,t)}function oa(e){var t=sl[e];return function(e,n){if(e=wu(e),n=null==n?0:ql(Yu(n),292)){var r=(bu(e)+"e").split("e");return r=(bu(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"),+(r[0]+"e"+(+r[1]-n))}return t(e)}}function ua(e){return function(t){var n=Tc(t);return n==Ge?q(t):n==tt?K(t):A(t,e(t))}}function da(e,t,n,r,i,a,s,o){var u=t&ye;if(!u&&"function"!=typeof e)throw new ll(oe);var d=r?r.length:0;if(d||(t&=~(Le|Ye),r=i=ie),s=s===ie?s:Jl(Yu(s),0),o=o===ie?o:Yu(o),d-=i?i.length:0,t&Ye){var l=r,c=i;r=i=ie}var _=u?ie:kc(e),f=[e,t,n,r,i,l,c,a,s,o];if(_&&Ia(f,_),e=f[0],t=f[1],n=f[2],r=f[3],i=f[4],o=f[9]=f[9]===ie?u?0:e.length:Jl(f[9]-d,0),!o&&t&(ge|ve)&&(t&=~(ge|ve)),t&&t!=pe)h=t==ge||t==ve?Gi(e,t,o):t!=Le&&t!=(pe|Le)||i.length?Qi.apply(ie,f):ra(e,t,n,r);else var h=Ji(e,t,n);return Ga((_?Mc:xc)(h,f),e,t)}function la(e,t,n,r){return e===ie||Jo(e,fl[n])&&!pl.call(r,n)?t:e}function ca(e,t,n,r,i,a){return iu(e)&&iu(t)&&(a.set(t,e),Ur(e,t,ie,ca,a),a.delete(t)),e}function _a(e){return fu(e)?ie:e}function fa(e,t,n,r,i,a){var s=n&he,o=e.length,u=t.length;if(o!=u&&!(s&&u>o))return!1;var d=a.get(e);if(d&&a.get(t))return d==t;var l=-1,c=!0,_=n&me?new yn:ie;for(a.set(e,t),a.set(t,e);++l<o;){var f=e[l],h=t[l];if(r)var m=s?r(h,f,l,t,e,a):r(f,h,l,e,t,a);if(m!==ie){if(m)continue;c=!1;break}if(_){if(!g(t,function(e,t){if(!W(_,t)&&(f===e||i(f,e,n,r,a)))return _.push(t)})){c=!1;break}}else if(f!==h&&!i(f,h,n,r,a)){c=!1;break}}return a.delete(e),a.delete(t),c}function ha(e,t,n,r,i,a,s){switch(n){case ut:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ot:return!(e.byteLength!=t.byteLength||!a(new Dl(e),new Dl(t)));case Ie:case Ue:case Ke:return Jo(+e,+t);case qe:return e.name==t.name&&e.message==t.message;case et:case nt:return e==t+"";case Ge:var o=q;case tt:var u=r&he;if(o||(o=G),e.size!=t.size&&!u)return!1;var d=s.get(e);if(d)return d==t;r|=me,s.set(e,t);var l=fa(o(e),o(t),r,i,a,s);return s.delete(e),l;case rt:if(cc)return cc.call(e)==cc.call(t)}return!1}function ma(e,t,n,r,i,a){var s=n&he,o=ya(e),u=o.length;if(u!=ya(t).length&&!s)return!1;for(var d=u;d--;){var l=o[d];if(!(s?l in t:pl.call(t,l)))return!1}var c=a.get(e);if(c&&a.get(t))return c==t;var _=!0;a.set(e,t),a.set(t,e);for(var f=s;++d<u;){l=o[d];var h=e[l],m=t[l];if(r)var p=s?r(m,h,l,t,e,a):r(h,m,l,e,t,a);if(!(p===ie?h===m||i(h,m,n,r,a):p)){_=!1;break}f||(f="constructor"==l)}if(_&&!f){var y=e.constructor,M=t.constructor;y!=M&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof M&&M instanceof M)&&(_=!1)}return a.delete(e),a.delete(t),_}function pa(e){return jc(qa(e,ie,_s),e+"")}function ya(e){return yr(e,$u,wc)}function Ma(e){return yr(e,Ru,Dc)}function ga(e){for(var t=e.name+"",n=ic[t],r=pl.call(ic,t)?n.length:0;r--;){var i=n[r],a=i.func;if(null==a||a==e)return i.name}return t}function va(e){return(pl.call(n,"placeholder")?n:e).placeholder}function La(){var e=n.iteratee||Hd;return e=e===Hd?Wr:e,arguments.length?e(arguments[0],arguments[1]):e}function Ya(e,t){var n=e.__data__;return Wa(t)?n["string"==typeof t?"string":"hash"]:n.map}function ka(e){for(var t=$u(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Ra(i)]}return t}function wa(e,t){var n=z(e,t);return Or(n)?n:ie}function Da(e){var t=pl.call(e,Ol),n=e[Ol];try{e[Ol]=ie;var r=!0}catch(e){}var i=gl.call(e);return r&&(t?e[Ol]=n:delete e[Ol]),i}function Ta(e,t,n){for(var r=-1,i=n.length;++r<i;){var a=n[r],s=a.size;switch(a.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=ql(t,e+s);break;case"takeRight":e=Jl(e,t-s)}}return{start:e,end:t}}function ba(e){var t=e.match(Ft);return t?t[1].split(Nt):[]}function xa(e,t,n){t=ki(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var s=Qa(t[r]);if(!(a=null!=e&&n(e,s)))break;e=e[s]}return a||++r!=i?a:!!(i=null==e?0:e.length)&&ru(i)&&Aa(s,i)&&(p_(e)||m_(e))}function Sa(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&pl.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function ja(e){return"function"!=typeof e.constructor||$a(e)?{}:fc(bl(e))}function Ha(e,t,n,r){var i=e.constructor;switch(t){case ot:return Ti(e);case Ie:case Ue:return new i(+e);case ut:return bi(e,r);case dt:case lt:case ct:case _t:case ft:case ht:case mt:case pt:case yt:return Ei(e,r);case Ge:return xi(e,r,n);case Ke:case nt:return new i(e);case et:return Si(e);case tt:return ji(e,r,n);case rt:return Hi(e)}}function Ea(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Wt,"{\n/* [wrapped with "+t+"] */\n")}function Oa(e){return p_(e)||m_(e)||!!(Hl&&e&&e[Hl])}function Aa(e,t){return!!(t=null==t?Oe:t)&&("number"==typeof e||Vt.test(e))&&e>-1&&e%1==0&&e<t}function Pa(e,t,n){if(!iu(n))return!1;var r=typeof t;return!!("number"==r?qo(n)&&Aa(t,n.length):"string"==r&&t in n)&&Jo(n[t],e)}function Ca(e,t){if(p_(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!pu(e))||(St.test(e)||!xt.test(e)||null!=t&&e in ol(t))}function Wa(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Fa(e){var t=ga(e),r=n[t];if("function"!=typeof r||!(t in v.prototype))return!1;if(e===r)return!0;var i=kc(r);return!!i&&e===i[0]}function Na(e){return!!Ml&&Ml in e}function $a(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||fl)}function Ra(e){return e===e&&!iu(e)}function za(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==ie||e in ol(n)))}}function Ia(e,t){var n=e[1],r=t[1],i=n|r,a=i<(pe|ye|ke),s=r==ke&&n==ge||r==ke&&n==we&&e[7].length<=t[8]||r==(ke|we)&&t[7].length<=t[8]&&n==ge;if(!a&&!s)return e;r&pe&&(e[2]=t[2],i|=n&pe?0:Me);var o=t[3];if(o){var u=e[3];e[3]=u?Pi(u,o,t[4]):o,e[4]=u?V(e[3],le):t[4]}return o=t[5],o&&(u=e[5],e[5]=u?Ci(u,o,t[6]):o,e[6]=u?V(e[5],le):t[6]),o=t[7],o&&(e[7]=o),r&ke&&(e[8]=null==e[8]?t[8]:ql(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function Ua(e){var t=[];if(null!=e)for(var n in ol(e))t.push(n);return t}function Ja(e){return gl.call(e)}function qa(e,t,n){return t=Jl(t===ie?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Jl(r.length-t,0),s=nl(a);++i<a;)s[i]=r[t+i];i=-1;for(var u=nl(t+1);++i<t;)u[i]=r[i];return u[t]=n(s),o(e,this,u)}}function Ba(e,t){return t.length<2?e:pr(e,oi(t,0,-1))}function Va(e,t){for(var n=e.length,r=ql(t.length,n),i=Wi(e);r--;){var a=t[r];e[r]=Aa(a,n)?i[a]:ie}return e}function Ga(e,t,n){var r=t+"";return jc(e,Ea(r,es(ba(r),n)))}function Ka(e){var t=0,n=0;return function(){var r=Bl(),i=Se-(r-n);if(n=r,i>0){if(++t>=xe)return arguments[0]}else t=0;return e.apply(ie,arguments)}}function Za(e,t){var n=-1,r=e.length,i=r-1;for(t=t===ie?r:t;++n<t;){var a=Xr(n,i),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}function Qa(e){if("string"==typeof e||pu(e))return e;var t=e+"";return"0"==t&&1/e==-Ee?"-0":t}function Xa(e){if(null!=e){try{return ml.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function es(e,t){return d(Ne,function(n){var r="_."+n[0];t&n[1]&&!f(e,r)&&e.push(r)}),e.sort()}function ts(e){if(e instanceof v)return e.clone();var t=new i(e.__wrapped__,e.__chain__);return t.__actions__=Wi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function ns(e,t,n){t=(n?Pa(e,t,n):t===ie)?1:Jl(Yu(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var i=0,a=0,s=nl(Fl(r/t));i<r;)s[a++]=oi(e,i,i+=t);return s}function rs(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var a=e[t];a&&(i[r++]=a)}return i}function is(){var e=arguments.length;if(!e)return[];for(var t=nl(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return p(p_(n)?Wi(n):[n],_r(t,1))}function as(e,t,n){var r=null==e?0:e.length;return r?(t=n||t===ie?1:Yu(t),oi(e,t<0?0:t,r)):[]}function ss(e,t,n){var r=null==e?0:e.length;return r?(t=n||t===ie?1:Yu(t),t=r-t,oi(e,0,t<0?0:t)):[]}function os(e,t){return e&&e.length?yi(e,La(t,3),!0,!0):[]}function us(e,t){return e&&e.length?yi(e,La(t,3),!0):[]}function ds(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&Pa(e,t,n)&&(n=0,r=i),lr(e,t,n,r)):[]}function ls(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Yu(n);return i<0&&(i=Jl(r+i,0)),k(e,La(t,3),i)}function cs(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==ie&&(i=Yu(n),i=n<0?Jl(r+i,0):ql(i,r-1)),k(e,La(t,3),i,!0)}function _s(e){return(null==e?0:e.length)?_r(e,1):[]}function fs(e){return(null==e?0:e.length)?_r(e,Ee):[]}function hs(e,t){return(null==e?0:e.length)?(t=t===ie?1:Yu(t),_r(e,t)):[]}function ms(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}function ps(e){return e&&e.length?e[0]:ie}function ys(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Yu(n);return i<0&&(i=Jl(r+i,0)),w(e,t,i)}function Ms(e){return(null==e?0:e.length)?oi(e,0,-1):[]}function gs(e,t){return null==e?"":Il.call(e,t)}function vs(e){var t=null==e?0:e.length;return t?e[t-1]:ie}function Ls(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==ie&&(i=Yu(n),i=i<0?Jl(r+i,0):ql(i,r-1)),t===t?Q(e,t,i):k(e,T,i,!0)}function Ys(e,t){return e&&e.length?qr(e,Yu(t)):ie}function ks(e,t){return e&&e.length&&t&&t.length?Zr(e,t):e}function ws(e,t,n){return e&&e.length&&t&&t.length?Zr(e,t,La(n,2)):e}function Ds(e,t,n){return e&&e.length&&t&&t.length?Zr(e,t,ie,n):e}function Ts(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],a=e.length;for(t=La(t,3);++r<a;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return Qr(e,i),n}function bs(e){return null==e?e:Kl.call(e)}function xs(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&Pa(e,t,n)?(t=0,n=r):(t=null==t?0:Yu(t),n=n===ie?r:Yu(n)),oi(e,t,n)):[]}function Ss(e,t){return di(e,t)}function js(e,t,n){return li(e,t,La(n,2))}function Hs(e,t){var n=null==e?0:e.length;if(n){var r=di(e,t);if(r<n&&Jo(e[r],t))return r}return-1}function Es(e,t){return di(e,t,!0)}function Os(e,t,n){return li(e,t,La(n,2),!0)}function As(e,t){if(null==e?0:e.length){var n=di(e,t,!0)-1;if(Jo(e[n],t))return n}return-1}function Ps(e){return e&&e.length?ci(e):[]}function Cs(e,t){return e&&e.length?ci(e,La(t,2)):[]}function Ws(e){var t=null==e?0:e.length;return t?oi(e,1,t):[]}function Fs(e,t,n){return e&&e.length?(t=n||t===ie?1:Yu(t),oi(e,0,t<0?0:t)):[]}function Ns(e,t,n){var r=null==e?0:e.length;return r?(t=n||t===ie?1:Yu(t),t=r-t,oi(e,t<0?0:t,r)):[]}function $s(e,t){return e&&e.length?yi(e,La(t,3),!1,!0):[]}function Rs(e,t){return e&&e.length?yi(e,La(t,3)):[]}function zs(e){return e&&e.length?hi(e):[]}function Is(e,t){return e&&e.length?hi(e,La(t,2)):[]}function Us(e,t){return t="function"==typeof t?t:ie,e&&e.length?hi(e,ie,t):[]}function Js(e){if(!e||!e.length)return[];var t=0;return e=_(e,function(e){if(Bo(e))return t=Jl(e.length,t),!0}),O(t,function(t){return m(e,x(t))})}function qs(e,t){if(!e||!e.length)return[];var n=Js(e);return null==t?n:m(n,function(e){return o(t,ie,e)})}function Bs(e,t){return vi(e||[],t||[],Jn)}function Vs(e,t){return vi(e||[],t||[],ai)}function Gs(e){var t=n(e);return t.__chain__=!0,t}function Ks(e,t){return t(e),e}function Zs(e,t){return t(e)}function Qs(){return Gs(this)}function Xs(){return new i(this.value(),this.__chain__)}function eo(){this.__values__===ie&&(this.__values__=vu(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?ie:this.__values__[this.__index__++]}}function to(){return this}function no(e){for(var t,n=this;n instanceof r;){var i=ts(n);i.__index__=0,i.__values__=ie,t?a.__wrapped__=i:t=i;var a=i;n=n.__wrapped__}return a.__wrapped__=e,t}function ro(){var e=this.__wrapped__;if(e instanceof v){var t=e;return this.__actions__.length&&(t=new v(this)),t=t.reverse(),t.__actions__.push({func:Zs,args:[bs],thisArg:ie}),new i(t,this.__chain__)}return this.thru(bs)}function io(){return Mi(this.__wrapped__,this.__actions__)}function ao(e,t,n){var r=p_(e)?c:ur;return n&&Pa(e,t,n)&&(t=ie),r(e,La(t,3))}function so(e,t){return(p_(e)?_:cr)(e,La(t,3))}function oo(e,t){return _r(ho(e,t),1)}function uo(e,t){return _r(ho(e,t),Ee)}function lo(e,t,n){return n=n===ie?1:Yu(n),_r(ho(e,t),n)}function co(e,t){return(p_(e)?d:hc)(e,La(t,3))}function _o(e,t){return(p_(e)?l:mc)(e,La(t,3))}function fo(e,t,n,r){e=qo(e)?e:Xu(e),n=n&&!r?Yu(n):0;var i=e.length;return n<0&&(n=Jl(i+n,0)),mu(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&w(e,t,n)>-1}function ho(e,t){return(p_(e)?m:Rr)(e,La(t,3))}function mo(e,t,n,r){return null==e?[]:(p_(t)||(t=null==t?[]:[t]),n=r?ie:n,p_(n)||(n=null==n?[]:[n]),Br(e,t,n))}function po(e,t,n){var r=p_(e)?y:j,i=arguments.length<3;return r(e,La(t,4),n,i,hc)}function yo(e,t,n){var r=p_(e)?M:j,i=arguments.length<3;return r(e,La(t,4),n,i,mc)}function Mo(e,t){return(p_(e)?_:cr)(e,Eo(La(t,3)))}function go(e){return(p_(e)?An:ri)(e)}function vo(e,t,n){return t=(n?Pa(e,t,n):t===ie)?1:Yu(t),(p_(e)?Pn:ii)(e,t)}function Lo(e){return(p_(e)?Wn:si)(e)}function Yo(e){if(null==e)return 0;if(qo(e))return mu(e)?X(e):e.length;var t=Tc(e);return t==Ge||t==tt?e.size:Fr(e).length}function ko(e,t,n){var r=p_(e)?g:ui;return n&&Pa(e,t,n)&&(t=ie),r(e,La(t,3))}function wo(e,t){if("function"!=typeof t)throw new ll(oe);return e=Yu(e),function(){if(--e<1)return t.apply(this,arguments)}}function Do(e,t,n){return t=n?ie:t,t=e&&null==t?e.length:t,da(e,ke,ie,ie,ie,ie,t)}function To(e,t){var n;if("function"!=typeof t)throw new ll(oe);return e=Yu(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=ie),n}}function bo(e,t,n){t=n?ie:t;var r=da(e,ge,ie,ie,ie,ie,ie,t);return r.placeholder=bo.placeholder,r}function xo(e,t,n){t=n?ie:t;var r=da(e,ve,ie,ie,ie,ie,ie,t);return r.placeholder=xo.placeholder,r}function So(e,t,n){function r(t){var n=_,r=f;return _=f=ie,M=t,m=e.apply(r,n)}function i(e){return M=e,p=Sc(o,t),g?r(e):m}function a(e){var n=e-y,r=e-M,i=t-n;return v?ql(i,h-r):i}function s(e){var n=e-y,r=e-M;return y===ie||n>=t||n<0||v&&r>=h}function o(){var e=i_();if(s(e))return u(e);p=Sc(o,a(e))}function u(e){return p=ie,L&&_?r(e):(_=f=ie,m)}function d(){p!==ie&&Lc(p),M=0,_=y=f=p=ie}function l(){return p===ie?m:u(i_())}function c(){var e=i_(),n=s(e);if(_=arguments,f=this,y=e,n){if(p===ie)return i(y);if(v)return p=Sc(o,t),r(y)}return p===ie&&(p=Sc(o,t)),m}var _,f,h,m,p,y,M=0,g=!1,v=!1,L=!0;if("function"!=typeof e)throw new ll(oe);return t=wu(t)||0,iu(n)&&(g=!!n.leading,v="maxWait"in n,h=v?Jl(wu(n.maxWait)||0,t):h,L="trailing"in n?!!n.trailing:L),c.cancel=d,c.flush=l,c}function jo(e){return da(e,De)}function Ho(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ll(oe);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var s=e.apply(this,r);return n.cache=a.set(i,s)||a,s};return n.cache=new(Ho.Cache||dn),n}function Eo(e){if("function"!=typeof e)throw new ll(oe);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Oo(e){return To(2,e)}function Ao(e,t){if("function"!=typeof e)throw new ll(oe);return t=t===ie?t:Yu(t),ni(e,t)}function Po(e,t){if("function"!=typeof e)throw new ll(oe);return t=null==t?0:Jl(Yu(t),0),ni(function(n){var r=n[t],i=wi(n,0,t);return r&&p(i,r),o(e,this,i)})}function Co(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ll(oe);return iu(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),So(e,t,{leading:r,maxWait:t,trailing:i})}function Wo(e){return Do(e,1)}function Fo(e,t){return l_(Yi(t),e)}function No(){if(!arguments.length)return[];var e=arguments[0];return p_(e)?e:[e]}function $o(e){return rr(e,fe)}function Ro(e,t){return t="function"==typeof t?t:ie,rr(e,fe,t)}function zo(e){return rr(e,ce|fe)}function Io(e,t){return t="function"==typeof t?t:ie,rr(e,ce|fe,t)}function Uo(e,t){return null==t||ar(e,t,$u(t))}function Jo(e,t){return e===t||e!==e&&t!==t}function qo(e){return null!=e&&ru(e.length)&&!tu(e)}function Bo(e){return au(e)&&qo(e)}function Vo(e){return!0===e||!1===e||au(e)&&Mr(e)==Ie}function Go(e){return au(e)&&1===e.nodeType&&!fu(e)}function Ko(e){if(null==e)return!0;if(qo(e)&&(p_(e)||"string"==typeof e||"function"==typeof e.splice||M_(e)||k_(e)||m_(e)))return!e.length;var t=Tc(e);if(t==Ge||t==tt)return!e.size;if($a(e))return!Fr(e).length;for(var n in e)if(pl.call(e,n))return!1;return!0}function Zo(e,t){return Sr(e,t)}function Qo(e,t,n){n="function"==typeof n?n:ie;var r=n?n(e,t):ie;return r===ie?Sr(e,t,ie,n):!!r}function Xo(e){if(!au(e))return!1;var t=Mr(e);return t==qe||t==Je||"string"==typeof e.message&&"string"==typeof e.name&&!fu(e)}function eu(e){return"number"==typeof e&&zl(e)}function tu(e){if(!iu(e))return!1;var t=Mr(e);return t==Be||t==Ve||t==ze||t==Xe}function nu(e){return"number"==typeof e&&e==Yu(e)}function ru(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Oe}function iu(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function au(e){return null!=e&&"object"==typeof e}function su(e,t){return e===t||Er(e,t,ka(t))}function ou(e,t,n){return n="function"==typeof n?n:ie,Er(e,t,ka(t),n)}function uu(e){return _u(e)&&e!=+e}function du(e){if(bc(e))throw new il(se);return Or(e)}function lu(e){return null===e}function cu(e){return null==e}function _u(e){return"number"==typeof e||au(e)&&Mr(e)==Ke}function fu(e){if(!au(e)||Mr(e)!=Qe)return!1;var t=bl(e);if(null===t)return!0;var n=pl.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ml.call(n)==vl}function hu(e){return nu(e)&&e>=-Oe&&e<=Oe}function mu(e){return"string"==typeof e||!p_(e)&&au(e)&&Mr(e)==nt}function pu(e){return"symbol"==typeof e||au(e)&&Mr(e)==rt}function yu(e){return e===ie}function Mu(e){return au(e)&&Tc(e)==at}function gu(e){return au(e)&&Mr(e)==st}function vu(e){if(!e)return[];if(qo(e))return mu(e)?ee(e):Wi(e);if(El&&e[El])return J(e[El]());var t=Tc(e);return(t==Ge?q:t==tt?G:Xu)(e)}function Lu(e){if(!e)return 0===e?e:0;if((e=wu(e))===Ee||e===-Ee){return(e<0?-1:1)*Ae}return e===e?e:0}function Yu(e){var t=Lu(e),n=t%1;return t===t?n?t-n:t:0}function ku(e){return e?nr(Yu(e),0,Ce):0}function wu(e){if("number"==typeof e)return e;if(pu(e))return Pe;if(iu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=iu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(At,"");var n=Jt.test(e);return n||Bt.test(e)?jn(e.slice(2),n?2:8):Ut.test(e)?Pe:+e}function Du(e){return Fi(e,Ru(e))}function Tu(e){return e?nr(Yu(e),-Oe,Oe):0===e?e:0}function bu(e){return null==e?"":fi(e)}function xu(e,t){var n=fc(e);return null==t?n:Qn(n,t)}function Su(e,t){return Y(e,La(t,3),fr)}function ju(e,t){return Y(e,La(t,3),hr)}function Hu(e,t){return null==e?e:pc(e,La(t,3),Ru)}function Eu(e,t){return null==e?e:yc(e,La(t,3),Ru)}function Ou(e,t){return e&&fr(e,La(t,3))}function Au(e,t){return e&&hr(e,La(t,3))}function Pu(e){return null==e?[]:mr(e,$u(e))}function Cu(e){return null==e?[]:mr(e,Ru(e))}function Wu(e,t,n){var r=null==e?ie:pr(e,t);return r===ie?n:r}function Fu(e,t){return null!=e&&xa(e,t,vr)}function Nu(e,t){return null!=e&&xa(e,t,Lr)}function $u(e){return qo(e)?En(e):Fr(e)}function Ru(e){return qo(e)?En(e,!0):Nr(e)}function zu(e,t){var n={};return t=La(t,3),fr(e,function(e,r,i){er(n,t(e,r,i),e)}),n}function Iu(e,t){var n={};return t=La(t,3),fr(e,function(e,r,i){er(n,r,t(e,r,i))}),n}function Uu(e,t){return Ju(e,Eo(La(t)))}function Ju(e,t){if(null==e)return{};var n=m(Ma(e),function(e){return[e]});return t=La(t),Gr(e,n,function(e,n){return t(e,n[0])})}function qu(e,t,n){t=ki(t,e);var r=-1,i=t.length;for(i||(i=1,e=ie);++r<i;){var a=null==e?ie:e[Qa(t[r])];a===ie&&(r=i,a=n),e=tu(a)?a.call(e):a}return e}function Bu(e,t,n){return null==e?e:ai(e,t,n)}function Vu(e,t,n,r){return r="function"==typeof r?r:ie,null==e?e:ai(e,t,n,r)}function Gu(e,t,n){var r=p_(e),i=r||M_(e)||k_(e);if(t=La(t,4),null==n){var a=e&&e.constructor;n=i?r?new a:[]:iu(e)&&tu(a)?fc(bl(e)):{}}return(i?d:fr)(e,function(e,r,i){return t(n,e,r,i)}),n}function Ku(e,t){return null==e||mi(e,t)}function Zu(e,t,n){return null==e?e:pi(e,t,Yi(n))}function Qu(e,t,n,r){return r="function"==typeof r?r:ie,null==e?e:pi(e,t,Yi(n),r)}function Xu(e){return null==e?[]:C(e,$u(e))}function ed(e){return null==e?[]:C(e,Ru(e))}function td(e,t,n){return n===ie&&(n=t,t=ie),n!==ie&&(n=wu(n),n=n===n?n:0),t!==ie&&(t=wu(t),t=t===t?t:0),nr(wu(e),t,n)}function nd(e,t,n){return t=Lu(t),n===ie?(n=t,t=0):n=Lu(n),e=wu(e),Yr(e,t,n)}function rd(e,t,n){if(n&&"boolean"!=typeof n&&Pa(e,t,n)&&(t=n=ie),n===ie&&("boolean"==typeof t?(n=t,t=ie):"boolean"==typeof e&&(n=e,e=ie)),e===ie&&t===ie?(e=0,t=1):(e=Lu(e),t===ie?(t=e,e=0):t=Lu(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=Gl();return ql(e+i*(t-e+Sn("1e-"+((i+"").length-1))),t)}return Xr(e,t)}function id(e){return G_(bu(e).toLowerCase())}function ad(e){return(e=bu(e))&&e.replace(Gt,qn).replace(pn,"")}function sd(e,t,n){e=bu(e),t=fi(t);var r=e.length;n=n===ie?r:nr(Yu(n),0,r);var i=n;return(n-=t.length)>=0&&e.slice(n,i)==t}function od(e){return e=bu(e),e&&wt.test(e)?e.replace(Yt,Bn):e}function ud(e){return e=bu(e),e&&Ot.test(e)?e.replace(Et,"\\$&"):e}function dd(e,t,n){e=bu(e),t=Yu(t);var r=t?X(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return na(Nl(i),n)+e+na(Fl(i),n)}function ld(e,t,n){e=bu(e),t=Yu(t);var r=t?X(e):0;return t&&r<t?e+na(t-r,n):e}function cd(e,t,n){e=bu(e),t=Yu(t);var r=t?X(e):0;return t&&r<t?na(t-r,n)+e:e}function _d(e,t,n){return n||null==t?t=0:t&&(t=+t),Vl(bu(e).replace(Pt,""),t||0)}function fd(e,t,n){return t=(n?Pa(e,t,n):t===ie)?1:Yu(t),ti(bu(e),t)}function hd(){var e=arguments,t=bu(e[0]);return e.length<3?t:t.replace(e[1],e[2])}function md(e,t,n){return n&&"number"!=typeof n&&Pa(e,t,n)&&(t=n=ie),(n=n===ie?Ce:n>>>0)?(e=bu(e),e&&("string"==typeof t||null!=t&&!L_(t))&&!(t=fi(t))&&I(e)?wi(ee(e),0,n):e.split(t,n)):[]}function pd(e,t,n){return e=bu(e),n=null==n?0:nr(Yu(n),0,e.length),t=fi(t),e.slice(n,n+t.length)==t}function yd(e,t,r){var i=n.templateSettings;r&&Pa(e,t,r)&&(t=ie),e=bu(e),t=x_({},t,i,la);var a,s,o=x_({},t.imports,i.imports,la),u=$u(o),d=C(o,u),l=0,c=t.interpolate||Kt,_="__p += '",f=ul((t.escape||Kt).source+"|"+c.source+"|"+(c===bt?zt:Kt).source+"|"+(t.evaluate||Kt).source+"|$","g"),h="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++Yn+"]")+"\n";e.replace(f,function(t,n,r,i,o,u){return r||(r=i),_+=e.slice(l,u).replace(Zt,R),n&&(a=!0,_+="' +\n__e("+n+") +\n'"),o&&(s=!0,_+="';\n"+o+";\n__p += '"),r&&(_+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t}),_+="';\n";var m=t.variable;m||(_="with (obj) {\n"+_+"\n}\n"),_=(s?_.replace(Mt,""):_).replace(gt,"$1").replace(vt,"$1;"),_="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+_+"return __p\n}";var p=K_(function(){return al(u,h+"return "+_).apply(ie,d)});if(p.source=_,Xo(p))throw p;return p}function Md(e){return bu(e).toLowerCase()}function gd(e){return bu(e).toUpperCase()}function vd(e,t,n){if((e=bu(e))&&(n||t===ie))return e.replace(At,"");if(!e||!(t=fi(t)))return e;var r=ee(e),i=ee(t);return wi(r,F(r,i),N(r,i)+1).join("")}function Ld(e,t,n){if((e=bu(e))&&(n||t===ie))return e.replace(Ct,"");if(!e||!(t=fi(t)))return e;var r=ee(e);return wi(r,0,N(r,ee(t))+1).join("")}function Yd(e,t,n){if((e=bu(e))&&(n||t===ie))return e.replace(Pt,"");if(!e||!(t=fi(t)))return e;var r=ee(e);return wi(r,F(r,ee(t))).join("")}function kd(e,t){var n=Te,r=be;if(iu(t)){var i="separator"in t?t.separator:i;n="length"in t?Yu(t.length):n,r="omission"in t?fi(t.omission):r}e=bu(e);var a=e.length;if(I(e)){var s=ee(e);a=s.length}if(n>=a)return e;var o=n-X(r);if(o<1)return r;var u=s?wi(s,0,o).join(""):e.slice(0,o);if(i===ie)return u+r;if(s&&(o+=u.length-o),L_(i)){if(e.slice(o).search(i)){var d,l=u;for(i.global||(i=ul(i.source,bu(It.exec(i))+"g")),i.lastIndex=0;d=i.exec(l);)var c=d.index;u=u.slice(0,c===ie?o:c)}}else if(e.indexOf(fi(i),o)!=o){var _=u.lastIndexOf(i);_>-1&&(u=u.slice(0,_))}return u+r}function wd(e){return e=bu(e),e&&kt.test(e)?e.replace(Lt,Vn):e}function Dd(e,t,n){return e=bu(e),t=n?ie:t,t===ie?U(e)?re(e):L(e):e.match(t)||[]}function Td(e){var t=null==e?0:e.length,n=La();return e=t?m(e,function(e){if("function"!=typeof e[1])throw new ll(oe);return[n(e[0]),e[1]]}):[],ni(function(n){for(var r=-1;++r<t;){var i=e[r];if(o(i[0],this,n))return o(i[1],this,n)}})}function bd(e){return ir(rr(e,ce))}function xd(e){return function(){return e}}function Sd(e,t){return null==e||e!==e?t:e}function jd(e){return e}function Hd(e){return Wr("function"==typeof e?e:rr(e,ce))}function Ed(e){return zr(rr(e,ce))}function Od(e,t){return Ir(e,rr(t,ce))}function Ad(e,t,n){var r=$u(t),i=mr(t,r);null!=n||iu(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=mr(t,$u(t)));var a=!(iu(n)&&"chain"in n&&!n.chain),s=tu(e);return d(i,function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__);return(n.__actions__=Wi(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,p([this.value()],arguments))})}),e}function Pd(){return On._===this&&(On._=Ll),this}function Cd(){}function Wd(e){return e=Yu(e),ni(function(t){return qr(t,e)})}function Fd(e){return Ca(e)?x(Qa(e)):Kr(e)}function Nd(e){return function(t){return null==e?ie:pr(e,t)}}function $d(){return[]}function Rd(){return!1}function zd(){return{}}function Id(){return""}function Ud(){return!0}function Jd(e,t){if((e=Yu(e))<1||e>Oe)return[];var n=Ce,r=ql(e,Ce);t=La(t),e-=Ce;for(var i=O(r,t);++n<e;)t(n);return i}function qd(e){return p_(e)?m(e,Qa):pu(e)?[e]:Wi(Hc(bu(e)))}function Bd(e){var t=++yl;return bu(e)+t}function Vd(e){return e&&e.length?dr(e,jd,gr):ie}function Gd(e,t){return e&&e.length?dr(e,La(t,2),gr):ie}function Kd(e){return b(e,jd)}function Zd(e,t){return b(e,La(t,2))}function Qd(e){return e&&e.length?dr(e,jd,$r):ie}function Xd(e,t){return e&&e.length?dr(e,La(t,2),$r):ie}function el(e){return e&&e.length?E(e,jd):0}function tl(e,t){return e&&e.length?E(e,La(t,2)):0}t=null==t?On:Gn.defaults(On.Object(),t,Gn.pick(On,Ln));var nl=t.Array,rl=t.Date,il=t.Error,al=t.Function,sl=t.Math,ol=t.Object,ul=t.RegExp,dl=t.String,ll=t.TypeError,cl=nl.prototype,_l=al.prototype,fl=ol.prototype,hl=t["__core-js_shared__"],ml=_l.toString,pl=fl.hasOwnProperty,yl=0,Ml=function(){var e=/[^.]+$/.exec(hl&&hl.keys&&hl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),gl=fl.toString,vl=ml.call(ol),Ll=On._,Yl=ul("^"+ml.call(pl).replace(Et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),kl=Cn?t.Buffer:ie,wl=t.Symbol,Dl=t.Uint8Array,Tl=kl?kl.allocUnsafe:ie,bl=B(ol.getPrototypeOf,ol),xl=ol.create,Sl=fl.propertyIsEnumerable,jl=cl.splice,Hl=wl?wl.isConcatSpreadable:ie,El=wl?wl.iterator:ie,Ol=wl?wl.toStringTag:ie,Al=function(){try{var e=wa(ol,"defineProperty");return e({},"",{}),e}catch(e){}}(),Pl=t.clearTimeout!==On.clearTimeout&&t.clearTimeout,Cl=rl&&rl.now!==On.Date.now&&rl.now,Wl=t.setTimeout!==On.setTimeout&&t.setTimeout,Fl=sl.ceil,Nl=sl.floor,$l=ol.getOwnPropertySymbols,Rl=kl?kl.isBuffer:ie,zl=t.isFinite,Il=cl.join,Ul=B(ol.keys,ol),Jl=sl.max,ql=sl.min,Bl=rl.now,Vl=t.parseInt,Gl=sl.random,Kl=cl.reverse,Zl=wa(t,"DataView"),Ql=wa(t,"Map"),Xl=wa(t,"Promise"),ec=wa(t,"Set"),tc=wa(t,"WeakMap"),nc=wa(ol,"create"),rc=tc&&new tc,ic={},ac=Xa(Zl),sc=Xa(Ql),oc=Xa(Xl),uc=Xa(ec),dc=Xa(tc),lc=wl?wl.prototype:ie,cc=lc?lc.valueOf:ie,_c=lc?lc.toString:ie,fc=function(){function e(){}return function(t){if(!iu(t))return{};if(xl)return xl(t);e.prototype=t;var n=new e;return e.prototype=ie,n}}();n.templateSettings={escape:Dt,evaluate:Tt,interpolate:bt,variable:"",imports:{_:n}},n.prototype=r.prototype,n.prototype.constructor=n,i.prototype=fc(r.prototype),i.prototype.constructor=i,v.prototype=fc(r.prototype),v.prototype.constructor=v,ne.prototype.clear=$t,ne.prototype.delete=Qt,ne.prototype.get=Xt,ne.prototype.has=en,ne.prototype.set=tn,nn.prototype.clear=rn,nn.prototype.delete=an,nn.prototype.get=sn,nn.prototype.has=on,nn.prototype.set=un,dn.prototype.clear=ln,dn.prototype.delete=cn,dn.prototype.get=_n,dn.prototype.has=fn,dn.prototype.set=hn,yn.prototype.add=yn.prototype.push=Mn,yn.prototype.has=gn,vn.prototype.clear=Dn,vn.prototype.delete=Tn,vn.prototype.get=bn,vn.prototype.has=xn,vn.prototype.set=Hn;var hc=Ii(fr),mc=Ii(hr,!0),pc=Ui(),yc=Ui(!0),Mc=rc?function(e,t){return rc.set(e,t),e}:jd,gc=Al?function(e,t){return Al(e,"toString",{configurable:!0,enumerable:!1,value:xd(t),writable:!0})}:jd,vc=ni,Lc=Pl||function(e){return On.clearTimeout(e)},Yc=ec&&1/G(new ec([,-0]))[1]==Ee?function(e){return new ec(e)}:Cd,kc=rc?function(e){return rc.get(e)}:Cd,wc=$l?function(e){return null==e?[]:(e=ol(e),_($l(e),function(t){return Sl.call(e,t)}))}:$d,Dc=$l?function(e){for(var t=[];e;)p(t,wc(e)),e=bl(e);return t}:$d,Tc=Mr;(Zl&&Tc(new Zl(new ArrayBuffer(1)))!=ut||Ql&&Tc(new Ql)!=Ge||Xl&&"[object Promise]"!=Tc(Xl.resolve())||ec&&Tc(new ec)!=tt||tc&&Tc(new tc)!=at)&&(Tc=function(e){var t=Mr(e),n=t==Qe?e.constructor:ie,r=n?Xa(n):"";if(r)switch(r){case ac:return ut;case sc:return Ge;case oc:return"[object Promise]";case uc:return tt;case dc:return at}return t});var bc=hl?tu:Rd,xc=Ka(Mc),Sc=Wl||function(e,t){return On.setTimeout(e,t)},jc=Ka(gc),Hc=function(e){var t=Ho(e,function(e){return n.size===de&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return jt.test(e)&&t.push(""),e.replace(Ht,function(e,n,r,i){t.push(r?i.replace(Rt,"$1"):n||e)}),t}),Ec=ni(function(e,t){return Bo(e)?or(e,_r(t,1,Bo,!0)):[]}),Oc=ni(function(e,t){var n=vs(t);return Bo(n)&&(n=ie),Bo(e)?or(e,_r(t,1,Bo,!0),La(n,2)):[]}),Ac=ni(function(e,t){var n=vs(t);return Bo(n)&&(n=ie),Bo(e)?or(e,_r(t,1,Bo,!0),ie,n):[]}),Pc=ni(function(e){var t=m(e,Li);return t.length&&t[0]===e[0]?kr(t):[]}),Cc=ni(function(e){var t=vs(e),n=m(e,Li);return t===vs(n)?t=ie:n.pop(),n.length&&n[0]===e[0]?kr(n,La(t,2)):[]}),Wc=ni(function(e){var t=vs(e),n=m(e,Li);return t="function"==typeof t?t:ie,t&&n.pop(),n.length&&n[0]===e[0]?kr(n,ie,t):[]}),Fc=ni(ks),Nc=pa(function(e,t){var n=null==e?0:e.length,r=tr(e,t);return Qr(e,m(t,function(e){return Aa(e,n)?+e:e}).sort(Oi)),r}),$c=ni(function(e){return hi(_r(e,1,Bo,!0))}),Rc=ni(function(e){var t=vs(e);return Bo(t)&&(t=ie),hi(_r(e,1,Bo,!0),La(t,2))}),zc=ni(function(e){var t=vs(e);return t="function"==typeof t?t:ie,hi(_r(e,1,Bo,!0),ie,t)}),Ic=ni(function(e,t){return Bo(e)?or(e,t):[]}),Uc=ni(function(e){return gi(_(e,Bo))}),Jc=ni(function(e){var t=vs(e);return Bo(t)&&(t=ie),gi(_(e,Bo),La(t,2))}),qc=ni(function(e){var t=vs(e);return t="function"==typeof t?t:ie,gi(_(e,Bo),ie,t)}),Bc=ni(Js),Vc=ni(function(e){var t=e.length,n=t>1?e[t-1]:ie;return n="function"==typeof n?(e.pop(),n):ie,qs(e,n)}),Gc=pa(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,a=function(t){return tr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof v&&Aa(n)?(r=r.slice(n,+n+(t?1:0)),r.__actions__.push({func:Zs,args:[a],thisArg:ie}),new i(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(ie),e})):this.thru(a)}),Kc=Ri(function(e,t,n){pl.call(e,n)?++e[n]:er(e,n,1)}),Zc=Ki(ls),Qc=Ki(cs),Xc=Ri(function(e,t,n){pl.call(e,n)?e[n].push(t):er(e,n,[t])}),e_=ni(function(e,t,n){var r=-1,i="function"==typeof t,a=qo(e)?nl(e.length):[];return hc(e,function(e){a[++r]=i?o(t,e,n):Dr(e,t,n)}),a}),t_=Ri(function(e,t,n){er(e,n,t)}),n_=Ri(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),r_=ni(function(e,t){if(null==e)return[];var n=t.length;return n>1&&Pa(e,t[0],t[1])?t=[]:n>2&&Pa(t[0],t[1],t[2])&&(t=[t[0]]),Br(e,_r(t,1),[])}),i_=Cl||function(){return On.Date.now()},a_=ni(function(e,t,n){var r=pe;if(n.length){var i=V(n,va(a_));r|=Le}return da(e,r,t,n,i)}),s_=ni(function(e,t,n){var r=pe|ye;if(n.length){var i=V(n,va(s_));r|=Le}return da(t,r,e,n,i)}),o_=ni(function(e,t){return sr(e,1,t)}),u_=ni(function(e,t,n){return sr(e,wu(t)||0,n)});Ho.Cache=dn;var d_=vc(function(e,t){t=1==t.length&&p_(t[0])?m(t[0],P(La())):m(_r(t,1),P(La()));var n=t.length;return ni(function(r){for(var i=-1,a=ql(r.length,n);++i<a;)r[i]=t[i].call(this,r[i]);return o(e,this,r)})}),l_=ni(function(e,t){var n=V(t,va(l_));return da(e,Le,ie,t,n)}),c_=ni(function(e,t){var n=V(t,va(c_));return da(e,Ye,ie,t,n)}),__=pa(function(e,t){return da(e,we,ie,ie,ie,t)}),f_=aa(gr),h_=aa(function(e,t){return e>=t}),m_=Tr(function(){return arguments}())?Tr:function(e){return au(e)&&pl.call(e,"callee")&&!Sl.call(e,"callee")},p_=nl.isArray,y_=Nn?P(Nn):br,M_=Rl||Rd,g_=$n?P($n):xr,v_=Rn?P(Rn):Hr,L_=zn?P(zn):Ar,Y_=In?P(In):Pr,k_=Un?P(Un):Cr,w_=aa($r),D_=aa(function(e,t){return e<=t}),T_=zi(function(e,t){if($a(t)||qo(t))return void Fi(t,$u(t),e);for(var n in t)pl.call(t,n)&&Jn(e,n,t[n])}),b_=zi(function(e,t){Fi(t,Ru(t),e)}),x_=zi(function(e,t,n,r){Fi(t,Ru(t),e,r)}),S_=zi(function(e,t,n,r){Fi(t,$u(t),e,r)}),j_=pa(tr),H_=ni(function(e){return e.push(ie,la),o(x_,ie,e)}),E_=ni(function(e){return e.push(ie,ca),o(W_,ie,e)}),O_=Xi(function(e,t,n){e[t]=n},xd(jd)),A_=Xi(function(e,t,n){pl.call(e,t)?e[t].push(n):e[t]=[n]},La),P_=ni(Dr),C_=zi(function(e,t,n){Ur(e,t,n)}),W_=zi(function(e,t,n,r){Ur(e,t,n,r)}),F_=pa(function(e,t){var n={};if(null==e)return n;var r=!1;t=m(t,function(t){return t=ki(t,e),r||(r=t.length>1),t}),Fi(e,Ma(e),n),r&&(n=rr(n,ce|_e|fe,_a));for(var i=t.length;i--;)mi(n,t[i]);return n}),N_=pa(function(e,t){return null==e?{}:Vr(e,t)}),$_=ua($u),R_=ua(Ru),z_=Bi(function(e,t,n){return t=t.toLowerCase(),e+(n?id(t):t)}),I_=Bi(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),U_=Bi(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),J_=qi("toLowerCase"),q_=Bi(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),B_=Bi(function(e,t,n){return e+(n?" ":"")+G_(t)}),V_=Bi(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),G_=qi("toUpperCase"),K_=ni(function(e,t){try{return o(e,ie,t)}catch(e){return Xo(e)?e:new il(e)}}),Z_=pa(function(e,t){return d(t,function(t){t=Qa(t),er(e,t,a_(e[t],e))}),e}),Q_=Zi(),X_=Zi(!0),ef=ni(function(e,t){return function(n){return Dr(n,e,t)}}),tf=ni(function(e,t){return function(n){return Dr(e,n,t)}}),nf=ta(m),rf=ta(c),af=ta(g),sf=ia(),of=ia(!0),uf=ea(function(e,t){return e+t},0),df=oa("ceil"),lf=ea(function(e,t){return e/t},1),cf=oa("floor"),_f=ea(function(e,t){return e*t},1),ff=oa("round"),hf=ea(function(e,t){return e-t},0);return n.after=wo,n.ary=Do,n.assign=T_,n.assignIn=b_,n.assignInWith=x_,n.assignWith=S_,n.at=j_,n.before=To,n.bind=a_,n.bindAll=Z_,n.bindKey=s_,n.castArray=No,n.chain=Gs,n.chunk=ns,n.compact=rs,n.concat=is,n.cond=Td,n.conforms=bd,n.constant=xd,n.countBy=Kc,n.create=xu,n.curry=bo,n.curryRight=xo,n.debounce=So,n.defaults=H_,n.defaultsDeep=E_,n.defer=o_,n.delay=u_,n.difference=Ec,n.differenceBy=Oc,n.differenceWith=Ac,n.drop=as,n.dropRight=ss,n.dropRightWhile=os,n.dropWhile=us,n.fill=ds,n.filter=so,n.flatMap=oo,n.flatMapDeep=uo,n.flatMapDepth=lo,n.flatten=_s,n.flattenDeep=fs,n.flattenDepth=hs,n.flip=jo,n.flow=Q_,n.flowRight=X_,n.fromPairs=ms,n.functions=Pu,n.functionsIn=Cu,n.groupBy=Xc,n.initial=Ms,n.intersection=Pc,n.intersectionBy=Cc,n.intersectionWith=Wc,n.invert=O_,n.invertBy=A_,n.invokeMap=e_,n.iteratee=Hd,n.keyBy=t_,n.keys=$u,n.keysIn=Ru,n.map=ho,n.mapKeys=zu,n.mapValues=Iu,n.matches=Ed,n.matchesProperty=Od,n.memoize=Ho,n.merge=C_,n.mergeWith=W_,n.method=ef,n.methodOf=tf,n.mixin=Ad,n.negate=Eo,n.nthArg=Wd,n.omit=F_,n.omitBy=Uu,n.once=Oo,n.orderBy=mo,n.over=nf,n.overArgs=d_,n.overEvery=rf,n.overSome=af,n.partial=l_,n.partialRight=c_,n.partition=n_,n.pick=N_,n.pickBy=Ju,n.property=Fd,n.propertyOf=Nd,n.pull=Fc,n.pullAll=ks,n.pullAllBy=ws,n.pullAllWith=Ds,n.pullAt=Nc,n.range=sf,n.rangeRight=of,n.rearg=__,n.reject=Mo,n.remove=Ts,n.rest=Ao,n.reverse=bs,n.sampleSize=vo,n.set=Bu,n.setWith=Vu,n.shuffle=Lo,n.slice=xs,n.sortBy=r_,n.sortedUniq=Ps,n.sortedUniqBy=Cs,n.split=md,n.spread=Po,n.tail=Ws,n.take=Fs,n.takeRight=Ns,n.takeRightWhile=$s,n.takeWhile=Rs,n.tap=Ks,n.throttle=Co,n.thru=Zs,n.toArray=vu,n.toPairs=$_,n.toPairsIn=R_,n.toPath=qd,n.toPlainObject=Du,n.transform=Gu,n.unary=Wo,n.union=$c,n.unionBy=Rc,n.unionWith=zc,n.uniq=zs,n.uniqBy=Is,n.uniqWith=Us,n.unset=Ku,n.unzip=Js,n.unzipWith=qs,n.update=Zu,n.updateWith=Qu,n.values=Xu,n.valuesIn=ed,n.without=Ic,n.words=Dd,n.wrap=Fo,n.xor=Uc,n.xorBy=Jc,n.xorWith=qc,n.zip=Bc,n.zipObject=Bs,n.zipObjectDeep=Vs,n.zipWith=Vc,n.entries=$_,n.entriesIn=R_,n.extend=b_,n.extendWith=x_,Ad(n,n),n.add=uf,n.attempt=K_,n.camelCase=z_,n.capitalize=id,n.ceil=df,n.clamp=td,n.clone=$o,n.cloneDeep=zo,n.cloneDeepWith=Io,n.cloneWith=Ro,n.conformsTo=Uo,n.deburr=ad,n.defaultTo=Sd,n.divide=lf,n.endsWith=sd,n.eq=Jo,n.escape=od,n.escapeRegExp=ud,n.every=ao,n.find=Zc,n.findIndex=ls,n.findKey=Su,n.findLast=Qc,n.findLastIndex=cs,n.findLastKey=ju,n.floor=cf,n.forEach=co,n.forEachRight=_o,n.forIn=Hu,n.forInRight=Eu,n.forOwn=Ou,n.forOwnRight=Au,n.get=Wu,n.gt=f_,n.gte=h_,n.has=Fu,n.hasIn=Nu,n.head=ps,n.identity=jd,n.includes=fo,n.indexOf=ys,n.inRange=nd,n.invoke=P_,n.isArguments=m_,n.isArray=p_,n.isArrayBuffer=y_,n.isArrayLike=qo,n.isArrayLikeObject=Bo,n.isBoolean=Vo,n.isBuffer=M_,n.isDate=g_,n.isElement=Go,n.isEmpty=Ko,n.isEqual=Zo,n.isEqualWith=Qo,n.isError=Xo,n.isFinite=eu,n.isFunction=tu,n.isInteger=nu,n.isLength=ru,n.isMap=v_,n.isMatch=su,n.isMatchWith=ou,n.isNaN=uu,n.isNative=du,n.isNil=cu,n.isNull=lu,n.isNumber=_u,n.isObject=iu,n.isObjectLike=au,n.isPlainObject=fu,n.isRegExp=L_,n.isSafeInteger=hu,n.isSet=Y_,n.isString=mu,n.isSymbol=pu,n.isTypedArray=k_,n.isUndefined=yu,n.isWeakMap=Mu,n.isWeakSet=gu,n.join=gs,n.kebabCase=I_,n.last=vs,n.lastIndexOf=Ls,n.lowerCase=U_,n.lowerFirst=J_,n.lt=w_,n.lte=D_,n.max=Vd,n.maxBy=Gd,n.mean=Kd,n.meanBy=Zd,n.min=Qd,n.minBy=Xd,n.stubArray=$d,n.stubFalse=Rd,n.stubObject=zd,n.stubString=Id,n.stubTrue=Ud,n.multiply=_f,n.nth=Ys,n.noConflict=Pd,n.noop=Cd,n.now=i_,n.pad=dd,n.padEnd=ld,n.padStart=cd,n.parseInt=_d,n.random=rd,n.reduce=po,n.reduceRight=yo,n.repeat=fd,n.replace=hd,n.result=qu,n.round=ff,n.runInContext=e,n.sample=go,n.size=Yo,n.snakeCase=q_,n.some=ko,n.sortedIndex=Ss,n.sortedIndexBy=js,n.sortedIndexOf=Hs,n.sortedLastIndex=Es,n.sortedLastIndexBy=Os,n.sortedLastIndexOf=As,n.startCase=B_,n.startsWith=pd,n.subtract=hf,n.sum=el,n.sumBy=tl,n.template=yd,n.times=Jd,n.toFinite=Lu,n.toInteger=Yu,n.toLength=ku,n.toLower=Md,n.toNumber=wu,n.toSafeInteger=Tu,n.toString=bu,n.toUpper=gd,n.trim=vd,n.trimEnd=Ld,n.trimStart=Yd,n.truncate=kd,n.unescape=wd,n.uniqueId=Bd,n.upperCase=V_,n.upperFirst=G_,n.each=co,n.eachRight=_o,n.first=ps,Ad(n,function(){var e={};return fr(n,function(t,r){pl.call(n.prototype,r)||(e[r]=t)}),e}(),{chain:!1}),n.VERSION="4.17.4",d(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){n[e].placeholder=n}),d(["drop","take"],function(e,t){v.prototype[e]=function(n){n=n===ie?1:Jl(Yu(n),0);var r=this.__filtered__&&!t?new v(this):this.clone();return r.__filtered__?r.__takeCount__=ql(n,r.__takeCount__):r.__views__.push({size:ql(n,Ce),type:e+(r.__dir__<0?"Right":"")}),r},v.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),d(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n==je||3==n;v.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:La(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),d(["head","last"],function(e,t){var n="take"+(t?"Right":"");v.prototype[e]=function(){return this[n](1).value()[0]}}),d(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");v.prototype[e]=function(){return this.__filtered__?new v(this):this[n](1)}}),v.prototype.compact=function(){return this.filter(jd)},v.prototype.find=function(e){return this.filter(e).head()},v.prototype.findLast=function(e){return this.reverse().find(e)},v.prototype.invokeMap=ni(function(e,t){return"function"==typeof e?new v(this):this.map(function(n){return Dr(n,e,t)})}),v.prototype.reject=function(e){return this.filter(Eo(La(e)))},v.prototype.slice=function(e,t){e=Yu(e);var n=this;return n.__filtered__&&(e>0||t<0)?new v(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==ie&&(t=Yu(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},v.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},v.prototype.toArray=function(){return this.take(Ce)},fr(v.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),a=/^(?:head|last)$/.test(t),s=n[a?"take"+("last"==t?"Right":""):t],o=a||/^find/.test(t);s&&(n.prototype[t]=function(){var t=this.__wrapped__,u=a?[1]:arguments,d=t instanceof v,l=u[0],c=d||p_(t),_=function(e){var t=s.apply(n,p([e],u));return a&&f?t[0]:t};c&&r&&"function"==typeof l&&1!=l.length&&(d=c=!1);var f=this.__chain__,h=!!this.__actions__.length,m=o&&!f,y=d&&!h;if(!o&&c){t=y?t:new v(this);var M=e.apply(t,u);return M.__actions__.push({func:Zs,args:[_],thisArg:ie}),new i(M,f)}return m&&y?e.apply(this,u):(M=this.thru(_),m?a?M.value()[0]:M.value():M)})}),d(["pop","push","shift","sort","splice","unshift"],function(e){var t=cl[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);n.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var n=this.value();return t.apply(p_(n)?n:[],e)}return this[r](function(n){return t.apply(p_(n)?n:[],e)})}}),fr(v.prototype,function(e,t){var r=n[t];if(r){var i=r.name+"";(ic[i]||(ic[i]=[])).push({name:t,func:r})}}),ic[Qi(ie,ye).name]=[{name:"wrapper",func:ie}],v.prototype.clone=S,v.prototype.reverse=Z,v.prototype.value=te,n.prototype.at=Gc,n.prototype.chain=Qs,n.prototype.commit=Xs,n.prototype.next=eo,n.prototype.plant=no,n.prototype.reverse=ro,n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=io,n.prototype.first=n.prototype.head,El&&(n.prototype[El]=to),n}();On._=Gn,(i=function(){return Gn}.call(t,n,t,r))!==ie&&(r.exports=i)}).call(this)}).call(t,n(128),n(4)(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){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(1),i=n(137),a=n(139),s=n(140),o=n(141),u=n(7),d="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(142);e.exports=function(e){return new Promise(function(t,l){var c=e.data,_=e.headers;r.isFormData(c)&&delete _["Content-Type"];var f=new XMLHttpRequest,h="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in f||o(e.url)||(f=new window.XDomainRequest,h="onload",m=!0,f.onprogress=function(){},f.ontimeout=function(){}),e.auth){var p=e.auth.username||"",y=e.auth.password||"";_.Authorization="Basic "+d(p+":"+y)}if(f.open(e.method.toUpperCase(),a(e.url,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,f[h]=function(){if(f&&(4===f.readyState||m)&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?s(f.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?f.response:f.responseText,a={data:r,status:1223===f.status?204:f.status,statusText:1223===f.status?"No Content":f.statusText,headers:n,config:e,request:f};i(t,l,a),f=null}},f.onerror=function(){l(u("Network Error",e,null,f)),f=null},f.ontimeout=function(){l(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",f)),f=null},r.isStandardBrowserEnv()){var M=n(143),g=(e.withCredentials||o(e.url))&&e.xsrfCookieName?M.read(e.xsrfCookieName):void 0;g&&(_[e.xsrfHeaderName]=g)}if("setRequestHeader"in f&&r.forEach(_,function(e,t){void 0===c&&"content-type"===t.toLowerCase()?delete _[t]:f.setRequestHeader(t,e)}),e.withCredentials&&(f.withCredentials=!0),e.responseType)try{f.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){f&&(f.abort(),l(e),f=null)}),void 0===c&&(c=null),f.send(c)})}},function(e,t,n){"use strict";var r=n(138);e.exports=function(e,t,n,i,a){var s=new Error(e);return r(s,t,n,i,a)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"vm":"VM":n?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},i={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},a=function(e){return function(t,n,a,s){var o=r(t),u=i[e][r(t)];return 2===o&&(u=u[n?0:1]),u.replace(/%d/i,t)}},s=["كانون الثاني يناير","شباط فبراير","آذار مارس","نيسان أبريل","أيار مايو","حزيران يونيو","تموز يوليو","آب أغسطس","أيلول سبتمبر","تشرين الأول أكتوبر","تشرين الثاني نوفمبر","كانون الأول ديسمبر"];return e.defineLocale("ar",{months:s,monthsShort:s,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:a("s"),m:a("m"),mm:a("m"),h:a("h"),hh:a("h"),d:a("d"),dd:a("d"),M:a("M"),MM:a("M"),y:a("y"),yy:a("y")},preparse:function(e){return e.replace(/\u200f/g,"").replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return n[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("ar-dz",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"أح_إث_ثلا_أر_خم_جم_سب".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},n=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},r={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},i=function(e){return function(t,i,a,s){var o=n(t),u=r[e][n(t)];return 2===o&&(u=u[i?0:1]),u.replace(/%d/i,t)}},a=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];return e.defineLocale("ar-ly",{months:a,monthsShort:a,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:i("s"),m:i("m"),mm:i("m"),h:i("h"),hh:i("h"),d:i("d"),dd:i("d"),M:i("M"),MM:i("M"),y:i("y"),yy:i("y")},preparse:function(e){return e.replace(/\u200f/g,"").replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};return e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return n[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},week:{dow:0,doy:6}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};return e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"birneçə saniyyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,n){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var n=e%10,r=e%100-n,i=e>=100?100:null;return e+(t[n]||t[r]||t[i])},week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t){var n=e.split("_");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){var i={mm:n?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:n?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"};return"m"===r?n?"хвіліна":"хвіліну":"h"===r?n?"гадзіна":"гадзіну":e+" "+t(i[r],+e)}return e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:n,mm:n,h:n,hh:n,d:"дзень",dd:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};return e.defineLocale("bn",{months:"জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,n){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},n={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};return e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,n){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t,n){return e+" "+i({mm:"munutenn",MM:"miz",dd:"devezh"}[n],e)}function n(e){switch(r(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}function r(e){return e>9?r(e%10):e}function i(e,t){return 2===t?a(e):e}function a(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}return e.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:n},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){return e+(1===e?"añ":"vet")},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t,n){var r=e+" ";switch(n){case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return r+=1===e?"dan":"dana";case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}return e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"[el] D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"[el] D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"[el] dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e){return e>1&&e<5&&1!=~~(e/10)}function n(e,n,r,i){var a=e+" ";switch(r){case"s":return n||i?"pár sekund":"pár sekundami";case"m":return n?"minuta":i?"minutu":"minutou";case"mm":return n||i?a+(t(e)?"minuty":"minut"):a+"minutami";case"h":return n?"hodina":i?"hodinu":"hodinou";case"hh":return n||i?a+(t(e)?"hodiny":"hodin"):a+"hodinami";case"d":return n||i?"den":"dnem";case"dd":return n||i?a+(t(e)?"dny":"dní"):a+"dny";case"M":return n||i?"měsíc":"měsícem";case"MM":return n||i?a+(t(e)?"měsíce":"měsíců"):a+"měsíci";case"y":return n||i?"rok":"rokem";case"yy":return n||i?a+(t(e)?"roky":"let"):a+"lety"}}var r="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),i="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_");return e.defineLocale("cs",{months:r,monthsShort:i,monthsParse:function(e,t){var n,r=[];for(n=0;n<12;n++)r[n]=new RegExp("^"+e[n]+"$|^"+t[n]+"$","i");return r}(r,i),shortMonthsParse:function(e){var t,n=[];for(t=0;t<12;t++)n[t]=new RegExp("^"+e[t]+"$","i");return n}(i),longMonthsParse:function(e){var t,n=[];for(t=0;t<12;t++)n[t]=new RegExp("^"+e[t]+"$","i");return n}(r),weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){return e+(/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран")},past:"%s каялла",s:"пӗр-ик ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t=e,n="",r=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"];return t>20?n=40===t||50===t||60===t||80===t||100===t?"fed":"ain":t>0&&(n=r[t]),e+n},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}return e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}return e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}return e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._März_April_Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH.mm",LLLL:"dddd, D. MMMM YYYY HH.mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],n=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"];return e.defineLocale("dv",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,n){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}return e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,n){return e>11?n?"μμ":"ΜΜ":n?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,n){var r=this._calendarEl[e],i=n&&n.hours();return t(r)&&(r=r.apply(n)),r.replace("{}",i%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D[-a de] MMMM, YYYY",LLL:"D[-a de] MMMM, YYYY HH:mm",LLLL:"dddd, [la] D[-a de] MMMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,n){return e>11?n?"p.t.m.":"P.T.M.":n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_");return e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_");return e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t,n,r){var i={s:["mõne sekundi","mõni sekund","paar sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?i[n][2]?i[n][2]:i[n][1]:r?i[n][0]:i[n][1]}return e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},n={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};return e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,n){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,function(e){return n[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t,r,i){var a="";switch(r){case"s":return i?"muutaman sekunnin":"muutama sekunti";case"m":return i?"minuutin":"minuutti";case"mm":a=i?"minuutin":"minuuttia";break;case"h":return i?"tunnin":"tunti";case"hh":a=i?"tunnin":"tuntia";break;case"d":return i?"päivän":"päivä";case"dd":a=i?"päivän":"päivää";break;case"M":return i?"kuukauden":"kuukausi";case"MM":a=i?"kuukauden":"kuukautta";break;case"y":return i?"vuoden":"vuosi";case"yy":a=i?"vuoden":"vuotta"}return a=n(e,i)+" "+a}function n(e,t){return e<10?t?i[e]:r[e]:e}var r="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),i=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",r[7],r[8],r[9]];return e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",m:"ein minutt",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaði",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),n="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");return e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t=["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],n=["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],r=["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],i=["Did","Dil","Dim","Dic","Dia","Dih","Dis"],a=["Dò","Lu","Mà","Ci","Ar","Ha","Sa"];return e.defineLocale("gd",{months:t,monthsShort:n,monthsParseExact:!0,weekdays:r,weekdaysShort:i,weekdaysMin:a,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t,n,r){var i={s:["thodde secondanim","thodde second"],m:["eka mintan","ek minute"],mm:[e+" mintanim",e+" mintam"],h:["eka horan","ek hor"],hh:[e+" horanim",e+" hor"],d:["eka disan","ek dis"],dd:[e+" disanim",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineanim",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsanim",e+" vorsam"]};return t?i[n][0]:i[n][1]}return e.defineLocale("gom-latn",{months:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Ieta to] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fatlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:1,doy:4},meridiemParse:/rati|sokalli|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokalli"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"rati":e<12?"sokalli":e<16?"donparam":e<20?"sanje":"rati"}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10==0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,n){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?n?'לפנה"צ':"לפני הצהריים":e<18?n?'אחה"צ':"אחרי הצהריים":"בערב"}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};return e.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t,n){var r=e+" ";switch(n){case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return r+=1===e?"dan":"dana";case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}return e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t,n,r){var i=e;switch(n){case"s":return r||t?"néhány másodperc":"néhány másodperce";case"m":return"egy"+(r||t?" perc":" perce");case"mm":return i+(r||t?" perc":" perce");case"h":return"egy"+(r||t?" óra":" órája");case"hh":return i+(r||t?" óra":" órája");case"d":return"egy"+(r||t?" nap":" napja");case"dd":return i+(r||t?" nap":" napja");case"M":return"egy"+(r||t?" hónap":" hónapja");case"MM":return i+(r||t?" hónap":" hónapja");case"y":return"egy"+(r||t?" év":" éve");case"yy":return i+(r||t?" év":" éve")}return""}function n(e){return(e?"":"[múlt] ")+"["+r[this.day()]+"] LT[-kor]"}var r="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");return e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,n){return e<12?!0===n?"de":"DE":!0===n?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return n.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return n.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e){return e%100==11||e%10!=1}function n(e,n,r,i){var a=e+" ";switch(r){case"s":return n||i?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return n?"mínúta":"mínútu";case"mm":return t(e)?a+(n||i?"mínútur":"mínútum"):n?a+"mínúta":a+"mínútu";case"hh":return t(e)?a+(n||i?"klukkustundir":"klukkustundum"):a+"klukkustund";case"d":return n?"dagur":i?"dag":"degi";case"dd":return t(e)?n?a+"dagar":a+(i?"daga":"dögum"):n?a+"dagur":a+(i?"dag":"degi");case"M":return n?"mánuður":i?"mánuð":"mánuði";case"MM":return t(e)?n?a+"mánuðir":a+(i?"mánuði":"mánuðum"):n?a+"mánuður":a+(i?"mánuð":"mánuði");case"y":return n||i?"ár":"ári";case"yy":return t(e)?a+(n||i?"ár":"árum"):a+(n||i?"ár":"ári")}}return e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:n,m:n,mm:n,h:"klukkustund",hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("ja",{months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 HH:mm dddd",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日 HH:mm dddd"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,n){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("ka",{months:{standalone:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),format:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return/(წამი|წუთი|საათი|წელი)/.test(e)?e.replace(/ი$/,"ში"):e+"ში"},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის უკან"):/წელი/.test(e)?e.replace(/წელი$/,"წლის უკან"):void 0},s:"რამდენიმე წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20==0||e%100==0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"};return e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){var n=e%10,r=e>=100?100:null;return e+(t[e]||t[n]||t[r])},week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysMin:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},n={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"};return e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬ_ಅಕ್ಟೋಬ_ನವೆಂಬ_ಡಿಸೆಂಬ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}일/,ordinal:"%d일",meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,n){return e<12?"오전":"오후"}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"};return e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кече саат] LT",lastWeek:"[Өткен аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){var n=e%10,r=e>=100?100:null;return e+(t[e]||t[n]||t[r])},week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t,n,r){var i={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?i[n][0]:i[n][1]}function n(e){return i(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e}function r(e){return i(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e}function i(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10,n=e/10;return i(0===t?n:t)}if(e<1e4){for(;e>=10;)e/=10;return i(e)}return e/=1e3,i(e)}return e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:n,past:r,s:"e puer Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,n){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t,n,r){return t?"kelios sekundės":r?"kelių sekundžių":"kelias sekundes"}function n(e,t,n,r){return t?i(n)[0]:r?i(n)[1]:i(n)[2]}function r(e){return e%10==0||e>10&&e<20}function i(e){return s[e].split("_")}function a(e,t,a,s){var o=e+" ";return 1===e?o+n(e,t,a[0],s):t?o+(r(e)?i(a)[1]:i(a)[0]):s?o+i(a)[1]:o+(r(e)?i(a)[1]:i(a)[2])}var s={m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};return e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:t,m:n,mm:a,h:n,hh:a,d:n,dd:a,M:n,MM:a,y:n,yy:a},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t,n){return n?t%10==1&&t%100!=11?e[2]:e[3]:t%10==1&&t%100!=11?e[0]:e[1]}function n(e,n,r){return e+" "+t(a[r],e,n)}function r(e,n,r){return t(a[r],e,n)}function i(e,t){return t?"dažas sekundes":"dažām sekundēm"}var a={m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};return e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:i,m:r,mm:n,h:r,hh:n,d:r,dd:n,M:r,MM:n,y:r,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t={words:{m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,r){var i=t.words[r];return 1===r.length?n?i[0]:i[1]:e+" "+t.correctGrammaticalCase(e,i)}};return e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,n){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t,n,r){var i="";if(t)switch(n){case"s":i="काही सेकंद";break;case"m":i="एक मिनिट";break;case"mm":i="%d मिनिटे";break;case"h":i="एक तास";break;case"hh":i="%d तास";break;case"d":i="एक दिवस";break;case"dd":i="%d दिवस";break;case"M":i="एक महिना";break;case"MM":i="%d महिने";break;case"y":i="एक वर्ष";break;case"yy":i="%d वर्षे"}else switch(n){case"s":i="काही सेकंदां";break;case"m":i="एका मिनिटा";break;case"mm":i="%d मिनिटां";break;case"h":i="एका तासा";break;case"hh":i="%d तासां";break;case"d":i="एका दिवसा";break;case"dd":i="%d दिवसां";break;case"M":i="एका महिन्या";break;case"MM":i="%d महिन्यां";break;case"y":i="एका वर्षा";break;case"yy":i="%d वर्षां"}return i.replace(/%d/i,e)}var n={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},r={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};return e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return r[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return n[e]})},meridiemParse:/रात्री|सकाळी|दुपारी|सायंकाळी/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात्री"===t?e<4?e:e+12:"सकाळी"===t?e:"दुपारी"===t?e>=10?e:e+12:"सायंकाळी"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"रात्री":e<10?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},n={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};return e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};return e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,n){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;return e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;return e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},n={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"};return e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function n(e,n,r){var i=e+" ";switch(r){case"m":return n?"minuta":"minutę";case"mm":return i+(t(e)?"minuty":"minut");case"h":return n?"godzina":"godzinę";case"hh":return i+(t(e)?"godziny":"godzin");case"MM":return i+(t(e)?"miesiące":"miesięcy");case"yy":return i+(t(e)?"lata":"lat")}}var r="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),i="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");return e.defineLocale("pl",{months:function(e,t){return e?""===t?"("+i[e.month()]+"|"+r[e.month()]+")":/D MMMM/.test(t)?i[e.month()]:r[e.month()]:r},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:n,mm:n,h:n,hh:n,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:n,y:"rok",yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("pt",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"poucos segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº"})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t,n){var r={mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"},i=" ";return(e%100>=20||e>=100&&e%100==0)&&(i=" de "),e+i+r[n]}return e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t){var n=e.split("_");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){var i={mm:n?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===r?n?"минута":"минуту":e+" "+t(i[r],+e)}var r=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];return e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:r,longMonthsParse:r,shortMonthsParse:r,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В следующее] dddd [в] LT";case 1:case 2:case 4:return"[В следующий] dddd [в] LT";case 3:case 5:case 6:return"[В следующую] dddd [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:n,mm:n,h:"час",hh:n,d:"день",dd:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],n=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];return e.defineLocale("sd",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,n){return e>11?n?"ප.ව.":"පස් වරු":n?"පෙ.ව.":"පෙර වරු"}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e){return e>1&&e<5}function n(e,n,r,i){var a=e+" ";switch(r){case"s":return n||i?"pár sekúnd":"pár sekundami";case"m":return n?"minúta":i?"minútu":"minútou";case"mm":return n||i?a+(t(e)?"minúty":"minút"):a+"minútami";case"h":return n?"hodina":i?"hodinu":"hodinou";case"hh":return n||i?a+(t(e)?"hodiny":"hodín"):a+"hodinami";case"d":return n||i?"deň":"dňom";case"dd":return n||i?a+(t(e)?"dni":"dní"):a+"dňami";case"M":return n||i?"mesiac":"mesiacom";case"MM":return n||i?a+(t(e)?"mesiace":"mesiacov"):a+"mesiacmi";case"y":return n||i?"rok":"rokom";case"yy":return n||i?a+(t(e)?"roky":"rokov"):a+"rokmi"}}var r="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),i="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");return e.defineLocale("sk",{months:r,monthsShort:i,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"nekaj sekund":"nekaj sekundami";case"m":return t?"ena minuta":"eno minuto";case"mm":return i+=1===e?t?"minuta":"minuto":2===e?t||r?"minuti":"minutama":e<5?t||r?"minute":"minutami":t||r?"minut":"minutami";case"h":return t?"ena ura":"eno uro";case"hh":return i+=1===e?t?"ura":"uro":2===e?t||r?"uri":"urama":e<5?t||r?"ure":"urami":t||r?"ur":"urami";case"d":return t||r?"en dan":"enim dnem";case"dd":return i+=1===e?t||r?"dan":"dnem":2===e?t||r?"dni":"dnevoma":t||r?"dni":"dnevi";case"M":return t||r?"en mesec":"enim mesecem";case"MM":return i+=1===e?t||r?"mesec":"mesecem":2===e?t||r?"meseca":"mesecema":e<5?t||r?"mesece":"meseci":t||r?"mesecev":"meseci";case"y":return t||r?"eno leto":"enim letom";case"yy":return i+=1===e?t||r?"leto":"letom":2===e?t||r?"leti":"letoma":e<5?t||r?"leta":"leti":t||r?"let":"leti"}}return e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,n){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t={words:{m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,r){var i=t.words[r];return 1===r.length?n?i[0]:i[1]:e+" "+t.correctGrammaticalCase(e,i)}};return e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t={words:{m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,r){var i=t.words[r];return 1===r.length?n?i[0]:i[1]:e+" "+t.correctGrammaticalCase(e,i)}};return e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"дан",dd:t.translate,M:"месец",MM:t.translate,y:"годину",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,n){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(e|a)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"e":1===t?"a":2===t?"a":"e")},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"masiku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},n={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};return e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,function(e){return n[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]})},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,n){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t?e:"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జూలై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జూలై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juniu_Juliu_Augustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Aug_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sexta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sext_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Sex_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"minutu balun",m:"minutu ida",mm:"minutus %d",h:"horas ida",hh:"horas %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,n){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq"}function n(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret"}function r(e,t,n,r){var a=i(e);switch(n){case"mm":return a+" tup";case"hh":return a+" rep";case"dd":return a+" jaj";case"MM":return a+" jar";case"yy":return a+" DIS"}}function i(e){var t=Math.floor(e%1e3/100),n=Math.floor(e%100/10),r=e%10,i="";return t>0&&(i+=a[t]+"vatlh"),n>0&&(i+=(""!==i?" ":"")+a[n]+"maH"),r>0&&(i+=(""!==i?" ":"")+a[r]),""===i?"pagh":i}var a="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");return e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:t,past:n,s:"puS lup",m:"wa’ tup",mm:r,h:"wa’ rep",hh:r,d:"wa’ jaj",dd:r,M:"wa’ jar",MM:r,y:"wa’ DIS",yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};return e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},dayOfMonthOrdinalParse:/\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,ordinal:function(e){if(0===e)return e+"'ıncı";var n=e%10,r=e%100-n,i=e>=100?100:null;return e+(t[n]||t[r]||t[i])},week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t,n,r){var i={s:["viensas secunds","'iensas secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return r?i[n][0]:t?i[n][0]:i[n][1]}return e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,n){return e>11?n?"d'o":"D'O":n?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";function t(e,t){var n=e.split("_");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){var i={mm:n?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:n?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};return"m"===r?n?"хвилина":"хвилину":"h"===r?n?"година":"годину":e+" "+t(i[r],+e)}function r(e,t){var n={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return e?n[/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative"][e.day()]:n.nominative}function i(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}return e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:r,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:i("[Сьогодні "),nextDay:i("[Завтра "),lastDay:i("[Вчора "),nextWeek:i("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return i("[Минулої] dddd [").call(this);case 1:case 2:case 4:return i("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:n,mm:n,h:"годину",hh:n,d:"день",dd:n,M:"місяць",MM:n,y:"рік",yy:n},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],n=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"];return e.defineLocale("ur",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日Ah点mm分",LLLL:"YYYY年MMMD日ddddAh点mm分",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日 HH:mm",llll:"YYYY年MMMD日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日 HH:mm",LLLL:"YYYY年MMMD日dddd HH:mm",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日 HH:mm",llll:"YYYY年MMMD日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})})},function(e,t,n){!function(e,t){t(n(0))}(0,function(e){"use strict";return e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日 HH:mm",LLLL:"YYYY年MMMD日dddd HH:mm",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日 HH:mm",llll:"YYYY年MMMD日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})})},function(e,t,n){n(126),e.exports=n(152)},function(e,t,n){n(127);var r=n(3),i=n(0);window.meetingApp=function(){var e={field_id:0,schedules:[],current:null};return e.schedule=function(t){t=t?i(t):i(),e.current=t,e.setHeader(t),e.generateSchedule(t)},e.setHeader=function(e){null===e&&(e=i()),$("#first-header").text(i(e).format("DD/MM/YYYY")),$("#second-header").text(i(e).add(1,"day").format("DD/MM/YYYY")),$("#third-header").text(i(e).add(2,"days").format("DD/MM/YYYY")),$("#fourth-header").text(i(e).add(3,"days").format("DD/MM/YYYY")),$("#fifth-header").text(i(e).add(4,"days").format("DD/MM/YYYY")),$("#sixth-header").text(i(e).add(5,"days").format("DD/MM/YYYY")),$("#seventh-header").text(i(e).add(6,"days").format("DD/MM/YYYY"))},e.createForm=function(t,n,r,i){var a=$('<form method="post" action=""></form>'),s=$('<input type="hidden" name="field_id" />');s.val(e.field_id);var o=$('<input type="hidden" name="date" />');o.val(t);var u=$('<input type="hidden" name="time" />');u.val(n);var d=$('<input type="hidden" name="type" value="reserved" />'),l=$('<button type="submit"></button>'),c=void 0;if("reserved"===r&&i&&null===i.status?(l.text("Reserved"),l.addClass("btn btn-warning"),l.click(function(){return confirm("Do you want to cancel the reservation?")})):i&&0===i.status?(l.text("Requested"),l.addClass("btn btn-info"),l.click(function(){return confirm(i.schedule+", Do you want to confirm the reservation?")}),c=$('<input type="hidden" name="status" value="'+i.status+'" />')):i&&1===i.status?(l.text("Reserved"),l.addClass("btn btn-warning"),l.click(function(){return confirm(i.schedule+", Do you want to cancel the reservation?")}),c=$('<input type="hidden" name="status" value="'+i.status+'" />'),a.append(c)):(l.text("Available"),l.addClass("btn btn-success"),l.click(function(){return confirm("Confrim reservation?")})),a.append(s),a.append(o),a.append(u),a.append(d),a.append(c),a.append(l),i){var _=$('<input type="hidden" name="id" />');_.val(i.id),a.append(_)}return a},e.generateSchedule=function(t){var n=$("#schedule-list");n.empty();for(var a=0;a<17;a++){for(var s=$("<tr></tr>"),o=0;o<=7;o++){var u=$("<td></td>"),d=r.find(e.schedules[o-1],{time:a+8}),l=null,c=i(t).add(o-1,"days").format("YYYY-MM-DD");l=void 0!==d?e.createForm(c,a+8,"reserved",d):e.createForm(c,a+8),u.append(l),0===o&&u.text(a+8),s.append(u)}n.append(s)}},e}()},function(e,t,n){window._=n(3);try{window.$=window.jQuery=n(129),n(130)}catch(e){}window.axios=n(131),window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var r=document.head.querySelector('meta[name="csrf-token"]');r&&(window.axios.defaults.headers.common["X-CSRF-TOKEN"]=r.content)},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r,i;!function(t,n){"use strict";"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,a){"use strict";function s(e,t){t=t||se;var n=t.createElement("script");n.text=e,t.head.appendChild(n).parentNode.removeChild(n)}function o(e){var t=!!e&&"length"in e&&e.length,n=Me.type(e);return"function"!==n&&!Me.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function u(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function d(e,t,n){return Me.isFunction(t)?Me.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?Me.grep(e,function(e){return e===t!==n}):"string"!=typeof t?Me.grep(e,function(e){return ce.call(t,e)>-1!==n}):xe.test(t)?Me.filter(t,e,n):(t=Me.filter(t,e),Me.grep(e,function(e){return ce.call(t,e)>-1!==n&&1===e.nodeType}))}function l(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function c(e){var t={};return Me.each(e.match(Oe)||[],function(e,n){t[n]=!0}),t}function _(e){return e}function f(e){throw e}function h(e,t,n,r){var i;try{e&&Me.isFunction(i=e.promise)?i.call(e).done(t).fail(n):e&&Me.isFunction(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function m(){se.removeEventListener("DOMContentLoaded",m),n.removeEventListener("load",m),Me.ready()}function p(){this.expando=Me.expando+p.uid++}function y(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:$e.test(e)?JSON.parse(e):e)}function M(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Re,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=y(n)}catch(e){}Ne.set(e,t,n)}else n=void 0;return n}function g(e,t,n,r){var i,a=1,s=20,o=r?function(){return r.cur()}:function(){return Me.css(e,t,"")},u=o(),d=n&&n[3]||(Me.cssNumber[t]?"":"px"),l=(Me.cssNumber[t]||"px"!==d&&+u)&&Ie.exec(Me.css(e,t));if(l&&l[3]!==d){d=d||l[3],n=n||[],l=+u||1;do{a=a||".5",l/=a,Me.style(e,t,l+d)}while(a!==(a=o()/u)&&1!==a&&--s)}return n&&(l=+l||+u||0,i=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=d,r.start=l,r.end=i)),i}function v(e){var t,n=e.ownerDocument,r=e.nodeName,i=Be[r];return i||(t=n.body.appendChild(n.createElement(r)),i=Me.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Be[r]=i,i)}function L(e,t){for(var n,r,i=[],a=0,s=e.length;a<s;a++)r=e[a],r.style&&(n=r.style.display,t?("none"===n&&(i[a]=Fe.get(r,"display")||null,i[a]||(r.style.display="")),""===r.style.display&&Je(r)&&(i[a]=v(r))):"none"!==n&&(i[a]="none",Fe.set(r,"display",n)));for(a=0;a<s;a++)null!=i[a]&&(e[a].style.display=i[a]);return e}function Y(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&u(e,t)?Me.merge([e],n):n}function k(e,t){for(var n=0,r=e.length;n<r;n++)Fe.set(e[n],"globalEval",!t||Fe.get(t[n],"globalEval"))}function w(e,t,n,r,i){for(var a,s,o,u,d,l,c=t.createDocumentFragment(),_=[],f=0,h=e.length;f<h;f++)if((a=e[f])||0===a)if("object"===Me.type(a))Me.merge(_,a.nodeType?[a]:a);else if(Qe.test(a)){for(s=s||c.appendChild(t.createElement("div")),o=(Ge.exec(a)||["",""])[1].toLowerCase(),u=Ze[o]||Ze._default,s.innerHTML=u[1]+Me.htmlPrefilter(a)+u[2],l=u[0];l--;)s=s.lastChild;Me.merge(_,s.childNodes),s=c.firstChild,s.textContent=""}else _.push(t.createTextNode(a));for(c.textContent="",f=0;a=_[f++];)if(r&&Me.inArray(a,r)>-1)i&&i.push(a);else if(d=Me.contains(a.ownerDocument,a),s=Y(c.appendChild(a),"script"),d&&k(s),n)for(l=0;a=s[l++];)Ke.test(a.type||"")&&n.push(a);return c}function D(){return!0}function T(){return!1}function b(){try{return se.activeElement}catch(e){}}function x(e,t,n,r,i,a){var s,o;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(o in t)x(e,o,n,r,t[o],a);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=T;else if(!i)return e;return 1===a&&(s=i,i=function(e){return Me().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=Me.guid++)),e.each(function(){Me.event.add(this,t,i,r,n)})}function S(e,t){return u(e,"table")&&u(11!==t.nodeType?t:t.firstChild,"tr")?Me(">tbody",e)[0]||e:e}function j(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function H(e){var t=st.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function E(e,t){var n,r,i,a,s,o,u,d;if(1===t.nodeType){if(Fe.hasData(e)&&(a=Fe.access(e),s=Fe.set(t,a),d=a.events)){delete s.handle,s.events={};for(i in d)for(n=0,r=d[i].length;n<r;n++)Me.event.add(t,i,d[i][n])}Ne.hasData(e)&&(o=Ne.access(e),u=Me.extend({},o),Ne.set(t,u))}}function O(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ve.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function A(e,t,n,r){t=de.apply([],t);var i,a,o,u,d,l,c=0,_=e.length,f=_-1,h=t[0],m=Me.isFunction(h);if(m||_>1&&"string"==typeof h&&!ye.checkClone&&at.test(h))return e.each(function(i){var a=e.eq(i);m&&(t[0]=h.call(this,i,a.html())),A(a,t,n,r)});if(_&&(i=w(t,e[0].ownerDocument,!1,e,r),a=i.firstChild,1===i.childNodes.length&&(i=a),a||r)){for(o=Me.map(Y(i,"script"),j),u=o.length;c<_;c++)d=i,c!==f&&(d=Me.clone(d,!0,!0),u&&Me.merge(o,Y(d,"script"))),n.call(e[c],d,c);if(u)for(l=o[o.length-1].ownerDocument,Me.map(o,H),c=0;c<u;c++)d=o[c],Ke.test(d.type||"")&&!Fe.access(d,"globalEval")&&Me.contains(l,d)&&(d.src?Me._evalUrl&&Me._evalUrl(d.src):s(d.textContent.replace(ot,""),l))}return e}function P(e,t,n){for(var r,i=t?Me.filter(t,e):e,a=0;null!=(r=i[a]);a++)n||1!==r.nodeType||Me.cleanData(Y(r)),r.parentNode&&(n&&Me.contains(r.ownerDocument,r)&&k(Y(r,"script")),r.parentNode.removeChild(r));return e}function C(e,t,n){var r,i,a,s,o=e.style;return n=n||lt(e),n&&(s=n.getPropertyValue(t)||n[t],""!==s||Me.contains(e.ownerDocument,e)||(s=Me.style(e,t)),!ye.pixelMarginRight()&&dt.test(s)&&ut.test(t)&&(r=o.width,i=o.minWidth,a=o.maxWidth,o.minWidth=o.maxWidth=o.width=s,s=n.width,o.width=r,o.minWidth=i,o.maxWidth=a)),void 0!==s?s+"":s}function W(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function F(e){if(e in pt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=mt.length;n--;)if((e=mt[n]+t)in pt)return e}function N(e){var t=Me.cssProps[e];return t||(t=Me.cssProps[e]=F(e)||e),t}function $(e,t,n){var r=Ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function R(e,t,n,r,i){var a,s=0;for(a=n===(r?"border":"content")?4:"width"===t?1:0;a<4;a+=2)"margin"===n&&(s+=Me.css(e,n+Ue[a],!0,i)),r?("content"===n&&(s-=Me.css(e,"padding"+Ue[a],!0,i)),"margin"!==n&&(s-=Me.css(e,"border"+Ue[a]+"Width",!0,i))):(s+=Me.css(e,"padding"+Ue[a],!0,i),"padding"!==n&&(s+=Me.css(e,"border"+Ue[a]+"Width",!0,i)));return s}function z(e,t,n){var r,i=lt(e),a=C(e,t,i),s="border-box"===Me.css(e,"boxSizing",!1,i);return dt.test(a)?a:(r=s&&(ye.boxSizingReliable()||a===e.style[t]),"auto"===a&&(a=e["offset"+t[0].toUpperCase()+t.slice(1)]),(a=parseFloat(a)||0)+R(e,t,n||(s?"border":"content"),r,i)+"px")}function I(e,t,n,r,i){return new I.prototype.init(e,t,n,r,i)}function U(){Mt&&(!1===se.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(U):n.setTimeout(U,Me.fx.interval),Me.fx.tick())}function J(){return n.setTimeout(function(){yt=void 0}),yt=Me.now()}function q(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)n=Ue[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function B(e,t,n){for(var r,i=(K.tweeners[t]||[]).concat(K.tweeners["*"]),a=0,s=i.length;a<s;a++)if(r=i[a].call(n,t,e))return r}function V(e,t,n){var r,i,a,s,o,u,d,l,c="width"in t||"height"in t,_=this,f={},h=e.style,m=e.nodeType&&Je(e),p=Fe.get(e,"fxshow");n.queue||(s=Me._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,o=s.empty.fire,s.empty.fire=function(){s.unqueued||o()}),s.unqueued++,_.always(function(){_.always(function(){s.unqueued--,Me.queue(e,"fx").length||s.empty.fire()})}));for(r in t)if(i=t[r],gt.test(i)){if(delete t[r],a=a||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!p||void 0===p[r])continue;m=!0}f[r]=p&&p[r]||Me.style(e,r)}if((u=!Me.isEmptyObject(t))||!Me.isEmptyObject(f)){c&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],d=p&&p.display,null==d&&(d=Fe.get(e,"display")),l=Me.css(e,"display"),"none"===l&&(d?l=d:(L([e],!0),d=e.style.display||d,l=Me.css(e,"display"),L([e]))),("inline"===l||"inline-block"===l&&null!=d)&&"none"===Me.css(e,"float")&&(u||(_.done(function(){h.display=d}),null==d&&(l=h.display,d="none"===l?"":l)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",_.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in f)u||(p?"hidden"in p&&(m=p.hidden):p=Fe.access(e,"fxshow",{display:d}),a&&(p.hidden=!m),m&&L([e],!0),_.done(function(){m||L([e]),Fe.remove(e,"fxshow");for(r in f)Me.style(e,r,f[r])})),u=B(m?p[r]:0,r,_),r in p||(p[r]=u.start,m&&(u.end=u.start,u.start=0))}}function G(e,t){var n,r,i,a,s;for(n in e)if(r=Me.camelCase(n),i=t[r],a=e[n],Array.isArray(a)&&(i=a[1],a=e[n]=a[0]),n!==r&&(e[r]=a,delete e[n]),(s=Me.cssHooks[r])&&"expand"in s){a=s.expand(a),delete e[r];for(n in a)n in e||(e[n]=a[n],t[n]=i)}else t[r]=i}function K(e,t,n){var r,i,a=0,s=K.prefilters.length,o=Me.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=yt||J(),n=Math.max(0,d.startTime+d.duration-t),r=n/d.duration||0,a=1-r,s=0,u=d.tweens.length;s<u;s++)d.tweens[s].run(a);return o.notifyWith(e,[d,a,n]),a<1&&u?n:(u||o.notifyWith(e,[d,1,0]),o.resolveWith(e,[d]),!1)},d=o.promise({elem:e,props:Me.extend({},t),opts:Me.extend(!0,{specialEasing:{},easing:Me.easing._default},n),originalProperties:t,originalOptions:n,startTime:yt||J(),duration:n.duration,tweens:[],createTween:function(t,n){var r=Me.Tween(e,d.opts,t,n,d.opts.specialEasing[t]||d.opts.easing);return d.tweens.push(r),r},stop:function(t){var n=0,r=t?d.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)d.tweens[n].run(1);return t?(o.notifyWith(e,[d,1,0]),o.resolveWith(e,[d,t])):o.rejectWith(e,[d,t]),this}}),l=d.props;for(G(l,d.opts.specialEasing);a<s;a++)if(r=K.prefilters[a].call(d,e,l,d.opts))return Me.isFunction(r.stop)&&(Me._queueHooks(d.elem,d.opts.queue).stop=Me.proxy(r.stop,r)),r;return Me.map(l,B,d),Me.isFunction(d.opts.start)&&d.opts.start.call(e,d),d.progress(d.opts.progress).done(d.opts.done,d.opts.complete).fail(d.opts.fail).always(d.opts.always),Me.fx.timer(Me.extend(u,{elem:e,anim:d,queue:d.opts.queue})),d}function Z(e){return(e.match(Oe)||[]).join(" ")}function Q(e){return e.getAttribute&&e.getAttribute("class")||""}function X(e,t,n,r){var i;if(Array.isArray(t))Me.each(t,function(t,i){n||jt.test(e)?r(e,i):X(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==Me.type(t))r(e,t);else for(i in t)X(e+"["+i+"]",t[i],n,r)}function ee(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,a=t.toLowerCase().match(Oe)||[];if(Me.isFunction(n))for(;r=a[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function te(e,t,n,r){function i(o){var u;return a[o]=!0,Me.each(e[o]||[],function(e,o){var d=o(t,n,r);return"string"!=typeof d||s||a[d]?s?!(u=d):void 0:(t.dataTypes.unshift(d),i(d),!1)}),u}var a={},s=e===zt;return i(t.dataTypes[0])||!a["*"]&&i("*")}function ne(e,t){var n,r,i=Me.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&Me.extend(!0,e,r),e}function re(e,t,n){for(var r,i,a,s,o=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in o)if(o[i]&&o[i].test(r)){u.unshift(i);break}if(u[0]in n)a=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){a=i;break}s||(s=i)}a=a||s}if(a)return a!==u[0]&&u.unshift(a),n[a]}function ie(e,t,n,r){var i,a,s,o,u,d={},l=e.dataTypes.slice();if(l[1])for(s in e.converters)d[s.toLowerCase()]=e.converters[s];for(a=l.shift();a;)if(e.responseFields[a]&&(n[e.responseFields[a]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=a,a=l.shift())if("*"===a)a=u;else if("*"!==u&&u!==a){if(!(s=d[u+" "+a]||d["* "+a]))for(i in d)if(o=i.split(" "),o[1]===a&&(s=d[u+" "+o[0]]||d["* "+o[0]])){!0===s?s=d[i]:!0!==d[i]&&(a=o[0],l.unshift(o[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+u+" to "+a}}}return{state:"success",data:t}}var ae=[],se=n.document,oe=Object.getPrototypeOf,ue=ae.slice,de=ae.concat,le=ae.push,ce=ae.indexOf,_e={},fe=_e.toString,he=_e.hasOwnProperty,me=he.toString,pe=me.call(Object),ye={},Me=function(e,t){return new Me.fn.init(e,t)},ge=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ve=/^-ms-/,Le=/-([a-z])/g,Ye=function(e,t){return t.toUpperCase()};Me.fn=Me.prototype={jquery:"3.2.1",constructor:Me,length:0,toArray:function(){return ue.call(this)},get:function(e){return null==e?ue.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=Me.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return Me.each(this,e)},map:function(e){return this.pushStack(Me.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(ue.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:le,sort:ae.sort,splice:ae.splice},Me.extend=Me.fn.extend=function(){var e,t,n,r,i,a,s=arguments[0]||{},o=1,u=arguments.length,d=!1;for("boolean"==typeof s&&(d=s,s=arguments[o]||{},o++),"object"==typeof s||Me.isFunction(s)||(s={}),o===u&&(s=this,o--);o<u;o++)if(null!=(e=arguments[o]))for(t in e)n=s[t],r=e[t],s!==r&&(d&&r&&(Me.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,a=n&&Array.isArray(n)?n:[]):a=n&&Me.isPlainObject(n)?n:{},s[t]=Me.extend(d,a,r)):void 0!==r&&(s[t]=r));return s},Me.extend({expando:"jQuery"+("3.2.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===Me.type(e)},isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=Me.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==fe.call(e))&&(!(t=oe(e))||"function"==typeof(n=he.call(t,"constructor")&&t.constructor)&&me.call(n)===pe)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?_e[fe.call(e)]||"object":typeof e},globalEval:function(e){s(e)},camelCase:function(e){return e.replace(ve,"ms-").replace(Le,Ye)},each:function(e,t){var n,r=0;if(o(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(ge,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(o(Object(e))?Me.merge(n,"string"==typeof e?[e]:e):le.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:ce.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,a=e.length,s=!n;i<a;i++)!t(e[i],i)!==s&&r.push(e[i]);return r},map:function(e,t,n){var r,i,a=0,s=[];if(o(e))for(r=e.length;a<r;a++)null!=(i=t(e[a],a,n))&&s.push(i);else for(a in e)null!=(i=t(e[a],a,n))&&s.push(i);return de.apply([],s)},guid:1,proxy:function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),Me.isFunction(e))return r=ue.call(arguments,2),i=function(){return e.apply(t||this,r.concat(ue.call(arguments)))},i.guid=e.guid=e.guid||Me.guid++,i},now:Date.now,support:ye}),"function"==typeof Symbol&&(Me.fn[Symbol.iterator]=ae[Symbol.iterator]),Me.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){_e["[object "+t+"]"]=t.toLowerCase()});var ke=function(e){function t(e,t,n,r){var i,a,s,o,u,l,_,f=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:N)!==H&&j(t),t=t||H,O)){if(11!==h&&(u=me.exec(e)))if(i=u[1]){if(9===h){if(!(s=t.getElementById(i)))return n;if(s.id===i)return n.push(s),n}else if(f&&(s=f.getElementById(i))&&W(t,s)&&s.id===i)return n.push(s),n}else{if(u[2])return K.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&v.getElementsByClassName&&t.getElementsByClassName)return K.apply(n,t.getElementsByClassName(i)),n}if(v.qsa&&!U[e+" "]&&(!A||!A.test(e))){if(1!==h)f=t,_=e;else if("object"!==t.nodeName.toLowerCase()){for((o=t.getAttribute("id"))?o=o.replace(ge,ve):t.setAttribute("id",o=F),l=w(e),a=l.length;a--;)l[a]="#"+o+" "+c(l[a]);_=l.join(","),f=pe.test(e)&&d(t.parentNode)||t}if(_)try{return K.apply(n,f.querySelectorAll(_)),n}catch(e){}finally{o===F&&t.removeAttribute("id")}}}return T(e.replace(ae,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>L.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[F]=!0,e}function i(e){var t=H.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t){for(var n=e.split("|"),r=n.length;r--;)L.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function o(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Ye(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function u(e){return r(function(t){return t=+t,r(function(n,r){for(var i,a=e([],n.length,t),s=a.length;s--;)n[i=a[s]]&&(n[i]=!(r[i]=n[i]))})})}function d(e){return e&&void 0!==e.getElementsByTagName&&e}function l(){}function c(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function _(e,t,n){var r=t.dir,i=t.next,a=i||r,s=n&&"parentNode"===a,o=R++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||s)return e(t,n,i);return!1}:function(t,n,u){var d,l,c,_=[$,o];if(u){for(;t=t[r];)if((1===t.nodeType||s)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||s)if(c=t[F]||(t[F]={}),l=c[t.uniqueID]||(c[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((d=l[a])&&d[0]===$&&d[1]===o)return _[2]=d[2];if(l[a]=_,_[2]=e(t,n,u))return!0}return!1}}function f(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function h(e,n,r){for(var i=0,a=n.length;i<a;i++)t(e,n[i],r);return r}function m(e,t,n,r,i){for(var a,s=[],o=0,u=e.length,d=null!=t;o<u;o++)(a=e[o])&&(n&&!n(a,r,i)||(s.push(a),d&&t.push(o)));return s}function p(e,t,n,i,a,s){return i&&!i[F]&&(i=p(i)),a&&!a[F]&&(a=p(a,s)),r(function(r,s,o,u){var d,l,c,_=[],f=[],p=s.length,y=r||h(t||"*",o.nodeType?[o]:o,[]),M=!e||!r&&t?y:m(y,_,e,o,u),g=n?a||(r?e:p||i)?[]:s:M;if(n&&n(M,g,o,u),i)for(d=m(g,f),i(d,[],o,u),l=d.length;l--;)(c=d[l])&&(g[f[l]]=!(M[f[l]]=c));if(r){if(a||e){if(a){for(d=[],l=g.length;l--;)(c=g[l])&&d.push(M[l]=c);a(null,g=[],d,u)}for(l=g.length;l--;)(c=g[l])&&(d=a?Q(r,c):_[l])>-1&&(r[d]=!(s[d]=c))}}else g=m(g===s?g.splice(p,g.length):g),a?a(null,s,g,u):K.apply(s,g)})}function y(e){for(var t,n,r,i=e.length,a=L.relative[e[0].type],s=a||L.relative[" "],o=a?1:0,u=_(function(e){return e===t},s,!0),d=_(function(e){return Q(t,e)>-1},s,!0),l=[function(e,n,r){var i=!a&&(r||n!==b)||((t=n).nodeType?u(e,n,r):d(e,n,r));return t=null,i}];o<i;o++)if(n=L.relative[e[o].type])l=[_(f(l),n)];else{if(n=L.filter[e[o].type].apply(null,e[o].matches),n[F]){for(r=++o;r<i&&!L.relative[e[r].type];r++);return p(o>1&&f(l),o>1&&c(e.slice(0,o-1).concat({value:" "===e[o-2].type?"*":""})).replace(ae,"$1"),n,o<r&&y(e.slice(o,r)),r<i&&y(e=e.slice(r)),r<i&&c(e))}l.push(n)}return f(l)}function M(e,n){var i=n.length>0,a=e.length>0,s=function(r,s,o,u,d){var l,c,_,f=0,h="0",p=r&&[],y=[],M=b,g=r||a&&L.find.TAG("*",d),v=$+=null==M?1:Math.random()||.1,Y=g.length;for(d&&(b=s===H||s||d);h!==Y&&null!=(l=g[h]);h++){if(a&&l){for(c=0,s||l.ownerDocument===H||(j(l),o=!O);_=e[c++];)if(_(l,s||H,o)){u.push(l);break}d&&($=v)}i&&((l=!_&&l)&&f--,r&&p.push(l))}if(f+=h,i&&h!==f){for(c=0;_=n[c++];)_(p,y,s,o);if(r){if(f>0)for(;h--;)p[h]||y[h]||(y[h]=V.call(u));y=m(y)}K.apply(u,y),d&&!r&&y.length>0&&f+n.length>1&&t.uniqueSort(u)}return d&&($=v,b=M),p};return i?r(s):s}var g,v,L,Y,k,w,D,T,b,x,S,j,H,E,O,A,P,C,W,F="sizzle"+1*new Date,N=e.document,$=0,R=0,z=n(),I=n(),U=n(),J=function(e,t){return e===t&&(S=!0),0},q={}.hasOwnProperty,B=[],V=B.pop,G=B.push,K=B.push,Z=B.slice,Q=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},X="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ne="\\["+ee+"*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",re=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ne+")*)|.*)\\)|)",ie=new RegExp(ee+"+","g"),ae=new RegExp("^"+ee+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ee+"+$","g"),se=new RegExp("^"+ee+"*,"+ee+"*"),oe=new RegExp("^"+ee+"*([>+~]|"+ee+")"+ee+"*"),ue=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),de=new RegExp(re),le=new RegExp("^"+te+"$"),ce={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+X+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},_e=/^(?:input|select|textarea|button)$/i,fe=/^h\d$/i,he=/^[^{]+\{\s*\[native \w/,me=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,pe=/[+~]/,ye=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),Me=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},ge=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ve=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Le=function(){j()},Ye=_(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{K.apply(B=Z.call(N.childNodes),N.childNodes),B[N.childNodes.length].nodeType}catch(e){K={apply:B.length?function(e,t){G.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}v=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},j=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:N;return r!==H&&9===r.nodeType&&r.documentElement?(H=r,E=H.documentElement,O=!k(H),N!==H&&(n=H.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Le,!1):n.attachEvent&&n.attachEvent("onunload",Le)),v.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),v.getElementsByTagName=i(function(e){return e.appendChild(H.createComment("")),!e.getElementsByTagName("*").length}),v.getElementsByClassName=he.test(H.getElementsByClassName),v.getById=i(function(e){return E.appendChild(e).id=F,!H.getElementsByName||!H.getElementsByName(F).length}),v.getById?(L.filter.ID=function(e){var t=e.replace(ye,Me);return function(e){return e.getAttribute("id")===t}},L.find.ID=function(e,t){if(void 0!==t.getElementById&&O){var n=t.getElementById(e);return n?[n]:[]}}):(L.filter.ID=function(e){var t=e.replace(ye,Me);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},L.find.ID=function(e,t){if(void 0!==t.getElementById&&O){var n,r,i,a=t.getElementById(e);if(a){if((n=a.getAttributeNode("id"))&&n.value===e)return[a];for(i=t.getElementsByName(e),r=0;a=i[r++];)if((n=a.getAttributeNode("id"))&&n.value===e)return[a]}return[]}}),L.find.TAG=v.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):v.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,a=t.getElementsByTagName(e);if("*"===e){for(;n=a[i++];)1===n.nodeType&&r.push(n);return r}return a},L.find.CLASS=v.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&O)return t.getElementsByClassName(e)},P=[],A=[],(v.qsa=he.test(H.querySelectorAll))&&(i(function(e){E.appendChild(e).innerHTML="<a id='"+F+"'></a><select id='"+F+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&A.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||A.push("\\["+ee+"*(?:value|"+X+")"),e.querySelectorAll("[id~="+F+"-]").length||A.push("~="),e.querySelectorAll(":checked").length||A.push(":checked"),e.querySelectorAll("a#"+F+"+*").length||A.push(".#.+[+~]")}),i(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=H.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&A.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&A.push(":enabled",":disabled"),E.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&A.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),A.push(",.*:")})),(v.matchesSelector=he.test(C=E.matches||E.webkitMatchesSelector||E.mozMatchesSelector||E.oMatchesSelector||E.msMatchesSelector))&&i(function(e){v.disconnectedMatch=C.call(e,"*"),C.call(e,"[s!='']:x"),P.push("!=",re)}),A=A.length&&new RegExp(A.join("|")),P=P.length&&new RegExp(P.join("|")),t=he.test(E.compareDocumentPosition),W=t||he.test(E.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},J=t?function(e,t){if(e===t)return S=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!v.sortDetached&&t.compareDocumentPosition(e)===n?e===H||e.ownerDocument===N&&W(N,e)?-1:t===H||t.ownerDocument===N&&W(N,t)?1:x?Q(x,e)-Q(x,t):0:4&n?-1:1)}:function(e,t){if(e===t)return S=!0,0;var n,r=0,i=e.parentNode,a=t.parentNode,o=[e],u=[t];if(!i||!a)return e===H?-1:t===H?1:i?-1:a?1:x?Q(x,e)-Q(x,t):0;if(i===a)return s(e,t);for(n=e;n=n.parentNode;)o.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;o[r]===u[r];)r++;return r?s(o[r],u[r]):o[r]===N?-1:u[r]===N?1:0},H):H},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==H&&j(e),n=n.replace(ue,"='$1']"),v.matchesSelector&&O&&!U[n+" "]&&(!P||!P.test(n))&&(!A||!A.test(n)))try{var r=C.call(e,n);if(r||v.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return t(n,H,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==H&&j(e),W(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==H&&j(e);var n=L.attrHandle[t.toLowerCase()],r=n&&q.call(L.attrHandle,t.toLowerCase())?n(e,t,!O):void 0;return void 0!==r?r:v.attributes||!O?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(ge,ve)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(S=!v.detectDuplicates,x=!v.sortStable&&e.slice(0),e.sort(J),S){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return x=null,e},Y=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=Y(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=Y(t);return n},L=t.selectors={cacheLength:50,createPseudo:r,match:ce,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,Me),e[3]=(e[3]||e[4]||e[5]||"").replace(ye,Me),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return ce.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=w(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ye,Me).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=z[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&z(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var a=t.attr(i,e);return null==a?"!="===n:!n||(a+="","="===n?a===r:"!="===n?a!==r:"^="===n?r&&0===a.indexOf(r):"*="===n?r&&a.indexOf(r)>-1:"$="===n?r&&a.slice(-r.length)===r:"~="===n?(" "+a.replace(ie," ")+" ").indexOf(r)>-1:"|="===n&&(a===r||a.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var a="nth"!==e.slice(0,3),s="last"!==e.slice(-4),o="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var d,l,c,_,f,h,m=a!==s?"nextSibling":"previousSibling",p=t.parentNode,y=o&&t.nodeName.toLowerCase(),M=!u&&!o,g=!1;if(p){if(a){for(;m;){for(_=t;_=_[m];)if(o?_.nodeName.toLowerCase()===y:1===_.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?p.firstChild:p.lastChild],s&&M){for(_=p,c=_[F]||(_[F]={}),l=c[_.uniqueID]||(c[_.uniqueID]={}),d=l[e]||[],f=d[0]===$&&d[1],g=f&&d[2],_=f&&p.childNodes[f];_=++f&&_&&_[m]||(g=f=0)||h.pop();)if(1===_.nodeType&&++g&&_===t){l[e]=[$,f,g];break}}else if(M&&(_=t,c=_[F]||(_[F]={}),l=c[_.uniqueID]||(c[_.uniqueID]={}),d=l[e]||[],f=d[0]===$&&d[1],g=f),!1===g)for(;(_=++f&&_&&_[m]||(g=f=0)||h.pop())&&((o?_.nodeName.toLowerCase()!==y:1!==_.nodeType)||!++g||(M&&(c=_[F]||(_[F]={}),l=c[_.uniqueID]||(c[_.uniqueID]={}),l[e]=[$,g]),_!==t)););return(g-=i)===r||g%r==0&&g/r>=0}}},PSEUDO:function(e,n){var i,a=L.pseudos[e]||L.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return a[F]?a(n):a.length>1?(i=[e,e,"",n],L.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=a(e,n),s=i.length;s--;)r=Q(e,i[s]),e[r]=!(t[r]=i[s])}):function(e){return a(e,0,i)}):a}},pseudos:{not:r(function(e){var t=[],n=[],i=D(e.replace(ae,"$1"));return i[F]?r(function(e,t,n,r){for(var a,s=i(e,null,r,[]),o=e.length;o--;)(a=s[o])&&(e[o]=!(t[o]=a))}):function(e,r,a){return t[0]=e,i(t,null,a,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(ye,Me),function(t){return(t.textContent||t.innerText||Y(t)).indexOf(e)>-1}}),lang:r(function(e){return le.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ye,Me).toLowerCase(),function(t){var n;do{if(n=O?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===E},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:o(!1),disabled:o(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!L.pseudos.empty(e)},header:function(e){return fe.test(e.nodeName)},input:function(e){return _e.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[n<0?n+t:n]}),even:u(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:u(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},L.pseudos.nth=L.pseudos.eq;for(g in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})L.pseudos[g]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(g);for(g in{submit:!0,reset:!0})L.pseudos[g]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(g);return l.prototype=L.filters=L.pseudos,L.setFilters=new l,w=t.tokenize=function(e,n){var r,i,a,s,o,u,d,l=I[e+" "];if(l)return n?0:l.slice(0);for(o=e,u=[],d=L.preFilter;o;){r&&!(i=se.exec(o))||(i&&(o=o.slice(i[0].length)||o),u.push(a=[])),r=!1,(i=oe.exec(o))&&(r=i.shift(),a.push({value:r,type:i[0].replace(ae," ")}),o=o.slice(r.length));for(s in L.filter)!(i=ce[s].exec(o))||d[s]&&!(i=d[s](i))||(r=i.shift(),a.push({value:r,type:s,matches:i}),o=o.slice(r.length));if(!r)break}return n?o.length:o?t.error(e):I(e,u).slice(0)},D=t.compile=function(e,t){var n,r=[],i=[],a=U[e+" "];if(!a){for(t||(t=w(e)),n=t.length;n--;)a=y(t[n]),a[F]?r.push(a):i.push(a);a=U(e,M(i,r)),a.selector=e}return a},T=t.select=function(e,t,n,r){var i,a,s,o,u,l="function"==typeof e&&e,_=!r&&w(e=l.selector||e);if(n=n||[],1===_.length){if(a=_[0]=_[0].slice(0),a.length>2&&"ID"===(s=a[0]).type&&9===t.nodeType&&O&&L.relative[a[1].type]){if(!(t=(L.find.ID(s.matches[0].replace(ye,Me),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(i=ce.needsContext.test(e)?0:a.length;i--&&(s=a[i],!L.relative[o=s.type]);)if((u=L.find[o])&&(r=u(s.matches[0].replace(ye,Me),pe.test(a[0].type)&&d(t.parentNode)||t))){if(a.splice(i,1),!(e=r.length&&c(a)))return K.apply(n,r),n;break}}return(l||D(e,_))(r,t,!O,n,!t||pe.test(e)&&d(t.parentNode)||t),n},v.sortStable=F.split("").sort(J).join("")===F,v.detectDuplicates=!!S,j(),v.sortDetached=i(function(e){return 1&e.compareDocumentPosition(H.createElement("fieldset"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||a("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),v.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||a("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||a(X,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(n);Me.find=ke,Me.expr=ke.selectors,Me.expr[":"]=Me.expr.pseudos,Me.uniqueSort=Me.unique=ke.uniqueSort,Me.text=ke.getText,Me.isXMLDoc=ke.isXML,Me.contains=ke.contains,Me.escapeSelector=ke.escape;var we=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&Me(e).is(n))break;r.push(e)}return r},De=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Te=Me.expr.match.needsContext,be=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,xe=/^.[^:#\[\.,]*$/;Me.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?Me.find.matchesSelector(r,e)?[r]:[]:Me.find.matches(e,Me.grep(t,function(e){return 1===e.nodeType}))},Me.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(Me(e).filter(function(){for(t=0;t<r;t++)if(Me.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)Me.find(e,i[t],n);return r>1?Me.uniqueSort(n):n},filter:function(e){return this.pushStack(d(this,e||[],!1))},not:function(e){return this.pushStack(d(this,e||[],!0))},is:function(e){return!!d(this,"string"==typeof e&&Te.test(e)?Me(e):e||[],!1).length}});var Se,je=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(Me.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Se,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:je.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof Me?t[0]:t,Me.merge(this,Me.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:se,!0)),be.test(r[1])&&Me.isPlainObject(t))for(r in t)Me.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=se.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):Me.isFunction(e)?void 0!==n.ready?n.ready(e):e(Me):Me.makeArray(e,this)}).prototype=Me.fn,Se=Me(se);var He=/^(?:parents|prev(?:Until|All))/,Ee={children:!0,contents:!0,next:!0,prev:!0};Me.fn.extend({has:function(e){var t=Me(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(Me.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,a=[],s="string"!=typeof e&&Me(e);if(!Te.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&Me.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(a.length>1?Me.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?ce.call(Me(e),this[0]):ce.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(Me.uniqueSort(Me.merge(this.get(),Me(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Me.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return we(e,"parentNode")},parentsUntil:function(e,t,n){return we(e,"parentNode",n)},next:function(e){return l(e,"nextSibling")},prev:function(e){return l(e,"previousSibling")},nextAll:function(e){return we(e,"nextSibling")},prevAll:function(e){return we(e,"previousSibling")},nextUntil:function(e,t,n){return we(e,"nextSibling",n)},prevUntil:function(e,t,n){return we(e,"previousSibling",n)},siblings:function(e){return De((e.parentNode||{}).firstChild,e)},children:function(e){return De(e.firstChild)},contents:function(e){return u(e,"iframe")?e.contentDocument:(u(e,"template")&&(e=e.content||e),Me.merge([],e.childNodes))}},function(e,t){Me.fn[e]=function(n,r){var i=Me.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=Me.filter(r,i)),this.length>1&&(Ee[e]||Me.uniqueSort(i),He.test(e)&&i.reverse()),this.pushStack(i)}});var Oe=/[^\x20\t\r\n\f]+/g;Me.Callbacks=function(e){e="string"==typeof e?c(e):Me.extend({},e);var t,n,r,i,a=[],s=[],o=-1,u=function(){for(i=i||e.once,r=t=!0;s.length;o=-1)for(n=s.shift();++o<a.length;)!1===a[o].apply(n[0],n[1])&&e.stopOnFalse&&(o=a.length,n=!1);e.memory||(n=!1),t=!1,i&&(a=n?[]:"")},d={add:function(){return a&&(n&&!t&&(o=a.length-1,s.push(n)),function t(n){Me.each(n,function(n,r){Me.isFunction(r)?e.unique&&d.has(r)||a.push(r):r&&r.length&&"string"!==Me.type(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return Me.each(arguments,function(e,t){for(var n;(n=Me.inArray(t,a,n))>-1;)a.splice(n,1),n<=o&&o--}),this},has:function(e){return e?Me.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=s=[],n||t||(a=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||u()),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!r}};return d},Me.extend({Deferred:function(e){var t=[["notify","progress",Me.Callbacks("memory"),Me.Callbacks("memory"),2],["resolve","done",Me.Callbacks("once memory"),Me.Callbacks("once memory"),0,"resolved"],["reject","fail",Me.Callbacks("once memory"),Me.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return Me.Deferred(function(n){Me.each(t,function(t,r){var i=Me.isFunction(e[r[4]])&&e[r[4]];a[r[1]](function(){var e=i&&i.apply(this,arguments);e&&Me.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,r,i){function a(e,t,r,i){return function(){var o=this,u=arguments,d=function(){var n,d;if(!(e<s)){if((n=r.apply(o,u))===t.promise())throw new TypeError("Thenable self-resolution");d=n&&("object"==typeof n||"function"==typeof n)&&n.then,Me.isFunction(d)?i?d.call(n,a(s,t,_,i),a(s,t,f,i)):(s++,d.call(n,a(s,t,_,i),a(s,t,f,i),a(s,t,_,t.notifyWith))):(r!==_&&(o=void 0,u=[n]),(i||t.resolveWith)(o,u))}},l=i?d:function(){try{d()}catch(n){Me.Deferred.exceptionHook&&Me.Deferred.exceptionHook(n,l.stackTrace),e+1>=s&&(r!==f&&(o=void 0,u=[n]),t.rejectWith(o,u))}};e?l():(Me.Deferred.getStackHook&&(l.stackTrace=Me.Deferred.getStackHook()),n.setTimeout(l))}}var s=0;return Me.Deferred(function(n){t[0][3].add(a(0,n,Me.isFunction(i)?i:_,n.notifyWith)),t[1][3].add(a(0,n,Me.isFunction(e)?e:_)),t[2][3].add(a(0,n,Me.isFunction(r)?r:f))}).promise()},promise:function(e){return null!=e?Me.extend(e,i):i}},a={};return Me.each(t,function(e,n){var s=n[2],o=n[5];i[n[1]]=s.add,o&&s.add(function(){r=o},t[3-e][2].disable,t[0][2].lock),s.add(n[3].fire),a[n[0]]=function(){return a[n[0]+"With"](this===a?void 0:this,arguments),this},a[n[0]+"With"]=s.fireWith}),i.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,n=t,r=Array(n),i=ue.call(arguments),a=Me.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?ue.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&(h(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||Me.isFunction(i[n]&&i[n].then)))return a.then();for(;n--;)h(i[n],s(n),a.reject);return a.promise()}});var Ae=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;Me.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&Ae.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},Me.readyException=function(e){n.setTimeout(function(){throw e})};var Pe=Me.Deferred();Me.fn.ready=function(e){return Pe.then(e).catch(function(e){Me.readyException(e)}),this},Me.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--Me.readyWait:Me.isReady)||(Me.isReady=!0,!0!==e&&--Me.readyWait>0||Pe.resolveWith(se,[Me]))}}),Me.ready.then=Pe.then,"complete"===se.readyState||"loading"!==se.readyState&&!se.documentElement.doScroll?n.setTimeout(Me.ready):(se.addEventListener("DOMContentLoaded",m),n.addEventListener("load",m));var Ce=function(e,t,n,r,i,a,s){var o=0,u=e.length,d=null==n;if("object"===Me.type(n)){i=!0;for(o in n)Ce(e,t,o,n[o],!0,a,s)}else if(void 0!==r&&(i=!0,Me.isFunction(r)||(s=!0),d&&(s?(t.call(e,r),t=null):(d=t,t=function(e,t,n){return d.call(Me(e),n)})),t))for(;o<u;o++)t(e[o],n,s?r:r.call(e[o],o,t(e[o],n)));return i?e:d?t.call(e):u?t(e[0],n):a},We=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};p.uid=1,p.prototype={cache:function(e){var t=e[this.expando];return t||(t={},We(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[Me.camelCase(t)]=n;else for(r in t)i[Me.camelCase(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][Me.camelCase(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){Array.isArray(t)?t=t.map(Me.camelCase):(t=Me.camelCase(t),t=t in r?[t]:t.match(Oe)||[]),n=t.length;for(;n--;)delete r[t[n]]}(void 0===t||Me.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!Me.isEmptyObject(t)}};var Fe=new p,Ne=new p,$e=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Re=/[A-Z]/g;Me.extend({hasData:function(e){return Ne.hasData(e)||Fe.hasData(e)},data:function(e,t,n){return Ne.access(e,t,n)},removeData:function(e,t){Ne.remove(e,t)},_data:function(e,t,n){return Fe.access(e,t,n)},_removeData:function(e,t){Fe.remove(e,t)}}),Me.fn.extend({data:function(e,t){var n,r,i,a=this[0],s=a&&a.attributes;if(void 0===e){if(this.length&&(i=Ne.get(a),1===a.nodeType&&!Fe.get(a,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=Me.camelCase(r.slice(5)),M(a,r,i[r])));Fe.set(a,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){Ne.set(this,e)}):Ce(this,function(t){var n;if(a&&void 0===t){if(void 0!==(n=Ne.get(a,e)))return n;if(void 0!==(n=M(a,e)))return n}else this.each(function(){Ne.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Ne.remove(this,e)})}}),Me.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Fe.get(e,t),n&&(!r||Array.isArray(n)?r=Fe.access(e,t,Me.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=Me.queue(e,t),r=n.length,i=n.shift(),a=Me._queueHooks(e,t),s=function(){Me.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete a.stop,i.call(e,s,a)),!r&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Fe.get(e,n)||Fe.access(e,n,{empty:Me.Callbacks("once memory").add(function(){Fe.remove(e,[t+"queue",n])})})}}),Me.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?Me.queue(this[0],e):void 0===t?this:this.each(function(){var n=Me.queue(this,e,t);Me._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&Me.dequeue(this,e)})},dequeue:function(e){return this.each(function(){Me.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=Me.Deferred(),a=this,s=this.length,o=function(){--r||i.resolveWith(a,[a])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(n=Fe.get(a[s],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(o));return o(),i.promise(t)}});var ze=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ie=new RegExp("^(?:([+-])=|)("+ze+")([a-z%]*)$","i"),Ue=["Top","Right","Bottom","Left"],Je=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&Me.contains(e.ownerDocument,e)&&"none"===Me.css(e,"display")},qe=function(e,t,n,r){var i,a,s={};for(a in t)s[a]=e.style[a],e.style[a]=t[a];i=n.apply(e,r||[]);for(a in t)e.style[a]=s[a];return i},Be={};Me.fn.extend({show:function(){return L(this,!0)},hide:function(){return L(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Je(this)?Me(this).show():Me(this).hide()})}});var Ve=/^(?:checkbox|radio)$/i,Ge=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,Ke=/^$|\/(?:java|ecma)script/i,Ze={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ze.optgroup=Ze.option,Ze.tbody=Ze.tfoot=Ze.colgroup=Ze.caption=Ze.thead,Ze.th=Ze.td;var Qe=/<|&#?\w+;/;!function(){var e=se.createDocumentFragment(),t=e.appendChild(se.createElement("div")),n=se.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ye.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",ye.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Xe=se.documentElement,et=/^key/,tt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,nt=/^([^.]*)(?:\.(.+)|)/;Me.event={global:{},add:function(e,t,n,r,i){var a,s,o,u,d,l,c,_,f,h,m,p=Fe.get(e);if(p)for(n.handler&&(a=n,n=a.handler,i=a.selector),i&&Me.find.matchesSelector(Xe,i),n.guid||(n.guid=Me.guid++),(u=p.events)||(u=p.events={}),(s=p.handle)||(s=p.handle=function(t){return void 0!==Me&&Me.event.triggered!==t.type?Me.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Oe)||[""],d=t.length;d--;)o=nt.exec(t[d])||[],f=m=o[1],h=(o[2]||"").split(".").sort(),f&&(c=Me.event.special[f]||{},f=(i?c.delegateType:c.bindType)||f,c=Me.event.special[f]||{},l=Me.extend({type:f,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&Me.expr.match.needsContext.test(i),namespace:h.join(".")},a),(_=u[f])||(_=u[f]=[],_.delegateCount=0,c.setup&&!1!==c.setup.call(e,r,h,s)||e.addEventListener&&e.addEventListener(f,s)),c.add&&(c.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),i?_.splice(_.delegateCount++,0,l):_.push(l),Me.event.global[f]=!0)},remove:function(e,t,n,r,i){var a,s,o,u,d,l,c,_,f,h,m,p=Fe.hasData(e)&&Fe.get(e);if(p&&(u=p.events)){for(t=(t||"").match(Oe)||[""],d=t.length;d--;)if(o=nt.exec(t[d])||[],f=m=o[1],h=(o[2]||"").split(".").sort(),f){for(c=Me.event.special[f]||{},f=(r?c.delegateType:c.bindType)||f,_=u[f]||[],o=o[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=a=_.length;a--;)l=_[a],!i&&m!==l.origType||n&&n.guid!==l.guid||o&&!o.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(_.splice(a,1),l.selector&&_.delegateCount--,c.remove&&c.remove.call(e,l));s&&!_.length&&(c.teardown&&!1!==c.teardown.call(e,h,p.handle)||Me.removeEvent(e,f,p.handle),delete u[f])}else for(f in u)Me.event.remove(e,f+t[d],n,r,!0);Me.isEmptyObject(u)&&Fe.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,a,s,o=Me.event.fix(e),u=new Array(arguments.length),d=(Fe.get(this,"events")||{})[o.type]||[],l=Me.event.special[o.type]||{};for(u[0]=o,t=1;t<arguments.length;t++)u[t]=arguments[t];if(o.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,o)){for(s=Me.event.handlers.call(this,o,d),t=0;(i=s[t++])&&!o.isPropagationStopped();)for(o.currentTarget=i.elem,n=0;(a=i.handlers[n++])&&!o.isImmediatePropagationStopped();)o.rnamespace&&!o.rnamespace.test(a.namespace)||(o.handleObj=a,o.data=a.data,void 0!==(r=((Me.event.special[a.origType]||{}).handle||a.handler).apply(i.elem,u))&&!1===(o.result=r)&&(o.preventDefault(),o.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,o),o.result}},handlers:function(e,t){var n,r,i,a,s,o=[],u=t.delegateCount,d=e.target;if(u&&d.nodeType&&!("click"===e.type&&e.button>=1))for(;d!==this;d=d.parentNode||this)if(1===d.nodeType&&("click"!==e.type||!0!==d.disabled)){for(a=[],s={},n=0;n<u;n++)r=t[n],i=r.selector+" ",void 0===s[i]&&(s[i]=r.needsContext?Me(i,this).index(d)>-1:Me.find(i,this,null,[d]).length),s[i]&&a.push(r);a.length&&o.push({elem:d,handlers:a})}return d=this,u<t.length&&o.push({elem:d,handlers:t.slice(u)}),o},addProp:function(e,t){Object.defineProperty(Me.Event.prototype,e,{enumerable:!0,configurable:!0,get:Me.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[Me.expando]?e:new Me.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==b()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===b()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&u(this,"input"))return this.click(),!1},_default:function(e){return u(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},Me.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},Me.Event=function(e,t){if(!(this instanceof Me.Event))return new Me.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?D:T,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&Me.extend(this,t),this.timeStamp=e&&e.timeStamp||Me.now(),this[Me.expando]=!0},Me.Event.prototype={constructor:Me.Event,isDefaultPrevented:T,isPropagationStopped:T,isImmediatePropagationStopped:T,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=D,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=D,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=D,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},Me.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&et.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&tt.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},Me.event.addProp),Me.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){Me.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,a=e.handleObj;return i&&(i===r||Me.contains(r,i))||(e.type=a.origType,n=a.handler.apply(this,arguments),e.type=t),n}}}),Me.fn.extend({on:function(e,t,n,r){return x(this,e,t,n,r)},one:function(e,t,n,r){return x(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,Me(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=T),this.each(function(){Me.event.remove(this,e,n,t)})}});var rt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,it=/<script|<style|<link/i,at=/checked\s*(?:[^=]|=\s*.checked.)/i,st=/^true\/(.*)/,ot=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;Me.extend({htmlPrefilter:function(e){return e.replace(rt,"<$1></$2>")},clone:function(e,t,n){var r,i,a,s,o=e.cloneNode(!0),u=Me.contains(e.ownerDocument,e);if(!(ye.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Me.isXMLDoc(e)))for(s=Y(o),a=Y(e),r=0,i=a.length;r<i;r++)O(a[r],s[r]);if(t)if(n)for(a=a||Y(e),s=s||Y(o),r=0,i=a.length;r<i;r++)E(a[r],s[r]);else E(e,o);return s=Y(o,"script"),s.length>0&&k(s,!u&&Y(e,"script")),o},cleanData:function(e){for(var t,n,r,i=Me.event.special,a=0;void 0!==(n=e[a]);a++)if(We(n)){if(t=n[Fe.expando]){if(t.events)for(r in t.events)i[r]?Me.event.remove(n,r):Me.removeEvent(n,r,t.handle);n[Fe.expando]=void 0}n[Ne.expando]&&(n[Ne.expando]=void 0)}}}),Me.fn.extend({detach:function(e){return P(this,e,!0)},remove:function(e){return P(this,e)},text:function(e){return Ce(this,function(e){return void 0===e?Me.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return A(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){S(this,e).appendChild(e)}})},prepend:function(){return A(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=S(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return A(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return A(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(Me.cleanData(Y(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return Me.clone(this,e,t)})},html:function(e){return Ce(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!it.test(e)&&!Ze[(Ge.exec(e)||["",""])[1].toLowerCase()]){e=Me.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodeType&&(Me.cleanData(Y(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return A(this,arguments,function(t){var n=this.parentNode;Me.inArray(this,e)<0&&(Me.cleanData(Y(this)),n&&n.replaceChild(t,this))},e)}}),Me.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){Me.fn[e]=function(e){for(var n,r=[],i=Me(e),a=i.length-1,s=0;s<=a;s++)n=s===a?this:this.clone(!0),Me(i[s])[t](n),le.apply(r,n.get());return this.pushStack(r)}});var ut=/^margin/,dt=new RegExp("^("+ze+")(?!px)[a-z%]+$","i"),lt=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)};!function(){function e(){if(o){o.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",o.innerHTML="",Xe.appendChild(s);var e=n.getComputedStyle(o);t="1%"!==e.top,a="2px"===e.marginLeft,r="4px"===e.width,o.style.marginRight="50%",i="4px"===e.marginRight,Xe.removeChild(s),o=null}}var t,r,i,a,s=se.createElement("div"),o=se.createElement("div");o.style&&(o.style.backgroundClip="content-box",o.cloneNode(!0).style.backgroundClip="",ye.clearCloneStyle="content-box"===o.style.backgroundClip,s.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",s.appendChild(o),Me.extend(ye,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return e(),r},pixelMarginRight:function(){return e(),i},reliableMarginLeft:function(){return e(),a}}))}();var ct=/^(none|table(?!-c[ea]).+)/,_t=/^--/,ft={position:"absolute",visibility:"hidden",display:"block"},ht={letterSpacing:"0",fontWeight:"400"},mt=["Webkit","Moz","ms"],pt=se.createElement("div").style;Me.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=C(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,a,s,o=Me.camelCase(t),u=_t.test(t),d=e.style;if(u||(t=N(o)),s=Me.cssHooks[t]||Me.cssHooks[o],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:d[t];a=typeof n,"string"===a&&(i=Ie.exec(n))&&i[1]&&(n=g(e,t,i),a="number"),null!=n&&n===n&&("number"===a&&(n+=i&&i[3]||(Me.cssNumber[o]?"":"px")),ye.clearCloneStyle||""!==n||0!==t.indexOf("background")||(d[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(u?d.setProperty(t,n):d[t]=n))}},css:function(e,t,n,r){var i,a,s,o=Me.camelCase(t);return _t.test(t)||(t=N(o)),s=Me.cssHooks[t]||Me.cssHooks[o],s&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=C(e,t,r)),"normal"===i&&t in ht&&(i=ht[t]),""===n||n?(a=parseFloat(i),!0===n||isFinite(a)?a||0:i):i}}),Me.each(["height","width"],function(e,t){Me.cssHooks[t]={get:function(e,n,r){if(n)return!ct.test(Me.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?z(e,t,r):qe(e,ft,function(){return z(e,t,r)})},set:function(e,n,r){var i,a=r&&lt(e),s=r&&R(e,t,r,"border-box"===Me.css(e,"boxSizing",!1,a),a);return s&&(i=Ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=Me.css(e,t)),$(e,n,s)}}}),Me.cssHooks.marginLeft=W(ye.reliableMarginLeft,function(e,t){if(t)return(parseFloat(C(e,"marginLeft"))||e.getBoundingClientRect().left-qe(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),Me.each({margin:"",padding:"",border:"Width"},function(e,t){Me.cssHooks[e+t]={expand:function(n){for(var r=0,i={},a="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Ue[r]+t]=a[r]||a[r-2]||a[0];return i}},ut.test(e)||(Me.cssHooks[e+t].set=$)}),Me.fn.extend({css:function(e,t){return Ce(this,function(e,t,n){var r,i,a={},s=0;if(Array.isArray(t)){for(r=lt(e),i=t.length;s<i;s++)a[t[s]]=Me.css(e,t[s],!1,r);return a}return void 0!==n?Me.style(e,t,n):Me.css(e,t)},e,t,arguments.length>1)}}),Me.Tween=I,I.prototype={constructor:I,init:function(e,t,n,r,i,a){this.elem=e,this.prop=n,this.easing=i||Me.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=a||(Me.cssNumber[n]?"":"px")},cur:function(){var e=I.propHooks[this.prop];return e&&e.get?e.get(this):I.propHooks._default.get(this)},run:function(e){var t,n=I.propHooks[this.prop];return this.options.duration?this.pos=t=Me.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):I.propHooks._default.set(this),this}},I.prototype.init.prototype=I.prototype,I.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=Me.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){Me.fx.step[e.prop]?Me.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[Me.cssProps[e.prop]]&&!Me.cssHooks[e.prop]?e.elem[e.prop]=e.now:Me.style(e.elem,e.prop,e.now+e.unit)}}},I.propHooks.scrollTop=I.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Me.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},Me.fx=I.prototype.init,Me.fx.step={};var yt,Mt,gt=/^(?:toggle|show|hide)$/,vt=/queueHooks$/;Me.Animation=Me.extend(K,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return g(n.elem,e,Ie.exec(t),n),n}]},tweener:function(e,t){Me.isFunction(e)?(t=e,e=["*"]):e=e.match(Oe);for(var n,r=0,i=e.length;r<i;r++)n=e[r],K.tweeners[n]=K.tweeners[n]||[],K.tweeners[n].unshift(t)},prefilters:[V],prefilter:function(e,t){t?K.prefilters.unshift(e):K.prefilters.push(e)}}),Me.speed=function(e,t,n){var r=e&&"object"==typeof e?Me.extend({},e):{complete:n||!n&&t||Me.isFunction(e)&&e,duration:e,easing:n&&t||t&&!Me.isFunction(t)&&t};return Me.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in Me.fx.speeds?r.duration=Me.fx.speeds[r.duration]:r.duration=Me.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){Me.isFunction(r.old)&&r.old.call(this),r.queue&&Me.dequeue(this,r.queue)},r},Me.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Je).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=Me.isEmptyObject(e),a=Me.speed(t,n,r),s=function(){var t=K(this,Me.extend({},e),a);(i||Fe.get(this,"finish"))&&t.stop(!0)};return s.finish=s,i||!1===a.queue?this.each(s):this.queue(a.queue,s)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",a=Me.timers,s=Fe.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&vt.test(i)&&r(s[i]);for(i=a.length;i--;)a[i].elem!==this||null!=e&&a[i].queue!==e||(a[i].anim.stop(n),t=!1,a.splice(i,1));!t&&n||Me.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=Fe.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],a=Me.timers,s=r?r.length:0;for(n.finish=!0,Me.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=a.length;t--;)a[t].elem===this&&a[t].queue===e&&(a[t].anim.stop(!0),a.splice(t,1));for(t=0;t<s;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),Me.each(["toggle","show","hide"],function(e,t){var n=Me.fn[t];Me.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(q(t,!0),e,r,i)}}),Me.each({slideDown:q("show"),slideUp:q("hide"),slideToggle:q("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){Me.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),Me.timers=[],Me.fx.tick=function(){var e,t=0,n=Me.timers;for(yt=Me.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||Me.fx.stop(),yt=void 0},Me.fx.timer=function(e){Me.timers.push(e),Me.fx.start()},Me.fx.interval=13,Me.fx.start=function(){Mt||(Mt=!0,U())},Me.fx.stop=function(){Mt=null},Me.fx.speeds={slow:600,fast:200,_default:400},Me.fn.delay=function(e,t){return e=Me.fx?Me.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,r){var i=n.setTimeout(t,e);r.stop=function(){n.clearTimeout(i)}})},function(){var e=se.createElement("input"),t=se.createElement("select"),n=t.appendChild(se.createElement("option"));e.type="checkbox",ye.checkOn=""!==e.value,ye.optSelected=n.selected,e=se.createElement("input"),e.value="t",e.type="radio",ye.radioValue="t"===e.value}();var Lt,Yt=Me.expr.attrHandle;Me.fn.extend({attr:function(e,t){return Ce(this,Me.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){Me.removeAttr(this,e)})}}),Me.extend({attr:function(e,t,n){var r,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===e.getAttribute?Me.prop(e,t,n):(1===a&&Me.isXMLDoc(e)||(i=Me.attrHooks[t.toLowerCase()]||(Me.expr.match.bool.test(t)?Lt:void 0)),void 0!==n?null===n?void Me.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=Me.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!ye.radioValue&&"radio"===t&&u(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(Oe);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),Lt={set:function(e,t,n){return!1===t?Me.removeAttr(e,n):e.setAttribute(n,n),n}},Me.each(Me.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Yt[t]||Me.find.attr;Yt[t]=function(e,t,r){var i,a,s=t.toLowerCase();return r||(a=Yt[s],Yt[s]=i,i=null!=n(e,t,r)?s:null,Yt[s]=a),i}});var kt=/^(?:input|select|textarea|button)$/i,wt=/^(?:a|area)$/i;Me.fn.extend({prop:function(e,t){return Ce(this,Me.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[Me.propFix[e]||e]})}}),Me.extend({prop:function(e,t,n){var r,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&Me.isXMLDoc(e)||(t=Me.propFix[t]||t,i=Me.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=Me.find.attr(e,"tabindex");return t?parseInt(t,10):kt.test(e.nodeName)||wt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ye.optSelected||(Me.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),Me.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Me.propFix[this.toLowerCase()]=this}),Me.fn.extend({addClass:function(e){var t,n,r,i,a,s,o,u=0;if(Me.isFunction(e))return this.each(function(t){Me(this).addClass(e.call(this,t,Q(this)))});if("string"==typeof e&&e)for(t=e.match(Oe)||[];n=this[u++];)if(i=Q(n),r=1===n.nodeType&&" "+Z(i)+" "){for(s=0;a=t[s++];)r.indexOf(" "+a+" ")<0&&(r+=a+" ");o=Z(r),i!==o&&n.setAttribute("class",o)}return this},removeClass:function(e){var t,n,r,i,a,s,o,u=0;if(Me.isFunction(e))return this.each(function(t){Me(this).removeClass(e.call(this,t,Q(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Oe)||[];n=this[u++];)if(i=Q(n),r=1===n.nodeType&&" "+Z(i)+" "){for(s=0;a=t[s++];)for(;r.indexOf(" "+a+" ")>-1;)r=r.replace(" "+a+" "," ");o=Z(r),i!==o&&n.setAttribute("class",o)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):Me.isFunction(e)?this.each(function(n){Me(this).toggleClass(e.call(this,n,Q(this),t),t)}):this.each(function(){var t,r,i,a;if("string"===n)for(r=0,i=Me(this),a=e.match(Oe)||[];t=a[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=Q(this),t&&Fe.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Fe.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+Z(Q(n))+" ").indexOf(t)>-1)return!0;return!1}});var Dt=/\r/g;Me.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=Me.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,Me(this).val()):e,null==i?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=Me.map(i,function(e){return null==e?"":e+""})),(t=Me.valHooks[this.type]||Me.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=Me.valHooks[i.type]||Me.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Dt,""):null==n?"":n)}}}),Me.extend({valHooks:{option:{get:function(e){var t=Me.find.attr(e,"value");return null!=t?t:Z(Me.text(e))}},select:{get:function(e){var t,n,r,i=e.options,a=e.selectedIndex,s="select-one"===e.type,o=s?null:[],d=s?a+1:i.length;for(r=a<0?d:s?a:0;r<d;r++)if(n=i[r],(n.selected||r===a)&&!n.disabled&&(!n.parentNode.disabled||!u(n.parentNode,"optgroup"))){if(t=Me(n).val(),s)return t;o.push(t)}return o},set:function(e,t){for(var n,r,i=e.options,a=Me.makeArray(t),s=i.length;s--;)r=i[s],(r.selected=Me.inArray(Me.valHooks.option.get(r),a)>-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),Me.each(["radio","checkbox"],function(){Me.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=Me.inArray(Me(e).val(),t)>-1}},ye.checkOn||(Me.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Tt=/^(?:focusinfocus|focusoutblur)$/;Me.extend(Me.event,{trigger:function(e,t,r,i){var a,s,o,u,d,l,c,_=[r||se],f=he.call(e,"type")?e.type:e,h=he.call(e,"namespace")?e.namespace.split("."):[];if(s=o=r=r||se,3!==r.nodeType&&8!==r.nodeType&&!Tt.test(f+Me.event.triggered)&&(f.indexOf(".")>-1&&(h=f.split("."),f=h.shift(),h.sort()),d=f.indexOf(":")<0&&"on"+f,e=e[Me.expando]?e:new Me.Event(f,"object"==typeof e&&e),e.isTrigger=i?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:Me.makeArray(t,[e]),c=Me.event.special[f]||{},i||!c.trigger||!1!==c.trigger.apply(r,t))){if(!i&&!c.noBubble&&!Me.isWindow(r)){for(u=c.delegateType||f,Tt.test(u+f)||(s=s.parentNode);s;s=s.parentNode)_.push(s),o=s;o===(r.ownerDocument||se)&&_.push(o.defaultView||o.parentWindow||n)}for(a=0;(s=_[a++])&&!e.isPropagationStopped();)e.type=a>1?u:c.bindType||f,l=(Fe.get(s,"events")||{})[e.type]&&Fe.get(s,"handle"),l&&l.apply(s,t),(l=d&&s[d])&&l.apply&&We(s)&&(e.result=l.apply(s,t),!1===e.result&&e.preventDefault());return e.type=f,i||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(_.pop(),t)||!We(r)||d&&Me.isFunction(r[f])&&!Me.isWindow(r)&&(o=r[d],o&&(r[d]=null),Me.event.triggered=f,r[f](),Me.event.triggered=void 0,o&&(r[d]=o)),e.result}},simulate:function(e,t,n){var r=Me.extend(new Me.Event,n,{type:e,isSimulated:!0});Me.event.trigger(r,null,t)}}),Me.fn.extend({trigger:function(e,t){return this.each(function(){Me.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return Me.event.trigger(e,t,n,!0)}}),Me.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){Me.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),Me.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ye.focusin="onfocusin"in n,ye.focusin||Me.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){Me.event.simulate(t,e.target,Me.event.fix(e))};Me.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Fe.access(r,t);i||r.addEventListener(e,n,!0),Fe.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Fe.access(r,t)-1;i?Fe.access(r,t,i):(r.removeEventListener(e,n,!0),Fe.remove(r,t))}}});var bt=n.location,xt=Me.now(),St=/\?/;Me.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||Me.error("Invalid XML: "+e),t};var jt=/\[\]$/,Ht=/\r?\n/g,Et=/^(?:submit|button|image|reset|file)$/i,Ot=/^(?:input|select|textarea|keygen)/i;Me.param=function(e,t){var n,r=[],i=function(e,t){var n=Me.isFunction(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!Me.isPlainObject(e))Me.each(e,function(){i(this.name,this.value)});else for(n in e)X(n,e[n],t,i);return r.join("&")},Me.fn.extend({serialize:function(){return Me.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=Me.prop(this,"elements");return e?Me.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!Me(this).is(":disabled")&&Ot.test(this.nodeName)&&!Et.test(e)&&(this.checked||!Ve.test(e))}).map(function(e,t){var n=Me(this).val();return null==n?null:Array.isArray(n)?Me.map(n,function(e){return{name:t.name,value:e.replace(Ht,"\r\n")}}):{name:t.name,value:n.replace(Ht,"\r\n")}}).get()}});var At=/%20/g,Pt=/#.*$/,Ct=/([?&])_=[^&]*/,Wt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ft=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nt=/^(?:GET|HEAD)$/,$t=/^\/\//,Rt={},zt={},It="*/".concat("*"),Ut=se.createElement("a");Ut.href=bt.href,Me.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bt.href,type:"GET",isLocal:Ft.test(bt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":Me.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?ne(ne(e,Me.ajaxSettings),t):ne(Me.ajaxSettings,e)},ajaxPrefilter:ee(Rt),ajaxTransport:ee(zt),ajax:function(e,t){function r(e,t,r,o){var d,_,f,v,L,Y=t;l||(l=!0,u&&n.clearTimeout(u),i=void 0,s=o||"",k.readyState=e>0?4:0,d=e>=200&&e<300||304===e,r&&(v=re(h,k,r)),v=ie(h,v,k,d),d?(h.ifModified&&(L=k.getResponseHeader("Last-Modified"),L&&(Me.lastModified[a]=L),(L=k.getResponseHeader("etag"))&&(Me.etag[a]=L)),204===e||"HEAD"===h.type?Y="nocontent":304===e?Y="notmodified":(Y=v.state,_=v.data,f=v.error,d=!f)):(f=Y,!e&&Y||(Y="error",e<0&&(e=0))),k.status=e,k.statusText=(t||Y)+"",d?y.resolveWith(m,[_,Y,k]):y.rejectWith(m,[k,Y,f]),k.statusCode(g),g=void 0,c&&p.trigger(d?"ajaxSuccess":"ajaxError",[k,h,d?_:f]),M.fireWith(m,[k,Y]),c&&(p.trigger("ajaxComplete",[k,h]),--Me.active||Me.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,a,s,o,u,d,l,c,_,f,h=Me.ajaxSetup({},t),m=h.context||h,p=h.context&&(m.nodeType||m.jquery)?Me(m):Me.event,y=Me.Deferred(),M=Me.Callbacks("once memory"),g=h.statusCode||{},v={},L={},Y="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(l){if(!o)for(o={};t=Wt.exec(s);)o[t[1].toLowerCase()]=t[2];t=o[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return l?s:null},setRequestHeader:function(e,t){return null==l&&(e=L[e.toLowerCase()]=L[e.toLowerCase()]||e,v[e]=t),this},overrideMimeType:function(e){return null==l&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)k.always(e[k.status]);else for(t in e)g[t]=[g[t],e[t]];return this},abort:function(e){var t=e||Y;return i&&i.abort(t),r(0,t),this}};if(y.promise(k),h.url=((e||h.url||bt.href)+"").replace($t,bt.protocol+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(Oe)||[""],null==h.crossDomain){d=se.createElement("a");try{d.href=h.url,d.href=d.href,h.crossDomain=Ut.protocol+"//"+Ut.host!=d.protocol+"//"+d.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=Me.param(h.data,h.traditional)),te(Rt,h,t,k),l)return k;c=Me.event&&h.global,c&&0==Me.active++&&Me.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Nt.test(h.type),a=h.url.replace(Pt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(At,"+")):(f=h.url.slice(a.length),h.data&&(a+=(St.test(a)?"&":"?")+h.data,delete h.data),!1===h.cache&&(a=a.replace(Ct,"$1"),f=(St.test(a)?"&":"?")+"_="+xt+++f),h.url=a+f),h.ifModified&&(Me.lastModified[a]&&k.setRequestHeader("If-Modified-Since",Me.lastModified[a]),Me.etag[a]&&k.setRequestHeader("If-None-Match",Me.etag[a])),(h.data&&h.hasContent&&!1!==h.contentType||t.contentType)&&k.setRequestHeader("Content-Type",h.contentType),k.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+It+"; q=0.01":""):h.accepts["*"]);for(_ in h.headers)k.setRequestHeader(_,h.headers[_]);if(h.beforeSend&&(!1===h.beforeSend.call(m,k,h)||l))return k.abort();if(Y="abort",M.add(h.complete),k.done(h.success),k.fail(h.error),i=te(zt,h,t,k)){if(k.readyState=1,c&&p.trigger("ajaxSend",[k,h]),l)return k;h.async&&h.timeout>0&&(u=n.setTimeout(function(){k.abort("timeout")},h.timeout));try{l=!1,i.send(v,r)}catch(e){if(l)throw e;r(-1,e)}}else r(-1,"No Transport");return k},getJSON:function(e,t,n){return Me.get(e,t,n,"json")},getScript:function(e,t){return Me.get(e,void 0,t,"script")}}),Me.each(["get","post"],function(e,t){Me[t]=function(e,n,r,i){return Me.isFunction(n)&&(i=i||r,r=n,n=void 0),Me.ajax(Me.extend({url:e,type:t,dataType:i,data:n,success:r},Me.isPlainObject(e)&&e))}}),Me._evalUrl=function(e){return Me.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},Me.fn.extend({wrapAll:function(e){var t;return this[0]&&(Me.isFunction(e)&&(e=e.call(this[0])),t=Me(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return Me.isFunction(e)?this.each(function(t){Me(this).wrapInner(e.call(this,t))}):this.each(function(){var t=Me(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=Me.isFunction(e);return this.each(function(n){Me(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){Me(this).replaceWith(this.childNodes)}),this}}),Me.expr.pseudos.hidden=function(e){return!Me.expr.pseudos.visible(e)},Me.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},Me.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Jt={0:200,1223:204},qt=Me.ajaxSettings.xhr();ye.cors=!!qt&&"withCredentials"in qt,ye.ajax=qt=!!qt,Me.ajaxTransport(function(e){var t,r;if(ye.cors||qt&&!e.crossDomain)return{send:function(i,a){var s,o=e.xhr();if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)o[s]=e.xhrFields[s];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(s in i)o.setRequestHeader(s,i[s]);t=function(e){return function(){t&&(t=r=o.onload=o.onerror=o.onabort=o.onreadystatechange=null,"abort"===e?o.abort():"error"===e?"number"!=typeof o.status?a(0,"error"):a(o.status,o.statusText):a(Jt[o.status]||o.status,o.statusText,"text"!==(o.responseType||"text")||"string"!=typeof o.responseText?{binary:o.response}:{text:o.responseText},o.getAllResponseHeaders()))}},o.onload=t(),r=o.onerror=t("error"),void 0!==o.onabort?o.onabort=r:o.onreadystatechange=function(){4===o.readyState&&n.setTimeout(function(){t&&r()})},t=t("abort");try{o.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),Me.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),Me.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return Me.globalEval(e),e}}}),Me.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),Me.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=Me("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),se.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Bt=[],Vt=/(=)\?(?=&|$)|\?\?/;Me.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Bt.pop()||Me.expando+"_"+xt++;return this[e]=!0,e}}),Me.ajaxPrefilter("json jsonp",function(e,t,r){var i,a,s,o=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(o||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=Me.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,o?e[o]=e[o].replace(Vt,"$1"+i):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return s||Me.error(i+" was not called"),s[0]},e.dataTypes[0]="json",a=n[i],n[i]=function(){s=arguments},r.always(function(){void 0===a?Me(n).removeProp(i):n[i]=a,e[i]&&(e.jsonpCallback=t.jsonpCallback,Bt.push(i)),s&&Me.isFunction(a)&&a(s[0]),s=a=void 0}),"script"}),ye.createHTMLDocument=function(){var e=se.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),Me.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var r,i,a;return t||(ye.createHTMLDocument?(t=se.implementation.createHTMLDocument(""),r=t.createElement("base"),r.href=se.location.href,t.head.appendChild(r)):t=se),i=be.exec(e),a=!n&&[],i?[t.createElement(i[1])]:(i=w([e],t,a),a&&a.length&&Me(a).remove(),Me.merge([],i.childNodes))},Me.fn.load=function(e,t,n){var r,i,a,s=this,o=e.indexOf(" ");return o>-1&&(r=Z(e.slice(o)),e=e.slice(0,o)),Me.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),s.length>0&&Me.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){a=arguments,s.html(r?Me("<div>").append(Me.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},Me.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){Me.fn[t]=function(e){return this.on(t,e)}}),Me.expr.pseudos.animated=function(e){return Me.grep(Me.timers,function(t){return e===t.elem}).length},Me.offset={setOffset:function(e,t,n){var r,i,a,s,o,u,d,l=Me.css(e,"position"),c=Me(e),_={};"static"===l&&(e.style.position="relative"),o=c.offset(),a=Me.css(e,"top"),u=Me.css(e,"left"),d=("absolute"===l||"fixed"===l)&&(a+u).indexOf("auto")>-1,d?(r=c.position(),s=r.top,i=r.left):(s=parseFloat(a)||0,i=parseFloat(u)||0),Me.isFunction(t)&&(t=t.call(e,n,Me.extend({},o))),null!=t.top&&(_.top=t.top-o.top+s),null!=t.left&&(_.left=t.left-o.left+i),"using"in t?t.using.call(e,_):c.css(_)}},Me.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){Me.offset.setOffset(this,e,t)});var t,n,r,i,a=this[0];if(a)return a.getClientRects().length?(r=a.getBoundingClientRect(),t=a.ownerDocument,n=t.documentElement,i=t.defaultView,{top:r.top+i.pageYOffset-n.clientTop,left:r.left+i.pageXOffset-n.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===Me.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),u(e[0],"html")||(r=e.offset()),r={top:r.top+Me.css(e[0],"borderTopWidth",!0),left:r.left+Me.css(e[0],"borderLeftWidth",!0)}),{top:t.top-r.top-Me.css(n,"marginTop",!0),left:t.left-r.left-Me.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===Me.css(e,"position");)e=e.offsetParent;return e||Xe})}}),Me.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;Me.fn[e]=function(r){return Ce(this,function(e,r,i){var a;if(Me.isWindow(e)?a=e:9===e.nodeType&&(a=e.defaultView),void 0===i)return a?a[t]:e[r];a?a.scrollTo(n?a.pageXOffset:i,n?i:a.pageYOffset):e[r]=i},e,r,arguments.length)}}),Me.each(["top","left"],function(e,t){Me.cssHooks[t]=W(ye.pixelPosition,function(e,n){if(n)return n=C(e,t),dt.test(n)?Me(e).position()[t]+"px":n})}),Me.each({Height:"height",Width:"width"},function(e,t){Me.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){Me.fn[r]=function(i,a){var s=arguments.length&&(n||"boolean"!=typeof i),o=n||(!0===i||!0===a?"margin":"border");return Ce(this,function(t,n,i){var a;return Me.isWindow(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(a=t.documentElement,Math.max(t.body["scroll"+e],a["scroll"+e],t.body["offset"+e],a["offset"+e],a["client"+e])):void 0===i?Me.css(t,n,o):Me.style(t,n,i,o)},t,s?i:void 0,s)}})}),Me.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),Me.holdReady=function(e){e?Me.readyWait++:Me.ready(!0)},Me.isArray=Array.isArray,Me.parseJSON=JSON.parse,Me.nodeName=u,r=[],void 0!==(i=function(){return Me}.apply(t,r))&&(e.exports=i);var Gt=n.jQuery,Kt=n.$;return Me.noConflict=function(e){return n.$===Me&&(n.$=Kt),e&&n.jQuery===Me&&(n.jQuery=Gt),Me},a||(n.jQuery=n.$=Me),Me})},function(e,t){if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(e){"use strict";var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one("bsTransitionEnd",function(){n=!0});var i=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(i,t),this},e(function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var n=e(this),i=n.data("bs.alert");i||n.data("bs.alert",i=new r(this)),"string"==typeof t&&i[t].call(n)})}var n='[data-dismiss="alert"]',r=function(t){e(t).on("click",n,this.close)};r.VERSION="3.3.7",r.TRANSITION_DURATION=150,r.prototype.close=function(t){function n(){s.detach().trigger("closed.bs.alert").remove()}var i=e(this),a=i.attr("data-target");a||(a=i.attr("href"),a=a&&a.replace(/.*(?=#[^\s]*$)/,""));var s=e("#"===a?[]:a);t&&t.preventDefault(),s.length||(s=i.closest(".alert")),s.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(s.removeClass("in"),e.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",n).emulateTransitionEnd(r.TRANSITION_DURATION):n())};var i=e.fn.alert;e.fn.alert=t,e.fn.alert.Constructor=r,e.fn.alert.noConflict=function(){return e.fn.alert=i,this},e(document).on("click.bs.alert.data-api",n,r.prototype.close)}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var r=e(this),i=r.data("bs.button"),a="object"==typeof t&&t;i||r.data("bs.button",i=new n(this,a)),"toggle"==t?i.toggle():t&&i.setState(t)})}var n=function(t,r){this.$element=e(t),this.options=e.extend({},n.DEFAULTS,r),this.isLoading=!1};n.VERSION="3.3.7",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(t){var n="disabled",r=this.$element,i=r.is("input")?"val":"html",a=r.data();t+="Text",null==a.resetText&&r.data("resetText",r[i]()),setTimeout(e.proxy(function(){r[i](null==a[t]?this.options[t]:a[t]),"loadingText"==t?(this.isLoading=!0,r.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,r.removeClass(n).removeAttr(n).prop(n,!1))},this),0)},n.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),e&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var r=e.fn.button;e.fn.button=t,e.fn.button.Constructor=n,e.fn.button.noConflict=function(){return e.fn.button=r,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var r=e(n.target).closest(".btn");t.call(r,"toggle"),e(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),r.is("input,button")?r.trigger("focus"):r.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var r=e(this),i=r.data("bs.carousel"),a=e.extend({},n.DEFAULTS,r.data(),"object"==typeof t&&t),s="string"==typeof t?t:a.slide;i||r.data("bs.carousel",i=new n(this,a)),"number"==typeof t?i.to(t):s?i[s]():a.interval&&i.pause().cycle()})}var n=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},n.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},n.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t);if(("prev"==e&&0===n||"next"==e&&n==this.$items.length-1)&&!this.options.wrap)return t;var r="prev"==e?-1:1,i=(n+r)%this.$items.length;return this.$items.eq(i)},n.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){t.to(e)}):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",this.$items.eq(e))},n.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(t,r){var i=this.$element.find(".item.active"),a=r||this.getItemForDirection(t,i),s=this.interval,o="next"==t?"left":"right",u=this;if(a.hasClass("active"))return this.sliding=!1;var d=a[0],l=e.Event("slide.bs.carousel",{relatedTarget:d,direction:o});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var c=e(this.$indicators.children()[this.getItemIndex(a)]);c&&c.addClass("active")}var _=e.Event("slid.bs.carousel",{relatedTarget:d,direction:o});return e.support.transition&&this.$element.hasClass("slide")?(a.addClass(t),a[0].offsetWidth,i.addClass(o),a.addClass(o),i.one("bsTransitionEnd",function(){a.removeClass([t,o].join(" ")).addClass("active"),i.removeClass(["active",o].join(" ")),u.sliding=!1,setTimeout(function(){u.$element.trigger(_)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(i.removeClass("active"),a.addClass("active"),this.sliding=!1,this.$element.trigger(_)),s&&this.cycle(),this}};var r=e.fn.carousel;e.fn.carousel=t,e.fn.carousel.Constructor=n,e.fn.carousel.noConflict=function(){return e.fn.carousel=r,this};var i=function(n){var r,i=e(this),a=e(i.attr("data-target")||(r=i.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""));if(a.hasClass("carousel")){var s=e.extend({},a.data(),i.data()),o=i.attr("data-slide-to");o&&(s.interval=!1),t.call(a,s),o&&a.data("bs.carousel").to(o),n.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",i).on("click.bs.carousel.data-api","[data-slide-to]",i),e(window).on("load",function(){e('[data-ride="carousel"]').each(function(){var n=e(this);t.call(n,n.data())})})}(jQuery),function(e){"use strict";function t(t){var n,r=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(r)}function n(t){return this.each(function(){var n=e(this),i=n.data("bs.collapse"),a=e.extend({},r.DEFAULTS,n.data(),"object"==typeof t&&t);!i&&a.toggle&&/show|hide/.test(t)&&(a.toggle=!1),i||n.data("bs.collapse",i=new r(this,a)),"string"==typeof t&&i[t]()})}var r=function(t,n){this.$element=e(t),this.options=e.extend({},r.DEFAULTS,n),this.$trigger=e('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};r.VERSION="3.3.7",r.TRANSITION_DURATION=350,r.DEFAULTS={toggle:!0},r.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},r.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(t=i.data("bs.collapse"))&&t.transitioning)){var a=e.Event("show.bs.collapse");if(this.$element.trigger(a),!a.isDefaultPrevented()){i&&i.length&&(n.call(i,"hide"),t||i.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var o=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return o.call(this);var u=e.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",e.proxy(o,this)).emulateTransitionEnd(r.TRANSITION_DURATION)[s](this.$element[0][u])}}}},r.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=e.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!e.support.transition)return i.call(this);this.$element[n](0).one("bsTransitionEnd",e.proxy(i,this)).emulateTransitionEnd(r.TRANSITION_DURATION)}}},r.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},r.prototype.getParent=function(){return e(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy(function(n,r){var i=e(r);this.addAriaAndCollapsedClass(t(i),i)},this)).end()},r.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var i=e.fn.collapse;e.fn.collapse=n,e.fn.collapse.Constructor=r,e.fn.collapse.noConflict=function(){return e.fn.collapse=i,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(r){var i=e(this);i.attr("data-target")||r.preventDefault();var a=t(i),s=a.data("bs.collapse"),o=s?"toggle":i.data();n.call(a,o)})}(jQuery),function(e){"use strict";function t(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r=n&&e(n);return r&&r.length?r:t.parent()}function n(n){n&&3===n.which||(e(i).remove(),e(a).each(function(){var r=e(this),i=t(r),a={relatedTarget:this};i.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&e.contains(i[0],n.target)||(i.trigger(n=e.Event("hide.bs.dropdown",a)),n.isDefaultPrevented()||(r.attr("aria-expanded","false"),i.removeClass("open").trigger(e.Event("hidden.bs.dropdown",a)))))}))}function r(t){return this.each(function(){var n=e(this),r=n.data("bs.dropdown");r||n.data("bs.dropdown",r=new s(this)),"string"==typeof t&&r[t].call(n)})}var i=".dropdown-backdrop",a='[data-toggle="dropdown"]',s=function(t){e(t).on("click.bs.dropdown",this.toggle)};s.VERSION="3.3.7",s.prototype.toggle=function(r){var i=e(this);if(!i.is(".disabled, :disabled")){var a=t(i),s=a.hasClass("open");if(n(),!s){"ontouchstart"in document.documentElement&&!a.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",n);var o={relatedTarget:this};if(a.trigger(r=e.Event("show.bs.dropdown",o)),r.isDefaultPrevented())return;i.trigger("focus").attr("aria-expanded","true"),a.toggleClass("open").trigger(e.Event("shown.bs.dropdown",o))}return!1}},s.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var r=e(this);if(n.preventDefault(),n.stopPropagation(),!r.is(".disabled, :disabled")){var i=t(r),s=i.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&i.find(a).trigger("focus"),r.trigger("click");var o=i.find(".dropdown-menu li:not(.disabled):visible a");if(o.length){var u=o.index(n.target);38==n.which&&u>0&&u--,40==n.which&&u<o.length-1&&u++,~u||(u=0),o.eq(u).trigger("focus")}}}};var o=e.fn.dropdown;e.fn.dropdown=r,e.fn.dropdown.Constructor=s,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=o,this},e(document).on("click.bs.dropdown.data-api",n).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",a,s.prototype.toggle).on("keydown.bs.dropdown.data-api",a,s.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",s.prototype.keydown)}(jQuery),function(e){"use strict";function t(t,r){return this.each(function(){var i=e(this),a=i.data("bs.modal"),s=e.extend({},n.DEFAULTS,i.data(),"object"==typeof t&&t);a||i.data("bs.modal",a=new n(this,s)),"string"==typeof t?a[t](r):s.show&&a.show(r)})}var n=function(t,n){this.options=n,this.$body=e(document.body),this.$element=e(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,e.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(e){return this.isShown?this.hide():this.show(e)},n.prototype.show=function(t){var r=this,i=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(i),this.isShown||i.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){r.$element.one("mouseup.dismiss.bs.modal",function(t){e(t.target).is(r.$element)&&(r.ignoreBackdropClick=!0)})}),this.backdrop(function(){var i=e.support.transition&&r.$element.hasClass("fade");r.$element.parent().length||r.$element.appendTo(r.$body),r.$element.show().scrollTop(0),r.adjustDialog(),i&&r.$element[0].offsetWidth,r.$element.addClass("in"),r.enforceFocus();var a=e.Event("shown.bs.modal",{relatedTarget:t});i?r.$dialog.one("bsTransitionEnd",function(){r.$element.trigger("focus").trigger(a)}).emulateTransitionEnd(n.TRANSITION_DURATION):r.$element.trigger("focus").trigger(a)}))},n.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),e(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),e.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",e.proxy(this.hideModal,this)).emulateTransitionEnd(n.TRANSITION_DURATION):this.hideModal())},n.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){document===e.target||this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",e.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},n.prototype.resize=function(){this.isShown?e(window).on("resize.bs.modal",e.proxy(this.handleUpdate,this)):e(window).off("resize.bs.modal")},n.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.$body.removeClass("modal-open"),e.resetAdjustments(),e.resetScrollbar(),e.$element.trigger("hidden.bs.modal")})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(t){var r=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var a=e.support.transition&&i;if(this.$backdrop=e(document.createElement("div")).addClass("modal-backdrop "+i).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",e.proxy(function(e){if(this.ignoreBackdropClick)return void(this.ignoreBackdropClick=!1);e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),a&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;a?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){r.removeBackdrop(),t&&t()};e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):s()}else t&&t()},n.prototype.handleUpdate=function(){this.adjustDialog()},n.prototype.adjustDialog=function(){var e=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth<e,this.scrollbarWidth=this.measureScrollbar()},n.prototype.setScrollbar=function(){var e=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",e+this.scrollbarWidth)},n.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},n.prototype.measureScrollbar=function(){var e=document.createElement("div");e.className="modal-scrollbar-measure",this.$body.append(e);var t=e.offsetWidth-e.clientWidth;return this.$body[0].removeChild(e),t};var r=e.fn.modal;e.fn.modal=t,e.fn.modal.Constructor=n,e.fn.modal.noConflict=function(){return e.fn.modal=r,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(n){var r=e(this),i=r.attr("href"),a=e(r.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),s=a.data("bs.modal")?"toggle":e.extend({remote:!/#/.test(i)&&i},a.data(),r.data());r.is("a")&&n.preventDefault(),a.one("show.bs.modal",function(e){e.isDefaultPrevented()||a.one("hidden.bs.modal",function(){r.is(":visible")&&r.trigger("focus")})}),t.call(a,s,this)})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var r=e(this),i=r.data("bs.tooltip"),a="object"==typeof t&&t;!i&&/destroy|hide/.test(t)||(i||r.data("bs.tooltip",i=new n(this,a)),"string"==typeof t&&i[t]())})}var n=function(e,t){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",e,t)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(t,n,r){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&e(e.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var i=this.options.trigger.split(" "),a=i.length;a--;){var s=i[a];if("click"==s)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=s){var o="hover"==s?"mouseenter":"focusin",u="hover"==s?"mouseleave":"focusout";this.$element.on(o+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},n.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,r){n[e]!=r&&(t[e]=r)}),t},n.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusin"==t.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},n.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusout"==t.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)}},n.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var r=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!r)return;var i=this,a=this.tip(),s=this.getUID(this.type);this.setContent(),a.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&a.addClass("fade");var o="function"==typeof this.options.placement?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,u=/\s?auto?\s?/i,d=u.test(o);d&&(o=o.replace(u,"")||"top"),a.detach().css({top:0,left:0,display:"block"}).addClass(o).data("bs."+this.type,this),this.options.container?a.appendTo(this.options.container):a.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),c=a[0].offsetWidth,_=a[0].offsetHeight;if(d){var f=o,h=this.getPosition(this.$viewport);o="bottom"==o&&l.bottom+_>h.bottom?"top":"top"==o&&l.top-_<h.top?"bottom":"right"==o&&l.right+c>h.width?"left":"left"==o&&l.left-c<h.left?"right":o,a.removeClass(f).addClass(o)}var m=this.getCalculatedOffset(o,l,c,_);this.applyPlacement(m,o);var p=function(){var e=i.hoverState;i.$element.trigger("shown.bs."+i.type),i.hoverState=null,"out"==e&&i.leave(i)};e.support.transition&&this.$tip.hasClass("fade")?a.one("bsTransitionEnd",p).emulateTransitionEnd(n.TRANSITION_DURATION):p()}},n.prototype.applyPlacement=function(t,n){var r=this.tip(),i=r[0].offsetWidth,a=r[0].offsetHeight,s=parseInt(r.css("margin-top"),10),o=parseInt(r.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(o)&&(o=0),t.top+=s,t.left+=o,e.offset.setOffset(r[0],e.extend({using:function(e){r.css({top:Math.round(e.top),left:Math.round(e.left)})}},t),0),r.addClass("in");var u=r[0].offsetWidth,d=r[0].offsetHeight;"top"==n&&d!=a&&(t.top=t.top+a-d);var l=this.getViewportAdjustedDelta(n,t,u,d);l.left?t.left+=l.left:t.top+=l.top;var c=/top|bottom/.test(n),_=c?2*l.left-i+u:2*l.top-a+d,f=c?"offsetWidth":"offsetHeight";r.offset(t),this.replaceArrow(_,r[0][f],c)},n.prototype.replaceArrow=function(e,t,n){this.arrow().css(n?"left":"top",50*(1-e/t)+"%").css(n?"top":"left","")},n.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},n.prototype.hide=function(t){function r(){"in"!=i.hoverState&&a.detach(),i.$element&&i.$element.removeAttr("aria-describedby").trigger("hidden.bs."+i.type),t&&t()}var i=this,a=e(this.$tip),s=e.Event("hide.bs."+this.type);if(this.$element.trigger(s),!s.isDefaultPrevented())return a.removeClass("in"),e.support.transition&&a.hasClass("fade")?a.one("bsTransitionEnd",r).emulateTransitionEnd(n.TRANSITION_DURATION):r(),this.hoverState=null,this},n.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},n.prototype.hasContent=function(){return this.getTitle()},n.prototype.getPosition=function(t){t=t||this.$element;var n=t[0],r="BODY"==n.tagName,i=n.getBoundingClientRect();null==i.width&&(i=e.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var a=window.SVGElement&&n instanceof window.SVGElement,s=r?{top:0,left:0}:a?null:t.offset(),o={scroll:r?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},u=r?{width:e(window).width(),height:e(window).height()}:null;return e.extend({},i,o,u,s)},n.prototype.getCalculatedOffset=function(e,t,n,r){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-r,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-r/2,left:t.left-n}:{top:t.top+t.height/2-r/2,left:t.left+t.width}},n.prototype.getViewportAdjustedDelta=function(e,t,n,r){var i={top:0,left:0};if(!this.$viewport)return i;var a=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(e)){var o=t.top-a-s.scroll,u=t.top+a-s.scroll+r;o<s.top?i.top=s.top-o:u>s.top+s.height&&(i.top=s.top+s.height-u)}else{var d=t.left-a,l=t.left+a+n;d<s.left?i.left=s.left-d:l>s.right&&(i.left=s.left+s.width-l)}return i},n.prototype.getTitle=function(){var e=this.$element,t=this.options;return e.attr("data-original-title")||("function"==typeof t.title?t.title.call(e[0]):t.title)},n.prototype.getUID=function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},n.prototype.tip=function(){if(!this.$tip&&(this.$tip=e(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(t){var n=this;t&&((n=e(t.currentTarget).data("bs."+this.type))||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),t?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide(function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null})};var r=e.fn.tooltip;e.fn.tooltip=t,e.fn.tooltip.Constructor=n,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=r,this}}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var r=e(this),i=r.data("bs.popover"),a="object"==typeof t&&t;!i&&/destroy|hide/.test(t)||(i||r.data("bs.popover",i=new n(this,a)),"string"==typeof t&&i[t]())})}var n=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.7",n.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),n.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var r=e.fn.popover;e.fn.popover=t,e.fn.popover.Constructor=n,e.fn.popover.noConflict=function(){return e.fn.popover=r,this}}(jQuery),function(e){"use strict";function t(n,r){this.$body=e(document.body),this.$scrollElement=e(e(n).is(document.body)?window:n),this.options=e.extend({},t.DEFAULTS,r),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var r=e(this),i=r.data("bs.scrollspy"),a="object"==typeof n&&n;i||r.data("bs.scrollspy",i=new t(this,a)),"string"==typeof n&&i[n]()})}t.VERSION="3.3.7",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,n="offset",r=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(n="position",r=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=e(this),i=t.data("target")||t.attr("href"),a=/^#./.test(i)&&e(i);return a&&a.length&&a.is(":visible")&&[[a[n]().top+r,i]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},t.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),r=this.options.offset+n-this.$scrollElement.height(),i=this.offsets,a=this.targets,s=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),t>=r)return s!=(e=a[a.length-1])&&this.activate(e);if(s&&t<i[0])return this.activeTarget=null,this.clear();for(e=i.length;e--;)s!=a[e]&&t>=i[e]&&(void 0===i[e+1]||t<i[e+1])&&this.activate(a[e])},t.prototype.activate=function(t){this.activeTarget=t,this.clear();var n=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',r=e(n).parents("li").addClass("active");r.parent(".dropdown-menu").length&&(r=r.closest("li.dropdown").addClass("active")),r.trigger("activate.bs.scrollspy")},t.prototype.clear=function(){e(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var r=e.fn.scrollspy;e.fn.scrollspy=n,e.fn.scrollspy.Constructor=t,e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=r,this},e(window).on("load.bs.scrollspy.data-api",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);n.call(t,t.data())})})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new n(this)),"string"==typeof t&&i[t]()})}var n=function(t){this.element=e(t)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.data("target");if(r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var i=n.find(".active:last a"),a=e.Event("hide.bs.tab",{relatedTarget:t[0]}),s=e.Event("show.bs.tab",{relatedTarget:i[0]});if(i.trigger(a),t.trigger(s),!s.isDefaultPrevented()&&!a.isDefaultPrevented()){var o=e(r);this.activate(t.closest("li"),n),this.activate(o,o.parent(),function(){i.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:i[0]})})}}},n.prototype.activate=function(t,r,i){function a(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),o?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}var s=r.find("> .active"),o=i&&e.support.transition&&(s.length&&s.hasClass("fade")||!!r.find("> .fade").length);s.length&&o?s.one("bsTransitionEnd",a).emulateTransitionEnd(n.TRANSITION_DURATION):a(),s.removeClass("in")};var r=e.fn.tab;e.fn.tab=t,e.fn.tab.Constructor=n,e.fn.tab.noConflict=function(){return e.fn.tab=r,this};var i=function(n){n.preventDefault(),t.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var r=e(this),i=r.data("bs.affix"),a="object"==typeof t&&t;i||r.data("bs.affix",i=new n(this,a)),"string"==typeof t&&i[t]()})}var n=function(t,r){this.options=e.extend({},n.DEFAULTS,r),this.$target=e(this.options.target).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.7",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(e,t,n,r){var i=this.$target.scrollTop(),a=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return i<n&&"top";if("bottom"==this.affixed)return null!=n?!(i+this.unpin<=a.top)&&"bottom":!(i+s<=e-r)&&"bottom";var o=null==this.affixed,u=o?i:a.top,d=o?s:t;return null!=n&&i<=n?"top":null!=r&&u+d>=e-r&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var e=this.$target.scrollTop(),t=this.$element.offset();return this.pinnedOffset=t.top-e},n.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),r=this.options.offset,i=r.top,a=r.bottom,s=Math.max(e(document).height(),e(document.body).height());"object"!=typeof r&&(a=i=r),"function"==typeof i&&(i=r.top(this.$element)),"function"==typeof a&&(a=r.bottom(this.$element));var o=this.getState(s,t,i,a);if(this.affixed!=o){null!=this.unpin&&this.$element.css("top","");var u="affix"+(o?"-"+o:""),d=e.Event(u+".bs.affix");if(this.$element.trigger(d),d.isDefaultPrevented())return;this.affixed=o,this.unpin="bottom"==o?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(u).trigger(u.replace("affix","affixed")+".bs.affix")}"bottom"==o&&this.$element.offset({top:s-t-a})}};var r=e.fn.affix;e.fn.affix=t,e.fn.affix.Constructor=n,e.fn.affix.noConflict=function(){return e.fn.affix=r,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var n=e(this),r=n.data();r.offset=r.offset||{},null!=r.offsetBottom&&(r.offset.bottom=r.offsetBottom),null!=r.offsetTop&&(r.offset.top=r.offsetTop),t.call(n,r)})})}(jQuery)},function(e,t,n){e.exports=n(132)},function(e,t,n){"use strict";function r(e){var t=new s(e),n=a(s.prototype.request,t);return i.extend(n,s.prototype,t),i.extend(n,t),n}var i=n(1),a=n(5),s=n(134),o=n(2),u=r(o);u.Axios=s,u.create=function(e){return r(i.merge(o,e))},u.Cancel=n(9),u.CancelToken=n(149),u.isCancel=n(8),u.all=function(e){return Promise.all(e)},u.spread=n(150),e.exports=u,e.exports.default=u},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function r(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}e.exports=function(e){return null!=e&&(n(e)||r(e)||!!e._isBuffer)}},function(e,t,n){"use strict";function r(e){this.defaults=e,this.interceptors={request:new s,response:new s}}var i=n(2),a=n(1),s=n(144),o=n(145),u=n(147),d=n(148);r.prototype.request=function(e){"string"==typeof e&&(e=a.merge({url:arguments[0]},arguments[1])),e=a.merge(i,this.defaults,{method:"get"},e),e.method=e.method.toLowerCase(),e.baseURL&&!u(e.url)&&(e.url=d(e.baseURL,e.url));var t=[o,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},a.forEach(["delete","get","head","options"],function(e){r.prototype[e]=function(t,n){return this.request(a.merge(n||{},{method:e,url:t}))}}),a.forEach(["post","put","patch"],function(e){r.prototype[e]=function(t,n,r){return this.request(a.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=r},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function a(e){if(c===clearTimeout)return clearTimeout(e);if((c===r||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(e);try{return c(e)}catch(t){try{return c.call(null,e)}catch(t){return c.call(this,e)}}}function s(){m&&f&&(m=!1,f.length?h=f.concat(h):p=-1,h.length&&o())}function o(){if(!m){var e=i(s);m=!0;for(var t=h.length;t;){for(f=h,h=[];++p<t;)f&&f[p].run();p=-1,t=h.length}f=null,m=!1,a(e)}}function u(e,t){this.fun=e,this.array=t}function d(){}var l,c,_=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{c="function"==typeof clearTimeout?clearTimeout:r}catch(e){c=r}}();var f,h=[],m=!1,p=-1;_.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new u(e,t)),1!==h.length||m||i(o)},u.prototype.run=function(){this.fun.apply(null,this.array)},_.title="browser",_.browser=!0,_.env={},_.argv=[],_.version="",_.versions={},_.on=d,_.addListener=d,_.once=d,_.off=d,_.removeListener=d,_.removeAllListeners=d,_.emit=d,_.prependListener=d,_.prependOnceListener=d,_.listeners=function(e){return[]},_.binding=function(e){throw new Error("process.binding is not supported")},_.cwd=function(){return"/"},_.chdir=function(e){throw new Error("process.chdir is not supported")},_.umask=function(){return 0}},function(e,t,n){"use strict";var r=n(1);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(7);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e}},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var i=n(1);e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(i.isURLSearchParams(t))a=t.toString();else{var s=[];i.forEach(t,function(e,t){null!==e&&void 0!==e&&(i.isArray(e)&&(t+="[]"),i.isArray(e)||(e=[e]),i.forEach(e,function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),s.push(r(t)+"="+r(e))}))}),a=s.join("&")}return a&&(e+=(-1===e.indexOf("?")?"?":"&")+a),e}},function(e,t,n){"use strict";var r=n(1);e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),function(e){i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t&&(a[t]=a[t]?a[t]+", "+n:n)}),a):a}},function(e,t,n){"use strict";var r=n(1);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(i.setAttribute("href",t),t=i.href),i.setAttribute("href",t),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");return t=e(window.location.href),function(n){var i=r.isString(n)?e(n):n;return i.protocol===t.protocol&&i.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";function r(){this.message="String contains an invalid character"}function i(e){for(var t,n,i=String(e),s="",o=0,u=a;i.charAt(0|o)||(u="=",o%1);s+=u.charAt(63&t>>8-o%1*8)){if((n=i.charCodeAt(o+=.75))>255)throw new r;t=t<<8|n}return s}var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",e.exports=i},function(e,t,n){"use strict";var r=n(1);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,i,a,s){var o=[];o.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),r.isString(i)&&o.push("path="+i),r.isString(a)&&o.push("domain="+a),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";function r(){this.handlers=[]}var i=n(1);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){i.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var i=n(1),a=n(146),s=n(8),o=n(2);e.exports=function(e){return r(e),e.headers=e.headers||{},e.data=a(e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),i.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||o.adapter)(e).then(function(t){return r(e),t.data=a(t.data,t.headers,e.transformResponse),t},function(t){return s(t)||(r(e),t&&t.response&&(t.response.data=a(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(1);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new i(e),t(n.reason))})}var i=n(9);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e;return{token:new r(function(t){e=t}),cancel:e}},e.exports=r},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){function r(e){return n(i(e))}function i(e){var t=a[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}var a={"./af":10,"./af.js":10,"./ar":11,"./ar-dz":12,"./ar-dz.js":12,"./ar-kw":13,"./ar-kw.js":13,"./ar-ly":14,"./ar-ly.js":14,"./ar-ma":15,"./ar-ma.js":15,"./ar-sa":16,"./ar-sa.js":16,"./ar-tn":17,"./ar-tn.js":17,"./ar.js":11,"./az":18,"./az.js":18,"./be":19,"./be.js":19,"./bg":20,"./bg.js":20,"./bn":21,"./bn.js":21,"./bo":22,"./bo.js":22,"./br":23,"./br.js":23,"./bs":24,"./bs.js":24,"./ca":25,"./ca.js":25,"./cs":26,"./cs.js":26,"./cv":27,"./cv.js":27,"./cy":28,"./cy.js":28,"./da":29,"./da.js":29,"./de":30,"./de-at":31,"./de-at.js":31,"./de-ch":32,"./de-ch.js":32,"./de.js":30,"./dv":33,"./dv.js":33,"./el":34,"./el.js":34,"./en-au":35,"./en-au.js":35,"./en-ca":36,"./en-ca.js":36,"./en-gb":37,"./en-gb.js":37,"./en-ie":38,"./en-ie.js":38,"./en-nz":39,"./en-nz.js":39,"./eo":40,"./eo.js":40,"./es":41,"./es-do":42,"./es-do.js":42,"./es.js":41,"./et":43,"./et.js":43,"./eu":44,"./eu.js":44,"./fa":45,"./fa.js":45,"./fi":46,"./fi.js":46,"./fo":47,"./fo.js":47,"./fr":48,"./fr-ca":49,"./fr-ca.js":49,"./fr-ch":50,"./fr-ch.js":50,"./fr.js":48,"./fy":51,"./fy.js":51,"./gd":52,"./gd.js":52,"./gl":53,"./gl.js":53,"./gom-latn":54,"./gom-latn.js":54,"./he":55,"./he.js":55,"./hi":56,"./hi.js":56,"./hr":57,"./hr.js":57,"./hu":58,"./hu.js":58,"./hy-am":59,"./hy-am.js":59,"./id":60,"./id.js":60,"./is":61,"./is.js":61,"./it":62,"./it.js":62,"./ja":63,"./ja.js":63,"./jv":64,"./jv.js":64,"./ka":65,"./ka.js":65,"./kk":66,"./kk.js":66,"./km":67,"./km.js":67,"./kn":68,"./kn.js":68,"./ko":69,"./ko.js":69,"./ky":70,"./ky.js":70,"./lb":71,"./lb.js":71,"./lo":72,"./lo.js":72,"./lt":73,"./lt.js":73,"./lv":74,"./lv.js":74,"./me":75,"./me.js":75,"./mi":76,"./mi.js":76,"./mk":77,"./mk.js":77,"./ml":78,"./ml.js":78,"./mr":79,"./mr.js":79,"./ms":80,"./ms-my":81,"./ms-my.js":81,"./ms.js":80,"./my":82,"./my.js":82,"./nb":83,"./nb.js":83,"./ne":84,"./ne.js":84,"./nl":85,"./nl-be":86,"./nl-be.js":86,"./nl.js":85,"./nn":87,"./nn.js":87,"./pa-in":88,"./pa-in.js":88,"./pl":89,"./pl.js":89,"./pt":90,"./pt-br":91,"./pt-br.js":91,"./pt.js":90,"./ro":92,"./ro.js":92,"./ru":93,"./ru.js":93,"./sd":94,"./sd.js":94,"./se":95,"./se.js":95,"./si":96,"./si.js":96,"./sk":97,"./sk.js":97,"./sl":98,"./sl.js":98,"./sq":99,"./sq.js":99,"./sr":100,"./sr-cyrl":101,"./sr-cyrl.js":101,"./sr.js":100,"./ss":102,"./ss.js":102,"./sv":103,"./sv.js":103,"./sw":104,"./sw.js":104,"./ta":105,"./ta.js":105,"./te":106,"./te.js":106,"./tet":107,"./tet.js":107,"./th":108,"./th.js":108,"./tl-ph":109,"./tl-ph.js":109,"./tlh":110,"./tlh.js":110,"./tr":111,"./tr.js":111,"./tzl":112,"./tzl.js":112,"./tzm":113,"./tzm-latn":114,"./tzm-latn.js":114,"./tzm.js":113,"./uk":115,"./uk.js":115,"./ur":116,"./ur.js":116,"./uz":117,"./uz-latn":118,"./uz-latn.js":118,"./uz.js":117,"./vi":119,"./vi.js":119,"./x-pseudo":120,"./x-pseudo.js":120,"./yo":121,"./yo.js":121,"./zh-cn":122,"./zh-cn.js":122,"./zh-hk":123,"./zh-hk.js":123,"./zh-tw":124,"./zh-tw.js":124};r.keys=function(){return Object.keys(a)},r.resolve=i,e.exports=r,r.id=151},function(e,t){}]);
import pytest import enum from eth.vm.forks.frontier import FrontierVM from eth.chains.tester import ( _generate_vm_configuration, ) class Forks(enum.Enum): Frontier = 0 Homestead = 1 TangerineWhistle = 2 SpuriousDragon = 3 Byzantium = 4 Custom = 5 class CustomFrontierVM(FrontierVM): pass @pytest.mark.parametrize( "args,kwargs,expected", ( ( tuple(), {}, ((0, Forks.Byzantium),), ), ( ((0, 'tangerine-whistle'), (1, 'spurious-dragon')), {}, ((0, Forks.TangerineWhistle), (1, Forks.SpuriousDragon)), ), ( ((1, 'tangerine-whistle'), (2, 'spurious-dragon')), {}, ((0, Forks.Frontier), (1, Forks.TangerineWhistle), (2, Forks.SpuriousDragon)), ), ( ((0, CustomFrontierVM), (1, 'spurious-dragon')), {}, ((0, Forks.Custom), (1, Forks.SpuriousDragon)), ), ( ((0, 'homestead'), (1, 'tangerine-whistle'), (2, 'spurious-dragon')), {}, ((0, Forks.Homestead), (1, Forks.TangerineWhistle), (2, Forks.SpuriousDragon)), ), ( ((0, 'frontier'), (1, 'homestead'), (2, 'tangerine-whistle'), (3, 'spurious-dragon')), {}, ( (0, Forks.Frontier), (1, Forks.Homestead), (2, Forks.TangerineWhistle), (3, Forks.SpuriousDragon), ), ), ( ((0, 'frontier'), (1, 'homestead'), (3, 'spurious-dragon')), {}, ( (0, Forks.Frontier), (1, Forks.Homestead), (3, Forks.SpuriousDragon), ), ), ( ((0, 'homestead'), (1, 'tangerine-whistle')), {}, ((0, Forks.Homestead), (1, Forks.TangerineWhistle)), ), ( ((0, 'frontier'), (1, 'homestead')), {}, ((0, Forks.Frontier), (1, Forks.Homestead)), ), ( ((1, 'homestead'),), {}, ((0, Forks.Frontier), (1, Forks.Homestead)), ), ( ((0, 'frontier'), (1, 'homestead')), {'dao_start_block': 2}, ((0, Forks.Frontier), (1, Forks.Homestead)), ), ( ((0, 'frontier'), (1, 'homestead')), {'dao_start_block': False}, ((0, Forks.Frontier), (1, Forks.Homestead)), ), ( ((0, 'frontier'), (1, 'homestead'), (2, 'tangerine-whistle')), {}, ((0, Forks.Frontier), (1, Forks.Homestead), (2, Forks.TangerineWhistle)), ), ( ((0, 'frontier'), (1, 'homestead'), (2, 'tangerine-whistle'), (3, 'byzantium')), {}, ( (0, Forks.Frontier), (1, Forks.Homestead), (2, Forks.TangerineWhistle), (3, Forks.Byzantium), ), ), ), ) def test_generate_vm_configuration(args, kwargs, expected): actual = _generate_vm_configuration(*args, **kwargs) assert len(actual) == len(expected) for left, right in zip(actual, expected): left_block, left_vm = left right_block, right_vm = right assert left_block == right_block if right_vm == Forks.Frontier: assert 'Frontier' in left_vm.__name__ elif right_vm == Forks.Homestead: assert 'Homestead' in left_vm.__name__ dao_start_block = kwargs.get('dao_start_block') if dao_start_block is False: assert left_vm.support_dao_fork is False elif dao_start_block is None: assert left_vm.support_dao_fork is True assert left_vm.get_dao_fork_block_number() == right_block else: assert left_vm.support_dao_fork is True assert left_vm.get_dao_fork_block_number() == dao_start_block elif right_vm == Forks.TangerineWhistle: assert 'TangerineWhistle' in left_vm.__name__ elif right_vm == Forks.SpuriousDragon: assert 'SpuriousDragon' in left_vm.__name__ elif right_vm == Forks.Byzantium: assert 'Byzantium' in left_vm.__name__ elif right_vm == Forks.Custom: assert 'CustomFrontier' in left_vm.__name__ else: assert False, "Invariant"
// const state = { // selectContent: 'xxx', // postsBySelected: { // 'xxx': { // isFetching: false, // isExpire: false, // items: [], // lastUpdate: '' // } // } // }; import { combineReducers } from 'redux'; import { REQUEST_POST, RECEIEVE_POST, REFRESH, SELECT_CONTENT } from '../actions/index.js'; function selectedContent(state = 'nodejs', action) { if(action.type === SELECT_CONTENT) { return action.content; } else { return state; } } function posts(state = { isFetching: false, isExpire: false, items: [] }, action) { if(action.type === REFRESH) { return Object.assign({}, state, { isExpire: true }); } else if (action.type === REQUEST_POST) { return Object.assign({}, state, { isFetching: true, isExpire: false }); } else if (action.type === RECEIEVE_POST) { return Object.assign({}, state, { isFetching: false, isExpire: false, lastUpdate: action.receiveAt, items: action.posts }); } } function postsBySelected(state = {}, action) { switch (action.type) { case REQUEST_POST: case REFRESH: case RECEIEVE_POST: return Object.assign({}, state, { [action.content]: posts(state[action.content], action) }); default: return state; } } const rootReducer = combineReducers({ selectedContent, postsBySelected }); export default rootReducer;
#!/usr/bin/python3 # -*- coding: utf-8 -*- # This is a part of CMSeeK, check the LICENSE file for more information # Copyright (c) 2018 - 2020 Tuhinshubhra # FUDforum version detection # Rev 1 import cmseekdb.basic as cmseek import re def start(source): regex = re.findall(r'Powered by: FUDforum (\d.*?).<', source) if regex != []: if regex[0] != '' and regex[0] != ' ': version = regex[0] cmseek.success('FUDforum version ' + cmseek.bold + cmseek.fgreen + version + cmseek.cln + ' detected') return version cmseek.error('Version detection failed!') return '0'
import numpy as np class MyTuple: ''' The basic object representing the input variable 'w' represents the core of our AD calculator. An instance of this class is a tuple containining one function/derivative evaluation of the variable 'w'. Because it is meant to represent the simple variable 'w' the derivative 'der' is preset to 1. The value 'val' can be set to 0 by default. ''' def __init__(self,**kwargs): # variables for the value (val) and derivative (der) of our input function self.val = 0 self.der = 1 # re-assign these default values if 'val' in kwargs: self.val = kwargs['val'] if 'der' in kwargs: self.der = kwargs['der'] # our implementation of the sinusoid rule from Table 1 def sin(a): # Create output evaluation and derivative object b = MyTuple() # Produce new function value b.val = np.sin(a.val) # Produce new derivative value - we need to use the chain rule here! b.der = np.cos(a.val)*a.der # Return updated object return b # create instance of our function to differentiate - notice this uses our homemade sine function not numpy's g = lambda w: sin(w) # initialize our AutoDiff object at each point a1 = MyTuple(val = 0); a2 = MyTuple(val = 0.5) # evaluate result1 = g(a1); result2 = g(a2) # print results #print ('function value at ' + str(0) + ' = ' + str(result1.val)) #print ('derivaive value at ' + str(0) + ' = ' + str(result1.der)) #print ('function value at ' + str(0.5) + ' = ' + str(result2.val)) #print ('derivaive value at ' + str(0.5) + ' = ' + str(result2.der)) print(sin(MyTuple(val = 5)).der)
const STATE_INITIAL = 0 export default function (state = STATE_INITIAL, action) { let state_current switch (action.type) { case 'SUM': state_current = action.payload[0] + action.payload[1] break; case 'SUBTRACT': state_current = action.payload[0] - action.payload[1] break; case 'MULTI': state_current = action.payload[0] * action.payload[1] break; case 'CLEAR_RESULT': state_current = STATE_INITIAL break; default: state_current = state break; } return state_current }
const express = require('express'); const router = express.Router(); const path = require('path'); router.get('/*', async (req, res) => { res.sendFile(path.join(__dirname+'/../distAngular/dist/index.html')); }); module.exports = router;
import React from 'react'; import firebase from 'firebase'; import { firebaseAuth, users } from '../../../config/firebaseCredentials' import LinkButton from '../helperElements/LinkButton' import { isStringAcceptable } from '../profilePages/profileHelpers' export default class MessageInputField extends React.Component { constructor(props) { super(props); this.state = { inputValue : "" }; this.pushMessageToDatabase = this.pushMessageToDatabase.bind(this) this.checkSubmit = this.checkSubmit.bind(this) this.setInputValue = this.setInputValue.bind(this) } componentDidMount() { } setInputValue(e) {this.setState({inputValue : e.target.value})} checkSubmit(e) { // this checks to see if the user pushed the enter key, also // checking if submit is valid if (e.key === 'Enter' && isStringAcceptable(this.state.inputValue)) { this.pushMessageToDatabase(this.state.inputValue, () => {this.setState({inputValue : ""})} ) } } pushMessageToDatabase(messageText, cb) { let user = firebaseAuth().currentUser let messageObj = {}; messageObj['text'] = messageText; messageObj['createdByUid'] = user.uid; // lookup username later messageObj['createdAt'] = Date.now(); let getUsernameDbPath = `users/${user.uid}/profileInfo/username` firebase.database().ref(getUsernameDbPath).on('value', username => { messageObj['createdByUsername'] = username.val() let userDbPath = `messages/${user.uid}/${this.props.chatRoomName}/users` firebase.database().ref(userDbPath).on('value', (snapshot) => { // push the data to all of the chatMembers. let chatMembers = Object.values(snapshot.val()) chatMembers.forEach(uid => { let dbPath = `messages/${uid}/${this.props.chatRoomName}/history` firebase.database().ref(dbPath).push().set(messageObj) }) cb() // this needs to be refactored with promises. }) }) } render() { return ( <div className="chat-input-field"> {/*=messageInputField= */} <input autoComplete="off" className="form-control" name="location" type="text" placeholder="Enter your message" value={this.state.inputValue} onChange={this.setInputValue} onKeyUp={this.checkSubmit} /> </div> ) } }
# -*- coding: utf-8 -*- import tokenize from typing import Iterable, Tuple import pkg_resources from eradicate import Eradicator from flake8.options.manager import OptionManager #: This is a name that we use to install this library: pkg_name = 'flake8-eradicate' #: We store the version number inside the `pyproject.toml`: pkg_version = pkg_resources.get_distribution(pkg_name).version STDIN = 'stdin' class Checker(object): """Flake8 plugin to find commented out code.""" name = pkg_name version = pkg_version _error_template = 'E800 Found commented out code' options = None def __init__(self, physical_line, tokens) -> None: """ Creates new checker instance. When performance will be an issue - we can refactor it. """ self._physical_line = physical_line self._tokens = tokens self._options = { 'aggressive': self.options.eradicate_aggressive, # type: ignore } self._eradicator = Eradicator() whitelist = self.options.eradicate_whitelist # type: ignore whitelist_ext = self.options.eradicate_whitelist_extend # type: ignore if whitelist_ext: self._eradicator.update_whitelist( whitelist_ext.split('#'), True, ) elif whitelist: self._eradicator.update_whitelist( whitelist.split('#'), False, ) @classmethod def add_options(cls, parser: OptionManager) -> None: """ ``flake8`` api method to register new plugin options. See :class:`.Configuration` docs for detailed options reference. Arguments: parser: ``flake8`` option parser instance. """ parser.add_option( '--eradicate-aggressive', default=False, help=( 'Enables aggressive mode for eradicate; ' 'this may result in false positives' ), action='store_true', parse_from_config=True, ) parser.add_option( '--eradicate-whitelist', default=False, help=( 'String of "#" separated comment beginnings to whitelist ' 'for eradicate. ' 'Single parts are interpreted as regex. ' 'OVERWRITING the default whitelist: {0}' ).format(Eradicator.DEFAULT_WHITELIST), action='store', parse_from_config=True, ) parser.add_option( '--eradicate-whitelist-extend', default=False, help=( 'String of "#" separated comment beginnings to whitelist ' 'for eradicate. ' 'Single parts are interpreted as regex. ' 'Overwrites --eradicate-whitelist. ' 'EXTENDING the default whitelist: {0} ' ).format(Eradicator.DEFAULT_WHITELIST), action='store', parse_from_config=True, ) @classmethod def parse_options(cls, options) -> None: """Parses registered options for providing them to each visitor.""" cls.options = options def __iter__(self) -> Iterable[Tuple[int, str]]: """Runs on each step of flake8.""" if self._contains_commented_out_code(): yield (1, self._error_template) def _contains_commented_out_code(self) -> bool: """ Check if the current physical line contains commented out code. This test relies on eradicate function to remove commented out code from a physical line. Physical lines might appear like commented code although they are part of a multi-line docstring (e.g. a `# noqa: DAR201` comment to suppress flake8 warning about missing returns in the docstring). To prevent this false-positive, the tokens of the physical line are checked for a comment. The eradicate function is only invokes, when the tokens indicate a comment in the physical line. """ comment_in_line = any( token_type == tokenize.COMMENT for token_type, _, _, _, _ in self._tokens ) if comment_in_line: filtered_source = ''.join( self._eradicator.filter_commented_out_code( self._physical_line, self._options['aggressive'], ), ) return self._physical_line != filtered_source return False
import * as R from 'ramda' import _ from 'lodash' import i18n from '@/locales' class WaitStatusJob { constructor (status, data) { this.status = status this.data = data this.timer = null } /** * @description 清除定时器 * @memberof WaitStatusJob */ clearTimer () { if (this.timer) { clearTimeout(this.timer) this.timer = null } } /** * @description 设置定时器进行状态检测 * @memberof WaitStatusJob */ start () { this.clearTimer() this.timer = setTimeout(() => { this.checkStatus() }, this.data.detail.refreshInterval * 1000) } /** * @description 获取新数据,进行状态检测 * @memberof WaitStatusJob */ async checkStatus () { if (!this.data.detail.manager) return const params = this.data.detail.detailParams try { const { data = {} } = await this.data.detail.manager.get({ id: this.data.id, params, }) this.data.data = data const isSteadyStatus = this.data.isSteadyStatus(this.status) if (!isSteadyStatus) { this.start() } else { this.clearTimer() } } catch (error) { if (error.response.status === 404) { this.clearTimer() } else { this.data.setError(error) this.clearTimer() } } } } class DataWrap { constructor (detail, data, idKey) { this.detail = detail this.id = data[idKey] this.data = data this.error = null } /** * @description 开始轮询检测状态 * @param {Object} steadyStatus * @memberof DataWrap */ waitStatus (steadyStatus) { this.wait = new WaitStatusJob(steadyStatus, this) this.wait.start() } /** * @description 清除定时器,供List调用 * @memberof DataWrap */ clearWaitJob () { if (this.wait) { this.wait.clearTimer() } } /** * @description 设置数据错误信息,供WaitStatusJob调用 * @param {Error} error * @memberof DataWrap */ setError (error) { this.error = error } /** * @description 检测状态 * @param {Object} steadyStatus * @returns {Boolean} * @memberof DataWrap */ isSteadyStatus (steadyStatus) { let isSteadyStatus = true for (const key in steadyStatus) { const status = steadyStatus[key] const currentStatus = _.get(this.data, key) if ( (R.is(String, status) && status === currentStatus) || (R.is(Array, status) && status.includes(currentStatus)) || /fail/.test(currentStatus) ) { isSteadyStatus = true } else { isSteadyStatus = false return isSteadyStatus } } return isSteadyStatus } } export default { props: ['params'], data () { return { data: {}, loading: false, loaded: false, // 声明为可监听的对象,方便inject到的error属性是响应式的 requestError: { error: null, }, } }, provide () { return { requestError: this.requestError, } }, computed: { sidePageData () { return this.$store.getters.sidePages[this.windowId] }, detailData () { return this.data.data || {} }, // 是否为list调用 isList () { return !R.isEmpty(this.params.list) && !R.isNil(this.params.list) }, listRowData () { if (!this.isList) return {} return (this.params.list.data[this.id] && this.params.list.data[this.id].data) || {} }, }, destroyed () { this.clearWaitJob() this.manager = null }, created () { const { id, resource, apiVersion = 'v2', getParams, idKey = 'id', // 期望的状态,如果不符合预期,则进行定时更新 steadyStatus = null, // 定时更新间隔时间,默认10s refreshInterval = 10, } = this.params.options this.id = id // vm 实例 this.templateContext = this.params.templateContext this.resource = resource this.getDetailParams = getParams if (R.is(String, resource)) { this.manager = new this.$Manager(resource, apiVersion) } this.apiVersion = apiVersion this.idKey = idKey this.steadyStatus = this.genSteadyStatus(steadyStatus) this.refreshInterval = refreshInterval this.fetchData() if (this.isList) { this.$watch('listRowData', (val, oldVal) => { if (!R.equals(val, oldVal)) { // tips:暂时禁用合并方案 // 场景:如果更新后新的数据对象中某个key已删除,那么使用合并方案的话又会把该key合并进去 // this.data.data = { ...(this.data.data || {}), ...val } this.data.data = { ...val } } }) } }, methods: { cancelSidePage () { if (this.params && R.is(Function, this.params.cancel)) { this.params.cancel() } this.handleTabChange(this.params.windowData._currentTab) this.destroySidePage(this.windowId) }, handleTabChange (val) { this._updateWindow({ id: this.sidePageData.parentWindowId, currentTab: val, }) }, compareStatusWithList (data) { const detailStatus = {} const listStatus = {} Object.keys(this.steadyStatus).forEach(key => { detailStatus[key] = data[key] listStatus[key] = this.listRowData[key] }) if (detailStatus && listStatus && !R.equals(detailStatus, listStatus)) { this.singleRefresh(data[this.idKey], this.steadyStatus) } }, async fetchData () { this.loading = true this.detailParams = this.genParams() try { let response if (R.is(String, this.resource)) { response = await this.manager.get({ id: this.id, params: this.detailParams, }) } else { response = await this.resource(this.detailParams) } if (this.templateContext._isDestroyed) return const { data = {}, } = response this.clearWaitJob() this.data = this.wrapData(data) this.checkSteadyStatus() if (R.is(Function, this.fetchDataCallback)) { await this.fetchDataCallback() } if (this.isList && this.steadyStatus) { this.compareStatusWithList(data) } return response } catch (error) { this.requestError.error = error throw error } finally { this.loaded = true this.loading = false } }, /** * @description 刷新数据 */ refresh () { if (this.isList) return this.params.list.refresh(...arguments) return this.fetchData() }, /** * @param {String} id * @param {Array} steadyStatus 所期望的状态,以便定时更新 * 刷新单条数据 * @returns Promise */ singleRefresh () { if (this.isList) return this.params.list.singleRefresh(...arguments) return this.fetchData() }, /** * @description 获取api资源相关的参数 */ getOptionParams () { if (R.is(Function, this.getDetailParams)) { return this.getDetailParams() || {} } return this.getDetailParams || {} }, /** * @description 生成所有的请求参数 * @returns {Object} */ genParams () { const params = { scope: this.$store.getters.scope, show_fail_reason: true, show_emulated: true, ...this.getOptionParams(), } return params }, /** * @description 生成期望的状态数据结构 * @param {Array | String | Object} steadyStatus * @returns {Object} */ genSteadyStatus (steadyStatus) { if (R.is(Array, steadyStatus) || R.is(String, steadyStatus)) { return { status: steadyStatus, } } return steadyStatus }, /** * @description 包装返回数据 * @param {Array} arr * @returns {Object} */ wrapData (obj) { const data = new DataWrap(this, obj, this.idKey) return data }, /** * @description 检查期望状态,是否需要轮询更新 */ checkSteadyStatus () { if (this.isList) return if ( (R.isNil(this.steadyStatus) || R.isEmpty(this.steadyStatus)) || (R.isNil(this.data) || R.isEmpty(this.data)) ) return const isSteadyStatus = this.data.isSteadyStatus(this.steadyStatus) if (!isSteadyStatus) { this.data.waitStatus(this.steadyStatus) } }, /** * @description 清除轮询更新 */ clearWaitJob () { if ( (R.isNil(this.steadyStatus) || R.isEmpty(this.steadyStatus)) || (R.isNil(this.data) || R.isEmpty(this.data)) ) return this.data.clearWaitJob() }, /** * @description 调用manager方法的桥接方法,调用此方法可以同时更新 list 的对应数据 * @param {String} on manager 的实例方法 * @param {Object} opts * opts.expectStatus (String || Array || Object) 期望状态 * opts.id (String || Array) * opts.managerArs (Array) 按照指定的 manager 实例方法所需参数顺序传入 */ onManager (on, opts) { if (this.isList) return this.params.list.onManager(...arguments) if (!this.manager) return Promise.resolve() let { steadyStatus, id: ids, managerArgs = {}, } = opts const refreshActions = ['create', 'delete', 'batchDelete'] if (R.is(String, ids)) { if (!managerArgs.id) managerArgs.id = ids ids = [ids] } if (R.is(Array, ids)) { if (!managerArgs.ids) managerArgs.ids = ids } if (!managerArgs) { throw Error(i18n.t('common_74')) } if (!R.is(Object, managerArgs)) { throw Error(i18n.t('common_75')) } const promise = this.manager[on]({ ...managerArgs }).then(async res => { if (refreshActions.includes(on)) { this.refresh() return res } let isBatch = false if (R.is(Array, res.data.data)) { isBatch = true } // 需要调用get更新数据的id let waitUpdateId = '' if (on !== 'get') { if (isBatch) { const rec = res.data.data[0] if (rec.status < 400) { // success // this.data.data = rec.data waitUpdateId = rec[this.idKey] } else { // failure this.data.setError(res) } } else { if (res.status < 400) { // this.data.data = res.data waitUpdateId = res.data[this.idKey] } else { this.setError(res) } } } if (waitUpdateId) { const newDataResponse = await this.manager.get({ id: waitUpdateId, params: this.detailParams, }) this.data.data = newDataResponse.data } if (steadyStatus) { this.data.waitStatus(steadyStatus) } return res }).catch(err => { return Promise.reject(err) }) return promise }, }, }
# -*- coding: utf-8 -*- from maya import cmds from maya import mel import pymel.core as pm from . import weight from . import common from . import lang from . import modeling import os import json #-*-coding:utf-8 -*- import datetime as dt #メッシュを反転コピーしてからウェイトを対象化 def mesh_weight_symmetrize(): exFace = [] if cmds.selectMode( q=True, co=True ): selection = cmds.ls(sl=True) faces = common.conv_comp(selection , mode='face') #print 'comp mode? :', cmds.selectMode(q=True, co=True) if faces == []: #print 'no select' return #print faces exFace = modeling.face_extraction(faces=faces, deleteOrg=False, selectDuplicated=True, transferWeight=True) selection = pm.ls(sl=True) #選択しているものの子供のノードを取得してリスト化 allNodes = alignmentParentList(selection) duplicated = [] for node in allNodes: #複製して反転する関数呼び出し、戻り値は duplicateObj = duplycateSymmetry(node) duplicated.append(duplicateObj) #ウェイトシンメトリーする関数呼び出し weight.symmetry_weight(node,duplicateObj) #continue cmds.select(duplicated, r=True) if exFace != []: cmds.delete(exFace) def alignmentParentList(parentList): #親子順にリストを整理 alignedList = [] for node in parentList: #子のノードを取得※順序がルート→孫→子の順番なので注意、いったんルートなしで取得 #children = common.get_children(node,type=['transform'], root_includes=False) children = pm.listRelatives(node, ad=True, type='transform', f=True) #末尾にルートを追加 children.append(node) #逆順にして親→子→孫順に整列 children.reverse() #同一ツリー内マルチ選択時の重複回避のためフラグで管理 for child in children: appendedFlag = False for alignedNode in alignedList : if alignedNode == child: appendedFlag = True if appendedFlag is False: alignedList.append(str(child)) return alignedList def duplycateSymmetry(object): meshNode = cmds.listRelatives(object, s=True, pa=True, type='mesh', fullPath=True) if meshNode is not None: #エラー吐くことがあるのでノンデフォーマヒストリを削除 cmds.bakePartialHistory(object,ppt=True) #ネームスペースから分割 nemeSplit = object.split('|') newName = nemeSplit[-1] #左右リネーム関数呼び出し newName = renameLR(newName) #複製して反転 duplicated = pm.duplicate(object, name=newName) try: parentNode = duplicated[0].firstParent()#Pymelの機能で親の階層を取得しておく。listRelativesと同じような。 parentNode = str(parentNode)#cmdsで使えるように文字列に変換 #左右リネーム関数呼び出し newParent = renameLR(parentNode) except: parentNode = None newParent = None duplicated = str(duplicated[0])#cmdsで使えるように文字列に変換 #子供のオブジェクト取得関数呼び出し children = pm.listRelatives(duplicated, ad=True, type='transform', f=True) #子供のオブジェクトがある場合は重複を避けるため削除 if len(children) != 0: cmds.delete(children) #アトリビュートのロック解除 #全部のロック解除しないと親が変わったときのロカール値が変わらず、ズレることがある。 attr = ['.translate', '.rotate', '.scale'] axis = ['X', 'Y', 'Z'] for varA in range(0, 3): for varB in range(0, 3): cmds.setAttr(duplicated + attr[varA] + axis[varB], lock=False) #ワールドスケール用ダミーロケータ作成 dummy = common.TemporaryReparent().main(mode='create') cmds.parent(duplicated, dummy) #X方向に-1スケーリングしてからスケールフリーズ cmds.scale(-1, 1, 1, dummy, relative=True, pivot=(0,0,0)) #杏仁生成を防ぐためにダミーロケータのスケールをフリーズ、負の値が親に入ってると杏仁が生成されるような。 if cmds.nodeType(duplicated) == 'joint': #ジョイントを正しい回転、位置に修正するため、スケールフリーズ前のグローバル値を取得しておく pos = cmds.xform(duplicated, q=True, t=True, ws=True) rot = cmds.xform(duplicated, q=True, ro=True, ws=True) cmds.makeIdentity(dummy, apply=True, translate=False, rotate=False, scale=True, preserveNormals=True) #元の親名と違い、かつ新しい親名のオブジェクトが存在する場合は付け替え if parentNode is None: cmds.parent(duplicated, w=True) else: if parentNode != newParent and cmds.ls(newParent): cmds.parent(duplicated, newParent) else: cmds.parent(duplicated, parentNode) #ダミーペアレントを削除 common.TemporaryReparent().main(dummyParent=dummy, mode='delete') cmds.makeIdentity(duplicated, apply=True, translate=False, rotate=False, scale=True, preserveNormals=True) if cmds.nodeType(duplicated) == 'joint': cmds.xform(duplicated , t=pos, ro=rot, ws=True) return duplicated def renameLR(rename): #左右のLRをリネームする関数 #1つのオブジェクト内にLRが混在する可能性を考慮して一時的に別の名前にしてから最後にLRリネーム if rename.startswith('L_')==True: rename = 'RightRenameTemp_'+rename[2:] elif rename.startswith('R_')==True: rename = 'LeftRenameTemp_'+rename[2:] if rename.endswith('_L')==True: rename = rename[0:-2]+'_RightRenameTemp' elif rename.startswith('_R')==True: rename = rename[0:-2]+'_LeftRenameTemp' if '_L_' in rename: rename = rename.replace('_L_', '_RightRenameTemp_') if '_R_' in rename: rename = rename.replace('_R_', '_LeftRenameTemp_') rename = rename.replace( 'LeftRenameTemp','L') rename = rename.replace( 'RightRenameTemp','R') return rename class WeightSymmetrize(): vtx_L = [] vtx_R = [] vtx_L_All = [] vtx_R_All = [] def __init__(self): #メッセージ設定 self.msg03 = lang.Lang( en='One mesh weight mirror', ja=u'1メッシュのウェイトミラー').output() self.msg00 = lang.Lang( en='There is one selected mesh\nPlease select the direction to mirror', ja=u'選択されているメッシュが1つです\nミラーリングする方向を選択してください').output() self.msg01 = lang.Lang( en='From + X to - X', ja=u' + X から - X へ').output() self.msg02 = lang.Lang( en='From - X to + X', ja=u' - X から + X へ').output() self.selection = cmds.ls(sl=True) vertices = common.conv_comp(self.selection, mode='vtx') vertices = cmds.filterExpand(vertices, sm=31) meshes = cmds.filterExpand(self.selection, sm=12) #メッシュからジョイントラベルを設定 if vertices: self.all_meshes = list(set(x.split(".", 1)[0] for x in vertices)) else: self.all_meshes = meshes if not self.all_meshes: return #スキンクラスタからジョイントラベルを設定する for mesh in self.all_meshes: srcSkinCluster = cmds.ls(cmds.listHistory(mesh), type='skinCluster') if srcSkinCluster: #シムウェイト関数をジョイントラベル設定するだけのオプションで呼び出し weight.symmetry_weight(srcNode=mesh, symWeight=False) break else:#スキンが一個もなかったら抜ける return #スキンクラスタがないメッシュがあったらせっていしておく for check_skin in self.all_meshes: srcSkinCluster = cmds.ls(cmds.listHistory(check_skin), type='skinCluster') if not srcSkinCluster: weight.transfer_weight(mesh, check_skin, transferWeight=False, returnInfluences=False, logTransfer=True) #オブジェクト単位でのシンメトリ if meshes is not None: if len(meshes) == 1: mirrorDir = cmds.confirmDialog( title=self.msg03, message=self.msg00, button=[self.msg01, self.msg02], defaultButton=self.msg01, cancelButton=self.msg02, dismissString='escape') if mirrorDir == 'escape': return if mirrorDir == self.msg01: mirrorDir = False elif mirrorDir == self.msg02: mirrorDir = True else: mirrorDir = False self.ezSymWeight(meshes, mirror=mirrorDir) #頂点がなかったら関数抜ける if vertices is not None: #選択頂点を左右に振り分け self.vtx_L = self.listEachMesh(vertices, self.all_meshes, negaPosi = 1, plane=0) self.vtx_R = self.listEachMesh(vertices, self.all_meshes, negaPosi = -1, plane=0) #メッシュの頂点をすべて取得 self.vtx_All = cmds.polyListComponentConversion(list(self.all_meshes), tv=True) self.vtx_All = cmds.filterExpand(self.vtx_All, sm=31) #全頂点を左右に振り分け self.vtx_L_All= self.distributeVertex(self.vtx_All, negaPosi = 1, plane=0) self.vtx_R_All = self.distributeVertex(self.vtx_All, negaPosi = -1, plane=0) #左右それぞれにシムウェイト。左全部と右選択頂点を選択して実行、その反対を実行を順次処理。 #オブジェクト単位でミラーしないと1メッシュにしか適用されないっぽいので振り分けたメッシュ頂点リスト事にループ for vtx_R in self.vtx_R: self.ezSymWeight(target=self.vtx_L_All+vtx_R, mirror=False)#左から右へ転送 for vtx_L in self.vtx_L: self.ezSymWeight(target=self.vtx_R_All+vtx_L, mirror=True)#右から左へ転送 #選択状態を元通りにする cmds.select(self.selection, r=True) #ウェイトミラー def ezSymWeight(self, target, mirror=False): cmds.select(target, r=True) cmds.copySkinWeights(mirrorMode='YZ', mirrorInverse=mirror, surfaceAssociation='closestPoint', influenceAssociation='label' , normalize=False) #頂点位置と指定プレーンから+-方向どちらにあるか判定して振り分ける関数 def distributeVertex(self, vtx, negaPosi = 1, plane=0): #negaPosi 1:+方向、 -1:-方向 #plane指定 'yz'0, 'xz':1, 'yx':2 return [v for v in vtx if cmds.pointPosition(v, w=True)[plane]*negaPosi > 0] #メッシュごとにそれぞれ頂点リストを分ける def listEachMesh(self, vtx, meshes, negaPosi = 1, plane=0): meshVtxList = [] preID = meshes.index(vtx[0].split('.')[0])#メッシュ名を判別するためのID tempList = []#メッシュごとのグループに分けるためのテンポラリ for v in vtx: if cmds.pointPosition(v, w=True)[plane]*negaPosi > 0: id = meshes.index(v.split('.')[0])#メッシュ名を取得してIDに変換 if preID == id:#メッシュ名が同じ間はテンポラリに頂点を追加 tempList.append(v) else:#メッシュ名が変わったらリストをアペンドしてテンポラリをクリア meshVtxList.append(tempList) tempList = [] tempList.append(v) preID = id if tempList != []:#最後の一個も追加 meshVtxList.append(tempList) return meshVtxList
"""setuptools-based installation script. File is based on this template: https://github.com/pypa/sampleproject """ import os import sys import unittest # Always prefer setuptools over distutils from setuptools import find_packages from setuptools import setup _DEPENDENCIES = [ # dependencies for dsub, ddel, dstat # Pin to known working versions to prevent episodic breakage from library # version mismatches. # This version list generated: 02/01/2021 # direct dependencies 'google-api-python-client<=1.12.8', 'google-auth<=1.24.0', 'python-dateutil<=2.8.1', 'pytz<=2021.1', 'pyyaml<=5.4.1', 'tenacity<=5.0.4', 'tabulate<=0.8.7', # downstream dependencies 'funcsigs<=1.0.2', 'google-api-core<=1.25.1', 'google-auth-httplib2<=0.0.4', 'httplib2<=0.19.0', 'pyasn1<=0.4.8', 'pyasn1-modules<=0.2.8', 'rsa<=4.7', 'uritemplate<=3.0.1', # dependencies for test code 'parameterized<=0.8.1', 'mock<=4.0.3', ] if sys.version_info[0] == 2: _DEPENDENCIES.append('cachetools==3.1.1') def unittest_suite(): """Get test suite (Python unit tests only).""" test_loader = unittest.TestLoader() test_suite = test_loader.discover('test/unit', pattern='test_*.py') return test_suite def get_dsub_version(): """Get the dsub version out of the _dsub_version.py source file. Setup.py should not import dsub version from dsub directly since ambiguity in import order could lead to an old version of dsub setting the version number. Parsing the file directly is simpler than using import tools (whose interface varies between python 2.7, 3.4, and 3.5). Returns: string of dsub version. Raises: ValueError: if the version is not found. """ filename = os.path.join(os.path.dirname(__file__), 'dsub/_dsub_version.py') with open(filename, 'r') as versionfile: for line in versionfile: if line.startswith('DSUB_VERSION ='): # Get the version then strip whitespace and quote characters. version = line.partition('=')[2] return version.strip().strip('\'"') raise ValueError('Could not find version.') def get_readme_contents(): """Get the README.md contents.""" with open('README.md', 'r') as f: return f.read() setup( name='dsub', # Python 2 is no longer supported. Use Python 3. python_requires='>=3.6', # Versions should comply with PEP440. version=get_dsub_version(), description=('A command-line tool that makes it easy to submit and run' ' batch scripts in the cloud'), long_description=get_readme_contents(), long_description_content_type='text/markdown', # The project's main homepage. url='https://github.com/DataBiosphere/dsub', # Author details author='Verily', # Choose your license license='Apache', # See https://pypi.python.org/pypi?%3Aaction=list_classifiers classifiers=[ # How mature is this project? Common values are # 3 - Alpha # 4 - Beta # 5 - Production/Stable 'Development Status :: 4 - Beta', # Indicate who your project is intended for 'Intended Audience :: Developers', 'Topic :: Scientific/Engineering :: Bio-Informatics', 'Topic :: Scientific/Engineering :: Information Analysis', 'Topic :: System :: Distributed Computing', # Pick your license as you wish (should match "license" above) 'License :: OSI Approved :: Apache Software License', # Specify the Python versions you support here. In particular, ensure # that you indicate whether you support Python 2, Python 3 or both. 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', ], # What does your project relate to? keywords='cloud bioinformatics', # Packages to distribute. packages=find_packages(), include_package_data=True, # List run-time dependencies here. These will be installed by pip when # your project is installed. install_requires=_DEPENDENCIES, # Define a test suite for Python unittests only. test_suite='setup.unittest_suite', # Provide executable scripts - these will be added to the user's path. entry_points={ 'console_scripts': [ 'dsub=dsub.commands.dsub:main', 'dstat=dsub.commands.dstat:main', 'ddel=dsub.commands.ddel:main', ], }, )
from django import template register = template.Library() @register.simple_tag(takes_context=True) def visual_asset(context, asset): return asset.url(context['request'])
/** * 题述:数值的整数次方 * 思路:最简单直接的连乘 x n 次 * 时间复杂度:n * 空间复杂度:0 * @param {number} x * @param {number} n * @return {number} */ function myPow(x, n) { if (x === 1 || x === 0) return x; if (x === -1) return n % 2 === 0 ? 1 : -1; let absN = Math.abs(n); let result = 1; while (absN-- >= 1) { result *= x; } return n >= 0 ? result : 1 / result; }
import './commands' import '@testing-library/cypress/add-commands'
/* * This header is generated by classdump-dyld 1.0 * on Sunday, September 27, 2020 at 12:26:51 PM Mountain Standard Time * Operating System: Version 14.0 (Build 18A373) * Image Source: /System/Library/PrivateFrameworks/UserNotificationsServer.framework/UserNotificationsServer * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos. */ typedef struct _NSZone* NSZoneRef;
"""Transform a string with Python-like source code into SymPy expression. """ from sympy_tokenize import \ generate_tokens, untokenize, TokenError, NUMBER, STRING, NAME, OP from keyword import iskeyword from StringIO import StringIO import re from sympy.core.basic import Basic, C _re_repeated = re.compile(r"^(\d*)\.(\d*)\[(\d+)\]$") def _add_factorial_tokens(name, result): if result == [] or result[-1][1] == '(': raise TokenError() beginning = [(NAME, name), (OP, '(')] end = [(OP, ')')] diff = 0 length = len(result) for index, token in enumerate(result[::-1]): toknum, tokval = token i = length-index-1 if tokval == ')': diff += 1 elif tokval == '(': diff -= 1 if diff == 0: if i-1 >= 0 and result[i-1][0] == NAME: return result[:i-1] + beginning + result[i-1:] + end else: return result[:i] + beginning + result[i:] + end return result def _transform(s, local_dict, global_dict, rationalize, convert_xor): g = generate_tokens(StringIO(s).readline) result = [] prevtoken = '' for toknum, tokval, _, _, _ in g: if toknum == NUMBER: number = tokval postfix = [] if number.endswith('j') or number.endswith('J'): number = number[:-1] postfix = [(OP, '*'), (NAME, 'I')] if '.' in number or (('e' in number or 'E' in number) and not (number.startswith('0x') or number.startswith('0X'))): match = _re_repeated.match(number) if match is not None: # Clear repeating decimals, e.g. 3.4[31] -> (3 + 4/10 + 31/990) pre, post, repetend = match.groups() zeros = '0'*len(post) post, repetends = [w.lstrip('0') for w in [post, repetend]] # or else interpreted as octal a = pre or '0' b, c = post or '0', '1' + zeros d, e = repetends, ('9'*len(repetend)) + zeros seq = [ (OP, '('), (NAME, 'Integer'), (OP, '('), (NUMBER, a), (OP, ')'), (OP, '+'), (NAME, 'Rational'), (OP, '('), (NUMBER, b), (OP, ','), (NUMBER, c), (OP, ')'), (OP, '+'), (NAME, 'Rational'), (OP, '('), (NUMBER, d), (OP, ','), (NUMBER, e), (OP, ')'), (OP, ')'), ] elif rationalize: seq = [(NAME, 'Rational'), (OP, '('), (STRING, repr(str(number))), (OP, ')')] else: seq = [(NAME, 'Float'), (OP, '('), (NUMBER, repr(str(number))), (OP, ')')] else: seq = [(NAME, 'Integer'), (OP, '('), (NUMBER, number), (OP, ')')] result.extend(seq + postfix) elif toknum == NAME: name = tokval if name in ['True', 'False', 'None'] or iskeyword(name) or name in local_dict: result.append((NAME, name)) continue elif name in global_dict: obj = global_dict[name] if isinstance(obj, (Basic, type)) or callable(obj): result.append((NAME, name)) continue result.extend([ (NAME, 'Symbol'), (OP, '('), (NAME, repr(str(name))), (OP, ')'), ]) elif toknum == OP: op = tokval if op == '^' and convert_xor: result.append((OP, '**')) elif op == '!!': if prevtoken == '!' or prevtoken == '!!': raise TokenError result = _add_factorial_tokens('factorial2', result) elif op == '!': if prevtoken == '!' or prevtoken == '!!': raise TokenError result = _add_factorial_tokens('factorial', result) else: result.append((OP, op)) else: result.append((toknum, tokval)) prevtoken = tokval return untokenize(result) def parse_expr(s, local_dict=None, rationalize=False, convert_xor=False): """ Converts the string ``s`` to a SymPy expression, in ``local_dict`` Examples ======== >>> from sympy.parsing.sympy_parser import parse_expr >>> parse_expr("1/2") 1/2 >>> type(_) <class 'sympy.core.numbers.Half'> """ if local_dict is None: local_dict = {} global_dict = {} exec 'from sympy import *' in global_dict # keep autosimplification from joining Integer or # minus sign into a Mul; this modification doesn't # prevent the 2-arg Mul from becoming and Add. hit = False if '(' in s: kern = '_kern' while kern in s: kern += "_" s = re.sub(r'(\d *\*|-) *\(', r'\1%s*(' % kern, s) hit = kern in s code = _transform(s.strip(), local_dict, global_dict, rationalize, convert_xor) expr = eval(code, global_dict, local_dict) # take local objects in preference if not hit: return expr try: return expr.xreplace({C.Symbol(kern): 1}) except (TypeError, AttributeError): return expr
/** * \file * * \brief Generic monochrome LCD graphic primitives * * Copyright (c) 2011 Atmel Corporation. All rights reserved. * * \asf_license_start * * 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. The name of Atmel may not be used to endorse or promote products derived * from this software without specific prior written permission. * * 4. This software may only be redistributed and used in connection with an * Atmel microcontroller product. * * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL 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. * * \asf_license_stop * */ /** * \ingroup gfx_mono_generic_group * @{ */ #include "gfx_mono_generic.h" /** * \brief Draw a horizontal line, one pixel wide (generic implementation) * * \note This function does a very simple bounds checking that does not * check if the line is placed outside the screen. If you supply an * x- or y-coordinate outside the display the behaviour is undefined, * and you risk overwriting portions of internal SRAM. * * \param x X coordinate of leftmost pixel. * \param y Y coordinate of the line. * \param length Length of the line in pixels. * \param color Pixel operation of the line. */ void gfx_mono_generic_draw_horizontal_line(gfx_coord_t x, gfx_coord_t y, gfx_coord_t length, enum gfx_mono_color color) { uint8_t page; uint8_t pixelmask; uint8_t temp; // Clip line length if too long if (x + length > GFX_MONO_LCD_WIDTH) { length = GFX_MONO_LCD_WIDTH - x; } page = y / 8; pixelmask = (1 << (y - (page * 8))); if (length == 0) { // Nothing to do. Move along. return; } switch (color) { case GFX_PIXEL_SET: while (length-- > 0) { temp = gfx_mono_get_byte(page, x + length); temp |= pixelmask; gfx_mono_put_byte(page, x + length, temp); }; break; case GFX_PIXEL_CLR: while (length-- > 0) { temp = gfx_mono_get_byte(page, x + length); temp &= ~pixelmask; gfx_mono_put_byte(page, x + length, temp); }; break; case GFX_PIXEL_XOR: while(length-- > 0) { temp = gfx_mono_get_byte(page, x + length); temp ^= pixelmask; gfx_mono_put_byte(page, x + length, temp); }; break; default: break; } } /** * \brief Draw a vertical line, one pixel wide (generic implementation) * * \note This function does a very simple bounds checking that does not * check if the line is placed outside the screen. If you supply an * x- or y-coordinate outside the display the behaviour is undefined, * and you risk overwriting portions of internal SRAM. * * \param x X coordinate of the line. * \param y Y coordinate of the topmost pixel. * \param length Length of the line in pixels. * \param color Pixel operation of the line. */ void gfx_mono_generic_draw_vertical_line(gfx_coord_t x, gfx_coord_t y, gfx_coord_t length, enum gfx_mono_color color) { if (length == 0) { return; } gfx_coord_t y2 = y + length - 1; if (y == y2) { gfx_mono_draw_pixel(x, y, color); return; } if (y2 >= GFX_MONO_LCD_HEIGHT - 1) { y2 = GFX_MONO_LCD_HEIGHT - 1; } gfx_coord_t y1page = y / 8; gfx_coord_t y2page = y2 / 8; uint8_t y1bitpos = y & 0x07; uint8_t y2bitpos = y2 & 0x07; uint8_t y1pixelmask = 0xFF << y1bitpos; uint8_t y2pixelmask = 0xFF >> (7 - y2bitpos); // The pixels are on the same page; combine masks if (y1page == y2page) { uint8_t pixelmask = y1pixelmask & y2pixelmask; gfx_mono_mask_byte(y1page, x, pixelmask, color); } else { gfx_mono_mask_byte(y1page, x, y1pixelmask, color); while (++y1page < y2page) { gfx_mono_mask_byte(y1page, x, 0xFF, color); } gfx_mono_mask_byte(y2page, x, y2pixelmask, color); } } /** * \brief Draw a line between two arbitrary points (generic implementation). * * \param x1 Start X coordinate. * \param y1 Start Y coordinate. * \param x2 End X coordinate. * \param y2 End Y coordinate. * \param color Pixel operation of the line. */ void gfx_mono_generic_draw_line(gfx_coord_t x1, gfx_coord_t y1, gfx_coord_t x2, gfx_coord_t y2, enum gfx_mono_color color) { uint8_t i; uint8_t x; uint8_t y; int8_t xinc; int8_t yinc; int8_t dx; int8_t dy; int8_t e; /* swap x1,y1 with x2,y2 */ if (x1 > x2) { dx = x1; x1 = x2; x2 = dx; dy = y1; y1 = y2; y2 = dy; } dx = x2 - x1; dy = y2 - y1; x = x1; y = y1; if (dx < 0) { xinc = -1; dx = -dx; } else { xinc = 1; } if (dy < 0) { yinc = -1; dy = -dy; } else { yinc = 1; } if (dx > dy) { e = dy - dx; for (i = 0; i <= dx; i++) { gfx_mono_draw_pixel(x, y, color); if (e >= 0) { e -= dx; y += yinc; } e += dy; x += xinc; } } else { e = dx - dy; for (i = 0; i <= dy; i++){ gfx_mono_draw_pixel(x, y, color); if (e >= 0) { e -= dy; x += xinc; } e += dx; y += yinc; } } } /** * \brief Draw an outline of a rectangle (generic implementation). * * \param x X coordinate of the left side. * \param y Y coordinate of the top side. * \param width Width of the rectangle. * \param height Height of the rectangle. * \param color Pixel operation of the line. */ void gfx_mono_generic_draw_rect(gfx_coord_t x, gfx_coord_t y, gfx_coord_t width, gfx_coord_t height, enum gfx_mono_color color) { gfx_mono_draw_horizontal_line(x, y, width, color); gfx_mono_draw_horizontal_line(x, y + height - 1, width, color); gfx_mono_draw_vertical_line(x, y, height, color); gfx_mono_draw_vertical_line(x + width - 1, y, height, color); } /** * \brief Draw a filled rectangle (generic implementation). * * \param x X coordinate of the left side. * \param y Y coordinate of the top side. * \param width Width of the rectangle. * \param height Height of the rectangle. * \param color Pixel operation of the line */ void gfx_mono_generic_draw_filled_rect(gfx_coord_t x, gfx_coord_t y, gfx_coord_t width, gfx_coord_t height, enum gfx_mono_color color) { if (height == 0) { // Nothing to do. Move along. return; } while (height-- > 0) { gfx_mono_draw_horizontal_line(x, y + height, width, color); }; } /** * \brief Draw an outline of a circle or arc (generic implementation). * * The radius is the distance from the center to the circumference, * which means that the total width or height of a circle will be * (radius*2+1). * * The octant_mask parameter is a bitmask that decides which octants of * the circle to draw. Use the GFX_OCTANTn, GFX_QUADRANTn, GFX_xHALF and * GFX_WHOLE contants and OR them together if required. Radius equal to * zero gives a single pixel. * * \param x X coordinate of center. * \param y Y coordinate of center. * \param radius Circle radius in pixels. * \param color Pixel operation. * \param octant_mask Bitmask indicating which octants to draw. */ void gfx_mono_generic_draw_circle(gfx_coord_t x, gfx_coord_t y, gfx_coord_t radius, enum gfx_mono_color color, uint8_t octant_mask) { gfx_coord_t offset_x; gfx_coord_t offset_y; int16_t error; // Draw only a pixel if radius is zero. if (radius == 0) { gfx_mono_draw_pixel(x, y, color); return; } // Set up start iterators. offset_x = 0; offset_y = radius; error = 3 - 2 * radius; // Iterate offsetX from 0 to radius. while (offset_x <= offset_y) { // Draw one pixel for each octant enabled in octant_mask. if (octant_mask & GFX_OCTANT0) gfx_mono_draw_pixel(x + offset_y, y - offset_x, color); if (octant_mask & GFX_OCTANT1) gfx_mono_draw_pixel(x + offset_x, y - offset_y, color); if (octant_mask & GFX_OCTANT2) gfx_mono_draw_pixel(x - offset_x, y - offset_y, color); if (octant_mask & GFX_OCTANT3) gfx_mono_draw_pixel(x - offset_y, y - offset_x, color); if (octant_mask & GFX_OCTANT4) gfx_mono_draw_pixel(x - offset_y, y + offset_x, color); if (octant_mask & GFX_OCTANT5) gfx_mono_draw_pixel(x - offset_x, y + offset_y, color); if (octant_mask & GFX_OCTANT6) gfx_mono_draw_pixel(x + offset_x, y + offset_y, color); if (octant_mask & GFX_OCTANT7) gfx_mono_draw_pixel(x + offset_y, y + offset_x, color); // Update error value and step offset_y when required. if (error < 0) { error += ((offset_x << 2) + 6); } else { error += (((offset_x - offset_y) << 2) + 10); --offset_y; } // Next X. ++offset_x; } } /** * \brief Draw a filled circle or sector (generic implementation). * * The radius is the distance from the center to the circumference, * which means that the total width or height of a circle will be * (radius*2+1). * * The quadrant_mask parameter is a bitmask that decides which quadrants * of the circle to draw. Use the GFX_QUADRANTn, GFX_xHALF and * GFX_WHOLE contants and OR them together if required. Radius equal to * zero gives a single pixel. * * \note This function only supports quadrants while gfx_draw_circle() * supports octants. This is to improve performance on drawing * filled circles. * * \param x X coordinate of center. * \param y Y coordinate of center. * \param radius Circle radius in pixels. * \param color Pixel operation. * \param quadrant_mask Bitmask indicating which quadrants to draw. */ void gfx_mono_generic_draw_filled_circle(gfx_coord_t x, gfx_coord_t y, gfx_coord_t radius, enum gfx_mono_color color, uint8_t quadrant_mask) { gfx_coord_t offset_x; gfx_coord_t offset_y; int16_t error; // Draw only a pixel if radius is zero. if (radius == 0) { gfx_mono_draw_pixel(x, y, color); return; } // Set up start iterators. offset_x = 0; offset_y = radius; error = 3 - 2 * radius; // Iterate offset_x from 0 to radius. while (offset_x <= offset_y) { // Draw vertical lines tracking each quadrant. if (quadrant_mask & GFX_QUADRANT0) { gfx_mono_draw_vertical_line(x + offset_y, y - offset_x, offset_x + 1, color); gfx_mono_draw_vertical_line(x + offset_x, y - offset_y, offset_y + 1, color); } if (quadrant_mask & GFX_QUADRANT1) { gfx_mono_draw_vertical_line(x - offset_y, y - offset_x, offset_x + 1, color); gfx_mono_draw_vertical_line(x - offset_x, y - offset_y, offset_y + 1, color); } if (quadrant_mask & GFX_QUADRANT2) { gfx_mono_draw_vertical_line(x - offset_y, y, offset_x + 1, color); gfx_mono_draw_vertical_line(x - offset_x, y, offset_y + 1, color); } if (quadrant_mask & GFX_QUADRANT3) { gfx_mono_draw_vertical_line(x + offset_y, y, offset_x + 1, color); gfx_mono_draw_vertical_line(x + offset_x, y, offset_y + 1, color); } // Update error value and step offset_y when required. if (error < 0) { error += ((offset_x << 2) + 6); } else { error += (((offset_x - offset_y) << 2) + 10); --offset_y; } // Next X. ++offset_x; } } /** * \brief Put bitmap from FLASH or RAM to display * * This function will output bitmap data from FLASH or RAM. * The bitmap y-coordinate will be aligned with display pages, rounded down. * Ie: placing a bitmap at x=10, y=5 will put the bitmap at x = 10,y = 0 and * placing a bitmap at x = 10, y = 10 will put the bitmap at x = 10, y = 8 * */ void gfx_mono_generic_put_bitmap(struct gfx_mono_bitmap *bitmap, gfx_coord_t x, gfx_coord_t y) { gfx_coord_t num_pages = bitmap->height / 8; gfx_coord_t page = y / 8; gfx_coord_t column; gfx_coord_t i; gfx_mono_color_t temp; switch (bitmap->type) { case GFX_MONO_BITMAP_PROGMEM: for (i = 0; i < num_pages; i++) { for (column = 0; column < bitmap->width; column++) { temp = PROGMEM_READ_BYTE(bitmap->data.progmem + (i * bitmap->width) + column); gfx_mono_put_byte(i + page, column + x, temp); } } break; case GFX_MONO_BITMAP_RAM: for (i = 0; i < num_pages; i++) { gfx_mono_put_page(bitmap->data.pixmap + (i * bitmap->width), page + i, x, bitmap->width); } break; default: break; } } //! @}
!function(t,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):(t="undefined"!=typeof globalThis?globalThis:t||self).Autocomplete=s()}(this,(function(){"use strict";const t=(t,s)=>{for(let i in s)"addClass"===i?h(t,"add",s[i]):"removeClass"===i?h(t,"remove",s[i]):t.setAttribute(i,s[i])},s=t=>(t.firstElementChild||t).textContent.trim(),i=(t,s)=>{t.scrollTop=t.offsetTop-s.offsetHeight},h=(t,s,i)=>t.classList[s](i),e=(s,i)=>{t(s,{"aria-activedescendant":i||""})},a=(t,s,i,h)=>{const e=h.previousSibling,a=e?e.offsetHeight:0;if("0"==t.getAttribute("aria-posinset")&&(h.scrollTop=t.offsetTop-((t,s)=>{const i=document.querySelectorAll("#"+t+" > li:not(."+s+")");let h=0;return[].slice.call(i).map(t=>h+=t.offsetHeight),h})(s,i)),t.offsetTop-a<h.scrollTop)h.scrollTop=t.offsetTop-a;else{const s=t.offsetTop+t.offsetHeight-a;s>h.scrollTop+h.offsetHeight&&(h.scrollTop=s-h.offsetHeight)}},n=t=>document.createElement(t),l=t=>document.querySelector(t),o=(t,s,i)=>{t.addEventListener(s,i)},r=(t,s,i)=>{t.removeEventListener(s,i)},d=27,c=13,u=38,m=40,p=9;return class{constructor(f,b){let{delay:v=500,clearButton:x=!0,howManyCharacters:y=1,selectFirst:C=!1,insertToInput:k=!1,showAllValues:g=!1,cache:j=!1,disableCloseOnSelect:w=!1,classGroup:V,classPreventClosing:S,classPrefix:O,ariaLabelClear:T,onSearch:I,onResults:R=(()=>{}),onSubmit:A=(()=>{}),onOpened:P=(()=>{}),onReset:B=(()=>{}),onRender:G=(()=>{}),onClose:J=(()=>{}),noResults:N=(()=>{}),onSelectedItem:$=(()=>{})}=b;var q;this.t=()=>{var s,i,h,e,a;this.s(),s=this.i,i=this.h,h=this.l,e=this.o,a=this.u,t(i,{id:h,tabIndex:"0",role:"listbox"}),t(e,{addClass:a+"-results-wrapper"}),e.insertAdjacentElement("beforeend",i),s.parentNode.insertBefore(e,s.nextSibling),o(this.i,"input",this.m),this.p&&o(this.i,"click",this.m),this.v({element:this.i,results:this.h})},this.C=(t,s)=>{this.k&&("update"===t?this.i.setAttribute(this.g,s.value):"remove"===t?this.i.removeAttribute(this.g):this.i.value=this.i.getAttribute(this.g))},this.m=t=>{let{target:s,type:i}=t;if("true"===this.i.getAttribute("aria-expanded")&&"click"===i)return;const h=s.value.replace(this.j,"\\$&");this.C("update",s);const e=this.p?0:this.V;clearTimeout(this.S),this.S=setTimeout(()=>{this.O(h.trim())},e)},this.T=()=>{var s;t(this.i,{"aria-owns":this.I+"-list","aria-expanded":"false","aria-autocomplete":"list","aria-activedescendant":"",role:"combobox",removeClass:"auto-expanded"}),h(this.o,"remove",this.R),this.A(l("."+this.P)),(0==(null==(s=this.B)?void 0:s.length)&&!this.G||this.p)&&(this.h.textContent=""),this.J=this.N?0:-1,this.$()},this.O=t=>{this.q=t,this.F(!0),function(t,s){void 0===t&&(t=!1),t&&(h(t,"remove","hidden"),o(t,"click",s))}(this.L,this.destroy),0==t.length&&this.M&&h(this.L,"add","hidden"),this.D>t.length&&!this.p?this.F():this.H({currentValue:t,element:this.i}).then(s=>{const i=this.i.value.length,e=s.length;this.B=Array.isArray(s)?s:JSON.parse(JSON.stringify(s)),this.F(),this.K(),0==e&&0==i&&h(this.L,"add","hidden"),0==e&&i?(h(this.i,"remove","auto-expanded"),this.T(),this.U({element:this.i,currentValue:t,template:this.W}),this.X()):(e>0||(t=>t&&"object"==typeof t&&t.constructor===Object)(s))&&(this.J=this.N?0:-1,this.W(),this.X())}).catch(()=>{this.F(),this.T()})},this.F=t=>this.i.parentNode.classList[t?"add":"remove"](this.Y),this.K=()=>h(this.i,"remove",this.Z),this.X=()=>{o(this.i,"keydown",this._),o(this.i,"click",this.tt),["mousemove","click"].map(t=>{o(this.h,t,this.st)}),o(document,"click",this.it)},this.W=s=>{t(this.i,{"aria-expanded":"true",addClass:this.u+"-expanded"}),this.h.textContent="";const e=0===this.B.length?this.ht({currentValue:this.q,matches:0,template:s}):this.ht({currentValue:this.q,matches:this.B,classGroup:this.et});this.h.insertAdjacentHTML("afterbegin",e),h(this.o,"add",this.R);const a=this.et?":not(."+this.et+")":"";this.nt=document.querySelectorAll("#"+this.l+" > li"+a),(s=>{for(let i=0;i<s.length;i++)t(s[i],{role:"option",tabindex:"-1","aria-selected":"false","aria-setsize":s.length,"aria-posinset":i})})(this.nt),this.lt({type:"results",element:this.i,results:this.h}),this.ot(),i(this.h,this.o)},this.it=t=>{let{target:s}=t,i=null;(s.closest("ul")&&this.rt||s.closest("."+this.dt))&&(i=!0),s.id===this.I||i||this.T()},this.ot=()=>{if(this.A(l("."+this.P)),!this.N)return;const{firstElementChild:s}=this.h,i=this.et&&this.B.length>0&&this.N?s.nextElementSibling:s;this.ct({index:this.J,element:this.i,object:this.B[this.J]}),t(i,{id:this.ut+"-0",addClass:this.P,"aria-selected":"true"}),e(this.i,this.ut+"-0")},this.tt=()=>{this.h.textContent.length>0&&!h(this.o,"contains",this.R)&&(t(this.i,{"aria-expanded":"true",addClass:this.u+"-expanded"}),h(this.o,"add",this.R),i(this.h,this.o),this.ot(),this.lt({type:"showItems",element:this.i,results:this.h}))},this.st=t=>{t.preventDefault();const{target:s,type:i}=t,e=s.closest("li"),a=null==e?void 0:e.hasAttribute("role"),n=this.P,o=l("."+n);e&&a&&("click"===i&&this.pt(e),"mousemove"!==i||h(e,"contains",n)||(this.A(o),this.ft(e),this.J=this.bt(e),this.ct({index:this.J,element:this.i,object:this.B[this.J]})))},this.pt=t=>{t&&0!==this.B.length?(this.M&&h(this.L,"remove","hidden"),this.i.value=s(t),this.vt({index:this.J,element:this.i,object:this.B[this.J],results:this.h}),this.rt||(this.A(t),this.T()),this.C("remove")):!this.rt&&this.T()},this.bt=t=>Array.prototype.indexOf.call(this.nt,t),this._=t=>{const{keyCode:i}=t,a=h(this.o,"contains",this.R),n=this.B.length+1;switch(this.xt=l("."+this.P),i){case u:case m:if(t.preventDefault(),n<=1&&this.N||!a)return;if(i===u?(this.J<0&&(this.J=n-1),this.J-=1):(this.J+=1,this.J>=n&&(this.J=0)),this.A(this.xt),this.J>=0&&this.J<n-1){const t=this.nt[this.J];this.G&&a&&(this.i.value=s(t)),this.ct({index:this.J,element:this.i,object:this.B[this.J]}),this.ft(t)}else this.C(),e(this.i),this.ct({index:null,element:this.i,object:null});break;case c:t.preventDefault(),this.pt(this.xt);break;case p:case d:t.stopPropagation(),this.T()}},this.ft=s=>{const i=this.ut+"-"+this.bt(s);t(s,{id:i,"aria-selected":"true",addClass:this.P}),e(this.i,i),a(s,this.l,this.et,this.h)},this.A=s=>{s&&t(s,{id:"",removeClass:this.P,"aria-selected":"false"})},this.s=()=>{this.M&&(t(this.L,{class:this.u+"-clear hidden",type:"button",title:this.yt,"aria-label":this.yt}),this.i.insertAdjacentElement("afterend",this.L))},this.destroy=()=>{this.M&&h(this.L,"add","hidden"),this.i.value="",this.i.focus(),this.h.textContent="",this.T(),this.K(),this.Ct(this.i),r(this.i,"keydown",this._),r(this.i,"click",this.tt),r(document,"click",this.it)},this.I=f,this.i=document.getElementById(f),this.H=(q=I,Boolean(q&&"function"==typeof q.then)?I:t=>{let{currentValue:s,element:i}=t;return Promise.resolve(I({currentValue:s,element:i}))}),this.ht=R,this.v=G,this.vt=A,this.ct=$,this.lt=P,this.Ct=B,this.U=N,this.$=J,this.V=v,this.D=y,this.M=x,this.N=C,this.G=k,this.p=g,this.et=V,this.dt=S,this.yt=T||"clear the search query",this.u=O?O+"-auto":"auto",this.rt=w,this.k=j,this.l=this.u+"-"+this.I+"-results",this.g="data-cache-auto-"+this.I,this.Y=this.u+"-is-loading",this.R=this.u+"-is-active",this.P=this.u+"-selected",this.ut=this.u+"-selected-option",this.Z=this.u+"-error",this.j=/[|\\{}()[\]^$+*?.]/g,this.S=null,this.o=n("div"),this.h=n("ul"),this.L=n("button"),this.t()}}}));
from flask import Flask from flask_restful import Api, Resource, reqparse from datetime import datetime from datetime import timedelta import requests,json app = Flask(__name__) api = Api(app) class Billpayaccounts(Resource): def get(self, jwttoken): try: #Get JWT token #url = 'https://nginx0.pncapix.com/Security/v2.0.0/login' #accesstoken = '148a1147-af1d-3cc3-9c52-ff2d309a5a46' #head = {"Content-Type": "application/json","Accept": "application/json","Authorization": "Bearer " + accesstoken} #data = {"password": "swinds258", "username": "swinds258"} #response = json.loads(requests.post(url,json=data,headers=head).text) #jwttoken = response['token'] #print("JWTToken retrieved") #check Account #print("Get AccountId") #url = 'https://nginx0.pncapix.com/Account/v2.0.0/account/findByAccountNumber/'+account #head = {"Content-Type": "application/json","Accept": "application/json","X-Authorization": jwttoken, "Authorization": "Bearer " + accesstoken} #response = json.loads(requests.get(url,headers=head).text) #accountId = str(response['accountId']) #print("Retrieved Accoutn ID") #Get transactions print("Get Transactions") accesstoken = 'a168b9d8-a12b-3ce6-b693-13df93c20980' url = 'http://nginx0.pncapix.com/Transactions/v2.0.0/transaction?page=0&size=10' head = {"Content-Type": "application/json","Accept": "application/json","X-Authorization": jwttoken, "Authorization": "Bearer " + accesstoken} response = json.loads(requests.get(url,headers=head).text) output = [] for content in response['content']: if content['counterPartyAccount']['accountType']['accountType'].find('CREDIT_CARD')!=-1: result={} result['accountId']=content['counterPartyAccount']['accountId'] result['accountNumber']=content['counterPartyAccount']['accountNumber'] result['ScheduledDate']=str(datetime.now() + timedelta(days=1))[:10] result['Balance']=content['counterPartyAccount']['balance'] result['Description']=content['counterPartyAccount']['accountType']['description'] output.append(result.copy()) return json.JSONEncoder().encode({"result":output}) except: return("{\"result\": [{\"ScheduledDate\": \"2018-06-16\", \"Balance\": 1000.0, \"accountId\": 759, \"Description\": \"PNC CashBuilder Visa Credit Card\", \"accountNumber\": \"13972017514653\"}, {\"ScheduledDate\": \"2018-06-16\", \"Balance\": 1000.0, \"accountId\": 195, \"Description\": \"PNC Points Visa Credit Card\", \"accountNumber\": \"19986048231475\"}]}") api.add_resource(Billpayaccounts, "/billpayaccounts/<string:jwttoken>") if __name__ == '__main__': app.run()
from .main import main if __name__ == '__main__': main()
define(['deps/dep1', 'deps/dep2'], function () { require(['deps/dep4']); });
define({"oj-message":{fatal:"Fatal",error:"Erreur",warning:"Avertissement",info:"Informations",confirmation:"Confirmation","compact-type-summary":"{0}: {1}"},"oj-converter":{summary:"La valeur n'est pas au format attendu.",detail:"Entrez une valeur au format attendu.","plural-separator":", ",hint:{summary:"Exemple : {exampleValue}",detail:"Entrez une valeur au format suivant : '{exampleValue}'.","detail-plural":"Entrez une valeur aux formats suivants : '{exampleValue}'."},optionHint:{detail:"La valeur acceptée pour l'option '{propertyName}' est '{propertyValueValid}'.","detail-plural":"Les valeurs acceptées pour l'option '{propertyName}' sont '{propertyValueValid}'."},optionTypesMismatch:{summary:"Une valeur est obligatoire pour l'option '{requiredPropertyName}' lorsque l'option '{propertyName}' est définie sur '{propertyValue}'."},optionTypeInvalid:{summary:"Aucune valeur du type attendu n'a été fournie pour l'option '{propertyName}'."},optionOutOfRange:{summary:"La valeur {propertyValue} est hors limites pour l'option '{propertyName}'."},optionValueInvalid:{summary:"La valeur non valide '{propertyValue}' a été indiquée pour l'option '{propertyName}'."},number:{decimalFormatMismatch:{summary:"La valeur fournie n'est pas au format numérique attendu."},shortLongUnsupportedParse:{summary:"'short' et 'long' ne sont pas pris en charge pour l'analyse du convertisseur.",detail:"Passez le composant en lecture seule. Les champs de lecture seule n'appellent pas la fonction d'analyse du convertisseur."},currencyFormatMismatch:{summary:"La valeur fournie n'est pas au format de devise attendu."},percentFormatMismatch:{summary:"La valeur fournie n'est pas au format de pourcentage attendu."},invalidNumberFormat:{summary:"La valeur fournie n'est pas un nombre valide.",detail:"Indiquez un nombre valide."}},color:{invalidFormat:{summary:"Format de couleur non valide.",detail:"Spécification d'option de format de couleur non valide."},invalidSyntax:{summary:"Spécification de couleur non valide.",detail:"Entrez une valeur de couleur conforme à la norme CSS3."}},datetime:{datetimeOutOfRange:{summary:"La valeur '{value}' est hors limites pour '{propertyName}'.",detail:"Entrez une valeur comprise entre '{minValue}' et '{maxValue}'.",hour:"heure",minute:"minute",second:"seconde",millisec:"millisecondes",month:"mois",day:"jour",year:"année","month name":"nom du mois",weekday:"jour de la semaine"},dateFormatMismatch:{summary:"La valeur fournie n'est pas au format de date attendu."},invalidTimeZoneID:{summary:"ID de fuseau horaire non valide indiqué : {timeZoneID}."},nonExistingTime:{summary:"L'heure d'entrée n'existe pas car elle tombe pendant le changement d'heure."},missingTimeZoneData:{summary:"Données TimeZone manquantes. Appelez l'élément 'ojs/ojtimezonedata' requis afin de charger les données TimeZone."},timeFormatMismatch:{summary:"La valeur fournie n'est pas au format d'heure attendu."},datetimeFormatMismatch:{summary:"La valeur fournie n'est pas au format de date et d'heure attendu."},dateToWeekdayMismatch:{summary:"Le '{date}' ne tombe pas un '{weekday}'.",detail:"Entrez un jour de la semaine qui correspond à la date."},invalidISOString:{invalidRangeSummary:"La valeur '{value}' est hors limites pour le champ '{propertyName}' dans la chaîne ISO 8601 '{isoStr}'.",summary:"La valeur '{isoStr}' fournie n'est pas une chaîne ISO 8601 valide.",detail:"Fournissez une chaîne ISO 8601 valide."}}},"oj-validator":{length:{hint:{min:"Entrez au moins {min} caractères.",max:"Entrez {max} caractères ou moins.",inRange:"Entrez entre {min} et {max} caractères.",exact:"Entrez {length} caractères."},messageDetail:{tooShort:"Entrez au moins {min} caractères.",tooLong:"N'entrez pas plus de {max} caractères."},messageSummary:{tooShort:"Il y a trop peu de caractères.",tooLong:"Il y a trop de caractères."}},range:{number:{hint:{min:"Entrez un nombre supérieur ou égal à {min}.",max:"Entrez un nombre inférieur ou égal à {max}.",inRange:"Entrez un nombre compris entre {min} et {max}.",exact:"Entrez le nombre {num}."},messageDetail:{rangeUnderflow:"Entrez {min} ou un nombre supérieur.",rangeOverflow:"Entrez {max} ou un nombre inférieur.",exact:"Entrez le nombre {num}."},messageSummary:{rangeUnderflow:"Le nombre est trop faible.",rangeOverflow:"Le nombre est trop élevé."}},datetime:{hint:{min:"Entrez une date et une heure postérieures ou égales au {min}.",max:"Entrez une date et une heure antérieures ou égales au {max}.",inRange:"Entrez une date et une heure comprises entre le {min} et le {max}."},messageDetail:{rangeUnderflow:"Entrez une date postérieure ou égale au {min}.",rangeOverflow:"Entrez une date antérieure ou égale au {max}."},messageSummary:{rangeUnderflow:"La date et l'heure sont antérieures aux date et heure minimales.",rangeOverflow:"La date et l'heure sont postérieures aux date et heure maximales."}},date:{hint:{min:"Entrez une date postérieure ou égale au {min}.",max:"Entrez une date antérieure ou égale au {max}.",inRange:"Entrez une date comprise entre le {min} et le {max}."},messageDetail:{rangeUnderflow:"Entrez une date postérieure ou égale au {min}.",rangeOverflow:"Entrez une date antérieure ou égale au {max}."},messageSummary:{rangeUnderflow:"La date est antérieure à la date minimale.",rangeOverflow:"La date est postérieure à la date maximale."}},time:{hint:{min:"Entrez une heure postérieure ou égale à {min}.",max:"Entrez une heure antérieure ou égale à {max}.",inRange:"Entrez une heure comprise entre {min} et {max}."},messageDetail:{rangeUnderflow:"Entrez une heure identique ou postérieure à {min}.",rangeOverflow:"Entrez une heure identique ou antérieure à {max}."},messageSummary:{rangeUnderflow:"L'heure est antérieure à l'heure minimale.",rangeOverflow:"L'heure est postérieure à l'heure maximale."}}},restriction:{date:{messageSummary:"La date {value} est celle d'une entrée désactivée.",messageDetail:"La date sélectionnée n'est pas disponible. Essayez une autre date."}},regExp:{summary:"Le format est incorrect. ",detail:"Entrez des valeurs autorisées correspondant à cette expression régulière : '{pattern}'."},required:{summary:"La valeur est obligatoire.",detail:"Entrez une valeur."}},"oj-ojEditableValue":{loading:"Chargement",requiredText:"Obligatoire",helpSourceText:"En savoir plus..."},"oj-ojInputDate":{done:"Terminé",cancel:"Annuler",prevText:"Précédent",nextText:"Suiv.",currentText:"Aujourd'hui",weekHeader:"Sem.",tooltipCalendar:"Sélectionner une date.",tooltipCalendarTime:"Sélectionner une date/heure.",tooltipCalendarDisabled:"Option Sélectionner une date désactivée.",tooltipCalendarTimeDisabled:"Sélectionner une date/heure désactivée.",picker:"Sélecteur",weekText:"Semaine",datePicker:"Sélecteur de date",inputHelp:"Appuyez sur la touche de défilement vers le bas ou le haut pour accéder au calendrier.",inputHelpBoth:"Appuyez sur la touche de défilement vers le bas ou le haut pour accéder au calendrier et sur Maj+touche de défilement vers le bas ou le haut pour accéder à la liste déroulante d'heure.",dateTimeRange:{hint:{min:"",max:"",inRange:""},messageDetail:{rangeUnderflow:"",rangeOverflow:""},messageSummary:{rangeUnderflow:"",rangeOverflow:""}},dateRestriction:{hint:"",messageSummary:"",messageDetail:""}},"oj-ojInputTime":{cancelText:"Annuler",okText:"OK",currentTimeText:"Maintenant",hourWheelLabel:"Heure",minuteWheelLabel:"Minute",ampmWheelLabel:"AMPM",tooltipTime:"Sélectionner l'heure.",tooltipTimeDisabled:"Option Sélectionner une heure désactivée.",inputHelp:"Appuyez sur la touche de défilement vers le bas ou le haut pour accéder à la liste déroulante d'heure.",dateTimeRange:{hint:{min:"",max:"",inRange:""},messageDetail:{rangeUnderflow:"",rangeOverflow:""},messageSummary:{rangeUnderflow:"",rangeOverflow:""}}},"oj-inputBase":{required:{hint:"",messageSummary:"",messageDetail:""},regexp:{messageSummary:"",messageDetail:""},accessibleMaxLengthExceeded:"Longueur maximale {len} dépassée.",accessibleMaxLengthRemaining:"{chars} caractères restants."},"oj-ojInputPassword":{regexp:{messageDetail:"La valeur doit correspondre au modèle suivant : '{pattern}'."},accessibleShowPassword:"Affichez le mot de passe.",accessibleHidePassword:"Masquez le mot de passe."},"oj-ojFilmStrip":{labelAccFilmStrip:"Affichage de la page {pageIndex} sur {pageCount}",labelAccArrowNextPage:"Sélectionnez Suivant pour afficher la page suivante",labelAccArrowPreviousPage:"Sélectionnez Précédent pour afficher la page précédente",tipArrowNextPage:"Suivant",tipArrowPreviousPage:"Précédent"},"oj-ojDataGrid":{accessibleSortAscending:"{id} trié par ordre croissant",accessibleSortDescending:"{id} trié par ordre décroissant",accessibleActionableMode:"Passer au mode d'intervention.",accessibleNavigationMode:"Passer au mode de navigation ; appuyer sur F2 pour passer au mode de modification ou d'intervention.",accessibleEditableMode:"Passer au mode de modification ; appuyer sur Echap pour naviguer en dehors de la grille de données.",accessibleSummaryExact:"Il s'agit d'une grille de données avec {rownum} lignes et {colnum} colonnes",accessibleSummaryEstimate:"Il s'agit d'une grille de données avec un nombre inconnu de lignes et de colonnes",accessibleSummaryExpanded:"{num} lignes sont actuellement développées",accessibleRowExpanded:"Ligne développée",accessibleRowCollapsed:"Ligne réduite",accessibleRowSelected:"Ligne {row} sélectionnée",accessibleColumnSelected:"Colonne {column} sélectionnée",accessibleStateSelected:"sélectionné",accessibleMultiCellSelected:"{num} cellules sélectionnées",accessibleColumnSpanContext:"{extent} de large",accessibleRowSpanContext:"{extent} de haut",accessibleRowContext:"Ligne {index}",accessibleColumnContext:"Colonne {index}",accessibleRowHeaderContext:"En-tête de ligne {index}",accessibleColumnHeaderContext:"En-tête de colonne {index}",accessibleRowEndHeaderContext:"En-tête de fin de ligne {index}",accessibleColumnEndHeaderContext:"En-tête de fin de colonne {index}",accessibleRowHeaderLabelContext:"Libellé d'en-tête de ligne {level}",accessibleColumnHeaderLabelContext:"Libellé d'en-tête de colonne {level}",accessibleRowEndHeaderLabelContext:"Libellé d'en-tête de fin de ligne {level}",accessibleColumnEndHeaderLabelContext:"Libellé d'en-tête de fin de colonne {level}",accessibleLevelContext:"Niveau {level}",accessibleRangeSelectModeOn:"Mode Ajouter la plage de cellules sélectionnée activé.",accessibleRangeSelectModeOff:"Mode Ajouter la plage de cellules sélectionnée désactivé.",accessibleFirstRow:"Vous avez atteint la première ligne.",accessibleLastRow:"Vous avez atteint la dernière ligne.",accessibleFirstColumn:"Vous avez atteint la première colonne",accessibleLastColumn:"Vous avez atteint la dernière colonne.",accessibleSelectionAffordanceTop:"Poignée de sélection supérieure.",accessibleSelectionAffordanceBottom:"Poignée de sélection inférieure.",msgFetchingData:"Extraction des données...",msgNoData:"Aucun élément à afficher.",labelResize:"Redimensionner",labelResizeWidth:"Redimensionner la largeur",labelResizeHeight:"Redimensionner la hauteur",labelSortRow:"Trier la ligne",labelSortRowAsc:"Trier la ligne par ordre croissant",labelSortRowDsc:"Trier la ligne par ordre décroissant",labelSortCol:"Trier la colonne",labelSortColAsc:"Trier la colonne par ordre croissant",labelSortColDsc:"Trier la colonne par ordre décroissant",labelCut:"Couper",labelPaste:"Coller",labelEnableNonContiguous:"Activer la sélection non contiguë",labelDisableNonContiguous:"Désactiver la sélection non contiguë",labelResizeDialogSubmit:"OK",labelResizeDialogCancel:"Annuler",accessibleContainsControls:"Contient des commandes"},"oj-ojRowExpander":{accessibleLevelDescription:"Niveau {level}",accessibleRowDescription:"Niveau {level}, ligne {num} sur {total}",accessibleRowExpanded:"Ligne développée",accessibleRowCollapsed:"Ligne réduite",accessibleStateExpanded:"développé",accessibleStateCollapsed:"réduit"},"oj-ojListView":{msgFetchingData:"Extraction des données...",msgNoData:"Aucun élément à afficher.",msgItemsAppended:"{count} éléments ajoutés à la fin.",indexerCharacters:"A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z",accessibleReorderTouchInstructionText:"Touchez deux fois et maintenez la pression. Attendez l'émission du son, puis faites glisser pour réorganiser l'écran.",accessibleReorderBeforeItem:"Avant {item}",accessibleReorderAfterItem:"Après {item}",accessibleReorderInsideItem:"Dans {item}",accessibleNavigateSkipItems:"{numSkip} éléments ignorés",labelCut:"Couper",labelCopy:"Copier",labelPaste:"Coller",labelPasteBefore:"Coller avant",labelPasteAfter:"Coller après"},"oj-_ojLabel":{tooltipHelp:"Aide",tooltipRequired:"Obligatoire"},"oj-ojLabel":{tooltipHelp:"Aide",tooltipRequired:"Obligatoire"},"oj-ojInputNumber":{required:{hint:"",messageSummary:"",messageDetail:""},numberRange:{hint:{min:"",max:"",inRange:"",exact:""},messageDetail:{rangeUnderflow:"",rangeOverflow:"",exact:""},messageSummary:{rangeUnderflow:"",rangeOverflow:""}},tooltipDecrement:"Décrémenter",tooltipIncrement:"Incrémenter"},"oj-ojTable":{accessibleColumnContext:"Colonne {index}",accessibleColumnFooterContext:"Pied de page de colonne {index}",accessibleColumnHeaderContext:"En-tête de colonne {index}",accessibleRowContext:"Ligne {index}",accessibleSortable:"{id} triable",accessibleSortAscending:"{id} trié par ordre croissant",accessibleSortDescending:"{id} trié par ordre décroissant",accessibleStateSelected:"sélectionné",labelAccSelectionAffordanceTop:"Poignée de sélection supérieure",labelAccSelectionAffordanceBottom:"Poignée de sélection inférieure",labelEnableNonContiguousSelection:"Activer la sélection non contiguë",labelDisableNonContiguousSelection:"Désactiver la sélection non contiguë",labelResize:"Redimensionner",labelResizePopupSubmit:"OK",labelResizePopupCancel:"Annuler",labelResizePopupSpinner:"Redimensionner la colonne",labelSelectRow:"Sélectionner une ligne",labelEditRow:"Modifier une ligne",labelSelectAndEditRow:"Sélectionner et modifier une ligne",labelSelectColumn:"Sélectionner une colonne",labelSort:"Trier",labelSortAsc:"Trier par ordre croissant",labelSortDsc:"Trier par ordre décroissant",msgFetchingData:"Extraction des données...",msgNoData:"Aucune donnée à afficher.",msgInitializing:"Initialisation...",msgColumnResizeWidthValidation:"La valeur de largeur doit être un entier.",msgScrollPolicyMaxCountSummary:"Nombre maximal de lignes dépassé pour le défilement de table.",msgScrollPolicyMaxCountDetail:"Procédez au rechargement avec un jeu de données plus petit.",msgStatusSortAscending:"{0} trié par ordre croissant.",msgStatusSortDescending:"{0} trié par ordre décroissant."},"oj-ojTabs":{labelCut:"Couper",labelPasteBefore:"Coller avant",labelPasteAfter:"Coller après",labelRemove:"Enlever",labelReorder:"Réorganiser",removeCueText:"Peut être enlevé"},"oj-ojCheckboxset":{readonlyNoValue:"",required:{hint:"",messageSummary:"",messageDetail:""}},"oj-ojRadioset":{readonlyNoValue:"",required:{hint:"",messageSummary:"",messageDetail:""}},"oj-ojSelect":{required:{hint:"",messageSummary:"",messageDetail:""},searchField:"Champ de recherche",noMatchesFound:"Aucune correspondance trouvée",oneMatchesFound:"Une correspondance a été trouvée",moreMatchesFound:"{num} correspondances trouvées",filterFurther:"D'autres résultats sont disponibles, appliquez plus de filtres."},"oj-ojSwitch":{SwitchON:"Activé",SwitchOFF:"Désactivé"},"oj-ojCombobox":{required:{hint:"",messageSummary:"",messageDetail:""},noMatchesFound:"Aucune correspondance trouvée",oneMatchesFound:"Une correspondance a été trouvée",moreMatchesFound:"{num} correspondances trouvées",filterFurther:"D'autres résultats sont disponibles, appliquez plus de filtres."},"oj-ojSelectSingle":{required:{hint:"",messageSummary:"",messageDetail:""},noMatchesFound:"Aucune correspondance trouvée",oneMatchFound:"Une correspondance a été trouvée",multipleMatchesFound:"{num} correspondances trouvées",nOrMoreMatchesFound:"Au moins {num} correspondances trouvées",cancel:"Annuler",labelAccOpenDropdown:"Développer",labelAccClearValue:"Effacer la valeur",noResultsLine1:"Aucun résultat",noResultsLine2:"Aucun élément ne correspond à votre recherche."},"oj-ojInputSearch":{required:{hint:"",messageSummary:"",messageDetail:""},noMatchesFound:"Aucune correspondance trouvée",oneMatchesFound:"Une correspondance a été trouvée",moreMatchesFound:"{num} correspondances trouvées"},"oj-ojTree":{stateLoading:"Chargement...",labelNewNode:"Nouveau noeud",labelMultiSelection:"Sélection multiple",labelEdit:"Modifier",labelCreate:"Créer",labelCut:"Couper",labelCopy:"Copier",labelPaste:"Coller",labelPasteAfter:"Coller après",labelPasteBefore:"Coller avant",labelRemove:"Enlever",labelRename:"Renommer",labelNoData:"Aucune donnée"},"oj-ojPagingControl":{labelAccPaging:"Pagination",labelAccPageNumber:"Contenu de la page {pageNum} chargé",labelAccNavFirstPage:"Première page",labelAccNavLastPage:"Dernière page",labelAccNavNextPage:"Page suivante",labelAccNavPreviousPage:"Page précédente",labelAccNavPage:"Page",labelLoadMore:"Afficher plus...",labelLoadMoreMaxRows:"Limite maximale de {maxRows} lignes atteinte",labelNavInputPage:"Page",labelNavInputPageMax:"sur {pageMax}",fullMsgItemRange:"Eléments {pageFrom}-{pageTo} sur {pageMax}",fullMsgItemRangeAtLeast:"Eléments {pageFrom}-{pageTo} sur au moins {pageMax}",fullMsgItemRangeApprox:"Eléments {pageFrom}-{pageTo} sur environ {pageMax}",msgItemRangeNoTotal:"Eléments {pageFrom}-{pageTo}",fullMsgItem:"{pageTo} éléments sur {pageMax}",fullMsgItemAtLeast:"{pageTo} éléments sur au moins {pageMax}",fullMsgItemApprox:"{pageTo} éléments sur environ {pageMax}",msgItemNoTotal:"{pageTo} éléments",msgItemRangeCurrent:"{pageFrom}-{pageTo}",msgItemRangeCurrentSingle:"{pageFrom}",msgItemRangeOf:"sur",msgItemRangeOfAtLeast:"d'au moins",msgItemRangeOfApprox:"d'environ",msgItemRangeItems:"éléments",tipNavInputPage:"Aller à la page",tipNavPageLink:"Aller à la page {pageNum}",tipNavNextPage:"Suivant",tipNavPreviousPage:"Précédent",tipNavFirstPage:"Premier",tipNavLastPage:"Dernier",pageInvalid:{summary:"La valeur de page saisie n'est pas valide.",detail:"Entrez une valeur supérieure à 0."},maxPageLinksInvalid:{summary:"La valeur de maxPageLinks n'est pas valide.",detail:"Entrez une valeur supérieure à 4."}},"oj-ojMasonryLayout":{labelCut:"Couper",labelPasteBefore:"Coller avant",labelPasteAfter:"Coller après"},"oj-panel":{labelAccButtonExpand:"Développer",labelAccButtonCollapse:"Réduire",labelAccButtonRemove:"Enlever",labelAccFlipForward:"Inverser vers l'avant",labelAccFlipBack:"Réinverser",tipDragToReorder:"Faire glisser pour réorganiser",labelAccDragToReorder:"Faire glisser pour réorganiser, menu contextuel disponible"},"oj-ojChart":{labelDefaultGroupName:"Groupe {0}",labelSeries:"Série",labelGroup:"Groupe",labelDate:"Date",labelValue:"Valeur",labelTargetValue:"Cible",labelX:"X",labelY:"Y",labelZ:"Z",labelPercentage:"Pourcentage",labelLow:"Basse",labelHigh:"Elevée",labelOpen:"Ouverture",labelClose:"Fermeture",labelVolume:"Volume",labelQ1:"Q1",labelQ2:"Q2",labelQ3:"Q3",labelMin:"Valeur minimale",labelMax:"Valeur maximale",labelOther:"Autre",tooltipPan:"Panoramique",tooltipSelect:"Sélection par rectangle de sélection",tooltipZoom:"Zoom par rectangle de sélection",componentName:"Graphique"},"oj-dvtBaseGauge":{componentName:"Jauge"},"oj-ojDiagram":{promotedLink:"{0} lien",promotedLinks:"{0} liens",promotedLinkAriaDesc:"Indirect",componentName:"Diagramme"},"oj-ojGantt":{componentName:"Graphique de Gantt",accessibleDurationDays:"{0} jours",accessibleDurationHours:"{0} heures",accessibleTaskInfo:"Heure de début : {0}, heure de fin : {1}, durée : {2}",accessibleMilestoneInfo:"Heure : {0}",accessibleRowInfo:"Ligne : {0}",accessibleTaskTypeMilestone:"Jalon",accessibleTaskTypeSummary:"Récapitulatif",accessiblePredecessorInfo:"{0} prédécesseurs",accessibleSuccessorInfo:"{0} successeurs",accessibleDependencyInfo:"Type de dépendance {0}, connecte {1} à {2}",startStartDependencyAriaDesc:"début-début",startFinishDependencyAriaDesc:"début-fin",finishStartDependencyAriaDesc:"fin-début",finishFinishDependencyAriaDesc:"fin-fin",tooltipZoomIn:"Zoom avant",tooltipZoomOut:"Zoom arrière",labelLevel:"Niveau",labelRow:"Ligne",labelStart:"Début",labelEnd:"Fin",labelDate:"Date",labelBaselineStart:"Début de référence",labelBaselineEnd:"Fin de référence",labelBaselineDate:"Date de référence",labelLabel:"Libellé",labelProgress:"Progression",labelMoveBy:"Déplacement par",labelResizeBy:"Redimensionnement par",taskMoveInitiated:"Déplacement de tâche lancé",taskResizeEndInitiated:"Redimensionnement de la fin de la tâche lancée",taskResizeStartInitiated:"Redimensionnement du début de la tâche lancé",taskMoveSelectionInfo:"{0} autres éléments sélectionnés",taskResizeSelectionInfo:"{0} autres éléments sélectionnés",taskMoveInitiatedInstruction:"Utilisez les flèches du clavier pour le déplacement",taskResizeInitiatedInstruction:"Utiliser les flèches du clavier pour le redimensionnement",taskMoveFinalized:"Déplacement de tâche finalisé",taskResizeFinalized:"Redimensionnement de tâche finalisé",taskMoveCancelled:"Déplacement de tâche annulé",taskResizeCancelled:"Redimensionnement de tâche annulé",taskResizeStartHandle:"Poignée de redimensionnement du début de la tâche",taskResizeEndHandle:"Poignée de redimensionnement de la fin de tâche"},"oj-ojLegend":{componentName:"Légende",tooltipExpand:"Développer",tooltipCollapse:"Réduire"},"oj-ojNBox":{highlightedCount:"{0}/{1}",labelOther:"Autre",labelGroup:"Groupe",labelSize:"Taille",labelAdditionalData:"Données supplémentaires",componentName:"Zone {0}"},"oj-ojPictoChart":{componentName:"Graphique d'images"},"oj-ojSparkChart":{componentName:"Graphique"},"oj-ojSunburst":{labelColor:"Couleur",labelSize:"Taille",tooltipExpand:"Développer",tooltipCollapse:"Réduire",componentName:"Sunburst"},"oj-ojTagCloud":{componentName:"Nuage de mots-clés"},"oj-ojThematicMap":{componentName:"Carte thématique",areasRegion:"Zones",linksRegion:"Liens",markersRegion:"Marqueurs"},"oj-ojTimeAxis":{componentName:"Axe temporel"},"oj-ojTimeline":{componentName:"Chronologie",accessibleItemDesc:"La description est {0}.",accessibleItemEnd:"L'heure de fin est {0}.",accessibleItemStart:"L'heure de début est {0}.",accessibleItemTitle:"Le titre est {0}.",labelSeries:"Série",tooltipZoomIn:"Zoom avant",tooltipZoomOut:"Zoom arrière",labelStart:"Début",labelEnd:"Fin",labelDate:"Date",labelTitle:"Titre",labelDescription:"Description"},"oj-ojTreemap":{labelColor:"Couleur",labelSize:"Taille",tooltipIsolate:"Isoler",tooltipRestore:"Restaurer",componentName:"Vue Treemap"},"oj-dvtBaseComponent":{labelScalingSuffixThousand:"K",labelScalingSuffixMillion:"M",labelScalingSuffixBillion:"B",labelScalingSuffixTrillion:"T",labelScalingSuffixQuadrillion:"Q",labelInvalidData:"Données non valides",labelNoData:"Aucune donnée à afficher",labelClearSelection:"Effacer la sélection",labelDataVisualization:"Visualisation des données",stateSelected:"Sélectionné",stateUnselected:"Non sélectionné",stateMaximized:"Agrandi",stateMinimized:"Réduit",stateExpanded:"Développé",stateCollapsed:"Réduit",stateIsolated:"Isolé",stateHidden:"Masqué",stateVisible:"Visible",stateDrillable:"Explorable",labelAndValue:"{0}: {1}",labelCountWithTotal:"{0} sur {1}"},"oj-ojNavigationList":{defaultRootLabel:"Liste de navigation",hierMenuBtnLabel:"Bouton de menu hiérarchique",selectedLabel:"sélectionné",previousIcon:"Précédent",msgFetchingData:"Extraction des données...",msgNoData:"Aucun élément à afficher.",overflowItemLabel:"Plus",accessibleReorderTouchInstructionText:"Touchez deux fois et maintenez la pression. Attendez l'émission du son, puis faites glisser pour réorganiser l'écran.",accessibleReorderBeforeItem:"Avant {item}",accessibleReorderAfterItem:"Après {item}",labelCut:"Couper",labelPasteBefore:"Coller avant",labelPasteAfter:"Coller après",labelRemove:"Enlever",removeCueText:"Peut être enlevé"},"oj-ojSlider":{noValue:"ojSlider n'a aucune valeur",maxMin:"La valeur maximale ne doit pas être inférieure ou égale à la valeur minimale",startEnd:"value.start ne doit pas être supérieure à value.end",valueRange:"La valeur doit être comprise dans la plage des valeurs minimales à maximales",optionNum:"L'option {option} n'est pas un nombre",invalidStep:"Etape non valide. Elle doit être > 0",lowerValueThumb:"curseur de valeur inférieure",higherValueThumb:"curseur de valeur supérieure"},"oj-ojDialog":{labelCloseIcon:"Fermeture"},"oj-ojPopup":{ariaLiveRegionInitialFocusFirstFocusable:"Accès à la fenêtre instantanée. Appuyez sur F6 pour naviguer entre la fenêtre instantanée et le contrôle associé.",ariaLiveRegionInitialFocusNone:"Fenêtre instantanée ouverte. Appuyez sur F6 pour naviguer entre la fenêtre instantanée et le contrôle associé.",ariaLiveRegionInitialFocusFirstFocusableTouch:"Accès à la fenêtre instantanée. Pour fermer cette fenêtre, accédez au dernier lien qu'elle contient.",ariaLiveRegionInitialFocusNoneTouch:"Fenêtre instantanée ouverte. Accédez au lien suivant pour définir le focus dans la fenêtre instantanée.",ariaFocusSkipLink:"Touchez deux fois pour accéder à la fenêtre instantanée ouverte.",ariaCloseSkipLink:"Touchez deux fois pour fermer la fenêtre instantanée ouverte."},"oj-ojRefresher":{ariaRefreshLink:"Activer le lien pour actualiser le contenu",ariaRefreshingLink:"Actualisation du contenu",ariaRefreshCompleteLink:"Actualisation terminée"},"oj-ojSwipeActions":{ariaShowStartActionsDescription:"Afficher les actions de début",ariaShowEndActionsDescription:"Afficher les actions de fin",ariaHideActionsDescription:"Masquer les actions"},"oj-ojIndexer":{indexerCharacters:"A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z",indexerOthers:"#",ariaDisabledLabel:"Aucun en-tête de groupe correspondant",ariaOthersLabel:"nombre",ariaInBetweenText:"Entre {first} et {second}",ariaKeyboardInstructionText:"Appuyez sur Entrée pour sélectionner une valeur.",ariaTouchInstructionText:"Touchez deux fois et maintenez le toucher pour passer en mode d'opération, puis faites glisser vers le haut ou le bas pour ajuster la valeur."},"oj-ojMenu":{labelCancel:"Annuler",ariaFocusSkipLink:"Le focus est dans le menu, touchez deux fois ou faites glisser le focus pour le déplacer vers le premier élément de menu."},"oj-ojColorSpectrum":{labelHue:"Teinte",labelOpacity:"Opacité",labelSatLum:"Saturation/Luminance",labelThumbDesc:"Curseur quadridirectionnel du spectre de couleurs."},"oj-ojColorPalette":{labelNone:"Aucun"},"oj-ojColorPicker":{labelSwatches:"Echantillons de couleur",labelCustomColors:"Couleurs personnalisées",labelPrevColor:"Couleur précédente",labelDefColor:"Couleur par défaut",labelDelete:"Supprimer",labelDeleteQ:"Supprimer ?",labelAdd:"Ajouter",labelAddColor:"Ajouter une couleur",labelMenuHex:"HEX",labelMenuRgba:"RGBa",labelMenuHsla:"HSLa",labelSliderHue:"Teinte",labelSliderSaturation:"Saturation",labelSliderSat:"Sat",labelSliderLightness:"Clarté",labelSliderLum:"Luminosité",labelSliderAlpha:"Alpha",labelOpacity:"Opacité",labelSliderRed:"Rouge",labelSliderGreen:"Vert",labelSliderBlue:"Bleu"},"oj-ojFilePicker":{dropzoneText:"Déplacer les fichiers ici ou cliquer pour les télécharger",singleFileUploadError:"Téléchargez un fichier à la fois.",singleFileTypeUploadError:"Vous ne pouvez pas télécharger des fichiers de type {fileType}.",multipleFileTypeUploadError:"Vous ne pouvez pas télécharger des fichiers de type {fileTypes}.",dropzonePrimaryText:"Glisser-déplacer",secondaryDropzoneText:"Sélectionner un fichier ou en déplacer un ici.",secondaryDropzoneTextMultiple:"Sélectionner des fichiers ou en déplacer ici.",unknownFileType:"inconnu"},"oj-ojProgressbar":{ariaIndeterminateProgressText:"En cours"},"oj-ojMessage":{labelCloseIcon:"Fermeture",categories:{error:"Erreur",warning:"Avertissement",info:"Informations",confirmation:"Confirmation"}},"oj-ojSelector":{checkboxAriaLabel:"Sélection de case à cocher {rowKey}"},"oj-ojMessages":{labelLandmark:"Messages",ariaLiveRegion:{navigationFromKeyboard:"Accès à la région des messages. Appuyez sur F6 pour revenir à l'élément sélectionné précédent.",navigationToTouch:"La région des messages en comporte de nouveaux. Utilisez le rotor de commande vocale pour accéder au repère des messages.",navigationToKeyboard:"La région des messages en comporte de nouveaux. Appuyez sur F6 pour revenir à la région du message le plus récent.",newMessage:"Catégorie de message {category}. {summary}. {detail}."}},"oj-ojConveyorBelt":{tipArrowNext:"Suivant",tipArrowPrevious:"Précédent"}});
/**********************************************************************/ /* ____ ____ */ /* / /\/ / */ /* /___/ \ / */ /* \ \ \/ */ /* \ \ Copyright (c) 2003-2009 Xilinx, Inc. */ /* / / All Right Reserved. */ /* /---/ /\ */ /* \ \ / \ */ /* \___\/\___\ */ /***********************************************************************/ /* This file is designed for use with ISim build 0xc3576ebc */ #define XSI_HIDE_SYMBOL_SPEC true #include "xsi.h" #include <memory.h> #ifdef __GNUC__ #include <stdlib.h> #else #include <malloc.h> #define alloca _alloca #endif static const char *ng0 = "v:/hipsBuilds/P_hips_v05.0/rst/hips/gtxe1/B_GTXE1_enc.v"; static int ng1[] = {1, 0}; static int ng2[] = {1414681925, 0, 0, 0}; static int ng3[] = {1095521093, 0, 70, 0}; static int ng4[] = {0, 0}; static const char *ng5 = "ERROR: Invalid POLARITY value (%0s)"; static int ng6[] = {1414681925, 0}; static int ng7[] = {48, 0}; static unsigned int ng8[] = {0U, 0U}; static unsigned int ng9[] = {1U, 0U}; static int ng10[] = {49, 0}; static void Initial_59039_0(char *t0) { char *t1; char *t2; int t3; char *t4; char *t5; char *t6; int t7; int t8; char *t9; char *t10; LAB0: xsi_set_current_line(59040, ng0); LAB2: xsi_set_current_line(59045, ng0); t1 = ((char*)((ng1))); t2 = (t0 + 3088); xsi_vlogvar_assign_value(t2, t1, 0, 0, 32); xsi_set_current_line(59050, ng0); t1 = ((char*)((ng2))); LAB3: t2 = ((char*)((ng2))); t3 = xsi_vlog_unsigned_case_compare(t1, 32, t2, 40); if (t3 == 1) goto LAB4; LAB5: t2 = ((char*)((ng3))); t3 = xsi_vlog_unsigned_case_compare(t1, 32, t2, 40); if (t3 == 1) goto LAB6; LAB7: LAB9: LAB8: xsi_set_current_line(59053, ng0); LAB11: xsi_set_current_line(59054, ng0); t2 = ((char*)((ng6))); xsi_vlogfile_write(1, 0, 0, ng5, 2, t0, (char)118, t2, 32); xsi_set_current_line(59055, ng0); xsi_vlog_finish(1); LAB10: xsi_set_current_line(59059, ng0); t2 = ((char*)((ng7))); LAB12: t4 = ((char*)((ng4))); t3 = xsi_vlog_unsigned_case_compare(t2, 8, t4, 32); if (t3 == 1) goto LAB13; LAB14: t4 = ((char*)((ng7))); t3 = xsi_vlog_unsigned_case_compare(t2, 8, t4, 32); if (t3 == 1) goto LAB15; LAB16: t5 = ((char*)((ng8))); t7 = xsi_vlog_unsigned_case_compare(t2, 8, t5, 32); if (t7 == 1) goto LAB17; LAB18: t6 = ((char*)((ng1))); t8 = xsi_vlog_unsigned_case_compare(t2, 8, t6, 32); if (t8 == 1) goto LAB19; LAB20: t4 = ((char*)((ng10))); t3 = xsi_vlog_unsigned_case_compare(t2, 8, t4, 32); if (t3 == 1) goto LAB21; LAB22: t5 = ((char*)((ng9))); t7 = xsi_vlog_unsigned_case_compare(t2, 8, t5, 32); if (t7 == 1) goto LAB23; LAB24: LAB26: LAB25: xsi_set_current_line(59062, ng0); t6 = ((char*)((ng9))); t9 = (t0 + 2768); xsi_vlogvar_wait_assign_value(t9, t6, 0, 0, 1, 0LL); LAB27: LAB1: return; LAB4: xsi_set_current_line(59051, ng0); t4 = ((char*)((ng1))); t5 = (t0 + 2928); xsi_vlogvar_wait_assign_value(t5, t4, 0, 0, 1, 0LL); goto LAB10; LAB6: xsi_set_current_line(59052, ng0); t4 = ((char*)((ng4))); t5 = (t0 + 2928); xsi_vlogvar_wait_assign_value(t5, t4, 0, 0, 1, 0LL); goto LAB10; LAB13: xsi_set_current_line(59060, ng0); t5 = ((char*)((ng8))); t6 = (t0 + 2768); xsi_vlogvar_wait_assign_value(t6, t5, 0, 0, 1, 0LL); goto LAB27; LAB15: goto LAB13; LAB17: goto LAB13; LAB19: xsi_set_current_line(59061, ng0); t9 = ((char*)((ng9))); t10 = (t0 + 2768); xsi_vlogvar_wait_assign_value(t10, t9, 0, 0, 1, 0LL); goto LAB27; LAB21: goto LAB19; LAB23: goto LAB19; } static void Cont_59068_1(char *t0) { char *t1; char *t2; char *t3; char *t4; char *t5; char *t6; char *t7; char *t8; char *t9; unsigned int t10; unsigned int t11; char *t12; unsigned int t13; unsigned int t14; char *t15; unsigned int t16; unsigned int t17; char *t18; LAB0: t1 = (t0 + 4256U); t2 = *((char **)t1); if (t2 == 0) goto LAB2; LAB3: goto *t2; LAB2: xsi_set_current_line(59068, ng0); t2 = (t0 + 2768); t3 = (t2 + 56U); t4 = *((char **)t3); t5 = (t0 + 5448); t6 = (t5 + 56U); t7 = *((char **)t6); t8 = (t7 + 56U); t9 = *((char **)t8); memset(t9, 0, 8); t10 = 1U; t11 = t10; t12 = (t4 + 4); t13 = *((unsigned int *)t4); t10 = (t10 & t13); t14 = *((unsigned int *)t12); t11 = (t11 & t14); t15 = (t9 + 4); t16 = *((unsigned int *)t9); *((unsigned int *)t9) = (t16 | t10); t17 = *((unsigned int *)t15); *((unsigned int *)t15) = (t17 | t11); xsi_driver_vfirst_trans(t5, 0, 0); t18 = (t0 + 5320); *((int *)t18) = 1; LAB1: return; } static void Cont_59071_2(char *t0) { char t3[8]; char t4[8]; char t8[8]; char *t1; char *t2; char *t5; char *t6; char *t7; char *t9; unsigned int t10; unsigned int t11; unsigned int t12; unsigned int t13; unsigned int t14; char *t15; char *t16; unsigned int t17; unsigned int t18; unsigned int t19; char *t20; char *t21; unsigned int t22; unsigned int t23; unsigned int t24; unsigned int t25; char *t26; char *t27; char *t28; char *t29; char *t30; char *t31; char *t32; unsigned int t33; unsigned int t34; char *t35; unsigned int t36; unsigned int t37; char *t38; unsigned int t39; unsigned int t40; char *t41; LAB0: t1 = (t0 + 4504U); t2 = *((char **)t1); if (t2 == 0) goto LAB2; LAB3: goto *t2; LAB2: xsi_set_current_line(59071, ng0); t2 = (t0 + 3088); t5 = (t2 + 56U); t6 = *((char **)t5); t7 = ((char*)((ng4))); memset(t8, 0, 8); xsi_vlog_signed_greater(t8, 32, t6, 32, t7, 32); memset(t4, 0, 8); t9 = (t8 + 4); t10 = *((unsigned int *)t9); t11 = (~(t10)); t12 = *((unsigned int *)t8); t13 = (t12 & t11); t14 = (t13 & 1U); if (t14 != 0) goto LAB4; LAB5: if (*((unsigned int *)t9) != 0) goto LAB6; LAB7: t16 = (t4 + 4); t17 = *((unsigned int *)t4); t18 = *((unsigned int *)t16); t19 = (t17 || t18); if (t19 > 0) goto LAB8; LAB9: t22 = *((unsigned int *)t4); t23 = (~(t22)); t24 = *((unsigned int *)t16); t25 = (t23 || t24); if (t25 > 0) goto LAB10; LAB11: if (*((unsigned int *)t16) > 0) goto LAB12; LAB13: if (*((unsigned int *)t4) > 0) goto LAB14; LAB15: memcpy(t3, t27, 8); LAB16: t28 = (t0 + 5512); t29 = (t28 + 56U); t30 = *((char **)t29); t31 = (t30 + 56U); t32 = *((char **)t31); memset(t32, 0, 8); t33 = 1U; t34 = t33; t35 = (t3 + 4); t36 = *((unsigned int *)t3); t33 = (t33 & t36); t37 = *((unsigned int *)t35); t34 = (t34 & t37); t38 = (t32 + 4); t39 = *((unsigned int *)t32); *((unsigned int *)t32) = (t39 | t33); t40 = *((unsigned int *)t38); *((unsigned int *)t38) = (t40 | t34); xsi_driver_vfirst_trans_delayed(t28, 0, 0, 10LL, 0); t41 = (t0 + 5336); *((int *)t41) = 1; LAB1: return; LAB4: *((unsigned int *)t4) = 1; goto LAB7; LAB6: t15 = (t4 + 4); *((unsigned int *)t4) = 1; *((unsigned int *)t15) = 1; goto LAB7; LAB8: t20 = (t0 + 1728U); t21 = *((char **)t20); goto LAB9; LAB10: t20 = (t0 + 2768); t26 = (t20 + 56U); t27 = *((char **)t26); goto LAB11; LAB12: xsi_vlog_unsigned_bit_combine(t3, 1, t21, 1, t27, 1); goto LAB16; LAB14: memcpy(t3, t21, 8); goto LAB16; } static void Cont_59072_3(char *t0) { char t3[8]; char t4[8]; char t5[8]; char *t1; char *t2; char *t6; unsigned int t7; unsigned int t8; unsigned int t9; unsigned int t10; unsigned int t11; char *t12; char *t13; unsigned int t14; unsigned int t15; unsigned int t16; unsigned int t17; unsigned int t18; char *t19; char *t20; unsigned int t21; unsigned int t22; unsigned int t23; char *t24; unsigned int t25; unsigned int t26; unsigned int t27; unsigned int t28; char *t29; char *t30; char *t31; char *t32; char *t33; char *t34; unsigned int t35; unsigned int t36; char *t37; unsigned int t38; unsigned int t39; char *t40; unsigned int t41; unsigned int t42; char *t43; LAB0: t1 = (t0 + 4752U); t2 = *((char **)t1); if (t2 == 0) goto LAB2; LAB3: goto *t2; LAB2: xsi_set_current_line(59072, ng0); t2 = (t0 + 2048U); t6 = *((char **)t2); memset(t5, 0, 8); t2 = (t6 + 4); t7 = *((unsigned int *)t2); t8 = (~(t7)); t9 = *((unsigned int *)t6); t10 = (t9 & t8); t11 = (t10 & 1U); if (t11 != 0) goto LAB7; LAB5: if (*((unsigned int *)t2) == 0) goto LAB4; LAB6: t12 = (t5 + 4); *((unsigned int *)t5) = 1; *((unsigned int *)t12) = 1; LAB7: memset(t4, 0, 8); t13 = (t5 + 4); t14 = *((unsigned int *)t13); t15 = (~(t14)); t16 = *((unsigned int *)t5); t17 = (t16 & t15); t18 = (t17 & 1U); if (t18 != 0) goto LAB8; LAB9: if (*((unsigned int *)t13) != 0) goto LAB10; LAB11: t20 = (t4 + 4); t21 = *((unsigned int *)t4); t22 = *((unsigned int *)t20); t23 = (t21 || t22); if (t23 > 0) goto LAB12; LAB13: t25 = *((unsigned int *)t4); t26 = (~(t25)); t27 = *((unsigned int *)t20); t28 = (t26 || t27); if (t28 > 0) goto LAB14; LAB15: if (*((unsigned int *)t20) > 0) goto LAB16; LAB17: if (*((unsigned int *)t4) > 0) goto LAB18; LAB19: memcpy(t3, t30, 8); LAB20: t29 = (t0 + 5576); t31 = (t29 + 56U); t32 = *((char **)t31); t33 = (t32 + 56U); t34 = *((char **)t33); memset(t34, 0, 8); t35 = 1U; t36 = t35; t37 = (t3 + 4); t38 = *((unsigned int *)t3); t35 = (t35 & t38); t39 = *((unsigned int *)t37); t36 = (t36 & t39); t40 = (t34 + 4); t41 = *((unsigned int *)t34); *((unsigned int *)t34) = (t41 | t35); t42 = *((unsigned int *)t40); *((unsigned int *)t40) = (t42 | t36); xsi_driver_vfirst_trans(t29, 0, 0); t43 = (t0 + 5352); *((int *)t43) = 1; LAB1: return; LAB4: *((unsigned int *)t5) = 1; goto LAB7; LAB8: *((unsigned int *)t4) = 1; goto LAB11; LAB10: t19 = (t4 + 4); *((unsigned int *)t4) = 1; *((unsigned int *)t19) = 1; goto LAB11; LAB12: t24 = ((char*)((ng9))); goto LAB13; LAB14: t29 = (t0 + 2208U); t30 = *((char **)t29); goto LAB15; LAB16: xsi_vlog_unsigned_bit_combine(t3, 1, t24, 1, t30, 1); goto LAB20; LAB18: memcpy(t3, t24, 8); goto LAB20; } static void Cont_59073_4(char *t0) { char t3[8]; char t4[8]; char t24[8]; char *t1; char *t2; char *t5; char *t6; char *t7; unsigned int t8; unsigned int t9; unsigned int t10; unsigned int t11; unsigned int t12; char *t13; char *t14; unsigned int t15; unsigned int t16; unsigned int t17; char *t18; char *t19; unsigned int t20; unsigned int t21; unsigned int t22; unsigned int t23; char *t25; unsigned int t26; unsigned int t27; unsigned int t28; unsigned int t29; unsigned int t30; char *t31; char *t32; char *t33; unsigned int t34; unsigned int t35; unsigned int t36; unsigned int t37; unsigned int t38; unsigned int t39; unsigned int t40; unsigned int t41; char *t42; char *t43; char *t44; char *t45; char *t46; unsigned int t47; unsigned int t48; char *t49; unsigned int t50; unsigned int t51; char *t52; unsigned int t53; unsigned int t54; char *t55; LAB0: t1 = (t0 + 5000U); t2 = *((char **)t1); if (t2 == 0) goto LAB2; LAB3: goto *t2; LAB2: xsi_set_current_line(59073, ng0); t2 = (t0 + 2928); t5 = (t2 + 56U); t6 = *((char **)t5); memset(t4, 0, 8); t7 = (t6 + 4); t8 = *((unsigned int *)t7); t9 = (~(t8)); t10 = *((unsigned int *)t6); t11 = (t10 & t9); t12 = (t11 & 1U); if (t12 != 0) goto LAB4; LAB5: if (*((unsigned int *)t7) != 0) goto LAB6; LAB7: t14 = (t4 + 4); t15 = *((unsigned int *)t4); t16 = *((unsigned int *)t14); t17 = (t15 || t16); if (t17 > 0) goto LAB8; LAB9: t20 = *((unsigned int *)t4); t21 = (~(t20)); t22 = *((unsigned int *)t14); t23 = (t21 || t22); if (t23 > 0) goto LAB10; LAB11: if (*((unsigned int *)t14) > 0) goto LAB12; LAB13: if (*((unsigned int *)t4) > 0) goto LAB14; LAB15: memcpy(t3, t24, 8); LAB16: t42 = (t0 + 5640); t43 = (t42 + 56U); t44 = *((char **)t43); t45 = (t44 + 56U); t46 = *((char **)t45); memset(t46, 0, 8); t47 = 1U; t48 = t47; t49 = (t3 + 4); t50 = *((unsigned int *)t3); t47 = (t47 & t50); t51 = *((unsigned int *)t49); t48 = (t48 & t51); t52 = (t46 + 4); t53 = *((unsigned int *)t46); *((unsigned int *)t46) = (t53 | t47); t54 = *((unsigned int *)t52); *((unsigned int *)t52) = (t54 | t48); xsi_driver_vfirst_trans(t42, 0, 0); t55 = (t0 + 5368); *((int *)t55) = 1; LAB1: return; LAB4: *((unsigned int *)t4) = 1; goto LAB7; LAB6: t13 = (t4 + 4); *((unsigned int *)t4) = 1; *((unsigned int *)t13) = 1; goto LAB7; LAB8: t18 = (t0 + 2368U); t19 = *((char **)t18); goto LAB9; LAB10: t18 = (t0 + 2368U); t25 = *((char **)t18); memset(t24, 0, 8); t18 = (t25 + 4); t26 = *((unsigned int *)t18); t27 = (~(t26)); t28 = *((unsigned int *)t25); t29 = (t28 & t27); t30 = (t29 & 1U); if (t30 != 0) goto LAB20; LAB18: if (*((unsigned int *)t18) == 0) goto LAB17; LAB19: t31 = (t24 + 4); *((unsigned int *)t24) = 1; *((unsigned int *)t31) = 1; LAB20: t32 = (t24 + 4); t33 = (t25 + 4); t34 = *((unsigned int *)t25); t35 = (~(t34)); *((unsigned int *)t24) = t35; *((unsigned int *)t32) = 0; if (*((unsigned int *)t33) != 0) goto LAB22; LAB21: t40 = *((unsigned int *)t24); *((unsigned int *)t24) = (t40 & 1U); t41 = *((unsigned int *)t32); *((unsigned int *)t32) = (t41 & 1U); goto LAB11; LAB12: xsi_vlog_unsigned_bit_combine(t3, 1, t19, 1, t24, 1); goto LAB16; LAB14: memcpy(t3, t19, 8); goto LAB16; LAB17: *((unsigned int *)t24) = 1; goto LAB20; LAB22: t36 = *((unsigned int *)t24); t37 = *((unsigned int *)t33); *((unsigned int *)t24) = (t36 | t37); t38 = *((unsigned int *)t32); t39 = *((unsigned int *)t33); *((unsigned int *)t32) = (t38 | t39); goto LAB21; } extern void secureip_m_00000000002045827579_1592503575_init() { static char *pe[] = {(void *)Initial_59039_0,(void *)Cont_59068_1,(void *)Cont_59071_2,(void *)Cont_59072_3,(void *)Cont_59073_4}; xsi_register_didat("secureip_m_00000000002045827579_1592503575", "isim/top_test_bench.exe.sim/secureip/m_00000000002045827579_1592503575.didat"); xsi_register_executes(pe); }
from ramda.curry import curry from ramda.reduce import reduce from .multiply import multiply product = reduce(multiply, 1)
import os import runpy from pathlib import Path import pytest from qtpy import API_NAME import napari from napari.utils.notifications import notification_manager from napari._tests.utils import slow # not testing these examples skip = [ 'surface_timeseries.py', # needs nilearn '3d_kymograph.py', # needs tqdm 'live_tiffs.py', # requires files 'tiled-rendering-2d.py', # too slow 'live_tiffs_generator.py', 'points-over-time.py', # too resource hungry 'embed_ipython.py', # fails without monkeypatch 'custom_key_bindings.py', # breaks EXPECTED_NUMBER_OF_VIEWER_METHODS later 'new_theme.py', # testing theme is extremely slow on CI 'dynamic-projections-dask.py', # extremely slow / does not finish ] if os.environ.get('MIN_REQ', '') == '1': skip.extend(['spheres.py', 'clipping_planes_interactive.py']) EXAMPLE_DIR = Path(napari.__file__).parent.parent / 'examples' # using f.name here and re-joining at `run_path()` for test key presentation # (works even if the examples list is empty, as opposed to using an ids lambda) examples = [f.name for f in EXAMPLE_DIR.glob("*.py") if f.name not in skip] # still some CI segfaults, but only on windows with pyqt5 if os.getenv("CI") and os.name == 'nt' and API_NAME == 'PyQt5': examples = [] if os.getenv("CI") and os.name == 'nt': if 'to_screenshot.py' in examples: examples.remove('to_screenshot.py') @pytest.fixture def qapp(): from qtpy.QtCore import QTimer from napari._qt.qt_event_loop import get_app # it's important that we use get_app so that it connects to the # app.aboutToQuit.connect(wait_for_workers_to_quit) app = get_app() # quit examples that explicitly start the event loop with `napari.run()` # so that tests aren't waiting on a manual exit QTimer.singleShot(100, app.quit) yield app @slow(30) @pytest.mark.filterwarnings("ignore") @pytest.mark.skipif(not examples, reason="No examples were found.") @pytest.mark.parametrize("fname", examples) def test_examples(qapp, fname, monkeypatch, capsys): """Test that all of our examples are still working without warnings.""" from napari._qt.qt_main_window import Window from napari import Viewer # hide viewer window monkeypatch.setattr(Window, 'show', lambda *a: None) # make sure our sys.excepthook override doesn't hide errors def raise_errors(etype, value, tb): raise value monkeypatch.setattr(notification_manager, 'receive_error', raise_errors) # run the example! try: runpy.run_path(str(EXAMPLE_DIR / fname)) except SystemExit as e: # we use sys.exit(0) to gracefully exit from examples if e.code != 0: raise finally: Viewer.close_all()
'use strict'; angular.module('pOSDesignPatternsExerciseApp') .factory('Register', function ($resource) { return $resource('api/register', {}, { }); });
from typing import Dict, Tuple, List import sys import re import time from multiprocessing import Pool from . import NED as N from WikiParser import Parser as P import importlib importlib.reload( N ) importlib.reload( P ) class DatasetDocument: """ Auxiliary class to process dataset documents in parallel. """ def __init__( self, docTitle: str, tokens: List[str], surfaceForms: Dict[str, List[Tuple[int, int]]], expectedMappings: Dict[str, int], startTime: float ): """ Constructor. :param docTitle: Document title. :param tokens: List of ordered tokens. :param surfaceForms: Surface forms detected with tuples for their ocurrences in the token list. :param expectedMappings: For each surface form the expected mapping entity ID. :param startTime: When we started processing this document. """ self.docTitle = docTitle self.tokens = tokens self.surfaceForms = surfaceForms self.expectedMappings = expectedMappings self.startTime = startTime class Task: """ Execute a particular disambiguation task. """ _DocTitlePattern = re.compile( r"^-DOCSTART-\s+\((\w+)\s+.+?\)$", re.I ) # Dataset document title pattern. debug = True # Debug NED mode (i.e. print messages). @staticmethod def evaluateAccuracy( datasetPath: str ): """ Evaluate accuracy of current model against the CoNLL 2003 dataset. :param datasetPath: The annotated dataset input file path. """ total = 0 # Total number of "intended" surface forms. totalCorrect = 0 # Total number of correctly mapped surface forms. totalNIL = 0 # Total number of surface forms with no candidate mappings in the KB. totalDocs = 0 totalStartTime = startTime = time.time() print( "**************************** Evaluating Accuracy ****************************" ) with open( datasetPath, "r", encoding="utf-8" ) as file: documentHasContents = False tokens: List[str] = [] # Tokens of individual documents in the dataset. surfaceForms: Dict[str, List[Tuple[int, int]]] = {} # Surface forms indices in tokens to be sent to NED object. expectedMappings: Dict[str, int] = {} # Expected entity IDs for each (different) surface form. docTitle = "" sfTokensStart = -1 # Keep track of token delimiter indices for a surface form: [sfTokenStart, sfTokenEnd). tokensIndex = -1 processingSF = "" # Currently processing tokens for this surface form. MAX_CHUNK_COUNT = 100 # Accumulate documents to process in parallel in this list. chunks: List[DatasetDocument] = [] for line in file.readlines(): line = line.strip() if not line: continue if line.find( "-DOCSTART-" ) == 0: # New document? if documentHasContents: # First process previously loaded document if any. if sfTokensStart > 0: # Check whether we were reading tokens of a "last" named entity. surfaceForms[processingSF].append( (sfTokensStart, tokensIndex) ) # Add dataset document to chunks and check if we start processing the latter. chunks.append( DatasetDocument( docTitle, tokens, surfaceForms, expectedMappings, startTime ) ) if len( chunks ) == MAX_CHUNK_COUNT: totals = Task._processDatasetChunks( chunks ) total += totals[0] # Accumulate results. totalCorrect += totals[1] totalNIL += totals[2] totalDocs += totals[3] chunks = [] elif docTitle: # Skip error if this is the first document. print( "[!]", docTitle, "has no contents!", sys.stderr ) documentHasContents = False tokens = [] surfaceForms = {} expectedMappings = {} # Reset structs to "make space" for new dataset document just coming up. docTitle = Task._DocTitlePattern.match( line ).group( 1 ) tokensIndex = 0 # Ready to read first token. sfTokensStart = -1 startTime = time.time() print( ">> Now processing document", docTitle, "..." ) else: # Process doc's line content: one token per line, but possibly line is split in several columns. parts = line.split( "\t" ) if len( parts ) >= 4: # token \t (B|I) \t surfaceForm \t (WikiName|--NME--). if parts[3] != "--NME--": # Skip unidentified entities. if parts[1] == "B": # Beginning of entity mention? if sfTokensStart > 0: # But we were reading another surface form? surfaceForms[processingSF].append( (sfTokensStart, tokensIndex) ) # Finish adding it before getting the new sf. sf = parts[2].lower() expectedMappings[sf] = int( parts[5] ) # Expected entity mapping ID. if surfaceForms.get( sf ) is None: surfaceForms[sf] = [] # Prepare to add new surface form list of tuple occurences. sfTokensStart = tokensIndex processingSF = sf elif sfTokensStart > 0: # Finish adding surface form if any. surfaceForms[processingSF].append( (sfTokensStart, tokensIndex) ) sfTokensStart = -1 elif sfTokensStart > 0: # Were we reading tokens for an entity mention? surfaceForms[processingSF].append( ( sfTokensStart, tokensIndex ) ) sfTokensStart = -1 # Change state to now reading regular tokens. documentHasContents = True tokens.append( parts[0].lower().strip() ) tokensIndex += 1 # Basically keeps track of all valid tokens in doc. if documentHasContents: # Process last loaded document if any. if sfTokensStart > 0: # Check whether we were reading tokens of a "last" named entity. surfaceForms[processingSF].append( (sfTokensStart, tokensIndex) ) chunks.append( DatasetDocument( docTitle, tokens, surfaceForms, expectedMappings, startTime ) ) totals = Task._processDatasetChunks( chunks ) total += totals[0] # Accumulate results. totalCorrect += totals[1] totalNIL += totals[2] totalDocs += totals[3] # Present statistics. print( "\n------------------------------- Statistics ------------------------------" ) print( "+ Documents:", totalDocs ) print( "+ Surface forms:", total ) print( " Correct:", totalCorrect ) print( " NIL:", totalNIL ) print( "+ Processing time: ", time.time() - totalStartTime, "secs." ) @staticmethod def _processDatasetChunks( chunks: List[DatasetDocument] ) -> Tuple[int, int, int, int]: """ Process groups of dataset documents in parallel. :param chunks: Group of dataset documents. :return: Tuple containing (Total no. of surface forms, Total no. of correct mappings, Total no. of NIL, Total no. of effective docs). """ pool = Pool() stats = pool.map( Task._processDatasetDocument, chunks ) # Each document object in its own thread. pool.close() pool.join() # Close pool and wait for work to finish. total = 0 # Surface forms intented. totalCorrect = 0 # Surface forms correctly matched. totalNIL = 0 # Surface forms with no candidates. totalDocs = 0 # Number of effective, nonempty dataset documents. for totals in stats: # Accumulate results. if totals[0] - totals[2] > 0: # There can be the case that a doc has X surface forms, but none is in the KB. total += totals[0] # So we only count effective docs. totalCorrect += totals[1] totalNIL += totals[2] totalDocs += 1 return total, totalCorrect, totalNIL, totalDocs @staticmethod def _processDatasetDocument( datasetDocument: DatasetDocument ) -> (int, int, int): """ Process and evaluate accuracy of an individual dataset document. :param datasetDocument: Document to process. :return: A tuple (Total no. of surface forms, Total no. of correct mappings, Total no. of NIL). """ # Extract inputs. tokens = datasetDocument.tokens surfaceForms = datasetDocument.surfaceForms expectedMappings = datasetDocument.expectedMappings ned = N.NED( Task.debug ) # A NED object opens its own connection to the Mongo "ned" DB. results = ned.go( tokens, surfaceForms ) # Evaluation. # Comparison to expected entities. total = 0 # Total number of "intended" surface forms. totalCorrect = 0 # Total number of correctly mapped surface forms. totalNIL = 0 # Total number of surface forms with no candidate mappings in the KB. for sf, eId in expectedMappings.items(): total += 1 if results.get( sf ) is not None: if results[sf][0] == eId: totalCorrect += 1 else: totalNIL += 1 # Print with tabs for postprocessing stats: only docs for which there ARE entities to disambiguate. if total - totalNIL > 0: print( "<< Done with doc", datasetDocument.docTitle, "after", time.time() - datasetDocument.startTime, "secs.", "Stats:\t", total, "\t", totalCorrect, "\t", totalNIL, "\t", totalCorrect / (total - totalNIL) ) return total, totalCorrect, totalNIL @staticmethod def disambiguateTextFile( filePath: str ) -> Dict[str, Tuple[int, str]]: """ Disambiguate a 'unique document' text file. :param filePath: Path to file to disambiguate :return: Dictionary with surface forms and mapping entities """ print( "**************************** Disambiguating Named Entities in Text ****************************" ) ned = N.NED( Task.debug ) # NED object opens its own connection to the Mongo "ned" DB. with open( filePath, "r", encoding="utf-8" ) as file: text = file.read().lower() # Important! Text has to be lowercased. ### Extract named entities and tokenize text ### tokens: List[str] = [] surfaceForms: Dict[str, List[Tuple[int, int]]] = {} # Saves surface form and where in the tokens list it appears: [start, end). i = 0 # Start from beginning of text. s = text.find( "[[", i ) while s != -1: e = text.find( "]]", s ) if e == -1: # Missing closing ]]? print( "[x] Missing ']]' to enclose a named entity. Check the input text!", file=sys.stderr ) return {} sf = text[s+2:e] # The surface form. if i < s: # Tokenize text before named entity. tokens += P.Parser.tokenizeText( text[i:s] ) sfTokens = P.Parser.tokenizeText( sf ) # Surface form tokens. sfTokensStart = len( tokens ) tokens += sfTokens sfTokensEnd = len( tokens ) # Add named entity. if surfaceForms.get( sf ) is None: surfaceForms[sf] = [] surfaceForms[sf].append( ( sfTokensStart, sfTokensEnd ) ) i = e + 2 s = text.find( "[[", i ) # Tokenize rest of text. if i < len( text ): tokens += P.Parser.tokenizeText( text[i:] ) results = ned.go( tokens, surfaceForms ) print( "\n----------------------------- Final results -----------------------------" ) for sf, rt in results.items(): print( "*", sf, ": (", rt[0], ") ", rt[1] ) print( "-------------------------------------------------------------------------" ) ned.saveData() return results
import React from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux' import { ActionCreators } from '../../actions/index.js' import { Text, View, TouchableHighlight, StyleSheet } from 'react-native'; import * as AppSetting from '../../config/appSetting' import Loading from './loading' import * as LinkHelper from '../../lib/linkHelper' class MatchLink extends React.Component { constructor(props) { super(props); this.state = { isLoading: true } } componentDidMount() { this.props.getMatchLinkInfo(this.props.selectedMatch); } componentWillReceiveProps(nextProps) { this.setState({ isLoading: false }) } _onPressLink = (link) => { return LinkHelper.openAceStream(link.ace) } _renderLink = (link, index) => { return ( <View key={"ma_" + index} style={{ height: 160, width: 160, flexShrink: 1, backgroundColor: '#FF7535', margin: 2, alignItems: 'center', justifyContent: 'center' }}> <TouchableHighlight onPress={() => this._onPressLink(link)} key={"link_" + index} style={{ }}> <Text style={[ { color: '#FFFFFF', alignSelf: 'center', textAlign: 'center' }, this.props.matchLinkIndex === index && styles.highLightLink ]}>{link.lable} {index}</Text> </TouchableHighlight> </View> ) } render() { let items = this.props.matchLinkInfo && this.props.matchLinkInfo.map((x, index) => { return this._renderLink(x, index) }); const loading = this.state.isLoading && (<Loading />); return ( <View style={{ flex: 1, flexDirection: 'column', alignItems: 'flex-start', justifyContent: 'center', flexWrap: 'wrap' }}> {loading} {items} </View> ); } } const styles = StyleSheet.create({ highLightLink: { fontWeight: 'bold', fontSize: 22, } }); function mapDispatchToProps(dispatch) { return bindActionCreators(ActionCreators, dispatch); } function mapStateToProps(state) { return { selectedMatch: state.selectedMatch, matchLinkInfo: state.matchLinkInfo, matchLinkIndex: state.matchLinkIndex }; } export default connect(mapStateToProps, mapDispatchToProps)(MatchLink);
# -*- coding: utf-8 -*- import warnings from django.conf import settings from django.db import models, migrations def forwards(apps, schema_editor): ContentType = apps.get_model('contenttypes', 'ContentType') Permission = apps.get_model('auth', 'Permission') Group = apps.get_model('auth', 'Group') user_model = apps.get_model(settings.AUTH_USER_MODEL) ph_model = apps.get_model('cms', 'Placeholder') page_model = apps.get_model('cms', 'Page') try: ph_ctype = ContentType.objects.get_for_model(ph_model) page_ctype = ContentType.objects.get_for_model(page_model) permission, __ = Permission.objects.get_or_create( codename='use_structure', content_type=ph_ctype, name=u"Can use Structure mode") page_permission, __ = Permission.objects.get_or_create( codename='change_page', content_type=page_ctype, name=u'Can change page' ) for user in user_model.objects.filter(is_superuser=False, is_staff=True): if user.user_permissions.filter(codename='change_page', content_type_id=page_ctype.pk).exists(): user.user_permissions.add(permission.pk) for group in Group.objects.all(): if page_permission in group.permissions.all(): group.permissions.add(permission.pk) except Exception: warnings.warn(u'Users not migrated to use_structure permission, please add the permission manually') def backwards(apps, schema_editor): ContentType = apps.get_model('contenttypes', 'ContentType') Permission = apps.get_model('auth', 'Permission') Group = apps.get_model('auth', 'Group') user_model = apps.get_model(settings.AUTH_USER_MODEL) ph_model = apps.get_model('cms', 'Placeholder') ph_ctype = ContentType.objects.get(app_label=ph_model._meta.app_label, model=ph_model._meta.model_name) try: permission, __ = Permission.objects.get_or_create( codename='use_structure', content_type=ph_ctype, name=u"Can use Structure mode") for user in user_model.objects.filter(is_superuser=False, is_staff=True): user.user_permissions.remove(permission.pk) for group in Group.objects.all(): if permission in group.permissions.all(): group.permissions.remove(permission.pk) except Exception: warnings.warn(u'use_structure not removed from all the users, please check the permission manually') class Migration(migrations.Migration): dependencies = [ ('cms', '0009_merge'), ('contenttypes', '__latest__'), ] operations = [ migrations.AlterModelOptions( name='placeholder', options={'permissions': (('use_structure', 'Can use Structure mode'),)}, ), migrations.RunPython(forwards, backwards) ]
from flask import render_template,request,redirect,url_for from . import main from ..requests import get_news_source,get_news_article # from .forms import ReviewForm # from ..models import Article,News # Views @main.route('/') def index(): ''' View root page function that returns the index page and its data ''' general = get_news_source('general') entertainment = get_news_source('entertainment') business = get_news_source('business') health = get_news_source('health') sports = get_news_source('sports') science = get_news_source('science') technology = get_news_source('technology') title='News source' return render_template('index.html',title=title,general=general,entertainment=entertainment,business=business,health=health,sports=sports,science=science,technology=technology) @main.route('/article/<id>') def article(id): """ View page function that returns the article page and its data """ articles = get_news_article(id) title = 'News Articles' return render_template('article.html',articles=articles,title=title)
#!/usr/bin/env python # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree. """ This script is the wrapper that starts a loopback call with stubbed video in and out. It then analyses the video quality of the output video against the reference input video. It expect to be given the webrtc output build directory as the first argument all other arguments are optional. It assumes you have a Android device plugged in. """ import argparse import json import logging import os import subprocess import sys import tempfile import time SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) SRC_DIR = os.path.normpath(os.path.join(SCRIPT_DIR, os.pardir, os.pardir)) RTC_TOOLS_DIR = os.path.join(SRC_DIR, 'rtc_tools', 'testing') TOOLCHAIN_DIR = os.path.join(SRC_DIR, 'tools_webrtc', 'video_quality_toolchain', 'linux') BAD_DEVICES_JSON = os.path.join(SRC_DIR, os.environ.get('CHROMIUM_OUT_DIR', 'out'), 'bad_devices.json') sys.path.append(RTC_TOOLS_DIR) import utils class Error(Exception): pass class VideoQualityTestError(Error): pass def _RunCommand(argv, cwd=SRC_DIR, **kwargs): logging.info('Running %r', argv) subprocess.check_call(argv, cwd=cwd, **kwargs) def _RunCommandWithOutput(argv, cwd=SRC_DIR, **kwargs): logging.info('Running %r', argv) return subprocess.check_output(argv, cwd=cwd, **kwargs) def _RunBackgroundCommand(argv, cwd=SRC_DIR): logging.info('Running %r', argv) process = subprocess.Popen(argv, cwd=cwd) time.sleep(0.5) status = process.poll() if status: # is not None or 0 raise subprocess.CalledProcessError(status, argv) return process def CreateEmptyDir(suggested_dir): if not suggested_dir: return tempfile.mkdtemp() utils.RemoveDirectory(suggested_dir) os.makedirs(suggested_dir) return suggested_dir def _ParseArgs(): parser = argparse.ArgumentParser(description='Start loopback video analysis.') parser.add_argument('build_dir_android', help='The path to the build directory for Android.') parser.add_argument('--build_dir_x86', help='The path to the build directory for building locally.') parser.add_argument('--temp_dir', help='A temporary directory to put the output.') parser.add_argument('--adb-path', help='Path to adb binary.', default='adb') args = parser.parse_args() return args def SelectAndroidDevice(adb_path): # Select an Android device in case multiple are connected. try: with open(BAD_DEVICES_JSON) as bad_devices_file: bad_devices = json.load(bad_devices_file) except IOError: if os.environ.get('CHROME_HEADLESS'): logging.warning('Cannot read %r', BAD_DEVICES_JSON) bad_devices = {} for line in _RunCommandWithOutput([adb_path, 'devices']).splitlines(): if line.endswith('\tdevice'): android_device = line.split('\t')[0] if android_device not in bad_devices: return android_device raise VideoQualityTestError('Cannot find any connected Android device.') def SetUpTools(android_device, temp_dir, processes): # Extract AppRTC. apprtc_archive = os.path.join(RTC_TOOLS_DIR, 'prebuilt_apprtc.zip') golang_archive = os.path.join(RTC_TOOLS_DIR, 'golang', 'linux', 'go.tar.gz') utils.UnpackArchiveTo(apprtc_archive, temp_dir) utils.UnpackArchiveTo(golang_archive, temp_dir) # Build AppRTC. build_apprtc_script = os.path.join(RTC_TOOLS_DIR, 'build_apprtc.py') apprtc_src_dir = os.path.join(temp_dir, 'apprtc', 'src') go_dir = os.path.join(temp_dir, 'go') collider_dir = os.path.join(temp_dir, 'collider') _RunCommand([sys.executable, build_apprtc_script, apprtc_src_dir, go_dir, collider_dir]) # Start AppRTC Server. dev_appserver = os.path.join(temp_dir, 'apprtc', 'temp', 'google-cloud-sdk', 'bin', 'dev_appserver.py') appengine_dir = os.path.join(temp_dir, 'apprtc', 'out', 'app_engine') processes.append(_RunBackgroundCommand([ sys.executable, dev_appserver, appengine_dir, '--port=9999', '--admin_port=9998', '--skip_sdk_update_check', '--clear_datastore=yes'])) # Start Collider. collider_path = os.path.join(temp_dir, 'collider', 'collidermain') processes.append(_RunBackgroundCommand([ collider_path, '-tls=false', '-port=8089', '-room-server=http://localhost:9999'])) # Start adb reverse forwarder. reverseforwarder_path = os.path.join( SRC_DIR, 'build', 'android', 'adb_reverse_forwarder.py') processes.append(_RunBackgroundCommand([ reverseforwarder_path, '--device', android_device, '9999', '9999', '8089', '8089'])) def RunTest(android_device, adb_path, build_dir, temp_dir): ffmpeg_path = os.path.join(TOOLCHAIN_DIR, 'ffmpeg') def ConvertVideo(input_video, output_video): _RunCommand([ffmpeg_path, '-y', '-i', input_video, output_video]) # Start loopback call and record video. test_script = os.path.join( build_dir, 'bin', 'run_AppRTCMobileTestStubbedVideoIO') _RunCommand([test_script, '--device', android_device]) # Pull the recorded video. test_video = os.path.join(temp_dir, 'test_video.y4m') _RunCommand([adb_path, '-s', android_device, 'pull', '/sdcard/output.y4m', test_video]) # Convert the recorded and reference videos to YUV. reference_video = os.path.join(SRC_DIR, 'resources', 'reference_video_640x360_30fps.y4m') test_video_yuv = os.path.join(temp_dir, 'test_video.yuv') reference_video_yuv = os.path.join( temp_dir, 'reference_video_640x360_30fps.yuv') ConvertVideo(test_video, test_video_yuv) ConvertVideo(reference_video, reference_video_yuv) # Run comparison script. compare_script = os.path.join(SRC_DIR, 'rtc_tools', 'compare_videos.py') frame_analyzer = os.path.join(TOOLCHAIN_DIR, 'frame_analyzer') zxing_path = os.path.join(TOOLCHAIN_DIR, 'zxing') stats_file_ref = os.path.join(temp_dir, 'stats_ref.txt') stats_file_test = os.path.join(temp_dir, 'stats_test.txt') _RunCommand([ sys.executable, compare_script, '--ref_video', reference_video_yuv, '--test_video', test_video_yuv, '--yuv_frame_width', '640', '--yuv_frame_height', '360', '--stats_file_ref', stats_file_ref, '--stats_file_test', stats_file_test, '--frame_analyzer', frame_analyzer, '--ffmpeg_path', ffmpeg_path, '--zxing_path', zxing_path]) def main(): logging.basicConfig(level=logging.INFO) args = _ParseArgs() temp_dir = args.temp_dir build_dir = args.build_dir_android adb_path = args.adb_path processes = [] temp_dir = CreateEmptyDir(temp_dir) try: android_device = SelectAndroidDevice(adb_path) SetUpTools(android_device, temp_dir, processes) RunTest(android_device, adb_path, build_dir, temp_dir) finally: for process in processes: if process: process.terminate() process.wait() utils.RemoveDirectory(temp_dir) if __name__ == '__main__': sys.exit(main())
from compas.geometry import Frame from compas_fab.robots.ur5 import Robot from compas_fab.backends.kinematics import AnalyticalInverseKinematics ik = AnalyticalInverseKinematics() robot = Robot() frame_WCF = Frame((0.381, 0.093, 0.382), (0.371, -0.292, -0.882), (0.113, 0.956, -0.269)) for jp, jn in ik.inverse_kinematics(robot, frame_WCF, options={'solver': 'ur5'}): # knows that we need the IK for the UR5 robot print(jp)
# BSD 3-Clause License; see https://github.com/scikit-hep/uproot4/blob/main/LICENSE """ This module defines a :doc:`uproot.source.chunk.Chunk`, which is a range of bytes requested from a file. All interaction between the "physical layer" and the "interpretation layer" is through a :doc:`uproot.source.cursor.Cursor`'s interpretation of a :doc:`uproot.source.chunk.Chunk`. Also defines abstract classes for :doc:`uproot.source.chunk.Resource` and :doc:`uproot.source.chunk.Source`, the primary types of the "physical layer." """ from __future__ import absolute_import import numpy import uproot class Resource(object): """ Abstract class for a file handle whose lifetime may be linked to threads in a thread pool executor. A :doc:`uproot.source.chunk.Resource` instance is always the first argument of functions evaluated by a :doc:`uproot.source.futures.ResourceFuture`. """ def file_path(self): """ A path to the file (or URL). """ return self._file_path class Source(object): """ Abstract class for physically reading and writing data from a file, which might be remote. In addition to the file handle, a :doc:`uproot.source.chunk.Source` might manage a :doc:`uproot.source.futures.ResourceThreadPoolExecutor` to read the file in parallel. Stopping these threads is part of the act of closing the file. """ def chunk(self, start, stop): """ Args: start (int): Seek position of the first byte to include. stop (int): Seek position of the first byte to exclude (one greater than the last byte to include). Request a byte range of data from the file as a :doc:`uproot.source.chunk.Chunk`. """ pass def chunks(self, ranges, notifications): """ Args: ranges (list of (int, int) 2-tuples): Intervals to fetch as (start, stop) pairs in a single request, if possible. notifications (``queue.Queue``): Indicator of completed chunks. After each gets filled, it is ``put`` on the queue; a listener should ``get`` from this queue ``len(ranges)`` times. Request a set of byte ranges from the file. This method has two outputs: * The method returns a list of unfilled :doc:`uproot.source.chunk.Chunk` objects, which get filled in a background thread. If you try to read data from an unfilled chunk, it will wait until it is filled. * The method also puts the same :doc:`uproot.source.chunk.Chunk` objects onto the ``notifications`` queue as soon as they are filled. Reading data from chunks on the queue can be more efficient than reading them from the returned list. The total reading time is the same, but work on the filled chunks can be better parallelized if it is triggered by already-filled chunks, rather than waiting for chunks to be filled. """ pass @property def file_path(self): """ A path to the file (or URL). """ return self._file_path @property def num_bytes(self): """ The number of bytes in the file. """ return self._num_bytes @property def num_requests(self): """ The number of requests that have been made (performance counter). """ return self._num_requests @property def num_requested_chunks(self): """ The number of :doc:`uproot.source.chunk.Chunk` objects that have been requested (performance counter). """ return self._num_requested_chunks @property def num_requested_bytes(self): """ The number of bytes that have been requested (performance counter). """ return self._num_requested_bytes def close(self): """ Manually closes the file(s) and stops any running threads. """ self.__exit__(None, None, None) @property def closed(self): """ True if the associated file/connection/thread pool is closed; False otherwise. """ return self._executor.closed class MultithreadedSource(Source): """ Abstract class for a :doc:`uproot.source.chunk.Source` that maintains a :doc:`uproot.source.futures.ResourceThreadPoolExecutor`. """ def __repr__(self): path = repr(self._file_path) if len(self._file_path) > 10: path = repr("..." + self._file_path[-10:]) return "<{0} {1} ({2} workers) at 0x{3:012x}>".format( type(self).__name__, path, self.num_workers, id(self) ) def chunk(self, start, stop): self._num_requests += 1 self._num_requested_chunks += 1 self._num_requested_bytes += stop - start future = self.ResourceClass.future(self, start, stop) chunk = Chunk(self, start, stop, future) self._executor.submit(future) return chunk def chunks(self, ranges, notifications): self._num_requests += 1 self._num_requested_chunks += len(ranges) self._num_requested_bytes += sum(stop - start for start, stop in ranges) chunks = [] for start, stop in ranges: future = self.ResourceClass.future(self, start, stop) chunk = Chunk(self, start, stop, future) future._set_notify(notifier(chunk, notifications)) self._executor.submit(future) chunks.append(chunk) return chunks @property def executor(self): """ The :doc:`uproot.source.futures.ResourceThreadPoolExecutor` """ return self._executor @property def num_workers(self): """ The number of :doc:`uproot.source.futures.ResourceWorker` threads in the :doc:`uproot.source.futures.ResourceThreadPoolExecutor`. """ return self._executor.num_workers @property def closed(self): """ True if the :doc:`uproot.source.futures.ResourceThreadPoolExecutor` has been shut down and the file handles have been closed. """ return self._executor.closed def __enter__(self): self._executor.__enter__() return self def __exit__(self, exception_type, exception_value, traceback): self._executor.__exit__(exception_type, exception_value, traceback) def notifier(chunk, notifications): def notify(): notifications.put(chunk) return notify class Chunk(object): """ Args: source (:doc:`uproot.source.chunk.Source`): Source from which the data were derived. start (int): Seek position of the first byte to include. stop (int): Seek position of the first byte to exclude (one greater than the last byte to include). future (:doc:`uproot.source.futures.TrivialFuture` or :doc:`uproot.source.futures.Future`): Handle to the synchronous or asynchronous data. A chunk is "filled" when the ``future`` completes. A range of bytes from a :doc:`uproot.source.chunk.Source`, which may be synchronously or asynchronously filled. The following methods must wait for the :ref:`uproot.source.chunk.Chunk.future` to complete (to be filled): * :ref:`uproot.source.chunk.Chunk.wait`: Waits and nothing else. * :ref:`uproot.source.chunk.Chunk.raw_data`: The data as a ``numpy.ndarray`` of ``numpy.uint8``. * :ref:`uproot.source.chunk.Chunk.get`: A subinterval of the data as a ``numpy.ndarray`` of ``numpy.uint8``. * :ref:`uproot.source.chunk.Chunk.remainder`: A subinterval from the :doc:`uproot.source.cursor.Cursor` to the end of the :doc:`uproot.source.chunk.Chunk`. """ _dtype = numpy.dtype(numpy.uint8) @classmethod def wrap(cls, source, data): """ Args: source (:doc:`uproot.source.chunk.Source`): Source to attach to the new chunk. data (``numpy.ndarray`` of ``numpy.uint8``): Data for the new chunk. Manually creates a synchronous :doc:`uproot.source.chunk.Chunk`. """ future = uproot.source.futures.TrivialFuture(data) return Chunk(source, 0, len(data), future) def __init__(self, source, start, stop, future): self._source = source self._start = start self._stop = stop self._future = future self._raw_data = None def __repr__(self): return "<Chunk {0}-{1}>".format(self._start, self._stop) @property def source(self): """ Source from which this Chunk is derived. """ return self._source @property def start(self): """ Seek position of the first byte to include. """ return self._start @property def stop(self): """ Seek position of the first byte to exclude (one greater than the last byte to include). """ return self._stop @property def future(self): """ Handle to the synchronous or asynchronous data. A chunk is "filled" when the ``future`` completes. """ return self._future def __contains__(self, range): start, stop = range if isinstance(start, uproot.source.cursor.Cursor): start = start.index if isinstance(stop, uproot.source.cursor.Cursor): stop = stop.index return self._start <= start and stop <= self._stop def wait(self): """ Explicitly wait until the chunk is filled (the :ref:`uproot.source.chunk.Chunk.future` completes). """ if self._raw_data is None: self._raw_data = numpy.frombuffer(self._future.result(), dtype=self._dtype) if len(self._raw_data) != self._stop - self._start: raise OSError( """expected Chunk of length {0}, received Chunk of length {1} for file path {2}""".format( len(self._raw_data), self._stop - self._start, self._source.file_path, ) ) self._future = None @property def raw_data(self): """ Data from the Source as a ``numpy.ndarray`` of ``numpy.uint8``. This method will wait until the chunk is filled (the :ref:`uproot.source.chunk.Chunk.future` completes), if it isn't already. """ self.wait() return self._raw_data def get(self, start, stop, cursor, context): """ Args: start (int): Seek position of the first byte to include. stop (int): Seek position of the first byte to exclude (one greater than the last byte to include). cursor (:doc:`uproot.source.cursor.Cursor`): A pointer to the current position in this chunk. context (dict): Auxiliary data used in deserialization. Returns a subinterval of the :ref:`uproot.source.chunk.Chunk.raw_data` as a ``numpy.ndarray`` of ``numpy.uint8``. Note that this ``start`` and ``stop`` are in the same coordinate system as the :ref:`uproot.source.chunk.Chunk.start` and :ref:`uproot.source.chunk.Chunk.stop`. That is, to get the whole chunk, use ``start=chunk.start`` and ``stop=chunk.stop``. This method will wait until the chunk is filled (the :ref:`uproot.source.chunk.Chunk.future` completes), if it isn't already. """ self.wait() if (start, stop) in self: local_start = start - self._start local_stop = stop - self._start return self._raw_data[local_start:local_stop] else: raise uproot.deserialization.DeserializationError( """attempting to get bytes {0}:{1} outside expected range {2}:{3} for this Chunk""".format( start, stop, self._start, self._stop ), self, cursor.copy(), context, self._source.file_path, ) def remainder(self, start, cursor, context): """ Args: start (int): Seek position of the first byte to include. cursor (:doc:`uproot.source.cursor.Cursor`): A pointer to the current position in this chunk. context (dict): Auxiliary data used in deserialization. Returns a subinterval of the :ref:`uproot.source.chunk.Chunk.raw_data` as a ``numpy.ndarray`` of ``numpy.uint8`` from ``start`` to the end of the chunk. Note that this ``start`` is in the same coordinate system as the :ref:`uproot.source.chunk.Chunk.start`. That is, to get the whole chunk, use ``start=chunk.start``. This method will wait until the chunk is filled (the :ref:`uproot.source.chunk.Chunk.future` completes), if it isn't already. """ self.wait() if self._start <= start: local_start = start - self._start return self._raw_data[local_start:] else: raise uproot.deserialization.DeserializationError( """attempting to get bytes after {0} outside expected range {1}:{2} for this Chunk""".format( start, self._start, self._stop ), self, cursor.copy(), context, self._source.file_path, )
var requestretry = require('requestretry'), request = require('request'), log = require('./log'), booleanHelper = require('./boolean-helper'), parseBoolean = require('./environment-variable-parsers').parseBoolean; /** * SessionManager Constructor * * @param {Object} options * @api public */ function SessionManager(options) { if (!options) { throw new Error('options is required'); } if (!options.port) { throw new Error('options.port is required'); } if (!options.browser && !options.deviceName) { throw new Error('[chimp][session-manager] options.browser or options.deviceName is required'); } this.options = options; this.maxRetries = 30; this.retryDelay = 3000; this.retry = 0; log.debug('[chimp][session-manager] created a new SessionManager'); } SessionManager.prototype.webdriver = require('xolvio-sync-webdriverio'); /** * Wraps the webdriver remote method and allows reuse options * * @api public */ SessionManager.prototype._configureRemote = function (webdriverOptions, remote, callback) { var self = this; log.debug('[chimp][session-manager] creating webdriver remote '); var browser = remote(webdriverOptions); function decideReuse() { if (self.options.browser === 'phantomjs') { log.debug('[chimp][session-manager] browser is phantomjs, not reusing a session'); callback(null, browser); return; } if (booleanHelper.isTruthy(process.env['chimp.noSessionReuse'])) { log.debug('[chimp][session-manager] noSessionReuse is true, not reusing a session'); callback(null, browser); return; } if (booleanHelper.isFalsey(process.env['chimp.watch']) && booleanHelper.isFalsey(process.env['chimp.server'])) { log.debug('[chimp][session-manager] watch mode is false, not reusing a session'); callback(null, browser); return; } self._getWebdriverSessions(function (err, sessions) { if (err) { callback(err); return; } if (sessions.length !== 0) { log.debug('[chimp][session-manager] Found an open selenium sessions, reusing session', sessions[0].id); browser._original.requestHandler.sessionID = sessions[0].id; } else { log.debug('[chimp][session-manager] Did not find any open selenium sessions, not reusing a session'); } browser = self._monkeyPatchBrowserSessionManagement(browser, sessions); callback(null, browser); }); } this._waitForConnection(browser, decideReuse); }; SessionManager.prototype.multiremote = function (webdriverOptions, callback) { this._configureRemote(webdriverOptions, this.webdriver.multiremote, callback); }; SessionManager.prototype.remote = function (webdriverOptions, callback) { this._configureRemote(webdriverOptions, this.webdriver.remote, callback); }; SessionManager.prototype._waitForConnection = function (browser, callback) { log.debug('[chimp][session-manager] checking connection to selenium server'); var self = this; browser.statusAsync().then( () => { log.debug('[chimp][session-manager] Connection to the to selenium server verified'); callback(); }, (err) => { if (err && /ECONNREFUSED/.test(err.message)) { if (++self.retry === self.maxRetries) { callback('[chimp][session-manager] timed out retrying to connect to selenium server'); } log.debug('[chimp][session-manager] could not connect to the server, retrying', '(' + self.retry + '/' + self.maxRetries + ')'); setTimeout(function () { self._waitForConnection(browser, callback); }, self.retryDelay); } else { log.debug('[chimp][session-manager] Connection to the to selenium server verified'); callback(); } } ); }; SessionManager.prototype._monkeyPatchBrowserSessionManagement = function (browser, sessions) { log.debug('[chimp][session-manager]', 'monkey patching the browser object'); var callbacker = function () { var cb = arguments[arguments.length - 1]; if (cb && typeof cb === 'function') { cb(); } return { then: function (c) { c(); } }; }; var initWrapperFactory = function (init) { return function () { if (sessions.length !== 0) { log.debug('[chimp][session-manager]', 'browser already initialized'); return callbacker.apply(this, arguments); } else { log.debug('[chimp][session-manager]', 'initializing browser'); return init.apply(this, arguments); } }; }; var updateBrowserObject = function (browserObject) { browserObject._initAsync = browserObject.initAsync; browserObject.initAsync = initWrapperFactory(browserObject.initAsync); browserObject._initSync = browserObject.initSync; browserObject.initSync = initWrapperFactory(browserObject.initSync); browserObject._init = browserObject.init; if (browserObject._init === browserObject._initSync) { browserObject.init = browserObject.initSync; } else if (browserObject._init === browserObject._initAsync) { browserObject.init = browserObject.initAsync; } else { throw new Error('browserObject.init has already been overwritten by something else.'); } browserObject.end = callbacker.bind(browserObject); browserObject.endSync = browserObject.end; browserObject.endAsync = browserObject.end; browserObject.endAll = callbacker.bind(browserObject); browserObject.endAllSync = browserObject.endAll; browserObject.endAllAsync = browserObject.endAll; return browserObject; }; if (browser.instances) { browser.instances.forEach(function (singleBrowser) { singleBrowser = updateBrowserObject(singleBrowser); }); } else { browser = updateBrowserObject(browser); } return browser; }; /** * Gets a list of sessions from the localhost selenium server * * @api private */ SessionManager.prototype._getWebdriverSessions = function (callback) { var wdHubSessions = 'http://' + this.options.host + ':' + this.options.port + '/wd/hub/sessions'; log.debug('[chimp][session-manager]', 'requesting sessions from', wdHubSessions); requestretry({ url: wdHubSessions, maxAttempts: 10, retryDelay: 500, retryStrategy: requestretry.RetryStrategies.HTTPOrNetworkError }, function (error, response, body) { if (!error) { if (response.statusCode === 200) { log.debug('[chimp][session-manager]', 'received data', body); callback(null, JSON.parse(body).value); } else { log.error('[chimp][session-manager]', 'received error', `${response.statusMessage} [${response.statusCode}]`); if (response.body) { log.debug('[chimp][session-manager]', 'response', response.body); } callback(error); } } else { log.error('[chimp][session-manager]', 'received error', error, 'response', response); callback(error); } }); }; /** * Kills the 1st session found running on selenium server * * @api public */ SessionManager.prototype.killCurrentSession = function (callback) { if (this.options.browser === 'phantomjs') { log.debug('[chimp][session-manager] browser is phantomjs, not killing session'); callback(); return; } if (booleanHelper.isTruthy(process.env['chimp.noSessionReuse'])) { log.debug('[chimp][session-manager] noSessionReuse is true, , not killing session'); callback(); return; } if ((parseBoolean(process.env['chimp.watch']) || parseBoolean(process.env['chimp.server'])) && !parseBoolean(process.env['forceSessionKill'])) { log.debug('[chimp][session-manager] watch / server mode are true, not killing session'); callback(); return; } var wdHubSession = 'http://' + this.options.host + ':' + this.options.port + '/wd/hub/session'; this._getWebdriverSessions(function (err, sessions) { if (sessions && sessions.length) { sessions.forEach(function (session) { var sessionId = session.id; log.debug('[chimp][session-manager]', 'deleting wd session', sessionId); request.del(wdHubSession + '/' + sessionId, function (error, response, body) { if (!error && response.statusCode === 200) { log.debug('[chimp][session-manager]', 'received data', body); callback(); } else { log.error('[chimp][session-manager]', 'received error', error); callback(error); } }); }); } else { callback(null); } }); }; module.exports = SessionManager;
const expect = require('chai').expect; const testUtils = require('../../../common/test-utils/server'); const options = [{ value: 1, label: 'option 1' }, { value: 2, label: 'option 2' }]; const emptyOptions = []; describe('select', () => { test('renders basic version', context => { const input = { options }; const $ = testUtils.getCheerio(context.render(input)); expect($('.select').length).to.equal(1); }); test('renders empty', context => { const input = { emptyOptions }; const $ = testUtils.getCheerio(context.render(input)); expect($('.select').length).to.equal(1); expect($('.select select > option').length).to.equal(0); }); test('renders with second item selected', context => { const input = { options }; input.options[0].selected = false; input.options[1].selected = true; const $ = testUtils.getCheerio(context.render(input)); expect($('.select').length).to.equal(1); expect($('.select select > option[selected]:nth-child(2)').length).to.equal(1); }); test('renders with borderless=true', context => { const input = { borderless: true, options }; const $ = testUtils.getCheerio(context.render(input)); expect($('.select.select--borderless').length).to.equal(1); }); test('renders with borderless=false', context => { const input = { borderless: false, options }; const $ = testUtils.getCheerio(context.render(input)); expect($('.select.select--borderless').length).to.equal(0); }); test('handles pass-through html attributes', c => testUtils.testHtmlAttributes(c, 'span.select select')); test('handles custom class and style', c => testUtils.testClassAndStyle(c, 'span.select')); });
import ActionCreator from "../state/ActionCreator.js"; import Selector from "../state/Selector.js"; import GtRGame from "./GtRGame.js"; import TestData from "./TestData.js"; QUnit.module("GtRGame"); QUnit.test("execute()", (assert) => { // Setup. const store = TestData.createStore(); store.dispatch(ActionCreator.setVerbose(true)); store.dispatch(ActionCreator.setDelay(TestData.DELAY)); store.dispatch(ActionCreator.setCurrentRound(1)); store.dispatch(ActionCreator.setCurrentPlayer(1)); // Run. const done = assert.async(); const callback = () => { assert.ok(true, "test resumed from async operation"); // Verify. const state = store.getState(); assert.equal(Selector.currentRound(state), 4); assert.equal(Selector.currentPhaseKey(state), undefined); assert.equal(Selector.currentPlayerId(state), undefined); assert.equal(Selector.currentStepKey(state), undefined); assert.equal(Selector.currentStepKey(state), undefined); const winner = Selector.winner(state); assert.ok(winner, `winner = ${JSON.stringify(winner)}`); done(); }; GtRGame.execute(store) .then(callback) .catch((error) => { assert.ok(false, error.message); done(); }); }); const GtRGameTest = {}; export default GtRGameTest;
import os class WriterError(Exception): pass class Mol2Format(object): def open(self, *kwargs): import mol2 return mol2.Writer() known_formats = {'.mol2': Mol2Format()} class WriterFormatError(WriterError): def __init__(self, format, known_formats): self.format = format self.known_formats = known_formats def __str__(self): global known_formats return 'Unknown molecule file format "%s"\n Available formats are %s.' % (self.format, self.known_formats.keys()) def open(format, **kwargs): """ writer.open('.eps') will create a sl.writer instance """ if format not in known_formats: raise WriterFormatError(format, known_formats) return known_formats[format].open(kwargs)
// Copyright (c) 2018 Pastor Ombura // Copyright (c) 2018 The SalemCash developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef SALEMCASH_CLIENTVERSION_H #define SALEMCASH_CLIENTVERSION_H #if defined(HAVE_CONFIG_H) #include <config/salemcash-config.h> #endif //HAVE_CONFIG_H // Check that required client information is defined #if !defined(CLIENT_VERSION_MAJOR) || !defined(CLIENT_VERSION_MINOR) || !defined(CLIENT_VERSION_REVISION) || !defined(CLIENT_VERSION_BUILD) || !defined(CLIENT_VERSION_IS_RELEASE) || !defined(COPYRIGHT_YEAR) #error Client version information missing: version is not defined by salemcash-config.h or in any other way #endif /** * Converts the parameter X to a string after macro replacement on X has been performed. * Don't merge these into one macro! */ #define STRINGIZE(X) DO_STRINGIZE(X) #define DO_STRINGIZE(X) #X //! Copyright string used in Windows .rc files #define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " " COPYRIGHT_HOLDERS_FINAL /** * salemcashd-res.rc includes this file, but it cannot cope with real c++ code. * WINDRES_PREPROC is defined to indicate that its pre-processor is running. * Anything other than a define should be guarded below. */ #if !defined(WINDRES_PREPROC) #include <string> #include <vector> static const int CLIENT_VERSION = 1000000 * CLIENT_VERSION_MAJOR + 10000 * CLIENT_VERSION_MINOR + 100 * CLIENT_VERSION_REVISION + 1 * CLIENT_VERSION_BUILD; extern const std::string CLIENT_NAME; extern const std::string CLIENT_BUILD; std::string FormatFullVersion(); std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments); #endif // WINDRES_PREPROC #endif // SALEMCASH_CLIENTVERSION_H
// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // /*++ --*/ /****************************************************************** * * * strsafe.h -- This module defines safer C library string * * routine replacements. These are meant to make C * * a bit more safe in reference to security and * * robustness * * * ******************************************************************/ #ifndef _STRSAFE_H_INCLUDED_ #define _STRSAFE_H_INCLUDED_ #ifdef _MSC_VER #pragma once #endif #if defined(PLATFORM_UNIX) && !defined (FEATURE_PAL) #define _NATIVE_WCHAR_T_DEFINED #endif // defined(PLATFORM_UNIX) && !defined (FEATURE_PAL) #if defined(PLATFORM_UNIX) && !defined (FEATURE_PAL) #define _vsnprintf vsnprintf #endif // defined(PLATFORM_UNIX) && !defined (FEATURE_PAL) #include <stdio.h> // for _vsnprintf, _vsnwprintf, getc, getwc #include <string.h> // for memset #include <stdarg.h> // for va_start, etc. #ifndef _SIZE_T_DEFINED #ifdef _WIN64 typedef unsigned __int64 size_t; #else typedef __w64 unsigned int size_t; #endif // !_WIN64 #define _SIZE_T_DEFINED #endif // !_SIZE_T_DEFINED #if !defined(_WCHAR_T_DEFINED) && !defined(_NATIVE_WCHAR_T_DEFINED) #error Unexpected define. typedef char16_t WCHAR; #define _WCHAR_T_DEFINED #endif #ifndef FEATURE_PAL #ifndef _HRESULT_DEFINED #define _HRESULT_DEFINED typedef LONG HRESULT; #endif // !_HRESULT_DEFINED #endif // !FEATURE_PAL #ifndef SUCCEEDED #define SUCCEEDED(hr) ((HRESULT)(hr) >= 0) #endif #ifndef FAILED #define FAILED(hr) ((HRESULT)(hr) < 0) #endif #ifndef S_OK #define S_OK ((HRESULT)0x00000000L) #endif #ifdef __cplusplus #define _STRSAFE_EXTERN_C extern "C" #else #define _STRSAFE_EXTERN_C extern #endif // If you do not want to use these functions inline (and instead want to link w/ strsafe.lib), then // #define STRSAFE_LIB before including this header file. #if defined(STRSAFE_LIB) #define STRSAFEAPI _STRSAFE_EXTERN_C HRESULT __stdcall #pragma comment(lib, "strsafe.lib") #elif defined(STRSAFE_LIB_IMPL) #define STRSAFEAPI _STRSAFE_EXTERN_C HRESULT __stdcall #else #define STRSAFEAPI __inline HRESULT __stdcall #define STRSAFE_INLINE #endif // Some functions always run inline because they use stdin and we want to avoid building multiple // versions of strsafe lib depending on if you use msvcrt, libcmt, etc. #define STRSAFE_INLINE_API __inline HRESULT __stdcall // The user can request no "Cb" or no "Cch" fuctions, but not both! #if defined(STRSAFE_NO_CB_FUNCTIONS) && defined(STRSAFE_NO_CCH_FUNCTIONS) #error cannot specify both STRSAFE_NO_CB_FUNCTIONS and STRSAFE_NO_CCH_FUNCTIONS !! #endif // This should only be defined when we are building strsafe.lib #ifdef STRSAFE_LIB_IMPL #define STRSAFE_INLINE #endif #define STRSAFE_MAX_CCH 2147483647 // max # of characters we support (same as INT_MAX) // STRSAFE error return codes // #define STRSAFE_E_INSUFFICIENT_BUFFER ((HRESULT)0x8007007AL) // 0x7A = 122L = ERROR_INSUFFICIENT_BUFFER #define STRSAFE_E_INVALID_PARAMETER ((HRESULT)0x80070057L) // 0x57 = 87L = ERROR_INVALID_PARAMETER #define STRSAFE_E_END_OF_FILE ((HRESULT)0x80070026L) // 0x26 = 38L = ERROR_HANDLE_EOF // Flags for controling the Ex functions // // STRSAFE_FILL_BYTE(0xFF) 0x000000FF // bottom byte specifies fill pattern #define STRSAFE_IGNORE_NULLS 0x00000100 // treat null as TEXT("") -- don't fault on NULL buffers #define STRSAFE_FILL_BEHIND_NULL 0x00000200 // fill in extra space behind the null terminator #define STRSAFE_FILL_ON_FAILURE 0x00000400 // on failure, overwrite pszDest with fill pattern and null terminate it #define STRSAFE_NULL_ON_FAILURE 0x00000800 // on failure, set *pszDest = TEXT('\0') #define STRSAFE_NO_TRUNCATION 0x00001000 // instead of returning a truncated result, copy/append nothing to pszDest and null terminate it #define STRSAFE_VALID_FLAGS (0x000000FF | STRSAFE_IGNORE_NULLS | STRSAFE_FILL_BEHIND_NULL | STRSAFE_FILL_ON_FAILURE | STRSAFE_NULL_ON_FAILURE | STRSAFE_NO_TRUNCATION) // helper macro to set the fill character and specify buffer filling #define STRSAFE_FILL_BYTE(x) ((unsigned long)((x & 0x000000FF) | STRSAFE_FILL_BEHIND_NULL)) #define STRSAFE_FAILURE_BYTE(x) ((unsigned long)((x & 0x000000FF) | STRSAFE_FILL_ON_FAILURE)) #define STRSAFE_GET_FILL_PATTERN(dwFlags) ((int)(dwFlags & 0x000000FF)) // prototypes for the worker functions #ifdef STRSAFE_INLINE STRSAFEAPI StringCopyWorkerA(char* pszDest, size_t cchDest, const char* pszSrc); STRSAFEAPI StringCopyWorkerW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc); STRSAFEAPI StringCopyExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, const char* pszSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); STRSAFEAPI StringCopyExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); STRSAFEAPI StringCopyNWorkerA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchSrc); STRSAFEAPI StringCopyNWorkerW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchSrc); STRSAFEAPI StringCopyNExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, const char* pszSrc, size_t cchSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); STRSAFEAPI StringCopyNExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, const WCHAR* pszSrc, size_t cchSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); STRSAFEAPI StringCatWorkerA(char* pszDest, size_t cchDest, const char* pszSrc); STRSAFEAPI StringCatWorkerW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc); STRSAFEAPI StringCatExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, const char* pszSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); STRSAFEAPI StringCatExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); STRSAFEAPI StringCatNWorkerA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchMaxAppend); STRSAFEAPI StringCatNWorkerW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchMaxAppend); STRSAFEAPI StringCatNExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, const char* pszSrc, size_t cchMaxAppend, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); STRSAFEAPI StringCatNExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, const WCHAR* pszSrc, size_t cchMaxAppend, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); STRSAFEAPI StringVPrintfWorkerA(char* pszDest, size_t cchDest, const char* pszFormat, va_list argList); STRSAFEAPI StringVPrintfWorkerW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszFormat, va_list argList); STRSAFEAPI StringVPrintfExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags, const char* pszFormat, va_list argList); STRSAFEAPI StringVPrintfExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags, const WCHAR* pszFormat, va_list argList); STRSAFEAPI StringLengthWorkerA(const char* psz, size_t cchMax, size_t* pcch); STRSAFEAPI StringLengthWorkerW(const WCHAR* psz, size_t cchMax, size_t* pcch); #endif // STRSAFE_INLINE #ifndef STRSAFE_LIB_IMPL #ifndef FEATURE_PAL // these functions are always inline STRSAFE_INLINE_API StringGetsExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); STRSAFE_INLINE_API StringGetsExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); #endif // !FEATURE_PAL #endif #ifndef STRSAFE_NO_CCH_FUNCTIONS /*++ STDAPI StringCchCopy(LPTSTR pszDest, size_t cchDest, LPCTSTR pszSrc); Routine Description: This routine is a safer version of the C built-in function 'strcpy'. The size of the destination buffer (in characters) is a parameter and this function will not write past the end of this buffer and it will ALWAYS null terminate the destination buffer (unless it is zero length). This routine is not a replacement for strncpy. That function will pad the destination string with extra null termination characters if the count is greater than the length of the source string, and it will fail to null terminate the destination string if the source string length is greater than or equal to the count. You can not blindly use this instead of strncpy: it is common for code to use it to "patch" strings and you would introduce errors if the code started null terminating in the middle of the string. This function returns a hresult, and not a pointer. It returns a S_OK if the string was copied without truncation and null terminated, otherwise it will return a failure code. In failure cases as much of pszSrc will be copied to pszDest as possible, and pszDest will be null terminated. Arguments: pszDest - destination string cchDest - size of destination buffer in characters. length must be = (_tcslen(src) + 1) to hold all of the source including the null terminator pszSrc - source string which must be null terminated Notes: Behavior is undefined if source and destination strings overlap. pszDest and pszSrc should not be NULL. See StringCchCopyEx if you require the handling of NULL values. Return Value: S_OK - if there was source data and it was all copied and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all hresult falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the copy operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function. --*/ STRSAFEAPI StringCchCopyA(char* pszDest, size_t cchDest, const char* pszSrc); STRSAFEAPI StringCchCopyW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc); #ifdef UNICODE #define StringCchCopy StringCchCopyW #else #define StringCchCopy StringCchCopyA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCchCopyA(char* pszDest, size_t cchDest, const char* pszSrc) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCopyWorkerA(pszDest, cchDest, pszSrc); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCchCopyW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCopyWorkerW(pszDest, cchDest, pszSrc); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CCH_FUNCTIONS #ifndef STRSAFE_NO_CB_FUNCTIONS /*++ STDAPI StringCbCopy(LPTSTR pszDest, size_t cbDest, LPCTSTR pszSrc); Routine Description: This routine is a safer version of the C built-in function 'strcpy'. The size of the destination buffer (in bytes) is a parameter and this function will not write past the end of this buffer and it will ALWAYS null terminate the destination buffer (unless it is zero length). This routine is not a replacement for strncpy. That function will pad the destination string with extra null termination characters if the count is greater than the length of the source string, and it will fail to null terminate the destination string if the source string length is greater than or equal to the count. You can not blindly use this instead of strncpy: it is common for code to use it to "patch" strings and you would introduce errors if the code started null terminating in the middle of the string. This function returns a hresult, and not a pointer. It returns a S_OK if the string was copied without truncation and null terminated, otherwise it will return a failure code. In failure cases as much of pszSrc will be copied to pszDest as possible, and pszDest will be null terminated. Arguments: pszDest - destination string cbDest - size of destination buffer in bytes. length must be = ((_tcslen(src) + 1) * sizeof(TCHAR)) to hold all of the source including the null terminator pszSrc - source string which must be null terminated Notes: Behavior is undefined if source and destination strings overlap. pszDest and pszSrc should not be NULL. See StringCbCopyEx if you require the handling of NULL values. Return Value: S_OK - if there was source data and it was all copied and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all hresult falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the copy operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function. --*/ STRSAFEAPI StringCbCopyA(char* pszDest, size_t cbDest, const char* pszSrc); STRSAFEAPI StringCbCopyW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc); #ifdef UNICODE #define StringCbCopy StringCbCopyW #else #define StringCbCopy StringCbCopyA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCbCopyA(char* pszDest, size_t cbDest, const char* pszSrc) { HRESULT hr; size_t cchDest; // convert to count of characters cchDest = cbDest / sizeof(char); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCopyWorkerA(pszDest, cchDest, pszSrc); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCbCopyW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc) { HRESULT hr; size_t cchDest; // convert to count of characters cchDest = cbDest / sizeof(WCHAR); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCopyWorkerW(pszDest, cchDest, pszSrc); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CB_FUNCTIONS #ifndef STRSAFE_NO_CCH_FUNCTIONS /*++ STDAPI StringCchCopyEx(TCHAR pszDest, size_t cchDest, LPCTSTR pszSrc, LPTSTR* ppszDestEnd, size_t* pcchRemaining, DWORD dwFlags); Routine Description: This routine is a safer version of the C built-in function 'strcpy' with some additional parameters. In addition to functionality provided by StringCchCopy, this routine also returns a pointer to the end of the destination string and the number of characters left in the destination string including the null terminator. The flags parameter allows additional controls. Arguments: pszDest - destination string cchDest - size of destination buffer in characters. length must be = (_tcslen(pszSrc) + 1) to hold all of the source including the null terminator pszSrc - source string which must be null terminated ppszDestEnd - if ppszDestEnd is non-null, the function will return a pointer to the end of the destination string. If the function copied any data, the result will point to the null termination character pcchRemaining - if pcchRemaining is non-null, the function will return the number of characters left in the destination string, including the null terminator dwFlags - controls some details of the string copy: STRSAFE_FILL_BEHIND_NULL if the function succeeds, the low byte of dwFlags will be used to fill the uninitialize part of destination buffer behind the null terminator STRSAFE_IGNORE_NULLS treat NULL string pointers like empty strings (TEXT("")). this flag is useful for emulating functions like lstrcpy STRSAFE_FILL_ON_FAILURE if the function fails, the low byte of dwFlags will be used to fill all of the destination buffer, and it will be null terminated. This will overwrite any truncated string returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER STRSAFE_NO_TRUNCATION / STRSAFE_NULL_ON_FAILURE if the function fails, the destination buffer will be set to the empty string. This will overwrite any truncated string returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER. Notes: Behavior is undefined if source and destination strings overlap. pszDest and pszSrc should not be NULL unless the STRSAFE_IGNORE_NULLS flag is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszSrc may be NULL. An error may still be returned even though NULLS are ignored due to insufficient space. Return Value: S_OK - if there was source data and it was all copied and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the copy operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCchCopyExA(char* pszDest, size_t cchDest, const char* pszSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); STRSAFEAPI StringCchCopyExW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); #ifdef UNICODE #define StringCchCopyEx StringCchCopyExW #else #define StringCchCopyEx StringCchCopyExA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCchCopyExA(char* pszDest, size_t cchDest, const char* pszSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cbDest; // safe to multiply cchDest * sizeof(char) since cchDest < STRSAFE_MAX_CCH and sizeof(char) is 1 cbDest = cchDest * sizeof(char); hr = StringCopyExWorkerA(pszDest, cchDest, cbDest, pszSrc, ppszDestEnd, pcchRemaining, dwFlags); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCchCopyExW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cbDest; // safe to multiply cchDest * sizeof(WCHAR) since cchDest < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2 cbDest = cchDest * sizeof(WCHAR); hr = StringCopyExWorkerW(pszDest, cchDest, cbDest, pszSrc, ppszDestEnd, pcchRemaining, dwFlags); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CCH_FUNCTIONS #ifndef STRSAFE_NO_CB_FUNCTIONS /*++ STDAPI StringCbCopyEx(TCHAR pszDest, size_t cbDest, LPCTSTR pszSrc, LPTSTR* ppszDestEnd, size_t* pcbRemaining, DWORD dwFlags); Routine Description: This routine is a safer version of the C built-in function 'strcpy' with some additional parameters. In addition to functionality provided by StringCbCopy, this routine also returns a pointer to the end of the destination string and the number of bytes left in the destination string including the null terminator. The flags parameter allows additional controls. Arguments: pszDest - destination string cbDest - size of destination buffer in bytes. length must be ((_tcslen(pszSrc) + 1) * sizeof(TCHAR)) to hold all of the source including the null terminator pszSrc - source string which must be null terminated ppszDestEnd - if ppszDestEnd is non-null, the function will return a pointer to the end of the destination string. If the function copied any data, the result will point to the null termination character pcbRemaining - pcbRemaining is non-null,the function will return the number of bytes left in the destination string, including the null terminator dwFlags - controls some details of the string copy: STRSAFE_FILL_BEHIND_NULL if the function succeeds, the low byte of dwFlags will be used to fill the uninitialize part of destination buffer behind the null terminator STRSAFE_IGNORE_NULLS treat NULL string pointers like empty strings (TEXT("")). this flag is useful for emulating functions like lstrcpy STRSAFE_FILL_ON_FAILURE if the function fails, the low byte of dwFlags will be used to fill all of the destination buffer, and it will be null terminated. This will overwrite any truncated string returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER STRSAFE_NO_TRUNCATION / STRSAFE_NULL_ON_FAILURE if the function fails, the destination buffer will be set to the empty string. This will overwrite any truncated string returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER. Notes: Behavior is undefined if source and destination strings overlap. pszDest and pszSrc should not be NULL unless the STRSAFE_IGNORE_NULLS flag is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszSrc may be NULL. An error may still be returned even though NULLS are ignored due to insufficient space. Return Value: S_OK - if there was source data and it was all copied and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the copy operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCbCopyExA(char* pszDest, size_t cbDest, const char* pszSrc, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags); STRSAFEAPI StringCbCopyExW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags); #ifdef UNICODE #define StringCbCopyEx StringCbCopyExW #else #define StringCbCopyEx StringCbCopyExA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCbCopyExA(char* pszDest, size_t cbDest, const char* pszSrc, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags) { HRESULT hr; size_t cchDest; size_t cchRemaining = 0; cchDest = cbDest / sizeof(char); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCopyExWorkerA(pszDest, cchDest, cbDest, pszSrc, ppszDestEnd, &cchRemaining, dwFlags); } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (pcbRemaining) { // safe to multiply cchRemaining * sizeof(char) since cchRemaining < STRSAFE_MAX_CCH and sizeof(char) is 1 *pcbRemaining = (cchRemaining * sizeof(char)) + (cbDest % sizeof(char)); } } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCbCopyExW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags) { HRESULT hr; size_t cchDest; size_t cchRemaining = 0; cchDest = cbDest / sizeof(WCHAR); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCopyExWorkerW(pszDest, cchDest, cbDest, pszSrc, ppszDestEnd, &cchRemaining, dwFlags); } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (pcbRemaining) { // safe to multiply cchRemaining * sizeof(WCHAR) since cchRemaining < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2 *pcbRemaining = (cchRemaining * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR)); } } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CB_FUNCTIONS #ifndef STRSAFE_NO_CCH_FUNCTIONS /*++ STDAPI StringCchCopyN(LPTSTR pszDest, size_t cchDest, LPCTSTR pszSrc, size_t cchSrc); Routine Description: This routine is a safer version of the C built-in function 'strncpy'. The size of the destination buffer (in characters) is a parameter and this function will not write past the end of this buffer and it will ALWAYS null terminate the destination buffer (unless it is zero length). This routine is meant as a replacement for strncpy, but it does behave differently. This function will not pad the destination buffer with extra null termination characters if cchSrc is greater than the length of pszSrc. This function returns a hresult, and not a pointer. It returns a S_OK if the entire string or the first cchSrc characters were copied without truncation and the resultant destination string was null terminated, otherwise it will return a failure code. In failure cases as much of pszSrc will be copied to pszDest as possible, and pszDest will be null terminated. Arguments: pszDest - destination string cchDest - size of destination buffer in characters. length must be = (_tcslen(src) + 1) to hold all of the source including the null terminator pszSrc - source string cchSrc - maximum number of characters to copy from source string Notes: Behavior is undefined if source and destination strings overlap. pszDest and pszSrc should not be NULL. See StringCchCopyNEx if you require the handling of NULL values. Return Value: S_OK - if there was source data and it was all copied and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all hresult falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the copy operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function. --*/ STRSAFEAPI StringCchCopyNA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchSrc); STRSAFEAPI StringCchCopyNW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchSrc); #ifdef UNICODE #define StringCchCopyN StringCchCopyNW #else #define StringCchCopyN StringCchCopyNA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCchCopyNA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchSrc) { HRESULT hr; if ((cchDest > STRSAFE_MAX_CCH) || (cchSrc > STRSAFE_MAX_CCH)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCopyNWorkerA(pszDest, cchDest, pszSrc, cchSrc); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCchCopyNW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchSrc) { HRESULT hr; if ((cchDest > STRSAFE_MAX_CCH) || (cchSrc > STRSAFE_MAX_CCH)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCopyNWorkerW(pszDest, cchDest, pszSrc, cchSrc); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CCH_FUNCTIONS #ifndef STRSAFE_NO_CB_FUNCTIONS /*++ STDAPI StringCbCopyN(LPTSTR pszDest, size_t cbDest, LPCTSTR pszSrc, size_t cbSrc); Routine Description: This routine is a safer version of the C built-in function 'strncpy'. The size of the destination buffer (in bytes) is a parameter and this function will not write past the end of this buffer and it will ALWAYS null terminate the destination buffer (unless it is zero length). This routine is meant as a replacement for strncpy, but it does behave differently. This function will not pad the destination buffer with extra null termination characters if cbSrc is greater than the size of pszSrc. This function returns a hresult, and not a pointer. It returns a S_OK if the entire string or the first cbSrc characters were copied without truncation and the resultant destination string was null terminated, otherwise it will return a failure code. In failure cases as much of pszSrc will be copied to pszDest as possible, and pszDest will be null terminated. Arguments: pszDest - destination string cbDest - size of destination buffer in bytes. length must be = ((_tcslen(src) + 1) * sizeof(TCHAR)) to hold all of the source including the null terminator pszSrc - source string cbSrc - maximum number of bytes to copy from source string Notes: Behavior is undefined if source and destination strings overlap. pszDest and pszSrc should not be NULL. See StringCbCopyEx if you require the handling of NULL values. Return Value: S_OK - if there was source data and it was all copied and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all hresult falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the copy operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function. --*/ STRSAFEAPI StringCbCopyNA(char* pszDest, size_t cbDest, const char* pszSrc, size_t cbSrc); STRSAFEAPI StringCbCopyNW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, size_t cbSrc); #ifdef UNICODE #define StringCbCopyN StringCbCopyNW #else #define StringCbCopyN StringCbCopyNA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCbCopyNA(char* pszDest, size_t cbDest, const char* pszSrc, size_t cbSrc) { HRESULT hr; size_t cchDest; size_t cchSrc; // convert to count of characters cchDest = cbDest / sizeof(char); cchSrc = cbSrc / sizeof(char); if ((cchDest > STRSAFE_MAX_CCH) || (cchSrc > STRSAFE_MAX_CCH)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCopyNWorkerA(pszDest, cchDest, pszSrc, cchSrc); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCbCopyNW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, size_t cbSrc) { HRESULT hr; size_t cchDest; size_t cchSrc; // convert to count of characters cchDest = cbDest / sizeof(WCHAR); cchSrc = cbSrc / sizeof(WCHAR); if ((cchDest > STRSAFE_MAX_CCH) || (cchSrc > STRSAFE_MAX_CCH)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCopyNWorkerW(pszDest, cchDest, pszSrc, cchSrc); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CB_FUNCTIONS #ifndef STRSAFE_NO_CCH_FUNCTIONS /*++ STDAPI StringCchCopyNEx(TCHAR pszDest, size_t cchDest, LPCTSTR pszSrc, size_t cchSrc, LPTSTR* ppszDestEnd, size_t* pcchRemaining, DWORD dwFlags); Routine Description: This routine is a safer version of the C built-in function 'strncpy' with some additional parameters. In addition to functionality provided by StringCchCopyN, this routine also returns a pointer to the end of the destination string and the number of characters left in the destination string including the null terminator. The flags parameter allows additional controls. This routine is meant as a replacement for strncpy, but it does behave differently. This function will not pad the destination buffer with extra null termination characters if cchSrc is greater than the length of pszSrc. Arguments: pszDest - destination string cchDest - size of destination buffer in characters. length must be = (_tcslen(pszSrc) + 1) to hold all of the source including the null terminator pszSrc - source string cchSrc - maximum number of characters to copy from the source string ppszDestEnd - if ppszDestEnd is non-null, the function will return a pointer to the end of the destination string. If the function copied any data, the result will point to the null termination character pcchRemaining - if pcchRemaining is non-null, the function will return the number of characters left in the destination string, including the null terminator dwFlags - controls some details of the string copy: STRSAFE_FILL_BEHIND_NULL if the function succeeds, the low byte of dwFlags will be used to fill the uninitialize part of destination buffer behind the null terminator STRSAFE_IGNORE_NULLS treat NULL string pointers like empty strings (TEXT("")). this flag is useful for emulating functions like lstrcpy STRSAFE_FILL_ON_FAILURE if the function fails, the low byte of dwFlags will be used to fill all of the destination buffer, and it will be null terminated. This will overwrite any truncated string returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER STRSAFE_NO_TRUNCATION / STRSAFE_NULL_ON_FAILURE if the function fails, the destination buffer will be set to the empty string. This will overwrite any truncated string returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER. Notes: Behavior is undefined if source and destination strings overlap. pszDest and pszSrc should not be NULL unless the STRSAFE_IGNORE_NULLS flag is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszSrc may be NULL. An error may still be returned even though NULLS are ignored due to insufficient space. Return Value: S_OK - if there was source data and it was all copied and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the copy operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCchCopyNExA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); STRSAFEAPI StringCchCopyNExW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); #ifdef UNICODE #define StringCchCopyNEx StringCchCopyNExW #else #define StringCchCopyNEx StringCchCopyNExA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCchCopyNExA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr; if ((cchDest > STRSAFE_MAX_CCH) || (cchSrc > STRSAFE_MAX_CCH)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cbDest; // safe to multiply cchDest * sizeof(char) since cchDest < STRSAFE_MAX_CCH and sizeof(char) is 1 cbDest = cchDest * sizeof(char); hr = StringCopyNExWorkerA(pszDest, cchDest, cbDest, pszSrc, cchSrc, ppszDestEnd, pcchRemaining, dwFlags); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCchCopyNExW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr; if ((cchDest > STRSAFE_MAX_CCH) || (cchSrc > STRSAFE_MAX_CCH)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cbDest; // safe to multiply cchDest * sizeof(WCHAR) since cchDest < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2 cbDest = cchDest * sizeof(WCHAR); hr = StringCopyNExWorkerW(pszDest, cchDest, cbDest, pszSrc, cchSrc, ppszDestEnd, pcchRemaining, dwFlags); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CCH_FUNCTIONS #ifndef STRSAFE_NO_CB_FUNCTIONS /*++ STDAPI StringCbCopyNEx(TCHAR pszDest, size_t cbDest, LPCTSTR pszSrc, size_t cbSrc, LPTSTR* ppszDestEnd, size_t* pcbRemaining, DWORD dwFlags); Routine Description: This routine is a safer version of the C built-in function 'strncpy' with some additional parameters. In addition to functionality provided by StringCbCopyN, this routine also returns a pointer to the end of the destination string and the number of bytes left in the destination string including the null terminator. The flags parameter allows additional controls. This routine is meant as a replacement for strncpy, but it does behave differently. This function will not pad the destination buffer with extra null termination characters if cbSrc is greater than the size of pszSrc. Arguments: pszDest - destination string cbDest - size of destination buffer in bytes. length must be ((_tcslen(pszSrc) + 1) * sizeof(TCHAR)) to hold all of the source including the null terminator pszSrc - source string cbSrc - maximum number of bytes to copy from source string ppszDestEnd - if ppszDestEnd is non-null, the function will return a pointer to the end of the destination string. If the function copied any data, the result will point to the null termination character pcbRemaining - pcbRemaining is non-null,the function will return the number of bytes left in the destination string, including the null terminator dwFlags - controls some details of the string copy: STRSAFE_FILL_BEHIND_NULL if the function succeeds, the low byte of dwFlags will be used to fill the uninitialize part of destination buffer behind the null terminator STRSAFE_IGNORE_NULLS treat NULL string pointers like empty strings (TEXT("")). this flag is useful for emulating functions like lstrcpy STRSAFE_FILL_ON_FAILURE if the function fails, the low byte of dwFlags will be used to fill all of the destination buffer, and it will be null terminated. This will overwrite any truncated string returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER STRSAFE_NO_TRUNCATION / STRSAFE_NULL_ON_FAILURE if the function fails, the destination buffer will be set to the empty string. This will overwrite any truncated string returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER. Notes: Behavior is undefined if source and destination strings overlap. pszDest and pszSrc should not be NULL unless the STRSAFE_IGNORE_NULLS flag is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszSrc may be NULL. An error may still be returned even though NULLS are ignored due to insufficient space. Return Value: S_OK - if there was source data and it was all copied and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the copy operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCbCopyNExA(char* pszDest, size_t cbDest, const char* pszSrc, size_t cbSrc, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags); STRSAFEAPI StringCbCopyNExW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, size_t cbSrc, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags); #ifdef UNICODE #define StringCbCopyNEx StringCbCopyNExW #else #define StringCbCopyNEx StringCbCopyNExA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCbCopyNExA(char* pszDest, size_t cbDest, const char* pszSrc, size_t cbSrc, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags) { HRESULT hr; size_t cchDest; size_t cchSrc; size_t cchRemaining = 0; cchDest = cbDest / sizeof(char); cchSrc = cbSrc / sizeof(char); if ((cchDest > STRSAFE_MAX_CCH) || (cchSrc > STRSAFE_MAX_CCH)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCopyNExWorkerA(pszDest, cchDest, cbDest, pszSrc, cchSrc, ppszDestEnd, &cchRemaining, dwFlags); } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (pcbRemaining) { // safe to multiply cchRemaining * sizeof(char) since cchRemaining < STRSAFE_MAX_CCH and sizeof(char) is 1 *pcbRemaining = (cchRemaining * sizeof(char)) + (cbDest % sizeof(char)); } } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCbCopyNExW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, size_t cbSrc, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags) { HRESULT hr; size_t cchDest; size_t cchSrc; size_t cchRemaining = 0; cchDest = cbDest / sizeof(WCHAR); cchSrc = cbSrc / sizeof(WCHAR); if ((cchDest > STRSAFE_MAX_CCH) || (cchSrc > STRSAFE_MAX_CCH)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCopyNExWorkerW(pszDest, cchDest, cbDest, pszSrc, cchSrc, ppszDestEnd, &cchRemaining, dwFlags); } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (pcbRemaining) { // safe to multiply cchRemaining * sizeof(WCHAR) since cchRemaining < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2 *pcbRemaining = (cchRemaining * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR)); } } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CB_FUNCTIONS #ifndef STRSAFE_NO_CCH_FUNCTIONS /*++ STDAPI StringCchCat(LPTSTR pszDest, size_t cchDest, LPCTSTR pszSrc); Routine Description: This routine is a safer version of the C built-in function 'strcat'. The size of the destination buffer (in characters) is a parameter and this function will not write past the end of this buffer and it will ALWAYS null terminate the destination buffer (unless it is zero length). This function returns a hresult, and not a pointer. It returns a S_OK if the string was concatenated without truncation and null terminated, otherwise it will return a failure code. In failure cases as much of pszSrc will be appended to pszDest as possible, and pszDest will be null terminated. Arguments: pszDest - destination string which must be null terminated cchDest - size of destination buffer in characters. length must be = (_tcslen(pszDest) + _tcslen(pszSrc) + 1) to hold all of the combine string plus the null terminator pszSrc - source string which must be null terminated Notes: Behavior is undefined if source and destination strings overlap. pszDest and pszSrc should not be NULL. See StringCchCatEx if you require the handling of NULL values. Return Value: S_OK - if there was source data and it was all concatenated and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCchCatA(char* pszDest, size_t cchDest, const char* pszSrc); STRSAFEAPI StringCchCatW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc); #ifdef UNICODE #define StringCchCat StringCchCatW #else #define StringCchCat StringCchCatA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCchCatA(char* pszDest, size_t cchDest, const char* pszSrc) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCatWorkerA(pszDest, cchDest, pszSrc); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCchCatW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCatWorkerW(pszDest, cchDest, pszSrc); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CCH_FUNCTIONS #ifndef STRSAFE_NO_CB_FUNCTIONS /*++ STDAPI StringCbCat(LPTSTR pszDest, size_t cbDest, LPCTSTR pszSrc); Routine Description: This routine is a safer version of the C built-in function 'strcat'. The size of the destination buffer (in bytes) is a parameter and this function will not write past the end of this buffer and it will ALWAYS null terminate the destination buffer (unless it is zero length). This function returns a hresult, and not a pointer. It returns a S_OK if the string was concatenated without truncation and null terminated, otherwise it will return a failure code. In failure cases as much of pszSrc will be appended to pszDest as possible, and pszDest will be null terminated. Arguments: pszDest - destination string which must be null terminated cbDest - size of destination buffer in bytes. length must be = ((_tcslen(pszDest) + _tcslen(pszSrc) + 1) * sizeof(TCHAR) to hold all of the combine string plus the null terminator pszSrc - source string which must be null terminated Notes: Behavior is undefined if source and destination strings overlap. pszDest and pszSrc should not be NULL. See StringCbCatEx if you require the handling of NULL values. Return Value: S_OK - if there was source data and it was all concatenated and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCbCatA(char* pszDest, size_t cbDest, const char* pszSrc); STRSAFEAPI StringCbCatW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc); #ifdef UNICODE #define StringCbCat StringCbCatW #else #define StringCbCat StringCbCatA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCbCatA(char* pszDest, size_t cbDest, const char* pszSrc) { HRESULT hr; size_t cchDest; cchDest = cbDest / sizeof(char); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCatWorkerA(pszDest, cchDest, pszSrc); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCbCatW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc) { HRESULT hr; size_t cchDest; cchDest = cbDest / sizeof(WCHAR); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCatWorkerW(pszDest, cchDest, pszSrc); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CB_FUNCTIONS #ifndef STRSAFE_NO_CCH_FUNCTIONS /*++ STDAPI StringCchCatEx(LPTSTR pszDest, size_t cchDest, LPCTSTR pszSrc, LPTSTR* ppszDestEnd, size_t* pcchRemaining, DWORD dwFlags); Routine Description: This routine is a safer version of the C built-in function 'strcat' with some additional parameters. In addition to functionality provided by StringCchCat, this routine also returns a pointer to the end of the destination string and the number of characters left in the destination string including the null terminator. The flags parameter allows additional controls. Arguments: pszDest - destination string which must be null terminated cchDest - size of destination buffer in characters length must be (_tcslen(pszDest) + _tcslen(pszSrc) + 1) to hold all of the combine string plus the null terminator. pszSrc - source string which must be null terminated ppszDestEnd - if ppszDestEnd is non-null, the function will return a pointer to the end of the destination string. If the function appended any data, the result will point to the null termination character pcchRemaining - if pcchRemaining is non-null, the function will return the number of characters left in the destination string, including the null terminator dwFlags - controls some details of the string copy: STRSAFE_FILL_BEHIND_NULL if the function succeeds, the low byte of dwFlags will be used to fill the uninitialize part of destination buffer behind the null terminator STRSAFE_IGNORE_NULLS treat NULL string pointers like empty strings (TEXT("")). this flag is useful for emulating functions like lstrcat STRSAFE_FILL_ON_FAILURE if the function fails, the low byte of dwFlags will be used to fill all of the destination buffer, and it will be null terminated. This will overwrite any pre-existing or truncated string STRSAFE_NULL_ON_FAILURE if the function fails, the destination buffer will be set to the empty string. This will overwrite any pre-existing or truncated string STRSAFE_NO_TRUNCATION if the function returns STRSAFE_E_INSUFFICIENT_BUFFER, pszDest will not contain a truncated string, it will remain unchanged. Notes: Behavior is undefined if source and destination strings overlap. pszDest and pszSrc should not be NULL unless the STRSAFE_IGNORE_NULLS flag is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszSrc may be NULL. An error may still be returned even though NULLS are ignored due to insufficient space. Return Value: S_OK - if there was source data and it was all concatenated and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCchCatExA(char* pszDest, size_t cchDest, const char* pszSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); STRSAFEAPI StringCchCatExW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); #ifdef UNICODE #define StringCchCatEx StringCchCatExW #else #define StringCchCatEx StringCchCatExA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCchCatExA(char* pszDest, size_t cchDest, const char* pszSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cbDest; // safe to multiply cchDest * sizeof(char) since cchDest < STRSAFE_MAX_CCH and sizeof(char) is 1 cbDest = cchDest * sizeof(char); hr = StringCatExWorkerA(pszDest, cchDest, cbDest, pszSrc, ppszDestEnd, pcchRemaining, dwFlags); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCchCatExW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cbDest; // safe to multiply cchDest * sizeof(WCHAR) since cchDest < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2 cbDest = cchDest * sizeof(WCHAR); hr = StringCatExWorkerW(pszDest, cchDest, cbDest, pszSrc, ppszDestEnd, pcchRemaining, dwFlags); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CCH_FUNCTIONS #ifndef STRSAFE_NO_CB_FUNCTIONS /*++ STDAPI StringCbCatEx(LPTSTR pszDest, size_t cbDest, LPCTSTR pszSrc, LPTSTR* ppszDestEnd, size_t* pcbRemaining, DWORD dwFlags); Routine Description: This routine is a safer version of the C built-in function 'strcat' with some additional parameters. In addition to functionality provided by StringCbCat, this routine also returns a pointer to the end of the destination string and the number of bytes left in the destination string including the null terminator. The flags parameter allows additional controls. Arguments: pszDest - destination string which must be null terminated cbDest - size of destination buffer in bytes. length must be ((_tcslen(pszDest) + _tcslen(pszSrc) + 1) * sizeof(TCHAR) to hold all of the combine string plus the null terminator. pszSrc - source string which must be null terminated ppszDestEnd - if ppszDestEnd is non-null, the function will return a pointer to the end of the destination string. If the function appended any data, the result will point to the null termination character pcbRemaining - if pcbRemaining is non-null, the function will return the number of bytes left in the destination string, including the null terminator dwFlags - controls some details of the string copy: STRSAFE_FILL_BEHIND_NULL if the function succeeds, the low byte of dwFlags will be used to fill the uninitialize part of destination buffer behind the null terminator STRSAFE_IGNORE_NULLS treat NULL string pointers like empty strings (TEXT("")). this flag is useful for emulating functions like lstrcat STRSAFE_FILL_ON_FAILURE if the function fails, the low byte of dwFlags will be used to fill all of the destination buffer, and it will be null terminated. This will overwrite any pre-existing or truncated string STRSAFE_NULL_ON_FAILURE if the function fails, the destination buffer will be set to the empty string. This will overwrite any pre-existing or truncated string STRSAFE_NO_TRUNCATION if the function returns STRSAFE_E_INSUFFICIENT_BUFFER, pszDest will not contain a truncated string, it will remain unchanged. Notes: Behavior is undefined if source and destination strings overlap. pszDest and pszSrc should not be NULL unless the STRSAFE_IGNORE_NULLS flag is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszSrc may be NULL. An error may still be returned even though NULLS are ignored due to insufficient space. Return Value: S_OK - if there was source data and it was all concatenated and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCbCatExA(char* pszDest, size_t cbDest, const char* pszSrc, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags); STRSAFEAPI StringCbCatExW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags); #ifdef UNICODE #define StringCbCatEx StringCbCatExW #else #define StringCbCatEx StringCbCatExA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCbCatExA(char* pszDest, size_t cbDest, const char* pszSrc, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags) { HRESULT hr; size_t cchDest; size_t cchRemaining = 0; cchDest = cbDest / sizeof(char); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCatExWorkerA(pszDest, cchDest, cbDest, pszSrc, ppszDestEnd, &cchRemaining, dwFlags); } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (pcbRemaining) { // safe to multiply cchRemaining * sizeof(char) since cchRemaining < STRSAFE_MAX_CCH and sizeof(char) is 1 *pcbRemaining = (cchRemaining * sizeof(char)) + (cbDest % sizeof(char)); } } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCbCatExW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags) { HRESULT hr; size_t cchDest; size_t cchRemaining = 0; cchDest = cbDest / sizeof(WCHAR); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCatExWorkerW(pszDest, cchDest, cbDest, pszSrc, ppszDestEnd, &cchRemaining, dwFlags); } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (pcbRemaining) { // safe to multiply cchRemaining * sizeof(WCHAR) since cchRemaining < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2 *pcbRemaining = (cchRemaining * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR)); } } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CB_FUNCTIONS #ifndef STRSAFE_NO_CCH_FUNCTIONS /*++ STDAPI StringCchCatN(LPTSTR pszDest, size_t cchDest, LPCTSTR pszSrc, size_t cchMaxAppend); Routine Description: This routine is a safer version of the C built-in function 'strncat'. The size of the destination buffer (in characters) is a parameter as well as the maximum number of characters to append, excluding the null terminator. This function will not write past the end of the destination buffer and it will ALWAYS null terminate pszDest (unless it is zero length). This function returns a hresult, and not a pointer. It returns a S_OK if all of pszSrc or the first cchMaxAppend characters were appended to the destination string and it was null terminated, otherwise it will return a failure code. In failure cases as much of pszSrc will be appended to pszDest as possible, and pszDest will be null terminated. Arguments: pszDest - destination string which must be null terminated cchDest - size of destination buffer in characters. length must be (_tcslen(pszDest) + min(cchMaxAppend, _tcslen(pszSrc)) + 1) to hold all of the combine string plus the null terminator. pszSrc - source string cchMaxAppend - maximum number of characters to append Notes: Behavior is undefined if source and destination strings overlap. pszDest and pszSrc should not be NULL. See StringCchCatNEx if you require the handling of NULL values. Return Value: S_OK - if all of pszSrc or the first cchMaxAppend characters were concatenated to pszDest and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCchCatNA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchMaxAppend); STRSAFEAPI StringCchCatNW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchMaxAppend); #ifdef UNICODE #define StringCchCatN StringCchCatNW #else #define StringCchCatN StringCchCatNA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCchCatNA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchMaxAppend) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCatNWorkerA(pszDest, cchDest, pszSrc, cchMaxAppend); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCchCatNW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchMaxAppend) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringCatNWorkerW(pszDest, cchDest, pszSrc, cchMaxAppend); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CCH_FUNCTIONS #ifndef STRSAFE_NO_CB_FUNCTIONS /*++ STDAPI StringCbCatN(LPTSTR pszDest, size_t cbDest, LPCTSTR pszSrc, size_t cbMaxAppend); Routine Description: This routine is a safer version of the C built-in function 'strncat'. The size of the destination buffer (in bytes) is a parameter as well as the maximum number of bytes to append, excluding the null terminator. This function will not write past the end of the destination buffer and it will ALWAYS null terminate pszDest (unless it is zero length). This function returns a hresult, and not a pointer. It returns a S_OK if all of pszSrc or the first cbMaxAppend bytes were appended to the destination string and it was null terminated, otherwise it will return a failure code. In failure cases as much of pszSrc will be appended to pszDest as possible, and pszDest will be null terminated. Arguments: pszDest - destination string which must be null terminated cbDest - size of destination buffer in bytes. length must be ((_tcslen(pszDest) + min(cbMaxAppend / sizeof(TCHAR), _tcslen(pszSrc)) + 1) * sizeof(TCHAR) to hold all of the combine string plus the null terminator. pszSrc - source string cbMaxAppend - maximum number of bytes to append Notes: Behavior is undefined if source and destination strings overlap. pszDest and pszSrc should not be NULL. See StringCbCatNEx if you require the handling of NULL values. Return Value: S_OK - if all of pszSrc or the first cbMaxAppend bytes were concatenated to pszDest and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCbCatNA(char* pszDest, size_t cbDest, const char* pszSrc, size_t cbMaxAppend); STRSAFEAPI StringCbCatNW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, size_t cbMaxAppend); #ifdef UNICODE #define StringCbCatN StringCbCatNW #else #define StringCbCatN StringCbCatNA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCbCatNA(char* pszDest, size_t cbDest, const char* pszSrc, size_t cbMaxAppend) { HRESULT hr; size_t cchDest; cchDest = cbDest / sizeof(char); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cchMaxAppend; cchMaxAppend = cbMaxAppend / sizeof(char); hr = StringCatNWorkerA(pszDest, cchDest, pszSrc, cchMaxAppend); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCbCatNW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, size_t cbMaxAppend) { HRESULT hr; size_t cchDest; cchDest = cbDest / sizeof(WCHAR); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cchMaxAppend; cchMaxAppend = cbMaxAppend / sizeof(WCHAR); hr = StringCatNWorkerW(pszDest, cchDest, pszSrc, cchMaxAppend); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CB_FUNCTIONS #ifndef STRSAFE_NO_CCH_FUNCTIONS /*++ STDAPI StringCchCatNEx(LPTSTR pszDest, size_t cchDest, LPCTSTR pszSrc, size_t cchMaxAppend, LPTSTR* ppszDestEnd, size_t* pcchRemaining, DWORD dwFlags); Routine Description: This routine is a safer version of the C built-in function 'strncat', with some additional parameters. In addition to functionality provided by StringCchCatN, this routine also returns a pointer to the end of the destination string and the number of characters left in the destination string including the null terminator. The flags parameter allows additional controls. Arguments: pszDest - destination string which must be null terminated cchDest - size of destination buffer in characters. length must be (_tcslen(pszDest) + min(cchMaxAppend, _tcslen(pszSrc)) + 1) to hold all of the combine string plus the null terminator. pszSrc - source string cchMaxAppend - maximum number of characters to append ppszDestEnd - if ppszDestEnd is non-null, the function will return a pointer to the end of the destination string. If the function appended any data, the result will point to the null termination character pcchRemaining - if pcchRemaining is non-null, the function will return the number of characters left in the destination string, including the null terminator dwFlags - controls some details of the string copy: STRSAFE_FILL_BEHIND_NULL if the function succeeds, the low byte of dwFlags will be used to fill the uninitialize part of destination buffer behind the null terminator STRSAFE_IGNORE_NULLS treat NULL string pointers like empty strings (TEXT("")) STRSAFE_FILL_ON_FAILURE if the function fails, the low byte of dwFlags will be used to fill all of the destination buffer, and it will be null terminated. This will overwrite any pre-existing or truncated string STRSAFE_NULL_ON_FAILURE if the function fails, the destination buffer will be set to the empty string. This will overwrite any pre-existing or truncated string STRSAFE_NO_TRUNCATION if the function returns STRSAFE_E_INSUFFICIENT_BUFFER, pszDest will not contain a truncated string, it will remain unchanged. Notes: Behavior is undefined if source and destination strings overlap. pszDest and pszSrc should not be NULL unless the STRSAFE_IGNORE_NULLS flag is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszSrc may be NULL. An error may still be returned even though NULLS are ignored due to insufficient space. Return Value: S_OK - if all of pszSrc or the first cchMaxAppend characters were concatenated to pszDest and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCchCatNExA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchMaxAppend, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); STRSAFEAPI StringCchCatNExW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchMaxAppend, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); #ifdef UNICODE #define StringCchCatNEx StringCchCatNExW #else #define StringCchCatNEx StringCchCatNExA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCchCatNExA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchMaxAppend, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cbDest; // safe to multiply cchDest * sizeof(char) since cchDest < STRSAFE_MAX_CCH and sizeof(char) is 1 cbDest = cchDest * sizeof(char); hr = StringCatNExWorkerA(pszDest, cchDest, cbDest, pszSrc, cchMaxAppend, ppszDestEnd, pcchRemaining, dwFlags); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCchCatNExW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchMaxAppend, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cbDest; // safe to multiply cchDest * sizeof(WCHAR) since cchDest < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2 cbDest = cchDest * sizeof(WCHAR); hr = StringCatNExWorkerW(pszDest, cchDest, cbDest, pszSrc, cchMaxAppend, ppszDestEnd, pcchRemaining, dwFlags); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CCH_FUNCTIONS #ifndef STRSAFE_NO_CB_FUNCTIONS /*++ STDAPI StringCbCatNEx(LPTSTR pszDest, size_t cbDest, LPCTSTR pszSrc, size_t cbMaxAppend LPTSTR* ppszDestEnd, size_t* pcchRemaining, DWORD dwFlags); Routine Description: This routine is a safer version of the C built-in function 'strncat', with some additional parameters. In addition to functionality provided by StringCbCatN, this routine also returns a pointer to the end of the destination string and the number of bytes left in the destination string including the null terminator. The flags parameter allows additional controls. Arguments: pszDest - destination string which must be null terminated cbDest - size of destination buffer in bytes. length must be ((_tcslen(pszDest) + min(cbMaxAppend / sizeof(TCHAR), _tcslen(pszSrc)) + 1) * sizeof(TCHAR) to hold all of the combine string plus the null terminator. pszSrc - source string cbMaxAppend - maximum number of bytes to append ppszDestEnd - if ppszDestEnd is non-null, the function will return a pointer to the end of the destination string. If the function appended any data, the result will point to the null termination character pcbRemaining - if pcbRemaining is non-null, the function will return the number of bytes left in the destination string, including the null terminator dwFlags - controls some details of the string copy: STRSAFE_FILL_BEHIND_NULL if the function succeeds, the low byte of dwFlags will be used to fill the uninitialize part of destination buffer behind the null terminator STRSAFE_IGNORE_NULLS treat NULL string pointers like empty strings (TEXT("")) STRSAFE_FILL_ON_FAILURE if the function fails, the low byte of dwFlags will be used to fill all of the destination buffer, and it will be null terminated. This will overwrite any pre-existing or truncated string STRSAFE_NULL_ON_FAILURE if the function fails, the destination buffer will be set to the empty string. This will overwrite any pre-existing or truncated string STRSAFE_NO_TRUNCATION if the function returns STRSAFE_E_INSUFFICIENT_BUFFER, pszDest will not contain a truncated string, it will remain unchanged. Notes: Behavior is undefined if source and destination strings overlap. pszDest and pszSrc should not be NULL unless the STRSAFE_IGNORE_NULLS flag is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszSrc may be NULL. An error may still be returned even though NULLS are ignored due to insufficient space. Return Value: S_OK - if all of pszSrc or the first cbMaxAppend bytes were concatenated to pszDest and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCbCatNExA(char* pszDest, size_t cbDest, const char* pszSrc, size_t cbMaxAppend, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags); STRSAFEAPI StringCbCatNExW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, size_t cbMaxAppend, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags); #ifdef UNICODE #define StringCbCatNEx StringCbCatNExW #else #define StringCbCatNEx StringCbCatNExA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCbCatNExA(char* pszDest, size_t cbDest, const char* pszSrc, size_t cbMaxAppend, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags) { HRESULT hr; size_t cchDest; size_t cchRemaining = 0; cchDest = cbDest / sizeof(char); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cchMaxAppend; cchMaxAppend = cbMaxAppend / sizeof(char); hr = StringCatNExWorkerA(pszDest, cchDest, cbDest, pszSrc, cchMaxAppend, ppszDestEnd, &cchRemaining, dwFlags); } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (pcbRemaining) { // safe to multiply cchRemaining * sizeof(char) since cchRemaining < STRSAFE_MAX_CCH and sizeof(char) is 1 *pcbRemaining = (cchRemaining * sizeof(char)) + (cbDest % sizeof(char)); } } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCbCatNExW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, size_t cbMaxAppend, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags) { HRESULT hr; size_t cchDest; size_t cchRemaining = 0; cchDest = cbDest / sizeof(WCHAR); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cchMaxAppend; cchMaxAppend = cbMaxAppend / sizeof(WCHAR); hr = StringCatNExWorkerW(pszDest, cchDest, cbDest, pszSrc, cchMaxAppend, ppszDestEnd, &cchRemaining, dwFlags); } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (pcbRemaining) { // safe to multiply cchRemaining * sizeof(WCHAR) since cchRemaining < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2 *pcbRemaining = (cchRemaining * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR)); } } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CB_FUNCTIONS #ifndef STRSAFE_NO_CCH_FUNCTIONS /*++ STDAPI StringCchVPrintf(LPTSTR pszDest, size_t cchDest, LPCTSTR pszFormat, va_list argList); Routine Description: This routine is a safer version of the C built-in function 'vsprintf'. The size of the destination buffer (in characters) is a parameter and this function will not write past the end of this buffer and it will ALWAYS null terminate the destination buffer (unless it is zero length). This function returns a hresult, and not a pointer. It returns a S_OK if the string was printed without truncation and null terminated, otherwise it will return a failure code. In failure cases it will return a truncated version of the ideal result. Arguments: pszDest - destination string cchDest - size of destination buffer in characters length must be sufficient to hold the resulting formatted string, including the null terminator. pszFormat - format string which must be null terminated argList - va_list from the variable arguments according to the stdarg.h convention Notes: Behavior is undefined if destination, format strings or any arguments strings overlap. pszDest and pszFormat should not be NULL. See StringCchVPrintfEx if you require the handling of NULL values. Return Value: S_OK - if there was sufficient space in the dest buffer for the resultant string and it was null terminated. failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the print operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCchVPrintfA(char* pszDest, size_t cchDest, const char* pszFormat, va_list argList); STRSAFEAPI StringCchVPrintfW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszFormat, va_list argList); #ifdef UNICODE #define StringCchVPrintf StringCchVPrintfW #else #define StringCchVPrintf StringCchVPrintfA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCchVPrintfA(char* pszDest, size_t cchDest, const char* pszFormat, va_list argList) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringVPrintfWorkerA(pszDest, cchDest, pszFormat, argList); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCchVPrintfW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszFormat, va_list argList) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringVPrintfWorkerW(pszDest, cchDest, pszFormat, argList); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CCH_FUNCTIONS #ifndef STRSAFE_NO_CB_FUNCTIONS /*++ STDAPI StringCbVPrintf(LPTSTR pszDest, size_t cbDest, LPCTSTR pszFormat, va_list argList); Routine Description: This routine is a safer version of the C built-in function 'vsprintf'. The size of the destination buffer (in bytes) is a parameter and this function will not write past the end of this buffer and it will ALWAYS null terminate the destination buffer (unless it is zero length). This function returns a hresult, and not a pointer. It returns a S_OK if the string was printed without truncation and null terminated, otherwise it will return a failure code. In failure cases it will return a truncated version of the ideal result. Arguments: pszDest - destination string cbDest - size of destination buffer in bytes length must be sufficient to hold the resulting formatted string, including the null terminator. pszFormat - format string which must be null terminated argList - va_list from the variable arguments according to the stdarg.h convention Notes: Behavior is undefined if destination, format strings or any arguments strings overlap. pszDest and pszFormat should not be NULL. See StringCbVPrintfEx if you require the handling of NULL values. Return Value: S_OK - if there was sufficient space in the dest buffer for the resultant string and it was null terminated. failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the print operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCbVPrintfA(char* pszDest, size_t cbDest, const char* pszFormat, va_list argList); STRSAFEAPI StringCbVPrintfW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszFormat, va_list argList); #ifdef UNICODE #define StringCbVPrintf StringCbVPrintfW #else #define StringCbVPrintf StringCbVPrintfA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCbVPrintfA(char* pszDest, size_t cbDest, const char* pszFormat, va_list argList) { HRESULT hr; size_t cchDest; cchDest = cbDest / sizeof(char); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringVPrintfWorkerA(pszDest, cchDest, pszFormat, argList); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCbVPrintfW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszFormat, va_list argList) { HRESULT hr; size_t cchDest; cchDest = cbDest / sizeof(WCHAR); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringVPrintfWorkerW(pszDest, cchDest, pszFormat, argList); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CB_FUNCTIONS #ifndef STRSAFE_NO_CCH_FUNCTIONS /*++ STDAPI StringCchPrintf(LPTSTR pszDest, size_t cchDest, LPCTSTR pszFormat, ...); Routine Description: This routine is a safer version of the C built-in function 'sprintf'. The size of the destination buffer (in characters) is a parameter and this function will not write past the end of this buffer and it will ALWAYS null terminate the destination buffer (unless it is zero length). This function returns a hresult, and not a pointer. It returns a S_OK if the string was printed without truncation and null terminated, otherwise it will return a failure code. In failure cases it will return a truncated version of the ideal result. Arguments: pszDest - destination string cchDest - size of destination buffer in characters length must be sufficient to hold the resulting formatted string, including the null terminator. pszFormat - format string which must be null terminated ... - additional parameters to be formatted according to the format string Notes: Behavior is undefined if destination, format strings or any arguments strings overlap. pszDest and pszFormat should not be NULL. See StringCchPrintfEx if you require the handling of NULL values. Return Value: S_OK - if there was sufficient space in the dest buffer for the resultant string and it was null terminated. failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the print operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCchPrintfA(char* pszDest, size_t cchDest, const char* pszFormat, ...); STRSAFEAPI StringCchPrintfW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszFormat, ...); #ifdef UNICODE #define StringCchPrintf StringCchPrintfW #else #define StringCchPrintf StringCchPrintfA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCchPrintfA(char* pszDest, size_t cchDest, const char* pszFormat, ...) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { va_list argList; va_start(argList, pszFormat); hr = StringVPrintfWorkerA(pszDest, cchDest, pszFormat, argList); va_end(argList); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCchPrintfW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszFormat, ...) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { va_list argList; va_start(argList, pszFormat); hr = StringVPrintfWorkerW(pszDest, cchDest, pszFormat, argList); va_end(argList); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CCH_FUNCTIONS #ifndef STRSAFE_NO_CB_FUNCTIONS /*++ STDAPI StringCbPrintf(LPTSTR pszDest, size_t cbDest, LPCTSTR pszFormat, ...); Routine Description: This routine is a safer version of the C built-in function 'sprintf'. The size of the destination buffer (in bytes) is a parameter and this function will not write past the end of this buffer and it will ALWAYS null terminate the destination buffer (unless it is zero length). This function returns a hresult, and not a pointer. It returns a S_OK if the string was printed without truncation and null terminated, otherwise it will return a failure code. In failure cases it will return a truncated version of the ideal result. Arguments: pszDest - destination string cbDest - size of destination buffer in bytes length must be sufficient to hold the resulting formatted string, including the null terminator. pszFormat - format string which must be null terminated ... - additional parameters to be formatted according to the format string Notes: Behavior is undefined if destination, format strings or any arguments strings overlap. pszDest and pszFormat should not be NULL. See StringCbPrintfEx if you require the handling of NULL values. Return Value: S_OK - if there was sufficient space in the dest buffer for the resultant string and it was null terminated. failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the print operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCbPrintfA(char* pszDest, size_t cbDest, const char* pszFormat, ...); STRSAFEAPI StringCbPrintfW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszFormat, ...); #ifdef UNICODE #define StringCbPrintf StringCbPrintfW #else #define StringCbPrintf StringCbPrintfA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCbPrintfA(char* pszDest, size_t cbDest, const char* pszFormat, ...) { HRESULT hr; size_t cchDest; cchDest = cbDest / sizeof(char); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { va_list argList; va_start(argList, pszFormat); hr = StringVPrintfWorkerA(pszDest, cchDest, pszFormat, argList); va_end(argList); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCbPrintfW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszFormat, ...) { HRESULT hr; size_t cchDest; cchDest = cbDest / sizeof(WCHAR); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { va_list argList; va_start(argList, pszFormat); hr = StringVPrintfWorkerW(pszDest, cchDest, pszFormat, argList); va_end(argList); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CB_FUNCTIONS #ifndef STRSAFE_NO_CCH_FUNCTIONS /*++ STDAPI StringCchPrintfEx(LPTSTR pszDest, size_t cchDest, LPTSTR* ppszDestEnd, size_t* pcchRemaining, DWORD dwFlags, LPCTSTR pszFormat, ...); Routine Description: This routine is a safer version of the C built-in function 'sprintf' with some additional parameters. In addition to functionality provided by StringCchPrintf, this routine also returns a pointer to the end of the destination string and the number of characters left in the destination string including the null terminator. The flags parameter allows additional controls. Arguments: pszDest - destination string cchDest - size of destination buffer in characters. length must be sufficient to contain the resulting formatted string plus the null terminator. ppszDestEnd - if ppszDestEnd is non-null, the function will return a pointer to the end of the destination string. If the function printed any data, the result will point to the null termination character pcchRemaining - if pcchRemaining is non-null, the function will return the number of characters left in the destination string, including the null terminator dwFlags - controls some details of the string copy: STRSAFE_FILL_BEHIND_NULL if the function succeeds, the low byte of dwFlags will be used to fill the uninitialize part of destination buffer behind the null terminator STRSAFE_IGNORE_NULLS treat NULL string pointers like empty strings (TEXT("")) STRSAFE_FILL_ON_FAILURE if the function fails, the low byte of dwFlags will be used to fill all of the destination buffer, and it will be null terminated. This will overwrite any truncated string returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER STRSAFE_NO_TRUNCATION / STRSAFE_NULL_ON_FAILURE if the function fails, the destination buffer will be set to the empty string. This will overwrite any truncated string returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER. pszFormat - format string which must be null terminated ... - additional parameters to be formatted according to the format string Notes: Behavior is undefined if destination, format strings or any arguments strings overlap. pszDest and pszFormat should not be NULL unless the STRSAFE_IGNORE_NULLS flag is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszFormat may be NULL. An error may still be returned even though NULLS are ignored due to insufficient space. Return Value: S_OK - if there was source data and it was all concatenated and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the print operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCchPrintfExA(char* pszDest, size_t cchDest, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags, const char* pszFormat, ...); STRSAFEAPI StringCchPrintfExW(WCHAR* pszDest, size_t cchDest, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags, const WCHAR* pszFormat, ...); #ifdef UNICODE #define StringCchPrintfEx StringCchPrintfExW #else #define StringCchPrintfEx StringCchPrintfExA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCchPrintfExA(char* pszDest, size_t cchDest, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags, const char* pszFormat, ...) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cbDest; va_list argList; // safe to multiply cchDest * sizeof(char) since cchDest < STRSAFE_MAX_CCH and sizeof(char) is 1 cbDest = cchDest * sizeof(char); va_start(argList, pszFormat); hr = StringVPrintfExWorkerA(pszDest, cchDest, cbDest, ppszDestEnd, pcchRemaining, dwFlags, pszFormat, argList); va_end(argList); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCchPrintfExW(WCHAR* pszDest, size_t cchDest, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags, const WCHAR* pszFormat, ...) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cbDest; va_list argList; // safe to multiply cchDest * sizeof(WCHAR) since cchDest < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2 cbDest = cchDest * sizeof(WCHAR); va_start(argList, pszFormat); hr = StringVPrintfExWorkerW(pszDest, cchDest, cbDest, ppszDestEnd, pcchRemaining, dwFlags, pszFormat, argList); va_end(argList); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CCH_FUNCTIONS #ifndef STRSAFE_NO_CB_FUNCTIONS /*++ STDAPI StringCbPrintfEx(LPTSTR pszDest, size_t cbDest, LPTSTR* ppszDestEnd, size_t* pcbRemaining, DWORD dwFlags, LPCTSTR pszFormat, ...); Routine Description: This routine is a safer version of the C built-in function 'sprintf' with some additional parameters. In addition to functionality provided by StringCbPrintf, this routine also returns a pointer to the end of the destination string and the number of bytes left in the destination string including the null terminator. The flags parameter allows additional controls. Arguments: pszDest - destination string cbDest - size of destination buffer in bytes. length must be sufficient to contain the resulting formatted string plus the null terminator. ppszDestEnd - if ppszDestEnd is non-null, the function will return a pointer to the end of the destination string. If the function printed any data, the result will point to the null termination character pcbRemaining - if pcbRemaining is non-null, the function will return the number of bytes left in the destination string, including the null terminator dwFlags - controls some details of the string copy: STRSAFE_FILL_BEHIND_NULL if the function succeeds, the low byte of dwFlags will be used to fill the uninitialize part of destination buffer behind the null terminator STRSAFE_IGNORE_NULLS treat NULL string pointers like empty strings (TEXT("")) STRSAFE_FILL_ON_FAILURE if the function fails, the low byte of dwFlags will be used to fill all of the destination buffer, and it will be null terminated. This will overwrite any truncated string returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER STRSAFE_NO_TRUNCATION / STRSAFE_NULL_ON_FAILURE if the function fails, the destination buffer will be set to the empty string. This will overwrite any truncated string returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER. pszFormat - format string which must be null terminated ... - additional parameters to be formatted according to the format string Notes: Behavior is undefined if destination, format strings or any arguments strings overlap. pszDest and pszFormat should not be NULL unless the STRSAFE_IGNORE_NULLS flag is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszFormat may be NULL. An error may still be returned even though NULLS are ignored due to insufficient space. Return Value: S_OK - if there was source data and it was all concatenated and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the print operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCbPrintfExA(char* pszDest, size_t cbDest, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags, const char* pszFormat, ...); STRSAFEAPI StringCbPrintfExW(WCHAR* pszDest, size_t cbDest, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags, const WCHAR* pszFormat, ...); #ifdef UNICODE #define StringCbPrintfEx StringCbPrintfExW #else #define StringCbPrintfEx StringCbPrintfExA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCbPrintfExA(char* pszDest, size_t cbDest, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags, const char* pszFormat, ...) { HRESULT hr; size_t cchDest; size_t cchRemaining = 0; cchDest = cbDest / sizeof(char); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { va_list argList; va_start(argList, pszFormat); hr = StringVPrintfExWorkerA(pszDest, cchDest, cbDest, ppszDestEnd, &cchRemaining, dwFlags, pszFormat, argList); va_end(argList); } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (pcbRemaining) { // safe to multiply cchRemaining * sizeof(char) since cchRemaining < STRSAFE_MAX_CCH and sizeof(char) is 1 *pcbRemaining = (cchRemaining * sizeof(char)) + (cbDest % sizeof(char)); } } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCbPrintfExW(WCHAR* pszDest, size_t cbDest, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags, const WCHAR* pszFormat, ...) { HRESULT hr; size_t cchDest; size_t cchRemaining = 0; cchDest = cbDest / sizeof(WCHAR); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { va_list argList; va_start(argList, pszFormat); hr = StringVPrintfExWorkerW(pszDest, cchDest, cbDest, ppszDestEnd, &cchRemaining, dwFlags, pszFormat, argList); va_end(argList); } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (pcbRemaining) { // safe to multiply cchRemaining * sizeof(WCHAR) since cchRemaining < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2 *pcbRemaining = (cchRemaining * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR)); } } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CB_FUNCTIONS #ifndef STRSAFE_NO_CCH_FUNCTIONS /*++ STDAPI StringCchVPrintfEx(LPTSTR pszDest, size_t cchDest, LPTSTR* ppszDestEnd, size_t* pcchRemaining, DWORD dwFlags, LPCTSTR pszFormat, va_list argList); Routine Description: This routine is a safer version of the C built-in function 'vsprintf' with some additional parameters. In addition to functionality provided by StringCchVPrintf, this routine also returns a pointer to the end of the destination string and the number of characters left in the destination string including the null terminator. The flags parameter allows additional controls. Arguments: pszDest - destination string cchDest - size of destination buffer in characters. length must be sufficient to contain the resulting formatted string plus the null terminator. ppszDestEnd - if ppszDestEnd is non-null, the function will return a pointer to the end of the destination string. If the function printed any data, the result will point to the null termination character pcchRemaining - if pcchRemaining is non-null, the function will return the number of characters left in the destination string, including the null terminator dwFlags - controls some details of the string copy: STRSAFE_FILL_BEHIND_NULL if the function succeeds, the low byte of dwFlags will be used to fill the uninitialize part of destination buffer behind the null terminator STRSAFE_IGNORE_NULLS treat NULL string pointers like empty strings (TEXT("")) STRSAFE_FILL_ON_FAILURE if the function fails, the low byte of dwFlags will be used to fill all of the destination buffer, and it will be null terminated. This will overwrite any truncated string returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER STRSAFE_NO_TRUNCATION / STRSAFE_NULL_ON_FAILURE if the function fails, the destination buffer will be set to the empty string. This will overwrite any truncated string returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER. pszFormat - format string which must be null terminated argList - va_list from the variable arguments according to the stdarg.h convention Notes: Behavior is undefined if destination, format strings or any arguments strings overlap. pszDest and pszFormat should not be NULL unless the STRSAFE_IGNORE_NULLS flag is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszFormat may be NULL. An error may still be returned even though NULLS are ignored due to insufficient space. Return Value: S_OK - if there was source data and it was all concatenated and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the print operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCchVPrintfExA(char* pszDest, size_t cchDest, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags, const char* pszFormat, va_list argList); STRSAFEAPI StringCchVPrintfExW(WCHAR* pszDest, size_t cchDest, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags, const WCHAR* pszFormat, va_list argList); #ifdef UNICODE #define StringCchVPrintfEx StringCchVPrintfExW #else #define StringCchVPrintfEx StringCchVPrintfExA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCchVPrintfExA(char* pszDest, size_t cchDest, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags, const char* pszFormat, va_list argList) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cbDest; // safe to multiply cchDest * sizeof(char) since cchDest < STRSAFE_MAX_CCH and sizeof(char) is 1 cbDest = cchDest * sizeof(char); hr = StringVPrintfExWorkerA(pszDest, cchDest, cbDest, ppszDestEnd, pcchRemaining, dwFlags, pszFormat, argList); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCchVPrintfExW(WCHAR* pszDest, size_t cchDest, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags, const WCHAR* pszFormat, va_list argList) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cbDest; // safe to multiply cchDest * sizeof(WCHAR) since cchDest < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2 cbDest = cchDest * sizeof(WCHAR); hr = StringVPrintfExWorkerW(pszDest, cchDest, cbDest, ppszDestEnd, pcchRemaining, dwFlags, pszFormat, argList); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CCH_FUNCTIONS #ifndef STRSAFE_NO_CB_FUNCTIONS /*++ STDAPI StringCbVPrintfEx(LPTSTR pszDest, size_t cbDest, LPTSTR* ppszDestEnd, size_t* pcbRemaining, DWORD dwFlags, LPCTSTR pszFormat, va_list argList); Routine Description: This routine is a safer version of the C built-in function 'vsprintf' with some additional parameters. In addition to functionality provided by StringCbVPrintf, this routine also returns a pointer to the end of the destination string and the number of characters left in the destination string including the null terminator. The flags parameter allows additional controls. Arguments: pszDest - destination string cbDest - size of destination buffer in bytes. length must be sufficient to contain the resulting formatted string plus the null terminator. ppszDestEnd - if ppszDestEnd is non-null, the function will return a pointer to the end of the destination string. If the function printed any data, the result will point to the null termination character pcbRemaining - if pcbRemaining is non-null, the function will return the number of bytes left in the destination string, including the null terminator dwFlags - controls some details of the string copy: STRSAFE_FILL_BEHIND_NULL if the function succeeds, the low byte of dwFlags will be used to fill the uninitialize part of destination buffer behind the null terminator STRSAFE_IGNORE_NULLS treat NULL string pointers like empty strings (TEXT("")) STRSAFE_FILL_ON_FAILURE if the function fails, the low byte of dwFlags will be used to fill all of the destination buffer, and it will be null terminated. This will overwrite any truncated string returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER STRSAFE_NO_TRUNCATION / STRSAFE_NULL_ON_FAILURE if the function fails, the destination buffer will be set to the empty string. This will overwrite any truncated string returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER. pszFormat - format string which must be null terminated argList - va_list from the variable arguments according to the stdarg.h convention Notes: Behavior is undefined if destination, format strings or any arguments strings overlap. pszDest and pszFormat should not be NULL unless the STRSAFE_IGNORE_NULLS flag is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszFormat may be NULL. An error may still be returned even though NULLS are ignored due to insufficient space. Return Value: S_OK - if there was source data and it was all concatenated and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all falure cases STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that the print operation failed due to insufficient space. When this error occurs, the destination buffer is modified to contain a truncated version of the ideal result and is null terminated. This is useful for situations where truncation is ok. It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function --*/ STRSAFEAPI StringCbVPrintfExA(char* pszDest, size_t cbDest, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags, const char* pszFormat, va_list argList); STRSAFEAPI StringCbVPrintfExW(WCHAR* pszDest, size_t cbDest, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags, const WCHAR* pszFormat, va_list argList); #ifdef UNICODE #define StringCbVPrintfEx StringCbVPrintfExW #else #define StringCbVPrintfEx StringCbVPrintfExA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCbVPrintfExA(char* pszDest, size_t cbDest, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags, const char* pszFormat, va_list argList) { HRESULT hr; size_t cchDest; size_t cchRemaining = 0; cchDest = cbDest / sizeof(char); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringVPrintfExWorkerA(pszDest, cchDest, cbDest, ppszDestEnd, &cchRemaining, dwFlags, pszFormat, argList); } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (pcbRemaining) { // safe to multiply cchRemaining * sizeof(char) since cchRemaining < STRSAFE_MAX_CCH and sizeof(char) is 1 *pcbRemaining = (cchRemaining * sizeof(char)) + (cbDest % sizeof(char)); } } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCbVPrintfExW(WCHAR* pszDest, size_t cbDest, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags, const WCHAR* pszFormat, va_list argList) { HRESULT hr; size_t cchDest; size_t cchRemaining = 0; cchDest = cbDest / sizeof(WCHAR); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringVPrintfExWorkerW(pszDest, cchDest, cbDest, ppszDestEnd, &cchRemaining, dwFlags, pszFormat, argList); } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (pcbRemaining) { // safe to multiply cchRemaining * sizeof(WCHAR) since cchRemaining < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2 *pcbRemaining = (cchRemaining * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR)); } } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CB_FUNCTIONS #ifndef STRSAFE_NO_CCH_FUNCTIONS /*++ STDAPI StringCchGets(LPTSTR pszDest, size_t cchDest); Routine Description: This routine is a safer version of the C built-in function 'gets'. The size of the destination buffer (in characters) is a parameter and this function will not write past the end of this buffer and it will ALWAYS null terminate the destination buffer (unless it is zero length). This routine is not a replacement for fgets. That function does not replace newline characters with a null terminator. This function returns a hresult, and not a pointer. It returns a S_OK if any characters were read from stdin and copied to pszDest and pszDest was null terminated, otherwise it will return a failure code. Arguments: pszDest - destination string cchDest - size of destination buffer in characters. Notes: pszDest should not be NULL. See StringCchGetsEx if you require the handling of NULL values. cchDest must be > 1 for this function to succeed. Return Value: S_OK - data was read from stdin and copied, and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all hresult falure cases STRSAFE_E_END_OF_FILE - this return value indicates an error or end-of-file condition, use feof or ferror to determine which one has occured. STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that there was insufficient space in the destination buffer to copy any data It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function. --*/ #ifndef FEATURE_PAL #ifndef STRSAFE_LIB_IMPL STRSAFE_INLINE_API StringCchGetsA(char* pszDest, size_t cchDest); STRSAFE_INLINE_API StringCchGetsW(WCHAR* pszDest, size_t cchDest); #ifdef UNICODE #define StringCchGets StringCchGetsW #else #define StringCchGets StringCchGetsA #endif // !UNICODE STRSAFE_INLINE_API StringCchGetsA(char* pszDest, size_t cchDest) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cbDest; // safe to multiply cchDest * sizeof(char) since cchDest < STRSAFE_MAX_CCH and sizeof(char) is 1 cbDest = cchDest * sizeof(char); hr = StringGetsExWorkerA(pszDest, cchDest, cbDest, NULL, NULL, 0); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFE_INLINE_API StringCchGetsW(WCHAR* pszDest, size_t cchDest) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cbDest; // safe to multiply cchDest * sizeof(WCHAR) since cchDest < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2 cbDest = cchDest * sizeof(WCHAR); hr = StringGetsExWorkerW(pszDest, cchDest, cbDest, NULL, NULL, 0); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // !STRSAFE_NO_CCH_FUNCTIONS #endif // !STRSAFE_LIB_IMPL #endif // !FEATURE_PAL #ifndef STRSAFE_NO_CB_FUNCTIONS /*++ STDAPI StringCbGets(LPTSTR pszDest, size_t cbDest); Routine Description: This routine is a safer version of the C built-in function 'gets'. The size of the destination buffer (in bytes) is a parameter and this function will not write past the end of this buffer and it will ALWAYS null terminate the destination buffer (unless it is zero length). This routine is not a replacement for fgets. That function does not replace newline characters with a null terminator. This function returns a hresult, and not a pointer. It returns a S_OK if any characters were read from stdin and copied to pszDest and pszDest was null terminated, otherwise it will return a failure code. Arguments: pszDest - destination string cbDest - size of destination buffer in bytes. Notes: pszDest should not be NULL. See StringCbGetsEx if you require the handling of NULL values. cbDest must be > sizeof(TCHAR) for this function to succeed. Return Value: S_OK - data was read from stdin and copied, and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all hresult falure cases STRSAFE_E_END_OF_FILE - this return value indicates an error or end-of-file condition, use feof or ferror to determine which one has occured. STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that there was insufficient space in the destination buffer to copy any data It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function. --*/ #ifndef FEATURE_PAL #ifndef STRSAFE_LIB_IMPL STRSAFE_INLINE_API StringCbGetsA(char* pszDest, size_t cbDest); STRSAFE_INLINE_API StringCbGetsW(WCHAR* pszDest, size_t cbDest); #ifdef UNICODE #define StringCbGets StringCbGetsW #else #define StringCbGets StringCbGetsA #endif // !UNICODE STRSAFE_INLINE_API StringCbGetsA(char* pszDest, size_t cbDest) { HRESULT hr; size_t cchDest; // convert to count of characters cchDest = cbDest / sizeof(char); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringGetsExWorkerA(pszDest, cchDest, cbDest, NULL, NULL, 0); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFE_INLINE_API StringCbGetsW(WCHAR* pszDest, size_t cbDest) { HRESULT hr; size_t cchDest; // convert to count of characters cchDest = cbDest / sizeof(WCHAR); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringGetsExWorkerW(pszDest, cchDest, cbDest, NULL, NULL, 0); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // !STRSAFE_NO_CB_FUNCTIONS #endif // !STRSAFE_LIB_IMPL #endif // !FEATURE_PAL #ifndef STRSAFE_NO_CCH_FUNCTIONS /*++ STDAPI StringCchGetsEx(LPTSTR pszDest, size_t cchDest, LPTSTR* ppszDestEnd, size_t* pcchRemaining, DWORD dwFlags); Routine Description: This routine is a safer version of the C built-in function 'gets' with some additional parameters. In addition to functionality provided by StringCchGets, this routine also returns a pointer to the end of the destination string and the number of characters left in the destination string including the null terminator. The flags parameter allows additional controls. Arguments: pszDest - destination string cchDest - size of destination buffer in characters. ppszDestEnd - if ppszDestEnd is non-null, the function will return a pointer to the end of the destination string. If the function copied any data, the result will point to the null termination character pcchRemaining - if pcchRemaining is non-null, the function will return the number of characters left in the destination string, including the null terminator dwFlags - controls some details of the string copy: STRSAFE_FILL_BEHIND_NULL if the function succeeds, the low byte of dwFlags will be used to fill the uninitialize part of destination buffer behind the null terminator STRSAFE_IGNORE_NULLS treat NULL string pointers like empty strings (TEXT("")). STRSAFE_FILL_ON_FAILURE if the function fails, the low byte of dwFlags will be used to fill all of the destination buffer, and it will be null terminated. STRSAFE_NO_TRUNCATION / STRSAFE_NULL_ON_FAILURE if the function fails, the destination buffer will be set to the empty string. Notes: pszDest should not be NULL unless the STRSAFE_IGNORE_NULLS flag is specified. If STRSAFE_IGNORE_NULLS is passed and pszDest is NULL, an error may still be returned even though NULLS are ignored cchDest must be > 1 for this function to succeed. Return Value: S_OK - data was read from stdin and copied, and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all hresult falure cases STRSAFE_E_END_OF_FILE - this return value indicates an error or end-of-file condition, use feof or ferror to determine which one has occured. STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that there was insufficient space in the destination buffer to copy any data It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function. --*/ #ifndef FEATURE_PAL #ifndef STRSAFE_LIB_IMPL STRSAFE_INLINE_API StringCchGetsExA(char* pszDest, size_t cchDest, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); STRSAFE_INLINE_API StringCchGetsExW(WCHAR* pszDest, size_t cchDest, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags); #ifdef UNICODE #define StringCchGetsEx StringCchGetsExW #else #define StringCchGetsEx StringCchGetsExA #endif // !UNICODE STRSAFE_INLINE_API StringCchGetsExA(char* pszDest, size_t cchDest, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cbDest; // safe to multiply cchDest * sizeof(char) since cchDest < STRSAFE_MAX_CCH and sizeof(char) is 1 cbDest = cchDest * sizeof(char); hr = StringGetsExWorkerA(pszDest, cchDest, cbDest, ppszDestEnd, pcchRemaining, dwFlags); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFE_INLINE_API StringCchGetsExW(WCHAR* pszDest, size_t cchDest, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr; if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cbDest; // safe to multiply cchDest * sizeof(WCHAR) since cchDest < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2 cbDest = cchDest * sizeof(WCHAR); hr = StringGetsExWorkerW(pszDest, cchDest, cbDest, ppszDestEnd, pcchRemaining, dwFlags); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // !STRSAFE_NO_CCH_FUNCTIONS #endif // !STRSAFE_LIB_IMPL #endif // !FEATURE_PAL #ifndef STRSAFE_NO_CB_FUNCTIONS /*++ STDAPI StringCbGetsEx(LPTSTR pszDest, size_t cbDest, LPTSTR* ppszDestEnd, size_t* pcbRemaining, DWORD dwFlags); Routine Description: This routine is a safer version of the C built-in function 'gets' with some additional parameters. In addition to functionality provided by StringCbGets, this routine also returns a pointer to the end of the destination string and the number of characters left in the destination string including the null terminator. The flags parameter allows additional controls. Arguments: pszDest - destination string cbDest - size of destination buffer in bytes. ppszDestEnd - if ppszDestEnd is non-null, the function will return a pointer to the end of the destination string. If the function copied any data, the result will point to the null termination character pcbRemaining - if pbRemaining is non-null, the function will return the number of bytes left in the destination string, including the null terminator dwFlags - controls some details of the string copy: STRSAFE_FILL_BEHIND_NULL if the function succeeds, the low byte of dwFlags will be used to fill the uninitialize part of destination buffer behind the null terminator STRSAFE_IGNORE_NULLS treat NULL string pointers like empty strings (TEXT("")). STRSAFE_FILL_ON_FAILURE if the function fails, the low byte of dwFlags will be used to fill all of the destination buffer, and it will be null terminated. STRSAFE_NO_TRUNCATION / STRSAFE_NULL_ON_FAILURE if the function fails, the destination buffer will be set to the empty string. Notes: pszDest should not be NULL unless the STRSAFE_IGNORE_NULLS flag is specified. If STRSAFE_IGNORE_NULLS is passed and pszDest is NULL, an error may still be returned even though NULLS are ignored cbDest must be > sizeof(TCHAR) for this function to succeed Return Value: S_OK - data was read from stdin and copied, and the resultant dest string was null terminated failure - you can use the macro HRESULT_CODE() to get a win32 error code for all hresult falure cases STRSAFE_E_END_OF_FILE - this return value indicates an error or end-of-file condition, use feof or ferror to determine which one has occured. STRSAFE_E_INSUFFICIENT_BUFFER / HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER - this return value is an indication that there was insufficient space in the destination buffer to copy any data It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function. --*/ #ifndef FEATURE_PAL #ifndef STRSAFE_LIB_IMPL STRSAFE_INLINE_API StringCbGetsExA(char* pszDest, size_t cbDest, char** ppszDestEnd, size_t* pbRemaining, unsigned long dwFlags); STRSAFE_INLINE_API StringCbGetsExW(WCHAR* pszDest, size_t cbDest, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags); #ifdef UNICODE #define StringCbGetsEx StringCbGetsExW #else #define StringCbGetsEx StringCbGetsExA #endif // !UNICODE STRSAFE_INLINE_API StringCbGetsExA(char* pszDest, size_t cbDest, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags) { HRESULT hr; size_t cchDest; size_t cchRemaining = 0; cchDest = cbDest / sizeof(char); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringGetsExWorkerA(pszDest, cchDest, cbDest, ppszDestEnd, &cchRemaining, dwFlags); } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER) || (hr == STRSAFE_E_END_OF_FILE)) { if (pcbRemaining) { // safe to multiply cchRemaining * sizeof(char) since cchRemaining < STRSAFE_MAX_CCH and sizeof(char) is 1 *pcbRemaining = (cchRemaining * sizeof(char)) + (cbDest % sizeof(char)); } } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFE_INLINE_API StringCbGetsExW(WCHAR* pszDest, size_t cbDest, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags) { HRESULT hr; size_t cchDest; size_t cchRemaining = 0; cchDest = cbDest / sizeof(WCHAR); if (cchDest > STRSAFE_MAX_CCH) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringGetsExWorkerW(pszDest, cchDest, cbDest, ppszDestEnd, &cchRemaining, dwFlags); } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER) || (hr == STRSAFE_E_END_OF_FILE)) { if (pcbRemaining) { // safe to multiply cchRemaining * sizeof(WCHAR) since cchRemaining < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2 *pcbRemaining = (cchRemaining * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR)); } } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // !STRSAFE_NO_CB_FUNCTIONS #endif // !STRSAFE_LIB_IMPL #endif // !FEATURE_PAL #ifndef STRSAFE_NO_CCH_FUNCTIONS /*++ STDAPI StringCchLength(LPCTSTR psz, size_t cchMax, size_t* pcch); Routine Description: This routine is a safer version of the C built-in function 'strlen'. It is used to make sure a string is not larger than a given length, and it optionally returns the current length in characters not including the null terminator. This function returns a hresult, and not a pointer. It returns a S_OK if the string is non-null and the length including the null terminator is less than or equal to cchMax characters. Arguments: psz - string to check the length of cchMax - maximum number of characters including the null terminator that psz is allowed to contain pcch - if the function succeeds and pcch is non-null, the current length in characters of psz excluding the null terminator will be returned. This out parameter is equivalent to the return value of strlen(psz) Notes: psz can be null but the function will fail cchMax should be greater than zero or the function will fail Return Value: S_OK - psz is non-null and the length including the null terminator is less than or equal to cchMax characters failure - you can use the macro HRESULT_CODE() to get a win32 error code for all hresult falure cases It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function. --*/ STRSAFEAPI StringCchLengthA(const char* psz, size_t cchMax, size_t* pcch); STRSAFEAPI StringCchLengthW(const WCHAR* psz, size_t cchMax, size_t* pcch); #ifdef UNICODE #define StringCchLength StringCchLengthW #else #define StringCchLength StringCchLengthA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCchLengthA(const char* psz, size_t cchMax, size_t* pcch) { HRESULT hr; if ((psz == NULL) || (cchMax > STRSAFE_MAX_CCH)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringLengthWorkerA(psz, cchMax, pcch); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCchLengthW(const WCHAR* psz, size_t cchMax, size_t* pcch) { HRESULT hr; if ((psz == NULL) || (cchMax > STRSAFE_MAX_CCH)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringLengthWorkerW(psz, cchMax, pcch); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CCH_FUNCTIONS #ifndef STRSAFE_NO_CB_FUNCTIONS /*++ STDAPI StringCbLength(LPCTSTR psz, size_t cbMax, size_t* pcb); Routine Description: This routine is a safer version of the C built-in function 'strlen'. It is used to make sure a string is not larger than a given length, and it optionally returns the current length in bytes not including the null terminator. This function returns a hresult, and not a pointer. It returns a S_OK if the string is non-null and the length including the null terminator is less than or equal to cbMax bytes. Arguments: psz - string to check the length of cbMax - maximum number of bytes including the null terminator that psz is allowed to contain pcb - if the function succeeds and pcb is non-null, the current length in bytes of psz excluding the null terminator will be returned. This out parameter is equivalent to the return value of strlen(psz) * sizeof(TCHAR) Notes: psz can be null but the function will fail cbMax should be greater than or equal to sizeof(TCHAR) or the function will fail Return Value: S_OK - psz is non-null and the length including the null terminator is less than or equal to cbMax bytes failure - you can use the macro HRESULT_CODE() to get a win32 error code for all hresult falure cases It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the return value of this function. --*/ STRSAFEAPI StringCbLengthA(const char* psz, size_t cchMax, size_t* pcch); STRSAFEAPI StringCbLengthW(const WCHAR* psz, size_t cchMax, size_t* pcch); #ifdef UNICODE #define StringCbLength StringCbLengthW #else #define StringCbLength StringCbLengthA #endif // !UNICODE #ifdef STRSAFE_INLINE STRSAFEAPI StringCbLengthA(const char* psz, size_t cbMax, size_t* pcb) { HRESULT hr; size_t cchMax; size_t cch = 0; cchMax = cbMax / sizeof(char); if ((psz == NULL) || (cchMax > STRSAFE_MAX_CCH)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringLengthWorkerA(psz, cchMax, &cch); } if (SUCCEEDED(hr) && pcb) { // safe to multiply cch * sizeof(char) since cch < STRSAFE_MAX_CCH and sizeof(char) is 1 *pcb = cch * sizeof(char); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCbLengthW(const WCHAR* psz, size_t cbMax, size_t* pcb) { HRESULT hr; size_t cchMax; size_t cch = 0; cchMax = cbMax / sizeof(WCHAR); if ((psz == NULL) || (cchMax > STRSAFE_MAX_CCH)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = StringLengthWorkerW(psz, cchMax, &cch); } if (SUCCEEDED(hr) && pcb) { // safe to multiply cch * sizeof(WCHAR) since cch < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2 *pcb = cch * sizeof(WCHAR); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #endif // !STRSAFE_NO_CB_FUNCTIONS // these are the worker functions that actually do the work #ifdef STRSAFE_INLINE STRSAFEAPI StringCopyWorkerA(char* pszDest, size_t cchDest, const char* pszSrc) { HRESULT hr = S_OK; if (cchDest == 0) { // can not null terminate a zero-byte dest buffer hr = STRSAFE_E_INVALID_PARAMETER; } else { while (cchDest && (*pszSrc != '\0')) { *pszDest++ = *pszSrc++; cchDest--; } if (cchDest == 0) { // we are going to truncate pszDest pszDest--; hr = STRSAFE_E_INSUFFICIENT_BUFFER; } *pszDest= '\0'; } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCopyWorkerW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc) { HRESULT hr = S_OK; if (cchDest == 0) { // can not null terminate a zero-byte dest buffer hr = STRSAFE_E_INVALID_PARAMETER; } else { while (cchDest && (*pszSrc != L'\0')) { *pszDest++ = *pszSrc++; cchDest--; } if (cchDest == 0) { // we are going to truncate pszDest pszDest--; hr = STRSAFE_E_INSUFFICIENT_BUFFER; } *pszDest= L'\0'; } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX STRSAFEAPI StringCopyExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, const char* pszSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr = S_OK; char* pszDestEnd = pszDest; size_t cchRemaining = 0; // ASSERT(cbDest == (cchDest * sizeof(char)) || // cbDest == (cchDest * sizeof(char)) + (cbDest % sizeof(char))); // only accept valid flags if (dwFlags & (~STRSAFE_VALID_FLAGS)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { if (dwFlags & STRSAFE_IGNORE_NULLS) { if (pszDest == NULL) { if ((cchDest != 0) || (cbDest != 0)) { // NULL pszDest and non-zero cchDest/cbDest is invalid hr = STRSAFE_E_INVALID_PARAMETER; } } if (pszSrc == NULL) { pszSrc = ""; } } if (SUCCEEDED(hr)) { if (cchDest == 0) { pszDestEnd = pszDest; cchRemaining = 0; // only fail if there was actually src data to copy if (*pszSrc != '\0') { if (pszDest == NULL) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = STRSAFE_E_INSUFFICIENT_BUFFER; } } } else { pszDestEnd = pszDest; cchRemaining = cchDest; while (cchRemaining && (*pszSrc != '\0')) { *pszDestEnd++= *pszSrc++; cchRemaining--; } if (cchRemaining > 0) { if (dwFlags & STRSAFE_FILL_BEHIND_NULL) { memset(pszDestEnd + 1, STRSAFE_GET_FILL_PATTERN(dwFlags), ((cchRemaining - 1) * sizeof(char)) + (cbDest % sizeof(char))); } } else { // we are going to truncate pszDest pszDestEnd--; cchRemaining++; hr = STRSAFE_E_INSUFFICIENT_BUFFER; } *pszDestEnd = '\0'; } } } if (FAILED(hr)) { if (pszDest) { if (dwFlags & STRSAFE_FILL_ON_FAILURE) { memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest); if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0) { pszDestEnd = pszDest; cchRemaining = cchDest; } else if (cchDest > 0) { pszDestEnd = pszDest + cchDest - 1; cchRemaining = 1; // null terminate the end of the string *pszDestEnd = '\0'; } } if (dwFlags & (STRSAFE_NULL_ON_FAILURE | STRSAFE_NO_TRUNCATION)) { if (cchDest > 0) { pszDestEnd = pszDest; cchRemaining = cchDest; // null terminate the beginning of the string *pszDestEnd = '\0'; } } } } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (ppszDestEnd) { *ppszDestEnd = pszDestEnd; } if (pcchRemaining) { *pcchRemaining = cchRemaining; } } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCopyExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr = S_OK; WCHAR* pszDestEnd = pszDest; size_t cchRemaining = 0; // ASSERT(cbDest == (cchDest * sizeof(WCHAR)) || // cbDest == (cchDest * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR))); // only accept valid flags if (dwFlags & (~STRSAFE_VALID_FLAGS)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { if (dwFlags & STRSAFE_IGNORE_NULLS) { if (pszDest == NULL) { if ((cchDest != 0) || (cbDest != 0)) { // NULL pszDest and non-zero cchDest/cbDest is invalid hr = STRSAFE_E_INVALID_PARAMETER; } } if (pszSrc == NULL) { pszSrc = u""; } } if (SUCCEEDED(hr)) { if (cchDest == 0) { pszDestEnd = pszDest; cchRemaining = 0; // only fail if there was actually src data to copy if (*pszSrc != u'\0') { if (pszDest == NULL) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = STRSAFE_E_INSUFFICIENT_BUFFER; } } } else { pszDestEnd = pszDest; cchRemaining = cchDest; while (cchRemaining && (*pszSrc != u'\0')) { *pszDestEnd++= *pszSrc++; cchRemaining--; } if (cchRemaining > 0) { if (dwFlags & STRSAFE_FILL_BEHIND_NULL) { memset(pszDestEnd + 1, STRSAFE_GET_FILL_PATTERN(dwFlags), ((cchRemaining - 1) * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR))); } } else { // we are going to truncate pszDest pszDestEnd--; cchRemaining++; hr = STRSAFE_E_INSUFFICIENT_BUFFER; } *pszDestEnd = u'\0'; } } } if (FAILED(hr)) { if (pszDest) { if (dwFlags & STRSAFE_FILL_ON_FAILURE) { memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest); if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0) { pszDestEnd = pszDest; cchRemaining = cchDest; } else if (cchDest > 0) { pszDestEnd = pszDest + cchDest - 1; cchRemaining = 1; // null terminate the end of the string *pszDestEnd = L'\0'; } } if (dwFlags & (STRSAFE_NULL_ON_FAILURE | STRSAFE_NO_TRUNCATION)) { if (cchDest > 0) { pszDestEnd = pszDest; cchRemaining = cchDest; // null terminate the beginning of the string *pszDestEnd = L'\0'; } } } } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (ppszDestEnd) { *ppszDestEnd = pszDestEnd; } if (pcchRemaining) { *pcchRemaining = cchRemaining; } } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX STRSAFEAPI StringCopyNWorkerA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchSrc) { HRESULT hr = S_OK; if (cchDest == 0) { // can not null terminate a zero-byte dest buffer hr = STRSAFE_E_INVALID_PARAMETER; } else { while (cchDest && cchSrc && (*pszSrc != '\0')) { *pszDest++= *pszSrc++; cchDest--; cchSrc--; } if (cchDest == 0) { // we are going to truncate pszDest pszDest--; hr = STRSAFE_E_INSUFFICIENT_BUFFER; } *pszDest= '\0'; } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCopyNWorkerW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchSrc) { HRESULT hr = S_OK; if (cchDest == 0) { // can not null terminate a zero-byte dest buffer hr = STRSAFE_E_INVALID_PARAMETER; } else { while (cchDest && cchSrc && (*pszSrc != L'\0')) { *pszDest++= *pszSrc++; cchDest--; cchSrc--; } if (cchDest == 0) { // we are going to truncate pszDest pszDest--; hr = STRSAFE_E_INSUFFICIENT_BUFFER; } *pszDest= L'\0'; } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX STRSAFEAPI StringCopyNExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, const char* pszSrc, size_t cchSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr = S_OK; char* pszDestEnd = pszDest; size_t cchRemaining = 0; // ASSERT(cbDest == (cchDest * sizeof(char)) || // cbDest == (cchDest * sizeof(char)) + (cbDest % sizeof(char))); // only accept valid flags if (dwFlags & (~STRSAFE_VALID_FLAGS)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { if (dwFlags & STRSAFE_IGNORE_NULLS) { if (pszDest == NULL) { if ((cchDest != 0) || (cbDest != 0)) { // NULL pszDest and non-zero cchDest/cbDest is invalid hr = STRSAFE_E_INVALID_PARAMETER; } } if (pszSrc == NULL) { pszSrc = ""; } } if (SUCCEEDED(hr)) { if (cchDest == 0) { pszDestEnd = pszDest; cchRemaining = 0; // only fail if there was actually src data to copy if (*pszSrc != '\0') { if (pszDest == NULL) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = STRSAFE_E_INSUFFICIENT_BUFFER; } } } else { pszDestEnd = pszDest; cchRemaining = cchDest; while (cchRemaining && cchSrc && (*pszSrc != '\0')) { *pszDestEnd++= *pszSrc++; cchRemaining--; cchSrc--; } if (cchRemaining > 0) { if (dwFlags & STRSAFE_FILL_BEHIND_NULL) { memset(pszDestEnd + 1, STRSAFE_GET_FILL_PATTERN(dwFlags), ((cchRemaining - 1) * sizeof(char)) + (cbDest % sizeof(char))); } } else { // we are going to truncate pszDest pszDestEnd--; cchRemaining++; hr = STRSAFE_E_INSUFFICIENT_BUFFER; } *pszDestEnd = '\0'; } } } if (FAILED(hr)) { if (pszDest) { if (dwFlags & STRSAFE_FILL_ON_FAILURE) { memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest); if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0) { pszDestEnd = pszDest; cchRemaining = cchDest; } else if (cchDest > 0) { pszDestEnd = pszDest + cchDest - 1; cchRemaining = 1; // null terminate the end of the string *pszDestEnd = '\0'; } } if (dwFlags & (STRSAFE_NULL_ON_FAILURE | STRSAFE_NO_TRUNCATION)) { if (cchDest > 0) { pszDestEnd = pszDest; cchRemaining = cchDest; // null terminate the beginning of the string *pszDestEnd = '\0'; } } } } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (ppszDestEnd) { *ppszDestEnd = pszDestEnd; } if (pcchRemaining) { *pcchRemaining = cchRemaining; } } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCopyNExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, const WCHAR* pszSrc, size_t cchSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr = S_OK; WCHAR* pszDestEnd = pszDest; size_t cchRemaining = 0; // ASSERT(cbDest == (cchDest * sizeof(WCHAR)) || // cbDest == (cchDest * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR))); // only accept valid flags if (dwFlags & (~STRSAFE_VALID_FLAGS)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { if (dwFlags & STRSAFE_IGNORE_NULLS) { if (pszDest == NULL) { if ((cchDest != 0) || (cbDest != 0)) { // NULL pszDest and non-zero cchDest/cbDest is invalid hr = STRSAFE_E_INVALID_PARAMETER; } } if (pszSrc == NULL) { pszSrc = u""; } } if (SUCCEEDED(hr)) { if (cchDest == 0) { pszDestEnd = pszDest; cchRemaining = 0; // only fail if there was actually src data to copy if (*pszSrc != L'\0') { if (pszDest == NULL) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = STRSAFE_E_INSUFFICIENT_BUFFER; } } } else { pszDestEnd = pszDest; cchRemaining = cchDest; while (cchRemaining && cchSrc && (*pszSrc != L'\0')) { *pszDestEnd++= *pszSrc++; cchRemaining--; cchSrc--; } if (cchRemaining > 0) { if (dwFlags & STRSAFE_FILL_BEHIND_NULL) { memset(pszDestEnd + 1, STRSAFE_GET_FILL_PATTERN(dwFlags), ((cchRemaining - 1) * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR))); } } else { // we are going to truncate pszDest pszDestEnd--; cchRemaining++; hr = STRSAFE_E_INSUFFICIENT_BUFFER; } *pszDestEnd = L'\0'; } } } if (FAILED(hr)) { if (pszDest) { if (dwFlags & STRSAFE_FILL_ON_FAILURE) { memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest); if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0) { pszDestEnd = pszDest; cchRemaining = cchDest; } else if (cchDest > 0) { pszDestEnd = pszDest + cchDest - 1; cchRemaining = 1; // null terminate the end of the string *pszDestEnd = L'\0'; } } if (dwFlags & (STRSAFE_NULL_ON_FAILURE | STRSAFE_NO_TRUNCATION)) { if (cchDest > 0) { pszDestEnd = pszDest; cchRemaining = cchDest; // null terminate the beginning of the string *pszDestEnd = L'\0'; } } } } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (ppszDestEnd) { *ppszDestEnd = pszDestEnd; } if (pcchRemaining) { *pcchRemaining = cchRemaining; } } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX STRSAFEAPI StringCatWorkerA(char* pszDest, size_t cchDest, const char* pszSrc) { HRESULT hr; size_t cchDestCurrent; hr = StringLengthWorkerA(pszDest, cchDest, &cchDestCurrent); if (SUCCEEDED(hr)) { hr = StringCopyWorkerA(pszDest + cchDestCurrent, cchDest - cchDestCurrent, pszSrc); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCatWorkerW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc) { HRESULT hr; size_t cchDestCurrent; hr = StringLengthWorkerW(pszDest, cchDest, &cchDestCurrent); if (SUCCEEDED(hr)) { hr = StringCopyWorkerW(pszDest + cchDestCurrent, cchDest - cchDestCurrent, pszSrc); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX STRSAFEAPI StringCatExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, const char* pszSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr = S_OK; char* pszDestEnd = pszDest; size_t cchRemaining = 0; // ASSERT(cbDest == (cchDest * sizeof(char)) || // cbDest == (cchDest * sizeof(char)) + (cbDest % sizeof(char))); // only accept valid flags if (dwFlags & (~STRSAFE_VALID_FLAGS)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cchDestCurrent; if (dwFlags & STRSAFE_IGNORE_NULLS) { if (pszDest == NULL) { if ((cchDest == 0) && (cbDest == 0)) { cchDestCurrent = 0; } else { // NULL pszDest and non-zero cchDest/cbDest is invalid hr = STRSAFE_E_INVALID_PARAMETER; } } else { hr = StringLengthWorkerA(pszDest, cchDest, &cchDestCurrent); if (SUCCEEDED(hr)) { pszDestEnd = pszDest + cchDestCurrent; cchRemaining = cchDest - cchDestCurrent; } } if (pszSrc == NULL) { pszSrc = ""; } } else { hr = StringLengthWorkerA(pszDest, cchDest, &cchDestCurrent); if (SUCCEEDED(hr)) { pszDestEnd = pszDest + cchDestCurrent; cchRemaining = cchDest - cchDestCurrent; } } if (SUCCEEDED(hr)) { if (cchDest == 0) { // only fail if there was actually src data to append if (*pszSrc != '\0') { if (pszDest == NULL) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = STRSAFE_E_INSUFFICIENT_BUFFER; } } } else { // we handle the STRSAFE_FILL_ON_FAILURE and STRSAFE_NULL_ON_FAILURE cases below, so do not pass // those flags through hr = StringCopyExWorkerA(pszDestEnd, cchRemaining, (cchRemaining * sizeof(char)) + (cbDest % sizeof(char)), pszSrc, &pszDestEnd, &cchRemaining, dwFlags & (~(STRSAFE_FILL_ON_FAILURE | STRSAFE_NULL_ON_FAILURE))); } } } if (FAILED(hr)) { if (pszDest) { // STRSAFE_NO_TRUNCATION is taken care of by StringCopyExWorkerA() if (dwFlags & STRSAFE_FILL_ON_FAILURE) { memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest); if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0) { pszDestEnd = pszDest; cchRemaining = cchDest; } else if (cchDest > 0) { pszDestEnd = pszDest + cchDest - 1; cchRemaining = 1; // null terminate the end of the string *pszDestEnd = '\0'; } } if (dwFlags & STRSAFE_NULL_ON_FAILURE) { if (cchDest > 0) { pszDestEnd = pszDest; cchRemaining = cchDest; // null terminate the beginning of the string *pszDestEnd = '\0'; } } } } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (ppszDestEnd) { *ppszDestEnd = pszDestEnd; } if (pcchRemaining) { *pcchRemaining = cchRemaining; } } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCatExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr = S_OK; WCHAR* pszDestEnd = pszDest; size_t cchRemaining = 0; // ASSERT(cbDest == (cchDest * sizeof(WCHAR)) || // cbDest == (cchDest * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR))); // only accept valid flags if (dwFlags & (~STRSAFE_VALID_FLAGS)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { size_t cchDestCurrent; if (dwFlags & STRSAFE_IGNORE_NULLS) { if (pszDest == NULL) { if ((cchDest == 0) && (cbDest == 0)) { cchDestCurrent = 0; } else { // NULL pszDest and non-zero cchDest/cbDest is invalid hr = STRSAFE_E_INVALID_PARAMETER; } } else { hr = StringLengthWorkerW(pszDest, cchDest, &cchDestCurrent); if (SUCCEEDED(hr)) { pszDestEnd = pszDest + cchDestCurrent; cchRemaining = cchDest - cchDestCurrent; } } if (pszSrc == NULL) { pszSrc = u""; } } else { hr = StringLengthWorkerW(pszDest, cchDest, &cchDestCurrent); if (SUCCEEDED(hr)) { pszDestEnd = pszDest + cchDestCurrent; cchRemaining = cchDest - cchDestCurrent; } } if (SUCCEEDED(hr)) { if (cchDest == 0) { // only fail if there was actually src data to append if (*pszSrc != L'\0') { if (pszDest == NULL) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = STRSAFE_E_INSUFFICIENT_BUFFER; } } } else { // we handle the STRSAFE_FILL_ON_FAILURE and STRSAFE_NULL_ON_FAILURE cases below, so do not pass // those flags through hr = StringCopyExWorkerW(pszDestEnd, cchRemaining, (cchRemaining * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR)), pszSrc, &pszDestEnd, &cchRemaining, dwFlags & (~(STRSAFE_FILL_ON_FAILURE | STRSAFE_NULL_ON_FAILURE))); } } } if (FAILED(hr)) { if (pszDest) { // STRSAFE_NO_TRUNCATION is taken care of by StringCopyExWorkerW() if (dwFlags & STRSAFE_FILL_ON_FAILURE) { memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest); if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0) { pszDestEnd = pszDest; cchRemaining = cchDest; } else if (cchDest > 0) { pszDestEnd = pszDest + cchDest - 1; cchRemaining = 1; // null terminate the end of the string *pszDestEnd = L'\0'; } } if (dwFlags & STRSAFE_NULL_ON_FAILURE) { if (cchDest > 0) { pszDestEnd = pszDest; cchRemaining = cchDest; // null terminate the beginning of the string *pszDestEnd = L'\0'; } } } } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (ppszDestEnd) { *ppszDestEnd = pszDestEnd; } if (pcchRemaining) { *pcchRemaining = cchRemaining; } } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX STRSAFEAPI StringCatNWorkerA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchMaxAppend) { HRESULT hr; size_t cchDestCurrent; hr = StringLengthWorkerA(pszDest, cchDest, &cchDestCurrent); if (SUCCEEDED(hr)) { hr = StringCopyNWorkerA(pszDest + cchDestCurrent, cchDest - cchDestCurrent, pszSrc, cchMaxAppend); } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCatNWorkerW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchMaxAppend) { HRESULT hr; size_t cchDestCurrent; hr = StringLengthWorkerW(pszDest, cchDest, &cchDestCurrent); if (SUCCEEDED(hr)) { hr = StringCopyNWorkerW(pszDest + cchDestCurrent, cchDest - cchDestCurrent, pszSrc, cchMaxAppend); } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX STRSAFEAPI StringCatNExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, const char* pszSrc, size_t cchMaxAppend, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr = S_OK; char* pszDestEnd = pszDest; size_t cchRemaining = 0; size_t cchDestCurrent = 0; // ASSERT(cbDest == (cchDest * sizeof(char)) || // cbDest == (cchDest * sizeof(char)) + (cbDest % sizeof(char))); // only accept valid flags if (dwFlags & (~STRSAFE_VALID_FLAGS)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { if (dwFlags & STRSAFE_IGNORE_NULLS) { if (pszDest == NULL) { if ((cchDest == 0) && (cbDest == 0)) { cchDestCurrent = 0; } else { // NULL pszDest and non-zero cchDest/cbDest is invalid hr = STRSAFE_E_INVALID_PARAMETER; } } else { hr = StringLengthWorkerA(pszDest, cchDest, &cchDestCurrent); if (SUCCEEDED(hr)) { pszDestEnd = pszDest + cchDestCurrent; cchRemaining = cchDest - cchDestCurrent; } } if (pszSrc == NULL) { pszSrc = ""; } } else { hr = StringLengthWorkerA(pszDest, cchDest, &cchDestCurrent); if (SUCCEEDED(hr)) { pszDestEnd = pszDest + cchDestCurrent; cchRemaining = cchDest - cchDestCurrent; } } if (SUCCEEDED(hr)) { if (cchDest == 0) { // only fail if there was actually src data to append if (*pszSrc != '\0') { if (pszDest == NULL) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = STRSAFE_E_INSUFFICIENT_BUFFER; } } } else { // we handle the STRSAFE_FILL_ON_FAILURE and STRSAFE_NULL_ON_FAILURE cases below, so do not pass // those flags through hr = StringCopyNExWorkerA(pszDestEnd, cchRemaining, (cchRemaining * sizeof(char)) + (cbDest % sizeof(char)), pszSrc, cchMaxAppend, &pszDestEnd, &cchRemaining, dwFlags & (~(STRSAFE_FILL_ON_FAILURE | STRSAFE_NULL_ON_FAILURE))); } } } if (FAILED(hr)) { if (pszDest) { // STRSAFE_NO_TRUNCATION is taken care of by StringCopyNExWorkerA() if (dwFlags & STRSAFE_FILL_ON_FAILURE) { memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest); if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0) { pszDestEnd = pszDest; cchRemaining = cchDest; } else if (cchDest > 0) { pszDestEnd = pszDest + cchDest - 1; cchRemaining = 1; // null terminate the end of the string *pszDestEnd = '\0'; } } if (dwFlags & (STRSAFE_NULL_ON_FAILURE)) { if (cchDest > 0) { pszDestEnd = pszDest; cchRemaining = cchDest; // null terminate the beginning of the string *pszDestEnd = '\0'; } } } } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (ppszDestEnd) { *ppszDestEnd = pszDestEnd; } if (pcchRemaining) { *pcchRemaining = cchRemaining; } } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringCatNExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, const WCHAR* pszSrc, size_t cchMaxAppend, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr = S_OK; WCHAR* pszDestEnd = pszDest; size_t cchRemaining = 0; size_t cchDestCurrent = 0; // ASSERT(cbDest == (cchDest * sizeof(WCHAR)) || // cbDest == (cchDest * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR))); // only accept valid flags if (dwFlags & (~STRSAFE_VALID_FLAGS)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { if (dwFlags & STRSAFE_IGNORE_NULLS) { if (pszDest == NULL) { if ((cchDest == 0) && (cbDest == 0)) { cchDestCurrent = 0; } else { // NULL pszDest and non-zero cchDest/cbDest is invalid hr = STRSAFE_E_INVALID_PARAMETER; } } else { hr = StringLengthWorkerW(pszDest, cchDest, &cchDestCurrent); if (SUCCEEDED(hr)) { pszDestEnd = pszDest + cchDestCurrent; cchRemaining = cchDest - cchDestCurrent; } } if (pszSrc == NULL) { pszSrc = u""; } } else { hr = StringLengthWorkerW(pszDest, cchDest, &cchDestCurrent); if (SUCCEEDED(hr)) { pszDestEnd = pszDest + cchDestCurrent; cchRemaining = cchDest - cchDestCurrent; } } if (SUCCEEDED(hr)) { if (cchDest == 0) { // only fail if there was actually src data to append if (*pszSrc != L'\0') { if (pszDest == NULL) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = STRSAFE_E_INSUFFICIENT_BUFFER; } } } else { // we handle the STRSAFE_FILL_ON_FAILURE and STRSAFE_NULL_ON_FAILURE cases below, so do not pass // those flags through hr = StringCopyNExWorkerW(pszDestEnd, cchRemaining, (cchRemaining * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR)), pszSrc, cchMaxAppend, &pszDestEnd, &cchRemaining, dwFlags & (~(STRSAFE_FILL_ON_FAILURE | STRSAFE_NULL_ON_FAILURE))); } } } if (FAILED(hr)) { if (pszDest) { // STRSAFE_NO_TRUNCATION is taken care of by StringCopyNExWorkerW() if (dwFlags & STRSAFE_FILL_ON_FAILURE) { memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest); if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0) { pszDestEnd = pszDest; cchRemaining = cchDest; } else if (cchDest > 0) { pszDestEnd = pszDest + cchDest - 1; cchRemaining = 1; // null terminate the end of the string *pszDestEnd = L'\0'; } } if (dwFlags & (STRSAFE_NULL_ON_FAILURE)) { if (cchDest > 0) { pszDestEnd = pszDest; cchRemaining = cchDest; // null terminate the beginning of the string *pszDestEnd = L'\0'; } } } } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (ppszDestEnd) { *ppszDestEnd = pszDestEnd; } if (pcchRemaining) { *pcchRemaining = cchRemaining; } } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX STRSAFEAPI StringVPrintfWorkerA(char* pszDest, size_t cchDest, const char* pszFormat, va_list argList) { HRESULT hr = S_OK; if (cchDest == 0) { // can not null terminate a zero-byte dest buffer hr = STRSAFE_E_INVALID_PARAMETER; } else { int iRet; size_t cchMax; // leave the last space for the null terminator cchMax = cchDest - 1; iRet = _vsnprintf(pszDest, cchMax, pszFormat, argList); // ASSERT((iRet < 0) || (((size_t)iRet) <= cchMax)); if ((iRet < 0) || (((size_t)iRet) > cchMax)) { // need to null terminate the string pszDest += cchMax; *pszDest = '\0'; // we have truncated pszDest hr = STRSAFE_E_INSUFFICIENT_BUFFER; } else if (((size_t)iRet) == cchMax) { // need to null terminate the string pszDest += cchMax; *pszDest = '\0'; } } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringVPrintfWorkerW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszFormat, va_list argList) { HRESULT hr = S_OK; if (cchDest == 0) { // can not null terminate a zero-byte dest buffer hr = STRSAFE_E_INVALID_PARAMETER; } else { int iRet; size_t cchMax; // leave the last space for the null terminator cchMax = cchDest - 1; iRet = _vsnwprintf(pszDest, cchMax, pszFormat, argList); // ASSERT((iRet < 0) || (((size_t)iRet) <= cchMax)); if ((iRet < 0) || (((size_t)iRet) > cchMax)) { // need to null terminate the string pszDest += cchMax; *pszDest = L'\0'; // we have truncated pszDest hr = STRSAFE_E_INSUFFICIENT_BUFFER; } else if (((size_t)iRet) == cchMax) { // need to null terminate the string pszDest += cchMax; *pszDest = L'\0'; } } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX STRSAFEAPI StringVPrintfExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags, const char* pszFormat, va_list argList) { HRESULT hr = S_OK; char* pszDestEnd = pszDest; size_t cchRemaining = 0; // ASSERT(cbDest == (cchDest * sizeof(char)) || // cbDest == (cchDest * sizeof(char)) + (cbDest % sizeof(char))); // only accept valid flags if (dwFlags & (~STRSAFE_VALID_FLAGS)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { if (dwFlags & STRSAFE_IGNORE_NULLS) { if (pszDest == NULL) { if ((cchDest != 0) || (cbDest != 0)) { // NULL pszDest and non-zero cchDest/cbDest is invalid hr = STRSAFE_E_INVALID_PARAMETER; } } if (pszFormat == NULL) { pszFormat = ""; } } if (SUCCEEDED(hr)) { if (cchDest == 0) { pszDestEnd = pszDest; cchRemaining = 0; // only fail if there was actually a non-empty format string if (*pszFormat != '\0') { if (pszDest == NULL) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = STRSAFE_E_INSUFFICIENT_BUFFER; } } } else { int iRet; size_t cchMax; // leave the last space for the null terminator cchMax = cchDest - 1; iRet = _vsnprintf(pszDest, cchMax, pszFormat, argList); // ASSERT((iRet < 0) || (((size_t)iRet) <= cchMax)); if ((iRet < 0) || (((size_t)iRet) > cchMax)) { // we have truncated pszDest pszDestEnd = pszDest + cchMax; cchRemaining = 1; // need to null terminate the string *pszDestEnd = '\0'; hr = STRSAFE_E_INSUFFICIENT_BUFFER; } else if (((size_t)iRet) == cchMax) { // string fit perfectly pszDestEnd = pszDest + cchMax; cchRemaining = 1; // need to null terminate the string *pszDestEnd = '\0'; } else if (((size_t)iRet) < cchMax) { // there is extra room pszDestEnd = pszDest + iRet; cchRemaining = cchDest - iRet; if (dwFlags & STRSAFE_FILL_BEHIND_NULL) { memset(pszDestEnd + 1, STRSAFE_GET_FILL_PATTERN(dwFlags), ((cchRemaining - 1) * sizeof(char)) + (cbDest % sizeof(char))); } } } } } if (FAILED(hr)) { if (pszDest) { if (dwFlags & STRSAFE_FILL_ON_FAILURE) { memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest); if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0) { pszDestEnd = pszDest; cchRemaining = cchDest; } else if (cchDest > 0) { pszDestEnd = pszDest + cchDest - 1; cchRemaining = 1; // null terminate the end of the string *pszDestEnd = '\0'; } } if (dwFlags & (STRSAFE_NULL_ON_FAILURE | STRSAFE_NO_TRUNCATION)) { if (cchDest > 0) { pszDestEnd = pszDest; cchRemaining = cchDest; // null terminate the beginning of the string *pszDestEnd = '\0'; } } } } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (ppszDestEnd) { *ppszDestEnd = pszDestEnd; } if (pcchRemaining) { *pcchRemaining = cchRemaining; } } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringVPrintfExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags, const WCHAR* pszFormat, va_list argList) { HRESULT hr = S_OK; WCHAR* pszDestEnd = pszDest; size_t cchRemaining = 0; // ASSERT(cbDest == (cchDest * sizeof(WCHAR)) || // cbDest == (cchDest * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR))); // only accept valid flags if (dwFlags & (~STRSAFE_VALID_FLAGS)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { if (dwFlags & STRSAFE_IGNORE_NULLS) { if (pszDest == NULL) { if ((cchDest != 0) || (cbDest != 0)) { // NULL pszDest and non-zero cchDest/cbDest is invalid hr = STRSAFE_E_INVALID_PARAMETER; } } if (pszFormat == NULL) { pszFormat = u""; } } if (SUCCEEDED(hr)) { if (cchDest == 0) { pszDestEnd = pszDest; cchRemaining = 0; // only fail if there was actually a non-empty format string if (*pszFormat != L'\0') { if (pszDest == NULL) { hr = STRSAFE_E_INVALID_PARAMETER; } else { hr = STRSAFE_E_INSUFFICIENT_BUFFER; } } } else { int iRet; size_t cchMax; // leave the last space for the null terminator cchMax = cchDest - 1; iRet = _vsnwprintf(pszDest, cchMax, pszFormat, argList); // ASSERT((iRet < 0) || (((size_t)iRet) <= cchMax)); if ((iRet < 0) || (((size_t)iRet) > cchMax)) { // we have truncated pszDest pszDestEnd = pszDest + cchMax; cchRemaining = 1; // need to null terminate the string *pszDestEnd = L'\0'; hr = STRSAFE_E_INSUFFICIENT_BUFFER; } else if (((size_t)iRet) == cchMax) { // string fit perfectly pszDestEnd = pszDest + cchMax; cchRemaining = 1; // need to null terminate the string *pszDestEnd = L'\0'; } else if (((size_t)iRet) < cchMax) { // there is extra room pszDestEnd = pszDest + iRet; cchRemaining = cchDest - iRet; if (dwFlags & STRSAFE_FILL_BEHIND_NULL) { memset(pszDestEnd + 1, STRSAFE_GET_FILL_PATTERN(dwFlags), ((cchRemaining - 1) * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR))); } } } } } if (FAILED(hr)) { if (pszDest) { if (dwFlags & STRSAFE_FILL_ON_FAILURE) { memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest); if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0) { pszDestEnd = pszDest; cchRemaining = cchDest; } else if (cchDest > 0) { pszDestEnd = pszDest + cchDest - 1; cchRemaining = 1; // null terminate the end of the string *pszDestEnd = L'\0'; } } if (dwFlags & (STRSAFE_NULL_ON_FAILURE | STRSAFE_NO_TRUNCATION)) { if (cchDest > 0) { pszDestEnd = pszDest; cchRemaining = cchDest; // null terminate the beginning of the string *pszDestEnd = L'\0'; } } } } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER)) { if (ppszDestEnd) { *ppszDestEnd = pszDestEnd; } if (pcchRemaining) { *pcchRemaining = cchRemaining; } } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX STRSAFEAPI StringLengthWorkerA(const char* psz, size_t cchMax, size_t* pcch) { HRESULT hr = S_OK; size_t cchMaxPrev = cchMax; while (cchMax && (*psz != '\0')) { psz++; cchMax--; } if (cchMax == 0) { // the string is longer than cchMax hr = STRSAFE_E_INVALID_PARAMETER; } if (SUCCEEDED(hr) && pcch) { *pcch = cchMaxPrev - cchMax; } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFEAPI StringLengthWorkerW(const WCHAR* psz, size_t cchMax, size_t* pcch) { HRESULT hr = S_OK; size_t cchMaxPrev = cchMax; while (cchMax && (*psz != L'\0')) { psz++; cchMax--; } if (cchMax == 0) { // the string is longer than cchMax hr = STRSAFE_E_INVALID_PARAMETER; } if (SUCCEEDED(hr) && pcch) { *pcch = cchMaxPrev - cchMax; } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // STRSAFE_INLINE #ifndef STRSAFE_LIB_IMPL #ifndef FEATURE_PAL STRSAFE_INLINE_API StringGetsExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr = S_OK; char* pszDestEnd = pszDest; size_t cchRemaining = 0; // ASSERT(cbDest == (cchDest * sizeof(char)) || // cbDest == (cchDest * sizeof(char)) + (cbDest % sizeof(char))); // only accept valid flags if (dwFlags & (~STRSAFE_VALID_FLAGS)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { if (dwFlags & STRSAFE_IGNORE_NULLS) { if (pszDest == NULL) { if ((cchDest != 0) || (cbDest != 0)) { // NULL pszDest and non-zero cchDest/cbDest is invalid hr = STRSAFE_E_INVALID_PARAMETER; } } } if (SUCCEEDED(hr)) { if (cchDest <= 1) { pszDestEnd = pszDest; cchRemaining = cchDest; if (cchDest == 1) { *pszDestEnd = '\0'; } hr = STRSAFE_E_INSUFFICIENT_BUFFER; } else { char ch; pszDestEnd = pszDest; cchRemaining = cchDest; while ((cchRemaining > 1) && (ch = (char)getc(stdin)) != '\n') { if (ch == EOF) { if (pszDestEnd == pszDest) { // we failed to read anything from stdin hr = STRSAFE_E_END_OF_FILE; } break; } *pszDestEnd = ch; pszDestEnd++; cchRemaining--; } if (cchRemaining > 0) { // there is extra room if (dwFlags & STRSAFE_FILL_BEHIND_NULL) { memset(pszDestEnd + 1, STRSAFE_GET_FILL_PATTERN(dwFlags), ((cchRemaining - 1) * sizeof(char)) + (cbDest % sizeof(char))); } } *pszDestEnd = '\0'; } } } if (FAILED(hr)) { if (pszDest) { if (dwFlags & STRSAFE_FILL_ON_FAILURE) { memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest); if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0) { pszDestEnd = pszDest; cchRemaining = cchDest; } else if (cchDest > 0) { pszDestEnd = pszDest + cchDest - 1; cchRemaining = 1; // null terminate the end of the string *pszDestEnd = '\0'; } } if (dwFlags & (STRSAFE_NULL_ON_FAILURE | STRSAFE_NO_TRUNCATION)) { if (cchDest > 0) { pszDestEnd = pszDest; cchRemaining = cchDest; // null terminate the beginning of the string *pszDestEnd = '\0'; } } } } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER) || (hr == STRSAFE_E_END_OF_FILE)) { if (ppszDestEnd) { *ppszDestEnd = pszDestEnd; } if (pcchRemaining) { *pcchRemaining = cchRemaining; } } return hr; } #if defined(FEATURE_PAL) || !defined(PLATFORM_UNIX) STRSAFE_INLINE_API StringGetsExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags) { HRESULT hr = S_OK; WCHAR* pszDestEnd = pszDest; size_t cchRemaining = 0; // ASSERT(cbDest == (cchDest * sizeof(char)) || // cbDest == (cchDest * sizeof(char)) + (cbDest % sizeof(char))); // only accept valid flags if (dwFlags & (~STRSAFE_VALID_FLAGS)) { hr = STRSAFE_E_INVALID_PARAMETER; } else { if (dwFlags & STRSAFE_IGNORE_NULLS) { if (pszDest == NULL) { if ((cchDest != 0) || (cbDest != 0)) { // NULL pszDest and non-zero cchDest/cbDest is invalid hr = STRSAFE_E_INVALID_PARAMETER; } } } if (SUCCEEDED(hr)) { if (cchDest <= 1) { pszDestEnd = pszDest; cchRemaining = cchDest; if (cchDest == 1) { *pszDestEnd = L'\0'; } hr = STRSAFE_E_INSUFFICIENT_BUFFER; } else { WCHAR ch; pszDestEnd = pszDest; cchRemaining = cchDest; while ((cchRemaining > 1) && (ch = (WCHAR)getwc(stdin)) != L'\n') { if (ch == EOF) { if (pszDestEnd == pszDest) { // we failed to read anything from stdin hr = STRSAFE_E_END_OF_FILE; } break; } *pszDestEnd = ch; pszDestEnd++; cchRemaining--; } if (cchRemaining > 0) { // there is extra room if (dwFlags & STRSAFE_FILL_BEHIND_NULL) { memset(pszDestEnd + 1, STRSAFE_GET_FILL_PATTERN(dwFlags), ((cchRemaining - 1) * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR))); } } *pszDestEnd = L'\0'; } } } if (FAILED(hr)) { if (pszDest) { if (dwFlags & STRSAFE_FILL_ON_FAILURE) { memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest); if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0) { pszDestEnd = pszDest; cchRemaining = cchDest; } else if (cchDest > 0) { pszDestEnd = pszDest + cchDest - 1; cchRemaining = 1; // null terminate the end of the string *pszDestEnd = L'\0'; } } if (dwFlags & (STRSAFE_NULL_ON_FAILURE | STRSAFE_NO_TRUNCATION)) { if (cchDest > 0) { pszDestEnd = pszDest; cchRemaining = cchDest; // null terminate the beginning of the string *pszDestEnd = L'\0'; } } } } if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER) || (hr == STRSAFE_E_END_OF_FILE)) { if (ppszDestEnd) { *ppszDestEnd = pszDestEnd; } if (pcchRemaining) { *pcchRemaining = cchRemaining; } } return hr; } #endif // FEATURE_PAL || !PLATFORM_UNIX #endif // !FEATURE_PAL #endif // !STRSAFE_LIB_IMPL #endif // _STRSAFE_H_INCLUDED_
var userModel = require('../models/user'); //containt the function with business logics var usersController={ userHome(req,res){ //this will call the getuser function present in user.js userModel.getUser((err,data)=>{ try { if(err){ console.log(err) } else if(data){ res.render('home',{data:data}) } else{ res.render('home',{data:{}}) } } catch (error) { console.log(error) } }) }, addUsers(req,res){ try { console.log('adduser',req.body) const user = { firstname:req.body.firstname, lastname:req.body.lastname, city:req.body.city, state:req.body.state, country:req.body.country }; //this will call the adduser function present in user.js. //it will take object as parameter. userModel.addUser(user,(err,data)=>{ if(err){ console.log('error occured',err) } else{ console.log(data) res.redirect('/user/home') } }) } catch (error) { console.log('error',error) } } } module.exports = usersController;
/* * Copyright (c) 2013-2019 Intel Corporation. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * 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. */ #include "psmx2.h" #include "psmx2_trigger.h" static ssize_t psmx2_tagged_peek_generic(struct fid_ep *ep, void *buf, size_t len, void *desc, fi_addr_t src_addr, uint64_t tag, uint64_t ignore, void *context, uint64_t flags) { struct psmx2_fid_ep *ep_priv; struct psmx2_fid_av *av; struct psmx2_cq_event *event; psm2_epaddr_t psm2_epaddr; psm2_mq_req_t req; psm2_mq_status2_t psm2_status; psm2_mq_tag_t psm2_tag, psm2_tagsel; uint64_t data; int err; ep_priv = container_of(ep, struct psmx2_fid_ep, ep); if ((ep_priv->caps & FI_DIRECTED_RECV) && src_addr != FI_ADDR_UNSPEC) { av = ep_priv->av; assert(av); psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->rx, src_addr, av->type); } else { psm2_epaddr = 0; } PSMX2_SET_TAG(psm2_tag, tag, 0, PSMX2_TYPE_TAGGED); PSMX2_SET_MASK(psm2_tagsel, ~ignore, PSMX2_TYPE_MASK); if (flags & (FI_CLAIM | FI_DISCARD)) err = psm2_mq_improbe2(ep_priv->rx->psm2_mq, psm2_epaddr, &psm2_tag, &psm2_tagsel, &req, &psm2_status); else err = psm2_mq_iprobe2(ep_priv->rx->psm2_mq, psm2_epaddr, &psm2_tag, &psm2_tagsel, &psm2_status); switch (err) { case PSM2_OK: if (ep_priv->recv_cq) { if (flags & FI_CLAIM) { if (context) PSMX2_CTXT_REQ((struct fi_context *)context) = req; } else if (flags & FI_DISCARD) { if (!psm2_mq_imrecv(ep_priv->rx->psm2_mq, 0, NULL, 0, req, &req)) psm2_mq_wait2(&req, NULL); } tag = PSMX2_GET_TAG64(psm2_status.msg_tag); if (PSMX2_HAS_IMM(PSMX2_GET_FLAGS(psm2_status.msg_tag))) { data = PSMX2_GET_CQDATA(psm2_status.msg_tag); flags |= FI_REMOTE_CQ_DATA; } else { data = 0; } len = psm2_status.msg_length; event = psmx2_cq_create_event( ep_priv->recv_cq, context, /* op_context */ NULL, /* buf */ flags|FI_RECV|FI_TAGGED,/* flags */ len, /* len */ data, /* data */ tag, /* tag */ len, /* olen */ 0); /* err */ if (!event) return -FI_ENOMEM; event->source_is_valid = 1; event->source = psm2_status.msg_peer; event->source_av = ep_priv->av; psmx2_cq_enqueue_event(ep_priv->recv_cq, event); } return 0; case PSM2_MQ_NO_COMPLETIONS: if (ep_priv->recv_cq) { event = psmx2_cq_create_event( ep_priv->recv_cq, context, /* op_context */ NULL, /* buf */ flags|FI_RECV|FI_TAGGED,/* flags */ len, /* len */ 0, /* data */ tag, /* tag */ len, /* olen */ -FI_ENOMSG); /* err */ if (!event) return -FI_ENOMEM; event->source = 0; psmx2_cq_enqueue_event(ep_priv->recv_cq, event); } return 0; default: return psmx2_errno(err); } } ssize_t psmx2_tagged_recv_generic(struct fid_ep *ep, void *buf, size_t len, void *desc, fi_addr_t src_addr, uint64_t tag, uint64_t ignore, void *context, uint64_t flags) { struct psmx2_fid_ep *ep_priv; struct psmx2_fid_av *av; psm2_epaddr_t psm2_epaddr; psm2_mq_req_t psm2_req; psm2_mq_tag_t psm2_tag, psm2_tagsel; struct fi_context *fi_context; int err; int enable_completion; ep_priv = container_of(ep, struct psmx2_fid_ep, ep); if (flags & FI_PEEK) return psmx2_tagged_peek_generic(ep, buf, len, desc, src_addr, tag, ignore, context, flags); if (flags & FI_TRIGGER) return psmx2_trigger_queue_trecv(ep, buf, len, desc, src_addr, tag, ignore, context, flags); if (flags & FI_CLAIM) { assert(context); if (flags & FI_DISCARD) { psm2_mq_status2_t psm2_status; struct psmx2_cq_event *event; fi_context = context; psm2_req = PSMX2_CTXT_REQ(fi_context); err = psm2_mq_imrecv(ep_priv->rx->psm2_mq, 0, NULL, 0, context, &psm2_req); if (err != PSM2_OK) return psmx2_errno(err); psm2_mq_wait2(&psm2_req, &psm2_status); if (ep_priv->recv_cq && (!ep_priv->recv_selective_completion || (flags & FI_COMPLETION))) { tag = PSMX2_GET_TAG64(psm2_status.msg_tag); event = psmx2_cq_create_event( ep_priv->recv_cq, context, /* op_context */ NULL, /* buf */ flags|FI_RECV|FI_TAGGED,/* flags */ 0, /* len */ 0, /* data */ tag, /* tag */ 0, /* olen */ 0); /* err */ if (!event) return -FI_ENOMEM; event->source_is_valid = 1; event->source = psm2_status.msg_peer; event->source_av = ep_priv->av; psmx2_cq_enqueue_event(ep_priv->recv_cq, event); } if (ep_priv->recv_cntr) psmx2_cntr_inc(ep_priv->recv_cntr, 0); return 0; } fi_context = context; psm2_req = PSMX2_CTXT_REQ(fi_context); PSMX2_CTXT_TYPE(fi_context) = PSMX2_TRECV_CONTEXT; PSMX2_CTXT_USER(fi_context) = buf; PSMX2_CTXT_EP(fi_context) = ep_priv; err = psm2_mq_imrecv(ep_priv->rx->psm2_mq, 0, buf, len, context, &psm2_req); if (err != PSM2_OK) return psmx2_errno(err); PSMX2_CTXT_REQ(fi_context) = psm2_req; return 0; } enable_completion = !ep_priv->recv_selective_completion || (flags & FI_COMPLETION); if (enable_completion) { assert(context); fi_context = context; PSMX2_CTXT_TYPE(fi_context) = PSMX2_TRECV_CONTEXT; PSMX2_CTXT_EP(fi_context) = ep_priv; PSMX2_CTXT_USER(fi_context) = buf; PSMX2_CTXT_SIZE(fi_context) = len; } else { PSMX2_EP_GET_OP_CONTEXT(ep_priv, fi_context); #if !PSMX2_USE_REQ_CONTEXT PSMX2_CTXT_TYPE(fi_context) = PSMX2_NOCOMP_TRECV_CONTEXT; PSMX2_CTXT_EP(fi_context) = ep_priv; PSMX2_CTXT_USER(fi_context) = buf; PSMX2_CTXT_SIZE(fi_context) = len; #endif } if ((ep_priv->caps & FI_DIRECTED_RECV) && src_addr != FI_ADDR_UNSPEC) { av = ep_priv->av; assert(av); psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->rx, src_addr, av->type); } else { psm2_epaddr = 0; } PSMX2_SET_TAG(psm2_tag, tag, 0, PSMX2_TYPE_TAGGED); PSMX2_SET_MASK(psm2_tagsel, ~ignore, PSMX2_TYPE_MASK); err = psm2_mq_irecv2(ep_priv->rx->psm2_mq, psm2_epaddr, &psm2_tag, &psm2_tagsel, 0, buf, len, (void *)fi_context, &psm2_req); if (err != PSM2_OK) return psmx2_errno(err); if (enable_completion) { PSMX2_CTXT_REQ(fi_context) = psm2_req; } else { #if PSMX2_USE_REQ_CONTEXT PSMX2_REQ_GET_OP_CONTEXT(psm2_req, fi_context); PSMX2_CTXT_TYPE(fi_context) = PSMX2_NOCOMP_TRECV_CONTEXT; PSMX2_CTXT_EP(fi_context) = ep_priv; PSMX2_CTXT_USER(fi_context) = buf; PSMX2_CTXT_SIZE(fi_context) = len; #endif } return 0; } __attribute__((always_inline)) static inline ssize_t psmx2_tagged_recv_specialized(struct fid_ep *ep, void *buf, size_t len, void *desc, fi_addr_t src_addr, uint64_t tag, uint64_t ignore, void *context, int enable_completion, int directed_receive, int av_map) { struct psmx2_fid_ep *ep_priv; psm2_epaddr_t psm2_epaddr; psm2_mq_req_t psm2_req; psm2_mq_tag_t psm2_tag, psm2_tagsel; struct fi_context *fi_context; int err; ep_priv = container_of(ep, struct psmx2_fid_ep, ep); if (enable_completion) { fi_context = context; PSMX2_CTXT_TYPE(fi_context) = PSMX2_TRECV_CONTEXT; PSMX2_CTXT_EP(fi_context) = ep_priv; PSMX2_CTXT_USER(fi_context) = buf; PSMX2_CTXT_SIZE(fi_context) = len; } else { PSMX2_EP_GET_OP_CONTEXT(ep_priv, fi_context); #if !PSMX2_USE_REQ_CONTEXT PSMX2_CTXT_TYPE(fi_context) = PSMX2_NOCOMP_TRECV_CONTEXT; PSMX2_CTXT_EP(fi_context) = ep_priv; PSMX2_CTXT_USER(fi_context) = buf; PSMX2_CTXT_SIZE(fi_context) = len; #endif } if (directed_receive && src_addr != FI_ADDR_UNSPEC) { if (av_map) { psm2_epaddr = (psm2_epaddr_t)src_addr; } else { assert(ep_priv->av); psm2_epaddr = psmx2_av_translate_addr(ep_priv->av, ep_priv->rx, src_addr, FI_AV_TABLE); } } else { psm2_epaddr = 0; } PSMX2_SET_TAG(psm2_tag, tag, 0, PSMX2_TYPE_TAGGED); PSMX2_SET_MASK(psm2_tagsel, ~ignore, PSMX2_TYPE_MASK); err = psm2_mq_irecv2(ep_priv->rx->psm2_mq, psm2_epaddr, &psm2_tag, &psm2_tagsel, 0, buf, len, (void *)fi_context, &psm2_req); if (OFI_UNLIKELY((err != PSM2_OK))) return psmx2_errno(err); if (enable_completion) { PSMX2_CTXT_REQ(fi_context) = psm2_req; } else { #if PSMX2_USE_REQ_CONTEXT PSMX2_REQ_GET_OP_CONTEXT(psm2_req, fi_context); PSMX2_CTXT_TYPE(fi_context) = PSMX2_NOCOMP_TRECV_CONTEXT; PSMX2_CTXT_EP(fi_context) = ep_priv; PSMX2_CTXT_USER(fi_context) = buf; PSMX2_CTXT_SIZE(fi_context) = len; #endif } return 0; } /* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_DIRECTED_RECEIVE not set, av table */ static ssize_t psmx2_tagged_recv_no_flag_undirected(struct fid_ep *ep, void *buf, size_t len, void *desc, fi_addr_t src_addr, uint64_t tag, uint64_t ignore, void *context) { return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, tag, ignore, context, 1, 0, 0); } /* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_DIRECTED_RECEIVE not set, av table */ static ssize_t psmx2_tagged_recv_no_event_undirected(struct fid_ep *ep, void *buf, size_t len, void *desc, fi_addr_t src_addr, uint64_t tag, uint64_t ignore, void *context) { return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, tag, ignore, context, 0, 0, 0); } /* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_DIRECTED_RECEIVE set, av_table */ static ssize_t psmx2_tagged_recv_no_flag_directed(struct fid_ep *ep, void *buf, size_t len, void *desc, fi_addr_t src_addr, uint64_t tag, uint64_t ignore, void *context) { return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, tag, ignore, context, 1, 1, 0); } /* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_DIRECTED_RECEIVE set, av table */ static ssize_t psmx2_tagged_recv_no_event_directed(struct fid_ep *ep, void *buf, size_t len, void *desc, fi_addr_t src_addr, uint64_t tag, uint64_t ignore, void *context) { return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, tag, ignore, context, 0, 1, 0); } /* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_DIRECTED_RECEIVE not set, av map */ static ssize_t psmx2_tagged_recv_no_flag_undirected_av_map(struct fid_ep *ep, void *buf, size_t len, void *desc, fi_addr_t src_addr, uint64_t tag, uint64_t ignore, void *context) { return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, tag, ignore, context, 1, 0, 1); } /* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_DIRECTED_RECEIVE not set, av map */ static ssize_t psmx2_tagged_recv_no_event_undirected_av_map(struct fid_ep *ep, void *buf, size_t len, void *desc, fi_addr_t src_addr, uint64_t tag, uint64_t ignore, void *context) { return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, tag, ignore, context, 0, 0, 1); } /* op_flags=0, FI_SELECTIVE_COMPLETION not set, FI_DIRECTED_RECEIVE set, av_map */ static ssize_t psmx2_tagged_recv_no_flag_directed_av_map(struct fid_ep *ep, void *buf, size_t len, void *desc, fi_addr_t src_addr, uint64_t tag, uint64_t ignore, void *context) { return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, tag, ignore, context, 1, 1, 1); } /* op_flags=0, FI_SELECTIVE_COMPLETION set, FI_DIRECTED_RECEIVE set, av map */ static ssize_t psmx2_tagged_recv_no_event_directed_av_map(struct fid_ep *ep, void *buf, size_t len, void *desc, fi_addr_t src_addr, uint64_t tag, uint64_t ignore, void *context) { return psmx2_tagged_recv_specialized(ep, buf, len, desc, src_addr, tag, ignore, context, 0, 1, 1); } static ssize_t psmx2_tagged_recv(struct fid_ep *ep, void *buf, size_t len, void *desc, fi_addr_t src_addr, uint64_t tag, uint64_t ignore, void *context) { struct psmx2_fid_ep *ep_priv; ep_priv = container_of(ep, struct psmx2_fid_ep, ep); return psmx2_tagged_recv_generic(ep, buf, len, desc, src_addr, tag, ignore, context, ep_priv->rx_flags); } static ssize_t psmx2_tagged_recvmsg(struct fid_ep *ep, const struct fi_msg_tagged *msg, uint64_t flags) { void *buf; size_t len; assert(msg); assert(!msg->iov_count || msg->msg_iov); assert(msg->iov_count <= 1); if (msg->iov_count) { buf = msg->msg_iov[0].iov_base; len = msg->msg_iov[0].iov_len; } else { buf = NULL; len = 0; } return psmx2_tagged_recv_generic(ep, buf, len, msg->desc ? msg->desc[0] : NULL, msg->addr, msg->tag, msg->ignore, msg->context, flags); } #define PSMX2_TAGGED_RECVV_FUNC(suffix) \ static ssize_t \ psmx2_tagged_recvv##suffix(struct fid_ep *ep, const struct iovec *iov, \ void **desc, size_t count, \ fi_addr_t src_addr, uint64_t tag, \ uint64_t ignore, void *context) \ { \ void *buf; \ size_t len; \ assert(!count || iov); \ assert(count <= 1); \ if (count) { \ buf = iov[0].iov_base; \ len = iov[0].iov_len; \ } else { \ buf = NULL; \ len = 0; \ } \ return psmx2_tagged_recv##suffix(ep, buf, len, \ desc ? desc[0] : NULL, \ src_addr, tag, ignore, \ context); \ } PSMX2_TAGGED_RECVV_FUNC() PSMX2_TAGGED_RECVV_FUNC(_no_flag_directed) PSMX2_TAGGED_RECVV_FUNC(_no_event_directed) PSMX2_TAGGED_RECVV_FUNC(_no_flag_undirected) PSMX2_TAGGED_RECVV_FUNC(_no_event_undirected) PSMX2_TAGGED_RECVV_FUNC(_no_flag_directed_av_map) PSMX2_TAGGED_RECVV_FUNC(_no_event_directed_av_map) PSMX2_TAGGED_RECVV_FUNC(_no_flag_undirected_av_map) PSMX2_TAGGED_RECVV_FUNC(_no_event_undirected_av_map) ssize_t psmx2_tagged_send_generic(struct fid_ep *ep, const void *buf, size_t len, void *desc, fi_addr_t dest_addr, uint64_t tag, void *context, uint64_t flags, uint64_t data) { struct psmx2_fid_ep *ep_priv; struct psmx2_fid_av *av; psm2_epaddr_t psm2_epaddr; psm2_mq_req_t psm2_req; psm2_mq_tag_t psm2_tag; struct fi_context *fi_context; int err; int no_completion = 0; struct psmx2_cq_event *event; int have_data = (flags & FI_REMOTE_CQ_DATA) > 0; assert((tag & ~PSMX2_TAG_MASK) == 0); ep_priv = container_of(ep, struct psmx2_fid_ep, ep); if (flags & FI_TRIGGER) return psmx2_trigger_queue_tsend(ep, buf, len, desc, dest_addr, tag, context, flags, data); av = ep_priv->av; assert(av); psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr, av->type); PSMX2_SET_TAG(psm2_tag, tag, (uint32_t)data, PSMX2_TYPE_TAGGED | PSMX2_IMM_BIT_SET(have_data)); if ((flags & PSMX2_NO_COMPLETION) || (ep_priv->send_selective_completion && !(flags & FI_COMPLETION))) no_completion = 1; if (flags & FI_INJECT) { if (len > psmx2_env.inject_size) return -FI_EMSGSIZE; err = psm2_mq_send2(ep_priv->tx->psm2_mq, psm2_epaddr, 0, &psm2_tag, buf, len); if (err != PSM2_OK) return psmx2_errno(err); if (ep_priv->send_cntr) psmx2_cntr_inc(ep_priv->send_cntr, 0); if (ep_priv->send_cq && !no_completion) { event = psmx2_cq_create_event( ep_priv->send_cq, context, (void *)buf, flags, len, (uint64_t) data, tag, 0 /* olen */, 0 /* err */); if (event) psmx2_cq_enqueue_event(ep_priv->send_cq, event); else return -FI_ENOMEM; } return 0; } if (no_completion) { fi_context = &ep_priv->nocomp_tsend_context; } else { assert(context); fi_context = context; PSMX2_CTXT_TYPE(fi_context) = PSMX2_TSEND_CONTEXT; PSMX2_CTXT_USER(fi_context) = (void *)buf; PSMX2_CTXT_EP(fi_context) = ep_priv; } err = psm2_mq_isend2(ep_priv->tx->psm2_mq, psm2_epaddr, 0, &psm2_tag, buf, len, (void*)fi_context, &psm2_req); if (err != PSM2_OK) return psmx2_errno(err); if (fi_context == context) PSMX2_CTXT_REQ(fi_context) = psm2_req; return 0; } __attribute__((always_inline)) static inline ssize_t psmx2_tagged_send_specialized(struct fid_ep *ep, const void *buf, size_t len, void *desc, fi_addr_t dest_addr, uint64_t tag, void *context, int enable_completion, int av_map, int has_data, uint64_t data) { struct psmx2_fid_ep *ep_priv; psm2_epaddr_t psm2_epaddr; psm2_mq_req_t psm2_req; psm2_mq_tag_t psm2_tag; struct fi_context *fi_context; int err; assert((tag & ~PSMX2_TAG_MASK) == 0); ep_priv = container_of(ep, struct psmx2_fid_ep, ep); if (av_map) { psm2_epaddr = (psm2_epaddr_t)dest_addr; } else { assert(ep_priv->av); psm2_epaddr = psmx2_av_translate_addr(ep_priv->av, ep_priv->tx, dest_addr, FI_AV_TABLE); } if (has_data) PSMX2_SET_TAG(psm2_tag, tag, data, PSMX2_TYPE_TAGGED | PSMX2_IMM_BIT); else PSMX2_SET_TAG(psm2_tag, tag, 0, PSMX2_TYPE_TAGGED); if (enable_completion) { fi_context = context; PSMX2_CTXT_TYPE(fi_context) = PSMX2_TSEND_CONTEXT; PSMX2_CTXT_USER(fi_context) = (void *)buf; PSMX2_CTXT_EP(fi_context) = ep_priv; } else { fi_context = &ep_priv->nocomp_tsend_context; } err = psm2_mq_isend2(ep_priv->tx->psm2_mq, psm2_epaddr, 0, &psm2_tag, buf, len, (void*)fi_context, &psm2_req); if (err != PSM2_OK) return psmx2_errno(err); if (enable_completion) PSMX2_CTXT_REQ(fi_context) = psm2_req; return 0; } /* op_flags=0, FI_SELECTIVE_COMPLETION not set, av_table */ static ssize_t psmx2_tagged_send_no_flag(struct fid_ep *ep, const void *buf, size_t len, void *desc, fi_addr_t dest_addr, uint64_t tag, void *context) { return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, context, 1, 0, 0, 0); } /* op_flags=0, FI_SELECTIVE_COMPLETION set, av_table */ static ssize_t psmx2_tagged_send_no_event(struct fid_ep *ep, const void *buf, size_t len, void *desc, fi_addr_t dest_addr, uint64_t tag, void *context) { return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, context, 0, 0, 0, 0); } /* op_flags=0, FI_SELECTIVE_COMPLETION not set, av_map */ static ssize_t psmx2_tagged_send_no_flag_av_map(struct fid_ep *ep, const void *buf, size_t len, void *desc, fi_addr_t dest_addr, uint64_t tag, void *context) { return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, context, 1, 1, 0, 0); } /* op_flags=0, FI_SELECTIVE_COMPLETION set, av_map */ static ssize_t psmx2_tagged_send_no_event_av_map(struct fid_ep *ep, const void *buf, size_t len, void *desc, fi_addr_t dest_addr, uint64_t tag, void *context) { return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, context, 0, 1, 0, 0); } /* op_flags=0, FI_SELECTIVE_COMPLETION not set, av_table */ static ssize_t psmx2_tagged_senddata_no_flag(struct fid_ep *ep, const void *buf, size_t len, void *desc, uint64_t data, fi_addr_t dest_addr, uint64_t tag, void *context) { return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, context, 1, 0, 1, data); } /* op_flags=0, FI_SELECTIVE_COMPLETION set, av_table */ static ssize_t psmx2_tagged_senddata_no_event(struct fid_ep *ep, const void *buf, size_t len, void *desc, uint64_t data, fi_addr_t dest_addr, uint64_t tag, void *context) { return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, context, 0, 0, 1, data); } /* op_flags=0, FI_SELECTIVE_COMPLETION not set, av_map */ static ssize_t psmx2_tagged_senddata_no_flag_av_map(struct fid_ep *ep, const void *buf, size_t len, void *desc, uint64_t data, fi_addr_t dest_addr, uint64_t tag, void *context) { return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, context, 1, 1, 1, data); } /* op_flags=0, FI_SELECTIVE_COMPLETION set, av_map */ static ssize_t psmx2_tagged_senddata_no_event_av_map(struct fid_ep *ep, const void *buf, size_t len, void *desc, uint64_t data, fi_addr_t dest_addr, uint64_t tag, void *context) { return psmx2_tagged_send_specialized(ep, buf, len, desc, dest_addr, tag, context, 0, 1, 1, data); } __attribute__((always_inline)) static inline ssize_t psmx2_tagged_inject_specialized(struct fid_ep *ep, const void *buf, size_t len, fi_addr_t dest_addr, uint64_t tag, int av_map, int has_data, uint64_t data) { struct psmx2_fid_ep *ep_priv; psm2_epaddr_t psm2_epaddr; psm2_mq_tag_t psm2_tag; int err; assert((tag & ~PSMX2_TAG_MASK) == 0); if (len > psmx2_env.inject_size) return -FI_EMSGSIZE; ep_priv = container_of(ep, struct psmx2_fid_ep, ep); if (av_map) { psm2_epaddr = (psm2_epaddr_t)dest_addr; } else { assert(ep_priv->av); psm2_epaddr = psmx2_av_translate_addr(ep_priv->av, ep_priv->tx, dest_addr, FI_AV_TABLE); } if (has_data) PSMX2_SET_TAG(psm2_tag, tag, data, PSMX2_TYPE_TAGGED | PSMX2_IMM_BIT); else PSMX2_SET_TAG(psm2_tag, tag, 0, PSMX2_TYPE_TAGGED); err = psm2_mq_send2(ep_priv->tx->psm2_mq, psm2_epaddr, 0, &psm2_tag, buf, len); if (err != PSM2_OK) return psmx2_errno(err); if (ep_priv->send_cntr) psmx2_cntr_inc(ep_priv->send_cntr, 0); return 0; } /* op_flags=0, av_table */ static ssize_t psmx2_tagged_inject_no_flag(struct fid_ep *ep, const void *buf, size_t len, fi_addr_t dest_addr, uint64_t tag) { return psmx2_tagged_inject_specialized(ep, buf, len, dest_addr, tag, 0, 0, 0); } /* op_flags=0, av_map */ static ssize_t psmx2_tagged_inject_no_flag_av_map(struct fid_ep *ep, const void *buf, size_t len, fi_addr_t dest_addr, uint64_t tag) { return psmx2_tagged_inject_specialized(ep, buf, len, dest_addr, tag, 1, 0, 0); } /* op_flags=0, av_table */ static ssize_t psmx2_tagged_injectdata_no_flag(struct fid_ep *ep, const void *buf, size_t len, uint64_t data, fi_addr_t dest_addr, uint64_t tag) { return psmx2_tagged_inject_specialized(ep, buf, len, dest_addr, tag, 0, 1, data); } /* op_flags=0, av_map */ static ssize_t psmx2_tagged_injectdata_no_flag_av_map(struct fid_ep *ep, const void *buf, size_t len, uint64_t data, fi_addr_t dest_addr, uint64_t tag) { return psmx2_tagged_inject_specialized(ep, buf, len, dest_addr, tag, 1, 1, data); } ssize_t psmx2_tagged_sendv_generic(struct fid_ep *ep, const struct iovec *iov, void **desc, size_t count, fi_addr_t dest_addr, uint64_t tag, void *context, uint64_t flags, uint64_t data) { struct psmx2_fid_ep *ep_priv; struct psmx2_fid_av *av; psm2_epaddr_t psm2_epaddr; psm2_mq_req_t psm2_req; psm2_mq_tag_t psm2_tag; struct fi_context * fi_context; int send_flag = 0; int err; int no_completion = 0; struct psmx2_cq_event *event; size_t real_count; size_t len, total_len; char *p; uint32_t *q; int i, j; struct psmx2_sendv_request *req; int have_data = (flags & FI_REMOTE_CQ_DATA) > 0; uint32_t msg_flags; assert((tag & ~PSMX2_TAG_MASK) == 0); ep_priv = container_of(ep, struct psmx2_fid_ep, ep); if (flags & FI_TRIGGER) return psmx2_trigger_queue_tsendv(ep, iov, desc, count, dest_addr, tag, context, flags, data); total_len = 0; real_count = 0; for (i=0; i<count; i++) { if (iov[i].iov_len) { total_len += iov[i].iov_len; real_count++; j = i; } } if (real_count == 1) return psmx2_tagged_send_generic(ep, iov[j].iov_base, iov[j].iov_len, desc ? desc[j] : NULL, dest_addr, tag, context, flags, data); req = malloc(sizeof(*req)); if (!req) return -FI_ENOMEM; if (total_len <= PSMX2_IOV_BUF_SIZE) { req->iov_protocol = PSMX2_IOV_PROTO_PACK; p = req->buf; for (i=0; i<count; i++) { if (iov[i].iov_len) { memcpy(p, iov[i].iov_base, iov[i].iov_len); p += iov[i].iov_len; } } msg_flags = PSMX2_TYPE_TAGGED; len = total_len; } else { req->iov_protocol = PSMX2_IOV_PROTO_MULTI; req->iov_done = 0; req->iov_info.seq_num = (++ep_priv->iov_seq_num) % PSMX2_IOV_MAX_SEQ_NUM + 1; req->iov_info.count = (uint32_t)real_count; req->iov_info.total_len = (uint32_t)total_len; q = req->iov_info.len; for (i=0; i<count; i++) { if (iov[i].iov_len) *q++ = (uint32_t)iov[i].iov_len; } msg_flags = PSMX2_TYPE_TAGGED | PSMX2_IOV_BIT; len = (3 + real_count) * sizeof(uint32_t); } av = ep_priv->av; assert(av); psm2_epaddr = psmx2_av_translate_addr(av, ep_priv->tx, dest_addr, av->type); PSMX2_SET_TAG(psm2_tag, tag, (uint32_t)data, msg_flags | PSMX2_IMM_BIT_SET(have_data)); if ((flags & PSMX2_NO_COMPLETION) || (ep_priv->send_selective_completion && !(flags & FI_COMPLETION))) no_completion = 1; if (flags & FI_INJECT) { if (len > psmx2_env.inject_size) { free(req); return -FI_EMSGSIZE; } err = psm2_mq_send2(ep_priv->tx->psm2_mq, psm2_epaddr, send_flag, &psm2_tag, req->buf, len); free(req); if (err != PSM2_OK) return psmx2_errno(err); if (ep_priv->send_cntr) psmx2_cntr_inc(ep_priv->send_cntr, 0); if (ep_priv->send_cq && !no_completion) { event = psmx2_cq_create_event( ep_priv->send_cq, context, NULL, flags, len, (uint64_t) data, 0 /* tag */, 0 /* olen */, 0 /* err */); if (event) psmx2_cq_enqueue_event(ep_priv->send_cq, event); else return -FI_ENOMEM; } return 0; } req->no_completion = no_completion; req->user_context = context; req->comp_flag = FI_TAGGED; fi_context = &req->fi_context; PSMX2_CTXT_TYPE(fi_context) = PSMX2_SENDV_CONTEXT; PSMX2_CTXT_USER(fi_context) = req; PSMX2_CTXT_EP(fi_context) = ep_priv; err = psm2_mq_isend2(ep_priv->tx->psm2_mq, psm2_epaddr, send_flag, &psm2_tag, req->buf, len, (void *)fi_context, &psm2_req); if (err != PSM2_OK) { free(req); return psmx2_errno(err); } PSMX2_CTXT_REQ(fi_context) = psm2_req; if (req->iov_protocol == PSMX2_IOV_PROTO_MULTI) { fi_context = &req->fi_context_iov; PSMX2_CTXT_TYPE(fi_context) = PSMX2_IOV_SEND_CONTEXT; PSMX2_CTXT_USER(fi_context) = req; PSMX2_CTXT_EP(fi_context) = ep_priv; PSMX2_SET_TAG(psm2_tag, req->iov_info.seq_num, 0, PSMX2_TYPE_IOV_PAYLOAD); for (i=0; i<count; i++) { if (iov[i].iov_len) { err = psm2_mq_isend2(ep_priv->tx->psm2_mq, psm2_epaddr, send_flag, &psm2_tag, iov[i].iov_base, iov[i].iov_len, (void *)fi_context, &psm2_req); if (err != PSM2_OK) return psmx2_errno(err); } } } return 0; } static ssize_t psmx2_tagged_send(struct fid_ep *ep, const void *buf, size_t len, void *desc, fi_addr_t dest_addr, uint64_t tag, void *context) { struct psmx2_fid_ep *ep_priv; ep_priv = container_of(ep, struct psmx2_fid_ep, ep); return psmx2_tagged_send_generic(ep, buf, len, desc, dest_addr, tag, context, ep_priv->tx_flags, 0); } static ssize_t psmx2_tagged_sendmsg(struct fid_ep *ep, const struct fi_msg_tagged *msg, uint64_t flags) { void *buf; size_t len; assert(msg); assert(!msg->iov_count || msg->msg_iov); assert(msg->iov_count <= PSMX2_IOV_MAX_COUNT); if (msg->iov_count > 1) { return psmx2_tagged_sendv_generic(ep, msg->msg_iov, msg->desc, msg->iov_count, msg->addr, msg->tag, msg->context, flags, msg->data); } else if (msg->iov_count) { buf = msg->msg_iov[0].iov_base; len = msg->msg_iov[0].iov_len; } else { buf = NULL; len = 0; } return psmx2_tagged_send_generic(ep, buf, len, msg->desc ? msg->desc[0] : NULL, msg->addr, msg->tag, msg->context, flags, msg->data); } ssize_t psmx2_tagged_senddata(struct fid_ep *ep, const void *buf, size_t len, void *desc, uint64_t data, fi_addr_t dest_addr, uint64_t tag, void *context) { struct psmx2_fid_ep *ep_priv; ep_priv = container_of(ep, struct psmx2_fid_ep, ep); return psmx2_tagged_send_generic(ep, buf, len, desc, dest_addr, tag, context, ep_priv->tx_flags | FI_REMOTE_CQ_DATA, data); } #define PSMX2_TAGGED_SENDV_FUNC(suffix) \ static ssize_t \ psmx2_tagged_sendv##suffix(struct fid_ep *ep, const struct iovec *iov, \ void **desc,size_t count, \ fi_addr_t dest_addr, uint64_t tag, \ void *context) \ { \ void *buf; \ size_t len; \ assert(!count || iov); \ assert(count <= PSMX2_IOV_MAX_COUNT); \ if (count > 1) { \ struct psmx2_fid_ep *ep_priv; \ ep_priv = container_of(ep, struct psmx2_fid_ep, ep); \ return psmx2_tagged_sendv_generic(ep, iov, desc, count, \ dest_addr, tag, \ context, \ ep_priv->tx_flags, 0);\ } else if (count) { \ buf = iov[0].iov_base; \ len = iov[0].iov_len; \ } else { \ buf = NULL; \ len = 0; \ } \ return psmx2_tagged_send##suffix(ep, buf, len, \ desc ? desc[0] : NULL, \ dest_addr, tag, context); \ } PSMX2_TAGGED_SENDV_FUNC() PSMX2_TAGGED_SENDV_FUNC(_no_flag) PSMX2_TAGGED_SENDV_FUNC(_no_event) PSMX2_TAGGED_SENDV_FUNC(_no_flag_av_map) PSMX2_TAGGED_SENDV_FUNC(_no_event_av_map) static ssize_t psmx2_tagged_inject(struct fid_ep *ep, const void *buf, size_t len, fi_addr_t dest_addr, uint64_t tag) { struct psmx2_fid_ep *ep_priv; ep_priv = container_of(ep, struct psmx2_fid_ep, ep); return psmx2_tagged_send_generic(ep, buf, len, NULL, dest_addr, tag, NULL, ep_priv->tx_flags | FI_INJECT | PSMX2_NO_COMPLETION, 0); } static ssize_t psmx2_tagged_injectdata(struct fid_ep *ep, const void *buf, size_t len, uint64_t data, fi_addr_t dest_addr, uint64_t tag) { struct psmx2_fid_ep *ep_priv; ep_priv = container_of(ep, struct psmx2_fid_ep, ep); return psmx2_tagged_send_generic(ep, buf, len, NULL, dest_addr, tag, NULL, ep_priv->tx_flags | FI_INJECT | FI_REMOTE_CQ_DATA | PSMX2_NO_COMPLETION, data); } #define PSMX2_TAGGED_OPS(suffix,sendopt,recvopt,injopt) \ struct fi_ops_tagged psmx2_tagged_ops##suffix = { \ .size = sizeof(struct fi_ops_tagged), \ .recv = psmx2_tagged_recv##recvopt, \ .recvv = psmx2_tagged_recvv##recvopt, \ .recvmsg = psmx2_tagged_recvmsg, \ .send = psmx2_tagged_send##sendopt, \ .sendv = psmx2_tagged_sendv##sendopt, \ .sendmsg = psmx2_tagged_sendmsg, \ .inject = psmx2_tagged_inject##injopt, \ .senddata = psmx2_tagged_senddata##sendopt, \ .injectdata = psmx2_tagged_injectdata##injopt, \ }; PSMX2_TAGGED_OPS(,,,) PSMX2_TAGGED_OPS(_no_flag_directed, _no_flag, _no_flag_directed, _no_flag) PSMX2_TAGGED_OPS(_no_event_directed, _no_event, _no_event_directed, _no_flag) PSMX2_TAGGED_OPS(_no_send_event_directed, _no_event, _no_flag_directed, _no_flag) PSMX2_TAGGED_OPS(_no_recv_event_directed, _no_flag, _no_event_directed, _no_flag) PSMX2_TAGGED_OPS(_no_flag_undirected, _no_flag, _no_flag_undirected, _no_flag) PSMX2_TAGGED_OPS(_no_event_undirected, _no_event, _no_event_undirected, _no_flag) PSMX2_TAGGED_OPS(_no_send_event_undirected, _no_event, _no_flag_undirected, _no_flag) PSMX2_TAGGED_OPS(_no_recv_event_undirected, _no_flag, _no_event_undirected, _no_flag) PSMX2_TAGGED_OPS(_no_flag_directed_av_map, _no_flag_av_map, _no_flag_directed_av_map, _no_flag_av_map) PSMX2_TAGGED_OPS(_no_event_directed_av_map, _no_event_av_map, _no_event_directed_av_map, _no_flag_av_map) PSMX2_TAGGED_OPS(_no_send_event_directed_av_map, _no_event_av_map, _no_flag_directed_av_map, _no_flag_av_map) PSMX2_TAGGED_OPS(_no_recv_event_directed_av_map, _no_flag_av_map, _no_event_directed_av_map, _no_flag_av_map) PSMX2_TAGGED_OPS(_no_flag_undirected_av_map, _no_flag_av_map, _no_flag_undirected_av_map, _no_flag_av_map) PSMX2_TAGGED_OPS(_no_event_undirected_av_map, _no_event_av_map, _no_event_undirected_av_map, _no_flag_av_map) PSMX2_TAGGED_OPS(_no_send_event_undirected_av_map, _no_event_av_map, _no_flag_undirected_av_map, _no_flag_av_map) PSMX2_TAGGED_OPS(_no_recv_event_undirected_av_map, _no_flag_av_map, _no_event_undirected_av_map, _no_flag_av_map)
export { compose } from './compose'; export { reduce } from './reduce'; export { map } from './map'; export { filter } from './filter';
/** * Gather informations about all masters. * * @module @bldr/presentation/masters */ /* globals rawYamlExamples */ import { convertNestedMarkdownToHtml } from '@bldr/markdown-to-html' import inlineMarkup from './lib/inline-markup' import store from './store/index.js' import { convertToString } from '@bldr/universal-utils' import { MediaUri } from '@bldr/client-media-models' /** * Container for all registered master slides. */ export class MasterCollection { constructor () { /** * A container object for all master objects. */ this.masters = {} } /** * Add a master to the masters container. */ add (master) { this.masters[master.name] = master } /** * Get a master object by the master name. * * @param name - The name of the master slide. */ get (name) { if (this.masters[name] == null) { throw new Error(`Class Masters.get(): No master named “${name}”`) } const m = this.masters[name] return m } /** * Get all master objects as an object with the master name as properties. * * @returns {object} */ get all () { return this.masters } /** * Get all master names as an array. */ get allNames () { return Object.keys(this.masters) } /** * Check if a master exist. * * @param name - The name of the master slide. */ exists (name) { return this.masters[name] != null } /** * Find the name of the master by getting the intersection between all master * names and the slide keys. * * This method can be used to check that a slide object uses only one master * slide. * * @param data - The raw object of one slide unmodified from the YAML file. * * @returns An instance of the master. * * @throws If no master can be found and if more than one master name are * found. */ findMaster (data) { const rawProperties = Object.keys(data) const intersection = this.allNames.filter(masterName => rawProperties.includes(masterName) ) if (intersection.length === 0) { throw Error(`No master slide found: ${convertToString(data)}`) } if (intersection.length > 1) { throw Error( `Each slide must have only one master slide: ${convertToString(data)}` ) } return this.get(intersection[0]) } } export const masterCollection = new MasterCollection() /** * The icon of a master slide. This icon is shown in the documentation or * on the left corner of a slide. */ class MasterIcon { constructor ({ name, color, size, showOnSlides }) { if (size && !['small', 'large'].includes(size)) { throw new Error( `The property “size” of the “MasterIcon” has to be “small” or “large” not ${size}` ) } if (showOnSlides !== undefined && typeof showOnSlides !== 'boolean') { throw new Error( `The property “showOnSlide” of the “MasterIcon” has to be “boolean” not ${showOnSlides}` ) } /** * For allowed icon names the materical icon font. The nasizeme of an icon * of the {@link module:@bldr/icons baldr icon font} * * @type {String} */ this.name = name /** * A color name (CSS color class name) to colorize the master icon. * @see {@link module:@bldr/themes} * * @type {String} */ this.color = color || 'orange' /** * Show the icon the on slide view. * * @type {Boolean} */ this.showOnSlides = showOnSlides !== false /** * `small` or `large` * * @type {String} */ this.size = size || 'small' } } /** * Each master slide is a instance of this class. This class has many dummy * methods. They are there for documentation reasons. On the other side they * are useful as default methods. You have not to check if a master slide * implements a specific hook. */ class Master { /** * @param {Object} specs - The default exported object from the `main.js` * file. */ constructor (specs) { /** * It is the same as the parent folder where all master files are located, * for example `masters/audio/main.js`. The master name is `audio`. * @type {string} */ this.name = null /** * The human readable title of the master slide. * * @type {String} */ this.title = null /** * A instance of `MasterIcon` which holds information about the master icon. * * @type {module:@bldr/presentation/masters~MasterIcon} */ this.icon = null /** * A style configuration object. * * @type {module:@bldr/presentation~styleConfig} */ this.styleConfig = null /** * A vuex object containing `state`, `getters`, `actions`, `mutations` * properties which buildes a submodule vuex store for each master. * * @type {Object} */ this.store = null /** * The definition of the slide properties (`props`) (aka `props` of a * `master`). * * @type {module:@bldr/presentation~propsDef} */ this.propsDef = null /** * All imported methods. They are not called directly, but through * public methods, which adds additional functionality. * * @private * @type {Object} */ this.hooks_ = {} for (const spec in specs) { if (spec === 'icon') { this.icon = new MasterIcon(specs.icon) } else if (spec === 'props') { // To avoid confusion between real world prop with real world values // and props defintions we choose a different name. this.propsDef = specs.props } else if (spec === 'hooks') { // Make hooks private. Hooks should called from the public wrapper // methods. this.hooks_ = specs[spec] } else { this[spec] = specs[spec] } } this.registerVuexModule_() } /** * Generate the name of the Vuex module, e. g. `presentation/masters/camera`. * * @returns {String} * @private */ vuexModuleName_ () { return `presentation/masters/${this.name}` } /** * Shortcut function to access the masters Vuex module getter function. * * @param {String} getterName * @param {Mixed} arg */ $get (getterName, arg) { getterName = this.vuexModuleName_() + '/' + getterName if (arg) { return store.getters[getterName](arg) } else { return store.getters[getterName] } } /** * Shortcut function to access the masters Vuex module commit function. * * @param {String} mutationName * @param {Mixed} payload */ $commit (mutationName, payload) { mutationName = this.vuexModuleName_() + '/' + mutationName store.commit(mutationName, payload) } /** * A example presentation file in the raw YAML format (unparsed). The string * is structured like the contents of the `*.baldr.yml` files. * * @type {String} */ get example () { const rawYaml = rawYamlExamples.masters[this.name] const prefix = '---\n' + 'meta:\n' + ` ref: EP_master_${this.name}\n` + ` title: Beispiel-Präsentation für die Master-Folie „${this.name}“\n` + '\n' return rawYaml.replace('---\n', prefix) } /** * Must called after `this.store` is set. * * @private */ registerVuexModule_ () { if (this.store) { this.store.namespaced = true store.registerModule(['presentation', 'masters', this.name], this.store) } } /** * A cleaned version of `this.example`. * * Remove the empty line at the beginning of the backtick string example. * * @returns {String} */ get exampleClean () { if (this.example) { return this.example.replace(/^\n*/, '') } } /** * Call a master hook. Master hooks are definied in the `main.js` * files. * * @param {String} hookName - The name of the master hook / function. * @param {mixed} payload - The argument the master hook / function is called * with. * @param {object} thisArg - The * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call thisArg} * the master function is called with. * * @returns {mixed} * * @private */ callHook_ (hookName, payload, thisArg) { if (this.hooks_[hookName] && typeof this.hooks_[hookName] === 'function') { if (thisArg) { return this.hooks_[hookName].call(thisArg, payload) } return this.hooks_[hookName](payload) } } /** * Asynchronous version. Call a master hook. Master hooks are definied in the * `main.js` files. * * @param {String} hookName - The name of the master hook / function. * @param {mixed} payload - The argument the master hook / function is called * with. * @param {object} thisArg - The * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call thisArg} * the master function is called with. * * @returns {mixed} * * @private */ async callHookAsync_ (hookName, payload, thisArg) { if (this.hooks_[hookName] && typeof this.hooks_[hookName] === 'function') { if (thisArg) { return this.hooks_[hookName].call(thisArg, payload) } return this.hooks_[hookName](payload) } } /** * result must fit to props * * @param {module:@bldr/presentation~props} props * * @returns {object} */ normalizeProps (props) { return this.callHook_('normalizeProps', props) } /** * Calculate from the given props the step count. This hook method is called * after media resolution. * * @param {module:@bldr/presentation~props} props * * @param {Object} payload * @property {Object} payload.props - The props of the master slide. * @property {Object} payload.propsMain - The props of the main Vue component. * @property {Object} payload.propsPreview - The props of the preview Vue component. * @property {Object} payload.slide - The slide object. * @param {object} thisArg - The * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call thisArg} * the master function is called with. * * @returns {Number} - The number of steps. */ calculateStepCount (payload, thisArg) { return this.callHook_('calculateStepCount', payload, thisArg) } /** * The name of the props which are supporting inline media (for example * `markup`) */ get propNamesInlineMedia () { const inlineMarkupProps = [] for (const propName in this.propsDef) { const propDef = this.propsDef[propName] if (propDef.inlineMarkup) { inlineMarkupProps.push(propName) } } return inlineMarkupProps } /** * Filter the master props for props which are supporting inline media. * * @param {module:@bldr/presentation~props} * * @returns {Set} */ extractInlineMediaUris (props) { const uris = new Set() /** * @param {String} text */ function extractUrisInText (text) { const matches = text.matchAll(new RegExp(inlineMarkup.regExp, 'g')) for (const match of matches) { // 12 3 4 // [((id):(Fuer-Elise))( caption="Für Elise")] if (match[2] === 'id' || match[2] === 'uuid') uris.add(match[1]) } } for (const propName of this.propNamesInlineMedia) { const prop = props[propName] if (prop) { if (typeof prop === 'string') { extractUrisInText(prop) // `markup` in `generic` is an array. } else if (Array.isArray(prop)) { for (const item of prop) { extractUrisInText(item) } } } } return uris } /** * Replace the inline media tags `[id:Beethoven]` in certain props with * HTML. This function must be called after the media resolution. * * @param {module:@bldr/presentation~props} */ renderInlineMedia (props) { /** * @param {String} text */ function renderOneMediaUri (text) { return text.replace(new RegExp(inlineMarkup.regExp, 'g'), function ( match ) { const item = new inlineMarkup.Item(match) return inlineMarkup.render(item) }) } for (const propName of this.propNamesInlineMedia) { const prop = props[propName] if (prop) { if (typeof prop === 'string') { props[propName] = renderOneMediaUri(prop) // `markup` in `generic` is an array. } else if (Array.isArray(prop)) { for (let i = 0; i < prop.length; i++) { props[propName][i] = renderOneMediaUri(prop[i]) } } } } } /** * Retrieve the media URIs which have to be resolved. * * Call the master funtion `resolveMediaUris` and collect the media URIs. * (like [id:beethoven, ref:mozart]). Extract media URIs from * the text props. * * @param {module:@bldr/presentation~props} props * * @returns {Set} */ resolveMediaUris (props) { let uris = this.callHook_('resolveMediaUris', props) // To allow undefined return values of the hooks. if (!uris) { uris = new Set() } else if (typeof uris === 'string') { uris = new Set([uris]) } else if (Array.isArray(uris)) { uris = new Set(uris) } const inlineUris = this.extractInlineMediaUris(props) for (const uri of inlineUris) { uris.add(uri) } if (uris.size) return uris } /** * Check if the handed over media URIs can be resolved. Throw no errors, if * the media assets are not present. This hook is used in the YouTube master * slide. This master slide uses the online version, if no offline video could * be resolved. * * @param {module:@bldr/presentation~props} props * * @returns {Set} */ resolveOptionalMediaUris (props) { let uris = this.callHook_('resolveOptionalMediaUris', props) // To allow undefined return values of the hooks. if (!uris) { uris = new Set() } else if (typeof uris === 'string') { uris = new Set([uris]) } if (uris.size) return uris } /** * @param {module:@bldr/presentation~props} props * * @returns {String} */ plainTextFromProps (props) { return this.callHook_('plainTextFromProps', props) } /** * @param {object} payload * @property {module:@bldr/presentation~props} payload.props * @property {module:@bldr/presentation~props} payload.propsMain * @property {module:@bldr/presentation~props} payload.propPreview * * @returns {String} */ titleFromProps (payload) { return this.callHook_('titleFromProps', payload) } generateTexMarkup (payload) { return this.callHook_('generateTexMarkup', payload) } /** * Convert in the props certain strings containing markup to HTML. * * @param {module:@bldr/presentation~props} props * * @returns {object} */ convertMarkdownToHtml (props) { if (!this.propsDef) return props for (const propName in props) { const prop = this.propsDef[propName] if ('markup' in prop && prop.markup) { props[propName] = convertNestedMarkdownToHtml(props[propName]) } } return props } /** * Raise an error if there is an unkown prop - a not in the `props` section * defined prop. * * @param {module:@bldr/presentation~props} props */ detectUnkownProps (props) { for (const propName in props) { if (this.propsDef && !(propName in this.propsDef)) { throw new Error( `The master slide “${this.name}” has no property named “${propName}”.` ) } } } /** * Validate all media file URIs in the props of a certain slide. * * @param {module:@bldr/presentation~props} props */ validateUris (props) { if (!this.propsDef) return props for (const propName in props) { const prop = this.propsDef[propName] if ('assetUri' in prop && prop.assetUri) { props[propName] = MediaUri.validate(props[propName]) } } return props } /** * Collect the props (properties) for the main Vue component. * * @param {object} props - The props of the master slide. * @param {object} thisArg - The * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call thisArg} * the master function is called with. * * @returns {Object} - The props for the main component as a object. */ collectPropsMain (props, thisArg) { const propsMain = this.callHook_('collectPropsMain', props, thisArg) if (propsMain) return propsMain if (props) return props } /** * Collect the props (properties) for the preview Vue component. * * @param {Object} payload * @property {Object} payload.props - The props of the master slide. * @property {Object} payload.propsMain - The props of the main Vue component. * * @param {object} thisArg - The * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call thisArg} * the master function is called with. * * @returns {Object} - The props for the preview component as a object. */ collectPropsPreview (payload, thisArg) { const propsPreview = this.callHook_('collectPropsPreview', payload, thisArg) if (propsPreview) return propsPreview if (payload.propsMain) return payload.propsMain if (payload.props) return payload.props } /** * Hook after loading. To load resources in the background. * * @param {Object} props - The properties of the slide. * @param {Object} thisArg */ afterLoading (props, thisArg) { this.callHook_('afterLoading', { props, master: this }, thisArg) } /** * This hook gets executed after the media resolution. Wait for this hook to * finish. Go not in the background. * * @param {Object} props - The properties of the slide. * @param {object} thisArg - The * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call thisArg} * the master function is called with. */ async afterMediaResolution (props, thisArg) { await this.callHookAsync_( 'afterMediaResolution', { props, master: this }, thisArg ) } } function registerMasters () { function findMasterName (fileName) { const match = fileName.match(/\.\/([\w]+)\/.*/) if (!match) { throw new Error(`The master name couldn’t be retrieved from ${fileName}”`) } return match[1] } const requireMaster = require.context('./masters', true, /.+main\.(js|ts)$/) requireMaster.keys().forEach(fileName => { // ./masterName/main.js const masterName = findMasterName(fileName) const masterObj = requireMaster(fileName) const masterSpec = masterObj.default masterSpec.name = masterName const master = new Master(masterSpec) masterCollection.add(master) }) return masterCollection } /** * An instance of the class `Masters()` * * @type {module:@bldr/presentation/masters~Master} */ export const masters = registerMasters()
"""Project setup and packaging for sanic-healthcheck.""" import os from codecs import open # for consistent encoding from setuptools import setup, find_packages import re here = os.path.abspath(os.path.dirname(__file__)) # Load the package's __init__ file as a dictionary. with open(os.path.join(here, 'sanic_healthcheck', '__init__.py'), 'r', 'utf-8') as f: pkg = {k: v for k, v in re.findall( r"^(__\w+__) = \'(.+)\'", f.read(), re.M)} # Load the README readme = '' if os.path.exists('README.md'): with open('README.md', 'r', 'utf-8') as f: readme = f.read() setup( name=pkg['__title__'], version=pkg['__version__'], description=pkg['__description__'], long_description=readme, long_description_content_type='text/markdown', url=pkg['__url__'], author=pkg['__author__'], author_email=pkg['__author_email__'], license=pkg['__license__'], packages=find_packages(exclude=['tests.*', 'tests']), python_requires='>=3.6', package_data={ '': ['LICENSE'], }, install_requires=[ 'sanic', ], zip_safe=False, keywords="sanic health healthcheck liveness readiness", classifiers=[ 'Environment :: Web Environment', 'Intended Audience :: Developers', 'Natural Language :: English', 'Programming Language :: Python', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', ], )
""" Pit two models together on NHL 94 """ import retro import sys import argparse import logging import numpy as np import pygame from stable_baselines import logger from common import init_env, init_model, init_play_env, get_num_parameters def parse_cmdline(argv): parser = argparse.ArgumentParser() parser.add_argument('--p1_alg', type=str, default='ppo2') parser.add_argument('--p2_alg', type=str, default='ppo2') #parser.add_argument('--nn', type=str, default='CnnPolicy') parser.add_argument('--model1_desc', type=str, default='CNN') parser.add_argument('--model2_desc', type=str, default='MLP') parser.add_argument('--env', type=str, default='NHL941on1-Genesis') parser.add_argument('--state', type=str, default=None) parser.add_argument('--num_players', type=int, default='2') parser.add_argument('--num_env', type=int, default=1) parser.add_argument('--num_timesteps', type=int, default=0) parser.add_argument('--output_basedir', type=str, default='~/OUTPUT') parser.add_argument('--load_p1_model', type=str, default='') parser.add_argument('--load_p2_model', type=str, default='') parser.add_argument('--display_width', type=int, default='1440') parser.add_argument('--display_height', type=int, default='810') parser.add_argument('--deterministic', default=True, action='store_true') args = parser.parse_args(argv) logger.log("=========== Params ===========") logger.log(argv[1:]) return args def main(argv): args = parse_cmdline(argv[1:]) logger.log('========= Init =============') play_env, uw_display_env = init_play_env(args, True) p1_env = init_env(None, 1, None, 1, args) p2_env = init_env(None, 1, None, 1, args) p1_model = init_model(None, args.load_p1_model, args.p1_alg, args, p1_env) p2_model = init_model(None, args.load_p2_model, args.p2_alg, args, p2_env) uw_display_env.model1_params = get_num_parameters(p1_model) uw_display_env.model2_params = get_num_parameters(p2_model) logger.log('========= Start Play Loop ==========') state = play_env.reset() p1_actions = [] p2_actions = [] while True: p1_actions = p1_model.predict(state) p2_actions = p2_model.predict(state) uw_display_env.p1_action_probabilities = p1_model.action_probability(state) uw_display_env.p2_action_probabilities = p2_model.action_probability(state) actions2 = np.append(p1_actions[0], p2_actions[0]) state, reward, done, info = play_env.step(actions2) if done: state = play_env.reset() if __name__ == '__main__': main(sys.argv)
from datetime import datetime import pandas, io class PresentationLogfile(object): created = None def __init__(self, fpath): self.fpath = fpath def read(self): with open(self.fpath) as fhandle: lines = fhandle.readlines() lines = [l.strip() for l in lines] created_string = lines[1][-19:] self.created = datetime.strptime(created_string, '%m/%d/%Y %H:%M:%S') self.scenario = lines[0].split()[-1].strip() self.lines = lines def to_dataframe(self): """Return the events from the logfile as a pandas DataFrame - Find the end of the first table in the file - Preprocesses any unexpected whitespace Returns: pandas.DataFrame: One row per event with all Neurobs columns """ ## awkwardly, these files sometimes contain two tables; ## we need to find the end of table 1 empty_line_idx = [] for l, line in enumerate(self.lines): if len(line) < 3: empty_line_idx.append(l) if len(empty_line_idx) > 2: ## two tables in file end_of_table = empty_line_idx[2] ## 0-based index of first blank line else: ## one table in file end_of_table = len(self.lines) ## remove space in stim names preproc_lines = [] for line in self.lines[:end_of_table]: line = line.replace(' cross', '_cross') line = line.replace('\tcross', '_cross') line = line.replace('\t_3.bmp', '_3.bmp') line = line.replace('Event Type', 'Event_Type') line += '\n' preproc_lines.append(line) with io.StringIO() as tempfile: tempfile.writelines(preproc_lines) tempfile.seek(0) df = pandas.read_csv( tempfile, engine='python', ## c engine doesnt support regex seperators skip_blank_lines=True, sep='\t', ## either space or tab header=2, ## blank lines already skipped # nrows=end_of_table-5 ## 5 lines in header ) return df
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * WebUI to monitor File Metadata per Extension ID. */ var FileMetadata = (function() { 'use strict'; var FileMetadata = {}; /** * Gets extension data so the select drop down can be filled. */ function getExtensions() { chrome.send('getExtensions'); } /** * Renders result of getFileMetadata as a table. * @param {Array} list of dictionaries containing 'extensionName', * 'extensionID', 'status'. */ FileMetadata.onGetExtensions = function(extensionStatuses) { var select = $('extensions-select'); // Record existing drop down extension ID. If it's still there after the // refresh then keep it as the selected value. var oldSelectedExtension = getSelectedExtensionId(); select.textContent = ''; for (var i = 0; i < extensionStatuses.length; i++) { var originEntry = extensionStatuses[i]; var tr = document.createElement('tr'); var title = originEntry.extensionName + ' [' + originEntry.status + ']'; select.options.add(new Option(title, originEntry.extensionID)); // If option was the previously only selected, make it selected again. if (originEntry.extensionID != oldSelectedExtension) continue; select.options[select.options.length - 1].selected = true; } // After drop down has been loaded with options, file metadata can be loaded getFileMetadata(); }; /** * @return {string} extension ID that's currently selected in drop down box. */ function getSelectedExtensionId() { var dropDown = $('extensions-select').options; if (dropDown.selectedIndex >= 0) return dropDown[dropDown.selectedIndex].value; return null; } /** * Get File Metadata depending on which extension is selected from the drop down * if any. */ function getFileMetadata() { var dropDown = $('extensions-select'); if (dropDown.options.length === 0) { $('file-metadata-header').textContent = ''; $('file-metadata-entries').textContent = 'No file metadata available.'; return; } var selectedExtensionId = getSelectedExtensionId(); chrome.send('getFileMetadata', [selectedExtensionId]); } /** * Renders result of getFileMetadata as a table. */ FileMetadata.onGetFileMetadata = function(fileMetadataMap) { var header = $('file-metadata-header'); // Only draw the header if it hasn't been drawn yet if (header.children.length === 0) { var tr = document.createElement('tr'); tr.appendChild(createElementFromText('td', 'Type')); tr.appendChild(createElementFromText('td', 'Status')); tr.appendChild(createElementFromText('td', 'Path', {width: '250px'})); tr.appendChild(createElementFromText('td', 'Details')); header.appendChild(tr); } // Add row entries. var itemContainer = $('file-metadata-entries'); itemContainer.textContent = ''; for (var i = 0; i < fileMetadataMap.length; i++) { var metadatEntry = fileMetadataMap[i]; var tr = document.createElement('tr'); tr.appendChild(createFileIconCell(metadatEntry.type)); tr.appendChild(createElementFromText('td', metadatEntry.status)); tr.appendChild(createElementFromText('td', metadatEntry.path)); tr.appendChild(createElementFromDictionary('td', metadatEntry.details)); itemContainer.appendChild(tr); } }; /** * @param {string} file type string. * @return {HTMLElement} TD with file or folder icon depending on type. */ function createFileIconCell(type) { var img = document.createElement('div'); var lowerType = type.toLowerCase(); if (lowerType == 'file') { img.style.content = cr.icon.getImage('chrome://theme/IDR_DEFAULT_FAVICON'); } else if (lowerType == 'folder') { img.style.content = cr.icon.getImage('chrome://theme/IDR_FOLDER_CLOSED'); img.className = 'folder-image'; } var imgWrapper = document.createElement('div'); imgWrapper.appendChild(img); var td = document.createElement('td'); td.className = 'file-icon-cell'; td.appendChild(imgWrapper); td.appendChild(document.createTextNode(type)); return td; } function main() { getExtensions(); $('refresh-metadata-button').addEventListener('click', getExtensions); $('extensions-select').addEventListener('change', getFileMetadata); } document.addEventListener('DOMContentLoaded', main); return FileMetadata; })();
!function(t){function __webpack_require__(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}var n=window.webpackJsonp;window.webpackJsonp=function(e,o,i){for(var u,c,a,f=0,s=[];f<e.length;f++)c=e[f],r[c]&&s.push(r[c][0]),r[c]=0;for(u in o)Object.prototype.hasOwnProperty.call(o,u)&&(t[u]=o[u]);for(n&&n(e,o,i);s.length;)s.shift()();if(i)for(f=0;f<i.length;f++)a=__webpack_require__(__webpack_require__.s=i[f]);return a};var e={},r={39:0};return __webpack_require__.e=function(t){function onScriptComplete(){e.onerror=e.onload=null,clearTimeout(o);var n=r[t];0!==n&&(n&&n[1](new Error("Loading chunk "+t+" failed.")),r[t]=void 0)}if(0===r[t])return Promise.resolve();if(r[t])return r[t][2];var n=document.getElementsByTagName("head")[0],e=document.createElement("script");e.type="text/javascript",e.charset="utf-8",e.async=!0,e.timeout=12e4,e.src=__webpack_require__.p+""+t+"."+{0:"213423ec7864ff15e2cf",1:"8f6120b291bc8a44d18e",2:"59f13f4586ce02867339",3:"a1d9a46c2d1a116e2038",4:"09a99e381b82cb370fef",5:"79318c3fc132096dfcd0",6:"3bbca85d2cc8d89648a8",7:"065a1ecc170c95d3620c",8:"504868426833ac0b6b33",9:"b9886f683b44551ffdd7",10:"a74949716696a8058fdc",11:"7bac67890bbe468212cc",12:"040f64bc3b0de00352b5",13:"77a31094b021be051c6c",14:"de9058221526b0afa007",15:"0f8b12924d75a644695a",16:"6fb256b40290d582e11c",17:"6641ffaab147539b2e2d",18:"057c67a80a9987e111b7",19:"9e4b3d64db812e001ebe",20:"9112938a2b00683d9fc8",21:"beaf1d6e11aad1b2623c",22:"700adf2fc20714405383",23:"c81dd88429568817a057",24:"e7f1fe67365c97c73fa7",25:"3e8984a5b8930599fced",26:"dca3c5b3da168dc817b5",27:"e7fca32a120649be54b1",28:"838722da3b90e76208aa",29:"60c73f08facf575e6cae",30:"838722da3b90e76208aa",31:"17350e4a1ba2c1109698",32:"3d7fe699a6eb7e7f8ef1",33:"8b19aa8449c82654c591",34:"50891b4df93f85112b04",35:"c392f3dc93b8ee7ce5e6",36:"54ccc2ead82450f59239",37:"519602f8776fda636b28",38:"7fb9a91e457096817348"}[t]+".chunk.js";var o=setTimeout(onScriptComplete,12e4);e.onerror=e.onload=onScriptComplete,n.appendChild(e);var i=new Promise(function(n,e){r[t]=[n,e]});return r[t][2]=i},__webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.i=function(t){return t},__webpack_require__.d=function(t,n,e){Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:e})},__webpack_require__.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return __webpack_require__.d(n,"a",n),n},__webpack_require__.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},__webpack_require__.p="",__webpack_require__.oe=function(t){throw console.error(t),t},__webpack_require__(__webpack_require__.s=684)}([,function(t,n,e){var r=e(8),o=e(10),i=e(28),u=e(24),c=e(66),a="prototype",f=function(t,n,e){var s,l,h,p,v=t&f.F,d=t&f.G,g=t&f.S,y=t&f.P,b=t&f.B,_=d?r:g?r[n]||(r[n]={}):(r[n]||{})[a],m=d?o:o[n]||(o[n]={}),w=m[a]||(m[a]={});d&&(e=n);for(s in e)l=!v&&_&&void 0!==_[s],h=(l?_:e)[s],p=b&&l?c(h,r):y&&"function"==typeof h?c(Function.call,h):h,_&&u(_,s,h,t&f.U),m[s]!=h&&i(m,s,p),y&&w[s]!=h&&(w[s]=h)};r.core=o,f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},,,function(t,n,e){var r=e(6);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},,function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},,function(t,n){var e=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=e)},function(t,n,e){var r=e(146)("wks"),o=e(70),i=e(8).Symbol,u="function"==typeof i,c=t.exports=function(t){return r[t]||(r[t]=u&&i[t]||(u?i:o)("Symbol."+t))};c.store=r},function(t,n,e){var r=e(4),o=e(340),i=e(60),u=Object.defineProperty;n.f=e(16)?Object.defineProperty:function(t,n,e){if(r(t),n=i(n,!0),r(e),o)try{return u(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},,,,function(t,n,e){t.exports=!e(5)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},,,,function(t,n,e){var r=e(59),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},,,function(t,n,e){var r=e(8),o=e(28),i=e(21),u=e(70)("src"),c="toString",a=Function[c],f=(""+a).split(c);e(10).inspectSource=function(t){return a.call(t)},(t.exports=function(t,n,e,c){var a="function"==typeof e;a&&(i(e,"name")||o(e,"name",n)),t[n]!==e&&(a&&(i(e,u)||o(e,u,t[n]?""+t[n]:f.join(String(n)))),t===r?t[n]=e:c?t[n]?t[n]=e:o(t,n,e):(delete t[n],o(t,n,e)))})(Function.prototype,c,function(){return"function"==typeof this&&this[u]||a.call(this)})},function(t,n,e){var r=e(1),o=e(5),i=e(46),u=/"/g,c=function(t,n,e,r){var o=String(i(t)),c="<"+n;return""!==e&&(c+=" "+e+'="'+String(r).replace(u,"&quot;")+'"'),c+">"+o+"</"+n+">"};t.exports=function(t,n){var e={};e[t]=n(c),r(r.P+r.F*o(function(){var n=""[t]('"');return n!==n.toLowerCase()||n.split('"').length>3}),"String",e)}},,,function(t,n,e){var r=e(12),o=e(58);t.exports=e(16)?function(t,n,e){return r.f(t,n,o(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(46);t.exports=function(t){return Object(r(t))}},,,function(t,n,e){var r=e(5);t.exports=function(t,n){return!!t&&r(function(){n?t.call(null,function(){},1):t.call(null)})}},function(t,n,e){var r=e(103),o=e(46);t.exports=function(t){return r(o(t))}},,,function(t,n,e){var r=e(66),o=e(103),i=e(29),u=e(20),c=e(519);t.exports=function(t,n){var e=1==t,a=2==t,f=3==t,s=4==t,l=6==t,h=5==t||l,p=n||c;return function(n,c,v){for(var d,g,y=i(n),b=o(y),_=r(c,v,3),m=u(b.length),w=0,k=e?p(n,m):a?p(n,0):void 0;m>w;w++)if((h||w in b)&&(d=b[w],g=_(d,w,y),t))if(e)k[w]=g;else if(g)switch(t){case 3:return!0;case 5:return d;case 6:return w;case 2:k.push(d)}else if(s)return!1;return l?-1:f||s?s:k}}},function(t,n,e){var r=e(21),o=e(29),i=e(226)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n,e){var r=e(1),o=e(10),i=e(5);t.exports=function(t,n){var e=(o.Object||{})[t]||Object[t],u={};u[t]=n(e),r(r.S+r.F*i(function(){e(1)}),"Object",u)}},function(t,n){var e;e=function(){return this}();try{e=e||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(e=window)}t.exports=e},,,,,,,function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,e){var r=e(357),o=e(1),i=e(146)("metadata"),u=i.store||(i.store=new(e(365))),c=function(t,n,e){var o=u.get(t);if(!o){if(!e)return;u.set(t,o=new r)}var i=o.get(n);if(!i){if(!e)return;o.set(n,i=new r)}return i},a=function(t,n,e){var r=c(n,e,!1);return void 0!==r&&r.has(t)},f=function(t,n,e){var r=c(n,e,!1);return void 0===r?void 0:r.get(t)},s=function(t,n,e,r){c(e,r,!0).set(t,n)},l=function(t,n){var e=c(t,n,!1),r=[];return e&&e.forEach(function(t,n){r.push(n)}),r},h=function(t){return void 0===t||"symbol"==typeof t?t:String(t)},p=function(t){o(o.S,"Reflect",t)};t.exports={store:u,map:c,has:a,get:f,set:s,keys:l,key:h,exp:p}},function(t,n,e){var r=e(145),o=e(58),i=e(33),u=e(60),c=e(21),a=e(340),f=Object.getOwnPropertyDescriptor;n.f=e(16)?f:function(t,n){if(t=i(t),n=u(n,!0),a)try{return f(t,n)}catch(t){}if(c(t,n))return o(!r.f.call(t,n),t[n])}},function(t,n,e){"use strict";if(e(16)){var r=e(104),o=e(8),i=e(5),u=e(1),c=e(148),a=e(229),f=e(66),s=e(102),l=e(58),h=e(28),p=e(105),v=e(59),d=e(20),g=e(69),y=e(60),b=e(21),_=e(352),m=e(213),w=e(6),k=e(29),S=e(218),x=e(67),T=e(37),E=e(68).f,P=e(230),O=e(70),F=e(11),M=e(36),j=e(212),A=e(353),D=e(149),I=e(83),R=e(222),N=e(106),Z=e(211),C=e(332),L=e(12),z=e(48),W=L.f,q=z.f,U=o.RangeError,B=o.TypeError,H=o.Uint8Array,V="ArrayBuffer",G="Shared"+V,X="BYTES_PER_ELEMENT",K="prototype",J=Array[K],Y=a.ArrayBuffer,Q=a.DataView,$=M(0),tt=M(2),nt=M(3),et=M(4),rt=M(5),ot=M(6),it=j(!0),ut=j(!1),ct=D.values,at=D.keys,ft=D.entries,st=J.lastIndexOf,lt=J.reduce,ht=J.reduceRight,pt=J.join,vt=J.sort,dt=J.slice,gt=J.toString,yt=J.toLocaleString,bt=F("iterator"),_t=F("toStringTag"),mt=O("typed_constructor"),wt=O("def_constructor"),kt=c.CONSTR,St=c.TYPED,xt=c.VIEW,Tt="Wrong length!",Et=M(1,function(t,n){return At(A(t,t[wt]),n)}),Pt=i(function(){return 1===new H(new Uint16Array([1]).buffer)[0]}),Ot=!!H&&!!H[K].set&&i(function(){new H(1).set({})}),Ft=function(t,n){if(void 0===t)throw B(Tt);var e=+t,r=d(t);if(n&&!_(e,r))throw U(Tt);return r},Mt=function(t,n){var e=v(t);if(e<0||e%n)throw U("Wrong offset!");return e},jt=function(t){if(w(t)&&St in t)return t;throw B(t+" is not a typed array!")},At=function(t,n){if(!(w(t)&&mt in t))throw B("It is not a typed array constructor!");return new t(n)},Dt=function(t,n){return It(A(t,t[wt]),n)},It=function(t,n){for(var e=0,r=n.length,o=At(t,r);r>e;)o[e]=n[e++];return o},Rt=function(t,n,e){W(t,n,{get:function(){return this._d[e]}})},Nt=function(t){var n,e,r,o,i,u,c=k(t),a=arguments.length,s=a>1?arguments[1]:void 0,l=void 0!==s,h=P(c);if(void 0!=h&&!S(h)){for(u=h.call(c),r=[],n=0;!(i=u.next()).done;n++)r.push(i.value);c=r}for(l&&a>2&&(s=f(s,arguments[2],2)),n=0,e=d(c.length),o=At(this,e);e>n;n++)o[n]=l?s(c[n],n):c[n];return o},Zt=function(){for(var t=0,n=arguments.length,e=At(this,n);n>t;)e[t]=arguments[t++];return e},Ct=!!H&&i(function(){yt.call(new H(1))}),Lt=function(){return yt.apply(Ct?dt.call(jt(this)):jt(this),arguments)},zt={copyWithin:function(t,n){return C.call(jt(this),t,n,arguments.length>2?arguments[2]:void 0)},every:function(t){return et(jt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return Z.apply(jt(this),arguments)},filter:function(t){return Dt(this,tt(jt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return rt(jt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return ot(jt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){$(jt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return ut(jt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return it(jt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return pt.apply(jt(this),arguments)},lastIndexOf:function(t){return st.apply(jt(this),arguments)},map:function(t){return Et(jt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return lt.apply(jt(this),arguments)},reduceRight:function(t){return ht.apply(jt(this),arguments)},reverse:function(){for(var t,n=this,e=jt(n).length,r=Math.floor(e/2),o=0;o<r;)t=n[o],n[o++]=n[--e],n[e]=t;return n},some:function(t){return nt(jt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return vt.call(jt(this),t)},subarray:function(t,n){var e=jt(this),r=e.length,o=g(t,r);return new(A(e,e[wt]))(e.buffer,e.byteOffset+o*e.BYTES_PER_ELEMENT,d((void 0===n?r:g(n,r))-o))}},Wt=function(t,n){return Dt(this,dt.call(jt(this),t,n))},qt=function(t){jt(this);var n=Mt(arguments[1],1),e=this.length,r=k(t),o=d(r.length),i=0;if(o+n>e)throw U(Tt);for(;i<o;)this[n+i]=r[i++]},Ut={entries:function(){return ft.call(jt(this))},keys:function(){return at.call(jt(this))},values:function(){return ct.call(jt(this))}},Bt=function(t,n){return w(t)&&t[St]&&"symbol"!=typeof n&&n in t&&String(+n)==String(n)},Ht=function(t,n){return Bt(t,n=y(n,!0))?l(2,t[n]):q(t,n)},Vt=function(t,n,e){return!(Bt(t,n=y(n,!0))&&w(e)&&b(e,"value"))||b(e,"get")||b(e,"set")||e.configurable||b(e,"writable")&&!e.writable||b(e,"enumerable")&&!e.enumerable?W(t,n,e):(t[n]=e.value,t)};kt||(z.f=Ht,L.f=Vt),u(u.S+u.F*!kt,"Object",{getOwnPropertyDescriptor:Ht,defineProperty:Vt}),i(function(){gt.call({})})&&(gt=yt=function(){return pt.call(this)});var Gt=p({},zt);p(Gt,Ut),h(Gt,bt,Ut.values),p(Gt,{slice:Wt,set:qt,constructor:function(){},toString:gt,toLocaleString:Lt}),Rt(Gt,"buffer","b"),Rt(Gt,"byteOffset","o"),Rt(Gt,"byteLength","l"),Rt(Gt,"length","e"),W(Gt,_t,{get:function(){return this[St]}}),t.exports=function(t,n,e,a){a=!!a;var f=t+(a?"Clamped":"")+"Array",l="Uint8Array"!=f,p="get"+t,v="set"+t,g=o[f],y=g||{},b=g&&T(g),_=!g||!c.ABV,k={},S=g&&g[K],P=function(t,e){var r=t._d;return r.v[p](e*n+r.o,Pt)},O=function(t,e,r){var o=t._d;a&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),o.v[v](e*n+o.o,r,Pt)},F=function(t,n){W(t,n,{get:function(){return P(this,n)},set:function(t){return O(this,n,t)},enumerable:!0})};_?(g=e(function(t,e,r,o){s(t,g,f,"_d");var i,u,c,a,l=0,p=0;if(w(e)){if(!(e instanceof Y||(a=m(e))==V||a==G))return St in e?It(g,e):Nt.call(g,e);i=e,p=Mt(r,n);var v=e.byteLength;if(void 0===o){if(v%n)throw U(Tt);if(u=v-p,u<0)throw U(Tt)}else if(u=d(o)*n,u+p>v)throw U(Tt);c=u/n}else c=Ft(e,!0),u=c*n,i=new Y(u);for(h(t,"_d",{b:i,o:p,l:u,e:c,v:new Q(i)});l<c;)F(t,l++)}),S=g[K]=x(Gt),h(S,"constructor",g)):R(function(t){new g(null),new g(t)},!0)||(g=e(function(t,e,r,o){s(t,g,f);var i;return w(e)?e instanceof Y||(i=m(e))==V||i==G?void 0!==o?new y(e,Mt(r,n),o):void 0!==r?new y(e,Mt(r,n)):new y(e):St in e?It(g,e):Nt.call(g,e):new y(Ft(e,l))}),$(b!==Function.prototype?E(y).concat(E(b)):E(y),function(t){t in g||h(g,t,y[t])}),g[K]=S,r||(S.constructor=g));var M=S[bt],j=!!M&&("values"==M.name||void 0==M.name),A=Ut.values;h(g,mt,!0),h(S,St,f),h(S,xt,!0),h(S,wt,g),(a?new g(1)[_t]==f:_t in S)||W(S,_t,{get:function(){return f}}),k[f]=g,u(u.G+u.W+u.F*(g!=y),k),u(u.S,f,{BYTES_PER_ELEMENT:n,from:Nt,of:Zt}),X in S||h(S,X,n),u(u.P,f,zt),N(f),u(u.P+u.F*Ot,f,{set:qt}),u(u.P+u.F*!j,f,Ut),u(u.P+u.F*(S.toString!=gt),f,{toString:gt}),u(u.P+u.F*i(function(){new g(1).slice()}),f,{slice:Wt}),u(u.P+u.F*(i(function(){return[1,2].toLocaleString()!=new g([1,2]).toLocaleString()})||!i(function(){S.toLocaleString.call([1,2])})),f,{toLocaleString:Lt}),I[f]=j?M:A,r||j||h(S,bt,A)}}else t.exports=function(){}},,,,,,,function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,e){var r=e(70)("meta"),o=e(6),i=e(21),u=e(12).f,c=0,a=Object.isExtensible||function(){return!0},f=!e(5)(function(){return a(Object.preventExtensions({}))}),s=function(t){u(t,r,{value:{i:"O"+ ++c,w:{}}})},l=function(t,n){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!a(t))return"F";if(!n)return"E";s(t)}return t[r].i},h=function(t,n){if(!i(t,r)){if(!a(t))return!0;if(!n)return!1;s(t)}return t[r].w},p=function(t){return f&&v.NEED&&a(t)&&!i(t,r)&&s(t),t},v=t.exports={KEY:r,NEED:!1,fastKey:l,getWeak:h,onFreeze:p}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n,e){var r=e(6);t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},,,,,function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n,e){var r=e(56);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}},function(t,n,e){var r=e(4),o=e(347),i=e(214),u=e(226)("IE_PROTO"),c=function(){},a="prototype",f=function(){var t,n=e(338)("iframe"),r=i.length,o="<",u=">";for(n.style.display="none",e(339).appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write(o+"script"+u+"document.F=Object"+o+"/script"+u),t.close(),f=t.F;r--;)delete f[a][i[r]];return f()};t.exports=Object.create||function(t,n){var e;return null!==t?(c[a]=r(t),e=new c,c[a]=null,e[u]=t):e=f(),void 0===n?e:o(e,n)}},function(t,n,e){var r=e(349),o=e(214).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,n,e){var r=e(59),o=Math.max,i=Math.min;t.exports=function(t,n){return t=r(t),t<0?o(t+n,0):i(t,n)}},function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},function(t,n,e){"use strict";var r=e(213),o={};o[e(11)("toStringTag")]="z",o+""!="[object z]"&&e(24)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},,,,,,,,,,,,function(t,n){t.exports={}},function(t,n,e){var r=e(349),o=e(214);t.exports=Object.keys||function(t){return r(t,o)}},,,,,,,,,,,,,,,,,function(t,n,e){var r=e(11)("unscopables"),o=Array.prototype;void 0==o[r]&&e(28)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,n){t.exports=function(t,n,e,r){if(!(t instanceof n)||void 0!==r&&r in t)throw TypeError(e+": incorrect invocation!");return t}},function(t,n,e){var r=e(65);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n){t.exports=!1},function(t,n,e){var r=e(24);t.exports=function(t,n,e){for(var o in n)r(t,o,n[o],e);return t}},function(t,n,e){"use strict";var r=e(8),o=e(12),i=e(16),u=e(11)("species");t.exports=function(t){var n=r[t];i&&n&&!n[u]&&o.f(n,u,{configurable:!0,get:function(){return this}})}},function(t,n,e){var r=e(12).f,o=e(21),i=e(11)("toStringTag");t.exports=function(t,n,e){t&&!o(t=e?t:t.prototype,i)&&r(t,i,{configurable:!0,value:n})}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,n,e){"use strict";var r=e(8),o=e(1),i=e(24),u=e(105),c=e(57),a=e(143),f=e(102),s=e(6),l=e(5),h=e(222),p=e(107),v=e(217);t.exports=function(t,n,e,d,g,y){var b=r[t],_=b,m=g?"set":"add",w=_&&_.prototype,k={},S=function(t){var n=w[t];i(w,t,"delete"==t?function(t){return!(y&&!s(t))&&n.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!s(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!s(t)?void 0:n.call(this,0===t?0:t)}:"add"==t?function(t){return n.call(this,0===t?0:t),this}:function(t,e){return n.call(this,0===t?0:t,e),this})};if("function"==typeof _&&(y||w.forEach&&!l(function(){(new _).entries().next()}))){var x=new _,T=x[m](y?{}:-0,1)!=x,E=l(function(){x.has(1)}),P=h(function(t){new _(t)}),O=!y&&l(function(){for(var t=new _,n=5;n--;)t[m](n,n);return!t.has(-0)});P||(_=n(function(n,e){f(n,_,t);var r=v(new b,n,_);return void 0!=e&&a(e,g,r[m],r),r}),_.prototype=w,w.constructor=_),(E||O)&&(S("delete"),S("has"),g&&S("get")),(O||T)&&S(m),y&&w.clear&&delete w.clear}else _=d.getConstructor(n,t,g,m),u(_.prototype,e),c.NEED=!0;return p(_,t),k[t]=_,o(o.G+o.W+o.F*(_!=b),k),y||d.setStrong(_,t,g),_}},function(t,n,e){"use strict";var r=e(28),o=e(24),i=e(5),u=e(46),c=e(11);t.exports=function(t,n,e){var a=c(t),f=e(u,a,""[t]),s=f[0],l=f[1];i(function(){var n={};return n[a]=function(){return 7},7!=""[t](n)})&&(o(String.prototype,t,s),r(RegExp.prototype,a,2==n?function(t,n){return l.call(t,this,n)}:function(t){return l.call(t,this)}))}},function(t,n,e){var r=e(66),o=e(342),i=e(218),u=e(4),c=e(20),a=e(230),f={},s={},n=t.exports=function(t,n,e,l,h){var p,v,d,g,y=h?function(){return t}:a(t),b=r(e,l,n?2:1),_=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(i(y)){for(p=c(t.length);p>_;_++)if(g=n?b(u(v=t[_])[0],v[1]):b(t[_]),g===f||g===s)return g}else for(d=y.call(t);!(v=d.next()).done;)if(g=o(d,b,v.value,n),g===f||g===s)return g};n.BREAK=f,n.RETURN=s},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,e){var r=e(8),o="__core-js_shared__",i=r[o]||(r[o]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,n,e){var r=e(1),o=e(46),i=e(5),u=e(228),c="["+u+"]",a="​…",f=RegExp("^"+c+c+"*"),s=RegExp(c+c+"*$"),l=function(t,n,e){var o={},c=i(function(){return!!u[t]()||a[t]()!=a}),f=o[t]=c?n(h):u[t];e&&(o[e]=f),r(r.P+r.F*c,"String",o)},h=l.trim=function(t,n){return t=String(o(t)),1&n&&(t=t.replace(f,"")),2&n&&(t=t.replace(s,"")),t};t.exports=l},function(t,n,e){for(var r,o=e(8),i=e(28),u=e(70),c=u("typed_array"),a=u("view"),f=!(!o.ArrayBuffer||!o.DataView),s=f,l=0,h=9,p="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<h;)(r=o[p[l++]])?(i(r.prototype,c,!0),i(r.prototype,a,!0)):s=!1;t.exports={ABV:f,CONSTR:s,TYPED:c,VIEW:a}},function(t,n,e){"use strict";var r=e(101),o=e(344),i=e(83),u=e(33);t.exports=e(221)(Array,"Array",function(t,n){this._t=u(t),this._i=0,this._k=n},function(){var t=this._t,n=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,o(1)):"keys"==n?o(0,e):"values"==n?o(0,t[e]):o(0,[e,t[e]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,n,e){"use strict";var r=e(354)(!0);e(221)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,n=this._t,e=this._i;return e>=n.length?{value:void 0,done:!0}:(t=r(n,e),this._i+=t.length,{value:t,done:!1})})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,n,e){"use strict";var r=e(29),o=e(69),i=e(20);t.exports=function(t){for(var n=r(this),e=i(n.length),u=arguments.length,c=o(u>1?arguments[1]:void 0,e),a=u>2?arguments[2]:void 0,f=void 0===a?e:o(a,e);f>c;)n[c++]=t;return n}},function(t,n,e){var r=e(33),o=e(20),i=e(69);t.exports=function(t){return function(n,e,u){var c,a=r(n),f=o(a.length),s=i(u,f);if(t&&e!=e){for(;f>s;)if(c=a[s++],c!=c)return!0}else for(;f>s;s++)if((t||s in a)&&a[s]===e)return t||s||0;return!t&&-1}}},function(t,n,e){var r=e(65),o=e(11)("toStringTag"),i="Arguments"==r(function(){return arguments}()),u=function(t,n){try{return t[n]}catch(t){}};t.exports=function(t){var n,e,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=u(n=Object(t),o))?e:i?r(n):"Object"==(c=r(n))&&"function"==typeof n.callee?"Arguments":c}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,e){var r=e(11)("match");t.exports=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r]=!1,!"/./"[t](n)}catch(t){}}return!0}},function(t,n,e){"use strict";var r=e(4);t.exports=function(){var t=r(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},function(t,n,e){var r=e(6),o=e(225).set;t.exports=function(t,n,e){var i,u=n.constructor;return u!==e&&"function"==typeof u&&(i=u.prototype)!==e.prototype&&r(i)&&o&&o(t,i),t}},function(t,n,e){var r=e(83),o=e(11)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,n,e){var r=e(65);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n,e){var r=e(6),o=e(65),i=e(11)("match");t.exports=function(t){var n;return r(t)&&(void 0!==(n=t[i])?!!n:"RegExp"==o(t))}},function(t,n,e){"use strict";var r=e(104),o=e(1),i=e(24),u=e(28),c=e(21),a=e(83),f=e(343),s=e(107),l=e(37),h=e(11)("iterator"),p=!([].keys&&"next"in[].keys()),v="@@iterator",d="keys",g="values",y=function(){return this};t.exports=function(t,n,e,b,_,m,w){f(e,n,b);var k,S,x,T=function(t){if(!p&&t in F)return F[t];switch(t){case d:return function(){return new e(this,t)};case g:return function(){return new e(this,t)}}return function(){return new e(this,t)}},E=n+" Iterator",P=_==g,O=!1,F=t.prototype,M=F[h]||F[v]||_&&F[_],j=M||T(_),A=_?P?T("entries"):j:void 0,D="Array"==n?F.entries||M:M;if(D&&(x=l(D.call(new t)),x!==Object.prototype&&(s(x,E,!0),r||c(x,h)||u(x,h,y))),P&&M&&M.name!==g&&(O=!0,j=function(){return M.call(this)}),r&&!w||!p&&!O&&F[h]||u(F,h,j),a[n]=j,a[E]=y,_)if(k={values:P?j:T(g),keys:m?j:T(d),entries:A},w)for(S in k)S in F||i(F,S,k[S]);else o(o.P+o.F*(p||O),n,k);return k}},function(t,n,e){var r=e(11)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,n){if(!n&&!o)return!1;var e=!1;try{var i=[7],u=i[r]();u.next=function(){return{done:e=!0}},i[r]=function(){return u},t(i)}catch(t){}return e}},function(t,n){var e=Math.expm1;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||e(-2e-17)!=-2e-17?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:e},function(t,n){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,n,e){var r=e(6),o=e(4),i=function(t,n){if(o(t),!r(n)&&null!==n)throw TypeError(n+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{r=e(66)(Function.call,e(48).f(Object.prototype,"__proto__").set,2),r(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,e){return i(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:i}},function(t,n,e){var r=e(146)("keys"),o=e(70);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,n,e){var r=e(220),o=e(46);t.exports=function(t,n,e){if(r(n))throw TypeError("String#"+e+" doesn't accept regex!");return String(o(t))}},function(t,n){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,n,e){"use strict";var r=e(8),o=e(16),i=e(104),u=e(148),c=e(28),a=e(105),f=e(5),s=e(102),l=e(59),h=e(20),p=e(68).f,v=e(12).f,d=e(211),g=e(107),y="ArrayBuffer",b="DataView",_="prototype",m="Wrong length!",w="Wrong index!",k=r[y],S=r[b],x=r.Math,T=r.RangeError,E=r.Infinity,P=k,O=x.abs,F=x.pow,M=x.floor,j=x.log,A=x.LN2,D="buffer",I="byteLength",R="byteOffset",N=o?"_b":D,Z=o?"_l":I,C=o?"_o":R,L=function(t,n,e){var r,o,i,u=Array(e),c=8*e-n-1,a=(1<<c)-1,f=a>>1,s=23===n?F(2,-24)-F(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for(t=O(t),t!=t||t===E?(o=t!=t?1:0,r=a):(r=M(j(t)/A),t*(i=F(2,-r))<1&&(r--,i*=2),t+=r+f>=1?s/i:s*F(2,1-f),t*i>=2&&(r++,i/=2),r+f>=a?(o=0,r=a):r+f>=1?(o=(t*i-1)*F(2,n),r+=f):(o=t*F(2,f-1)*F(2,n),r=0));n>=8;u[l++]=255&o,o/=256,n-=8);for(r=r<<n|o,c+=n;c>0;u[l++]=255&r,r/=256,c-=8);return u[--l]|=128*h,u},z=function(t,n,e){var r,o=8*e-n-1,i=(1<<o)-1,u=i>>1,c=o-7,a=e-1,f=t[a--],s=127&f;for(f>>=7;c>0;s=256*s+t[a],a--,c-=8);for(r=s&(1<<-c)-1,s>>=-c,c+=n;c>0;r=256*r+t[a],a--,c-=8);if(0===s)s=1-u;else{if(s===i)return r?NaN:f?-E:E;r+=F(2,n),s-=u}return(f?-1:1)*r*F(2,s-n)},W=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},q=function(t){return[255&t]},U=function(t){return[255&t,t>>8&255]},B=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},H=function(t){return L(t,52,8)},V=function(t){return L(t,23,4)},G=function(t,n,e){v(t[_],n,{get:function(){return this[e]}})},X=function(t,n,e,r){var o=+e,i=l(o);if(o!=i||i<0||i+n>t[Z])throw T(w);var u=t[N]._b,c=i+t[C],a=u.slice(c,c+n);return r?a:a.reverse()},K=function(t,n,e,r,o,i){var u=+e,c=l(u);if(u!=c||c<0||c+n>t[Z])throw T(w);for(var a=t[N]._b,f=c+t[C],s=r(+o),h=0;h<n;h++)a[f+h]=s[i?h:n-h-1]},J=function(t,n){s(t,k,y);var e=+n,r=h(e);if(e!=r)throw T(m);return r};if(u.ABV){if(!f(function(){new k})||!f(function(){new k(.5)})){k=function(t){return new P(J(this,t))};for(var Y,Q=k[_]=P[_],$=p(P),tt=0;$.length>tt;)(Y=$[tt++])in k||c(k,Y,P[Y]);i||(Q.constructor=k)}var nt=new S(new k(2)),et=S[_].setInt8;nt.setInt8(0,2147483648),nt.setInt8(1,2147483649),!nt.getInt8(0)&&nt.getInt8(1)||a(S[_],{setInt8:function(t,n){et.call(this,t,n<<24>>24)},setUint8:function(t,n){et.call(this,t,n<<24>>24)}},!0)}else k=function(t){var n=J(this,t);this._b=d.call(Array(n),0),this[Z]=n},S=function(t,n,e){s(this,S,b),s(t,k,b);var r=t[Z],o=l(n);if(o<0||o>r)throw T("Wrong offset!");if(e=void 0===e?r-o:h(e),o+e>r)throw T(m);this[N]=t,this[C]=o,this[Z]=e},o&&(G(k,I,"_l"),G(S,D,"_b"),G(S,I,"_l"),G(S,R,"_o")),a(S[_],{getInt8:function(t){return X(this,1,t)[0]<<24>>24},getUint8:function(t){return X(this,1,t)[0]},getInt16:function(t){var n=X(this,2,t,arguments[1]);return(n[1]<<8|n[0])<<16>>16},getUint16:function(t){var n=X(this,2,t,arguments[1]);return n[1]<<8|n[0]},getInt32:function(t){return W(X(this,4,t,arguments[1]))},getUint32:function(t){return W(X(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return z(X(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return z(X(this,8,t,arguments[1]),52,8)},setInt8:function(t,n){K(this,1,t,q,n)},setUint8:function(t,n){K(this,1,t,q,n)},setInt16:function(t,n){K(this,2,t,U,n,arguments[2])},setUint16:function(t,n){K(this,2,t,U,n,arguments[2])},setInt32:function(t,n){K(this,4,t,B,n,arguments[2])},setUint32:function(t,n){K(this,4,t,B,n,arguments[2])},setFloat32:function(t,n){K(this,4,t,V,n,arguments[2])},setFloat64:function(t,n){K(this,8,t,H,n,arguments[2])}});g(k,y),g(S,b),c(S[_],u.VIEW,!0),n[y]=k,n[b]=S},function(t,n,e){var r=e(213),o=e(11)("iterator"),i=e(83);t.exports=e(10).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,n,e){for(var r=e(149),o=e(24),i=e(8),u=e(28),c=e(83),a=e(11),f=a("iterator"),s=a("toStringTag"),l=c.Array,h=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],p=0;p<5;p++){var v,d=h[p],g=i[d],y=g&&g.prototype;if(y){y[f]||u(y,f,l),y[s]||u(y,s,d),c[d]=l;for(v in r)y[v]||o(y,v,r[v],!0)}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,n,e){var r=e(65);t.exports=function(t,n){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(n);return+t}},function(t,n,e){"use strict";var r=e(29),o=e(69),i=e(20);t.exports=[].copyWithin||function(t,n){var e=r(this),u=i(e.length),c=o(t,u),a=o(n,u),f=arguments.length>2?arguments[2]:void 0,s=Math.min((void 0===f?u:o(f,u))-a,u-c),l=1;for(a<c&&c<a+s&&(l=-1,a+=s-1,c+=s-1);s-- >0;)a in e?e[c]=e[a]:delete e[c],c+=l,a+=l;return e}},function(t,n,e){var r=e(56),o=e(29),i=e(103),u=e(20);t.exports=function(t,n,e,c,a){r(n);var f=o(t),s=i(f),l=u(f.length),h=a?l-1:0,p=a?-1:1;if(e<2)for(;;){if(h in s){c=s[h],h+=p;break}if(h+=p,a?h<0:l<=h)throw TypeError("Reduce of empty array with no initial value")}for(;a?h>=0:l>h;h+=p)h in s&&(c=n(c,s[h],h,f));return c}},function(t,n,e){"use strict";var r=e(56),o=e(6),i=e(522),u=[].slice,c={},a=function(t,n,e){if(!(n in c)){for(var r=[],o=0;o<n;o++)r[o]="a["+o+"]";c[n]=Function("F,a","return new F("+r.join(",")+")")}return c[n](t,e)};t.exports=Function.bind||function(t){var n=r(this),e=u.call(arguments,1),c=function(){var r=e.concat(u.call(arguments));return this instanceof c?a(n,r.length,r):i(n,r,t)};return o(n.prototype)&&(c.prototype=n.prototype),c}},function(t,n,e){"use strict";var r=e(12).f,o=e(67),i=e(105),u=e(66),c=e(102),a=e(46),f=e(143),s=e(221),l=e(344),h=e(106),p=e(16),v=e(57).fastKey,d=p?"_s":"size",g=function(t,n){var e,r=v(n);if("F"!==r)return t._i[r];for(e=t._f;e;e=e.n)if(e.k==n)return e};t.exports={getConstructor:function(t,n,e,s){var l=t(function(t,r){c(t,l,n,"_i"),t._i=o(null),t._f=void 0,t._l=void 0,t[d]=0,void 0!=r&&f(r,e,t[s],t)});return i(l.prototype,{clear:function(){for(var t=this,n=t._i,e=t._f;e;e=e.n)e.r=!0,e.p&&(e.p=e.p.n=void 0),delete n[e.i];t._f=t._l=void 0,t[d]=0},delete:function(t){var n=this,e=g(n,t);if(e){var r=e.n,o=e.p;delete n._i[e.i],e.r=!0,o&&(o.n=r),r&&(r.p=o),n._f==e&&(n._f=r),n._l==e&&(n._l=o),n[d]--}return!!e},forEach:function(t){c(this,l,"forEach");for(var n,e=u(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(e(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!g(this,t)}}),p&&r(l.prototype,"size",{get:function(){return a(this[d])}}),l},def:function(t,n,e){var r,o,i=g(t,n);return i?i.v=e:(t._l=i={i:o=v(n,!0),k:n,v:e,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[d]++,"F"!==o&&(t._i[o]=i)),t},getEntry:g,setStrong:function(t,n,e){s(t,n,function(t,n){this._t=t,this._k=n,this._l=void 0},function(){for(var t=this,n=t._k,e=t._l;e&&e.r;)e=e.p;return t._t&&(t._l=e=e?e.n:t._t._f)?"keys"==n?l(0,e.k):"values"==n?l(0,e.v):l(0,[e.k,e.v]):(t._t=void 0,l(1))},e?"entries":"values",!e,!0),h(n)}}},function(t,n,e){"use strict";var r=e(105),o=e(57).getWeak,i=e(4),u=e(6),c=e(102),a=e(143),f=e(36),s=e(21),l=f(5),h=f(6),p=0,v=function(t){return t._l||(t._l=new d)},d=function(){this.a=[]},g=function(t,n){ return l(t.a,function(t){return t[0]===n})};d.prototype={get:function(t){var n=g(this,t);if(n)return n[1]},has:function(t){return!!g(this,t)},set:function(t,n){var e=g(this,t);e?e[1]=n:this.a.push([t,n])},delete:function(t){var n=h(this.a,function(n){return n[0]===t});return~n&&this.a.splice(n,1),!!~n}},t.exports={getConstructor:function(t,n,e,i){var f=t(function(t,r){c(t,f,n,"_i"),t._i=p++,t._l=void 0,void 0!=r&&a(r,e,t[i],t)});return r(f.prototype,{delete:function(t){if(!u(t))return!1;var n=o(t);return n===!0?v(this).delete(t):n&&s(n,this._i)&&delete n[this._i]},has:function(t){if(!u(t))return!1;var n=o(t);return n===!0?v(this).has(t):n&&s(n,this._i)}}),f},def:function(t,n,e){var r=o(i(n),!0);return r===!0?v(t).set(n,e):r[t._i]=e,t},ufstore:v}},function(t,n,e){"use strict";var r=e(12),o=e(58);t.exports=function(t,n,e){n in t?r.f(t,n,o(0,e)):t[n]=e}},function(t,n,e){var r=e(6),o=e(8).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n,e){t.exports=e(8).document&&document.documentElement},function(t,n,e){t.exports=!e(16)&&!e(5)(function(){return 7!=Object.defineProperty(e(338)("div"),"a",{get:function(){return 7}}).a})},function(t,n,e){var r=e(6),o=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&o(t)===t}},function(t,n,e){var r=e(4);t.exports=function(t,n,e,o){try{return o?n(r(e)[0],e[1]):n(e)}catch(n){var i=t.return;throw void 0!==i&&r(i.call(t)),n}}},function(t,n,e){"use strict";var r=e(67),o=e(58),i=e(107),u={};e(28)(u,e(11)("iterator"),function(){return this}),t.exports=function(t,n,e){t.prototype=r(u,{next:o(1,e)}),i(t,n+" Iterator")}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,n,e){"use strict";var r=e(84),o=e(144),i=e(145),u=e(29),c=e(103),a=Object.assign;t.exports=!a||e(5)(function(){var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach(function(t){n[t]=t}),7!=a({},t)[e]||Object.keys(a({},n)).join("")!=r})?function(t,n){for(var e=u(t),a=arguments.length,f=1,s=o.f,l=i.f;a>f;)for(var h,p=c(arguments[f++]),v=s?r(p).concat(s(p)):r(p),d=v.length,g=0;d>g;)l.call(p,h=v[g++])&&(e[h]=p[h]);return e}:a},function(t,n,e){var r=e(12),o=e(4),i=e(84);t.exports=e(16)?Object.defineProperties:function(t,n){o(t);for(var e,u=i(n),c=u.length,a=0;c>a;)r.f(t,e=u[a++],n[e]);return t}},function(t,n,e){var r=e(33),o=e(68).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return o(t)}catch(t){return u.slice()}};t.exports.f=function(t){return u&&"[object Window]"==i.call(t)?c(t):o(r(t))}},function(t,n,e){var r=e(21),o=e(33),i=e(212)(!1),u=e(226)("IE_PROTO");t.exports=function(t,n){var e,c=o(t),a=0,f=[];for(e in c)e!=u&&r(c,e)&&f.push(e);for(;n.length>a;)r(c,e=n[a++])&&(~i(f,e)||f.push(e));return f}},function(t,n,e){var r=e(8).parseFloat,o=e(147).trim;t.exports=1/r(e(228)+"-0")!==-(1/0)?function(t){var n=o(String(t),3),e=r(n);return 0===e&&"-"==n.charAt(0)?-0:e}:r},function(t,n,e){var r=e(8).parseInt,o=e(147).trim,i=e(228),u=/^[\-+]?0[xX]/;t.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(t,n){var e=o(String(t),3);return r(e,n>>>0||(u.test(e)?16:10))}:r},function(t,n){t.exports=Object.is||function(t,n){return t===n?0!==t||1/t===1/n:t!=t&&n!=n}},function(t,n,e){var r=e(4),o=e(56),i=e(11)("species");t.exports=function(t,n){var e,u=r(t).constructor;return void 0===u||void 0==(e=r(u)[i])?n:o(e)}},function(t,n,e){var r=e(59),o=e(46);t.exports=function(t){return function(n,e){var i,u,c=String(o(n)),a=r(e),f=c.length;return a<0||a>=f?t?"":void 0:(i=c.charCodeAt(a),i<55296||i>56319||a+1===f||(u=c.charCodeAt(a+1))<56320||u>57343?t?c.charAt(a):i:t?c.slice(a,a+2):(i-55296<<10)+(u-56320)+65536)}}},function(t,n,e){"use strict";var r=e(59),o=e(46);t.exports=function(t){var n=String(o(this)),e="",i=r(t);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(n+=n))1&i&&(e+=n);return e}},function(t,n,e){n.f=e(11)},function(t,n,e){"use strict";var r=e(335);t.exports=e(141)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var n=r.getEntry(this,t);return n&&n.v},set:function(t,n){return r.def(this,0===t?0:t,n)}},r,!0)},function(t,n,e){e(16)&&"g"!=/./g.flags&&e(12).f(RegExp.prototype,"flags",{configurable:!0,get:e(216)})},function(t,n,e){e(142)("match",1,function(t,n,e){return[function(e){"use strict";var r=t(this),o=void 0==e?void 0:e[n];return void 0!==o?o.call(e,r):new RegExp(e)[n](String(r))},e]})},function(t,n,e){e(142)("replace",2,function(t,n,e){return[function(r,o){"use strict";var i=t(this),u=void 0==r?void 0:r[n];return void 0!==u?u.call(r,i,o):e.call(String(i),r,o)},e]})},function(t,n,e){e(142)("search",1,function(t,n,e){return[function(e){"use strict";var r=t(this),o=void 0==e?void 0:e[n];return void 0!==o?o.call(e,r):new RegExp(e)[n](String(r))},e]})},function(t,n,e){e(142)("split",2,function(t,n,r){"use strict";var o=e(220),i=r,u=[].push,c="split",a="length",f="lastIndex";if("c"=="abbc"[c](/(b)*/)[1]||4!="test"[c](/(?:)/,-1)[a]||2!="ab"[c](/(?:ab)*/)[a]||4!="."[c](/(.?)(.?)/)[a]||"."[c](/()()/)[a]>1||""[c](/.?/)[a]){var s=void 0===/()??/.exec("")[1];r=function(t,n){var e=String(this);if(void 0===t&&0===n)return[];if(!o(t))return i.call(e,t,n);var r,c,l,h,p,v=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),g=0,y=void 0===n?4294967295:n>>>0,b=new RegExp(t.source,d+"g");for(s||(r=new RegExp("^"+b.source+"$(?!\\s)",d));(c=b.exec(e))&&(l=c.index+c[0][a],!(l>g&&(v.push(e.slice(g,c.index)),!s&&c[a]>1&&c[0].replace(r,function(){for(p=1;p<arguments[a]-2;p++)void 0===arguments[p]&&(c[p]=void 0)}),c[a]>1&&c.index<e[a]&&u.apply(v,c.slice(1)),h=c[0][a],g=l,v[a]>=y)));)b[f]===c.index&&b[f]++;return g===e[a]?!h&&b.test("")||v.push(""):v.push(e.slice(g)),v[a]>y?v.slice(0,y):v}}else"0"[c](void 0,0)[a]&&(r=function(t,n){return void 0===t&&0===n?[]:i.call(this,t,n)});return[function(e,o){var i=t(this),u=void 0==e?void 0:e[n];return void 0!==u?u.call(e,i,o):r.call(String(i),e,o)},r]})},function(t,n,e){"use strict";var r=e(335);t.exports=e(141)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(this,t=0===t?0:t,t)}},r)},function(t,n,e){"use strict";var r=e(8),o=e(21),i=e(16),u=e(1),c=e(24),a=e(57).KEY,f=e(5),s=e(146),l=e(107),h=e(70),p=e(11),v=e(356),d=e(525),g=e(523),y=e(521),b=e(219),_=e(4),m=e(33),w=e(60),k=e(58),S=e(67),x=e(348),T=e(48),E=e(12),P=e(84),O=T.f,F=E.f,M=x.f,j=r.Symbol,A=r.JSON,D=A&&A.stringify,I="prototype",R=p("_hidden"),N=p("toPrimitive"),Z={}.propertyIsEnumerable,C=s("symbol-registry"),L=s("symbols"),z=s("op-symbols"),W=Object[I],q="function"==typeof j,U=r.QObject,B=!U||!U[I]||!U[I].findChild,H=i&&f(function(){return 7!=S(F({},"a",{get:function(){return F(this,"a",{value:7}).a}})).a})?function(t,n,e){var r=O(W,n);r&&delete W[n],F(t,n,e),r&&t!==W&&F(W,n,r)}:F,V=function(t){var n=L[t]=S(j[I]);return n._k=t,n},G=q&&"symbol"==typeof j.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof j},X=function(t,n,e){return t===W&&X(z,n,e),_(t),n=w(n,!0),_(e),o(L,n)?(e.enumerable?(o(t,R)&&t[R][n]&&(t[R][n]=!1),e=S(e,{enumerable:k(0,!1)})):(o(t,R)||F(t,R,k(1,{})),t[R][n]=!0),H(t,n,e)):F(t,n,e)},K=function(t,n){_(t);for(var e,r=y(n=m(n)),o=0,i=r.length;i>o;)X(t,e=r[o++],n[e]);return t},J=function(t,n){return void 0===n?S(t):K(S(t),n)},Y=function(t){var n=Z.call(this,t=w(t,!0));return!(this===W&&o(L,t)&&!o(z,t))&&(!(n||!o(this,t)||!o(L,t)||o(this,R)&&this[R][t])||n)},Q=function(t,n){if(t=m(t),n=w(n,!0),t!==W||!o(L,n)||o(z,n)){var e=O(t,n);return!e||!o(L,n)||o(t,R)&&t[R][n]||(e.enumerable=!0),e}},$=function(t){for(var n,e=M(m(t)),r=[],i=0;e.length>i;)o(L,n=e[i++])||n==R||n==a||r.push(n);return r},tt=function(t){for(var n,e=t===W,r=M(e?z:m(t)),i=[],u=0;r.length>u;)!o(L,n=r[u++])||e&&!o(W,n)||i.push(L[n]);return i};q||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),n=function(e){this===W&&n.call(z,e),o(this,R)&&o(this[R],t)&&(this[R][t]=!1),H(this,t,k(1,e))};return i&&B&&H(W,t,{configurable:!0,set:n}),V(t)},c(j[I],"toString",function(){return this._k}),T.f=Q,E.f=X,e(68).f=x.f=$,e(145).f=Y,e(144).f=tt,i&&!e(104)&&c(W,"propertyIsEnumerable",Y,!0),v.f=function(t){return V(p(t))}),u(u.G+u.W+u.F*!q,{Symbol:j});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;nt.length>et;)p(nt[et++]);for(var nt=P(p.store),et=0;nt.length>et;)d(nt[et++]);u(u.S+u.F*!q,"Symbol",{for:function(t){return o(C,t+="")?C[t]:C[t]=j(t)},keyFor:function(t){if(G(t))return g(C,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){B=!0},useSimple:function(){B=!1}}),u(u.S+u.F*!q,"Object",{create:J,defineProperty:X,defineProperties:K,getOwnPropertyDescriptor:Q,getOwnPropertyNames:$,getOwnPropertySymbols:tt}),A&&u(u.S+u.F*(!q||f(function(){var t=j();return"[null]"!=D([t])||"{}"!=D({a:t})||"{}"!=D(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!G(t)){for(var n,e,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);return n=r[1],"function"==typeof n&&(e=n),!e&&b(n)||(n=function(t,n){if(e&&(n=e.call(this,t,n)),!G(n))return n}),r[1]=n,D.apply(A,r)}}}),j[I][N]||e(28)(j[I],N,j[I].valueOf),l(j,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,n,e){"use strict";var r,o=e(36)(0),i=e(24),u=e(57),c=e(346),a=e(336),f=e(6),s=u.getWeak,l=Object.isExtensible,h=a.ufstore,p={},v=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},d={get:function(t){if(f(t)){var n=s(t);return n===!0?h(this).get(t):n?n[this._i]:void 0}},set:function(t,n){return a.def(this,t,n)}},g=t.exports=e(141)("WeakMap",v,d,a,!0,!0);7!=(new g).set((Object.freeze||Object)(p),7).get(p)&&(r=a.getConstructor(v),c(r.prototype,d),u.NEED=!0,o(["delete","has","get","set"],function(t){var n=g.prototype,e=n[t];i(n,t,function(n,o){if(f(n)&&!l(n)){this._f||(this._f=new r);var i=this._f[t](n,o);return"set"==t?this:i}return e.call(this,n,o)})}))},,,,,,,,,,,,,,,,function(t,n,e){e(150),e(535),e(533),e(539),e(536),e(542),e(544),e(532),e(538),e(529),e(543),e(527),e(541),e(540),e(534),e(537),e(526),e(528),e(531),e(530),e(545),e(149),t.exports=e(10).Array},function(t,n,e){e(546),e(548),e(547),e(550),e(549),t.exports=Date},function(t,n,e){e(551),e(553),e(552),t.exports=e(10).Function},function(t,n,e){e(71),e(150),e(231),e(357),t.exports=e(10).Map},function(t,n,e){e(554),e(555),e(556),e(557),e(558),e(559),e(560),e(561),e(562),e(563),e(564),e(565),e(566),e(567),e(568),e(569),e(570),t.exports=e(10).Math},function(t,n,e){e(571),e(581),e(582),e(572),e(573),e(574),e(575),e(576),e(577),e(578),e(579),e(580),t.exports=e(10).Number},function(t,n,e){e(364),e(584),e(586),e(585),e(588),e(590),e(595),e(589),e(587),e(597),e(596),e(592),e(593),e(591),e(583),e(594),e(598),e(71),t.exports=e(10).Object},function(t,n,e){e(599),t.exports=e(10).parseFloat},function(t,n,e){e(600),t.exports=e(10).parseInt},function(t,n,e){e(601),e(602),e(603),e(604),e(605),e(608),e(606),e(607),e(609),e(610),e(611),e(612),e(614),e(613),t.exports=e(10).Reflect},function(t,n,e){e(615),e(616),e(358),e(359),e(360),e(361),e(362),t.exports=e(10).RegExp},function(t,n,e){e(71),e(150),e(231),e(363),t.exports=e(10).Set},function(t,n,e){e(626),e(630),e(637),e(150),e(621),e(622),e(627),e(631),e(633),e(617),e(618),e(619),e(620),e(623),e(624),e(625),e(628),e(629),e(632),e(634),e(635),e(636),e(359),e(360),e(361),e(362),t.exports=e(10).String},function(t,n,e){e(364),e(71),t.exports=e(10).Symbol},function(t,n,e){e(638),e(639),e(644),e(647),e(648),e(642),e(645),e(643),e(646),e(640),e(641),e(71),t.exports=e(10)},function(t,n,e){e(71),e(149),e(365),t.exports=e(10).WeakMap},function(t,n,e){e(71),e(231),e(649),t.exports=e(10).WeakSet},function(t,n,e){e(650),e(651),e(653),e(652),e(655),e(654),e(656),e(657),e(658),t.exports=e(10).Reflect},,,function(t,n,e){(function(t){function __assignFn(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}function __extendsFn(t,n){function __(){this.constructor=t}for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);t.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}function __decorateFn(t,n,e,r){var o,i=arguments.length,u=i<3?n:null===r?r=Object.getOwnPropertyDescriptor(n,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,n,e,r);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(u=(i<3?o(u):i>3?o(n,e,u):o(n,e))||u);return i>3&&u&&Object.defineProperty(n,e,u),u}function __metadataFn(t,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)}function __paramFn(t,n){return function(e,r){n(e,r,t)}}function __awaiterFn(t,n,e,r){return new(e||(e=Promise))(function(o,i){function fulfilled(t){try{step(r.next(t))}catch(t){i(t)}}function rejected(t){try{step(r.throw(t))}catch(t){i(t)}}function step(t){t.done?o(t.value):new e(function(n){n(t.value)}).then(fulfilled,rejected)}step((r=r.apply(t,n)).next())})}!function(t){t.__assign=t&&t.__assign||Object.assign||__assignFn,t.__extends=t&&t.__extends||__extendsFn,t.__decorate=t&&t.__decorate||__decorateFn,t.__metadata=t&&t.__metadata||__metadataFn,t.__param=t&&t.__param||__paramFn,t.__awaiter=t&&t.__awaiter||__awaiterFn}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:"undefined"!=typeof t?t:Function("return this;")())}).call(n,e(39))},function(t,n,e){(function(t){!function(t,n){n()}(this,function(){"use strict";function bindArguments(t,n){for(var e=t.length-1;e>=0;e--)"function"==typeof t[e]&&(t[e]=Zone.current.wrap(t[e],n+"_"+e));return t}function patchPrototype(t,n){for(var e=t.constructor.name,r=function(r){var o=n[r],i=t[o];i&&(t[o]=function(t){return function(){return t.apply(this,bindArguments(arguments,e+"."+o))}}(i))},o=0;o<n.length;o++)r(o)}function patchProperty(t,n){var e=Object.getOwnPropertyDescriptor(t,n)||{enumerable:!0,configurable:!0};delete e.writable,delete e.value;var r=n.substr(2),o="_"+n;e.set=function(t){if(this[o]&&this.removeEventListener(r,this[o]),"function"==typeof t){var n=function(n){var e;e=t.apply(this,arguments),void 0==e||e||n.preventDefault()};this[o]=n,this.addEventListener(r,n,!1)}else this[o]=null},e.get=function(){return this[o]||null},Object.defineProperty(t,n,e)}function patchOnProperties(t,n){var e=[];for(var r in t)"on"==r.substr(0,2)&&e.push(r);for(var o=0;o<e.length;o++)patchProperty(t,e[o]);if(n)for(var i=0;i<n.length;i++)patchProperty(t,"on"+n[i])}function findExistingRegisteredTask(t,n,e,r,o){var i=t[u];if(i)for(var c=0;c<i.length;c++){var a=i[c],f=a.data;if(f.handler===n&&f.useCapturing===r&&f.eventName===e)return o&&i.splice(c,1),a}return null}function attachRegisteredEvent(t,n){var e=t[u];e||(e=t[u]=[]),e.push(n)}function makeZoneAwareAddListener(t,r,o,i){function scheduleEventListener(t){var n=t.data;return attachRegisteredEvent(n.target,t),n.target[u](n.eventName,t.invoke,n.useCapturing)}function cancelEventListener(t){var n=t.data;findExistingRegisteredTask(n.target,t.invoke,n.eventName,n.useCapturing,!0),n.target[c](n.eventName,t.invoke,n.useCapturing)}void 0===o&&(o=!0),void 0===i&&(i=!1);var u=n(t),c=n(r),a=!o&&void 0;return function(n,r){var o=r[0],c=r[1],f=r[2]||a,s=n||e,l=null;"function"==typeof c?l=c:c&&c.handleEvent&&(l=function(t){return c.handleEvent(t)});var h=!1;try{h=c&&"[object FunctionWrapper]"===c.toString()}catch(t){return}if(!l||h)return s[u](o,c,f);if(!i){var p=findExistingRegisteredTask(s,c,o,f,!1);if(p)return s[u](o,p.invoke,f)}var v=Zone.current,d=s.constructor.name+"."+t+":"+o,g={target:s,eventName:o,name:o,useCapturing:f,handler:c};v.scheduleEventTask(d,l,g,scheduleEventListener,cancelEventListener)}}function makeZoneAwareRemoveListener(t,r){void 0===r&&(r=!0);var o=n(t),i=!r&&void 0;return function(t,n){var r=n[0],u=n[1],c=n[2]||i,a=t||e,f=findExistingRegisteredTask(a,u,r,c,!0);f?f.zone.cancelTask(f):a[o](r,u,c)}}function patchEventTargetMethods(t){return!(!t||!t.addEventListener)&&(patchMethod(t,c,function(){return f}),patchMethod(t,a,function(){return s}),!0)}function patchClass(t){var n=e[t];if(n){e[t]=function(){var e=bindArguments(arguments,t);switch(e.length){case 0:this[l]=new n;break;case 1:this[l]=new n(e[0]);break;case 2:this[l]=new n(e[0],e[1]);break;case 3:this[l]=new n(e[0],e[1],e[2]);break;case 4:this[l]=new n(e[0],e[1],e[2],e[3]);break;default:throw new Error("Arg list too long.")}};var r,o=new n(function(){});for(r in o)"XMLHttpRequest"===t&&"responseBlob"===r||!function(n){"function"==typeof o[n]?e[t].prototype[n]=function(){return this[l][n].apply(this[l],arguments)}:Object.defineProperty(e[t].prototype,n,{set:function(e){"function"==typeof e?this[l][n]=Zone.current.wrap(e,t+"."+n):this[l][n]=e},get:function(){return this[l][n]}})}(r);for(r in n)"prototype"!==r&&n.hasOwnProperty(r)&&(e[t][r]=n[r])}}function createNamedFn(t,n){try{return Function("f","return function "+t+"(){return f(this, arguments)}")(n)}catch(t){return function(){return n(this,arguments)}}}function patchMethod(t,e,r){for(var o=t;o&&Object.getOwnPropertyNames(o).indexOf(e)===-1;)o=Object.getPrototypeOf(o);!o&&t[e]&&(o=t);var i,u=n(e);return o&&!(i=o[u])&&(i=o[u]=o[e],o[e]=createNamedFn(e,r(i,u,e))),i}function patchTimer(t,n,e,r){function scheduleTask(n){var e=n.data;return e.args[0]=function(){n.invoke.apply(this,arguments),delete u[e.handleId]},e.handleId=o.apply(t,e.args),u[e.handleId]=n,n}function clearTask(t){return delete u[t.data.handleId],i(t.data.handleId)}var o=null,i=null;n+=r,e+=r;var u={};o=patchMethod(t,n,function(e){return function(o,i){if("function"==typeof i[0]){var u=Zone.current,c={handleId:null,isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?i[1]||0:null,args:i},a=u.scheduleMacroTask(n,i[0],c,scheduleTask,clearTask);if(!a)return a;var f=a.data.handleId;return f.ref&&f.unref&&(a.ref=f.ref.bind(f),a.unref=f.unref.bind(f)),a}return e.apply(t,i)}}),i=patchMethod(t,e,function(n){return function(e,r){var o="number"==typeof r[0]?u[r[0]]:r[0];o&&"string"==typeof o.type?(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&o.zone.cancelTask(o):n.apply(t,r)}})}function propertyPatch(){Object.defineProperty=function(t,n,e){if(isUnconfigurable(t,n))throw new TypeError("Cannot assign to read only property '"+n+"' of "+t);var r=e.configurable;return"prototype"!==n&&(e=rewriteDescriptor(t,n,e)),_tryDefineProperty(t,n,e,r)},Object.defineProperties=function(t,n){return Object.keys(n).forEach(function(e){Object.defineProperty(t,e,n[e])}),t},Object.create=function(t,n){return"object"!=typeof n||Object.isFrozen(n)||Object.keys(n).forEach(function(e){n[e]=rewriteDescriptor(t,e,n[e])}),v(t,n)},Object.getOwnPropertyDescriptor=function(t,n){var e=p(t,n);return isUnconfigurable(t,n)&&(e.configurable=!1),e}}function _redefineProperty(t,n,e){var r=e.configurable;return e=rewriteDescriptor(t,n,e),_tryDefineProperty(t,n,e,r)}function isUnconfigurable(t,n){return t&&t[d]&&t[d][n]}function rewriteDescriptor(t,n,e){return e.configurable=!0,e.configurable||(t[d]||h(t,d,{writable:!0,value:{}}),t[d][n]=!0),e}function _tryDefineProperty(t,n,e,r){try{return h(t,n,e)}catch(i){if(!e.configurable)throw i;"undefined"==typeof r?delete e.configurable:e.configurable=r;try{return h(t,n,e)}catch(r){var o=null;try{o=JSON.stringify(e)}catch(t){o=o.toString()}console.log("Attempting to configure '"+n+"' with descriptor '"+o+"' on object '"+t+"' and got error, giving up: "+r)}}}function eventTargetPatch(t){var n=[],e=t.wtf;e?n=g.split(",").map(function(t){return"HTML"+t+"Element"}).concat(y):t[b]?n.push(b):n=y;for(var r=0;r<n.length;r++){var o=t[n[r]];patchEventTargetMethods(o&&o.prototype)}}function apply(t){var n=t.WebSocket;t.EventTarget||patchEventTargetMethods(n.prototype),t.WebSocket=function(t,e){var r,o=arguments.length>1?new n(t,e):new n(t),i=Object.getOwnPropertyDescriptor(o,"onmessage");return i&&i.configurable===!1?(r=Object.create(o),["addEventListener","removeEventListener","send","close"].forEach(function(t){r[t]=function(){return o[t].apply(o,arguments)}})):r=o,patchOnProperties(r,["close","error","message","open"]),r};for(var e in n)t.WebSocket[e]=n[e]}function propertyDescriptorPatch(t){if(!o){var n="undefined"!=typeof WebSocket;canPatchViaPropertyDescriptor()?(i&&patchOnProperties(HTMLElement.prototype,_),patchOnProperties(XMLHttpRequest.prototype,null),"undefined"!=typeof IDBIndex&&(patchOnProperties(IDBIndex.prototype,null),patchOnProperties(IDBRequest.prototype,null),patchOnProperties(IDBOpenDBRequest.prototype,null),patchOnProperties(IDBDatabase.prototype,null),patchOnProperties(IDBTransaction.prototype,null),patchOnProperties(IDBCursor.prototype,null)),n&&patchOnProperties(WebSocket.prototype,null)):(patchViaCapturingAllTheEvents(),patchClass("XMLHttpRequest"),n&&apply(t))}}function canPatchViaPropertyDescriptor(){if(i&&!Object.getOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var t=Object.getOwnPropertyDescriptor(Element.prototype,"onclick");if(t&&!t.configurable)return!1}Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",{get:function(){return!0}});var n=new XMLHttpRequest,e=!!n.onreadystatechange;return Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",{}),e}function patchViaCapturingAllTheEvents(){for(var t=function(t){var n=_[t],e="on"+n;self.addEventListener(n,function(t){var n,r,o=t.target;for(r=o?o.constructor.name+"."+e:"unknown."+e;o;)o[e]&&!o[e][m]&&(n=Zone.current.wrap(o[e],r),n[m]=o[e],o[e]=n),o=o.parentElement},!0)},n=0;n<_.length;n++)t(n)}function registerElementPatch(t){if(i&&"registerElement"in t.document){var n=document.registerElement,e=["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"];document.registerElement=function(t,r){return r&&r.prototype&&e.forEach(function(t){var n="Document.registerElement::"+t;if(r.prototype.hasOwnProperty(t)){var e=Object.getOwnPropertyDescriptor(r.prototype,t);e&&e.value?(e.value=Zone.current.wrap(e.value,n),_redefineProperty(r.prototype,t,e)):r.prototype[t]=Zone.current.wrap(r.prototype[t],n)}else r.prototype[t]&&(r.prototype[t]=Zone.current.wrap(r.prototype[t],n))}),n.apply(document,[t,r])}}}function patchXHR(t){function findPendingTask(t){var n=t[P];return n}function scheduleTask(t){var n=t.data;n.target.addEventListener("readystatechange",function(){n.target.readyState===n.target.DONE&&(n.aborted||t.invoke())});var r=n.target[P];return r||(n.target[P]=t),e.apply(n.target,n.args),t}function placeholderCallback(){}function clearTask(t){var n=t.data;return n.aborted=!0,r.apply(n.target,n.args)}var n=patchMethod(t.XMLHttpRequest.prototype,"open",function(){return function(t,e){return t[O]=0==e[2],n.apply(t,e)}}),e=patchMethod(t.XMLHttpRequest.prototype,"send",function(){return function(t,n){var r=Zone.current;if(t[O])return e.apply(t,n);var o={target:t,isPeriodic:!1,delay:null,args:n,aborted:!1};return r.scheduleMacroTask("XMLHttpRequest.send",placeholderCallback,o,scheduleTask,clearTask)}}),r=patchMethod(t.XMLHttpRequest.prototype,"abort",function(t){return function(t,n){var e=findPendingTask(t);if(e&&"string"==typeof e.type){if(null==e.cancelFn)return;e.zone.cancelTask(e)}}})}var n=(function(t){function __symbol__(t){return"__zone_symbol__"+t}function scheduleQueueDrain(){0==h&&0==f.length&&(t[i]?t[i].resolve(0)[u](drainMicroTaskQueue):t[o](drainMicroTaskQueue,0))}function scheduleMicroTask(t){scheduleQueueDrain(),f.push(t)}function consoleError(t){var n=t&&t.rejection;n&&console.error("Unhandled Promise rejection:",n instanceof Error?n.message:n,"; Zone:",t.zone.name,"; Task:",t.task&&t.task.source,"; Value:",n,n instanceof Error?n.stack:void 0),console.error(t)}function drainMicroTaskQueue(){if(!s){for(s=!0;f.length;){var t=f;f=[];for(var n=0;n<t.length;n++){var e=t[n];try{e.zone.runTask(e,null,null)}catch(t){consoleError(t)}}}for(;l.length;)for(var r=function(){var t=l.shift();try{t.zone.runGuarded(function(){throw t})}catch(t){consoleError(t)}};l.length;)r();s=!1}}function isThenable(t){return t&&t.then}function forwardResolution(t){return t}function forwardRejection(t){return m.reject(t)}function makeResolver(t,n){return function(e){resolvePromise(t,n,e)}}function resolvePromise(t,e,r){if(t[p]===g)if(r instanceof m&&r[p]!==g)clearRejectedNoCatch(r),resolvePromise(t,r[p],r[v]);else if(isThenable(r))r.then(makeResolver(t,e),makeResolver(t,!1));else{t[p]=e;var o=t[v];t[v]=r;for(var i=0;i<o.length;)scheduleResolveOrReject(t,o[i++],o[i++],o[i++],o[i++]);if(0==o.length&&e==b){t[p]=_;try{throw new Error("Uncaught (in promise): "+r+(r&&r.stack?"\n"+r.stack:""))}catch(e){var u=e;u.rejection=r,u.promise=t,u.zone=n.current,u.task=n.currentTask,l.push(u),scheduleQueueDrain()}}}return t}function clearRejectedNoCatch(t){if(t[p]===_){t[p]=b;for(var n=0;n<l.length;n++)if(t===l[n].promise){l.splice(n,1);break}}}function scheduleResolveOrReject(t,n,e,r,o){clearRejectedNoCatch(t);var i=t[p]?r||forwardResolution:o||forwardRejection;n.scheduleMicroTask(d,function(){try{resolvePromise(e,!0,n.run(i,null,[t[v]]))}catch(t){resolvePromise(e,!1,t)}})}function patchThen(t){var n=t.prototype,e=n[__symbol__("then")]=n.then;n.then=function(t,n){var r=this;return new m(function(t,n){e.call(r,t,n)}).then(t,n)}}if(t.Zone)throw new Error("Zone already loaded.");var n=function(){function Zone(t,n){this._properties=null,this._parent=t,this._name=n?n.name||"unnamed":"<root>",this._properties=n&&n.properties||{},this._zoneDelegate=new e(this,this._parent&&this._parent._zoneDelegate,n)}return Zone.assertZonePatched=function(){if(t.Promise!==m)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(Zone,"current",{get:function(){return c},enumerable:!0,configurable:!0}),Object.defineProperty(Zone,"currentTask",{get:function(){return a},enumerable:!0,configurable:!0}),Object.defineProperty(Zone.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(Zone.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Zone.prototype.get=function(t){var n=this.getZoneWith(t);if(n)return n._properties[t]},Zone.prototype.getZoneWith=function(t){for(var n=this;n;){if(n._properties.hasOwnProperty(t))return n;n=n._parent}return null},Zone.prototype.fork=function(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)},Zone.prototype.wrap=function(t,n){if("function"!=typeof t)throw new Error("Expecting function got: "+t);var e=this._zoneDelegate.intercept(this,t,n),r=this;return function(){return r.runGuarded(e,this,arguments,n)}},Zone.prototype.run=function(t,n,e,r){void 0===n&&(n=null),void 0===e&&(e=null),void 0===r&&(r=null);var o=c;c=this;try{return this._zoneDelegate.invoke(this,t,n,e,r)}finally{c=o}},Zone.prototype.runGuarded=function(t,n,e,r){void 0===n&&(n=null),void 0===e&&(e=null),void 0===r&&(r=null);var o=c;c=this;try{try{return this._zoneDelegate.invoke(this,t,n,e,r)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{c=o}},Zone.prototype.runTask=function(t,n,e){if(t.runCount++,t.zone!=this)throw new Error("A task can only be run in the zone which created it! (Creation: "+t.zone.name+"; Execution: "+this.name+")");var r=a;a=t;var o=c;c=this;try{"macroTask"==t.type&&t.data&&!t.data.isPeriodic&&(t.cancelFn=null);try{return this._zoneDelegate.invokeTask(this,t,n,e)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{c=o,a=r}},Zone.prototype.scheduleMicroTask=function(t,n,e,o){return this._zoneDelegate.scheduleTask(this,new r("microTask",this,t,n,e,o,null))},Zone.prototype.scheduleMacroTask=function(t,n,e,o,i){return this._zoneDelegate.scheduleTask(this,new r("macroTask",this,t,n,e,o,i))},Zone.prototype.scheduleEventTask=function(t,n,e,o,i){return this._zoneDelegate.scheduleTask(this,new r("eventTask",this,t,n,e,o,i))},Zone.prototype.cancelTask=function(t){var n=this._zoneDelegate.cancelTask(this,t);return t.runCount=-1,t.cancelFn=null,n},Zone.__symbol__=__symbol__,Zone}(),e=function(){function ZoneDelegate(t,n,e){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=t,this._parentDelegate=n,this._forkZS=e&&(e&&e.onFork?e:n._forkZS),this._forkDlgt=e&&(e.onFork?n:n._forkDlgt),this._interceptZS=e&&(e.onIntercept?e:n._interceptZS),this._interceptDlgt=e&&(e.onIntercept?n:n._interceptDlgt),this._invokeZS=e&&(e.onInvoke?e:n._invokeZS),this._invokeDlgt=e&&(e.onInvoke?n:n._invokeDlgt),this._handleErrorZS=e&&(e.onHandleError?e:n._handleErrorZS),this._handleErrorDlgt=e&&(e.onHandleError?n:n._handleErrorDlgt),this._scheduleTaskZS=e&&(e.onScheduleTask?e:n._scheduleTaskZS),this._scheduleTaskDlgt=e&&(e.onScheduleTask?n:n._scheduleTaskDlgt),this._invokeTaskZS=e&&(e.onInvokeTask?e:n._invokeTaskZS),this._invokeTaskDlgt=e&&(e.onInvokeTask?n:n._invokeTaskDlgt),this._cancelTaskZS=e&&(e.onCancelTask?e:n._cancelTaskZS),this._cancelTaskDlgt=e&&(e.onCancelTask?n:n._cancelTaskDlgt),this._hasTaskZS=e&&(e.onHasTask?e:n._hasTaskZS),this._hasTaskDlgt=e&&(e.onHasTask?n:n._hasTaskDlgt)}return ZoneDelegate.prototype.fork=function(t,e){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,t,e):new n(t,e)},ZoneDelegate.prototype.intercept=function(t,n,e){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this.zone,t,n,e):n},ZoneDelegate.prototype.invoke=function(t,n,e,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this.zone,t,n,e,r,o):n.apply(e,r)},ZoneDelegate.prototype.handleError=function(t,n){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this.zone,t,n)},ZoneDelegate.prototype.scheduleTask=function(t,n){try{if(this._scheduleTaskZS)return this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this.zone,t,n);if(n.scheduleFn)n.scheduleFn(n);else{if("microTask"!=n.type)throw new Error("Task is missing scheduleFn.");scheduleMicroTask(n)}return n}finally{t==this.zone&&this._updateTaskCount(n.type,1)}},ZoneDelegate.prototype.invokeTask=function(t,n,e,r){try{return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this.zone,t,n,e,r):n.callback.apply(e,r)}finally{t!=this.zone||"eventTask"==n.type||n.data&&n.data.isPeriodic||this._updateTaskCount(n.type,-1)}},ZoneDelegate.prototype.cancelTask=function(t,n){var e;if(this._cancelTaskZS)e=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this.zone,t,n);else{if(!n.cancelFn)throw new Error("Task does not support cancellation, or is already canceled.");e=n.cancelFn(n)}return t==this.zone&&this._updateTaskCount(n.type,-1),e},ZoneDelegate.prototype.hasTask=function(t,n){return this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this.zone,t,n)},ZoneDelegate.prototype._updateTaskCount=function(t,n){var e=this._taskCounts,r=e[t],o=e[t]=r+n;if(o<0)throw new Error("More tasks executed then were scheduled.");if(0==r||0==o){var i={microTask:e.microTask>0,macroTask:e.macroTask>0,eventTask:e.eventTask>0,change:t};try{this.hasTask(this.zone,i)}finally{this._parentDelegate&&this._parentDelegate._updateTaskCount(t,n)}}},ZoneDelegate}(),r=function(){function ZoneTask(t,n,e,r,o,i,u){this.runCount=0,this.type=t,this.zone=n,this.source=e,this.data=o,this.scheduleFn=i,this.cancelFn=u,this.callback=r;var c=this;this.invoke=function(){h++;try{return n.runTask(c,this,arguments)}finally{1==h&&drainMicroTaskQueue(),h--}}}return ZoneTask.prototype.toString=function(){return this.data&&"undefined"!=typeof this.data.handleId?this.data.handleId:Object.prototype.toString.call(this); },ZoneTask}(),o=__symbol__("setTimeout"),i=__symbol__("Promise"),u=__symbol__("then"),c=new n(null,null),a=null,f=[],s=!1,l=[],h=0,p=__symbol__("state"),v=__symbol__("value"),d="Promise.then",g=null,y=!0,b=!1,_=0,m=function(){function ZoneAwarePromise(t){var n=this;if(!(n instanceof ZoneAwarePromise))throw new Error("Must be an instanceof Promise.");n[p]=g,n[v]=[];try{t&&t(makeResolver(n,y),makeResolver(n,b))}catch(t){resolvePromise(n,!1,t)}}return ZoneAwarePromise.resolve=function(t){return resolvePromise(new this(null),y,t)},ZoneAwarePromise.reject=function(t){return resolvePromise(new this(null),b,t)},ZoneAwarePromise.race=function(t){function onResolve(t){r&&(r=n(t))}function onReject(t){r&&(r=e(t))}for(var n,e,r=new this(function(t,r){o=[t,r],n=o[0],e=o[1];var o}),o=0,i=t;o<i.length;o++){var u=i[o];isThenable(u)||(u=this.resolve(u)),u.then(onResolve,onReject)}return r},ZoneAwarePromise.all=function(t){for(var n,e,r=new this(function(t,r){n=t,e=r}),o=0,i=[],u=0,c=t;u<c.length;u++){var a=c[u];isThenable(a)||(a=this.resolve(a)),a.then(function(t){return function(e){i[t]=e,o--,o||n(i)}}(o),e),o++}return o||n(i),r},ZoneAwarePromise.prototype.then=function(t,e){var r=new this.constructor(null),o=n.current;return this[p]==g?this[v].push(o,r,t,e):scheduleResolveOrReject(this,o,r,t,e),r},ZoneAwarePromise.prototype.catch=function(t){return this.then(null,t)},ZoneAwarePromise}();m.resolve=m.resolve,m.reject=m.reject,m.race=m.race,m.all=m.all;var w=t[__symbol__("Promise")]=t.Promise;if(t.Promise=m,w&&(patchThen(w),"undefined"!=typeof t.fetch)){var k=void 0;try{k=t.fetch()}catch(n){k=t.fetch("about:blank")}k.then(function(){return null},function(){return null}),k.constructor!=w&&k.constructor!=m&&patchThen(k.constructor)}return Promise[n.__symbol__("uncaughtPromiseErrors")]=l,t.Zone=n}("object"==typeof window&&window||"object"==typeof self&&self||t),Zone.__symbol__),e="object"==typeof window&&window||"object"==typeof self&&self||t,r="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,o="undefined"!=typeof process&&"[object process]"==={}.toString.call(process),i=!o&&!r&&!("undefined"==typeof window||!window.HTMLElement),u=n("eventTasks"),c="addEventListener",a="removeEventListener",f=makeZoneAwareAddListener(c,a),s=makeZoneAwareRemoveListener(a),l=n("originalInstance"),h=Object[n("defineProperty")]=Object.defineProperty,p=Object[n("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,v=Object.create,d=n("unconfigurables"),g="Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video",y="ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex".split(","),b="EventTarget",_="copy cut paste abort blur focus canplay canplaythrough change click contextmenu dblclick drag dragend dragenter dragleave dragover dragstart drop durationchange emptied ended input invalid keydown keypress keyup load loadeddata loadedmetadata loadstart message mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup pause play playing progress ratechange reset scroll seeked seeking select show stalled submit suspend timeupdate volumechange waiting mozfullscreenchange mozfullscreenerror mozpointerlockchange mozpointerlockerror error webglcontextrestored webglcontextlost webglcontextcreationerror".split(" "),m=n("unbound"),w="set",k="clear",S=["alert","prompt","confirm"],x="object"==typeof window&&window||"object"==typeof self&&self||t;patchTimer(x,w,k,"Timeout"),patchTimer(x,w,k,"Interval"),patchTimer(x,w,k,"Immediate"),patchTimer(x,"request","cancel","AnimationFrame"),patchTimer(x,"mozRequest","mozCancel","AnimationFrame"),patchTimer(x,"webkitRequest","webkitCancel","AnimationFrame");for(var T=0;T<S.length;T++){var E=S[T];patchMethod(x,E,function(t,n,e){return function(n,r){return Zone.current.run(t,x,r,e)}})}eventTargetPatch(x),propertyDescriptorPatch(x),patchClass("MutationObserver"),patchClass("WebKitMutationObserver"),patchClass("FileReader"),propertyPatch(),registerElementPatch(x),patchXHR(x);var P=n("xhrTask"),O=n("xhrSync");x.navigator&&x.navigator.geolocation&&patchPrototype(x.navigator.geolocation,["getCurrentPosition","watchPosition"])})}).call(n,e(39))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,n,e){var r=e(143);t.exports=function(t,n){var e=[];return r(t,!1,e.push,e,n),e}},function(t,n,e){var r=e(6),o=e(219),i=e(11)("species");t.exports=function(t){var n;return o(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!o(n.prototype)||(n=void 0),r(n)&&(n=n[i],null===n&&(n=void 0))),void 0===n?Array:n}},function(t,n,e){var r=e(518);t.exports=function(t,n){return new(r(t))(n)}},function(t,n,e){"use strict";var r=e(4),o=e(60),i="number";t.exports=function(t){if("string"!==t&&t!==i&&"default"!==t)throw TypeError("Incorrect hint");return o(r(this),t!=i)}},function(t,n,e){var r=e(84),o=e(144),i=e(145);t.exports=function(t){var n=r(t),e=o.f;if(e)for(var u,c=e(t),a=i.f,f=0;c.length>f;)a.call(t,u=c[f++])&&n.push(u);return n}},function(t,n){t.exports=function(t,n,e){var r=void 0===e;switch(n.length){case 0:return r?t():t.call(e);case 1:return r?t(n[0]):t.call(e,n[0]);case 2:return r?t(n[0],n[1]):t.call(e,n[0],n[1]);case 3:return r?t(n[0],n[1],n[2]):t.call(e,n[0],n[1],n[2]);case 4:return r?t(n[0],n[1],n[2],n[3]):t.call(e,n[0],n[1],n[2],n[3])}return t.apply(e,n)}},function(t,n,e){var r=e(84),o=e(33);t.exports=function(t,n){for(var e,i=o(t),u=r(i),c=u.length,a=0;c>a;)if(i[e=u[a++]]===n)return e}},function(t,n,e){var r=e(68),o=e(144),i=e(4),u=e(8).Reflect;t.exports=u&&u.ownKeys||function(t){var n=r.f(i(t)),e=o.f;return e?n.concat(e(t)):n}},function(t,n,e){var r=e(8),o=e(10),i=e(104),u=e(356),c=e(12).f;t.exports=function(t){var n=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in n||c(n,t,{value:u.f(t)})}},function(t,n,e){var r=e(1);r(r.P,"Array",{copyWithin:e(332)}),e(101)("copyWithin")},function(t,n,e){"use strict";var r=e(1),o=e(36)(4);r(r.P+r.F*!e(32)([].every,!0),"Array",{every:function(t){return o(this,t,arguments[1])}})},function(t,n,e){var r=e(1);r(r.P,"Array",{fill:e(211)}),e(101)("fill")},function(t,n,e){"use strict";var r=e(1),o=e(36)(2);r(r.P+r.F*!e(32)([].filter,!0),"Array",{filter:function(t){return o(this,t,arguments[1])}})},function(t,n,e){"use strict";var r=e(1),o=e(36)(6),i="findIndex",u=!0;i in[]&&Array(1)[i](function(){u=!1}),r(r.P+r.F*u,"Array",{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),e(101)(i)},function(t,n,e){"use strict";var r=e(1),o=e(36)(5),i="find",u=!0;i in[]&&Array(1)[i](function(){u=!1}),r(r.P+r.F*u,"Array",{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),e(101)(i)},function(t,n,e){"use strict";var r=e(1),o=e(36)(0),i=e(32)([].forEach,!0);r(r.P+r.F*!i,"Array",{forEach:function(t){return o(this,t,arguments[1])}})},function(t,n,e){"use strict";var r=e(66),o=e(1),i=e(29),u=e(342),c=e(218),a=e(20),f=e(337),s=e(230);o(o.S+o.F*!e(222)(function(t){Array.from(t)}),"Array",{from:function(t){var n,e,o,l,h=i(t),p="function"==typeof this?this:Array,v=arguments.length,d=v>1?arguments[1]:void 0,g=void 0!==d,y=0,b=s(h);if(g&&(d=r(d,v>2?arguments[2]:void 0,2)),void 0==b||p==Array&&c(b))for(n=a(h.length),e=new p(n);n>y;y++)f(e,y,g?d(h[y],y):h[y]);else for(l=b.call(h),e=new p;!(o=l.next()).done;y++)f(e,y,g?u(l,d,[o.value,y],!0):o.value);return e.length=y,e}})},function(t,n,e){"use strict";var r=e(1),o=e(212)(!1),i=[].indexOf,u=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(u||!e(32)(i)),"Array",{indexOf:function(t){return u?i.apply(this,arguments)||0:o(this,t,arguments[1])}})},function(t,n,e){var r=e(1);r(r.S,"Array",{isArray:e(219)})},function(t,n,e){"use strict";var r=e(1),o=e(33),i=[].join;r(r.P+r.F*(e(103)!=Object||!e(32)(i)),"Array",{join:function(t){return i.call(o(this),void 0===t?",":t)}})},function(t,n,e){"use strict";var r=e(1),o=e(33),i=e(59),u=e(20),c=[].lastIndexOf,a=!!c&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(a||!e(32)(c)),"Array",{lastIndexOf:function(t){if(a)return c.apply(this,arguments)||0;var n=o(this),e=u(n.length),r=e-1;for(arguments.length>1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=e+r);r>=0;r--)if(r in n&&n[r]===t)return r||0;return-1}})},function(t,n,e){"use strict";var r=e(1),o=e(36)(1);r(r.P+r.F*!e(32)([].map,!0),"Array",{map:function(t){return o(this,t,arguments[1])}})},function(t,n,e){"use strict";var r=e(1),o=e(337);r(r.S+r.F*e(5)(function(){function F(){}return!(Array.of.call(F)instanceof F)}),"Array",{of:function(){for(var t=0,n=arguments.length,e=new("function"==typeof this?this:Array)(n);n>t;)o(e,t,arguments[t++]);return e.length=n,e}})},function(t,n,e){"use strict";var r=e(1),o=e(333);r(r.P+r.F*!e(32)([].reduceRight,!0),"Array",{reduceRight:function(t){return o(this,t,arguments.length,arguments[1],!0)}})},function(t,n,e){"use strict";var r=e(1),o=e(333);r(r.P+r.F*!e(32)([].reduce,!0),"Array",{reduce:function(t){return o(this,t,arguments.length,arguments[1],!1)}})},function(t,n,e){"use strict";var r=e(1),o=e(339),i=e(65),u=e(69),c=e(20),a=[].slice;r(r.P+r.F*e(5)(function(){o&&a.call(o)}),"Array",{slice:function(t,n){var e=c(this.length),r=i(this);if(n=void 0===n?e:n,"Array"==r)return a.call(this,t,n);for(var o=u(t,e),f=u(n,e),s=c(f-o),l=Array(s),h=0;h<s;h++)l[h]="String"==r?this.charAt(o+h):this[o+h];return l}})},function(t,n,e){"use strict";var r=e(1),o=e(36)(3);r(r.P+r.F*!e(32)([].some,!0),"Array",{some:function(t){return o(this,t,arguments[1])}})},function(t,n,e){"use strict";var r=e(1),o=e(56),i=e(29),u=e(5),c=[].sort,a=[1,2,3];r(r.P+r.F*(u(function(){a.sort(void 0)})||!u(function(){a.sort(null)})||!e(32)(c)),"Array",{sort:function(t){return void 0===t?c.call(i(this)):c.call(i(this),o(t))}})},function(t,n,e){e(106)("Array")},function(t,n,e){var r=e(1);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,n,e){"use strict";var r=e(1),o=e(5),i=Date.prototype.getTime,u=function(t){return t>9?t:"0"+t};r(r.P+r.F*(o(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!o(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,n=t.getUTCFullYear(),e=t.getUTCMilliseconds(),r=n<0?"-":n>9999?"+":"";return r+("00000"+Math.abs(n)).slice(r?-6:-4)+"-"+u(t.getUTCMonth()+1)+"-"+u(t.getUTCDate())+"T"+u(t.getUTCHours())+":"+u(t.getUTCMinutes())+":"+u(t.getUTCSeconds())+"."+(e>99?e:"0"+u(e))+"Z"}})},function(t,n,e){"use strict";var r=e(1),o=e(29),i=e(60);r(r.P+r.F*e(5)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var n=o(this),e=i(n);return"number"!=typeof e||isFinite(e)?n.toISOString():null}})},function(t,n,e){var r=e(11)("toPrimitive"),o=Date.prototype;r in o||e(28)(o,r,e(520))},function(t,n,e){var r=Date.prototype,o="Invalid Date",i="toString",u=r[i],c=r.getTime;new Date(NaN)+""!=o&&e(24)(r,i,function(){var t=c.call(this);return t===t?u.call(this):o})},function(t,n,e){var r=e(1);r(r.P,"Function",{bind:e(334)})},function(t,n,e){"use strict";var r=e(6),o=e(37),i=e(11)("hasInstance"),u=Function.prototype;i in u||e(12).f(u,i,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=o(t);)if(this.prototype===t)return!0;return!1}})},function(t,n,e){var r=e(12).f,o=e(58),i=e(21),u=Function.prototype,c=/^\s*function ([^ (]*)/,a="name",f=Object.isExtensible||function(){return!0};a in u||e(16)&&r(u,a,{configurable:!0,get:function(){try{var t=this,n=(""+t).match(c)[1];return i(t,a)||!f(t)||r(t,a,o(5,n)),n}catch(t){return""}}})},function(t,n,e){var r=e(1),o=e(345),i=Math.sqrt,u=Math.acosh;r(r.S+r.F*!(u&&710==Math.floor(u(Number.MAX_VALUE))&&u(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:o(t-1+i(t-1)*i(t+1))}})},function(t,n,e){function asinh(t){return isFinite(t=+t)&&0!=t?t<0?-asinh(-t):Math.log(t+Math.sqrt(t*t+1)):t}var r=e(1),o=Math.asinh;r(r.S+r.F*!(o&&1/o(0)>0),"Math",{asinh:asinh})},function(t,n,e){var r=e(1),o=Math.atanh;r(r.S+r.F*!(o&&1/o(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,n,e){var r=e(1),o=e(224);r(r.S,"Math",{cbrt:function(t){return o(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,n,e){var r=e(1);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,n,e){var r=e(1),o=Math.exp;r(r.S,"Math",{cosh:function(t){return(o(t=+t)+o(-t))/2}})},function(t,n,e){var r=e(1),o=e(223);r(r.S+r.F*(o!=Math.expm1),"Math",{expm1:o})},function(t,n,e){var r=e(1),o=e(224),i=Math.pow,u=i(2,-52),c=i(2,-23),a=i(2,127)*(2-c),f=i(2,-126),s=function(t){return t+1/u-1/u};r(r.S,"Math",{fround:function(t){var n,e,r=Math.abs(t),i=o(t);return r<f?i*s(r/f/c)*f*c:(n=(1+c/u)*r,e=n-(n-r),e>a||e!=e?i*(1/0):i*e)}})},function(t,n,e){var r=e(1),o=Math.abs;r(r.S,"Math",{hypot:function(t,n){for(var e,r,i=0,u=0,c=arguments.length,a=0;u<c;)e=o(arguments[u++]),a<e?(r=a/e,i=i*r*r+1,a=e):e>0?(r=e/a,i+=r*r):i+=e;return a===1/0?1/0:a*Math.sqrt(i)}})},function(t,n,e){var r=e(1),o=Math.imul;r(r.S+r.F*e(5)(function(){return o(4294967295,5)!=-5||2!=o.length}),"Math",{imul:function(t,n){var e=65535,r=+t,o=+n,i=e&r,u=e&o;return 0|i*u+((e&r>>>16)*u+i*(e&o>>>16)<<16>>>0)}})},function(t,n,e){var r=e(1);r(r.S,"Math",{log10:function(t){return Math.log(t)/Math.LN10}})},function(t,n,e){var r=e(1);r(r.S,"Math",{log1p:e(345)})},function(t,n,e){var r=e(1);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,n,e){var r=e(1);r(r.S,"Math",{sign:e(224)})},function(t,n,e){var r=e(1),o=e(223),i=Math.exp;r(r.S+r.F*e(5)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(o(t)-o(-t))/2:(i(t-1)-i(-t-1))*(Math.E/2)}})},function(t,n,e){var r=e(1),o=e(223),i=Math.exp;r(r.S,"Math",{tanh:function(t){var n=o(t=+t),e=o(-t);return n==1/0?1:e==1/0?-1:(n-e)/(i(t)+i(-t))}})},function(t,n,e){var r=e(1);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,n,e){"use strict";var r=e(8),o=e(21),i=e(65),u=e(217),c=e(60),a=e(5),f=e(68).f,s=e(48).f,l=e(12).f,h=e(147).trim,p="Number",v=r[p],d=v,g=v.prototype,y=i(e(67)(g))==p,b="trim"in String.prototype,_=function(t){var n=c(t,!1);if("string"==typeof n&&n.length>2){n=b?n.trim():h(n,3);var e,r,o,i=n.charCodeAt(0);if(43===i||45===i){if(e=n.charCodeAt(2),88===e||120===e)return NaN}else if(48===i){switch(n.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+n}for(var u,a=n.slice(2),f=0,s=a.length;f<s;f++)if(u=a.charCodeAt(f),u<48||u>o)return NaN;return parseInt(a,r)}}return+n};if(!v(" 0o1")||!v("0b1")||v("+0x1")){v=function(t){var n=arguments.length<1?0:t,e=this;return e instanceof v&&(y?a(function(){g.valueOf.call(e)}):i(e)!=p)?u(new d(_(n)),e,v):_(n)};for(var m,w=e(16)?f(d):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),k=0;w.length>k;k++)o(d,m=w[k])&&!o(v,m)&&l(v,m,s(d,m));v.prototype=g,g.constructor=v,e(24)(r,p,v)}},function(t,n,e){var r=e(1);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,n,e){var r=e(1),o=e(8).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&o(t)}})},function(t,n,e){var r=e(1);r(r.S,"Number",{isInteger:e(341)})},function(t,n,e){var r=e(1);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,n,e){var r=e(1),o=e(341),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},function(t,n,e){var r=e(1);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,n,e){var r=e(1);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,n,e){var r=e(1),o=e(350);r(r.S+r.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},function(t,n,e){var r=e(1),o=e(351);r(r.S+r.F*(Number.parseInt!=o),"Number",{parseInt:o})},function(t,n,e){"use strict";var r=e(1),o=e(59),i=e(331),u=e(355),c=1..toFixed,a=Math.floor,f=[0,0,0,0,0,0],s="Number.toFixed: incorrect invocation!",l="0",h=function(t,n){for(var e=-1,r=n;++e<6;)r+=t*f[e],f[e]=r%1e7,r=a(r/1e7)},p=function(t){for(var n=6,e=0;--n>=0;)e+=f[n],f[n]=a(e/t),e=e%t*1e7},v=function(){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==f[t]){var e=String(f[t]);n=""===n?e:n+u.call(l,7-e.length)+e}return n},d=function(t,n,e){return 0===n?e:n%2===1?d(t,n-1,e*t):d(t*t,n/2,e)},g=function(t){for(var n=0,e=t;e>=4096;)n+=12,e/=4096;for(;e>=2;)n+=1,e/=2;return n};r(r.P+r.F*(!!c&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!e(5)(function(){c.call({})})),"Number",{toFixed:function(t){var n,e,r,c,a=i(this,s),f=o(t),y="",b=l;if(f<0||f>20)throw RangeError(s);if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return String(a);if(a<0&&(y="-",a=-a),a>1e-21)if(n=g(a*d(2,69,1))-69,e=n<0?a*d(2,-n,1):a/d(2,n,1),e*=4503599627370496,n=52-n,n>0){for(h(0,e),r=f;r>=7;)h(1e7,0),r-=7;for(h(d(10,r,1),0),r=n-1;r>=23;)p(1<<23),r-=23;p(1<<r),h(1,1),p(2),b=v()}else h(0,e),h(1<<-n,0),b=v()+u.call(l,f);return f>0?(c=b.length,b=y+(c<=f?"0."+u.call(l,f-c)+b:b.slice(0,c-f)+"."+b.slice(c-f))):b=y+b,b}})},function(t,n,e){"use strict";var r=e(1),o=e(5),i=e(331),u=1..toPrecision;r(r.P+r.F*(o(function(){return"1"!==u.call(1,void 0)})||!o(function(){u.call({})})),"Number",{toPrecision:function(t){var n=i(this,"Number#toPrecision: incorrect invocation!");return void 0===t?u.call(n):u.call(n,t)}})},function(t,n,e){var r=e(1);r(r.S+r.F,"Object",{assign:e(346)})},function(t,n,e){var r=e(1);r(r.S,"Object",{create:e(67)})},function(t,n,e){var r=e(1);r(r.S+r.F*!e(16),"Object",{defineProperties:e(347)})},function(t,n,e){var r=e(1);r(r.S+r.F*!e(16),"Object",{defineProperty:e(12).f})},function(t,n,e){var r=e(6),o=e(57).onFreeze;e(38)("freeze",function(t){return function(n){return t&&r(n)?t(o(n)):n}})},function(t,n,e){var r=e(33),o=e(48).f;e(38)("getOwnPropertyDescriptor",function(){return function(t,n){return o(r(t),n)}})},function(t,n,e){e(38)("getOwnPropertyNames",function(){return e(348).f})},function(t,n,e){var r=e(29),o=e(37);e(38)("getPrototypeOf",function(){return function(t){return o(r(t))}})},function(t,n,e){var r=e(6);e(38)("isExtensible",function(t){return function(n){return!!r(n)&&(!t||t(n))}})},function(t,n,e){var r=e(6);e(38)("isFrozen",function(t){return function(n){return!r(n)||!!t&&t(n)}})},function(t,n,e){var r=e(6);e(38)("isSealed",function(t){return function(n){return!r(n)||!!t&&t(n)}})},function(t,n,e){var r=e(1);r(r.S,"Object",{is:e(352)})},function(t,n,e){var r=e(29),o=e(84);e(38)("keys",function(){return function(t){return o(r(t))}})},function(t,n,e){var r=e(6),o=e(57).onFreeze;e(38)("preventExtensions",function(t){return function(n){return t&&r(n)?t(o(n)):n}})},function(t,n,e){var r=e(6),o=e(57).onFreeze;e(38)("seal",function(t){return function(n){return t&&r(n)?t(o(n)):n}})},function(t,n,e){var r=e(1);r(r.S,"Object",{setPrototypeOf:e(225).set})},function(t,n,e){var r=e(1),o=e(350);r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},function(t,n,e){var r=e(1),o=e(351);r(r.G+r.F*(parseInt!=o),{parseInt:o})},function(t,n,e){var r=e(1),o=e(56),i=e(4),u=(e(8).Reflect||{}).apply,c=Function.apply;r(r.S+r.F*!e(5)(function(){u(function(){})}),"Reflect",{apply:function(t,n,e){var r=o(t),a=i(e);return u?u(r,n,a):c.call(r,n,a)}})},function(t,n,e){var r=e(1),o=e(67),i=e(56),u=e(4),c=e(6),a=e(5),f=e(334),s=(e(8).Reflect||{}).construct,l=a(function(){function F(){}return!(s(function(){},[],F)instanceof F)}),h=!a(function(){s(function(){})});r(r.S+r.F*(l||h),"Reflect",{construct:function(t,n){i(t),u(n);var e=arguments.length<3?t:i(arguments[2]);if(h&&!l)return s(t,n,e);if(t==e){switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3])}var r=[null];return r.push.apply(r,n),new(f.apply(t,r))}var a=e.prototype,p=o(c(a)?a:Object.prototype),v=Function.apply.call(t,p,n);return c(v)?v:p}})},function(t,n,e){var r=e(12),o=e(1),i=e(4),u=e(60);o(o.S+o.F*e(5)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,n,e){i(t),n=u(n,!0),i(e);try{return r.f(t,n,e),!0}catch(t){return!1}}})},function(t,n,e){var r=e(1),o=e(48).f,i=e(4);r(r.S,"Reflect",{deleteProperty:function(t,n){var e=o(i(t),n);return!(e&&!e.configurable)&&delete t[n]}})},function(t,n,e){"use strict";var r=e(1),o=e(4),i=function(t){this._t=o(t),this._i=0;var n,e=this._k=[];for(n in t)e.push(n)};e(343)(i,"Object",function(){var t,n=this,e=n._k;do if(n._i>=e.length)return{value:void 0,done:!0};while(!((t=e[n._i++])in n._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new i(t)}})},function(t,n,e){var r=e(48),o=e(1),i=e(4);o(o.S,"Reflect",{getOwnPropertyDescriptor:function(t,n){return r.f(i(t),n)}})},function(t,n,e){var r=e(1),o=e(37),i=e(4);r(r.S,"Reflect",{getPrototypeOf:function(t){return o(i(t))}})},function(t,n,e){function get(t,n){var e,u,f=arguments.length<3?t:arguments[2];return a(t)===f?t[n]:(e=r.f(t,n))?i(e,"value")?e.value:void 0!==e.get?e.get.call(f):void 0:c(u=o(t))?get(u,n,f):void 0}var r=e(48),o=e(37),i=e(21),u=e(1),c=e(6),a=e(4);u(u.S,"Reflect",{get:get})},function(t,n,e){var r=e(1);r(r.S,"Reflect",{has:function(t,n){return n in t}})},function(t,n,e){var r=e(1),o=e(4),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return o(t),!i||i(t)}})},function(t,n,e){var r=e(1);r(r.S,"Reflect",{ownKeys:e(524)})},function(t,n,e){var r=e(1),o=e(4),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){o(t);try{return i&&i(t),!0}catch(t){return!1}}})},function(t,n,e){var r=e(1),o=e(225);o&&r(r.S,"Reflect",{setPrototypeOf:function(t,n){o.check(t,n);try{return o.set(t,n),!0}catch(t){return!1}}})},function(t,n,e){function set(t,n,e){var c,l,h=arguments.length<4?t:arguments[3],p=o.f(f(t),n);if(!p){if(s(l=i(t)))return set(l,n,e,h);p=a(0)}return u(p,"value")?!(p.writable===!1||!s(h))&&(c=o.f(h,n)||a(0),c.value=e,r.f(h,n,c),!0):void 0!==p.set&&(p.set.call(h,e),!0)}var r=e(12),o=e(48),i=e(37),u=e(21),c=e(1),a=e(58),f=e(4),s=e(6);c(c.S,"Reflect",{set:set})},function(t,n,e){var r=e(8),o=e(217),i=e(12).f,u=e(68).f,c=e(220),a=e(216),f=r.RegExp,s=f,l=f.prototype,h=/a/g,p=/a/g,v=new f(h)!==h;if(e(16)&&(!v||e(5)(function(){return p[e(11)("match")]=!1,f(h)!=h||f(p)==p||"/a/i"!=f(h,"i")}))){f=function(t,n){var e=this instanceof f,r=c(t),i=void 0===n;return!e&&r&&t.constructor===f&&i?t:o(v?new s(r&&!i?t.source:t,n):s((r=t instanceof f)?t.source:t,r&&i?a.call(t):n),e?this:l,f)};for(var d=(function(t){t in f||i(f,t,{configurable:!0,get:function(){return s[t]},set:function(n){s[t]=n}})}),g=u(s),y=0;g.length>y;)d(g[y++]);l.constructor=f,f.prototype=l,e(24)(r,"RegExp",f)}e(106)("RegExp")},function(t,n,e){"use strict";e(358);var r=e(4),o=e(216),i=e(16),u="toString",c=/./[u],a=function(t){e(24)(RegExp.prototype,u,t,!0)};e(5)(function(){return"/a/b"!=c.call({source:"a",flags:"b"})})?a(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)}):c.name!=u&&a(function(){return c.call(this)})},function(t,n,e){"use strict";e(25)("anchor",function(t){return function(n){return t(this,"a","name",n)}})},function(t,n,e){"use strict";e(25)("big",function(t){return function(){return t(this,"big","","")}})},function(t,n,e){"use strict";e(25)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,n,e){"use strict";e(25)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,n,e){"use strict";var r=e(1),o=e(354)(!1);r(r.P,"String",{codePointAt:function(t){return o(this,t)}})},function(t,n,e){"use strict";var r=e(1),o=e(20),i=e(227),u="endsWith",c=""[u];r(r.P+r.F*e(215)(u),"String",{endsWith:function(t){var n=i(this,t,u),e=arguments.length>1?arguments[1]:void 0,r=o(n.length),a=void 0===e?r:Math.min(o(e),r),f=String(t);return c?c.call(n,f,a):n.slice(a-f.length,a)===f}})},function(t,n,e){"use strict";e(25)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,n,e){"use strict";e(25)("fontcolor",function(t){return function(n){return t(this,"font","color",n)}})},function(t,n,e){"use strict";e(25)("fontsize",function(t){return function(n){return t(this,"font","size",n)}})},function(t,n,e){var r=e(1),o=e(69),i=String.fromCharCode,u=String.fromCodePoint;r(r.S+r.F*(!!u&&1!=u.length),"String",{fromCodePoint:function(t){for(var n,e=[],r=arguments.length,u=0;r>u;){if(n=+arguments[u++],o(n,1114111)!==n)throw RangeError(n+" is not a valid code point");e.push(n<65536?i(n):i(((n-=65536)>>10)+55296,n%1024+56320))}return e.join("")}})},function(t,n,e){"use strict";var r=e(1),o=e(227),i="includes";r(r.P+r.F*e(215)(i),"String",{includes:function(t){return!!~o(this,t,i).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,n,e){"use strict";e(25)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,n,e){"use strict";e(25)("link",function(t){return function(n){return t(this,"a","href",n)}})},function(t,n,e){var r=e(1),o=e(33),i=e(20);r(r.S,"String",{raw:function(t){for(var n=o(t.raw),e=i(n.length),r=arguments.length,u=[],c=0;e>c;)u.push(String(n[c++])),c<r&&u.push(String(arguments[c]));return u.join("")}})},function(t,n,e){var r=e(1);r(r.P,"String",{repeat:e(355)})},function(t,n,e){"use strict";e(25)("small",function(t){return function(){return t(this,"small","","")}})},function(t,n,e){"use strict";var r=e(1),o=e(20),i=e(227),u="startsWith",c=""[u];r(r.P+r.F*e(215)(u),"String",{startsWith:function(t){var n=i(this,t,u),e=o(Math.min(arguments.length>1?arguments[1]:void 0,n.length)),r=String(t);return c?c.call(n,r,e):n.slice(e,e+r.length)===r}})},function(t,n,e){"use strict";e(25)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,n,e){"use strict";e(25)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,n,e){"use strict";e(25)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,n,e){"use strict";e(147)("trim",function(t){return function(){return t(this,3)}})},function(t,n,e){"use strict";var r=e(1),o=e(148),i=e(229),u=e(4),c=e(69),a=e(20),f=e(6),s=e(8).ArrayBuffer,l=e(353),h=i.ArrayBuffer,p=i.DataView,v=o.ABV&&s.isView,d=h.prototype.slice,g=o.VIEW,y="ArrayBuffer";r(r.G+r.W+r.F*(s!==h),{ArrayBuffer:h}),r(r.S+r.F*!o.CONSTR,y,{isView:function(t){return v&&v(t)||f(t)&&g in t}}),r(r.P+r.U+r.F*e(5)(function(){return!new h(2).slice(1,void 0).byteLength}),y,{slice:function(t,n){if(void 0!==d&&void 0===n)return d.call(u(this),t);for(var e=u(this).byteLength,r=c(t,e),o=c(void 0===n?e:n,e),i=new(l(this,h))(a(o-r)),f=new p(this),s=new p(i),v=0;r<o;)s.setUint8(v++,f.getUint8(r++));return i}}),e(106)(y)},function(t,n,e){var r=e(1);r(r.G+r.W+r.F*!e(148).ABV,{DataView:e(229).DataView})},function(t,n,e){e(49)("Float32",4,function(t){return function(n,e,r){return t(this,n,e,r)}})},function(t,n,e){e(49)("Float64",8,function(t){return function(n,e,r){return t(this,n,e,r)}})},function(t,n,e){e(49)("Int16",2,function(t){return function(n,e,r){return t(this,n,e,r)}})},function(t,n,e){e(49)("Int32",4,function(t){return function(n,e,r){return t(this,n,e,r)}})},function(t,n,e){e(49)("Int8",1,function(t){return function(n,e,r){return t(this,n,e,r)}})},function(t,n,e){e(49)("Uint16",2,function(t){return function(n,e,r){return t(this,n,e,r)}})},function(t,n,e){e(49)("Uint32",4,function(t){return function(n,e,r){return t(this,n,e,r)}})},function(t,n,e){e(49)("Uint8",1,function(t){return function(n,e,r){return t(this,n,e,r)}})},function(t,n,e){e(49)("Uint8",1,function(t){return function(n,e,r){return t(this,n,e,r)}},!0)},function(t,n,e){"use strict";var r=e(336);e(141)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(this,t,!0)}},r,!1,!0)},function(t,n,e){var r=e(47),o=e(4),i=r.key,u=r.set;r.exp({defineMetadata:function(t,n,e,r){u(t,n,o(e),i(r))}})},function(t,n,e){var r=e(47),o=e(4),i=r.key,u=r.map,c=r.store;r.exp({deleteMetadata:function(t,n){var e=arguments.length<3?void 0:i(arguments[2]),r=u(o(n),e,!1);if(void 0===r||!r.delete(t))return!1;if(r.size)return!0;var a=c.get(n);return a.delete(e),!!a.size||c.delete(n)}})},function(t,n,e){var r=e(363),o=e(517),i=e(47),u=e(4),c=e(37),a=i.keys,f=i.key,s=function(t,n){var e=a(t,n),i=c(t);if(null===i)return e;var u=s(i,n);return u.length?e.length?o(new r(e.concat(u))):u:e};i.exp({getMetadataKeys:function(t){return s(u(t),arguments.length<2?void 0:f(arguments[1]))}})},function(t,n,e){var r=e(47),o=e(4),i=e(37),u=r.has,c=r.get,a=r.key,f=function(t,n,e){var r=u(t,n,e);if(r)return c(t,n,e);var o=i(n);return null!==o?f(t,o,e):void 0};r.exp({getMetadata:function(t,n){return f(t,o(n),arguments.length<3?void 0:a(arguments[2]))}})},function(t,n,e){var r=e(47),o=e(4),i=r.keys,u=r.key;r.exp({getOwnMetadataKeys:function(t){return i(o(t),arguments.length<2?void 0:u(arguments[1]))}})},function(t,n,e){var r=e(47),o=e(4),i=r.get,u=r.key;r.exp({getOwnMetadata:function(t,n){return i(t,o(n),arguments.length<3?void 0:u(arguments[2]))}})},function(t,n,e){var r=e(47),o=e(4),i=e(37),u=r.has,c=r.key,a=function(t,n,e){var r=u(t,n,e);if(r)return!0;var o=i(n);return null!==o&&a(t,o,e)};r.exp({hasMetadata:function(t,n){return a(t,o(n),arguments.length<3?void 0:c(arguments[2]))}})},function(t,n,e){var r=e(47),o=e(4),i=r.has,u=r.key;r.exp({hasOwnMetadata:function(t,n){return i(t,o(n),arguments.length<3?void 0:u(arguments[2]))}})},function(t,n,e){var r=e(47),o=e(4),i=e(56),u=r.key,c=r.set;r.exp({metadata:function(t,n){return function(e,r){c(t,n,(void 0!==r?o:i)(e),u(r))}}})},,,,,,,,,,,,,,,,,,,,,,,,,,function(t,n,e){"use strict";e(394),e(387),e(383),e(389),e(388),e(386),e(385),e(393),e(382),e(381),e(391),e(384),e(392),e(396),e(397),e(395),e(390),e(398),e(402),e(401)}]);
import sys from pyflakes.scripts.pyflakes import main as main_pyflakes sys.argv = [sys.argv[0], 'labmanager'] main_pyflakes()
# # GitHub: https://github.com/SERPWoo/API # # This code requests a project's Alerts and outputs the Alert ID, Social Timestamp, Alert Text, Alert Link # # This output is text format # # Last updated - Aug 24th, 2017 @ 22:10 EST (@MercenaryCarter https://github.com/MercenaryCarter and https://twitter.com/MercenaryCarter) # # Run Command: python list-all-project-alerts.py import requests, json API_key = 'API_KEY_HERE' Project_ID = 0 #input your Project ID url = "https://api.serpwoo.com/v1/projects/" + str(Project_ID) + "/alerts/" payload = {'key': API_key} r = requests.get(url, params=payload) j = r.json() print('\n--\n') print('%-15s %-20s %-100s %-90s' % ("Alert ID", "Social Timestamp", "Alert Text", "Alert Link")) print('%-15s %-20s %-100s %-90s' % ("--------", "----------------", "----------", "----------")) if j['success'] == 1: for project_id in j['projects']: #print('%-15s' % (project_id)) for alert_id in sorted(j['projects'][project_id]['alerts']): print('%-15s %-20s %-100s %-90s' % (alert_id, j['projects'][project_id]['alerts'][alert_id]['timestamp'], j['projects'][project_id]['alerts'][alert_id]['text'], j['projects'][project_id]['alerts'][alert_id]['link'])) else: print('An Error Occurred: ' + j['error']) print('\n--\n')
#include <system.h> #include <isr.h> #include <serial.h> #include <vga.h> char *exception_messages[32] = { "Division By Zero", "Debug", "Non Maskable Interrupt", "Breakpoint", "Into Detected Overflow", "Out of Bounds", "Invalid Opcode", "No Coprocessor", "Double Fault", "Coprocessor Segment Overrun", "Bad TSS", "Segment Not Present", "Stack Fault", "General Protection Fault", "Page Fault", "Unknown Interrupt", "Coprocessor Fault", "Alignment Check", "Machine Check", "Reserved", "Reserved", "Reserved", "Reserved", "Reserved", "Reserved", "Reserved", "Reserved", "Reserved", "Reserved", "Reserved", "Reserved", "Reserved" }; void final_exception_handler(register_t reg) { if(reg.int_no < 32) { set_curr_color(LIGHT_RED); qemu_printf("EXCEPTION: %s (err code is %x)\n", exception_messages[reg.int_no], reg.err_code); print_reg(&reg); set_curr_color(WHITE); for(;;); } if(interrupt_handlers[reg.int_no] != NULL) { isr_t handler = interrupt_handlers[reg.int_no]; handler(&reg); } }
import sh import os import errno from pathlib import Path import binascii as ba from os.path import join as pjoin # hex_dump == hexdump -ve '2/ "%08x " "\n"' $1 | awk '{print $2$1}' > $2 def hex_dump(in_file, out_file): assert os.path.isfile(in_file) print(in_file) with open(in_file, 'rb') as f, open(out_file, 'w') as out_f: chunks = iter(lambda : f.read(1), b'') hex_bytes = map(ba.hexlify, chunks) buffer = [] for b in hex_bytes: buffer.append(b.decode()) if len(buffer) == 8: buffer.reverse() out_f.write(''.join(buffer) + '\n') buffer.clear() def safe_mkdir(dir: str): if not os.path.exists(dir): try: os.makedirs(dir) except OSError as e: # when another thread create this directory assert e.errno == errno.EEXIST def is_older(left, right): if not os.path.isfile(right): return False assert os.path.isfile(left) return os.path.getmtime(left) < os.path.getmtime(right) def avoid_repeating( emu: str, input_file: str, output_dir: str, force_run: bool, ok, func): # this function avoid repeated run for most common situations input_file_n = os.path.basename(input_file) emu_n = os.path.basename(emu) # python 3.6 please running_lock_name = f'running-{func.__name__}-{emu_n}-{input_file_n}' running_lock_file = pjoin(output_dir, running_lock_name) if os.path.isfile(running_lock_file): print('running lock found in {}, skip!'.format(output_dir)) return else: sh.touch(running_lock_file) script_ts_dir = pjoin(str(Path(__file__).resolve().parent), 'ts') safe_mkdir(script_ts_dir) # python 3.6 please ts_name = f'ts-{func.__name__}-{emu_n}-{input_file_n}' out_ts_file = pjoin(output_dir, ts_name) if os.path.isfile(out_ts_file): out_ts = os.path.getmtime(out_ts_file) else: out_ts = 0.0 script_ts_file = pjoin(script_ts_dir, ts_name) if not os.path.isfile(script_ts_file): sh.touch(script_ts_file) script_ts = os.path.getmtime(script_ts_file) program_ts = os.path.getmtime(emu) input_binary_ts = os.path.getmtime(input_file) cmd_ts = max(script_ts, program_ts, input_binary_ts) if out_ts < cmd_ts or force_run: try: func() sh.touch(out_ts_file) except Exception as e: if (ok()): sh.touch(out_ts_file) else: print(e) sh.rm(running_lock_file) else: print('none of the inputs is older than output, skip!') if os.path.isfile(running_lock_file): sh.rm(running_lock_file) def get_am_apps(): assert 'AM_HOME' in os.environ.keys() app_dir = pjoin(os.environ['AM_HOME'], 'apps') apps = set(os.listdir(app_dir)) with open('./am_app_filter.txt') as f: filters = set([line.strip() for line in f.readlines()]) return list(apps & filters) def get_am_app_dir(app: str): assert 'AM_HOME' in os.environ.keys() app_base_dir = pjoin(os.environ['AM_HOME'], 'apps') app_dir = pjoin(app_base_dir, app) assert os.path.isdir(app_dir) return app_dir if __name__ == '__main__': hex_dump('/home/zyy/projects/nexus-am/apps/cache-flush/build/cache-flush' '-riscv64-rocket.bin', 'test.txt')
from ....tools.decorators import method from ....tools.utils import check_version @method( method_name="Stereoscope", paper_name="Single-cell and spatial transcriptomics enables probabilistic inference of cell type topography", # noqa: E501 paper_url="https://www.nature.com/articles/s42003-020-01247-y", paper_year=2020, code_url="https://github.com/YosefLab/scvi-tools", code_version=check_version("scvi-tools"), image="openproblems-python-extras", ) def stereoscope_raw(adata): from scvi.data import setup_anndata from scvi.external.stereoscope import RNAStereoscope from scvi.external.stereoscope import SpatialStereoscope adata_sc = adata.uns["sc_reference"].copy() setup_anndata(adata_sc, labels_key="label", layer=None) sc_model = RNAStereoscope(adata_sc) sc_model.train() setup_anndata(adata, layer=None) stereo = SpatialStereoscope.from_rna_model(adata, sc_model) stereo.train() adata.obsm["proportions_pred"] = stereo.get_proportions() return adata
from .utils import ( compare_version, convert_port_bindings, convert_volume_binds, mkbuildcontext, tar, exclude_paths, parse_repository_tag, parse_host, kwargs_from_env, convert_filters, create_host_config, create_container_config, parse_bytes, ping_registry, parse_env_file ) # flake8: noqa from .types import Ulimit, LogConfig # flake8: noqa from .decorators import check_resource #flake8: noqa
# -*- coding: utf-8 -*- #This class should preprocess the IMU data import pandas as pd import numpy as np from sklearn.preprocessing import MinMaxScaler, OneHotEncoder from sklearn.model_selection import train_test_split import sys import src.config as cfg import pickle class DataPreprocessing: def __init__(self,onehotbool = False,labeltype = ""): self.samples = list() self.samplelabels = list() self.testsamples = list() self.testsamplelables = list() self.treadmillsamples = list() self.fulldatalist = list() self.datalist = list() self.testbool = False self.onehotbool = onehotbool #onehot encoding?! def onehotencoding(self, dataY): onehot_encoder = OneHotEncoder(sparse=False,categories='auto') dataY = dataY.reshape(len(dataY), 1) dataY = onehot_encoder.fit_transform(dataY) return dataY def loaddata(self, datapath): df = pd.read_csv(datapath,sep=';') timesteps = np.arange(np.array(df["date"]).shape[0]) #df = df.drop(['ID'],axis=1) datalist = list() fulldatalist = list() for listitem in cfg.fields['allfields']: data = df[listitem].values datalist.append(data) tempdata = np.transpose(np.array(datalist)) fulldatalist.append(tempdata) fulldata = np.array(fulldatalist) fulldata = np.reshape(fulldata,(fulldata.shape[0]*fulldata.shape[1],fulldata.shape[2])) return fulldata, timesteps def scaleX(self,dataX): scaler_X = MinMaxScaler(feature_range=(0,1)).fit(dataX) dataX_scaled = scaler_X.transform(dataX) return dataX_scaled, scaler_X def load_selected(self, wind = False, scale = False): ''' This function should load all the data specified in the config ''' Xlist = list() for data in cfg.data['datalist']: X,t = self.loaddata(cfg.datapaths[data]) Xlist.append(X) dataX = np.concatenate( Xlist, axis=0 ) if wind: Wind_direction = dataX[:,5] Wind_direction = self.onehotencoding(Wind_direction) dataX = np.delete(dataX, [5], axis = 1) ###### Scale ################## if scale: dataX_scaled, scaler_X = self.scaleX(dataX) file_scaler = open('saver/outputs/scaler/scaler.pckl', 'wb') pickle.dump(scaler_X, file_scaler) dataX_scaled = np.concatenate((dataX_scaled,Wind_direction), axis = 1) else: ###### Scale ################## if scale: dataX_scaled, scaler_X = self.scaleX(dataX) file_scaler = open('saver/outputs/scaler/scaler.pckl', 'wb') pickle.dump(scaler_X, file_scaler) datay = dataX[:,cfg.prediction['pos']] datay = np.reshape(datay,(datay.shape[0],1)) if scale: dataX = dataX_scaled return dataX , datay def cutinSamples(self,fulldata,fulldataY, sample_length, timestepstopredict): cfg.data['num_of_samples'] = int(fulldata.shape[0] / sample_length) num_of_samples = cfg.data['num_of_samples'] samples = list() samplelabels = list() sampleinfo = list() for j in np.arange(num_of_samples-2): windows = list() windowlabels = list() windowposition = list() for i in range(j*sample_length+ cfg.windowing['windowlength'],(j+1)*sample_length):# - cfg.windowing['windowlength'],cfg.windowing['windowshift']): label = fulldataY[i:i + timestepstopredict,0] #schaue 1 windowlength in die Zukunft windowlabels.append(label) window = fulldata[i-cfg.windowing['windowlength']:i,:] windows.append(window) windowposition.append(i) samples.append(windows) samplelabels.append(windowlabels) sampleinfo.append(windowposition) return samples, samplelabels, sampleinfo ## FUNCTIONS def batch_generator(batch_size, sequence_length, num_x_signals, num_y_signals, num_train, x_train_scaled, y_train_scaled, h_prediction, test_bool = False): """ Generator function for creating random batches of training-data. """ # Infinite loop. while True: # Allocate a new array for the batch of input-signals. x_shape = (batch_size, sequence_length, num_x_signals) x_batch = np.zeros(shape=x_shape, dtype=np.float16) y_shape = (batch_size, h_prediction) y_batch = np.zeros(shape=y_shape, dtype=np.float16) # Fill the batch with random sequences of data. for i in range(batch_size): # Get a random start-index. # This points somewhere into the training-data. idx = np.random.randint(num_train - sequence_length-h_prediction) # Copy the sequences of data starting at this index. x_batch[i] = x_train_scaled[idx:idx+sequence_length] ## if we test, we have only one batch, but we want to predict ## the next few hours y_batch[i] = y_train_scaled[idx+sequence_length:idx+sequence_length+h_prediction][:,0] yield (x_batch, y_batch) def update_progress(self,progress, train_test): # function from: https://stackoverflow.com/questions/3160699/python-progress-bar # and just a little bit modified by myself barLength = 20 # Modify this to change the length of the progress bar status = "" if isinstance(progress, int): progress = float(progress) if not isinstance(progress, float): progress = 0 status = "error: progress var must be float\r\n" if progress < 0: progress = 0 status = "Halt...\r\n" if progress >= 1: progress = 1 status = "Done...\r\n" block = int(round(barLength*progress)) text = "\r" + train_test + " Progress: [{0}] {1:.2f}% {2}".format( "#"*block + "-"*(barLength-block), progress*100, status) sys.stdout.write(text) sys.stdout.flush() def getsamples(self): return self.samples def getsamplelabels(self): return self.samplelabels # # def scaleX(self): # scaler = MinMaxScaler().fit(self.fulldata) # self.fulldata = scaler.transform(self.fulldata) # return scaler def getsplitsamples(self, test_size = 0.33, shuffle = False): a= self.samples b=self.samplelabels samples_train, samples_test, samplelabels_train, samplelabels_test = train_test_split(self.samples, self.samplelabels, test_size=test_size, random_state=60,shuffle=shuffle) samples_train = np.array(samples_train) samplelabels_train = np.array(samplelabels_train) samples_test = np.array(samples_test) samplelabels_test = np.array(samplelabels_test) samples_train = np.reshape(samples_train,(samples_train.shape[0]*samples_train.shape[1],samples_train.shape[2],samples_train.shape[3])) samplelabels_train = np.reshape(samplelabels_train,(samplelabels_train.shape[0]*samplelabels_train.shape[1],samplelabels_train.shape[2])) samples_test = np.reshape(samples_test,(samples_test.shape[0]*samples_test.shape[1],samples_test.shape[2],samples_test.shape[3])) samplelabels_test = np.reshape(samplelabels_test,(samplelabels_test.shape[0]*samplelabels_test.shape[1],samplelabels_test.shape[2])) return samples_train, samplelabels_train, samples_test, samplelabels_test
import logging import sys class LsassyFormatter(logging.Formatter): """ Custom formatting. Inspired by impacket "Logger" class """ def __init__(self): logging.Formatter.__init__(self, '%(bullet)s %(threadName)s %(message)s', None) def format(self, record): """ Custom bullet formatting with colors :param record: Record to log """ if record.levelno == logging.INFO: record.bullet = '\033[1;34m[*]\033[0m' elif record.levelno == logging.DEBUG: record.bullet = '\033[1;37m[*]\033[0m' elif record.levelno == logging.WARNING: record.bullet = '\033[1;33m[!]\033[0m' elif record.levelno == logging.ERROR: record.bullet = '\033[1;31m[x]\033[0m' else: record.bullet = '\033[1;32m[+]\033[0m' # Only log stacktrace when log level is DEBUG if record.exc_info and logging.getLogger().getEffectiveLevel() != logging.DEBUG: record.exc_info = None return logging.Formatter.format(self, record) def highlight(msg): """ Highlight in yellow provided message :param msg: Message to highlight :return: Highlighted message """ return "\033[1;33m{}\033[0m".format(msg) def init(quiet=False): """ StreamHandler and formatter added to root logger """ handler = logging.StreamHandler(sys.stdout) handler.setFormatter(LsassyFormatter()) logging.getLogger().addHandler(handler) logging.getLogger().setLevel(logging.INFO) logging.addLevelName(25, 'SUCCESS') setattr(logging, 'success', lambda message, *args: logging.getLogger()._log(25, message, args)) logging.getLogger().disabled = quiet
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0.00634,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0.00634,"31":0,"32":0,"33":0,"34":0,"35":0.01268,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0.00634,"48":0,"49":0,"50":0,"51":0,"52":0.03805,"53":0,"54":0,"55":0,"56":0.01268,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0.03171,"65":0.17758,"66":0,"67":0,"68":0.06342,"69":0,"70":0,"71":0.00634,"72":0.01268,"73":0,"74":0.00634,"75":0.00634,"76":0.01268,"77":0.26636,"78":0.84349,"79":0.03805,"80":0.00634,"81":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0.00634,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0.01268,"36":0,"37":0,"38":0.00634,"39":0,"40":0.01903,"41":0,"42":0,"43":0,"44":0.01268,"45":0,"46":0.00634,"47":0.00634,"48":0,"49":0.13952,"50":0,"51":0,"52":0,"53":0.01268,"54":0,"55":0,"56":0.00634,"57":0.00634,"58":0,"59":0.01268,"60":0.01268,"61":0,"62":0.06976,"63":0.03171,"64":0.01903,"65":0,"66":0,"67":0.00634,"68":0.01903,"69":0.08245,"70":0.03171,"71":0.8308,"72":0.33613,"73":0.17123,"74":0.06976,"75":0.04439,"76":0.08245,"77":0.03171,"78":0.12684,"79":0.1205,"80":0.38686,"81":0.1966,"83":12.50008,"84":7.4138,"85":0.00634,"86":0,"87":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0.00634,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0.00634,"29":0,"30":0.00634,"31":0,"32":0,"33":0.00634,"34":0,"35":0,"36":0.01268,"37":0.00634,"38":0,"39":0,"40":0.00634,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0.00634,"47":0,"48":0,"49":0,"50":0.10147,"51":0.00634,"52":0,"53":0.01268,"54":0.01268,"55":0,"56":0,"57":0.33613,"58":0.00634,"60":0.00634,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0.01903,"68":2.1436,"69":1.09082,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0.00634,"12.1":0.02537},G:{"8":0,"3.2":0.00131,"4.0-4.1":0.00131,"4.2-4.3":0.00131,"5.0-5.1":0.00394,"6.0-6.1":0.00131,"7.0-7.1":0.00525,"8.1-8.4":0.00788,"9.0-9.2":0.01051,"9.3":0.0867,"10.0-10.2":0.02233,"10.3":0.10509,"11.0-11.2":0.0775,"11.3-11.4":0.12217,"12.0-12.1":0.16552,"12.2-12.4":1.00756,"13.0-13.1":0.18785,"13.2":0.09195,"13.3":0.91824,"13.4-13.5":2.22006,_:"14.0"},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.00634,"12":0.03805,"13":0.11416,"14":0,_:"0","3.1":0,"3.2":0,"5.1":3.5642,"6.1":0,"7.1":0,"9.1":0,"10.1":0.01903,"11.1":0.00634,"12.1":0.06342,"13.1":0.65957},B:{"12":0,"13":0,"14":0.01268,"15":0.02537,"16":0.00634,"17":0.08245,"18":0.29807,"79":0,"80":0,"81":0,"83":0.06342,_:"84"},I:{"3":0,"4":0.02677,_:"81","2.1":0,"2.2":0,"2.3":0.00268,"4.1":0.0455,"4.2-4.3":0.07494,"4.4":0,"4.4.3-4.4.4":0.47375},P:{"4":0.96909,"5.0-5.4":0.10095,"6.2-6.4":0.10095,"7.2-7.4":0.26246,"8.2":0.07066,"9.2":0.35331,"10.1":0.1918,"11.1-11.2":0.64606,"12.0":0.45426},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0.36189,"9":0.00696,"10":0,"11":0.41756,"5.5":0},J:{"7":0,"10":0},N:{"10":0.01097,"11":0},R:{_:"0"},M:{"0":0.02926},Q:{"10.4":0.10974},O:{"0":1.5766},H:{"0":3.19649},L:{"0":40.79947},S:{"2.5":0}};
import React from 'react' import styled from 'styled-components' import { mainstyles, Title, SectionButton } from '../../utils' import styles from './contactform.module.css' export default function Form() { return ( <section className={styles.container}> <div className={styles.row}> <form className={styles.form} action="https://formspree.io/support@thebaileeapp.com" method="POST" > <Title title="Contact Us" /> <div classNamer={styles.group}> <input type="text" className={styles.input} placeholder="Name" namre="name" /> <input type="email" className={styles.input} placeholder="Email" name="_replyto" /> <textarea rows="6" className={styles.input} placeholder="Your Message" /> <div className={styles.btnwrapper}> <button className={styles.submit} type="submit"> Send </button> </div> </div> </form> </div> </section> ) }