text
stringlengths 3
1.05M
|
---|
/*!
* JavaScript Cookie v2.1.2
* https://github.com/js-cookie/js-cookie
*
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
* Released under the MIT license
*/
;(function (factory) {
if (typeof define === 'function' && define.amd) {
define(factory);
} else if (typeof exports === 'object') {
module.exports = factory();
} else {
var OldCookies = window.Cookies;
var api = window.Cookies = factory();
api.noConflict = function () {
window.Cookies = OldCookies;
return api;
};
}
}(function () {
function extend () {
var i = 0;
var result = {};
for (; i < arguments.length; i++) {
var attributes = arguments[ i ];
for (var key in attributes) {
result[key] = attributes[key];
}
}
return result;
}
function init (converter) {
function api (key, value, attributes) {
var result;
if (typeof document === 'undefined') {
return;
}
// Write
if (arguments.length > 1) {
attributes = extend({
path: '/'
}, api.defaults, attributes);
if (typeof attributes.expires === 'number') {
var expires = new Date();
expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
attributes.expires = expires;
}
try {
result = JSON.stringify(value);
if (/^[\{\[]/.test(result)) {
value = result;
}
} catch (e) {}
if (!converter.write) {
value = encodeURIComponent(String(value))
.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
} else {
value = converter.write(value, key);
}
key = encodeURIComponent(String(key));
key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
key = key.replace(/[\(\)]/g, escape);
return (document.cookie = [
key, '=', value,
attributes.expires ? '; expires=' + attributes.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
attributes.path ? '; path=' + attributes.path : '',
attributes.domain ? '; domain=' + attributes.domain : '',
attributes.secure ? '; secure' : ''
].join(''));
}
// Read
if (!key) {
result = {};
}
// To prevent the for loop in the first place assign an empty array
// in case there are no cookies at all. Also prevents odd result when
// calling "get()"
var cookies = document.cookie ? document.cookie.split('; ') : [];
var rdecode = /(%[0-9A-Z]{2})+/g;
var i = 0;
for (; i < cookies.length; i++) {
var parts = cookies[i].split('=');
var cookie = parts.slice(1).join('=');
if (cookie.charAt(0) === '"') {
cookie = cookie.slice(1, -1);
}
try {
var name = parts[0].replace(rdecode, decodeURIComponent);
cookie = converter.read ?
converter.read(cookie, name) : converter(cookie, name) ||
cookie.replace(rdecode, decodeURIComponent);
if (this.json) {
try {
cookie = JSON.parse(cookie);
} catch (e) {}
}
if (key === name) {
result = cookie;
break;
}
if (!key) {
result[name] = cookie;
}
} catch (e) {}
}
return result;
}
api.set = api;
api.get = function (key) {
return api(key);
};
api.getJSON = function () {
return api.apply({
json: true
}, [].slice.call(arguments));
};
api.defaults = {};
api.remove = function (key, attributes) {
api(key, '', extend(attributes, {
expires: -1
}));
};
api.withConverter = init;
return api;
}
return init(function () {});
}));
|
#!/usr/local/bin/python3
class Cat():
species = 'mamal'
def __init__(self, name, age):
self.name = name
self.age = age
# Instantiate the Cat object with 3 cats
cat1 = Cat('Tigger', 1)
cat2 = Cat('Smokey', 4)
cat3 = Cat('Patch', 10)
def oldest_cat(*args):
'''
INFO: Create a function that finds the oldest cat
'''
return max(args)
if __name__ == '__main__':
# 3 Print out: "The oldest cat is x years old.". x will be the oldest cat age by using the function
print(f'The oldest cat is {oldest_cat(cat1.age,cat2.age,cat3.age)}')
|
//>>built
define(
"dijit/form/nls/tr/ComboBox", //begin v1.x content
({
previousMessage: "Önceki seçenekler",
nextMessage: "Diğer seçenekler"
})
//end v1.x content
);
|
import numpy as np
import matplotlib.pyplot as plt
from numpy import vstack, array
from pylab import plot, show, savefig
import csv
import random
from scipy.cluster.vq import kmeans2, vq
import numpy_indexed as npi
import time
if __name__ == "__main__":
# read data as 2D array of data type 'np.float'
result = np.array(list(csv.reader(open("data-clustering-2.csv", "rb"), delimiter=","))).astype("float")
ti = []
colors = ['red', 'green', 'blue', 'cyan', 'orange']
X = result[0, :]
Y = result[1, :]
result = result.T
k = 0
while (k < 10):
start = time.time()
Ct = np.hstack(
(result, np.reshape(np.random.choice(range(0, 3), result.shape[0], replace=True), (result.shape[0], 1))))
meu = (npi.group_by(Ct[:, 2]).mean(Ct))[1][:, 0:2]
Converged = False
while Converged is False:
Converged = True
for j in range(0, Ct.shape[0]):
Cj = Ct[j, 2]
dmin = []
for i in range(0, 3):
Ct[j, 2] = i
G = (npi.group_by(Ct[:, 2])).split(Ct)
dist = 0
# print(G)
for p in range(0, 3):
t = (G[p][:, 0:2])
mi = np.reshape(np.mean(t, axis=0), (1, 2))
t = np.sum((t - mi) ** 2, axis=1)
dist = dist + np.sum(t, axis=0)
dmin.append(dist)
Cw = np.argmin(dmin)
if Cw != Cj:
Converged = False
Ct[j, 2] = Cw
meu = (npi.group_by(Ct[:, 2]).mean(Ct))[1][:, 0:2]
else:
Ct[j, 2] = Cj
end = time.time()
time_taken = end - start
ti.append(time_taken)
k = k + 1
print("time_taken")
print(sum(ti) / len(ti))
meu = np.hstack((meu, np.reshape(np.array(list(range(3))), (3, 1))))
cp = Ct
plt.title("Hartigan")
plt.xlim(xmin=np.min(Ct[:, 0]) - 1, xmax=np.max(1 + Ct[:, 0]))
plt.ylim(ymin=np.min(Ct[:, 1]) - 1, ymax=np.max(1 + Ct[:, 1]))
plt.scatter(Ct[:, 0], Ct[:, 1], c=[colors[i] for i in (Ct[:, 2]).astype(int)], s=5.5,
label='Points')
plt.scatter(meu[:, 0], meu[:, 1], c=[colors[i] for i in (meu[:, 2]).astype(int)], s=40,
marker='*', label='Centroids')
plt.savefig("Hartigan Clustering-2.pdf", facecolor='w', edgecolor='w',
papertype=None, format='pdf', transparent=False,
bbox_inches='tight', pad_inches=0.1)
plt.legend()
plt.show()
|
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var _pass = _interopRequireDefault(require("./pass"));
var RenderPass = function (_Pass) {
(0, _inherits2["default"])(RenderPass, _Pass);
function RenderPass(gl) {
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
(0, _classCallCheck2["default"])(this, RenderPass);
return (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(RenderPass).call(this, gl, Object.assign({
id: 'render-pass'
}, props)));
}
(0, _createClass2["default"])(RenderPass, [{
key: "_renderPass",
value: function _renderPass(_ref) {
var animationProps = _ref.animationProps;
var _this$props = this.props,
_this$props$models = _this$props.models,
models = _this$props$models === void 0 ? [] : _this$props$models,
drawParams = _this$props.drawParams;
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = models[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var model = _step.value;
model.draw(Object.assign({}, drawParams, {
animationProps: animationProps
}));
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
_iterator["return"]();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
}
}]);
return RenderPass;
}(_pass["default"]);
exports["default"] = RenderPass;
//# sourceMappingURL=render-pass.js.map |
import { dew as _toStringDewDew } from "./toString.dew.js";
var exports = {},
_dewExec = false;
export function dew() {
if (_dewExec) return exports;
_dewExec = true;
var toString = _toStringDewDew();
/**
* Replaces matches for `pattern` in `string` with `replacement`.
*
* **Note:** This method is based on
* [`String#replace`](https://mdn.io/String/replace).
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to modify.
* @param {RegExp|string} pattern The pattern to replace.
* @param {Function|string} replacement The match replacement.
* @returns {string} Returns the modified string.
* @example
*
* _.replace('Hi Fred', 'Fred', 'Barney');
* // => 'Hi Barney'
*/
function replace() {
var args = arguments,
string = toString(args[0]);
return args.length < 3 ? string : string.replace(args[1], args[2]);
}
exports = replace;
return exports;
} |
import discord
from discord.ext import commands
import asyncio
from googletrans import Translator
class Translation(commands.Cog):
def __init__(self,client):
self.client = client
@commands.cooldown(1,5,commands.BucketType.user)
@commands.command()
async def trans(self, ctx):
"""translation"""
first_run = True
translation = ctx.message.content[7:]
while True:
if first_run:
embed = discord.Embed(color=0x19212d)
icon = "https://i.imgur.com/6zMLSah.png"
embed = discord.Embed(color=0x1ccc09)
embed.set_thumbnail(url=icon)
embed.set_author(name="Traduzir")
embed.set_footer(text="Athus V1.0")
embed.add_field(name="Texto", value=translation, inline=True)
first_run = False
msg = await ctx.send(embed=embed)
reactmoji = []
reactmoji.extend(['🇺🇸'])
reactmoji.append('🇧🇷')
reactmoji.append('🇻🇳')
reactmoji.append('🇯🇵')
reactmoji.append('🇦🇲')
reactmoji.append('🇿🇦')
reactmoji.append('🇦🇱')
reactmoji.append('🇦🇴')
#exit
reactmoji.append('❌')
for react in reactmoji:
await msg.add_reaction(react)
def check_react(reaction, user):
if reaction.message.id != msg.id:
return False
if user != ctx.message.author:
return False
if str(reaction.emoji) not in reactmoji:
return False
return True
try:
res, user = await self.client.wait_for('reaction_add', timeout=30.0, check=check_react)
except asyncio.TimeoutError:
return await msg.clear_reactions()
if user != ctx.message.author:
pass
elif '🇺🇸' in str(res.emoji):
country = 'en'
translator = Translator()
traduzido=translator.translate(translation, dest=country)
embed = discord.Embed(color=0x19212d)
icon = "https://i.imgur.com/6zMLSah.png"
embed = discord.Embed(color=0x1ccc09)
embed.set_thumbnail(url=icon)
embed.set_author(name="Traduzido")
embed.set_footer(text="Athus V1.0")
embed.add_field(name="Texto", value=traduzido.text, inline=True)
await msg.clear_reactions()
await msg.edit(embed=embed)
elif '🇧🇷' in str(res.emoji):
country = 'pt'
translator = Translator()
traduzido=translator.translate(translation, dest=country)
embed = discord.Embed(color=0x19212d)
icon = "https://i.imgur.com/6zMLSah.png"
embed = discord.Embed(color=0x1ccc09)
embed.set_thumbnail(url=icon)
embed.set_author(name="Traduzido")
embed.set_footer(text="Athus V1.0")
embed.add_field(name="Texto", value=traduzido.text, inline=True)
await msg.clear_reactions()
await msg.edit(embed=embed)
elif '🇻🇳' in str(res.emoji):
country = 'zh-tw'
translator = Translator()
traduzido=translator.translate(translation, dest=country)
embed = discord.Embed(color=0x19212d)
icon = "https://i.imgur.com/6zMLSah.png"
embed = discord.Embed(color=0x1ccc09)
embed.set_thumbnail(url=icon)
embed.set_author(name="Traduzido")
embed.set_footer(text="Athus V1.0")
embed.add_field(name="Texto", value=traduzido.text, inline=True)
await msg.clear_reactions()
await msg.edit(embed=embed)
elif '🇯🇵' in str(res.emoji):
country = 'ja'
translator = Translator()
traduzido=translator.translate(translation, dest=country)
embed = discord.Embed(color=0x19212d)
icon = "https://i.imgur.com/6zMLSah.png"
embed = discord.Embed(color=0x1ccc09)
embed.set_thumbnail(url=icon)
embed.set_author(name="Traduzido")
embed.set_footer(text="Athus V1.0")
embed.add_field(name="Texto", value=traduzido.text, inline=True)
await msg.clear_reactions()
await msg.edit(embed=embed)
elif '🇦🇲' in str(res.emoji):
country = 'hy'
translator = Translator()
traduzido=translator.translate(translation, dest=country)
embed = discord.Embed(color=0x19212d)
icon = "https://i.imgur.com/6zMLSah.png"
embed = discord.Embed(color=0x1ccc09)
embed.set_thumbnail(url=icon)
embed.set_author(name="Traduzido")
embed.set_footer(text="Athus V1.0")
embed.add_field(name="Texto", value=traduzido.text, inline=True)
await msg.clear_reactions()
await msg.edit(embed=embed)
elif '🇿🇦' in str(res.emoji):
country = 'af'
translator = Translator()
traduzido=translator.translate(translation, dest=country)
embed = discord.Embed(color=0x19212d)
icon = "https://i.imgur.com/6zMLSah.png"
embed = discord.Embed(color=0x1ccc09)
embed.set_thumbnail(url=icon)
embed.set_author(name="Traduzido")
embed.set_footer(text="Athus V1.0")
embed.add_field(name="Texto", value=traduzido.text, inline=True)
await msg.clear_reactions()
await msg.edit(embed=embed)
elif '🇦🇱' in str(res.emoji):
country = 'sq'
translator = Translator()
traduzido=translator.translate(translation, dest=country)
embed = discord.Embed(color=0x19212d)
icon = "https://i.imgur.com/6zMLSah.png"
embed = discord.Embed(color=0x1ccc09)
embed.set_thumbnail(url=icon)
embed.set_author(name="Traduzido")
embed.set_footer(text="Athus V1.0")
embed.add_field(name="Texto", value=traduzido.text, inline=True)
await msg.clear_reactions()
await msg.edit(embed=embed)
elif '🇦🇴' in str(res.emoji):
country = 'am'
translator = Translator()
traduzido=translator.translate(translation, dest=country)
embed = discord.Embed(color=0x19212d)
icon = "https://i.imgur.com/6zMLSah.png"
embed = discord.Embed(color=0x1ccc09)
embed.set_thumbnail(url=icon)
embed.set_author(name="Traduzido")
embed.set_footer(text="Athus V1.0")
embed.add_field(name="Texto", value=traduzido.text, inline=True)
await msg.clear_reactions()
await msg.edit(embed=embed)
elif '❌' in str(res.emoji):
await ctx.message.delete()
return await msg.delete()
self.client.counter += 1
def setup(client):
client.add_cog(Translation(client)) |
/**
* @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';
// MAIN //
// Mapping from array constructors to data types...
var ctor2dtypes = {
'Float32Array': 'float32',
'Float64Array': 'float64',
'Array': 'generic',
'Int16Array': 'int16',
'Int32Array': 'int32',
'Int8Array': 'int8',
'Uint16Array': 'uint16',
'Uint32Array': 'uint32',
'Uint8Array': 'uint8',
'Uint8ClampedArray': 'uint8c'
};
// EXPORTS //
module.exports = ctor2dtypes;
|
# coding=utf-8
# Copyright 2018 The TF-Agents 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.
"""Tests for TF Agents reinforce_agent."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from absl.testing import parameterized
from absl.testing.absltest import mock
import tensorflow as tf # pylint: disable=g-explicit-tensorflow-version-import
import tensorflow_probability as tfp
from tf_agents.agents.reinforce import reinforce_agent
from tf_agents.networks import actor_distribution_rnn_network
from tf_agents.networks import network
from tf_agents.networks import utils as network_utils
from tf_agents.specs import tensor_spec
from tf_agents.trajectories import time_step as ts
from tf_agents.trajectories import trajectory
from tf_agents.utils import common
from tf_agents.utils import nest_utils
from tensorflow.python.util import nest # pylint:disable=g-direct-tensorflow-import # TF internal
class DummyActorNet(network.Network):
def __init__(self,
input_tensor_spec,
output_tensor_spec,
unbounded_actions=False,
stateful=False):
# When unbounded_actions=True, we skip the final tanh activation and the
# action shift and scale. This allows us to compute the actor and critic
# losses by hand more easily.
# If stateful=True, the network state has the same shape as
# `input_tensor_spec`. Otherwise it is empty.
state_spec = (tf.TensorSpec(input_tensor_spec.shape, tf.float32)
if stateful else ())
super(DummyActorNet, self).__init__(
input_tensor_spec=input_tensor_spec,
state_spec=state_spec,
name='DummyActorNet')
single_action_spec = tf.nest.flatten(output_tensor_spec)[0]
activation_fn = None if unbounded_actions else tf.nn.tanh
self._output_tensor_spec = output_tensor_spec
self._layers = [
tf.keras.layers.Dense(
single_action_spec.shape.num_elements() * 2,
activation=activation_fn,
kernel_initializer=tf.compat.v1.initializers.constant(
[[2, 1], [1, 1]]),
bias_initializer=tf.compat.v1.initializers.constant(5),
),
]
def call(self, observations, step_type, network_state):
del step_type
states = tf.cast(tf.nest.flatten(observations)[0], tf.float32)
for layer in self.layers:
states = layer(states)
single_action_spec = tf.nest.flatten(self._output_tensor_spec)[0]
actions, stdevs = states[..., 0], states[..., 1]
actions = tf.reshape(actions, [-1] + single_action_spec.shape.as_list())
stdevs = tf.reshape(stdevs, [-1] + single_action_spec.shape.as_list())
actions = tf.nest.pack_sequence_as(self._output_tensor_spec, [actions])
stdevs = tf.nest.pack_sequence_as(self._output_tensor_spec, [stdevs])
distribution = nest.map_structure_up_to(
self._output_tensor_spec, tfp.distributions.Normal, actions, stdevs)
return distribution, network_state
class DummyValueNet(network.Network):
def __init__(self, observation_spec, name=None, outer_rank=1):
super(DummyValueNet, self).__init__(observation_spec, (), 'DummyValueNet')
self._outer_rank = outer_rank
self._layers.append(
tf.keras.layers.Dense(
1,
kernel_initializer=tf.compat.v1.initializers.constant([2, 1]),
bias_initializer=tf.compat.v1.initializers.constant([5])))
def call(self, inputs, step_type=None, network_state=()):
del step_type
hidden_state = tf.cast(tf.nest.flatten(inputs), tf.float32)[0]
batch_squash = network_utils.BatchSquash(self._outer_rank)
hidden_state = batch_squash.flatten(hidden_state)
for layer in self.layers:
hidden_state = layer(hidden_state)
value_pred = tf.squeeze(batch_squash.unflatten(hidden_state), axis=-1)
return value_pred, network_state
class ReinforceAgentTest(tf.test.TestCase, parameterized.TestCase):
def setUp(self):
super(ReinforceAgentTest, self).setUp()
tf.compat.v1.enable_resource_variables()
self._obs_spec = tensor_spec.TensorSpec([2], tf.float32)
self._time_step_spec = ts.time_step_spec(self._obs_spec)
self._action_spec = tensor_spec.BoundedTensorSpec([1], tf.float32, -1, 1)
def testCreateAgent(self):
reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=DummyActorNet(
self._obs_spec, self._action_spec, unbounded_actions=False),
optimizer=None,
)
def testCreateAgentWithValueNet(self):
reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=DummyActorNet(
self._obs_spec, self._action_spec, unbounded_actions=False),
value_network=DummyValueNet(self._obs_spec),
value_estimation_loss_coef=0.5,
optimizer=None,
)
def testPolicyGradientLoss(self):
agent = reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=DummyActorNet(
self._obs_spec, self._action_spec, unbounded_actions=True),
optimizer=None,
)
observations = tf.constant([[1, 2], [3, 4]], dtype=tf.float32)
time_steps = ts.restart(observations, batch_size=2)
actions = tf.constant([[0], [1]], dtype=tf.float32)
actions_distribution = agent.collect_policy.distribution(
time_steps).action
returns = tf.constant([1.9, 1.0], dtype=tf.float32)
expected_loss = 10.983667373657227
loss = agent.policy_gradient_loss(
actions_distribution, actions, time_steps.is_last(), returns, 1)
self.evaluate(tf.compat.v1.global_variables_initializer())
loss_ = self.evaluate(loss)
self.assertAllClose(loss_, expected_loss)
def testPolicyGradientLossMultipleEpisodes(self):
agent = reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=DummyActorNet(
self._obs_spec, self._action_spec, unbounded_actions=True),
optimizer=None,
)
step_type = tf.constant(
[ts.StepType.FIRST, ts.StepType.LAST, ts.StepType.FIRST,
ts.StepType.LAST])
reward = tf.constant([0, 0, 0, 0], dtype=tf.float32)
discount = tf.constant([1, 1, 1, 1], dtype=tf.float32)
observations = tf.constant(
[[1, 2], [1, 2], [1, 2], [1, 2]], dtype=tf.float32)
time_steps = ts.TimeStep(step_type, reward, discount, observations)
actions = tf.constant([[0], [1], [2], [3]], dtype=tf.float32)
actions_distribution = agent.collect_policy.distribution(
time_steps).action
returns = tf.constant([1.9, 1.9, 1.0, 1.0], dtype=tf.float32)
expected_loss = 5.140229225158691
loss = agent.policy_gradient_loss(
actions_distribution, actions, time_steps.is_last(), returns, 2)
self.evaluate(tf.compat.v1.global_variables_initializer())
loss_ = self.evaluate(loss)
self.assertAllClose(loss_, expected_loss)
def testMaskingRewardSingleEpisodeRewardOnFirst(self):
# Test that policy_gradient_loss reacts correctly to rewards when there are:
# * A single MDP episode
# * Returns on the tf.StepType.FIRST transitions
#
# F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below.
#
# Experience looks like this:
# Trajectories: (F, L) -> (L, F)
# observation : [1, 2] [1, 2]
# action : [0] [1]
# reward : 3 0
# ~is_boundary: 1 0
# is_last : 1 0
# valid reward: 3*1 4*0
#
# The second action & reward should be masked out due to being on a
# boundary (step_type=(L, F)) transition.
#
# The expected_loss is > 0.0 in this case, only LAST should be excluded.
agent = reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=DummyActorNet(
self._obs_spec, self._action_spec, unbounded_actions=True),
optimizer=None,
)
step_type = tf.constant([ts.StepType.FIRST, ts.StepType.LAST])
reward = tf.constant([3, 4], dtype=tf.float32)
discount = tf.constant([1, 0], dtype=tf.float32)
observations = tf.constant([[1, 2], [1, 2]], dtype=tf.float32)
time_steps = ts.TimeStep(step_type, reward, discount, observations)
actions = tf.constant([[0], [1]], dtype=tf.float32)
actions_distribution = agent.collect_policy.distribution(
time_steps).action
returns = tf.constant([3.0, 0.0], dtype=tf.float32)
# Returns on the StepType.FIRST should be counted.
expected_loss = 10.8935775757
loss = agent.policy_gradient_loss(
actions_distribution, actions, time_steps.is_last(), returns, 1)
self.evaluate(tf.compat.v1.global_variables_initializer())
loss_ = self.evaluate(loss)
self.assertAllClose(loss_, expected_loss)
def testMaskingReturnSingleEpisodeRewardOnLast(self):
# Test that policy_gradient_loss reacts correctly to rewards when there are:
# * A single MDP episode
# * Returns on the tf.StepType.LAST transitions
#
# F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below.
#
# Experience looks like this:
# Trajectories: (F, L) -> (L, F)
# observation : [1, 2] [1, 2]
# action : [0] [1]
# reward : 0 3
# ~is_boundary: 1 0
# is_last : 1 0
# valid reward: 0*1 3*0
#
# The second action & reward should be masked out due to being on a
# boundary (step_type=(L, F)) transition. The first has a 0 reward.
#
# The expected_loss is 0.0 in this case.
agent = reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=DummyActorNet(
self._obs_spec, self._action_spec, unbounded_actions=True),
optimizer=None,
)
step_type = tf.constant([ts.StepType.FIRST, ts.StepType.LAST])
reward = tf.constant([0, 3], dtype=tf.float32)
discount = tf.constant([1, 0], dtype=tf.float32)
observations = tf.constant(
[[1, 2], [1, 2]], dtype=tf.float32)
time_steps = ts.TimeStep(step_type, reward, discount, observations)
actions = tf.constant([[0], [1]], dtype=tf.float32)
actions_distribution = agent.collect_policy.distribution(
time_steps).action
returns = tf.constant([0.0, 3.0], dtype=tf.float32)
# Returns on the StepType.LAST should not be counted.
expected_loss = 0.0
loss = agent.policy_gradient_loss(
actions_distribution, actions, time_steps.is_last(), returns, 1)
self.evaluate(tf.compat.v1.global_variables_initializer())
loss_ = self.evaluate(loss)
self.assertAllClose(loss_, expected_loss)
def testMaskingReturnMultipleEpisodesRewardOnFirst(self):
# Test that policy_gradient_loss reacts correctly to rewards when there are:
# * Multiple MDP episodes
# * Returns on the tf.StepType.FIRST transitions
#
# F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below.
#
# Experience looks like this:
# Trajectories: (F, L) -> (L, F) -> (F, L) -> (L, F)
# observation : [1, 2] [1, 2] [1, 2] [1, 2]
# action : [0] [1] [2] [3]
# reward : 3 0 4 0
# ~is_boundary: 1 0 1 0
# is_last : 1 0 1 0
# valid reward: 3*1 0*0 4*1 0*0
#
# The second & fourth action & reward should be masked out due to being on a
# boundary (step_type=(L, F)) transition.
#
# The expected_loss is > 0.0 in this case, only LAST should be excluded.
agent = reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=DummyActorNet(
self._obs_spec, self._action_spec, unbounded_actions=True),
optimizer=None,
)
step_type = tf.constant(
[ts.StepType.FIRST, ts.StepType.LAST, ts.StepType.FIRST,
ts.StepType.LAST])
reward = tf.constant([3, 0, 4, 0], dtype=tf.float32)
discount = tf.constant([1, 0, 1, 0], dtype=tf.float32)
observations = tf.constant(
[[1, 2], [1, 2], [1, 2], [1, 2]], dtype=tf.float32)
time_steps = ts.TimeStep(step_type, reward, discount, observations)
actions = tf.constant([[0], [1], [2], [3]], dtype=tf.float32)
actions_distribution = agent.collect_policy.distribution(
time_steps).action
returns = tf.constant([3.0, 0.0, 4.0, 0.0], dtype=tf.float32)
# Returns on the StepType.FIRST should be counted.
expected_loss = 12.2091741562
loss = agent.policy_gradient_loss(
actions_distribution, actions, time_steps.is_last(), returns, 2)
self.evaluate(tf.compat.v1.global_variables_initializer())
loss_ = self.evaluate(loss)
self.assertAllClose(loss_, expected_loss)
def testMaskingReturnMultipleEpisodesRewardOnLast(self):
# Test that policy_gradient_loss reacts correctly to returns when there are:
# * Multiple MDP episodes
# * Returns on the tf.StepType.LAST transitions
#
# F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below.
#
# Experience looks like this:
# Trajectories: (F, L) -> (L, F) -> (F, L) -> (L, F)
# observation : [1, 2] [1, 2] [1, 2] [1, 2]
# action : [0] [1] [2] [3]
# reward : 0 3 0 4
# ~is_boundary: 1 0 1 0
# is_last : 1 0 1 0
# valid reward: 0*1 3*0 0*1 4*0
#
# The second & fourth action & reward should be masked out due to being on a
# boundary (step_type=(L, F)) transition.
#
# The expected_loss is 0.0 in this case.
agent = reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=DummyActorNet(
self._obs_spec, self._action_spec, unbounded_actions=True),
optimizer=None,
)
step_type = tf.constant(
[ts.StepType.FIRST, ts.StepType.LAST, ts.StepType.FIRST,
ts.StepType.LAST])
reward = tf.constant([0, 3, 0, 4], dtype=tf.float32)
discount = tf.constant([1, 0, 1, 0], dtype=tf.float32)
observations = tf.constant(
[[1, 2], [1, 2], [1, 2], [1, 2]], dtype=tf.float32)
time_steps = ts.TimeStep(step_type, reward, discount, observations)
actions = tf.constant([[0], [1], [2], [3]], dtype=tf.float32)
actions_distribution = agent.collect_policy.distribution(
time_steps).action
returns = tf.constant([0.0, 3.0, 0.0, 4.0], dtype=tf.float32)
# Returns on the StepType.LAST should not be counted.
expected_loss = 0.0
loss = agent.policy_gradient_loss(
actions_distribution, actions, time_steps.is_last(), returns, 2)
self.evaluate(tf.compat.v1.global_variables_initializer())
loss_ = self.evaluate(loss)
self.assertAllClose(loss_, expected_loss)
@parameterized.parameters(
([[[0.8, 0.2]]], [1],),
([[[0.8, 0.2]], [[0.3, 0.7]]], [0.5, 0.5],),
)
def testEntropyLoss(self, probs, weights):
probs = tf.convert_to_tensor(probs)
distribution = tfp.distributions.Categorical(probs=probs)
shape = probs.shape.as_list()
action_spec = tensor_spec.TensorSpec(shape[2:-1], dtype=tf.int32)
expected = tf.reduce_mean(
-tf.reduce_mean(distribution.entropy()) * weights)
actual = reinforce_agent._entropy_loss(
distribution, action_spec, weights)
self.assertAlmostEqual(self.evaluate(actual), self.evaluate(expected),
places=4)
def testValueEstimationLoss(self):
agent = reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=DummyActorNet(
self._obs_spec, self._action_spec, unbounded_actions=False),
value_network=DummyValueNet(self._obs_spec),
value_estimation_loss_coef=0.5,
optimizer=None,
)
observations = tf.constant([[1, 2], [3, 4]], dtype=tf.float32)
time_steps = ts.restart(observations, batch_size=2)
returns = tf.constant([1.9, 1.0], dtype=tf.float32)
value_preds, _ = agent._value_network(time_steps.observation,
time_steps.step_type)
expected_loss = 123.20500
loss = agent.value_estimation_loss(
value_preds, returns, 1)
self.evaluate(tf.compat.v1.global_variables_initializer())
loss_ = self.evaluate(loss)
self.assertAllClose(loss_, expected_loss)
def testTrainMaskingRewardSingleBanditEpisode(self):
# Test that train reacts correctly to experience when there is only a
# single Bandit episode. Bandit episodes are encoded differently than
# MDP episodes. They have only a single transition with
# step_type=StepType.FIRST and next_step_type=StepType.LAST.
#
# F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below.
#
# Experience looks like this:
# Trajectories: (F, L)
# observation : [1, 2]
# action : [0]
# reward : 3
# ~is_boundary: 0
# is_last : 1
# valid reward: 3*1
#
# The single bandit transition is valid and not masked.
#
# The expected_loss is > 0.0 in this case, matching the expected_loss of the
# testMaskingRewardSingleEpisodeRewardOnFirst policy_gradient_loss test.
agent = reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=DummyActorNet(
self._obs_spec, self._action_spec, unbounded_actions=True),
optimizer=tf.compat.v1.train.AdamOptimizer(0.001),
use_advantage_loss=False,
normalize_returns=False,
)
step_type = tf.constant([ts.StepType.FIRST])
next_step_type = tf.constant([ts.StepType.LAST])
reward = tf.constant([3], dtype=tf.float32)
discount = tf.constant([0], dtype=tf.float32)
observations = tf.constant([[1, 2]], dtype=tf.float32)
actions = tf.constant([[0]], dtype=tf.float32)
experience = nest_utils.batch_nested_tensors(trajectory.Trajectory(
step_type, observations, actions, (), next_step_type, reward, discount))
# Rewards should be counted.
expected_loss = 10.8935775757
if tf.executing_eagerly():
loss = lambda: agent.train(experience)
else:
loss = agent.train(experience)
self.evaluate(tf.compat.v1.global_variables_initializer())
loss_info = self.evaluate(loss)
self.assertAllClose(loss_info.loss, expected_loss)
def testTrainMaskingRewardMultipleBanditEpisodes(self):
# Test that train reacts correctly to experience when there are multiple
# Bandit episodes. Bandit episodes are encoded differently than
# MDP episodes. They (each) have only a single transition with
# step_type=StepType.FIRST and next_step_type=StepType.LAST. This test
# helps ensure that LAST->FIRST->LAST transitions are handled correctly.
#
# F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below.
#
# Experience looks like this:
# Trajectories: (F, L) -> (F, L)
# observation : [1, 2] [1, 2]
# action : [0] [2]
# reward : 3 4
# ~is_boundary: 0 0
# is_last : 1 1
# valid reward: 3*1 4*1
#
# All bandit transitions are valid and none are masked.
#
# The expected_loss is > 0.0 in this case, matching the expected_loss of the
# testMaskingRewardMultipleEpisodesRewardOnFirst policy_gradient_loss test.
agent = reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=DummyActorNet(
self._obs_spec, self._action_spec, unbounded_actions=True),
optimizer=tf.compat.v1.train.AdamOptimizer(0.001),
use_advantage_loss=False,
normalize_returns=False,
)
step_type = tf.constant([ts.StepType.FIRST, ts.StepType.FIRST])
next_step_type = tf.constant([ts.StepType.LAST, ts.StepType.LAST])
reward = tf.constant([3, 4], dtype=tf.float32)
discount = tf.constant([0, 0], dtype=tf.float32)
observations = tf.constant([[1, 2], [1, 2]], dtype=tf.float32)
actions = tf.constant([[0], [2]], dtype=tf.float32)
experience = nest_utils.batch_nested_tensors(trajectory.Trajectory(
step_type, observations, actions, (), next_step_type, reward, discount))
# Rewards on the StepType.FIRST should be counted.
expected_loss = 12.2091741562
if tf.executing_eagerly():
loss = lambda: agent.train(experience)
else:
loss = agent.train(experience)
self.evaluate(tf.compat.v1.global_variables_initializer())
loss_info = self.evaluate(loss)
self.assertAllClose(loss_info.loss, expected_loss)
def testTrainMaskingRewardSingleEpisodeRewardOnFirst(self):
# Test that train reacts correctly to experience when there are:
# * A single MDP episode
# * Rewards on the tf.StepType.FIRST transitions
#
# F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below.
#
# Experience looks like this:
# Trajectories: (F, L) -> (L, F)
# observation : [1, 2] [1, 2]
# action : [0] [1]
# reward : 3 4
# ~is_boundary: 1 0
# is_last : 1 0
# valid reward: 3*1 4*0
#
# The second action & reward should be masked out due to being on a
# boundary (step_type=(L, F)) transition.
#
# The expected_loss is > 0.0 in this case, matching the expected_loss of the
# testMaskingRewardSingleEpisodeRewardOnFirst policy_gradient_loss test.
agent = reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=DummyActorNet(
self._obs_spec, self._action_spec, unbounded_actions=True),
optimizer=tf.compat.v1.train.AdamOptimizer(0.001),
use_advantage_loss=False,
normalize_returns=False,
)
step_type = tf.constant([ts.StepType.FIRST, ts.StepType.LAST])
next_step_type = tf.constant([ts.StepType.LAST, ts.StepType.FIRST])
reward = tf.constant([3, 4], dtype=tf.float32)
discount = tf.constant([1, 0], dtype=tf.float32)
observations = tf.constant([[1, 2], [1, 2]], dtype=tf.float32)
actions = tf.constant([[0], [1]], dtype=tf.float32)
experience = nest_utils.batch_nested_tensors(trajectory.Trajectory(
step_type, observations, actions, (), next_step_type, reward, discount))
# Rewards on the StepType.FIRST should be counted.
expected_loss = 10.8935775757
if tf.executing_eagerly():
loss = lambda: agent.train(experience)
else:
loss = agent.train(experience)
self.evaluate(tf.compat.v1.global_variables_initializer())
loss_info = self.evaluate(loss)
self.assertAllClose(loss_info.loss, expected_loss)
def testTrainMaskingRewardSingleEpisodeRewardOnLast(self):
# Test that train reacts correctly to experience when there are:
# * A single MDP episode
# * Rewards on the tf.StepType.LAST transitions
#
# F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below.
#
# Experience looks like this:
# Trajectories: (F, L) -> (L, F)
# observation : [1, 2] [1, 2]
# action : [0] [1]
# reward : 0 3
# ~is_boundary: 1 0
# is_last : 1 0
# valid reward: 0*1 3*0
#
# The second action & reward should be masked out due to being on a
# boundary (step_type=(L, F)) transition. The first has a 0 reward.
#
# The expected_loss is = 0.0 in this case.
agent = reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=DummyActorNet(
self._obs_spec, self._action_spec, unbounded_actions=True),
optimizer=tf.compat.v1.train.AdamOptimizer(0.001),
use_advantage_loss=False,
normalize_returns=False,
)
step_type = tf.constant([ts.StepType.FIRST, ts.StepType.LAST])
next_step_type = tf.constant([ts.StepType.LAST, ts.StepType.FIRST])
reward = tf.constant([0, 3], dtype=tf.float32)
discount = tf.constant([1, 0], dtype=tf.float32)
observations = tf.constant([[1, 2], [1, 2]], dtype=tf.float32)
actions = tf.constant([[0], [1]], dtype=tf.float32)
experience = nest_utils.batch_nested_tensors(trajectory.Trajectory(
step_type, observations, actions, (), next_step_type, reward, discount))
# Rewards on the StepType.LAST should not be counted.
expected_loss = 0.0
if tf.executing_eagerly():
loss = lambda: agent.train(experience)
else:
loss = agent.train(experience)
self.evaluate(tf.compat.v1.global_variables_initializer())
loss_info = self.evaluate(loss)
self.assertAllClose(loss_info.loss, expected_loss)
def testTrainMaskingRewardMultipleEpisodesRewardOnFirst(self):
# Test that train reacts correctly to experience when there are:
# * Multiple MDP episodes
# * Rewards on the tf.StepType.FIRST transitions
#
# F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below.
#
# Experience looks like this:
# Trajectories: (F, L) -> (L, F) -> (F, L) -> (L, F)
# observation : [1, 2] [1, 2] [1, 2] [1, 2]
# action : [0] [1] [2] [3]
# reward : 3 0 4 0
# ~is_boundary: 1 0 1 0
# is_last : 1 0 1 0
# valid reward: 3*1 0*0 4*1 0*0
#
# The second & fourth action & reward should be masked out due to being on a
# boundary (step_type=(L, F)) transition.
#
# The expected_loss is > 0.0 in this case, matching the expected_loss of the
# testMaskingRewardMultipleEpisodesRewardOnFirst policy_gradient_loss test.
agent = reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=DummyActorNet(
self._obs_spec, self._action_spec, unbounded_actions=True),
optimizer=tf.compat.v1.train.AdamOptimizer(0.001),
use_advantage_loss=False,
normalize_returns=False,
)
step_type = tf.constant([ts.StepType.FIRST, ts.StepType.LAST,
ts.StepType.FIRST, ts.StepType.LAST])
next_step_type = tf.constant([ts.StepType.LAST, ts.StepType.FIRST,
ts.StepType.LAST, ts.StepType.FIRST])
reward = tf.constant([3, 0, 4, 0], dtype=tf.float32)
discount = tf.constant([1, 0, 1, 0], dtype=tf.float32)
observations = tf.constant(
[[1, 2], [1, 2], [1, 2], [1, 2]], dtype=tf.float32)
actions = tf.constant([[0], [1], [2], [3]], dtype=tf.float32)
experience = nest_utils.batch_nested_tensors(trajectory.Trajectory(
step_type, observations, actions, (), next_step_type, reward, discount))
# Rewards on the StepType.FIRST should be counted.
expected_loss = 12.2091741562
if tf.executing_eagerly():
loss = lambda: agent.train(experience)
else:
loss = agent.train(experience)
self.evaluate(tf.compat.v1.global_variables_initializer())
loss_info = self.evaluate(loss)
self.assertAllClose(loss_info.loss, expected_loss)
def testTrainMaskingPartialEpisodeMultipleEpisodesRewardOnFirst(self):
# Test that train reacts correctly to experience when there are:
# * Multiple MDP episodes
# * Rewards on the tf.StepType.FIRST transitions
# * Partial episode at end of experience
#
# F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below.
#
# Experience looks like this:
# Trajectories: (F, L) -> (L, F) -> (F, M) -> (M, M)
# observation : [1, 2] [1, 2] [1, 2] [1, 2]
# action : [0] [1] [2] [3]
# reward : 3 0 4 0
# ~is_boundary: 1 0 1 1
# is_last : 1 0 0 0
# valid reward: 3*1 0*0 4*0 0*0
#
# The second action & reward should be masked out due to being on a
# boundary (step_type=(L, F)) transition. The third & fourth transitions
# should get masked out for everything due to it being an incomplete episode
# (notice there is no trailing step_type=(F,L)).
#
# The expected_loss is > 0.0 in this case, matching the expected_loss of the
# testMaskingRewardSingleEpisodeRewardOnFirst policy_gradient_loss test,
# because the partial second episode should be masked out.
agent = reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=DummyActorNet(
self._obs_spec, self._action_spec, unbounded_actions=True),
optimizer=tf.compat.v1.train.AdamOptimizer(0.001),
use_advantage_loss=False,
normalize_returns=False,
)
step_type = tf.constant([ts.StepType.FIRST, ts.StepType.LAST,
ts.StepType.FIRST, ts.StepType.MID])
next_step_type = tf.constant([ts.StepType.LAST, ts.StepType.FIRST,
ts.StepType.MID, ts.StepType.MID])
reward = tf.constant([3, 0, 4, 0], dtype=tf.float32)
discount = tf.constant([1, 0, 1, 0], dtype=tf.float32)
observations = tf.constant(
[[1, 2], [1, 2], [1, 2], [1, 2]], dtype=tf.float32)
actions = tf.constant([[0], [1], [2], [3]], dtype=tf.float32)
experience = nest_utils.batch_nested_tensors(trajectory.Trajectory(
step_type, observations, actions, (), next_step_type, reward, discount))
# Rewards on the StepType.FIRST should be counted.
expected_loss = 10.8935775757
if tf.executing_eagerly():
loss = lambda: agent.train(experience)
else:
loss = agent.train(experience)
self.evaluate(tf.compat.v1.global_variables_initializer())
loss_info = self.evaluate(loss)
self.assertAllClose(loss_info.loss, expected_loss)
def testTrainMaskingRewardMultipleEpisodesRewardOnLast(self):
# Test that train reacts correctly to experience when there are:
# * Multiple MDP episodes
# * Rewards on the tf.StepType.LAST transitions
#
# F, L, M = ts.StepType.{FIRST, MID, LAST} in the chart below.
#
# Experience looks like this:
# Trajectories: (F, L) -> (L, F) -> (F, L) -> (L, F)
# observation : [1, 2] [1, 2] [1, 2] [1, 2]
# action : [0] [1] [2] [3]
# reward : 0 3 0 4
# ~is_boundary: 1 0 1 0
# is_last : 1 0 1 0
# valid reward: 0*1 3*0 0*1 4*0
#
# The second & fourth action & reward should be masked out due to being on a
# boundary (step_type=(L, F)) transition.
#
# The expected_loss is = 0.0 in this case.
agent = reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=DummyActorNet(
self._obs_spec, self._action_spec, unbounded_actions=True),
optimizer=tf.compat.v1.train.AdamOptimizer(0.001),
use_advantage_loss=False,
normalize_returns=False,
)
step_type = tf.constant([ts.StepType.FIRST, ts.StepType.LAST,
ts.StepType.FIRST, ts.StepType.LAST])
next_step_type = tf.constant([ts.StepType.LAST, ts.StepType.FIRST,
ts.StepType.LAST, ts.StepType.FIRST])
reward = tf.constant([0, 3, 0, 4], dtype=tf.float32)
discount = tf.constant([1, 0, 1, 0], dtype=tf.float32)
observations = tf.constant(
[[1, 2], [1, 2], [1, 2], [1, 2]], dtype=tf.float32)
actions = tf.constant([[0], [1], [2], [3]], dtype=tf.float32)
experience = nest_utils.batch_nested_tensors(trajectory.Trajectory(
step_type, observations, actions, (), next_step_type, reward, discount))
# Rewards on the StepType.LAST should be counted.
expected_loss = 0.0
if tf.executing_eagerly():
loss = lambda: agent.train(experience)
else:
loss = agent.train(experience)
self.evaluate(tf.compat.v1.global_variables_initializer())
loss_info = self.evaluate(loss)
self.assertAllClose(loss_info.loss, expected_loss)
def testPolicy(self):
agent = reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=DummyActorNet(
self._obs_spec, self._action_spec, unbounded_actions=False),
optimizer=None,
)
observations = tf.constant([[1, 2]], dtype=tf.float32)
time_steps = ts.restart(observations, batch_size=2)
actions = agent.policy.action(time_steps).action
self.assertEqual(actions.shape.as_list(), [1, 1])
self.evaluate(tf.compat.v1.global_variables_initializer())
action_values = self.evaluate(actions)
tf.nest.map_structure(
lambda v, s: self.assertAllInRange(v, s.minimum, s.maximum),
action_values, self._action_spec)
@parameterized.parameters(
(False,),
(True,),
)
def testGetInitialPolicyState(self, stateful):
agent = reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=DummyActorNet(
self._obs_spec, self._action_spec, unbounded_actions=False,
stateful=stateful),
optimizer=None,
)
observations = tf.constant([[1, 2]], dtype=tf.float32)
time_steps = ts.restart(observations, batch_size=3)
initial_state = reinforce_agent._get_initial_policy_state(
agent.collect_policy, time_steps)
if stateful:
self.assertAllEqual(self.evaluate(initial_state),
self.evaluate(tf.zeros((3, 2), dtype=tf.float32)))
else:
self.assertEqual(initial_state, ())
def testTrainWithRnn(self):
actor_net = actor_distribution_rnn_network.ActorDistributionRnnNetwork(
self._obs_spec,
self._action_spec,
input_fc_layer_params=None,
output_fc_layer_params=None,
conv_layer_params=None,
lstm_size=(40,))
counter = common.create_variable('test_train_counter')
agent = reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=actor_net,
optimizer=tf.compat.v1.train.AdamOptimizer(0.001),
train_step_counter=counter
)
batch_size = 5
observations = tf.constant(
[[[1, 2], [3, 4], [5, 6]]] * batch_size, dtype=tf.float32)
time_steps = ts.TimeStep(
step_type=tf.constant([[1, 1, 2]] * batch_size, dtype=tf.int32),
reward=tf.constant([[1] * 3] * batch_size, dtype=tf.float32),
discount=tf.constant([[1] * 3] * batch_size, dtype=tf.float32),
observation=observations)
actions = tf.constant([[[0], [1], [1]]] * batch_size, dtype=tf.float32)
experience = trajectory.Trajectory(
time_steps.step_type, observations, actions, (),
time_steps.step_type, time_steps.reward, time_steps.discount)
# Force variable creation.
agent.policy.variables()
if tf.executing_eagerly():
loss = lambda: agent.train(experience)
else:
loss = agent.train(experience)
self.evaluate(tf.compat.v1.global_variables_initializer())
self.assertEqual(self.evaluate(counter), 0)
self.evaluate(loss)
self.assertEqual(self.evaluate(counter), 1)
@parameterized.parameters(
(False,), (True,)
)
def testWithAdvantageFn(self, with_value_network):
advantage_fn = mock.Mock(
side_effect=lambda returns, _: returns)
value_network = (DummyValueNet(self._obs_spec) if with_value_network
else None)
agent = reinforce_agent.ReinforceAgent(
self._time_step_spec,
self._action_spec,
actor_network=DummyActorNet(
self._obs_spec, self._action_spec, unbounded_actions=False),
value_network=value_network,
advantage_fn=advantage_fn,
optimizer=None,
)
step_type = tf.constant([[ts.StepType.FIRST, ts.StepType.LAST,
ts.StepType.FIRST, ts.StepType.LAST]])
next_step_type = tf.constant([[ts.StepType.LAST, ts.StepType.FIRST,
ts.StepType.LAST, ts.StepType.FIRST]])
reward = tf.constant([[0, 0, 0, 0]], dtype=tf.float32)
discount = tf.constant([[1, 1, 1, 1]], dtype=tf.float32)
observations = tf.constant(
[[[1, 2], [1, 2], [1, 2], [1, 2]]], dtype=tf.float32)
actions = tf.constant([[[0], [1], [2], [3]]], dtype=tf.float32)
experience = trajectory.Trajectory(
step_type, observations, actions, (), next_step_type, reward, discount)
agent.total_loss(experience, reward, None)
advantage_fn.assert_called_once()
if __name__ == '__main__':
tf.test.main()
|
// 12.4.2017 mko
// Berechnung des Konfigurierten Sortiertermes
$(document).ready(function () {
$("#btnSave").click(function () {
let AppFolder = $("#AppFolder").attr("value");
let rpnFName = $("#rpnFName").attr("value");
let ControllerName = $("#ControllerName").attr("value");
let pnWithoutFunction = $("#pnWithoutFunction").attr("value");
let desc = $("#SortDescending").prop('checked');
let ParamTag = $("#ParamTag").attr("value");
let pn = pnWithoutFunction + ' ' + rpnFName + ' ' + ParamTag + ' ' + (desc ? "desc" : "asc");
let uri = AppFolder + ControllerName + '/Index' + '?pn=' + encodeURI(pn);
//window.location.href = uri;
window.location.assign(uri);
});
});
|
"""Utilities for writing code that runs on Python 2 and 3"""
# Copyright (c) 2010-2015 Benjamin Peterson
#
# 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 functools
import itertools
import operator
import sys
import types
__author__ = "Benjamin Peterson <[email protected]>"
__version__ = "1.9.0"
# Useful for very coarse version differentiation.
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
if PY3:
string_types = str,
integer_types = int,
class_types = type,
text_type = str
binary_type = bytes
MAXSIZE = sys.maxsize
else:
string_types = str,
integer_types = (int, int)
class_types = (type, type)
text_type = str
binary_type = str
if sys.platform.startswith("java"):
# Jython always uses 32 bits.
MAXSIZE = int((1 << 31) - 1)
else:
# It's possible to have sizeof(long) != sizeof(Py_ssize_t).
class X(object):
def __len__(self):
return 1 << 31
try:
len(X())
except OverflowError:
# 32-bit
MAXSIZE = int((1 << 31) - 1)
else:
# 64-bit
MAXSIZE = int((1 << 63) - 1)
del X
def _add_doc(func, doc):
"""Add documentation to a function."""
func.__doc__ = doc
def _import_module(name):
"""Import module, returning the module after the last dot."""
__import__(name)
return sys.modules[name]
class _LazyDescr(object):
def __init__(self, name):
self.name = name
def __get__(self, obj, tp):
result = self._resolve()
setattr(obj, self.name, result) # Invokes __set__.
try:
# This is a bit ugly, but it avoids running this again by
# removing this descriptor.
delattr(obj.__class__, self.name)
except AttributeError:
pass
return result
class MovedModule(_LazyDescr):
def __init__(self, name, old, new=None):
super(MovedModule, self).__init__(name)
if PY3:
if new is None:
new = name
self.mod = new
else:
self.mod = old
def _resolve(self):
return _import_module(self.mod)
def __getattr__(self, attr):
_module = self._resolve()
value = getattr(_module, attr)
setattr(self, attr, value)
return value
class _LazyModule(types.ModuleType):
def __init__(self, name):
super(_LazyModule, self).__init__(name)
self.__doc__ = self.__class__.__doc__
def __dir__(self):
attrs = ["__doc__", "__name__"]
attrs += [attr.name for attr in self._moved_attributes]
return attrs
# Subclasses should override this
_moved_attributes = []
class MovedAttribute(_LazyDescr):
def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None):
super(MovedAttribute, self).__init__(name)
if PY3:
if new_mod is None:
new_mod = name
self.mod = new_mod
if new_attr is None:
if old_attr is None:
new_attr = name
else:
new_attr = old_attr
self.attr = new_attr
else:
self.mod = old_mod
if old_attr is None:
old_attr = name
self.attr = old_attr
def _resolve(self):
module = _import_module(self.mod)
return getattr(module, self.attr)
class _SixMetaPathImporter(object):
"""
A meta path importer to import six.moves and its submodules.
This class implements a PEP302 finder and loader. It should be compatible
with Python 2.5 and all existing versions of Python3
"""
def __init__(self, six_module_name):
self.name = six_module_name
self.known_modules = {}
def _add_module(self, mod, *fullnames):
for fullname in fullnames:
self.known_modules[self.name + "." + fullname] = mod
def _get_module(self, fullname):
return self.known_modules[self.name + "." + fullname]
def find_module(self, fullname, path=None):
if fullname in self.known_modules:
return self
return None
def __get_module(self, fullname):
try:
return self.known_modules[fullname]
except KeyError:
raise ImportError("This loader does not know module " + fullname)
def load_module(self, fullname):
try:
# in case of a reload
return sys.modules[fullname]
except KeyError:
pass
mod = self.__get_module(fullname)
if isinstance(mod, MovedModule):
mod = mod._resolve()
else:
mod.__loader__ = self
sys.modules[fullname] = mod
return mod
def is_package(self, fullname):
"""
Return true, if the named module is a package.
We need this method to get correct spec objects with
Python 3.4 (see PEP451)
"""
return hasattr(self.__get_module(fullname), "__path__")
def get_code(self, fullname):
"""Return None
Required, if is_package is implemented"""
self.__get_module(fullname) # eventually raises ImportError
return None
get_source = get_code # same as get_code
_importer = _SixMetaPathImporter(__name__)
class _MovedItems(_LazyModule):
"""Lazy loading of moved objects"""
__path__ = [] # mark as package
_moved_attributes = [
MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"),
MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"),
MovedAttribute("filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"),
MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"),
MovedAttribute("intern", "__builtin__", "sys"),
MovedAttribute("map", "itertools", "builtins", "imap", "map"),
MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"),
MovedAttribute("reload_module", "__builtin__", "imp", "reload"),
MovedAttribute("reduce", "__builtin__", "functools"),
MovedAttribute("shlex_quote", "pipes", "shlex", "quote"),
MovedAttribute("StringIO", "StringIO", "io"),
MovedAttribute("UserDict", "UserDict", "collections"),
MovedAttribute("UserList", "UserList", "collections"),
MovedAttribute("UserString", "UserString", "collections"),
MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"),
MovedAttribute("zip", "itertools", "builtins", "izip", "zip"),
MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"),
MovedModule("builtins", "__builtin__"),
MovedModule("configparser", "ConfigParser"),
MovedModule("copyreg", "copy_reg"),
MovedModule("dbm_gnu", "gdbm", "dbm.gnu"),
MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread"),
MovedModule("http_cookiejar", "cookielib", "http.cookiejar"),
MovedModule("http_cookies", "Cookie", "http.cookies"),
MovedModule("html_entities", "htmlentitydefs", "html.entities"),
MovedModule("html_parser", "HTMLParser", "html.parser"),
MovedModule("http_client", "httplib", "http.client"),
MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"),
MovedModule("email_mime_nonmultipart", "email.MIMENonMultipart", "email.mime.nonmultipart"),
MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"),
MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"),
MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"),
MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"),
MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"),
MovedModule("cPickle", "cPickle", "pickle"),
MovedModule("queue", "Queue"),
MovedModule("reprlib", "repr"),
MovedModule("socketserver", "SocketServer"),
MovedModule("_thread", "thread", "_thread"),
MovedModule("tkinter", "Tkinter"),
MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"),
MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"),
MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"),
MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"),
MovedModule("tkinter_tix", "Tix", "tkinter.tix"),
MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"),
MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"),
MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"),
MovedModule("tkinter_colorchooser", "tkColorChooser",
"tkinter.colorchooser"),
MovedModule("tkinter_commondialog", "tkCommonDialog",
"tkinter.commondialog"),
MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"),
MovedModule("tkinter_font", "tkFont", "tkinter.font"),
MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"),
MovedModule("tkinter_tksimpledialog", "tkSimpleDialog",
"tkinter.simpledialog"),
MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"),
MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"),
MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"),
MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"),
MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"),
MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"),
MovedModule("winreg", "_winreg"),
]
for attr in _moved_attributes:
setattr(_MovedItems, attr.name, attr)
if isinstance(attr, MovedModule):
_importer._add_module(attr, "moves." + attr.name)
del attr
_MovedItems._moved_attributes = _moved_attributes
moves = _MovedItems(__name__ + ".moves")
_importer._add_module(moves, "moves")
class Module_six_moves_urllib_parse(_LazyModule):
"""Lazy loading of moved objects in six.moves.urllib_parse"""
_urllib_parse_moved_attributes = [
MovedAttribute("ParseResult", "urlparse", "urllib.parse"),
MovedAttribute("SplitResult", "urlparse", "urllib.parse"),
MovedAttribute("parse_qs", "urlparse", "urllib.parse"),
MovedAttribute("parse_qsl", "urlparse", "urllib.parse"),
MovedAttribute("urldefrag", "urlparse", "urllib.parse"),
MovedAttribute("urljoin", "urlparse", "urllib.parse"),
MovedAttribute("urlparse", "urlparse", "urllib.parse"),
MovedAttribute("urlsplit", "urlparse", "urllib.parse"),
MovedAttribute("urlunparse", "urlparse", "urllib.parse"),
MovedAttribute("urlunsplit", "urlparse", "urllib.parse"),
MovedAttribute("quote", "urllib", "urllib.parse"),
MovedAttribute("quote_plus", "urllib", "urllib.parse"),
MovedAttribute("unquote", "urllib", "urllib.parse"),
MovedAttribute("unquote_plus", "urllib", "urllib.parse"),
MovedAttribute("urlencode", "urllib", "urllib.parse"),
MovedAttribute("splitquery", "urllib", "urllib.parse"),
MovedAttribute("splittag", "urllib", "urllib.parse"),
MovedAttribute("splituser", "urllib", "urllib.parse"),
MovedAttribute("uses_fragment", "urlparse", "urllib.parse"),
MovedAttribute("uses_netloc", "urlparse", "urllib.parse"),
MovedAttribute("uses_params", "urlparse", "urllib.parse"),
MovedAttribute("uses_query", "urlparse", "urllib.parse"),
MovedAttribute("uses_relative", "urlparse", "urllib.parse"),
]
for attr in _urllib_parse_moved_attributes:
setattr(Module_six_moves_urllib_parse, attr.name, attr)
del attr
Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes
_importer._add_module(Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse"),
"moves.urllib_parse", "moves.urllib.parse")
class Module_six_moves_urllib_error(_LazyModule):
"""Lazy loading of moved objects in six.moves.urllib_error"""
_urllib_error_moved_attributes = [
MovedAttribute("URLError", "urllib2", "urllib.error"),
MovedAttribute("HTTPError", "urllib2", "urllib.error"),
MovedAttribute("ContentTooShortError", "urllib", "urllib.error"),
]
for attr in _urllib_error_moved_attributes:
setattr(Module_six_moves_urllib_error, attr.name, attr)
del attr
Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes
_importer._add_module(Module_six_moves_urllib_error(__name__ + ".moves.urllib.error"),
"moves.urllib_error", "moves.urllib.error")
class Module_six_moves_urllib_request(_LazyModule):
"""Lazy loading of moved objects in six.moves.urllib_request"""
_urllib_request_moved_attributes = [
MovedAttribute("urlopen", "urllib2", "urllib.request"),
MovedAttribute("install_opener", "urllib2", "urllib.request"),
MovedAttribute("build_opener", "urllib2", "urllib.request"),
MovedAttribute("pathname2url", "urllib", "urllib.request"),
MovedAttribute("url2pathname", "urllib", "urllib.request"),
MovedAttribute("getproxies", "urllib", "urllib.request"),
MovedAttribute("Request", "urllib2", "urllib.request"),
MovedAttribute("OpenerDirector", "urllib2", "urllib.request"),
MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"),
MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"),
MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"),
MovedAttribute("ProxyHandler", "urllib2", "urllib.request"),
MovedAttribute("BaseHandler", "urllib2", "urllib.request"),
MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"),
MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"),
MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"),
MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"),
MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"),
MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"),
MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"),
MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"),
MovedAttribute("HTTPHandler", "urllib2", "urllib.request"),
MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"),
MovedAttribute("FileHandler", "urllib2", "urllib.request"),
MovedAttribute("FTPHandler", "urllib2", "urllib.request"),
MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"),
MovedAttribute("UnknownHandler", "urllib2", "urllib.request"),
MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"),
MovedAttribute("urlretrieve", "urllib", "urllib.request"),
MovedAttribute("urlcleanup", "urllib", "urllib.request"),
MovedAttribute("URLopener", "urllib", "urllib.request"),
MovedAttribute("FancyURLopener", "urllib", "urllib.request"),
MovedAttribute("proxy_bypass", "urllib", "urllib.request"),
]
for attr in _urllib_request_moved_attributes:
setattr(Module_six_moves_urllib_request, attr.name, attr)
del attr
Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes
_importer._add_module(Module_six_moves_urllib_request(__name__ + ".moves.urllib.request"),
"moves.urllib_request", "moves.urllib.request")
class Module_six_moves_urllib_response(_LazyModule):
"""Lazy loading of moved objects in six.moves.urllib_response"""
_urllib_response_moved_attributes = [
MovedAttribute("addbase", "urllib", "urllib.response"),
MovedAttribute("addclosehook", "urllib", "urllib.response"),
MovedAttribute("addinfo", "urllib", "urllib.response"),
MovedAttribute("addinfourl", "urllib", "urllib.response"),
]
for attr in _urllib_response_moved_attributes:
setattr(Module_six_moves_urllib_response, attr.name, attr)
del attr
Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes
_importer._add_module(Module_six_moves_urllib_response(__name__ + ".moves.urllib.response"),
"moves.urllib_response", "moves.urllib.response")
class Module_six_moves_urllib_robotparser(_LazyModule):
"""Lazy loading of moved objects in six.moves.urllib_robotparser"""
_urllib_robotparser_moved_attributes = [
MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"),
]
for attr in _urllib_robotparser_moved_attributes:
setattr(Module_six_moves_urllib_robotparser, attr.name, attr)
del attr
Module_six_moves_urllib_robotparser._moved_attributes = _urllib_robotparser_moved_attributes
_importer._add_module(Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser"),
"moves.urllib_robotparser", "moves.urllib.robotparser")
class Module_six_moves_urllib(types.ModuleType):
"""Create a six.moves.urllib namespace that resembles the Python 3 namespace"""
__path__ = [] # mark as package
parse = _importer._get_module("moves.urllib_parse")
error = _importer._get_module("moves.urllib_error")
request = _importer._get_module("moves.urllib_request")
response = _importer._get_module("moves.urllib_response")
robotparser = _importer._get_module("moves.urllib_robotparser")
def __dir__(self):
return ['parse', 'error', 'request', 'response', 'robotparser']
_importer._add_module(Module_six_moves_urllib(__name__ + ".moves.urllib"),
"moves.urllib")
def add_move(move):
"""Add an item to six.moves."""
setattr(_MovedItems, move.name, move)
def remove_move(name):
"""Remove item from six.moves."""
try:
delattr(_MovedItems, name)
except AttributeError:
try:
del moves.__dict__[name]
except KeyError:
raise AttributeError("no such move, %r" % (name,))
if PY3:
_meth_func = "__func__"
_meth_self = "__self__"
_func_closure = "__closure__"
_func_code = "__code__"
_func_defaults = "__defaults__"
_func_globals = "__globals__"
else:
_meth_func = "im_func"
_meth_self = "im_self"
_func_closure = "func_closure"
_func_code = "func_code"
_func_defaults = "func_defaults"
_func_globals = "func_globals"
try:
advance_iterator = next
except NameError:
def advance_iterator(it):
return it.__next__()
next = advance_iterator
try:
callable = callable
except NameError:
def callable(obj):
return any("__call__" in klass.__dict__ for klass in type(obj).__mro__)
if PY3:
def get_unbound_function(unbound):
return unbound
create_bound_method = types.MethodType
Iterator = object
else:
def get_unbound_function(unbound):
return unbound.__func__
def create_bound_method(func, obj):
return types.MethodType(func, obj, obj.__class__)
class Iterator(object):
def __next__(self):
return type(self).__next__(self)
callable = callable
_add_doc(get_unbound_function,
"""Get the function out of a possibly unbound function""")
get_method_function = operator.attrgetter(_meth_func)
get_method_self = operator.attrgetter(_meth_self)
get_function_closure = operator.attrgetter(_func_closure)
get_function_code = operator.attrgetter(_func_code)
get_function_defaults = operator.attrgetter(_func_defaults)
get_function_globals = operator.attrgetter(_func_globals)
if PY3:
def iterkeys(d, **kw):
return iter(d.keys(**kw))
def itervalues(d, **kw):
return iter(d.values(**kw))
def iteritems(d, **kw):
return iter(d.items(**kw))
def iterlists(d, **kw):
return iter(d.lists(**kw))
viewkeys = operator.methodcaller("keys")
viewvalues = operator.methodcaller("values")
viewitems = operator.methodcaller("items")
else:
def iterkeys(d, **kw):
return iter(d.iterkeys(**kw))
def itervalues(d, **kw):
return iter(d.itervalues(**kw))
def iteritems(d, **kw):
return iter(d.iteritems(**kw))
def iterlists(d, **kw):
return iter(d.iterlists(**kw))
viewkeys = operator.methodcaller("viewkeys")
viewvalues = operator.methodcaller("viewvalues")
viewitems = operator.methodcaller("viewitems")
_add_doc(iterkeys, "Return an iterator over the keys of a dictionary.")
_add_doc(itervalues, "Return an iterator over the values of a dictionary.")
_add_doc(iteritems,
"Return an iterator over the (key, value) pairs of a dictionary.")
_add_doc(iterlists,
"Return an iterator over the (key, [values]) pairs of a dictionary.")
if PY3:
def b(s):
return s.encode("latin-1")
def u(s):
return s
chr = chr
if sys.version_info[1] <= 1:
def int2byte(i):
return bytes((i,))
else:
# This is about 2x faster than the implementation above on 3.2+
int2byte = operator.methodcaller("to_bytes", 1, "big")
byte2int = operator.itemgetter(0)
indexbytes = operator.getitem
iterbytes = iter
import io
StringIO = io.StringIO
BytesIO = io.BytesIO
_assertCountEqual = "assertCountEqual"
_assertRaisesRegex = "assertRaisesRegex"
_assertRegex = "assertRegex"
else:
def b(s):
return s
# Workaround for standalone backslash
def u(s):
return str(s.replace(r'\\', r'\\\\'), "unicode_escape")
chr = chr
int2byte = chr
def byte2int(bs):
return ord(bs[0])
def indexbytes(buf, i):
return ord(buf[i])
iterbytes = functools.partial(itertools.imap, ord)
import io
StringIO = BytesIO = io.StringIO
_assertCountEqual = "assertItemsEqual"
_assertRaisesRegex = "assertRaisesRegexp"
_assertRegex = "assertRegexpMatches"
_add_doc(b, """Byte literal""")
_add_doc(u, """Text literal""")
def assertCountEqual(self, *args, **kwargs):
return getattr(self, _assertCountEqual)(*args, **kwargs)
def assertRaisesRegex(self, *args, **kwargs):
return getattr(self, _assertRaisesRegex)(*args, **kwargs)
def assertRegex(self, *args, **kwargs):
return getattr(self, _assertRegex)(*args, **kwargs)
if PY3:
exec_ = getattr(moves.builtins, "exec")
def reraise(tp, value, tb=None):
if value is None:
value = tp()
if value.__traceback__ is not tb:
raise value.with_traceback(tb)
raise value
else:
def exec_(_code_, _globs_=None, _locs_=None):
"""Execute code in a namespace."""
if _globs_ is None:
frame = sys._getframe(1)
_globs_ = frame.f_globals
if _locs_ is None:
_locs_ = frame.f_locals
del frame
elif _locs_ is None:
_locs_ = _globs_
exec("""exec _code_ in _globs_, _locs_""")
exec_("""def reraise(tp, value, tb=None):
raise tp, value, tb
""")
if sys.version_info[:2] == (3, 2):
exec_("""def raise_from(value, from_value):
if from_value is None:
raise value
raise value from from_value
""")
elif sys.version_info[:2] > (3, 2):
exec_("""def raise_from(value, from_value):
raise value from from_value
""")
else:
def raise_from(value, from_value):
raise value
print_ = getattr(moves.builtins, "print", None)
if print_ is None:
def print_(*args, **kwargs):
"""The new-style print function for Python 2.4 and 2.5."""
fp = kwargs.pop("file", sys.stdout)
if fp is None:
return
def write(data):
if not isinstance(data, str):
data = str(data)
# If the file has an encoding, encode unicode with it.
if (isinstance(fp, file) and
isinstance(data, str) and
fp.encoding is not None):
errors = getattr(fp, "errors", None)
if errors is None:
errors = "strict"
data = data.encode(fp.encoding, errors)
fp.write(data)
want_unicode = False
sep = kwargs.pop("sep", None)
if sep is not None:
if isinstance(sep, str):
want_unicode = True
elif not isinstance(sep, str):
raise TypeError("sep must be None or a string")
end = kwargs.pop("end", None)
if end is not None:
if isinstance(end, str):
want_unicode = True
elif not isinstance(end, str):
raise TypeError("end must be None or a string")
if kwargs:
raise TypeError("invalid keyword arguments to print()")
if not want_unicode:
for arg in args:
if isinstance(arg, str):
want_unicode = True
break
if want_unicode:
newline = str("\n")
space = str(" ")
else:
newline = "\n"
space = " "
if sep is None:
sep = space
if end is None:
end = newline
for i, arg in enumerate(args):
if i:
write(sep)
write(arg)
write(end)
if sys.version_info[:2] < (3, 3):
_print = print_
def print_(*args, **kwargs):
fp = kwargs.get("file", sys.stdout)
flush = kwargs.pop("flush", False)
_print(*args, **kwargs)
if flush and fp is not None:
fp.flush()
_add_doc(reraise, """Reraise an exception.""")
if sys.version_info[0:2] < (3, 4):
def wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS,
updated=functools.WRAPPER_UPDATES):
def wrapper(f):
f = functools.wraps(wrapped, assigned, updated)(f)
f.__wrapped__ = wrapped
return f
return wrapper
else:
wraps = functools.wraps
def with_metaclass(meta, *bases):
"""Create a base class with a metaclass."""
# This requires a bit of explanation: the basic idea is to make a dummy
# metaclass for one level of class instantiation that replaces itself with
# the actual metaclass.
class metaclass(meta):
def __new__(cls, name, this_bases, d):
return meta(name, bases, d)
return type.__new__(metaclass, 'temporary_class', (), {})
def add_metaclass(metaclass):
"""Class decorator for creating a class with a metaclass."""
def wrapper(cls):
orig_vars = cls.__dict__.copy()
slots = orig_vars.get('__slots__')
if slots is not None:
if isinstance(slots, str):
slots = [slots]
for slots_var in slots:
orig_vars.pop(slots_var)
orig_vars.pop('__dict__', None)
orig_vars.pop('__weakref__', None)
return metaclass(cls.__name__, cls.__bases__, orig_vars)
return wrapper
def python_2_unicode_compatible(klass):
"""
A decorator that defines __unicode__ and __str__ methods under Python 2.
Under Python 3 it does nothing.
To support Python 2 and 3 with a single code base, define a __str__ method
returning text and apply this decorator to the class.
"""
if PY2:
if '__str__' not in klass.__dict__:
raise ValueError("@python_2_unicode_compatible cannot be applied "
"to %s because it doesn't define __str__()." %
klass.__name__)
klass.__unicode__ = klass.__str__
klass.__str__ = lambda self: self.__unicode__().encode('utf-8')
return klass
# Complete the moves implementation.
# This code is at the end of this module to speed up module loading.
# Turn this module into a package.
__path__ = [] # required for PEP 302 and PEP 451
__package__ = __name__ # see PEP 366 @ReservedAssignment
if globals().get("__spec__") is not None:
__spec__.submodule_search_locations = [] # PEP 451 @UndefinedVariable
# Remove other six meta path importers, since they cause problems. This can
# happen if six is removed from sys.modules and then reloaded. (Setuptools does
# this for some reason.)
if sys.meta_path:
for i, importer in enumerate(sys.meta_path):
# Here's some real nastiness: Another "instance" of the six module might
# be floating around. Therefore, we can't use isinstance() to check for
# the six meta path importer, since the other six instance will have
# inserted an importer with different class.
if (type(importer).__name__ == "_SixMetaPathImporter" and
importer.name == __name__):
del sys.meta_path[i]
break
del i, importer
# Finally, add the importer to the meta path import hook.
sys.meta_path.append(_importer)
|
import React from 'react';
import SortColumn, { SortByDirection } from '../../SortColumn';
import { css } from '@patternfly/react-styles';
import styles from '@patternfly/patternfly/components/Table/table.css';
import buttonStyles from '@patternfly/patternfly/components/Button/button.css';
export default (label, { columnIndex, column, property }) => {
const {
extraParams: { sortBy, onSort }
} = column;
const extraData = {
columnIndex,
column,
property
};
const isSortedBy = sortBy && columnIndex === sortBy.index;
function sortClicked(event) {
let reversedDirection;
if (!isSortedBy) {
reversedDirection = SortByDirection.asc;
} else {
reversedDirection = sortBy.direction === SortByDirection.asc ? SortByDirection.desc : SortByDirection.asc;
}
onSort && onSort(event, columnIndex, reversedDirection, extraData);
}
return {
className: css(styles.tableSort, isSortedBy && styles.modifiers.selected),
'aria-sort': isSortedBy ? `${sortBy.direction}ending` : 'none',
children: (
<SortColumn
isSortedBy={isSortedBy}
sortDirection={isSortedBy ? sortBy.direction : ''}
onSort={sortClicked}
className={css(buttonStyles.button, buttonStyles.modifiers.plain)}
>
{label}
</SortColumn>
)
};
};
|
//
// Tests autosplit locations with force : true, for small collections
//
(function() {
'use strict';
var st = new ShardingTest(
{shards: 1, mongos: 1, other: {chunkSize: 1, mongosOptions: {noAutoSplit: ""}}});
var mongos = st.s0;
var admin = mongos.getDB("admin");
var config = mongos.getDB("config");
var shardAdmin = st.shard0.getDB("admin");
var coll = mongos.getCollection("foo.bar");
assert.commandWorked(admin.runCommand({enableSharding: coll.getDB() + ""}));
assert.commandWorked(admin.runCommand({shardCollection: coll + "", key: {_id: 1}}));
assert.commandWorked(admin.runCommand({split: coll + "", middle: {_id: 0}}));
jsTest.log("Insert a bunch of data into the low chunk of a collection," +
" to prevent relying on stats.");
var data128k = "x";
for (var i = 0; i < 7; i++)
data128k += data128k;
var bulk = coll.initializeUnorderedBulkOp();
for (var i = 0; i < 1024; i++) {
bulk.insert({_id: -(i + 1)});
}
assert.writeOK(bulk.execute());
jsTest.log("Insert 32 docs into the high chunk of a collection");
bulk = coll.initializeUnorderedBulkOp();
for (var i = 0; i < 32; i++) {
bulk.insert({_id: i});
}
assert.writeOK(bulk.execute());
jsTest.log("Split off MaxKey chunk...");
assert.commandWorked(admin.runCommand({split: coll + "", middle: {_id: 32}}));
jsTest.log("Keep splitting chunk multiple times...");
st.printShardingStatus();
for (var i = 0; i < 5; i++) {
assert.commandWorked(admin.runCommand({split: coll + "", find: {_id: 0}}));
st.printShardingStatus();
}
// Make sure we can't split further than 5 (2^5) times
assert.commandFailed(admin.runCommand({split: coll + "", find: {_id: 0}}));
var chunks = config.chunks.find({'min._id': {$gte: 0, $lt: 32}}).sort({min: 1}).toArray();
printjson(chunks);
// Make sure the chunks grow by 2x (except the first)
var nextSize = 1;
for (var i = 0; i < chunks.size; i++) {
assert.eq(coll.count({_id: {$gte: chunks[i].min._id, $lt: chunks[i].max._id}}), nextSize);
if (i != 0)
nextSize += nextSize;
}
st.stop();
})();
|
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import nodemailer from 'nodemailer';
import { Action, ActionResult } from '../';
export const EMAIL_ACTION_ID = 'xpack-notifications-email';
/**
* Email Action enables generic sending of emails, when configured.
*/
export class EmailAction extends Action {
/**
* Create a new Action capable of sending emails.
*
* @param {Object} server Kibana server object.
* @param {Object} options Configuration options for Nodemailer.
* @param {Object} defaults Default fields used when sending emails.
* @param {Object} _nodemailer Exposed for tests.
*/
constructor({ server, options, defaults = { }, _nodemailer = nodemailer }) {
super({ server, id: EMAIL_ACTION_ID, name: 'Email' });
this.transporter = _nodemailer.createTransport(options, defaults);
this.defaults = defaults;
}
getMissingFields(notification) {
const missingFields = [];
if (!Boolean(this.defaults.to) && !Boolean(notification.to)) {
missingFields.push({
field: 'to',
name: 'To',
type: 'email',
});
}
if (!Boolean(this.defaults.from) && !Boolean(notification.from)) {
missingFields.push({
field: 'from',
name: 'From',
type: 'email',
});
}
if (!Boolean(notification.subject)) {
missingFields.push({
field: 'subject',
name: 'Subject',
type: 'text',
});
}
if (!Boolean(notification.markdown)) {
missingFields.push({
field: 'markdown',
name: 'Body',
type: 'markdown',
});
}
return missingFields;
}
async doPerformHealthCheck() {
// this responds with a boolean 'true' response, otherwise throws an Error
const response = await this.transporter.verify();
return new ActionResult({
message: `Email action SMTP configuration has been verified.`,
response: {
verified: response
},
});
}
async doPerformAction(notification) {
// Note: This throws an Error upon failure
const response = await this.transporter.sendMail({
// email routing
from: notification.from,
to: notification.to,
cc: notification.cc,
bcc: notification.bcc,
// email content
subject: notification.subject,
html: notification.markdown,
text: notification.markdown,
});
return new ActionResult({
message: `Sent email for '${notification.subject}'.`,
response,
});
}
}
|
var path = require('path');
module.exports = {
mode: 'production',
context: path.join(__dirname, '/dist'),
entry: './client.js',
output: {
path: path.join(__dirname, '/browser'),
filename: 'client.js',
library: 'SubscriptionsTransportWs'
}
};
|
"""
Print out Py-ART version information.
This file can also be run as a script to report on dependencies before a
build: python pyart/_debug_info.py
"""
from __future__ import print_function
import os
import sys
def _debug_info(stream=None):
"""
Print out version and status information for debugging.
This file can be run as a script from the source directory to report on
dependecies before a build using: **python pyart/_debug_info.py**.
Parameters
----------
stream : file-like object
Stream to print the information to, None prints to sys.stdout.
"""
if stream is None:
stream = sys.stdout
# remove the current path from the import search path
# if this is not done ./io is found and not the std library io module.
current_dir = os.path.dirname(os.path.abspath(__file__))
if current_dir in sys.path:
sys.path.remove(current_dir)
try:
import pyart
pyart_version = pyart.__version__
except:
pyart_version = "MISSING"
try:
import platform
python_version = platform.python_version()
except:
python_version = "MISSING"
try:
import numpy
numpy_version = numpy.__version__
except:
numpy_version = "MISSING"
try:
import numpy
numpy_version = numpy.__version__
except:
numpy_version = "MISSING"
try:
import scipy
scipy_version = scipy.__version__
except:
scipy_version = "MISSING"
try:
import matplotlib
matplotlib_version = matplotlib.__version__
except:
matplotlib_version = "MISSING"
try:
import netCDF4
netCDF4_version = netCDF4.__version__
except:
netCDF4_version = "MISSING"
try:
rsl_version = pyart.io._rsl_interface._RSL_VERSION_STR
except:
rsl_version = "MISSING"
try:
import cylp
cylp_available = "Available"
except:
cylp_available = "MISSING"
try:
import glpk
glpk_version = "%i.%i" % (glpk.env.version)
except:
glpk_version = "MISSING"
try:
import cvxopt.info
cvxopt_version = cvxopt.info.version
except:
cvxopt_version = "MISSING"
try:
from mpl_toolkits import basemap
basemap_version = basemap.__version__
except:
basemap_version = "MISSING"
try:
import nose
nose_version = nose.__version__
except:
nose_version = "MISSING"
print("Py-ART version:", pyart_version, file=stream)
print("", file=stream)
print("---- Dependencies ----", file=stream)
print("Python version:", python_version, file=stream)
print("NumPy version:", numpy_version, file=stream)
print("SciPy version:", scipy_version, file=stream)
print("matplotlib version:", matplotlib_version, file=stream)
print("netCDF4 version:", netCDF4_version, file=stream)
print("", file=stream)
print("---- Optional dependencies ----", file=stream)
print("TRMM RSL version:", rsl_version, file=stream)
print("CyLP:", cylp_available, file=stream)
print("PyGLPK version:", glpk_version, file=stream)
print("CVXOPT version:", cvxopt_version, file=stream)
print("basemap version:", basemap_version, file=stream)
print("nose version:", nose_version, file=stream)
if __name__ == "__main__":
_debug_info()
|
/**
* @category saltcorn-data
* @module models/user
* @subcategory models
*/
const db = require("../db");
const bcrypt = require("bcryptjs");
const { contract, is } = require("contractis");
const { v4: uuidv4 } = require("uuid");
const dumbPasswords = require("dumb-passwords");
const validator = require("email-validator");
/**
* @param {object} o
* @returns {*}
*/
const safeUserFields = (o) => {
const {
email,
password,
language,
_attributes,
api_token,
verification_token,
verified_on,
disabled,
id,
reset_password_token,
reset_password_expiry,
role_id,
...rest
} = o;
return rest;
};
/**
* User
* @category saltcorn-data
*/
class User {
/**
* User constructor
* @param {object} o
*/
constructor(o) {
this.email = o.email;
this.password = o.password;
this.language = o.language;
this._attributes =
typeof o._attributes === "string"
? JSON.parse(o._attributes)
: o._attributes || {};
this.api_token = o.api_token;
this.verification_token = o.verification_token;
this.verified_on = ["string", "number"].includes(typeof o.verified_on)
? new Date(o.verified_on)
: o.verified_on;
this.disabled = !!o.disabled;
this.id = o.id ? +o.id : o.id;
this.reset_password_token = o.reset_password_token || null;
this.reset_password_expiry =
(typeof o.reset_password_expiry === "string" &&
o.reset_password_expiry.length > 0) ||
typeof o.reset_password_expiry === "number"
? new Date(o.reset_password_expiry)
: o.reset_password_expiry || null;
this.role_id = o.role_id ? +o.role_id : 8;
Object.assign(this, safeUserFields(o));
contract.class(this);
}
/**
* Get bcrypt hash for Password
* @param pw - password string
* @returns {Promise<string>}
*/
static async hashPassword(pw) {
return await bcrypt.hash(pw, 10);
}
/**
* Check password
* @param pw - password string
* @returns {boolean}
*/
checkPassword(pw) {
return bcrypt.compareSync(pw, this.password);
}
/**
* Change password
* @param newpw - new password string
* @param expireToken - if true than force reset password token
* @returns {Promise<void>} no result
*/
async changePasswordTo(newpw, expireToken) {
const password = await User.hashPassword(newpw);
this.password = password;
const upd = { password };
if (expireToken) upd.reset_password_token = null;
await db.update("users", upd, this.id);
}
/**
* Find or Create User
* @param k
* @param v
* @param {object} [uo = {}]
* @returns {Promise<{session_object: {_attributes: {}}, _attributes: {}}|User|*|boolean|{error: string}|User>}
*/
static async findOrCreateByAttribute(k, v, uo = {}) {
const u = await User.findOne({ _attributes: { json: [k, v] } });
if (u) return u;
else {
const { getState } = require("../db/state");
const email_mask = getState().getConfig("email_mask");
if (email_mask && uo.email) {
const { check_email_mask } = require("./config");
if (!check_email_mask(uo.email)) {
return false;
}
}
const new_user_form = getState().getConfig("new_user_form");
if (new_user_form) {
// cannot create user, return pseudo-user
const pseudoUser = { ...uo, _attributes: { [k]: v } };
return { ...pseudoUser, session_object: pseudoUser };
} else {
const extra = {};
if (!uo.password) extra.password = User.generate_password();
return await User.create({ ...uo, ...extra, _attributes: { [k]: v } });
}
}
}
/**
* Create user
* @param uo - user object
* @returns {Promise<{error: string}|User>}
*/
static async create(uo) {
const { email, password, passwordRepeat, role_id, ...rest } = uo;
const u = new User({ email, password, role_id });
if (User.unacceptable_password_reason(u.password))
return {
error:
"Password not accepted: " +
User.unacceptable_password_reason(u.password),
};
const hashpw = await User.hashPassword(u.password);
const ex = await User.findOne({ email: u.email });
if (ex) return { error: `User with this email already exists` };
const id = await db.insert("users", {
email: u.email,
password: hashpw,
role_id: u.role_id,
...rest,
});
u.id = id;
return u;
}
/**
* Create session object for user
* @type {{role_id: number, language, id, email, tenant: *}}
*/
get session_object() {
const so = {
email: this.email,
id: this.id,
role_id: this.role_id,
language: this.language,
tenant: db.getTenantSchema(),
};
Object.assign(so, safeUserFields(this));
return so;
}
/**
* Authenticate User
* @param uo - user object
* @returns {Promise<boolean|User>}
*/
static async authenticate(uo) {
const { password, ...uoSearch } = uo;
const urows = await User.find(uoSearch, { limit: 2 });
if (urows.length !== 1) return false;
const [urow] = urows;
if (urow.disabled) return false;
const cmp = urow.checkPassword(password || "");
if (cmp) return new User(urow);
else return false;
}
/**
* Find users list
* @param where - where object
* @param selectopts - select options
* @returns {Promise<User[]>}
*/
static async find(where, selectopts) {
const us = await db.select("users", where, selectopts);
return us.map((u) => new User(u));
}
/**
* Find one user
* @param where - where object
* @returns {Promise<User|*>}
*/
static async findOne(where) {
const u = await db.selectMaybeOne("users", where);
return u ? new User(u) : u;
}
/**
* Check that user table is not empty in database
* @deprecated use method count()
* @returns {Promise<boolean>} true if there are users in db
*/
static async nonEmpty() {
const res = await db.count("users");
return res > 0;
}
/**
* Delete user based on session object
* @returns {Promise<void>}
*/
async delete() {
const schema = db.getTenantSchemaPrefix();
this.destroy_sessions();
await db.query(`delete FROM ${schema}users WHERE id = $1`, [this.id]);
}
/**
* Set language for User in database
* @param language
* @returns {Promise<void>}
*/
async set_language(language) {
await this.update({ language });
}
/**
* Update User
* @param row
* @returns {Promise<void>}
*/
async update(row) {
await db.update("users", row, this.id);
}
/**
* Get new reset token
* @returns {Promise<*|string>}
*/
async getNewResetToken() {
const reset_password_token_uuid = uuidv4();
const reset_password_expiry = new Date();
reset_password_expiry.setDate(new Date().getDate() + 1);
const reset_password_token = await bcrypt.hash(
reset_password_token_uuid,
10
);
await db.update(
"users",
{ reset_password_token, reset_password_expiry },
this.id
);
return reset_password_token_uuid;
}
/**
* Add new API token to user
* @returns {Promise<string>}
*/
async getNewAPIToken() {
const api_token = uuidv4();
await db.update("users", { api_token }, this.id);
this.api_token = api_token;
return api_token;
}
/**
* Remove API token for user
* @returns {Promise<string>}
*/
async removeAPIToken() {
const api_token = null;
await db.update("users", { api_token }, this.id);
this.api_token = api_token;
return api_token;
}
/**
* Validate password
* @param pw
* @returns {string}
*/
static unacceptable_password_reason(pw) {
if (typeof pw !== "string") return "Not a string";
if (pw.length < 8) return "Too short";
if (dumbPasswords.check(pw)) return "Too common";
}
/**
* Validate email
* @param email
* @returns {boolean}
*/
// TBD that validation works
static valid_email(email) {
return validator.validate(email);
}
/**
* Verification with token
* @param email - email sting
* @param verification_token - verification token string
* @returns {Promise<{error: string}|boolean>} true if verification passed, error string if not
*/
static async verifyWithToken({ email, verification_token }) {
if (
typeof verification_token !== "string" ||
typeof email !== "string" ||
verification_token.length < 10 ||
!email
)
return { error: "Invalid token" };
const u = await User.findOne({ email, verification_token });
if (!u) return { error: "Invalid token" };
return await u.set_to_verified();
}
/**
* @returns {Promise<boolean>}
*/
async set_to_verified() {
const upd = { verified_on: new Date() };
const { getState } = require("../db/state");
const elevate_verified = +getState().getConfig("elevate_verified");
if (elevate_verified)
upd.role_id = Math.min(elevate_verified, this.role_id);
await db.update("users", upd, this.id);
Object.assign(this, upd);
const Trigger = require("./trigger");
Trigger.emitEvent("UserVerified", null, this, this);
return true;
}
/**
* Reset password using token
* @param email - email address string
* @param reset_password_token - reset password token string
* @param password
* @returns {Promise<{error: string}|{success: boolean}>}
*/
static async resetPasswordWithToken({
email,
reset_password_token,
password,
}) {
if (
typeof reset_password_token !== "string" ||
typeof email !== "string" ||
reset_password_token.length < 10
)
return {
error: "Invalid token or invalid token length or incorrect email",
};
const u = await User.findOne({ email });
if (u && new Date() < u.reset_password_expiry && u.reset_password_token) {
const match = bcrypt.compareSync(
reset_password_token,
u.reset_password_token
);
if (match) {
if (User.unacceptable_password_reason(password))
return {
error:
"Password not accepted: " +
User.unacceptable_password_reason(password),
};
await u.changePasswordTo(password, true);
return { success: true };
} else return { error: "User not found or expired token" };
} else {
return { error: "User not found or expired token" };
}
}
/**
* Count users in database
* @param where
* @returns {Promise<number>}
*/
// TBD I think that method is simular to notEmppty() but more powerfull.
// TBD use some rules for naming of methods - e.g. this method will have name count_users or countUsers because of methods relay on roles in this class
static async count(where) {
return await db.count("users", where || {});
}
/**
* Get available roles
* @returns {Promise<*>}
*/
static async get_roles() {
const rs = await db.select("_sc_roles", {}, { orderBy: "id" });
return rs;
}
/**
* Generate password
* @returns {string}
*/
static generate_password() {
const candidate = is.str.generate().split(" ").join("");
// TBD low performance impact - un
if (candidate.length < 10) return User.generate_password();
else return candidate;
}
/**
* @returns {Promise<void>}
*/
async destroy_sessions() {
if (!db.isSQLite) {
const schema = db.getTenantSchema();
await db.query(
`delete from _sc_session
where sess->'passport'->'user'->>'id' = $1
and sess->'passport'->'user'->>'tenant' = $2`,
[`${this.id}`, schema]
);
}
}
/**
* @param {object} req
*/
relogin(req) {
req.login(this.session_object, function (err) {
if (err) req.flash("danger", err);
});
}
}
User.contract = {
variables: {
id: is.maybe(is.posint),
email: is.str,
//password: is.str,
disabled: is.bool,
language: is.maybe(is.str),
_attributes: is.maybe(is.obj({})),
role_id: is.posint,
reset_password_token: is.maybe(
is.and(
is.str,
is.sat((s) => s.length > 10)
)
),
reset_password_expiry: is.maybe(is.class("Date")),
},
methods: {
delete: is.fun([], is.promise(is.undefined)),
destroy_sessions: is.fun([], is.promise(is.undefined)),
changePasswordTo: is.fun(is.str, is.promise(is.undefined)),
checkPassword: is.fun(is.str, is.bool),
},
static_methods: {
find: is.fun(is.maybe(is.obj()), is.promise(is.array(is.class("User")))),
findOne: is.fun(is.obj(), is.promise(is.maybe(is.class("User")))),
nonEmpty: is.fun([], is.promise(is.bool)),
hashPassword: is.fun(is.str, is.promise(is.str)),
authenticate: is.fun(
is.objVals(is.str),
is.promise(is.or(is.class("User"), is.eq(false)))
),
verifyWithToken: is.fun(
is.obj({ email: is.str, verification_token: is.str }),
is.promise(is.any)
),
resetPasswordWithToken: is.fun(
is.obj({ email: is.str, reset_password_token: is.str, password: is.str }),
is.promise(is.any)
),
create: is.fun(
is.obj({ email: is.str }),
is.promise(is.or(is.obj({ error: is.str }), is.class("User")))
),
get_roles: is.fun(
[],
is.promise(is.array(is.obj({ id: is.posint, role: is.str })))
),
},
};
module.exports = User;
|
let hist = Array()
let hist_id = 0
let prev_command = ""
///// Firebase parameters /////
const database = firebase.database();
const provider = new firebase.auth.GoogleAuthProvider();
//provider.addScope('https://www.googleapis.com/auth/plus.login');
const userLogin = { name: "hackntu" }
const emailregex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
/* new var and config [Start] */
let commands = [];
// window.commands = commands;
Vue.config.debug = true
Vue.config.devtools = true
/* new var and config [End] */
let Prompt = {
template: `
<div :id="promptId" class="cmd">
<span id="p-h">{{ name }}@taipei</span>
<span id="p-t"> {{ time }}</span>
<span id="p-d" > {{ dir }} </span>
<span id="p-s">$</span >
<span id="p-text">{{ text }}</span >
<template id="control" v-if="control">
<span id="_front" >{{front}}</span><span id="cursor">{{cursorText}}</span ><span id="_back">{{back}}</span >
<input @keyup.stop.prevent="keyup($event)" type="text" id="command" v-model="input"></input>
</template>
</div >
`,
created() {
this.time = new Date().toTimeString().substring(0, 5)
console.log("Prompted.")
},
data() {
return {
// hr: '',
// min: '',
dir: '~',
time: '10:00', //debug
input: '123456', //test
cursorIndex: 0,
}
},
props: {
control: Boolean,
text: String,
index: Number,
},
watch: {
cursorIndex() {
if (this.cursorIndex > 0)
this.cursorIndex = 0
if (-this.cursorIndex > this.input.length)
this.cursorIndex = -this.input.length
},
},
computed: {
name: () => userLogin.name,
promptId: () => 'prompt-' + this.index,
front() {
return ((this.cursorIndex < 0) ? this.input.slice(0, this.cursorIndex) : this.input)
},
cursorText() {
return ((this.cursorIndex < 0) ? this.input.substr((this.cursorIndex), 1) : ' ')
},
back() {
return ((this.cursorIndex < -1) ? this.input.slice(this.cursorIndex + 1) : '')
},
},
methods: {
moveCursor(dir) {
if (dir === 'left')
this.cursorIndex -= 1
if (dir === 'right')
this.cursorIndex += 1
},
enter() {
console.log("Enter here again")
commands.push({ 'text': this.input }); // need content
// if (this.input.length == 0)
// return;
this.$parent.run(this.input)
this.input = '' //clean input
this.cursorIndex = 0
},
keyup(e) {
switch (e.which) {
case 37: // Left
this.moveCursor('left')
break;
case 39: // Right
this.moveCursor('right')
break;
case 13: // Enter
this.enter()
break;
default:
break;
}
},
}
}
let Prompts = new Vue({
el: '#prompts',
template: `
<div id="console">
<template v-for="(command, index) in commands">
<prompt :index="index + 1" :text="command.text"></prompt>
</template>
<prompt :index="0" :control="control"></prompt>
</div>
`,
components: {
Prompt,
},
created() {
// Blinks the cursor
setInterval(function() {
if ($('#cursor').css('background-color') == 'rgb(255, 255, 255)') {
$('#cursor').css('background-color', 'transparent')
} else {
$('#cursor').css('background-color', 'white')
}
}, 500)
$('#command').focus()
$(document).keydown(function(e) {
$('#command').focus();
})
},
data() {
return {
dir: '~',
control: true,
}
},
computed: {
name: () => userLogin.name,
commands: () => commands,
},
methods: {
run(command) {
this.control = false
console.log("Get command:", command)
for (let prop in law) {
if (law.hasOwnProperty(prop) && law[prop].reg.test(command)) {
law[prop].exec(command)
return;
}
}
this.done()
},
done() {
this.$nextTick(function() {
this.control = true
})
},
}
});
/*
function prompt(dir = '~') {
let date = new Date()
let hr = date.getHours().toString()
if (date.getHours() < 10)
hr = "0" + hr
let min = date.getMinutes().toString()
if (date.getMinutes() < 10)
min = "0" + min
$('#console').append('<div id="prompt" class="cmd"><span id="p-h">' + userLogin.name + '@taipei</span> <span id="p-t">' +
hr + ':' + min + '</span> ' +
'<span id="p-d">' + dir + '</span> <span id="p-s">$</span> <span id="control">' +
'<span id="_front"></span><span id="cursor"></span>' +
'<input type="text" id="command"></input><span id="_back"></span></span></div>')
$('#command').focus()
console.log("Prompted.")
}
*/
$(function() {
// prompt()
$("#greeting-typed-1").typed({
stringsElement: $('#greeting-1'),
showCursor: false,
typeSpeed: 10,
callback: function() {
$("#greeting-typed-2").typed({
stringsElement: $('#greeting-2'),
showCursor: false,
typeSpeed: 10,
callback: function() {
//prompt();
}
})
}
});
});
/*
$(document).keyup(function(e) {
let front = $('#_front').text()
let back = $('#_back').text()
if (e.which == 37) { // Left
if (back.length > 0) {
$('#_front').text(front.slice(0, -1))
$('#_back').text(front.slice(-1) + back)
}
} else if (e.which == 38) { // Up
if (hist_id > 0) {
$('#_front').text(hist[hist_id - 1])
$('#_back').text("")
}
if (hist_id == hist.length) {
prev_command = front + back
}
hist_id = Math.max(hist_id - 1, 0);
} else if (e.which == 39) { // Right
if (back.length > 0) {
$('#_front').text(front + back[0])
$('#_back').text(back.slice(1))
}
} else if (e.which == 40) { // Down
if (hist_id < hist.length - 1) {
$('#_front').text(hist[hist_id + 1])
$('#_back').text("")
} else { // Fill in previous command.
$('#_front').text(prev_command)
$('#_back').text("")
}
hist_id = Math.min(hist_id + 1, hist.length)
} else if (e.which == 13) { // Enter
console.log("Enter here again")
let com = front + back
// Remove old control & rename line id
$('#control').remove()
$('#prompt').append('<span>' + com + '</span>')
$('#prompt').attr('id', 'line-' + hist_id)
prev_command = ""
if (com.length == 0)
return;
runcommand(com)
hist.push(com)
hist_id = hist.length
} else if (e.which == 8) { // BackSpace
$('#_front').text(front.slice(0, -1))
e.preventDefault();
} else {
$('#_front').text(front + $('#command').val())
// console.log("Get input:", $('#command').val())
$('#command').val("")
}
})
*/
/*
$(document).keydown(function(e) {
$('#command').focus();
})
// Blinks the cursor
setInterval(function() {
if ($('#cursor').css('background-color') == 'rgb(255, 255, 255)') {
$('#cursor').css('background-color', 'transparent')
} else {
$('#cursor').css('background-color', 'white')
}
}, 500)
*/
var law = {
bye: {
reg: /^bye$/,
exec: function() {
if (confirm("Ready to say goodbye?")) {
setInterval(function() {
window.open('about:blank','_self');
}, 500)
}
doneCommand()
}
},
contact: {
reg: /^contact$/,
exec: function() {
function loadUserMeta(meta, column, regex) {
return new Promise((resolve, reject) => {
$('#console').append('<div class="interactive cmd">' + column +
': <input type="text" id="meta" class="text"></input></div>')
$('#meta').focus().keyup(function(e) {
// Avoids enter been interpreted by document event handler.
e.stopPropagation();
if (e.which == 13) {
if (regex.test($('#meta').val())) {
meta[column] = $('#meta').val()
console.log("Load!!!!!", $('#meta').val())
resolve(meta)
$('#meta').attr('id', '');
} else {
$('#console').append('<div class="error cmd">Illegal input of ' + column + '</div>')
reject("Illegal input")
}
}
})
})
};
loadUserMeta({}, "name", /^.*$/).then(obj => {
return loadUserMeta(obj, "email", emailregex)
}).then(obj => {
return loadUserMeta(obj, "quote", /^.*$/)
}).then(obj => { // Done loading user data
console.log(obj)
database.ref().child('contact').push().set(obj);
doneCommand()
}).catch(error => {
console.log(error)
doneCommand()
})
}
},
sudo: {
reg: /^sudo$/,
exec: loginGoogle
},
login: {
reg: /^login$/,
exec: loginGoogle
},
cat: {
reg: /^cat.*$/,
exec: function(command) {
ascii['cat'].forEach((line, idx, array) => {
if (idx === 3) {
let sentence = command.split(' ').slice(1).join(' ')
$('#console').append('<div class="cmd">'+line+' Meow: "'+sentence+'"</div>')
} else {
$('#console').append('<div class="cmd">'+line+'</div>')
}
})
doneCommand()
}
},
dog: {
reg: /^dog.*$/,
exec: function(command) {
let target = "<div class='cmd'><pre>"
ascii['dog'].forEach((line, idx, array) => {
target += line
if (idx === 3) {
target += ' ' + command.split(' ').slice(1).join(' ')
}
target += '\n'
})
target += "</pre></div>"
$('#console').append(target)
doneCommand()
}
}
}
function enterSecret() {
$("#console").append('<div class="sudo cmd">Enter password: ' +
'<input type="password" id="password"></input></div>')
$('#password').focus().keyup(function(e) {
if (e.which == 13) {
alert("Password:" + $('#password').val())
doneCommand()
}
})
}
function loginGoogle() {
firebase.auth().signInWithPopup(provider).then(function(result) {
// This gives you a Google Access Token. You can use it to access the Google API.
var token = result.credential.accessToken;
// The signed-in user info.
var user = result.user;
// ...
console.log("Login:", user)
$('#console').append('<div class="cmd">Welcome, <span id="p-h">' + user.displayName + '</span></div>')
userLogin.name = user.displayName
userLogin.email = user.email
doneCommand()
}).catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
// The email of the user's account used.
var email = error.email;
// The firebase.auth.AuthCredential type that was used.
var credential = error.credential;
// ...
console.log(errorCode, errorMessage)
$('#console').append('<div class="error cmd"><span id="p-d">Error! </span>' +
errorMessage + '</div>')
doneCommand()
});
}
function doneCommand() {
// prompt()
Prompts.done()
}
/*
function runcommand(command) {
console.log("Get command:", command)
for (let prop in law) {
if (law.hasOwnProperty(prop) && law[prop].reg.test(command)) {
law[prop].exec(command)
return;
}
}
doneCommand()
}
*/
var ascii = {
cat: [" /\\ ___ /\\"
," ( o o ) "
," \\ >#< /"
," / \\ "
," / \\ ^ "
,"| | //"
," \\ / // "
," /// /// --"],
dog: [ " ,:'/ _... ",
" // ( `\"\"-.._.' ",
" \\| / 6\\___ /",
" | 6 4 ",
" | / \\",
" \\_ .--' ",
" (_\'---\'`) ",
" / `\'---`() ",
" ,\' | ",
" , .\'` | ",
" )\ _.-\' ; ",
" / | .\'` _ / ",
" /` / .\' '. , | ",
" / / / \ ; | | ",
" | \ | | .| | | ",
" \ `\"| /.-\' | | | ",
" '-..-\ _.;.._ | |.;-. ",
" \ <`.._ )) | .;-. )) ",
" (__. ` ))-\' \_ ))' ",
" `\'--\"` jgs `\"\"\"` "
]
};
|
/**
* @author Richard Davey <[email protected]>
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* Calculate the distance between two sets of coordinates (points).
*
* @function Phaser.Math.Distance.Between
* @since 3.0.0
*
* @param {number} x1 - The x coordinate of the first point.
* @param {number} y1 - The y coordinate of the first point.
* @param {number} x2 - The x coordinate of the second point.
* @param {number} y2 - The y coordinate of the second point.
*
* @return {number} The distance between each point.
*/
var DistanceBetween = function (x1, y1, x2, y2)
{
var dx = x1 - x2;
var dy = y1 - y2;
return Math.sqrt(dx * dx + dy * dy);
};
module.exports = DistanceBetween;
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: Riccardo Malpica Galassi, Sapienza University, Roma, Italy
"""
import numpy as np
from .ThermoKinetics import CanteraThermoKinetics
class CanteraCSP(CanteraThermoKinetics):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.jacobiantype = 'full'
self.rtol = 1.0e-2
self.atol = 1.0e-8
self._rhs = []
self._jac = []
self._evals = []
self._Revec = []
self._Levec = []
self._f = []
self._tau = []
self._nUpdates = 0
self._changed = False
@property
def jacobiantype(self):
return self._jacobiantype
@jacobiantype.setter
def jacobiantype(self,value):
if value == 'full':
self.nv = self.n_species + 1
self._jacobiantype = value
elif value == 'kinetic' or value == 'constrained':
self.nv = self.n_species
self._jacobiantype = value
else:
raise ValueError("Invalid jacobian type --> %s" %value)
@property
def rtol(self):
return self._rtol
@rtol.setter
def rtol(self,value):
self._rtol = value
@property
def atol(self):
return self._atol
@atol.setter
def atol(self,value):
self._atol = value
@property
def rhs(self):
return self._rhs
@property
def jac(self):
return self._jac
@property
def evals(self):
return self._evals
@property
def Revec(self):
return self._Revec
@property
def Levec(self):
return self._Levec
@property
def f(self):
return self._f
@property
def tau(self):
return self._tau
@property
def nUpdates(self):
return self._nUpdates
def __setattr__(self, key, value):
if key != '_changed':
self._changed = True
super().__setattr__(key, value)
def is_changed(self):
return self._changed
def update_kernel(self):
if self.jacobiantype == 'full':
self._evals,self._Revec,self._Levec,self._f = self.kernel()
elif self.jacobiantype == 'constrained':
self._evals,self._Revec,self._Levec,self._f = self.kernel_constrained_jac()
elif self.jacobiantype == 'kinetic':
self._evals,self._Revec,self._Levec,self._f = self.kernel_kinetic_only()
self._tau = timescales(self.evals)
self._changed = False
def get_kernel(self):
"""Retrieves the stored CSP kernel.
If any attributes changed before latest query, kernel is recomputed"""
if self.is_changed():
self.update_kernel()
self._changed = False
return [self.evals,self.Revec,self.Levec,self.f]
def calc_exhausted_modes(self, **kwargs):
"""Computes number of exhausted modes (M).
Optional arguments are rtol and atol for the calculation of M.
If not provided, uses default or previously set values"""
rtol = self.rtol
atol = self.atol
for key, value in kwargs.items():
if (key == 'rtol'):
rtol = value
elif (key == 'atol'):
atol = value
else:
raise ValueError("unknown argument --> %s" %key)
if self.is_changed():
self.update_kernel()
self._changed = False
M = findM(self.n_elements,self.stateYT(),self.evals,self.Revec,self.tau,self.f,rtol,atol)
return M
def calc_TSR(self,**kwargs):
"""Computes number of exhausted modes (M) and the TSR.
Optional arguments are rtol and atol for the calculation of M.
If not provided, uses default or previously set values.
The calculated value of M can be retrieved by passing
the optional argument getM=True"""
getM = False
rtol = self.rtol
atol = self.atol
for key, value in kwargs.items():
if (key == 'rtol'):
rtol = value
elif (key == 'atol'):
atol = value
elif (key == 'getM'):
getM = value
else:
raise ValueError("unknown argument --> %s" %key)
if self.is_changed():
self.update_kernel()
self._changed = False
M = findM(self.n_elements,self.stateYT(),self.evals,self.Revec,self.tau,self.f,rtol,atol)
TSR, weights = findTSR(self.n_elements,self.rhs,self.evals,self.Revec,self.f,M)
if getM:
return [TSR, M]
else:
return TSR
def calc_TSRindices(self,**kwargs):
"""Computes number of exhausted modes (M), the TSR and its indices.
Optional argument is type, which can be timescale or amplitude.
Default value is amplitude.
Other optional arguments are rtol and atol for the calculation of M.
If not provided, uses default or previously set values.
The calculated value of M can be retrieved by passing
the optional argument getM=True"""
getM = False
useTPI = False
rtol = self.rtol
atol = self.atol
for key, value in kwargs.items():
if (key == 'rtol'):
rtol = value
elif (key == 'atol'):
atol = value
elif (key == 'getM'):
getM = value
elif (key == 'type'):
if(value == 'timescale'):
useTPI = True
elif(value != 'amplitude'):
raise ValueError("unknown type --> %s" %value)
else:
raise ValueError("unknown argument --> %s" %key)
if self.is_changed():
self.update_kernel()
self._changed = False
Smat = self.generalized_Stoich_matrix
rvec = self.R_vector
M = findM(self.n_elements,self.stateYT(),self.evals,self.Revec,self.tau,self.f,rtol,atol)
TSR, weights = findTSR(self.n_elements,self.rhs,self.evals,self.Revec,self.f,M)
TSRidx = TSRindices(weights, self.evals)
if (useTPI):
JacK = self.jac_contribution()
CSPidx = CSP_timescale_participation_indices(self.n_reactions, JacK, self.evals, self.Revec, self.Levec)
else:
CSPidx = CSP_amplitude_participation_indices(self.Levec, Smat, rvec)
TSRind = TSR_participation_indices(TSRidx, CSPidx)
if getM:
return TSR, TSRind, M
else:
return TSR, TSRind
def calc_CSPindices(self,**kwargs):
"""Computes number of exhausted modes (M) and the CSP Indices.
Optional arguments are rtol and atol for the calculation of M.
If not provided, uses default or previously set values.
The calculated value of M can be retrieved by passing
the optional argument getM=True"""
getM = False
getAPI = False
getImpo = False
getspeciestype = False
getTPI = False
API = None
Ifast = None
Islow = None
species_type = None
TPI = None
rtol = self.rtol
atol = self.atol
for key, value in kwargs.items():
if (key == 'rtol'):
rtol = value
elif (key == 'atol'):
atol = value
elif (key == 'getM'):
getM = value
elif (key == 'API'):
getAPI = value
elif (key == 'Impo'):
getImpo = value
elif (key == 'species_type'):
getspeciestype = value
elif (key == 'TPI'):
getTPI = value
else:
raise ValueError("unknown argument --> %s" %key)
if self.is_changed():
self.update_kernel()
self._changed = False
M = findM(self.n_elements,self.stateYT(),self.evals,self.Revec,self.tau,self.f,rtol,atol)
Smat = self.generalized_Stoich_matrix
rvec = self.R_vector
if getAPI: API = CSP_amplitude_participation_indices(self.Levec, Smat, rvec)
if getImpo: Ifast,Islow = CSP_importance_indices(self.Revec,self.Levec,M,Smat,rvec)
if getspeciestype:
pointers = CSP_pointers(self.Revec,self.Levec)
species_type = classify_species(self.stateYT(), self.rhs, pointers, M)
if getTPI:
JacK = self.jac_contribution()
TPI = CSP_timescale_participation_indices(self.n_reactions, JacK, self.evals, self.Revec, self.Levec)
if getM:
return [API, TPI, Ifast, Islow, species_type, M]
else:
return [API, TPI, Ifast, Islow, species_type]
def calc_extended_TSR(self,**kwargs):
"""Computes number of Extended exhausted modes (Mext) and the extended TSR.
Caller must provide either a diffusion rhs with the keywork rhs_diffYT
or a convection rhs with the keywork rhs_convYT, or both.
Optional arguments are rtol and atol for the calculation of Mext.
If not provided, uses default or previously set values.
The calculated value of Mext can be retrieved by passing
the optional argument getMext=True"""
if self.is_changed():
self.update_kernel()
self._changed = False
nv=len(self.Revec)
getMext = False
rtol = self.rtol
atol = self.atol
rhs_convYT = np.zeros(nv)
rhs_diffYT = np.zeros(nv)
for key, value in kwargs.items():
if (key == 'rtol'):
rtol = value
elif (key == 'atol'):
atol = value
elif (key == 'getMext'):
getMext = value
elif (key == 'conv'):
rhs_convYT = value
elif (key == 'diff'):
rhs_diffYT = value
else:
raise ValueError("unknown argument --> %s" %key)
if(len(rhs_convYT)!=nv):
raise ValueError("Check dimension of Convection rhs. Should be %d", nv)
if(len(rhs_diffYT)!=nv):
raise ValueError("Check dimension of Diffusion rhs. Should be %d", nv)
Smat = self.generalized_Stoich_matrix
rvec = self.R_vector
rhs_ext, h, Smat_ext, rvec_ext = add_transport(self.rhs,self.Levec,Smat,rvec,rhs_convYT,rhs_diffYT)
Mext = findM(self.n_elements,self.stateYT(),self.evals,self.Revec,self.tau,h,rtol,atol)
TSR_ext, weights_ext = findTSR(self.n_elements,rhs_ext,self.evals,self.Revec,h,Mext)
if getMext:
return [TSR_ext, Mext]
else:
return TSR_ext
def calc_extended_TSRindices(self,**kwargs):
"""Computes number of Extended exhausted modes (Mext), the extended TSR and its indices.
Caller must provide either a diffusion rhs with the keywork rhs_diffYT
or a convection rhs with the keywork rhs_convYT, or both.
Other optional arguments are rtol and atol for the calculation of Mext.
If not provided, uses default or previously set values.
The calculated value of Mext can be retrieved by passing
the optional argument getMext=True"""
if self.is_changed():
self.update_kernel()
self._changed = False
getMext = False
nv=len(self.Revec)
rtol = self.rtol
atol = self.atol
rhs_convYT = np.zeros(nv)
rhs_diffYT = np.zeros(nv)
for key, value in kwargs.items():
if (key == 'rtol'):
rtol = value
elif (key == 'atol'):
atol = value
elif (key == 'getMext'):
getMext = value
elif (key == 'conv'):
rhs_convYT = value
elif (key == 'diff'):
rhs_diffYT = value
else:
raise ValueError("unknown argument --> %s" %key)
if(len(rhs_convYT)!=nv):
raise ValueError("Check dimension of Convection rhs. Should be %d", nv)
if(len(rhs_diffYT)!=nv):
raise ValueError("Check dimension of Diffusion rhs. Should be %d", nv)
Smat = self.generalized_Stoich_matrix
rvec = self.R_vector
rhs_ext, h, Smat_ext, rvec_ext = add_transport(self.rhs,self.Levec,Smat,rvec,rhs_convYT,rhs_diffYT)
Mext = findM(self.n_elements,self.stateYT(),self.evals,self.Revec,self.tau,h,rtol,atol)
TSR_ext, weights_ext = findTSR(self.n_elements,rhs_ext,self.evals,self.Revec,h,Mext)
TSRidx = TSRindices(weights_ext, self.evals)
CSPidx = CSP_amplitude_participation_indices(self.Levec, Smat_ext, rvec_ext)
TSRind_ext = TSR_participation_indices(TSRidx, CSPidx)
if getMext:
return TSR_ext, TSRind_ext, Mext
else:
return TSR_ext, TSRind_ext
""" ~~~~~~~~~~~~ KERNEL ~~~~~~~~~~~~~
"""
def kernel(self):
"""Computes CSP kernel. Its dimension is Nspecies + 1.
Returns [evals,Revec,Levec,amplitudes].
Input must be an instance of the CSPCantera class"""
#self.nv = self.n_species + 1
self._rhs = self.source.copy()
self._jac = self.jacobian.copy()
#eigensystem
evals,Revec,Levec = eigsys(self.jac)
self.clean_conserved(evals)
f = np.matmul(Levec,self.rhs)
self._nUpdates = self._nUpdates + 1
#rotate eigenvectors such that amplitudes are positive
Revec,Levec,f = evec_pos_ampl(Revec,Levec,f)
return[evals,Revec,Levec,f]
def kernel_kinetic_only(self):
"""Computes kinetic kernel. Its dimension is Nspecies.
Returns [evals,Revec,Levec,amplitudes].
Input must be an instance of the CSPCantera class"""
#self.nv = self.n_species
self._rhs = self.source.copy()[:self.nv]
self._jac = self.jacKinetic().copy()
#eigensystem
evals,Revec,Levec = eigsys(self.jac)
self.clean_conserved(evals)
f = np.matmul(Levec,self.rhs)
self._nUpdates = self._nUpdates + 1
#rotate eigenvectors such that amplitudes are positive
Revec,Levec,f = evec_pos_ampl(Revec,Levec,f)
return[evals,Revec,Levec,f]
def kernel_constrained_jac(self):
"""Computes constrained (to enthalpy) kernel. Its dimension is Nspecies .
Returns [evals,Revec,Levec,amplitudes].
Input must be an instance of the CSPCantera class"""
#self.nv = self.n_species
self._rhs = self.source.copy()[:self.nv]
kineticjac = self.jacKinetic()
thermaljac = self.jacThermal()
self._jac = kineticjac - thermaljac
#eigensystem
evals,Revec,Levec = eigsys(self.jac)
self.clean_conserved(evals)
f = np.matmul(Levec,self.rhs)
self._nUpdates = self._nUpdates + 1
#rotate eigenvectors such that amplitudes are positive
Revec,Levec,f = evec_pos_ampl(Revec,Levec,f)
return[evals,Revec,Levec,f]
def clean_conserved(self,evals):
"""Zero-out conserved modes eigenvalues"""
i = self.nv-self.n_elements
evals[i:] = 0.0
""" ~~~~~~~~~~~~ EXHAUSTED MODES ~~~~~~~~~~~~~
"""
def findM(n_elements,stateYT,evals,Revec,tau,f,rtol,atol):
nv = len(Revec)
nEl = n_elements
#nconjpairs = sum(1 for x in self.eval.imag if x != 0)/2
imPart = evals.imag!=0
nModes = nv - nEl #removing conserved modes
ewt = setEwt(stateYT,rtol,atol)
delw = np.zeros(nv)
for j in range(nModes-1): #loop over eligible modes (last excluded)
taujp1 = tau[j+1] #timescale of next (slower) mode
Aj = Revec[j] #this mode right evec
fj = f[j] #this mode amplitued
lamj = evals[j].real #this mode eigenvalue (real part)
for i in range(nv):
Aji = Aj[i] #i-th component of this mode Revec
delw[i] = delw[i] + modeContribution(Aji,fj,taujp1,lamj) #contribution of j-th mode to i-th var
if np.abs(delw[i]) > ewt[i]:
if j==0:
M = 0
else:
M = j-1 if (imPart[j] and imPart[j-1] and evals[j].real==evals[j-1].real) else j #if j is the second of a pair, move back by 2
return M
#print("All modes are exhausted")
M = nModes - 1 #if criterion is never verified, all modes are exhausted. Leave 1 active mode.
return M
def setEwt(y,rtol,atol):
ewt = [rtol * absy + atol if absy >= 1.0e-6 else absy + atol for absy in np.absolute(y)]
return ewt
def modeContribution(a,f,tau,lam):
delwMi = a*f*(np.exp(tau*lam) - 1)/lam if lam != 0.0 else 0.0
return delwMi
""" ~~~~~~~~~~~~~~ TSR ~~~~~~~~~~~~~~~~
"""
def findTSR(n_elements,rhs,evals,Revec,f,M):
n = len(Revec)
nEl = n_elements
#deal with amplitudes of cmplx conjugates
fvec = f.copy()
imPart = evals.imag!=0
for i in range(1,n):
if (imPart[i] and imPart[i-1] and evals[i].real==evals[i-1].real):
fvec[i] = np.sqrt(fvec[i]**2 + fvec[i-1]**2)
fvec[i-1] = fvec[i]
fnorm = fvec / np.linalg.norm(rhs)
#deal with zero-eigenvalues (if any)
fvec[evals==0.0] = 0.0
weights = fnorm**2
weights[0:M] = 0.0 #excluding fast modes
weights[n-nEl:n] = 0.0 #excluding conserved modes
normw = np.sum(weights)
weights = weights / normw if normw > 0 else np.zeros(n)
TSR = np.sum([weights[i] * np.sign(evals[i].real) * np.abs(evals[i]) for i in range(n)])
return [TSR, weights]
def TSRindices(weights, evals):
"""Ns array containing participation index of mode i to TSR"""
n = len(weights)
Index = np.zeros((n))
norm = np.sum([weights[i] * np.abs(evals[i]) for i in range(n)])
for i in range(n):
Index[i] = weights[i] * np.abs(evals[i])
Index[i] = Index[i]/norm if norm > 1e-10 else 0.0
return Index
def TSR_participation_indices(TSRidx, CSPidx):
"""2Nr array containing participation index of reaction k to TSR"""
Index = np.matmul(np.transpose(CSPidx),np.abs(TSRidx))
norm = np.sum(np.abs(Index))
Index = Index/norm if norm > 0 else Index*0.0
return Index
""" ~~~~~~~~~~~~ EIGEN FUNC ~~~~~~~~~~~~~
"""
def eigsys(jac):
"""Returns eigensystem (evals, Revec, Levec). Input must be a 2D array.
Both Revec (since it is transposed) and Levec (naturally) contain row vectors,
such that an eigenvector can be retrieved using R/Levec[index,:] """
#ncons = len(jac) - np.linalg.matrix_rank(jac)
evals, Revec = np.linalg.eig(jac)
#sort
idx = np.argsort(abs(evals))[::-1]
evals = evals[idx]
Revec = Revec[:,idx]
#zero-out conserved eigenvalues (last ncons)
#evals[-ncons:] = 0.0
#adjust complex conjugates
cmplx = Revec.imag.any(axis=0) #boolean indexing of complex eigenvectors (cols)
icmplx = np.flatnonzero(cmplx) #indexes of complex eigenvectors
for i in icmplx[::2]:
re = (Revec[:,i]+Revec[:,i+1])/2.0
im = (Revec[:,i]-Revec[:,i+1])/(2.0j)
Revec[:,i] = re
Revec[:,i+1] = im
Revec = Revec.real #no need to carry imaginary part anymore
#compute left eigenvectors, amplitudes
try:
Levec = np.linalg.inv(Revec)
except:
print('Warning: looks like the R martrix is singular (rank[R] = %i).' %np.linalg.matrix_rank(Revec))
print(' Kernel is zeroed-out.')
return[np.zeros(len(jac)),np.zeros((len(jac),len(jac))),np.zeros((len(jac),len(jac)))]
#transpose Revec
Revec = np.transpose(Revec)
return[evals,Revec,Levec]
def evec_pos_ampl(Revec,Levec,f):
"""changes sign to eigenvectors based on sign of corresponding mode amplitude."""
idx = np.flatnonzero(f < 0)
Revec[idx,:] = - Revec[idx,:]
Levec[idx,:] = - Levec[idx,:]
f[idx] = -f[idx]
return[Revec,Levec,f]
def timescales(evals):
tau = [1.0/abslam if abslam > 0 else 1e+20 for abslam in np.absolute(evals)]
return np.array(tau)
""" ~~~~~~~~~~~~ INDEXES FUNC ~~~~~~~~~~~~~
"""
def CSPIndices(Proj, Smat, rvec):
"""Returns a Nv x 2Nr matrix of indexes, computed as Proj S r """
ns = Smat.shape[0]
nr = Smat.shape[1]
Index = np.zeros((ns,nr))
for i in range(ns):
Proj_i = Proj[i,:]
Index[i,:] = CSPIndices_one_var(Proj_i, Smat, rvec)
#np.sum(abs(Index),axis=1) check: a n-long array of ones
return Index
def CSPIndices_one_var(Proj_i, Smat, rvec):
"""Given the i-th row of the projector, computes 2Nr indexes of reactions to variable i.
Proj_i must be a nv-long array. Returns a 2Nr-long array"""
nr = Smat.shape[1]
PS = np.matmul(Proj_i,Smat)
Index = np.multiply(PS,rvec)
norm = np.sum(abs(Index))
if norm != 0.0:
Index = Index/norm
else:
Index = np.zeros((nr))
#np.sum(abs(Index),axis=1) check: a n-long array of ones
return Index
def CSP_amplitude_participation_indices(B, Smat, rvec):
"""Ns x 2Nr array containing participation index of reaction k to variable i"""
API = CSPIndices(B, Smat, rvec)
return API
def CSP_importance_indices(A,B,M,Smat,rvec):
"""Ns x 2Nr array containing fast/slow importance index of reaction k to variable i"""
fastProj = np.matmul(np.transpose(A[0:M]),B[0:M])
Ifast = CSPIndices(fastProj, Smat, rvec)
slowProj = np.matmul(np.transpose(A[M:]),B[M:])
Islow = CSPIndices(slowProj, Smat, rvec)
return [Ifast,Islow]
def CSP_pointers(A,B):
nv = A.shape[0]
pointers = np.array([[np.transpose(A)[spec,mode]*B[mode,spec] for spec in range(nv)] for mode in range(nv)])
return pointers
def classify_species(stateYT, rhs, pointers, M):
"""species classification
"""
n = len(stateYT)
ytol = 1e-20
rhstol = 1e-13
sort = np.absolute(np.sum(pointers[:,:M],axis=1)).argsort()[::-1]
species_type = np.full(n,'slow',dtype=object)
species_type[sort[0:M]] = 'fast'
species_type[-1] = 'slow' #temperature is always slow
for i in range(n-1):
if (stateYT[i] < ytol and abs(rhs[i]) < rhstol): species_type[i] = 'trace'
return species_type
def CSP_participation_to_one_timescale(i, nr, JacK, evals, A, B):
imPart = evals.imag!=0
if(imPart[i] and imPart[i-1] and evals[i].real==evals[i-1].real): i = i-1 #if the second of a complex pair, shift back the index by 1
Index = np.zeros(2*nr)
norm = 0.0
if(imPart[i]):
for k in range(2*nr):
Index[k] = 0.5 * ( np.matmul(np.matmul(B[i],JacK[k]),np.transpose(A)[:,i]) -
np.matmul(np.matmul(B[i+1],JacK[k]),np.transpose(A)[:,i+1]))
norm = norm + abs(Index[k])
else:
for k in range(2*nr):
Index[k] = np.matmul(np.matmul(B[i],JacK[k]),np.transpose(A)[:,i])
norm = norm + abs(Index[k])
for k in range(2*nr):
Index[k] = Index[k]/norm if (norm != 0.0) else 0.0
return Index
def CSP_timescale_participation_indices(nr, JacK, evals, A, B):
"""Ns x 2Nr array containing TPI of reaction k to variable i"""
nv = A.shape[0]
TPI = np.zeros((nv,2*nr))
for i in range(nv):
TPI[i] = CSP_participation_to_one_timescale(i, nr, JacK, evals, A, B)
return TPI
def CSPtiming(gas):
import time
ns = gas.n_species
randY = np.random.dirichlet(np.ones(ns),size=1)
gas.TP = 1000,101325.0
gas.Y = randY
gas.constP = 101325.0
gas.jacobiantype='full'
gas.rtol=1.0e-3
gas.atol=1.0e-10
starttime = time.time()
gas.update_kernel()
endtime = time.time()
timekernel = endtime - starttime
starttime = time.time()
M = gas.calc_exhausted_modes()
endtime = time.time()
timeM = endtime - starttime
starttime = time.time()
TSR = gas.calc_TSR()
endtime = time.time()
timeTSR = endtime - starttime
starttime = time.time()
api, tpi, ifast, islow, species_type = gas.calc_CSPindices(API=True,Impo=False,species_type=False,TPI=False)
endtime = time.time()
timeAPI = endtime - starttime
starttime = time.time()
api, tpi, ifast, islow, species_type = gas.calc_CSPindices(API=False,Impo=True,species_type=False,TPI=False)
endtime = time.time()
timeImpo = endtime - starttime
starttime = time.time()
api, tpi, ifast, islow, species_type = gas.calc_CSPindices(API=False,Impo=False,species_type=True,TPI=False)
endtime = time.time()
timeclassify = endtime - starttime
starttime = time.time()
api, tpi, ifast, islow, species_type = gas.calc_CSPindices(API=False,Impo=False,species_type=False,TPI=True)
endtime = time.time()
timeTPI = endtime - starttime
print ('Time Kernel: %10.3e' %timekernel)
print ('Time findM: %10.3e' %timeM)
print ('Time TSR: %10.3e' %timeTSR)
print ('Time API indexes: %10.3e' %timeAPI)
print ('Time Imp indexes: %10.3e' %timeImpo)
print ('Time TPI indexes: %10.3e' %timeTPI)
print ('Time class specs: %10.3e' %timeclassify)
print ('*** all times in seconds')
""" ~~~~~~~~~~~ EXTENDED FUNC ~~~~~~~~~~~~
"""
def add_transport(rhs,Levec,Smat,rvec,rhs_convYT,rhs_diffYT):
nv=len(Levec)
nr=Smat.shape[1]
rhs_ext = rhs + rhs_convYT + rhs_diffYT
h = np.matmul(Levec,rhs_ext)
Smat_ext = np.zeros((nv,nr+2*nv))
Smat_ext[:,0:nr] = Smat
Smat_ext[:,nr:nr+nv] = np.eye(nv)
Smat_ext[:,nr+nv:nr+2*nv] = np.eye(nv)
rvec_ext = np.zeros((nr+2*nv))
rvec_ext[0:nr] = rvec
rvec_ext[nr:nr+nv] = rhs_convYT
rvec_ext[nr+nv:nr+2*nv] = rhs_diffYT
#splitrhs_ext = np.dot(Smat_ext,rvec_ext)
#checksplitrhs = np.isclose(rhs_ext, splitrhs_ext, rtol=1e-6, atol=0, equal_nan=False)
#if(np.any(checksplitrhs == False)):
# raise ValueError('Mismatch between numerical extended RHS and S.r')
return rhs_ext, h, Smat_ext, rvec_ext
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tf = require("@tensorflow/tfjs-core");
var common_1 = require("../common");
function boxPredictionLayer(x, params) {
return tf.tidy(function () {
var batchSize = x.shape[0];
var boxPredictionEncoding = tf.reshape(common_1.convLayer(x, params.box_encoding_predictor), [batchSize, -1, 1, 4]);
var classPrediction = tf.reshape(common_1.convLayer(x, params.class_predictor), [batchSize, -1, 3]);
return {
boxPredictionEncoding: boxPredictionEncoding,
classPrediction: classPrediction
};
});
}
exports.boxPredictionLayer = boxPredictionLayer;
//# sourceMappingURL=boxPredictionLayer.js.map |
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.nipplejs=e()}}(function(){function e(){}function t(e,i){return this.identifier=i.identifier,this.position=i.position,this.frontPosition=dataoptions.frontPosition,this.collection=e,this.defaults={size:100,threshold:.1,color:"white",fadeTime:250,restJoystick:!0,restOpacity:.5,mode:"dynamic",zone:document.body,lockX:!1,lockY:!1},this.config(i),"dynamic"===this.options.mode&&(this.options.restOpacity=0),this.id=t.id,t.id+=1,this.buildEl().stylize(),this.instance={el:this.ui.el,on:this.on.bind(this),off:this.off.bind(this),show:this.show.bind(this),hide:this.hide.bind(this),add:this.addToDom.bind(this),remove:this.removeFromDom.bind(this),destroy:this.destroy.bind(this),resetDirection:this.resetDirection.bind(this),computeDirection:this.computeDirection.bind(this),trigger:this.trigger.bind(this),position:this.position,frontPosition:this.frontPosition,ui:this.ui,identifier:this.identifier,id:this.id,options:this.options},this.instance}function i(e,t){var n=this;return n.nipples=[],n.idles=[],n.actives=[],n.ids=[],n.pressureIntervals={},n.manager=e,n.id=i.id,i.id+=1,n.defaults={zzz:!1,maxNumberOfNipples:10,mode:"dynamic",position:{top:0,left:0},catchDistance:200,size:100,threshold:.1,color:"white",fadeTime:250,restJoystick:!0,restOpacity:.5,lockX:!1,lockY:!1},n.config(t),"static"!==n.options.mode&&"semi"!==n.options.mode||(n.options.multitouch=!1),n.options.multitouch||(n.options.maxNumberOfNipples=1),n.updateBox(),n.prepareNipples(),n.bindings(),n.begin(),n.nipples}function n(e){var t=this;t.ids={},t.index=0,t.collections=[],t.config(e),t.prepareCollections();var i;return c.bindEvt(window,"resize",function(e){clearTimeout(i),i=setTimeout(function(){var e,i=c.getScroll();t.collections.forEach(function(t){t.forEach(function(t){e=t.el.getBoundingClientRect(),t.position={x:i.x+e.left,y:i.y+e.top}})})},100)}),t.collections}var o,r=!!("ontouchstart"in window),s=!!window.PointerEvent,d=!!window.MSPointerEvent,a={touch:{start:"touchstart",move:"touchmove",end:"touchend, touchcancel"},mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},pointer:{start:"pointerdown",move:"pointermove",end:"pointerup, pointercancel"},MSPointer:{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}},p={};s?o=a.pointer:d?o=a.MSPointer:r?(o=a.touch,p=a.mouse):o=a.mouse;var c={};c.distance=function(e,t){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)},c.angle=function(e,t){var i=t.x-e.x,n=t.y-e.y;return c.degrees(Math.atan2(n,i))},c.findCoord=function(e,t,i){var n={x:0,y:0};return i=c.radians(i),n.x=e.x-t*Math.cos(i),n.y=e.y-t*Math.sin(i),n},c.radians=function(e){return e*(Math.PI/180)},c.degrees=function(e){return e*(180/Math.PI)},c.bindEvt=function(e,t,i){for(var n,o=t.split(/[ ,]+/g),r=0;r<o.length;r+=1)n=o[r],e.addEventListener?e.addEventListener(n,i,!1):e.attachEvent&&e.attachEvent(n,i)},c.unbindEvt=function(e,t,i){for(var n,o=t.split(/[ ,]+/g),r=0;r<o.length;r+=1)n=o[r],e.removeEventListener?e.removeEventListener(n,i):e.detachEvent&&e.detachEvent(n,i)},c.trigger=function(e,t,i){var n=new CustomEvent(t,i);e.dispatchEvent(n)},c.prepareEvent=function(e){return e.preventDefault(),e.type.match(/^touch/)?e.changedTouches:e},c.getScroll=function(){return{x:void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,y:void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop}},c.applyPosition=function(e,t){t.top||t.right||t.bottom||t.left?(e.style.top=t.top,e.style.right=t.right,e.style.bottom=t.bottom,e.style.left=t.left):(e.style.left=t.x+"px",e.style.top=t.y+"px")},c.getTransitionStyle=function(e,t,i){var n=c.configStylePropertyObject(e);for(var o in n)if(n.hasOwnProperty(o))if("string"==typeof t)n[o]=t+" "+i;else{for(var r="",s=0,d=t.length;s<d;s+=1)r+=t[s]+" "+i+", ";n[o]=r.slice(0,-2)}return n},c.getVendorStyle=function(e,t){var i=c.configStylePropertyObject(e);for(var n in i)i.hasOwnProperty(n)&&(i[n]=t);return i},c.configStylePropertyObject=function(e){var t={};return t[e]="",["webkit","Moz","o"].forEach(function(i){t[i+e.charAt(0).toUpperCase()+e.slice(1)]=""}),t},c.extend=function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},c.safeExtend=function(e,t){var i={};for(var n in e)e.hasOwnProperty(n)&&t.hasOwnProperty(n)?i[n]=t[n]:e.hasOwnProperty(n)&&(i[n]=e[n]);return i},c.map=function(e,t){if(e.length)for(var i=0,n=e.length;i<n;i+=1)t(e[i]);else t(e)},e.prototype.on=function(e,t){var i,n=this,o=e.split(/[ ,]+/g);n._handlers_=n._handlers_||{};for(var r=0;r<o.length;r+=1)i=o[r],n._handlers_[i]=n._handlers_[i]||[],n._handlers_[i].push(t);return n},e.prototype.off=function(e,t){var i=this;return i._handlers_=i._handlers_||{},void 0===e?i._handlers_={}:void 0===t?i._handlers_[e]=null:i._handlers_[e]&&i._handlers_[e].indexOf(t)>=0&&i._handlers_[e].splice(i._handlers_[e].indexOf(t),1),i},e.prototype.trigger=function(e,t){var i,n=this,o=e.split(/[ ,]+/g);n._handlers_=n._handlers_||{};for(var r=0;r<o.length;r+=1)i=o[r],n._handlers_[i]&&n._handlers_[i].length&&n._handlers_[i].forEach(function(e){e.call(n,{type:i,target:n},t)})},e.prototype.config=function(e){var t=this;t.options=t.defaults||{},e&&(t.options=c.safeExtend(t.options,e))},e.prototype.bindEvt=function(e,t){var i=this;return i._domHandlers_=i._domHandlers_||{},i._domHandlers_[t]=function(){"function"==typeof i["on"+t]?i["on"+t].apply(i,arguments):console.warn('[WARNING] : Missing "on'+t+'" handler.')},c.bindEvt(e,o[t],i._domHandlers_[t]),p[t]&&c.bindEvt(e,p[t],i._domHandlers_[t]),i},e.prototype.unbindEvt=function(e,t){var i=this;return i._domHandlers_=i._domHandlers_||{},c.unbindEvt(e,o[t],i._domHandlers_[t]),p[t]&&c.unbindEvt(e,p[t],i._domHandlers_[t]),delete i._domHandlers_[t],this},t.prototype=new e,t.constructor=t,t.id=0,t.prototype.destroy=function(){clearTimeout(this.removeTimeout),clearTimeout(this.showTimeout),clearTimeout(this.restTimeout),this.trigger("destroyed",this.instance),this.removeFromDom(),this.off()},t.prototype.restPosition=function(e){var t=this;t.frontPosition={x:0,y:0};var i=t.options.fadeTime+"ms",n={};n.front=c.getTransitionStyle("transition",["top","left"],i);var o={front:{}};o.front={left:t.frontPosition.x+"px",top:t.frontPosition.y+"px"},t.applyStyles(n),t.applyStyles(o),t.restTimeout=setTimeout(function(){"function"==typeof e&&e.call(t),t.restCallback()},t.options.fadeTime)},t.prototype.restCallback=function(){var e=this,t={};t.front=c.getTransitionStyle("transition","none",""),e.applyStyles(t),e.trigger("rested",e.instance)},t.prototype.resetDirection=function(){this.direction={x:!1,y:!1,angle:!1}},t.prototype.computeDirection=function(e){var t,i,n,o=e.angle.radian,r=Math.PI/4,s=Math.PI/2;if(o>r&&o<3*r&&!e.lockX?t="up":o>-r&&o<=r&&!e.lockY?t="left":o>3*-r&&o<=-r&&!e.lockX?t="down":e.lockY||(t="right"),e.lockY||(i=o>-s&&o<s?"left":"right"),e.lockX||(n=o>0?"up":"down"),e.force>this.options.threshold){var d={};for(var a in this.direction)this.direction.hasOwnProperty(a)&&(d[a]=this.direction[a]);var p={};this.direction={x:i,y:n,angle:t},e.direction=this.direction;for(var a in d)d[a]===this.direction[a]&&(p[a]=!0);if(p.x&&p.y&&p.angle)return e;p.x&&p.y||this.trigger("plain",e),p.x||this.trigger("plain:"+i,e),p.y||this.trigger("plain:"+n,e),p.angle||this.trigger("dir dir:"+t,e)}return e},i.prototype=new e,i.constructor=i,i.id=0,i.prototype.prepareNipples=function(){var e=this,t=e.nipples;t.on=e.on.bind(e),t.off=e.off.bind(e),t.options=e.options,t.destroy=e.destroy.bind(e),t.ids=e.ids,t.id=e.id,t.processOnMove=e.processOnMove.bind(e),t.processOnEnd=e.processOnEnd.bind(e),t.get=function(e){if(void 0===e)return t[0];for(var i=0,n=t.length;i<n;i+=1)if(t[i].identifier===e)return t[i];return!1}},i.prototype.bindings=function(){var e=this;e.bindEvt(e.options.zone,"start"),e.options.zone.style.touchAction="none",e.options.zone.style.msTouchAction="none"},i.prototype.begin=function(){var e=this,t=e.options;if("static"===t.mode){var i=e.createNipple(t.position,e.manager.getIdentifier());i.add(),e.idles.push(i)}},i.prototype.createNipple=function(e,i){var n=this,o=c.getScroll(),r=n.options;if(e.x&&e.y)({x:e.x-(o.x+n.box.left),y:e.y-(o.y+n.box.top)});else if(e.top||e.right||e.bottom||e.left){var s=document.createElement("DIV");s.style.display="hidden",s.style.top=e.top,s.style.right=e.right,s.style.bottom=e.bottom,s.style.left=e.left,s.style.position="absolute",r.zone.appendChild(s);var d=s.getBoundingClientRect();r.zone.removeChild(s),e,e={x:d.left+o.x,y:d.top+o.y}}var a=new t(n,{color:r.color,size:r.size,threshold:r.threshold,fadeTime:r.fadeTime,restJoystick:r.restJoystick,restOpacity:r.restOpacity,mode:r.mode,identifier:i,position:e,zone:r.zone,frontPosition:{x:0,y:0}});return n.nipples.push(a),n.trigger("added "+a.identifier+":added",a),n.manager.trigger("added "+a.identifier+":added",a),n.bindNipple(a),a},i.prototype.updateBox=function(){var e=this;e.box=e.options.zone.getBoundingClientRect()},i.prototype.bindNipple=function(e){var t,i=this,n=function(e,n){t=e.type+" "+n.id+":"+e.type,i.trigger(t,n)};e.on("destroyed",i.onDestroyed.bind(i)),e.on("shown hidden rested dir plain",n),e.on("dir:up dir:right dir:down dir:left",n),e.on("plain:up plain:right plain:down plain:left",n)},i.prototype.pressureFn=function(e,t,i){var n=this,o=0;clearInterval(n.pressureIntervals[i]),n.pressureIntervals[i]=setInterval(function(){var i=e.force||e.pressure||e.webkitForce||0;i!==o&&(t.trigger("pressure",i),n.trigger("pressure "+t.identifier+":pressure",i),o=i)}.bind(n),100)},i.prototype.onstart=function(e){var t=this,i=t.options;e=c.prepareEvent(e),t.updateBox();var n=function(e){t.actives.length<i.maxNumberOfNipples&&t.processOnStart(e)};return c.map(e,n),t.manager.bindDocument(),!1},i.prototype.processOnStart=function(e){var t,i=this,n=i.options,o=i.manager.getIdentifier(e),r=e.force||e.pressure||e.webkitForce||0,s={x:e.pageX,y:e.pageY},d=i.getOrCreate(o,s);d.identifier!==o&&i.manager.removeIdentifier(d.identifier),d.identifier=o;var a=function(t){t.trigger("start",t),i.trigger("start "+t.id+":start",t),t.show(),r>0&&i.pressureFn(e,t,t.identifier),i.processOnMove(e)};if((t=i.idles.indexOf(d))>=0&&i.idles.splice(t,1),i.actives.push(d),i.ids.push(d.identifier),"semi"!==n.mode)a(d);else{if(!(c.distance(s,d.position)<=n.catchDistance))return d.destroy(),void i.processOnStart(e);a(d)}return d},i.prototype.getOrCreate=function(e,t){var i,n=this,o=n.options;return/(semi|static)/.test(o.mode)?(i=n.idles[0])?(n.idles.splice(0,1),i):"semi"===o.mode?n.createNipple(t,e):(console.warn("Coudln't find the needed nipple."),!1):i=n.createNipple(t,e)},i.prototype.processOnMove=function(e){var t=this,i=t.options,n=t.manager.getIdentifier(e),o=t.nipples.get(n);if(!o)return console.error("Found zombie joystick with ID "+n),void t.manager.removeIdentifier(n);o.identifier=n;var r=o.options.size/2,s={x:e.pageX,y:e.pageY},d=c.distance(s,o.position),a=c.angle(s,o.position),p=c.radians(a),l=d/r;d>r&&(d=r,s=c.findCoord(o.position,d,a));var f=s.x-o.position.x,u=s.y-o.position.y;i.lockX&&(u=0),i.lockY&&(f=0),o.frontPosition={x:f,y:u};var h={identifier:o.identifier,position:s,force:l,pressure:e.force||e.pressure||e.webkitForce||0,distance:d,angle:{radian:p,degree:a},instance:o,lockX:i.lockX,lockY:i.lockY};h=o.computeDirection(h),h.angle={radian:c.radians(180-a),degree:180-a},o.trigger("move",h),t.trigger("move "+o.id+":move",h)},i.prototype.processOnEnd=function(e){var t=this,i=t.options,n=t.manager.getIdentifier(e),o=t.nipples.get(n),r=t.manager.removeIdentifier(o.identifier);o&&(clearInterval(t.pressureIntervals[o.identifier]),o.resetDirection(),o.trigger("end",o),t.trigger("end "+o.id+":end",o),t.ids.indexOf(o.identifier)>=0&&t.ids.splice(t.ids.indexOf(o.identifier),1),t.actives.indexOf(o)>=0&&t.actives.splice(t.actives.indexOf(o),1),/(semi|static)/.test(i.mode)?t.idles.push(o):t.nipples.indexOf(o)>=0&&t.nipples.splice(t.nipples.indexOf(o),1),t.manager.unbindDocument(),/(semi|static)/.test(i.mode)&&(t.manager.ids[r.id]=r.identifier))},i.prototype.onDestroyed=function(e,t){var i=this;i.nipples.indexOf(t)>=0&&i.nipples.splice(i.nipples.indexOf(t),1),i.actives.indexOf(t)>=0&&i.actives.splice(i.actives.indexOf(t),1),i.idles.indexOf(t)>=0&&i.idles.splice(i.idles.indexOf(t),1),i.ids.indexOf(t.identifier)>=0&&i.ids.splice(i.ids.indexOf(t.identifier),1),i.manager.removeIdentifier(t.identifier),i.manager.unbindDocument()},i.prototype.destroy=function(){var e=this;e.unbindEvt(e.options.zone,"start"),e.nipples.forEach(function(e){e.destroy()});for(var t in e.pressureIntervals)e.pressureIntervals.hasOwnProperty(t)&&clearInterval(e.pressureIntervals[t]);e.trigger("destroyed",e.nipples),e.manager.unbindDocument(),e.off()},n.prototype=new e,n.constructor=n,n.prototype.prepareCollections=function(){var e=this;e.collections.create=e.create.bind(e),e.collections.on=e.on.bind(e),e.collections.off=e.off.bind(e),e.collections.destroy=e.destroy.bind(e),e.collections.get=function(t){var i;return e.collections.every(function(e){return!(i=e.get(t))}),i}},n.prototype.create=function(e){return this.createCollection(e)},n.prototype.createCollection=function(e){var t=this,n=new i(t,e);return t.bindCollection(n),t.collections.push(n),n},n.prototype.bindCollection=function(e){var t,i=this,n=function(e,n){t=e.type+" "+n.id+":"+e.type,i.trigger(t,n)};e.on("destroyed",i.onDestroyed.bind(i)),e.on("shown hidden rested dir plain",n),e.on("dir:up dir:right dir:down dir:left",n),e.on("plain:up plain:right plain:down plain:left",n)},n.prototype.bindDocument=function(){var e=this;e.binded||(e.bindEvt(document,"move").bindEvt(document,"end"),e.binded=!0)},n.prototype.unbindDocument=function(e){var t=this;Object.keys(t.ids).length&&!0!==e||(t.unbindEvt(document,"move").unbindEvt(document,"end"),t.binded=!1)},n.prototype.getIdentifier=function(e){var t;return e?void 0===(t=void 0===e.identifier?e.pointerId:e.identifier)&&(t=this.latest||0):t=this.index,void 0===this.ids[t]&&(this.ids[t]=this.index,this.index+=1),this.latest=t,this.ids[t]},n.prototype.removeIdentifier=function(e){var t={};for(var i in this.ids)if(this.ids[i]===e){t.id=i,t.identifier=this.ids[i],delete this.ids[i];break}return t},n.prototype.onmove=function(e){return this.onAny("move",e),!1},n.prototype.onend=function(e){return this.onAny("end",e),!1},n.prototype.oncancel=function(e){return this.onAny("end",e),!1},n.prototype.onAny=function(e,t){var i,n=this,o="processOn"+e.charAt(0).toUpperCase()+e.slice(1);t=c.prepareEvent(t);var r=function(e,t,i){i.ids.indexOf(t)>=0&&(i[o](e),e._found_=!0)},s=function(e){i=n.getIdentifier(e),c.map(n.collections,r.bind(null,e,i)),e._found_||n.removeIdentifier(i)};return c.map(t,s),!1},n.prototype.destroy=function(){var e=this;e.unbindDocument(!0),e.ids={},e.index=0,e.collections.forEach(function(e){e.destroy()}),e.off()},n.prototype.onDestroyed=function(e,t){var i=this;if(i.collections.indexOf(t)<0)return!1;i.collections.splice(i.collections.indexOf(t),1)};var l=new n;return{create:function(e){return l.create(e)},factory:l}}); |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _stringWithLength = require('./string-with-length.generator');
Object.keys(_stringWithLength).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _stringWithLength[key];
}
});
});
var _personalData = require('./personalData.generator');
Object.keys(_personalData).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _personalData[key];
}
});
}); |
/**
* Welcome to your Workbox-powered service worker!
*
* You'll need to register this file in your web app and you should
* disable HTTP caching for this file too.
* See https://goo.gl/nhQhGp
*
* The rest of the code is auto-generated. Please don't update this file
* directly; instead, make changes to your Workbox build configuration
* and re-run your build process.
* See https://goo.gl/2aRDsh
*/
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
workbox.core.skipWaiting();
workbox.core.clientsClaim();
/**
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
* requests for URLs in the manifest.
* See https://goo.gl/S9QRab
*/
self.__precacheManifest = [
{
"url": "android-chrome-192x192.0fcebb82.png",
"revision": "71c32dc8b4da4840d61a1796a2bc230b"
},
{
"url": "android-chrome-512x512.ae40f73d.png",
"revision": "8bf8012c4f4ae251d660b4739171b7ed"
},
{
"url": "apple-touch-icon-120x120-precomposed.044c6f3f.png",
"revision": "a6e447e90b691da286286ab18849adac"
},
{
"url": "apple-touch-icon-120x120.044c6f3f.png",
"revision": "a6e447e90b691da286286ab18849adac"
},
{
"url": "apple-touch-icon-precomposed.fdeabd24.png",
"revision": "de5e22b15cf20cb0d586a036d714ee3f"
},
{
"url": "apple-touch-icon.fdeabd24.png",
"revision": "de5e22b15cf20cb0d586a036d714ee3f"
},
{
"url": "certificate.1e3570bc.pdf",
"revision": "623cac53a40c141642b22bf50fe14628"
},
{
"url": "confidentialite.2f395007.js",
"revision": "fdaad1887614bbc6822d8a5abb2234ff"
},
{
"url": "confidentialite.daef9682.css",
"revision": "9caf330c4bbb593fbc8d2eb58a9e085c"
},
{
"url": "confidentialite.html",
"revision": "4bce5357393a4b0e58eee0842ffa7e8d"
},
{
"url": "favicon-16x16.a4687270.png",
"revision": "652605ae0182d51781ab0be639ad2bda"
},
{
"url": "favicon-32x32.623384d0.png",
"revision": "674c9c4ef1e4c7ea9de1218ee0bfd0cf"
},
{
"url": "index.html",
"revision": "717a9a9a16b984000cc6e4539c49e936"
},
{
"url": "logo_dnum_dark.0fe33c5b.svg",
"revision": "da8bdc57d4f231585216c53da752d00a"
},
{
"url": "logo_dnum.19ebc682.svg",
"revision": "3a41bfa41e4671414da29db168c37d66"
},
{
"url": "main.26b14001.js",
"revision": "80920b563c1f746ea1d101a6f62a8c60"
},
{
"url": "main.31fdc5e2.js",
"revision": "382ce23520ff206b81f17bf12bad787c"
},
{
"url": "main.61387d31.js",
"revision": "f2ab86a88b51e1e07dc6f703efb93652"
},
{
"url": "main.daef9682.css",
"revision": "7d236ed06e460d3f2096e07384bbc079"
},
{
"url": "marianne-bold-webfont.1505950c.woff2",
"revision": "e67f6cefe32cc39f909e605c8d6337a9"
},
{
"url": "marianne-bold-webfont.7424dbde.woff",
"revision": "0bcc99dd4adfb78e11098fedfe531cbb"
},
{
"url": "marianne-regular-webfont.0a959359.woff",
"revision": "89f4f2326c77429e98693cf83703face"
},
{
"url": "marianne-regular-webfont.daa94941.woff2",
"revision": "d2c09e5f58d8360f541e2a8726c33587"
},
{
"url": "MIN_Interieur_RVB_dark.0e5ee525.svg",
"revision": "345794cee228a40837ab654184cd2c96"
},
{
"url": "MIN_Interieur_RVB.124e26ea.svg",
"revision": "6823b6d87f43d208b17ff81e178f9ae9"
},
{
"url": "safari-pinned-tab.1551797e.svg",
"revision": "f53452e6ac8760f12bab91672e91d39b"
},
{
"url": "./",
"revision": "a1ca98525a5046713bfb5f2cbf458e89"
}
].concat(self.__precacheManifest || []);
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/index.html"));
|
import React, { Component } from 'react';
import {Icon } from 'antd';
import './style/style.less';
export default class Card extends Component {
constructor(props) {
super(props);
this.state={
flag:false,
};
}
render() {
const {title,icon,more,className} = this.props;
let flag = this.state.flag;
if(more){
flag=true;
}
return (
<div className={`card1 ${className?className:''}`}>
<div className="title">
<span><img className="img" src={icon} /></span>
<span className="s1">{title}</span>
{flag?<span><a className="s21 a-style1">更多<Icon type="double-right" /></a></span>:''}
</div>
<div className="content">
{this.props.children}
</div>
</div>
);
}
}
|
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
module.exports = {
// Automatically clear mock calls and instances between every test
clearMocks: true,
// Indicates whether the coverage information should be collected while executing the test
collectCoverage: true,
// An array of glob patterns indicating a set of files for which coverage information should be collected
// collectCoverageFrom: undefined,
// The directory where Jest should output its coverage files
coverageDirectory: 'coverage',
// An array of regexp pattern strings used to skip coverage collection
coveragePathIgnorePatterns: [
'index.ts',
'/node_modules/'
],
// An object that configures minimum threshold enforcement for coverage results
coverageThreshold: {
global: {
'branches': 70,
'functions': 70,
'lines': 70,
'statements': 70
}
},
// An array of file extensions your modules use
moduleFileExtensions: [
'js',
'json',
'jsx',
'ts',
'tsx',
'node'
],
// The test environment that will be used for testing
testEnvironment: 'node',
// The glob patterns Jest uses to detect test files
testMatch: [
'**/src/**/__tests__/**/*.[jt]s?(x)',
'**/src/**/?(*.)+(spec|test).[tj]s?(x)'
],
// A map from regular expressions to paths to transformers
transform: {
'\\.(ts)$': 'ts-jest'
}
}
|
module.exports = {
env: {
browser: true,
es6: true,
},
extends: [
'airbnb',
'airbnb/hooks',
'plugin:prettier/recommended',
'prettier/react',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['react'],
rules: {
'prettier/prettier': 'error',
'jsx-a11y/label-has-associated-control': [
'error',
{
required: {
some: ['nesting', 'id'],
},
},
],
'no-underscore-dangle': [2, { allow: ['_id', '_groups'] }],
},
};
|
var destinos = [], categorias = [], perfiles = [];
var exp = undefined;
function addElement (array, element){
if (!$.isArray(array)){
return false;
}
array.push(element);
}
function deleteElement (array, element){
if (!$.isArray(array)){
return false;
}else {
if (array.length == 0){
return false;
}
}
$.each(array, function(index, value){
if (value == element){
array.splice(index, 1);
return;
}
});
}
function change (object, array, element){
if (!$(object).is(':checked')){
deleteElement (array, element);
}else{
addElement (array, element);
}
console.log(array);
}
|
(async () => {
const gameID = prompt('Please enter the game set ID you are playing: ');
const GetAnswers = await fetch(`https://api.blooket.com/api/games?gameId=${gameID}`, {
headers: {
"accept": "application/json, text/plain, */*",
"accept-language": "en-US,en;q=0.9",
"content-type": "application/json;charset=UTF-8",
},
method: 'GET'
});
const Answers = await GetAnswers.json();
Answers.questions.forEach(question => {
console.log(`Q: ${question.question} A: ${question.correctAnswers.join(', ')}`);
});
})();
|
/*
Copyright (c) Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
// @flow
import * as React from 'react';
import { Block } from '../../block/index.js';
import { Button } from '../../button/index.js';
import { ProgressSteps, NumberedStep } from '../index.js';
export class Scenario extends React.Component<{}, { current: number }> {
state = { current: 0 };
render() {
return (
<ProgressSteps current={this.state.current}>
<NumberedStep title="Create Account">
<Block data-e2e="content-1" font="font400">
Here is some step content
</Block>
<Button data-e2e="button-next" onClick={() => this.setState({ current: 1 })}>
Next
</Button>
</NumberedStep>
<NumberedStep title="Verify Payment">
<Block data-e2e="content-2" font="font400">
Here is some more content
</Block>
<Button data-e2e="button-previous" onClick={() => this.setState({ current: 0 })}>
Previous
</Button>
<Button onClick={() => this.setState({ current: 2 })}>Next</Button>
</NumberedStep>
<NumberedStep title="Add Payment Method">
<Block data-e2e="content-3" font="font400">
Here too!
</Block>
<Button onClick={() => this.setState({ current: 1 })}>Previous</Button>
</NumberedStep>
</ProgressSteps>
);
}
}
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{"+QRC":function(e,t,n){"use strict";var r=n("E9nw"),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,a,i,c,l,s,u=!1;t||(t={}),n=t.debug||!1;try{if(i=r(),c=document.createRange(),l=document.getSelection(),(s=document.createElement("span")).textContent=e,s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=o[t.format]||o.default;window.clipboardData.setData(a,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(s),c.selectNodeContents(s),l.addRange(c),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(f){n&&console.error("unable to copy using clipboardData: ",f),n&&console.error("falling back to prompt"),a=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(a,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(c):l.removeAllRanges()),s&&document.body.removeChild(s),i()}return u}},"/3gg":function(e,t,n){},"/9aa":function(e,t,n){var r=n("NykK"),o=n("ExA7");e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},"1NmI":function(e,t,n){e.exports={aboutTile:"about-module--aboutTile--381PW",aboutBlock:"about-module--aboutBlock--1fLBr",mrTp26PX:"about-module--mrTp26PX--x5qv6"}},"2mql":function(e,t,n){"use strict";var r=n("TOwV"),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function l(e){return r.isMemo(e)?i:c[e.$$typeof]||o}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=i;var s=Object.defineProperty,u=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=d(n);o&&o!==m&&e(t,o,r)}var i=u(n);f&&(i=i.concat(f(n)));for(var c=l(t),v=l(n),h=0;h<i.length;++h){var b=i[h];if(!(a[b]||r&&r[b]||v&&v[b]||c&&c[b])){var g=p(n,b);try{s(t,b,g)}catch(y){}}}}return t}},"3M/l":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAZgklEQVR4Xu2dC5QcVZnH/9/tmTymqycTTEAjMdPVEwE5BpC3KwKCGFEyXZ2MengpuIorKqy4y8LqLi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UVORK5CYII="},"4i/N":function(e,t,n){"use strict";var r=n("q1tI"),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"},a=n("6VBw"),i=function(e,t){return r.createElement(a.a,Object.assign({},e,{ref:t,icon:o}))};i.displayName="CloseOutlined";t.a=r.forwardRef(i)},"74dF":function(e,t,n){},AP2z:function(e,t,n){var r=n("nmnc"),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(l){}var o=i.call(e);return r&&(t?e[c]=n:delete e[c]),o}},BUzJ:function(e,t,n){},"Dt+G":function(e,t,n){},Dtc0:function(e,t,n){"use strict";n.r(t);n("M7k7");var r=n("Ol7k"),o=n("q1tI"),a=n.n(o),i=n("U4IR"),c=n("kuUC"),l=(n("Jmwx"),n("BMrR")),s=(n("rO+z"),n("kPKH")),u=n("1NmI"),f=n.n(u),p=function(e){var t=e.img,n=e.textH4,r=e.textH3,o=e.alt,i=e.height,c=e.width;return a.a.createElement("div",{className:f.a.aboutTile},a.a.createElement("div",{className:f.a.aboutBlock},a.a.createElement("img",{src:"../"+t,height:i||64,width:c||64,alt:o||""})),a.a.createElement("div",{className:"textCenter "+f.a.mrTp26PX},a.a.createElement("h4",null,n||""),a.a.createElement("h3",null,r||"")))},d=function(e){return{__html:e}},m=n("JkAW"),v="Hola mi nombre es <b>Mario Ezequiel Garcia Huerta</b>.\n Soy un autodidacta en el desarrollo web, actualmente estoy especializandome en\n aprender el Stack MERN siendo mi fuerte la parte del backend con <b>Node JS con Express, \n MongoDB con Mongoose</b>, y en menor medida el frontend en el cual me enfoco en \n <b>React JS con Ant Design</b>.",h="Actualmente estoy en busca de mi primera oportunidad laboral con <b>programador jr</b>,\n pues toda mi experiencia es en proyectos personales y en cursos que tomo de manera autodicta, \n por lo cual siempre estoy dispuesto a aprender alguna nueva tecnologia.",b=function(){var e,t=v+" "+(null!==(e=h)&&""!==e&&(e=e.toString()).replace(/(<([^>]+)>)/gi,""));return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",null,a.a.createElement(m.a,{title:"About",description:t,path:"",keywords:["Mario","Ezequiel","Garcia","Huerta","FullStack developer","Javascript","ReactJS","NodeJS","MongoDB","Ant-desig"]}),a.a.createElement("h1",{className:"titleSeparate"},"About Me"),a.a.createElement("p",{dangerouslySetInnerHTML:d(v)}),a.a.createElement("p",{dangerouslySetInnerHTML:d(h)})),a.a.createElement(l.a,{gutter:[20,20]},a.a.createElement(s.a,{xs:24,sm:24,md:12,lg:12},a.a.createElement(p,{img:"location.png",height:60,alt:"location image",textH4:"Soy de",textH3:"Cunduacan, Tabasco, México"})),a.a.createElement(s.a,{xs:24,sm:24,md:12,lg:12},a.a.createElement(p,{img:"meeting.png",alt:"trabajo en equipo",textH4:"Trabajo en equipo",textH3:"para cumplir los objetivos"})),a.a.createElement(s.a,{xs:24,sm:24,md:12,lg:12},a.a.createElement(p,{img:"cinema.png",alt:"cinema",textH4:"Mi pasatiempo",textH3:"es llegar al cine"})),a.a.createElement(s.a,{xs:24,sm:24,md:12,lg:12},a.a.createElement(p,{img:"web.png",alt:"web image",textH4:"Programador autodidacta",textH3:"Me gusta leer la documentacion y tomar cursos online para aprender",height:60,width:60}))))},g=(n("SchZ"),n("GJlF"),n("Dt+G"),n("wx14")),y=n("rePB"),O=n("U8pU"),j=n("ODXe"),C=n("TSYQ"),E=n.n(C),w=n("t23M"),x=n("c+Xe"),I=n("H84U"),M=n("uaoM"),N=n("ACnJ");var S=function(){var e=Object(o.useState)({}),t=Object(j.a)(e,2),n=t[0],r=t[1];return Object(o.useEffect)((function(){var e=N.a.subscribe((function(e){r(e)}));return function(){return N.a.unsubscribe(e)}}),[]),n},A=o.createContext("default"),k=function(e){var t=e.children,n=e.size;return o.createElement(A.Consumer,null,(function(e){return o.createElement(A.Provider,{value:n||e},t)}))},P=A,T=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},D=function(e,t){var n,r,a=o.useContext(P),i=o.useState(1),c=Object(j.a)(i,2),l=c[0],s=c[1],u=o.useState(!1),f=Object(j.a)(u,2),p=f[0],d=f[1],m=o.useState(!0),v=Object(j.a)(m,2),h=v[0],b=v[1],C=o.useRef(),A=o.useRef(),k=Object(x.a)(t,C),D=o.useContext(I.b).getPrefixCls,R=function(){if(A.current&&C.current){var t=A.current.offsetWidth,n=C.current.offsetWidth;if(0!==t&&0!==n){var r=e.gap,o=void 0===r?4:r;2*o<n&&s(n-2*o<t?(n-2*o)/t:1)}}};o.useEffect((function(){d(!0)}),[]),o.useEffect((function(){b(!0),s(1)}),[e.src]),o.useEffect((function(){R()}),[e.gap]);var z=e.prefixCls,L=e.shape,F=e.size,K=e.src,V=e.srcSet,U=e.icon,B=e.className,H=e.alt,Q=e.draggable,W=e.children,J=T(e,["prefixCls","shape","size","src","srcSet","icon","className","alt","draggable","children"]),G="default"===F?a:F,Z=S(),Y=o.useMemo((function(){if("object"!==Object(O.a)(G))return{};var e=N.b.find((function(e){return Z[e]})),t=G[e];return t?{width:t,height:t,lineHeight:"".concat(t,"px"),fontSize:U?t/2:18}:{}}),[Z,G]);Object(M.a)(!("string"==typeof U&&U.length>2),"Avatar","`icon` is using ReactNode instead of string naming in v4. Please check `".concat(U,"` at https://ant.design/components/icon"));var q,X=D("avatar",z),_=E()((n={},Object(y.a)(n,"".concat(X,"-lg"),"large"===G),Object(y.a)(n,"".concat(X,"-sm"),"small"===G),n)),$=o.isValidElement(K),ee=E()(X,_,(r={},Object(y.a)(r,"".concat(X,"-").concat(L),L),Object(y.a)(r,"".concat(X,"-image"),$||K&&h),Object(y.a)(r,"".concat(X,"-icon"),U),r),B),te="number"==typeof G?{width:G,height:G,lineHeight:"".concat(G,"px"),fontSize:U?G/2:18}:{};if("string"==typeof K&&h)q=o.createElement("img",{src:K,draggable:Q,srcSet:V,onError:function(){var t=e.onError;!1!==(t?t():void 0)&&b(!1)},alt:H});else if($)q=K;else if(U)q=U;else if(p||1!==l){var ne="scale(".concat(l,") translateX(-50%)"),re={msTransform:ne,WebkitTransform:ne,transform:ne},oe="number"==typeof G?{lineHeight:"".concat(G,"px")}:{};q=o.createElement(w.a,{onResize:R},o.createElement("span",{className:"".concat(X,"-string"),ref:function(e){A.current=e},style:Object(g.a)(Object(g.a)({},oe),re)},W))}else q=o.createElement("span",{className:"".concat(X,"-string"),style:{opacity:0},ref:function(e){A.current=e}},W);return delete J.onError,delete J.gap,o.createElement("span",Object(g.a)({},J,{style:Object(g.a)(Object(g.a)(Object(g.a)({},te),Y),J.style),className:ee,ref:k}),q)},R=o.forwardRef(D);R.displayName="Avatar",R.defaultProps={shape:"circle",size:"default"};var z=R,L=n("Zm9Q"),F=n("0n0R"),K=n("VTBJ"),V=n("Ff2n"),U=n("1OyB"),B=n("vuIU"),H=n("JX7q"),Q=n("Ji7U"),W=n("LK+K"),J=n("i8i4"),G=n.n(J),Z=n("wgJM");function Y(e,t){return!!e&&e.contains(t)}var q=n("m+aA"),X=n("zT1h"),_=n("MNnm"),$=Object(o.forwardRef)((function(e,t){var n=e.didUpdate,r=e.getContainer,a=e.children,i=Object(o.useRef)();Object(o.useImperativeHandle)(t,(function(){return{}}));var c=Object(o.useRef)(!1);return!c.current&&Object(_.a)()&&(i.current=r(),c.current=!0),Object(o.useEffect)((function(){null==n||n(e)})),Object(o.useEffect)((function(){return function(){var e,t;null===(e=i.current)||void 0===e||null===(t=e.parentNode)||void 0===t||t.removeChild(i.current)}}),[]),i.current?G.a.createPortal(a,i.current):null}));function ee(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}var te=function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e.substr(0,4)))},ne=n("8XRh");function re(e){var t=e.prefixCls,n=e.motion,r=e.animation,o=e.transitionName;return n||(r?{motionName:"".concat(t,"-").concat(r)}:o?{motionName:o}:null)}function oe(e){var t=e.prefixCls,n=e.visible,r=e.zIndex,a=e.mask,i=e.maskMotion,c=e.maskAnimation,l=e.maskTransitionName;if(!a)return null;var s={};return(i||l||c)&&(s=Object(K.a)({motionAppear:!0},re({motion:i,prefixCls:t,transitionName:l,animation:c}))),o.createElement(ne.b,Object(g.a)({},s,{visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return o.createElement("div",{style:{zIndex:r},className:E()("".concat(t,"-mask"),n)})}))}var ae;function ie(e){return(ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var se={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function ue(){if(void 0!==ae)return ae;ae="";var e=document.createElement("p").style;for(var t in se)t+"Transform"in e&&(ae=t);return ae}function fe(){return ue()?"".concat(ue(),"TransitionProperty"):"transitionProperty"}function pe(){return ue()?"".concat(ue(),"Transform"):"transform"}function de(e,t){var n=fe();n&&(e.style[n]=t,"transitionProperty"!==n&&(e.style.transitionProperty=t))}function me(e,t){var n=pe();n&&(e.style[n]=t,"transform"!==n&&(e.style.transform=t))}var ve,he=/matrix\((.*)\)/,be=/matrix3d\((.*)\)/;function ge(e){var t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}function ye(e,t,n){var r=n;if("object"!==ie(t))return void 0!==r?("number"==typeof r&&(r="".concat(r,"px")),void(e.style[t]=r)):ve(e,t);for(var o in t)t.hasOwnProperty(o)&&ye(e,o,t[o])}function Oe(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function je(e){return Oe(e)}function Ce(e){return Oe(e,!0)}function Ee(e){var t=function(e){var t,n,r,o=e.ownerDocument,a=o.body,i=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=i.clientLeft||a.clientLeft||0,top:r-=i.clientTop||a.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=je(r),t.top+=Ce(r),t}function we(e){return null!=e&&e==e.window}function xe(e){return we(e)?e.document:9===e.nodeType?e:e.ownerDocument}var Ie=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+$"),"i"),Me=/^(top|right|bottom|left)$/,Ne="left";function Se(e,t){return"left"===e?t.useCssRight?"right":e:t.useCssBottom?"bottom":e}function Ae(e){return"left"===e?"right":"right"===e?"left":"top"===e?"bottom":"bottom"===e?"top":void 0}function ke(e,t,n){"static"===ye(e,"position")&&(e.style.position="relative");var r=-999,o=-999,a=Se("left",n),i=Se("top",n),c=Ae(a),l=Ae(i);"left"!==a&&(r=999),"top"!==i&&(o=999);var s,u="",f=Ee(e);("left"in t||"top"in t)&&(u=(s=e).style.transitionProperty||s.style[fe()]||"",de(e,"none")),"left"in t&&(e.style[c]="",e.style[a]="".concat(r,"px")),"top"in t&&(e.style[l]="",e.style[i]="".concat(o,"px")),ge(e);var p=Ee(e),d={};for(var m in t)if(t.hasOwnProperty(m)){var v=Se(m,n),h="left"===m?r:o,b=f[m]-p[m];d[v]=v===m?h+b:h-b}ye(e,d),ge(e),("left"in t||"top"in t)&&de(e,u);var g={};for(var y in t)if(t.hasOwnProperty(y)){var O=Se(y,n),j=t[y]-f[y];g[O]=y===O?d[O]+j:d[O]-j}ye(e,g)}function Pe(e,t){var n=Ee(e),r=function(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("transform")||t.getPropertyValue(pe());if(n&&"none"!==n){var r=n.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(r[12]||r[4],0),y:parseFloat(r[13]||r[5],0)}}return{x:0,y:0}}(e),o={x:r.x,y:r.y};"left"in t&&(o.x=r.x+t.left-n.left),"top"in t&&(o.y=r.y+t.top-n.top),function(e,t){var n=window.getComputedStyle(e,null),r=n.getPropertyValue("transform")||n.getPropertyValue(pe());if(r&&"none"!==r){var o,a=r.match(he);if(a)(o=(a=a[1]).split(",").map((function(e){return parseFloat(e,10)})))[4]=t.x,o[5]=t.y,me(e,"matrix(".concat(o.join(","),")"));else(o=r.match(be)[1].split(",").map((function(e){return parseFloat(e,10)})))[12]=t.x,o[13]=t.y,me(e,"matrix3d(".concat(o.join(","),")"))}else me(e,"translateX(".concat(t.x,"px) translateY(").concat(t.y,"px) translateZ(0)"))}(e,o)}function Te(e,t){for(var n=0;n<e.length;n++)t(e[n])}function De(e){return"border-box"===ve(e,"boxSizing")}"undefined"!=typeof window&&(ve=window.getComputedStyle?function(e,t,n){var r=n,o="",a=xe(e);return(r=r||a.defaultView.getComputedStyle(e,null))&&(o=r.getPropertyValue(t)||r[t]),o}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(Ie.test(n)&&!Me.test(t)){var r=e.style,o=r[Ne],a=e.runtimeStyle[Ne];e.runtimeStyle[Ne]=e.currentStyle[Ne],r[Ne]="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r[Ne]=o,e.runtimeStyle[Ne]=a}return""===n?"auto":n});var Re=["margin","border","padding"];function ze(e,t,n){var r,o={},a=e.style;for(r in t)t.hasOwnProperty(r)&&(o[r]=a[r],a[r]=t[r]);for(r in n.call(e),t)t.hasOwnProperty(r)&&(a[r]=o[r])}function Le(e,t,n){var r,o,a,i=0;for(o=0;o<t.length;o++)if(r=t[o])for(a=0;a<n.length;a++){var c=void 0;c="border"===r?"".concat(r).concat(n[a],"Width"):r+n[a],i+=parseFloat(ve(e,c))||0}return i}var Fe={getParent:function(e){var t=e;do{t=11===t.nodeType&&t.host?t.host:t.parentNode}while(t&&1!==t.nodeType&&9!==t.nodeType);return t}};function Ke(e,t,n){var r=n;if(we(e))return"width"===t?Fe.viewportWidth(e):Fe.viewportHeight(e);if(9===e.nodeType)return"width"===t?Fe.docWidth(e):Fe.docHeight(e);var o="width"===t?["Left","Right"]:["Top","Bottom"],a="width"===t?e.getBoundingClientRect().width:e.getBoundingClientRect().height,i=(ve(e),De(e)),c=0;(null==a||a<=0)&&(a=void 0,(null==(c=ve(e,t))||Number(c)<0)&&(c=e.style[t]||0),c=parseFloat(c)||0),void 0===r&&(r=i?1:-1);var l=void 0!==a||i,s=a||c;return-1===r?l?s-Le(e,["border","padding"],o):c:l?1===r?s:s+(2===r?-Le(e,["border"],o):Le(e,["margin"],o)):c+Le(e,Re.slice(r),o)}Te(["Width","Height"],(function(e){Fe["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],Fe["viewport".concat(e)](n))},Fe["viewport".concat(e)]=function(t){var n="client".concat(e),r=t.document,o=r.body,a=r.documentElement[n];return"CSS1Compat"===r.compatMode&&a||o&&o[n]||a}}));var Ve={position:"absolute",visibility:"hidden",display:"block"};function Ue(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=t[0];return 0!==o.offsetWidth?r=Ke.apply(void 0,t):ze(o,Ve,(function(){r=Ke.apply(void 0,t)})),r}function Be(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}Te(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);Fe["outer".concat(t)]=function(t,n){return t&&Ue(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];Fe[e]=function(t,r){var o=r;if(void 0===o)return t&&Ue(t,e,-1);if(t){ve(t);return De(t)&&(o+=Le(t,["padding","border"],n)),ye(t,e,o)}}}));var He={getWindow:function(e){if(e&&e.document&&e.setTimeout)return e;var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},getDocument:xe,offset:function(e,t,n){if(void 0===t)return Ee(e);!function(e,t,n){if(n.ignoreShake){var r=Ee(e),o=r.left.toFixed(0),a=r.top.toFixed(0),i=t.left.toFixed(0),c=t.top.toFixed(0);if(o===i&&a===c)return}n.useCssRight||n.useCssBottom?ke(e,t,n):n.useCssTransform&&pe()in document.body.style?Pe(e,t):ke(e,t,n)}(e,t,n||{})},isWindow:we,each:Te,css:ye,clone:function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);if(e.overflow)for(t in e)e.hasOwnProperty(t)&&(n.overflow[t]=e.overflow[t]);return n},mix:Be,getWindowScrollLeft:function(e){return je(e)},getWindowScrollTop:function(e){return Ce(e)},merge:function(){for(var e={},t=0;t<arguments.length;t++)He.mix(e,t<0||arguments.length<=t?void 0:arguments[t]);return e},viewportWidth:0,viewportHeight:0};Be(He,Fe);var Qe=He.getParent;function We(e){if(He.isWindow(e)||9===e.nodeType)return null;var t,n=He.getDocument(e).body,r=He.css(e,"position");if(!("fixed"===r||"absolute"===r))return"html"===e.nodeName.toLowerCase()?null:Qe(e);for(t=Qe(e);t&&t!==n&&9!==t.nodeType;t=Qe(t))if("static"!==(r=He.css(t,"position")))return t;return null}var Je=He.getParent;function Ge(e,t){for(var n={left:0,right:1/0,top:0,bottom:1/0},r=We(e),o=He.getDocument(e),a=o.defaultView||o.parentWindow,i=o.body,c=o.documentElement;r;){if(-1!==navigator.userAgent.indexOf("MSIE")&&0===r.clientWidth||r===i||r===c||"visible"===He.css(r,"overflow")){if(r===i||r===c)break}else{var l=He.offset(r);l.left+=r.clientLeft,l.top+=r.clientTop,n.top=Math.max(n.top,l.top),n.right=Math.min(n.right,l.left+r.clientWidth),n.bottom=Math.min(n.bottom,l.top+r.clientHeight),n.left=Math.max(n.left,l.left)}r=We(r)}var s=null;He.isWindow(e)||9===e.nodeType||(s=e.style.position,"absolute"===He.css(e,"position")&&(e.style.position="fixed"));var u=He.getWindowScrollLeft(a),f=He.getWindowScrollTop(a),p=He.viewportWidth(a),d=He.viewportHeight(a),m=c.scrollWidth,v=c.scrollHeight,h=window.getComputedStyle(i);if("hidden"===h.overflowX&&(m=a.innerWidth),"hidden"===h.overflowY&&(v=a.innerHeight),e.style&&(e.style.position=s),t||function(e){if(He.isWindow(e)||9===e.nodeType)return!1;var t=He.getDocument(e).body,n=null;for(n=Je(e);n&&n!==t;n=Je(n)){if("fixed"===He.css(n,"position"))return!0}return!1}(e))n.left=Math.max(n.left,u),n.top=Math.max(n.top,f),n.right=Math.min(n.right,u+p),n.bottom=Math.min(n.bottom,f+d);else{var b=Math.max(m,u+p);n.right=Math.min(n.right,b);var g=Math.max(v,f+d);n.bottom=Math.min(n.bottom,g)}return n.top>=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function Ze(e){var t,n,r;if(He.isWindow(e)||9===e.nodeType){var o=He.getWindow(e);t={left:He.getWindowScrollLeft(o),top:He.getWindowScrollTop(o)},n=He.viewportWidth(o),r=He.viewportHeight(o)}else t=He.offset(e),n=He.outerWidth(e),r=He.outerHeight(e);return t.width=n,t.height=r,t}function Ye(e,t){var n=t.charAt(0),r=t.charAt(1),o=e.width,a=e.height,i=e.left,c=e.top;return"c"===n?c+=a/2:"b"===n&&(c+=a),"c"===r?i+=o/2:"r"===r&&(i+=o),{left:i,top:c}}function qe(e,t,n,r,o){var a=Ye(t,n[1]),i=Ye(e,n[0]),c=[i.left-a.left,i.top-a.top];return{left:Math.round(e.left-c[0]+r[0]-o[0]),top:Math.round(e.top-c[1]+r[1]-o[1])}}function Xe(e,t,n){return e.left<n.left||e.left+t.width>n.right}function _e(e,t,n){return e.top<n.top||e.top+t.height>n.bottom}function $e(e,t,n){var r=[];return He.each(e,(function(e){r.push(e.replace(t,(function(e){return n[e]})))})),r}function et(e,t){return e[t]=-e[t],e}function tt(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function nt(e,t){e[0]=tt(e[0],t.width),e[1]=tt(e[1],t.height)}function rt(e,t,n,r){var o=n.points,a=n.offset||[0,0],i=n.targetOffset||[0,0],c=n.overflow,l=n.source||e;a=[].concat(a),i=[].concat(i);var s={},u=0,f=Ge(l,!(!(c=c||{})||!c.alwaysByViewport)),p=Ze(l);nt(a,p),nt(i,t);var d=qe(p,t,o,a,i),m=He.merge(p,d);if(f&&(c.adjustX||c.adjustY)&&r){if(c.adjustX&&Xe(d,p,f)){var v=$e(o,/[lr]/gi,{l:"r",r:"l"}),h=et(a,0),b=et(i,0);(function(e,t,n){return e.left>n.right||e.left+t.width<n.left})(qe(p,t,v,h,b),p,f)||(u=1,o=v,a=h,i=b)}if(c.adjustY&&_e(d,p,f)){var g=$e(o,/[tb]/gi,{t:"b",b:"t"}),y=et(a,1),O=et(i,1);(function(e,t,n){return e.top>n.bottom||e.top+t.height<n.top})(qe(p,t,g,y,O),p,f)||(u=1,o=g,a=y,i=O)}u&&(d=qe(p,t,o,a,i),He.mix(m,d));var j=Xe(d,p,f),C=_e(d,p,f);if(j||C){var E=o;j&&(E=$e(o,/[lr]/gi,{l:"r",r:"l"})),C&&(E=$e(o,/[tb]/gi,{t:"b",b:"t"})),o=E,a=n.offset||[0,0],i=n.targetOffset||[0,0]}s.adjustX=c.adjustX&&j,s.adjustY=c.adjustY&&C,(s.adjustX||s.adjustY)&&(m=function(e,t,n,r){var o=He.clone(e),a={width:t.width,height:t.height};return r.adjustX&&o.left<n.left&&(o.left=n.left),r.resizeWidth&&o.left>=n.left&&o.left+a.width>n.right&&(a.width-=o.left+a.width-n.right),r.adjustX&&o.left+a.width>n.right&&(o.left=Math.max(n.right-a.width,n.left)),r.adjustY&&o.top<n.top&&(o.top=n.top),r.resizeHeight&&o.top>=n.top&&o.top+a.height>n.bottom&&(a.height-=o.top+a.height-n.bottom),r.adjustY&&o.top+a.height>n.bottom&&(o.top=Math.max(n.bottom-a.height,n.top)),He.mix(o,a)}(d,p,f,s))}return m.width!==p.width&&He.css(l,"width",He.width(l)+m.width-p.width),m.height!==p.height&&He.css(l,"height",He.height(l)+m.height-p.height),He.offset(l,{left:m.left,top:m.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:o,offset:a,targetOffset:i,overflow:s}}function ot(e,t,n){var r=n.target||t;return rt(e,Ze(r),n,!function(e,t){var n=Ge(e,t),r=Ze(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}(r,n.overflow&&n.overflow.alwaysByViewport))}function at(e,t,n){var r,o,a=He.getDocument(e),i=a.defaultView||a.parentWindow,c=He.getWindowScrollLeft(i),l=He.getWindowScrollTop(i),s=He.viewportWidth(i),u=He.viewportHeight(i);r="pageX"in t?t.pageX:c+t.clientX,o="pageY"in t?t.pageY:l+t.clientY;var f=r>=0&&r<=c+s&&o>=0&&o<=l+u;return rt(e,{left:r,top:o,width:0,height:0},function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(n,!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n,{points:[n.points[0],"cc"]}),f)}ot.__getOffsetParent=We,ot.__getVisibleRectForElement=Ge;var it=n("bdgK");function ct(e,t){var n=null,r=null;var o=new it.a((function(e){var o=Object(j.a)(e,1)[0].target;if(document.documentElement.contains(o)){var a=o.getBoundingClientRect(),i=a.width,c=a.height,l=Math.floor(i),s=Math.floor(c);n===l&&r===s||Promise.resolve().then((function(){t({width:l,height:s})})),n=l,r=s}}));return e&&o.observe(e),function(){o.disconnect()}}function lt(e){return"function"!=typeof e?null:e()}function st(e){return"object"===Object(O.a)(e)&&e?e:null}var ut=a.a.forwardRef((function(e,t){var n=e.children,r=e.disabled,o=e.target,i=e.align,c=e.onAlign,l=e.monitorWindowResize,s=e.monitorBufferTime,u=void 0===s?0:s,f=a.a.useRef({}),p=a.a.useRef(),d=a.a.Children.only(n),m=a.a.useRef({});m.current.disabled=r,m.current.target=o,m.current.onAlign=c;var v=function(e,t){var n=a.a.useRef(!1),r=a.a.useRef(null);function o(){window.clearTimeout(r.current)}return[function a(i){if(n.current&&!0!==i)o(),r.current=window.setTimeout((function(){n.current=!1,a()}),t);else{if(!1===e())return;n.current=!0,o(),r.current=window.setTimeout((function(){n.current=!1}),t)}},function(){n.current=!1,o()}]}((function(){var e=m.current,t=e.disabled,n=e.target,r=e.onAlign;if(!t&&n){var o,a=p.current,c=lt(n),l=st(n);f.current.element=c,f.current.point=l;var s=document.activeElement;return c&&function(e){if(!e)return!1;if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox();if(t.width||t.height)return!0}if(e.getBoundingClientRect){var n=e.getBoundingClientRect();if(n.width||n.height)return!0}return!1}(c)?o=ot(a,c,i):l&&(o=at(a,l,i)),function(e,t){e!==document.activeElement&&Y(t,e)&&"function"==typeof e.focus&&e.focus()}(s,a),r&&o&&r(a,o),!0}return!1}),u),h=Object(j.a)(v,2),b=h[0],g=h[1],y=a.a.useRef({cancel:function(){}}),O=a.a.useRef({cancel:function(){}});a.a.useEffect((function(){var e,t,n=lt(o),r=st(o);p.current!==O.current.element&&(O.current.cancel(),O.current.element=p.current,O.current.cancel=ct(p.current,b)),f.current.element===n&&((e=f.current.point)===(t=r)||e&&t&&("pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t&&e.clientX===t.clientX&&e.clientY===t.clientY))||(b(),y.current.element!==n&&(y.current.cancel(),y.current.element=n,y.current.cancel=ct(n,b)))})),a.a.useEffect((function(){r?g():b()}),[r]);var C=a.a.useRef(null);return a.a.useEffect((function(){l?C.current||(C.current=Object(X.a)(window,"resize",b)):C.current&&(C.current.remove(),C.current=null)}),[l]),a.a.useEffect((function(){return function(){y.current.cancel(),O.current.cancel(),C.current&&C.current.remove(),g()}}),[]),a.a.useImperativeHandle(t,(function(){return{forceAlign:function(){return b(!0)}}})),a.a.isValidElement(d)&&(d=a.a.cloneElement(d,{ref:Object(x.a)(d.ref,p)})),d}));ut.displayName="Align";var ft=ut,pt=n("o0o1"),dt=n.n(pt),mt=n("HaE+"),vt=["measure","align",null,"motion"],ht=o.forwardRef((function(e,t){var n=e.visible,r=e.prefixCls,a=e.className,i=e.style,c=e.children,l=e.zIndex,s=e.stretch,u=e.destroyPopupOnHide,f=e.align,p=e.point,d=e.getRootDomNode,m=e.getClassNameFromAlign,v=e.onAlign,h=e.onMouseEnter,b=e.onMouseLeave,y=e.onMouseDown,O=e.onTouchStart,C=Object(o.useRef)(),w=Object(o.useRef)(),x=Object(o.useState)(),I=Object(j.a)(x,2),M=I[0],N=I[1],S=function(e){var t=o.useState({width:0,height:0}),n=Object(j.a)(t,2),r=n[0],a=n[1];return[o.useMemo((function(){var t={};if(e){var n=r.width,o=r.height;-1!==e.indexOf("height")&&o?t.height=o:-1!==e.indexOf("minHeight")&&o&&(t.minHeight=o),-1!==e.indexOf("width")&&n?t.width=n:-1!==e.indexOf("minWidth")&&n&&(t.minWidth=n)}return t}),[e,r]),function(e){a({width:e.offsetWidth,height:e.offsetHeight})}]}(s),A=Object(j.a)(S,2),k=A[0],P=A[1];var T=function(e,t){var n=Object(o.useState)(null),r=Object(j.a)(n,2),a=r[0],i=r[1],c=Object(o.useRef)(),l=Object(o.useRef)(!1);function s(e){l.current||i(e)}function u(){Z.a.cancel(c.current)}return Object(o.useEffect)((function(){s("measure")}),[e]),Object(o.useEffect)((function(){switch(a){case"measure":t()}a&&(c.current=Object(Z.a)(Object(mt.a)(dt.a.mark((function e(){var t,n;return dt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=vt.indexOf(a),(n=vt[t+1])&&-1!==t&&s(n);case 3:case"end":return e.stop()}}),e)})))))}),[a]),Object(o.useEffect)((function(){return function(){l.current=!0,u()}}),[]),[a,function(e){u(),c.current=Object(Z.a)((function(){s((function(e){switch(a){case"align":return"motion";case"motion":return"stable"}return e})),null==e||e()}))}]}(n,(function(){s&&P(d())})),D=Object(j.a)(T,2),R=D[0],z=D[1],L=Object(o.useRef)();function F(){var e;null===(e=C.current)||void 0===e||e.forceAlign()}function V(e,t){if("align"===R){var n=m(t);N(n),M!==n?Promise.resolve().then((function(){F()})):z((function(){var e;null===(e=L.current)||void 0===e||e.call(L)})),null==v||v(e,t)}}var U=Object(K.a)({},re(e));function B(){return new Promise((function(e){L.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=U[e];U[e]=function(e,n){return z(),null==t?void 0:t(e,n)}})),o.useEffect((function(){U.motionName||"motion"!==R||z()}),[U.motionName,R]),o.useImperativeHandle(t,(function(){return{forceAlign:F,getElement:function(){return w.current}}}));var H=Object(K.a)(Object(K.a)(Object(K.a)({},k),{},{zIndex:l},i),{},{opacity:"motion"!==R&&"stable"!==R&&n?0:void 0,pointerEvents:"stable"===R?void 0:"none"}),Q=!0;!(null==f?void 0:f.points)||"align"!==R&&"stable"!==R||(Q=!1);var W=c;return o.Children.count(c)>1&&(W=o.createElement("div",{className:"".concat(r,"-content")},c)),o.createElement(ne.b,Object(g.a)({visible:n,ref:w,leavedClassName:"".concat(r,"-hidden")},U,{onAppearPrepare:B,onEnterPrepare:B,removeOnLeave:u}),(function(e,t){var n=e.className,i=e.style,c=E()(r,a,M,n);return o.createElement(ft,{target:p||d,key:"popup",ref:C,monitorWindowResize:!0,disabled:Q,align:f,onAlign:V},o.createElement("div",{ref:t,className:c,onMouseEnter:h,onMouseLeave:b,onMouseDown:y,onTouchStart:O,style:Object(K.a)(Object(K.a)({},i),H)},W))}))}));ht.displayName="PopupInner";var bt=ht,gt=o.forwardRef((function(e,t){var n=e.prefixCls,r=e.visible,a=e.zIndex,i=e.children,c=e.mobile,l=(c=void 0===c?{}:c).popupClassName,s=c.popupStyle,u=c.popupMotion,f=void 0===u?{}:u,p=c.popupRender,d=o.useRef();o.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return d.current}}}));var m=Object(K.a)({zIndex:a},s),v=i;return o.Children.count(i)>1&&(v=o.createElement("div",{className:"".concat(n,"-content")},i)),p&&(v=p(v)),o.createElement(ne.b,Object(g.a)({visible:r,ref:d,removeOnLeave:!0},f),(function(e,t){var r=e.className,a=e.style,i=E()(n,l,r);return o.createElement("div",{ref:t,className:i,style:Object(K.a)(Object(K.a)({},a),m)},v)}))}));gt.displayName="MobilePopupInner";var yt=gt,Ot=o.forwardRef((function(e,t){var n=e.visible,r=e.mobile,a=Object(V.a)(e,["visible","mobile"]),i=Object(o.useState)(n),c=Object(j.a)(i,2),l=c[0],s=c[1],u=Object(o.useState)(!1),f=Object(j.a)(u,2),p=f[0],d=f[1],m=Object(K.a)(Object(K.a)({},a),{},{visible:l});Object(o.useEffect)((function(){s(n),n&&r&&d(te())}),[n,r]);var v=p?o.createElement(yt,Object(g.a)({},m,{mobile:r,ref:t})):o.createElement(bt,Object(g.a)({},m,{ref:t}));return o.createElement("div",null,o.createElement(oe,m),v)}));Ot.displayName="Popup";var jt=Ot,Ct=o.createContext(null);function Et(){}function wt(){return""}function xt(e){return e?e.ownerDocument:window.document}var It=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];var Mt,Nt,St=(Mt=$,(Nt=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(e){var r,a;return Object(U.a)(this,n),(r=t.call(this,e)).popupRef=o.createRef(),r.triggerRef=o.createRef(),r.onMouseEnter=function(e){var t=r.props.mouseEnterDelay;r.fireEvents("onMouseEnter",e),r.delaySetPopupVisible(!0,t,t?null:e)},r.onMouseMove=function(e){r.fireEvents("onMouseMove",e),r.setPoint(e)},r.onMouseLeave=function(e){r.fireEvents("onMouseLeave",e),r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onPopupMouseEnter=function(){r.clearDelayTimer()},r.onPopupMouseLeave=function(e){var t;e.relatedTarget&&!e.relatedTarget.setTimeout&&Y(null===(t=r.popupRef.current)||void 0===t?void 0:t.getElement(),e.relatedTarget)||r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onFocus=function(e){r.fireEvents("onFocus",e),r.clearDelayTimer(),r.isFocusToShow()&&(r.focusTime=Date.now(),r.delaySetPopupVisible(!0,r.props.focusDelay))},r.onMouseDown=function(e){r.fireEvents("onMouseDown",e),r.preClickTime=Date.now()},r.onTouchStart=function(e){r.fireEvents("onTouchStart",e),r.preTouchTime=Date.now()},r.onBlur=function(e){r.fireEvents("onBlur",e),r.clearDelayTimer(),r.isBlurToHide()&&r.delaySetPopupVisible(!1,r.props.blurDelay)},r.onContextMenu=function(e){e.preventDefault(),r.fireEvents("onContextMenu",e),r.setPopupVisible(!0,e)},r.onContextMenuClose=function(){r.isContextMenuToShow()&&r.close()},r.onClick=function(e){if(r.fireEvents("onClick",e),r.focusTime){var t;if(r.preClickTime&&r.preTouchTime?t=Math.min(r.preClickTime,r.preTouchTime):r.preClickTime?t=r.preClickTime:r.preTouchTime&&(t=r.preTouchTime),Math.abs(t-r.focusTime)<20)return;r.focusTime=0}r.preClickTime=0,r.preTouchTime=0,r.isClickToShow()&&(r.isClickToHide()||r.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var n=!r.state.popupVisible;(r.isClickToHide()&&!n||n&&r.isClickToShow())&&r.setPopupVisible(!r.state.popupVisible,e)},r.onPopupMouseDown=function(){var e;r.hasPopupMouseDown=!0,clearTimeout(r.mouseDownTimeout),r.mouseDownTimeout=window.setTimeout((function(){r.hasPopupMouseDown=!1}),0),r.context&&(e=r.context).onPopupMouseDown.apply(e,arguments)},r.onDocumentClick=function(e){if(!r.props.mask||r.props.maskClosable){var t=e.target,n=r.getRootDomNode(),o=r.getPopupDomNode();Y(n,t)||Y(o,t)||r.hasPopupMouseDown||r.close()}},r.getRootDomNode=function(){var e=r.props.getTriggerDOMNode;if(e)return e(r.triggerRef.current);try{var t=Object(q.a)(r.triggerRef.current);if(t)return t}catch(n){}return G.a.findDOMNode(Object(H.a)(r))},r.getPopupClassNameFromAlign=function(e){var t=[],n=r.props,o=n.popupPlacement,a=n.builtinPlacements,i=n.prefixCls,c=n.alignPoint,l=n.getPopupClassNameFromAlign;return o&&a&&t.push(function(e,t,n,r){for(var o=n.points,a=Object.keys(e),i=0;i<a.length;i+=1){var c=a[i];if(ee(e[c].points,o,r))return"".concat(t,"-placement-").concat(c)}return""}(a,i,e,c)),l&&t.push(l(e)),t.join(" ")},r.getComponent=function(){var e=r.props,t=e.prefixCls,n=e.destroyPopupOnHide,a=e.popupClassName,i=e.onPopupAlign,c=e.popupMotion,l=e.popupAnimation,s=e.popupTransitionName,u=e.popupStyle,f=e.mask,p=e.maskAnimation,d=e.maskTransitionName,m=e.maskMotion,v=e.zIndex,h=e.popup,b=e.stretch,y=e.alignPoint,O=e.mobile,j=r.state,C=j.popupVisible,E=j.point,w=r.getPopupAlign(),x={};return r.isMouseEnterToShow()&&(x.onMouseEnter=r.onPopupMouseEnter),r.isMouseLeaveToHide()&&(x.onMouseLeave=r.onPopupMouseLeave),x.onMouseDown=r.onPopupMouseDown,x.onTouchStart=r.onPopupMouseDown,o.createElement(jt,Object(g.a)({prefixCls:t,destroyPopupOnHide:n,visible:C,point:y&&E,className:a,align:w,onAlign:i,animation:l,getClassNameFromAlign:r.getPopupClassNameFromAlign},x,{stretch:b,getRootDomNode:r.getRootDomNode,style:u,mask:f,zIndex:v,transitionName:s,maskAnimation:p,maskTransitionName:d,maskMotion:m,ref:r.popupRef,motion:c,mobile:O}),"function"==typeof h?h():h)},r.attachParent=function(e){Z.a.cancel(r.attachId);var t,n=r.props,o=n.getPopupContainer,a=n.getDocument,i=r.getRootDomNode();o?(i||0===o.length)&&(t=o(i)):t=a(r.getRootDomNode()).body,t?t.appendChild(e):r.attachId=Object(Z.a)((function(){r.attachParent(e)}))},r.getContainer=function(){var e=(0,r.props.getDocument)(r.getRootDomNode()).createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",r.attachParent(e),e},r.setPoint=function(e){r.props.alignPoint&&e&&r.setState({point:{pageX:e.pageX,pageY:e.pageY}})},r.handlePortalUpdate=function(){r.state.prevPopupVisible!==r.state.popupVisible&&r.props.afterPopupVisibleChange(r.state.popupVisible)},a="popupVisible"in e?!!e.popupVisible:!!e.defaultPopupVisible,r.state={prevPopupVisible:a,popupVisible:a},It.forEach((function(e){r["fire".concat(e)]=function(t){r.fireEvents(e,t)}})),r}return Object(B.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e,t=this.props;if(this.state.popupVisible)return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(e=t.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(X.a)(e,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(e=e||t.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(X.a)(e,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(e=e||t.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(X.a)(e,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(X.a)(window,"blur",this.onContextMenuClose)));this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Z.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var e;return(null===(e=this.popupRef.current)||void 0===e?void 0:e.getElement())||null}},{key:"getPopupAlign",value:function(){var e=this.props,t=e.popupPlacement,n=e.popupAlign,r=e.builtinPlacements;return t&&r?function(e,t,n){var r=e[t]||{};return Object(K.a)(Object(K.a)({},r),n)}(r,t,n):n}},{key:"setPopupVisible",value:function(e,t){var n=this.props.alignPoint,r=this.state.popupVisible;this.clearDelayTimer(),r!==e&&("popupVisible"in this.props||this.setState({popupVisible:e,prevPopupVisible:r}),this.props.onPopupVisibleChange(e)),n&&t&&e&&this.setPoint(t)}},{key:"delaySetPopupVisible",value:function(e,t,n){var r=this,o=1e3*t;if(this.clearDelayTimer(),o){var a=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=window.setTimeout((function(){r.setPopupVisible(e,a),r.clearDelayTimer()}),o)}else this.setPopupVisible(e,n)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(e){var t=this.props.children.props,n=this.props;return t[e]&&n[e]?this["fire".concat(e)]:t[e]||n[e]}},{key:"isClickToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isContextMenuToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("contextMenu")||-1!==n.indexOf("contextMenu")}},{key:"isClickToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isMouseEnterToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseEnter")}},{key:"isMouseLeaveToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseLeave")}},{key:"isFocusToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("focus")}},{key:"isBlurToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("blur")}},{key:"forcePopupAlign",value:function(){var e;this.state.popupVisible&&(null===(e=this.popupRef.current)||void 0===e||e.forceAlign())}},{key:"fireEvents",value:function(e,t){var n=this.props.children.props[e];n&&n(t);var r=this.props[e];r&&r(t)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var e=this.state.popupVisible,t=this.props,n=t.children,r=t.forceRender,a=t.alignPoint,i=t.className,c=t.autoDestroy,l=o.Children.only(n),s={key:"trigger"};this.isContextMenuToShow()?s.onContextMenu=this.onContextMenu:s.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(s.onClick=this.onClick,s.onMouseDown=this.onMouseDown,s.onTouchStart=this.onTouchStart):(s.onClick=this.createTwoChains("onClick"),s.onMouseDown=this.createTwoChains("onMouseDown"),s.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(s.onMouseEnter=this.onMouseEnter,a&&(s.onMouseMove=this.onMouseMove)):s.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?s.onMouseLeave=this.onMouseLeave:s.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(s.onFocus=this.onFocus,s.onBlur=this.onBlur):(s.onFocus=this.createTwoChains("onFocus"),s.onBlur=this.createTwoChains("onBlur"));var u=E()(l&&l.props&&l.props.className,i);u&&(s.className=u);var f=Object(K.a)({},s);Object(x.c)(l)&&(f.ref=Object(x.a)(this.triggerRef,l.ref));var p,d=o.cloneElement(l,f);return(e||this.popupRef.current||r)&&(p=o.createElement(Mt,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!e&&c&&(p=null),o.createElement(Ct.Provider,{value:{onPopupMouseDown:this.onPopupMouseDown}},d,p)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.popupVisible,r={};return void 0!==n&&t.popupVisible!==n&&(r.popupVisible=n,r.prevPopupVisible=t.popupVisible),r}}]),n}(o.Component)).contextType=Ct,Nt.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:wt,getDocument:xt,onPopupVisibleChange:Et,afterPopupVisibleChange:Et,onPopupAlign:Et,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Nt),At={adjustX:1,adjustY:1},kt=[0,0],Pt={left:{points:["cr","cl"],overflow:At,offset:[-4,0],targetOffset:kt},right:{points:["cl","cr"],overflow:At,offset:[4,0],targetOffset:kt},top:{points:["bc","tc"],overflow:At,offset:[0,-4],targetOffset:kt},bottom:{points:["tc","bc"],overflow:At,offset:[0,4],targetOffset:kt},topLeft:{points:["bl","tl"],overflow:At,offset:[0,-4],targetOffset:kt},leftTop:{points:["tr","tl"],overflow:At,offset:[-4,0],targetOffset:kt},topRight:{points:["br","tr"],overflow:At,offset:[0,-4],targetOffset:kt},rightTop:{points:["tl","tr"],overflow:At,offset:[4,0],targetOffset:kt},bottomRight:{points:["tr","br"],overflow:At,offset:[0,4],targetOffset:kt},rightBottom:{points:["bl","br"],overflow:At,offset:[4,0],targetOffset:kt},bottomLeft:{points:["tl","bl"],overflow:At,offset:[0,4],targetOffset:kt},leftBottom:{points:["br","bl"],overflow:At,offset:[-4,0],targetOffset:kt}},Tt=function(e){var t=e.overlay,n=e.prefixCls,r=e.id,a=e.overlayInnerStyle;return o.createElement("div",{className:"".concat(n,"-inner"),id:r,role:"tooltip",style:a},"function"==typeof t?t():t)},Dt=function(e,t){var n=e.overlayClassName,r=e.trigger,a=void 0===r?["hover"]:r,i=e.mouseEnterDelay,c=void 0===i?0:i,l=e.mouseLeaveDelay,s=void 0===l?.1:l,u=e.overlayStyle,f=e.prefixCls,p=void 0===f?"rc-tooltip":f,d=e.children,m=e.onVisibleChange,v=e.afterVisibleChange,h=e.transitionName,b=e.animation,y=e.motion,j=e.placement,C=void 0===j?"right":j,E=e.align,w=void 0===E?{}:E,x=e.destroyTooltipOnHide,I=void 0!==x&&x,M=e.defaultVisible,N=e.getTooltipContainer,S=e.overlayInnerStyle,A=Object(V.a)(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),k=Object(o.useRef)(null);Object(o.useImperativeHandle)(t,(function(){return k.current}));var P=Object(K.a)({},A);"visible"in e&&(P.popupVisible=e.visible);var T=!1,D=!1;if("boolean"==typeof I)T=I;else if(I&&"object"===Object(O.a)(I)){var R=I.keepParent;T=!0===R,D=!1===R}return o.createElement(St,Object(g.a)({popupClassName:n,prefixCls:p,popup:function(){var t=e.arrowContent,n=void 0===t?null:t,r=e.overlay,a=e.id;return[o.createElement("div",{className:"".concat(p,"-arrow"),key:"arrow"},n),o.createElement(Tt,{key:"content",prefixCls:p,id:a,overlay:r,overlayInnerStyle:S})]},action:a,builtinPlacements:Pt,popupPlacement:C,ref:k,popupAlign:w,getPopupContainer:N,onPopupVisibleChange:m,afterPopupVisibleChange:v,popupTransitionName:h,popupAnimation:b,popupMotion:y,defaultPopupVisible:M,destroyPopupOnHide:T,autoDestroy:D,mouseLeaveDelay:s,popupStyle:u,mouseEnterDelay:c},P),d)},Rt=Object(o.forwardRef)(Dt);function zt(e,t){var n=t||{},r=n.defaultValue,a=n.value,i=n.onChange,c=n.postState,l=o.useState((function(){return void 0!==a?a:void 0!==r?"function"==typeof r?r():r:"function"==typeof e?e():e})),s=Object(j.a)(l,2),u=s[0],f=s[1],p=void 0!==a?a:u;c&&(p=c(p));var d=o.useRef(!0);return o.useEffect((function(){d.current?d.current=!1:void 0===a&&f(a)}),[a]),[p,function(e){f(e),p!==e&&i&&i(e,p)}]}var Lt={adjustX:1,adjustY:1},Ft={adjustX:0,adjustY:0},Kt=[0,0];function Vt(e){return"boolean"==typeof e?e?Lt:Ft:Object(g.a)(Object(g.a)({},Ft),e)}var Ut=n("CWQg"),Bt=(Object(Ut.a)("success","processing","error","default","warning"),Object(Ut.a)("pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime")),Ht=function(e,t,n){return void 0!==n?n:"".concat(e,"-").concat(t)},Qt=new RegExp("^(".concat(Bt.join("|"),")(-inverse)?$"));function Wt(e,t){var n=e.type;if((!0===n.__ANT_BUTTON||!0===n.__ANT_SWITCH||!0===n.__ANT_CHECKBOX||"button"===e.type)&&e.props.disabled){var r=function(e,t){var n={},r=Object(g.a)({},e);return t.forEach((function(t){e&&t in e&&(n[t]=e[t],delete r[t])})),{picked:n,omitted:r}}(e.props.style,["position","left","right","top","bottom","float","display","zIndex"]),a=r.picked,i=r.omitted,c=Object(g.a)(Object(g.a)({display:"inline-block"},a),{cursor:"not-allowed",width:e.props.block?"100%":null}),l=Object(g.a)(Object(g.a)({},i),{pointerEvents:"none"}),s=Object(F.a)(e,{style:l,className:null});return o.createElement("span",{style:c,className:E()(e.props.className,"".concat(t,"-disabled-compatible-wrapper"))},s)}return e}var Jt=o.forwardRef((function(e,t){var n,r=o.useContext(I.b),a=r.getPopupContainer,i=r.getPrefixCls,c=r.direction,l=zt(!1,{value:e.visible,defaultValue:e.defaultVisible}),s=Object(j.a)(l,2),u=s[0],f=s[1],p=function(){var t=e.title,n=e.overlay;return!t&&!n&&0!==t},d=function(){var t=e.builtinPlacements,n=e.arrowPointAtCenter,r=e.autoAdjustOverflow;return t||function(e){var t=e.arrowWidth,n=void 0===t?5:t,r=e.horizontalArrowShift,o=void 0===r?16:r,a=e.verticalArrowShift,i=void 0===a?8:a,c=e.autoAdjustOverflow,l={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(o+n),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(i+n)]},topRight:{points:["br","tc"],offset:[o+n,-4]},rightTop:{points:["tl","cr"],offset:[4,-(i+n)]},bottomRight:{points:["tr","bc"],offset:[o+n,4]},rightBottom:{points:["bl","cr"],offset:[4,i+n]},bottomLeft:{points:["tl","bc"],offset:[-(o+n),4]},leftBottom:{points:["br","cl"],offset:[-4,i+n]}};return Object.keys(l).forEach((function(t){l[t]=e.arrowPointAtCenter?Object(g.a)(Object(g.a)({},l[t]),{overflow:Vt(c),targetOffset:Kt}):Object(g.a)(Object(g.a)({},Pt[t]),{overflow:Vt(c)}),l[t].ignoreShake=!0})),l}({arrowPointAtCenter:n,autoAdjustOverflow:r})},m=e.prefixCls,v=e.openClassName,h=e.getPopupContainer,b=e.getTooltipContainer,O=e.overlayClassName,C=e.color,w=e.overlayInnerStyle,x=e.children,M=i("tooltip",m),N=i(),S=u;!("visible"in e)&&p()&&(S=!1);var A,k,P,T=Wt(Object(F.b)(x)?x:o.createElement("span",null,x),M),D=T.props,R=E()(D.className,Object(y.a)({},v||"".concat(M,"-open"),!0)),z=E()(O,(n={},Object(y.a)(n,"".concat(M,"-rtl"),"rtl"===c),Object(y.a)(n,"".concat(M,"-").concat(C),C&&Qt.test(C)),n)),L=w;return C&&!Qt.test(C)&&(L=Object(g.a)(Object(g.a)({},w),{background:C}),A={background:C}),o.createElement(Rt,Object(g.a)({},e,{prefixCls:M,overlayClassName:z,getTooltipContainer:h||b||a,ref:t,builtinPlacements:d(),overlay:(k=e.title,P=e.overlay,0===k?k:P||k||""),visible:S,onVisibleChange:function(t){var n;f(!p()&&t),p()||null===(n=e.onVisibleChange)||void 0===n||n.call(e,t)},onPopupAlign:function(e,t){var n=d(),r=Object.keys(n).filter((function(e){return n[e].points[0]===t.points[0]&&n[e].points[1]===t.points[1]}))[0];if(r){var o=e.getBoundingClientRect(),a={top:"50%",left:"50%"};r.indexOf("top")>=0||r.indexOf("Bottom")>=0?a.top="".concat(o.height-t.offset[1],"px"):(r.indexOf("Top")>=0||r.indexOf("bottom")>=0)&&(a.top="".concat(-t.offset[1],"px")),r.indexOf("left")>=0||r.indexOf("Right")>=0?a.left="".concat(o.width-t.offset[0],"px"):(r.indexOf("right")>=0||r.indexOf("Left")>=0)&&(a.left="".concat(-t.offset[0],"px")),e.style.transformOrigin="".concat(a.left," ").concat(a.top)}},overlayInnerStyle:L,arrowContent:o.createElement("span",{className:"".concat(M,"-arrow-content"),style:A}),motion:{motionName:Ht(N,"zoom-big-fast",e.transitionName),motionDeadline:1e3}}),S?Object(F.a)(T,{className:R}):T)}));Jt.displayName="Tooltip",Jt.defaultProps={placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0};var Gt=Jt,Zt=function(e){return e?"function"==typeof e?e():e:null},Yt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},qt=o.forwardRef((function(e,t){var n=e.prefixCls,r=e.title,a=e.content,i=Yt(e,["prefixCls","title","content"]),c=o.useContext(I.b).getPrefixCls,l=c("popover",n),s=c();return o.createElement(Gt,Object(g.a)({},i,{prefixCls:l,ref:t,overlay:function(e){return o.createElement(o.Fragment,null,r&&o.createElement("div",{className:"".concat(e,"-title")},Zt(r)),o.createElement("div",{className:"".concat(e,"-inner-content")},Zt(a)))}(l),transitionName:Ht(s,"zoom-big",i.transitionName)}))}));qt.displayName="Popover",qt.defaultProps={placement:"top",trigger:"hover",mouseEnterDelay:.1,mouseLeaveDelay:.1,overlayStyle:{}};var Xt=qt,_t=function(e){var t=o.useContext(I.b),n=t.getPrefixCls,r=t.direction,a=e.prefixCls,i=e.className,c=void 0===i?"":i,l=e.maxCount,s=e.maxStyle,u=e.size,f=n("avatar-group",a),p=E()(f,Object(y.a)({},"".concat(f,"-rtl"),"rtl"===r),c),d=e.children,m=e.maxPopoverPlacement,v=void 0===m?"top":m,h=Object(L.a)(d).map((function(e,t){return Object(F.a)(e,{key:"avatar-key-".concat(t)})})),b=h.length;if(l&&l<b){var g=h.slice(0,l),O=h.slice(l,b);return g.push(o.createElement(Xt,{key:"avatar-popover-key",content:O,trigger:"hover",placement:v,overlayClassName:"".concat(f,"-popover")},o.createElement(z,{style:s},"+".concat(b-l)))),o.createElement(k,{size:u},o.createElement("div",{className:p,style:e.style},g))}return o.createElement(k,{size:u},o.createElement("div",{className:p,style:e.style},h))},$t=z;$t.Group=_t;var en=$t,tn=(n("HdAM"),n("BUzJ"),n("RXDR"),n("L/Qf"),function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}),nn=function(e,t){var n=e.prefixCls,r=e.component,a=void 0===r?"article":r,i=e.className,c=e["aria-label"],l=e.setContentRef,s=e.children,u=tn(e,["prefixCls","component","className","aria-label","setContentRef","children"]),f=t;return l&&(Object(M.a)(!1,"Typography","`setContentRef` is deprecated. Please use `ref` instead."),f=Object(x.a)(t,l)),o.createElement(I.a,null,(function(e){var t=e.getPrefixCls,r=e.direction,l=a,p=t("typography",n),d=E()(p,Object(y.a)({},"".concat(p,"-rtl"),"rtl"===r),i);return o.createElement(l,Object(g.a)({className:d,"aria-label":c,ref:f},u),s)}))},rn=o.forwardRef(nn);rn.displayName="Typography";var on=rn,an=n("bT9E"),cn=n("KQm4"),ln=n("+QRC"),sn=n.n(ln),un={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},fn=n("6VBw"),pn=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:un}))};pn.displayName="EditOutlined";var dn=o.forwardRef(pn),mn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},vn=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:mn}))};vn.displayName="CheckOutlined";var hn=o.forwardRef(vn),bn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},gn=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:bn}))};gn.displayName="CopyOutlined";var yn=o.forwardRef(gn),On=n("wEI+"),jn=n("YMnH"),Cn={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=Cn.F1&&t<=Cn.F12)return!1;switch(t){case Cn.ALT:case Cn.CAPS_LOCK:case Cn.CONTEXT_MENU:case Cn.CTRL:case Cn.DOWN:case Cn.END:case Cn.ESC:case Cn.HOME:case Cn.INSERT:case Cn.LEFT:case Cn.MAC_FF_META:case Cn.META:case Cn.NUMLOCK:case Cn.NUM_CENTER:case Cn.PAGE_DOWN:case Cn.PAGE_UP:case Cn.PAUSE:case Cn.PRINT_SCREEN:case Cn.RIGHT:case Cn.SHIFT:case Cn.UP:case Cn.WIN_KEY:case Cn.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=Cn.ZERO&&e<=Cn.NINE)return!0;if(e>=Cn.NUM_ZERO&&e<=Cn.NUM_MULTIPLY)return!0;if(e>=Cn.A&&e<=Cn.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case Cn.SPACE:case Cn.QUESTION_MARK:case Cn.NUM_PLUS:case Cn.NUM_MINUS:case Cn.NUM_PERIOD:case Cn.NUM_DIVISION:case Cn.SEMICOLON:case Cn.DASH:case Cn.EQUALS:case Cn.COMMA:case Cn.PERIOD:case Cn.SLASH:case Cn.APOSTROPHE:case Cn.SINGLE_QUOTE:case Cn.OPEN_SQUARE_BRACKET:case Cn.BACKSLASH:case Cn.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},En=Cn,wn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},xn={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},In=o.forwardRef((function(e,t){var n=e.style,r=e.noStyle,a=e.disabled,i=wn(e,["style","noStyle","disabled"]),c={};return r||(c=Object(g.a)({},xn)),a&&(c.pointerEvents="none"),c=Object(g.a)(Object(g.a)({},c),n),o.createElement("div",Object(g.a)({role:"button",tabIndex:0,ref:t},i,{onKeyDown:function(e){e.keyCode===En.ENTER&&e.preventDefault()},onKeyUp:function(t){var n=t.keyCode,r=e.onClick;n===En.ENTER&&r&&r()},style:c}))})),Mn=n("oHiP"),Nn=n("R3zJ"),Sn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},An=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:Sn}))};An.displayName="EnterOutlined";var kn,Pn,Tn=o.forwardRef(An),Dn="\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n",Rn=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"],zn={};function Ln(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&zn[n])return zn[n];var r=window.getComputedStyle(e),o=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),a=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),i=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),c=Rn.map((function(e){return"".concat(e,":").concat(r.getPropertyValue(e))})).join(";"),l={sizingStyle:c,paddingSize:a,borderSize:i,boxSizing:o};return t&&n&&(zn[n]=l),l}!function(e){e[e.NONE=0]="NONE",e[e.RESIZING=1]="RESIZING",e[e.RESIZED=2]="RESIZED"}(Pn||(Pn={}));var Fn=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(e){var r;return Object(U.a)(this,n),(r=t.call(this,e)).saveTextArea=function(e){r.textArea=e},r.handleResize=function(e){var t=r.state.resizeStatus,n=r.props,o=n.autoSize,a=n.onResize;t===Pn.NONE&&("function"==typeof a&&a(e),o&&r.resizeOnNextFrame())},r.resizeOnNextFrame=function(){cancelAnimationFrame(r.nextFrameActionId),r.nextFrameActionId=requestAnimationFrame(r.resizeTextarea)},r.resizeTextarea=function(){var e=r.props.autoSize;if(e&&r.textArea){var t=e.minRows,n=e.maxRows,o=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;kn||((kn=document.createElement("textarea")).setAttribute("tab-index","-1"),kn.setAttribute("aria-hidden","true"),document.body.appendChild(kn)),e.getAttribute("wrap")?kn.setAttribute("wrap",e.getAttribute("wrap")):kn.removeAttribute("wrap");var o=Ln(e,t),a=o.paddingSize,i=o.borderSize,c=o.boxSizing,l=o.sizingStyle;kn.setAttribute("style","".concat(l,";").concat(Dn)),kn.value=e.value||e.placeholder||"";var s,u=Number.MIN_SAFE_INTEGER,f=Number.MAX_SAFE_INTEGER,p=kn.scrollHeight;if("border-box"===c?p+=i:"content-box"===c&&(p-=a),null!==n||null!==r){kn.value=" ";var d=kn.scrollHeight-a;null!==n&&(u=d*n,"border-box"===c&&(u=u+a+i),p=Math.max(u,p)),null!==r&&(f=d*r,"border-box"===c&&(f=f+a+i),s=p>f?"":"hidden",p=Math.min(f,p))}return{height:p,minHeight:u,maxHeight:f,overflowY:s,resize:"none"}}(r.textArea,!1,t,n);r.setState({textareaStyles:o,resizeStatus:Pn.RESIZING},(function(){cancelAnimationFrame(r.resizeFrameId),r.resizeFrameId=requestAnimationFrame((function(){r.setState({resizeStatus:Pn.RESIZED},(function(){r.resizeFrameId=requestAnimationFrame((function(){r.setState({resizeStatus:Pn.NONE}),r.fixFirefoxAutoScroll()}))}))}))}))}},r.renderTextArea=function(){var e=r.props,t=e.prefixCls,n=void 0===t?"rc-textarea":t,a=e.autoSize,i=e.onResize,c=e.className,l=e.disabled,s=r.state,u=s.textareaStyles,f=s.resizeStatus,p=Object(an.a)(r.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),d=E()(n,c,Object(y.a)({},"".concat(n,"-disabled"),l));"value"in p&&(p.value=p.value||"");var m=Object(K.a)(Object(K.a)(Object(K.a)({},r.props.style),u),f===Pn.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return o.createElement(w.a,{onResize:r.handleResize,disabled:!(a||i)},o.createElement("textarea",Object(g.a)({},p,{className:d,style:m,ref:r.saveTextArea})))},r.state={textareaStyles:{},resizeStatus:Pn.NONE},r}return Object(B.a)(n,[{key:"componentDidMount",value:function(){this.resizeTextarea()}},{key:"componentDidUpdate",value:function(e){e.value!==this.props.value&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var e=this.textArea.selectionStart,t=this.textArea.selectionEnd;this.textArea.setSelectionRange(e,t)}}catch(n){}}},{key:"render",value:function(){return this.renderTextArea()}}]),n}(o.Component),Kn=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(e){var r;Object(U.a)(this,n),(r=t.call(this,e)).focus=function(){r.resizableTextArea.textArea.focus()},r.saveTextArea=function(e){r.resizableTextArea=e},r.handleChange=function(e){var t=r.props.onChange;r.setValue(e.target.value,(function(){r.resizableTextArea.resizeTextarea()})),t&&t(e)},r.handleKeyDown=function(e){var t=r.props,n=t.onPressEnter,o=t.onKeyDown;13===e.keyCode&&n&&n(e),o&&o(e)};var o=void 0===e.value||null===e.value?e.defaultValue:e.value;return r.state={value:o},r}return Object(B.a)(n,[{key:"setValue",value:function(e,t){"value"in this.props||this.setState({value:e},t)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return o.createElement(Fn,Object(g.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(e){return"value"in e?{value:e.value}:null}}]),n}(o.Component),Vn=n("jN4g"),Un=n("3Nzz");function Bn(e){return null==e?"":e}function Hn(e,t,n){if(n){var r=t;if("click"===t.type){(r=Object.create(t)).target=e,r.currentTarget=e;var o=e.value;return e.value="",n(r),void(e.value=o)}n(r)}}function Qn(e,t,n,r,o){var a;return E()(e,(a={},Object(y.a)(a,"".concat(e,"-sm"),"small"===n),Object(y.a)(a,"".concat(e,"-lg"),"large"===n),Object(y.a)(a,"".concat(e,"-disabled"),r),Object(y.a)(a,"".concat(e,"-rtl"),"rtl"===o),Object(y.a)(a,"".concat(e,"-borderless"),!t),a))}function Wn(e,t){if(e){e.focus(t);var n=(t||{}).cursor;if(n){var r=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}}var Jn=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(e){var r;Object(U.a)(this,n),(r=t.call(this,e)).direction="ltr",r.focus=function(e){Wn(r.input,e)},r.saveClearableInput=function(e){r.clearableInput=e},r.saveInput=function(e){r.input=e},r.onFocus=function(e){var t=r.props.onFocus;r.setState({focused:!0},r.clearPasswordValueAttribute),null==t||t(e)},r.onBlur=function(e){var t=r.props.onBlur;r.setState({focused:!1},r.clearPasswordValueAttribute),null==t||t(e)},r.handleReset=function(e){r.setValue("",(function(){r.focus()})),Hn(r.input,e,r.props.onChange)},r.renderInput=function(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.props,c=i.className,l=i.addonBefore,s=i.addonAfter,u=i.size,f=i.disabled,p=Object(an.a)(r.props,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","size","inputType","bordered"]);return o.createElement("input",Object(g.a)({autoComplete:a.autoComplete},p,{onChange:r.handleChange,onFocus:r.onFocus,onBlur:r.onBlur,onKeyDown:r.handleKeyDown,className:E()(Qn(e,n,u||t,f,r.direction),Object(y.a)({},c,c&&!l&&!s)),ref:r.saveInput}))},r.clearPasswordValueAttribute=function(){r.removePasswordTimeout=setTimeout((function(){r.input&&"password"===r.input.getAttribute("type")&&r.input.hasAttribute("value")&&r.input.removeAttribute("value")}))},r.handleChange=function(e){r.setValue(e.target.value,r.clearPasswordValueAttribute),Hn(r.input,e,r.props.onChange)},r.handleKeyDown=function(e){var t=r.props,n=t.onPressEnter,o=t.onKeyDown;n&&13===e.keyCode&&n(e),null==o||o(e)},r.renderComponent=function(e){var t=e.getPrefixCls,n=e.direction,a=e.input,i=r.state,c=i.value,l=i.focused,s=r.props,u=s.prefixCls,f=s.bordered,p=void 0===f||f,d=t("input",u);return r.direction=n,o.createElement(Un.b.Consumer,null,(function(e){return o.createElement(Xn,Object(g.a)({size:e},r.props,{prefixCls:d,inputType:"input",value:Bn(c),element:r.renderInput(d,e,p,a),handleReset:r.handleReset,ref:r.saveClearableInput,direction:n,focused:l,triggerFocus:r.focus,bordered:p}))}))};var a=void 0===e.value?e.defaultValue:e.value;return r.state={value:a,focused:!1,prevValue:e.value},r}return Object(B.a)(n,[{key:"componentDidMount",value:function(){this.clearPasswordValueAttribute()}},{key:"componentDidUpdate",value:function(){}},{key:"getSnapshotBeforeUpdate",value:function(e){return Zn(e)!==Zn(this.props)&&Object(M.a)(this.input!==document.activeElement,"Input","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),null}},{key:"componentWillUnmount",value:function(){this.removePasswordTimeout&&clearTimeout(this.removePasswordTimeout)}},{key:"blur",value:function(){this.input.blur()}},{key:"setSelectionRange",value:function(e,t,n){this.input.setSelectionRange(e,t,n)}},{key:"select",value:function(){this.input.select()}},{key:"setValue",value:function(e,t){void 0===this.props.value?this.setState({value:e},t):null==t||t()}},{key:"render",value:function(){return o.createElement(I.a,null,this.renderComponent)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevValue,r={prevValue:e.value};return void 0===e.value&&n===e.value||(r.value=e.value),r}}]),n}(o.Component);Jn.defaultProps={type:"text"};var Gn=Object(Ut.a)("text","input");function Zn(e){return!!(e.prefix||e.suffix||e.allowClear)}function Yn(e){return!(!e.addonBefore&&!e.addonAfter)}var qn,Xn=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(){var e;return Object(U.a)(this,n),(e=t.apply(this,arguments)).containerRef=o.createRef(),e.onInputMouseUp=function(t){var n;if(null===(n=e.containerRef.current)||void 0===n?void 0:n.contains(t.target)){var r=e.props.triggerFocus;null==r||r()}},e}return Object(B.a)(n,[{key:"renderClearIcon",value:function(e){var t=this.props,n=t.allowClear,r=t.value,a=t.disabled,i=t.readOnly,c=t.handleReset;if(!n)return null;var l=!a&&!i&&r,s="".concat(e,"-clear-icon");return o.createElement(Vn.a,{onClick:c,className:E()(Object(y.a)({},"".concat(s,"-hidden"),!l),s),role:"button"})}},{key:"renderSuffix",value:function(e){var t=this.props,n=t.suffix,r=t.allowClear;return n||r?o.createElement("span",{className:"".concat(e,"-suffix")},this.renderClearIcon(e),n):null}},{key:"renderLabeledIcon",value:function(e,t){var n,r=this.props,a=r.focused,i=r.value,c=r.prefix,l=r.className,s=r.size,u=r.suffix,f=r.disabled,p=r.allowClear,d=r.direction,m=r.style,v=r.readOnly,h=r.bordered,b=this.renderSuffix(e);if(!Zn(this.props))return Object(F.a)(t,{value:i});var g=c?o.createElement("span",{className:"".concat(e,"-prefix")},c):null,O=E()("".concat(e,"-affix-wrapper"),(n={},Object(y.a)(n,"".concat(e,"-affix-wrapper-focused"),a),Object(y.a)(n,"".concat(e,"-affix-wrapper-disabled"),f),Object(y.a)(n,"".concat(e,"-affix-wrapper-sm"),"small"===s),Object(y.a)(n,"".concat(e,"-affix-wrapper-lg"),"large"===s),Object(y.a)(n,"".concat(e,"-affix-wrapper-input-with-clear-btn"),u&&p&&i),Object(y.a)(n,"".concat(e,"-affix-wrapper-rtl"),"rtl"===d),Object(y.a)(n,"".concat(e,"-affix-wrapper-readonly"),v),Object(y.a)(n,"".concat(e,"-affix-wrapper-borderless"),!h),Object(y.a)(n,"".concat(l),!Yn(this.props)&&l),n));return o.createElement("span",{ref:this.containerRef,className:O,style:m,onMouseUp:this.onInputMouseUp},g,Object(F.a)(t,{style:null,value:i,className:Qn(e,h,s,f)}),b)}},{key:"renderInputWithLabel",value:function(e,t){var n,r=this.props,a=r.addonBefore,i=r.addonAfter,c=r.style,l=r.size,s=r.className,u=r.direction;if(!Yn(this.props))return t;var f="".concat(e,"-group"),p="".concat(f,"-addon"),d=a?o.createElement("span",{className:p},a):null,m=i?o.createElement("span",{className:p},i):null,v=E()("".concat(e,"-wrapper"),f,Object(y.a)({},"".concat(f,"-rtl"),"rtl"===u)),h=E()("".concat(e,"-group-wrapper"),(n={},Object(y.a)(n,"".concat(e,"-group-wrapper-sm"),"small"===l),Object(y.a)(n,"".concat(e,"-group-wrapper-lg"),"large"===l),Object(y.a)(n,"".concat(e,"-group-wrapper-rtl"),"rtl"===u),n),s);return o.createElement("span",{className:h,style:c},o.createElement("span",{className:v},d,Object(F.a)(t,{style:null}),m))}},{key:"renderTextAreaWithClearIcon",value:function(e,t){var n,r=this.props,a=r.value,i=r.allowClear,c=r.className,l=r.style,s=r.direction,u=r.bordered;if(!i)return Object(F.a)(t,{value:a});var f=E()("".concat(e,"-affix-wrapper"),"".concat(e,"-affix-wrapper-textarea-with-clear-btn"),(n={},Object(y.a)(n,"".concat(e,"-affix-wrapper-rtl"),"rtl"===s),Object(y.a)(n,"".concat(e,"-affix-wrapper-borderless"),!u),Object(y.a)(n,"".concat(c),!Yn(this.props)&&c),n));return o.createElement("span",{className:f,style:l},Object(F.a)(t,{style:null,value:a}),this.renderClearIcon(e))}},{key:"render",value:function(){var e=this.props,t=e.prefixCls,n=e.inputType,r=e.element;return n===Gn[0]?this.renderTextAreaWithClearIcon(t,r):this.renderInputWithLabel(t,this.renderLabeledIcon(t,r))}}]),n}(o.Component),_n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},$n=o.forwardRef((function(e,t){var n,r=e.prefixCls,a=e.bordered,i=void 0===a||a,c=e.showCount,l=void 0!==c&&c,s=e.maxLength,u=e.className,f=e.style,p=e.size,d=_n(e,["prefixCls","bordered","showCount","maxLength","className","style","size"]),m=o.useContext(I.b),v=m.getPrefixCls,h=m.direction,b=o.useContext(Un.b),C=o.useRef(null),w=o.useRef(null),x=zt(d.defaultValue,{value:d.value}),M=Object(j.a)(x,2),N=M[0],S=M[1],A=o.useRef(d.value);o.useEffect((function(){void 0===d.value&&A.current===d.value||(S(d.value),A.current=d.value)}),[d.value,A.current]);var k=function(e,t){void 0===d.value&&(S(e),null==t||t())},P=v("input",r);o.useImperativeHandle(t,(function(){var e;return{resizableTextArea:null===(e=C.current)||void 0===e?void 0:e.resizableTextArea,focus:function(e){var t,n;Wn(null===(n=null===(t=C.current)||void 0===t?void 0:t.resizableTextArea)||void 0===n?void 0:n.textArea,e)},blur:function(){var e;return null===(e=C.current)||void 0===e?void 0:e.blur()}}}));var T=o.createElement(Kn,Object(g.a)({},Object(an.a)(d,["allowClear"]),{maxLength:s,className:E()((n={},Object(y.a)(n,"".concat(P,"-borderless"),!i),Object(y.a)(n,u,u&&!l),Object(y.a)(n,"".concat(P,"-sm"),"small"===b||"small"===p),Object(y.a)(n,"".concat(P,"-lg"),"large"===b||"large"===p),n)),style:l?void 0:f,prefixCls:P,onChange:function(e){k(e.target.value),Hn(C.current,e,d.onChange)},ref:C})),D=Bn(N),R=Number(s)>0;D=R?Object(cn.a)(D).slice(0,s).join(""):D;var z=o.createElement(Xn,Object(g.a)({},d,{prefixCls:P,direction:h,inputType:"text",value:D,element:T,handleReset:function(e){k("",(function(){var e;null===(e=C.current)||void 0===e||e.focus()})),Hn(C.current,e,d.onChange)},ref:w,bordered:i}));if(l){var L=Math.min(D.length,null!=s?s:1/0),F="";return F="object"===Object(O.a)(l)?l.formatter({count:L,maxLength:s}):"".concat(L).concat(R?" / ".concat(s):""),o.createElement("div",{className:E()("".concat(P,"-textarea"),Object(y.a)({},"".concat(P,"-textarea-rtl"),"rtl"===h),"".concat(P,"-textarea-show-count"),u),style:f,"data-count":F},z)}return z})),er=function(e){var t=e.prefixCls,n=e["aria-label"],r=e.className,a=e.style,i=e.direction,c=e.maxLength,l=e.autoSize,s=void 0===l||l,u=e.value,f=e.onSave,p=e.onCancel,d=e.onEnd,m=o.useRef(),v=o.useRef(!1),h=o.useRef(),b=o.useState(u),g=Object(j.a)(b,2),O=g[0],C=g[1];o.useEffect((function(){C(u)}),[u]),o.useEffect((function(){if(m.current&&m.current.resizableTextArea){var e=m.current.resizableTextArea.textArea;e.focus();var t=e.value.length;e.setSelectionRange(t,t)}}),[]);var w=function(){f(O.trim())},x=E()(t,"".concat(t,"-edit-content"),Object(y.a)({},"".concat(t,"-rtl"),"rtl"===i),r);return o.createElement("div",{className:x,style:a},o.createElement($n,{ref:m,maxLength:c,value:O,onChange:function(e){var t=e.target;C(t.value.replace(/[\n\r]/g,""))},onKeyDown:function(e){var t=e.keyCode;v.current||(h.current=t)},onKeyUp:function(e){var t=e.keyCode,n=e.ctrlKey,r=e.altKey,o=e.metaKey,a=e.shiftKey;h.current!==t||v.current||n||r||o||a||(t===En.ENTER?(w(),null==d||d()):t===En.ESC&&p())},onCompositionStart:function(){v.current=!0},onCompositionEnd:function(){v.current=!1},onBlur:function(){w()},"aria-label":n,autoSize:s}),o.createElement(Tn,{className:"".concat(t,"-edit-content-confirm")}))},tr={padding:0,margin:0,display:"inline",lineHeight:"inherit"};function nr(e){if(!e)return 0;var t=e.match(/^\d*(\.\d*)?/);return t?Number(t[0]):0}var rr=function(e,t,n,r,a){qn||((qn=document.createElement("div")).setAttribute("aria-hidden","true"),document.body.appendChild(qn));var i,c=t.rows,l=t.suffix,s=void 0===l?"":l,u=window.getComputedStyle(e),f=(i=u,Array.prototype.slice.apply(i).map((function(e){return"".concat(e,": ").concat(i.getPropertyValue(e),";")})).join("")),p=nr(u.lineHeight),d=Math.round(p*(c+1)+nr(u.paddingTop)+nr(u.paddingBottom));qn.setAttribute("style",f),qn.style.position="fixed",qn.style.left="0",qn.style.height="auto",qn.style.minHeight="auto",qn.style.maxHeight="auto",qn.style.top="-999999px",qn.style.zIndex="-1000",qn.style.textOverflow="clip",qn.style.whiteSpace="normal",qn.style.webkitLineClamp="none";var m,v,h=(m=Object(L.a)(n),v=[],m.forEach((function(e){var t=v[v.length-1];"string"==typeof e&&"string"==typeof t?v[v.length-1]+=e:v.push(e)})),v);function b(){return qn.offsetHeight<d}if(Object(J.render)(o.createElement("div",{style:tr},o.createElement("span",{style:tr},h,s),o.createElement("span",{style:tr},r)),qn),b())return Object(J.unmountComponentAtNode)(qn),{content:n,text:qn.innerHTML,ellipsis:!1};var g=Array.prototype.slice.apply(qn.childNodes[0].childNodes[0].cloneNode(!0).childNodes).filter((function(e){return 8!==e.nodeType})),y=Array.prototype.slice.apply(qn.childNodes[0].childNodes[1].cloneNode(!0).childNodes);Object(J.unmountComponentAtNode)(qn);var O=[];qn.innerHTML="";var j=document.createElement("span");qn.appendChild(j);var C=document.createTextNode(a+s);function E(e){j.insertBefore(e,C)}function w(e,t){var n=e.nodeType;if(1===n)return E(e),b()?{finished:!1,reactNode:h[t]}:(j.removeChild(e),{finished:!0,reactNode:null});if(3===n){var r=e.textContent||"",o=document.createTextNode(r);return E(o),function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.length,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=Math.floor((r+o)/2),c=n.slice(0,i);if(t.textContent=c,r>=o-1)for(var l=o;l>=r;l-=1){var s=n.slice(0,l);if(t.textContent=s,b()||!s)return l===n.length?{finished:!1,reactNode:n}:{finished:!0,reactNode:s}}return b()?e(t,n,i,o,i):e(t,n,r,i,a)}(o,r)}return{finished:!1,reactNode:null}}return j.appendChild(C),y.forEach((function(e){qn.appendChild(e)})),g.some((function(e,t){var n=w(e,t),r=n.finished,o=n.reactNode;return o&&O.push(o),r})),{content:O,text:qn.innerHTML,ellipsis:!0}},or=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},ar=Object(Nn.b)("webkitLineClamp"),ir=Object(Nn.b)("textOverflow");var cr=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(){var e;return Object(U.a)(this,n),(e=t.apply(this,arguments)).contentRef=o.createRef(),e.state={edit:!1,copied:!1,ellipsisText:"",ellipsisContent:null,isEllipsis:!1,expanded:!1,clientRendered:!1},e.getPrefixCls=function(){var t=e.props.prefixCls;return(0,e.context.getPrefixCls)("typography",t)},e.onExpandClick=function(t){var n,r=e.getEllipsis().onExpand;e.setState({expanded:!0}),null===(n=r)||void 0===n||n(t)},e.onEditClick=function(){e.triggerEdit(!0)},e.onEditChange=function(t){var n=e.getEditable().onChange;null==n||n(t),e.triggerEdit(!1)},e.onEditCancel=function(){var t,n;null===(n=(t=e.getEditable()).onCancel)||void 0===n||n.call(t),e.triggerEdit(!1)},e.onCopyClick=function(t){t.preventDefault();var n=e.props,r=n.children,o=n.copyable,a=Object(g.a)({},"object"===Object(O.a)(o)?o:null);void 0===a.text&&(a.text=String(r)),sn()(a.text||""),e.setState({copied:!0},(function(){a.onCopy&&a.onCopy(),e.copyId=window.setTimeout((function(){e.setState({copied:!1})}),3e3)}))},e.setEditRef=function(t){e.editIcon=t},e.triggerEdit=function(t){var n=e.getEditable().onStart;t&&n&&n(),e.setState({edit:t},(function(){!t&&e.editIcon&&e.editIcon.focus()}))},e.resizeOnNextFrame=function(){Mn.a.cancel(e.rafId),e.rafId=Object(Mn.a)((function(){e.syncEllipsis()}))},e}return Object(B.a)(n,[{key:"componentDidMount",value:function(){this.setState({clientRendered:!0}),this.resizeOnNextFrame()}},{key:"componentDidUpdate",value:function(e){var t=this.props.children,n=this.getEllipsis(),r=this.getEllipsis(e);t===e.children&&n.rows===r.rows||this.resizeOnNextFrame()}},{key:"componentWillUnmount",value:function(){window.clearTimeout(this.copyId),Mn.a.cancel(this.rafId)}},{key:"getEditable",value:function(e){var t=this.state.edit,n=(e||this.props).editable;return n?Object(g.a)({editing:t},"object"===Object(O.a)(n)?n:null):{editing:t}}},{key:"getEllipsis",value:function(e){var t=(e||this.props).ellipsis;return t?Object(g.a)({rows:1,expandable:!1},"object"===Object(O.a)(t)?t:null):{}}},{key:"canUseCSSEllipsis",value:function(){var e=this.state.clientRendered,t=this.props,n=t.editable,r=t.copyable,o=this.getEllipsis(),a=o.rows,i=o.expandable,c=o.suffix,l=o.onEllipsis,s=o.tooltip;return!c&&!s&&(!(n||r||i||!e||l)&&(1===a?ir:ar))}},{key:"syncEllipsis",value:function(){var e=this.state,t=e.ellipsisText,n=e.isEllipsis,r=e.expanded,o=this.getEllipsis(),a=o.rows,i=o.suffix,c=o.onEllipsis,l=this.props.children;if(a&&!(a<0)&&this.contentRef.current&&!r&&!this.canUseCSSEllipsis()){Object(M.a)(Object(L.a)(l).every((function(e){return"string"==typeof e})),"Typography","`ellipsis` should use string as children only.");var s=rr(this.contentRef.current,{rows:a,suffix:i},l,this.renderOperations(!0),"..."),u=s.content,f=s.text,p=s.ellipsis;t===f&&n===p||(this.setState({ellipsisText:f,ellipsisContent:u,isEllipsis:p}),n!==p&&c&&c(p))}}},{key:"renderExpand",value:function(e){var t,n=this.getEllipsis(),r=n.expandable,a=n.symbol,i=this.state,c=i.expanded,l=i.isEllipsis;return r&&(e||!c&&l)?(t=a||this.expandStr,o.createElement("a",{key:"expand",className:"".concat(this.getPrefixCls(),"-expand"),onClick:this.onExpandClick,"aria-label":this.expandStr},t)):null}},{key:"renderEdit",value:function(){var e=this.props.editable;if(e){var t=e.icon,n=e.tooltip,r=Object(L.a)(n)[0]||this.editStr,a="string"==typeof r?r:"";return o.createElement(Gt,{key:"edit",title:!1===n?"":r},o.createElement(In,{ref:this.setEditRef,className:"".concat(this.getPrefixCls(),"-edit"),onClick:this.onEditClick,"aria-label":a},t||o.createElement(dn,{role:"button"})))}}},{key:"renderCopy",value:function(){var e=this.state.copied,t=this.props.copyable;if(t){var n=this.getPrefixCls(),r=t.tooltips,a=Object(L.a)(r);0===a.length&&(a=[this.copyStr,this.copiedStr]);var i=e?a[1]:a[0],c="string"==typeof i?i:"",l=Object(L.a)(t.icon);return o.createElement(Gt,{key:"copy",title:!1===r?"":i},o.createElement(In,{className:E()("".concat(n,"-copy"),e&&"".concat(n,"-copy-success")),onClick:this.onCopyClick,"aria-label":c},e?l[1]||o.createElement(hn,null):l[0]||o.createElement(yn,null)))}}},{key:"renderEditInput",value:function(){var e=this.props,t=e.children,n=e.className,r=e.style,a=this.context.direction,i=this.getEditable(),c=i.maxLength,l=i.autoSize,s=i.onEnd;return o.createElement(er,{value:"string"==typeof t?t:"",onSave:this.onEditChange,onCancel:this.onEditCancel,onEnd:s,prefixCls:this.getPrefixCls(),className:n,style:r,direction:a,maxLength:c,autoSize:l})}},{key:"renderOperations",value:function(e){return[this.renderExpand(e),this.renderEdit(),this.renderCopy()].filter((function(e){return e}))}},{key:"renderContent",value:function(){var e=this,t=this.state,n=t.ellipsisContent,r=t.isEllipsis,a=t.expanded,i=this.props,c=i.component,l=i.children,s=i.className,u=i.type,f=i.disabled,p=i.style,d=or(i,["component","children","className","type","disabled","style"]),m=this.context.direction,v=this.getEllipsis(),h=v.rows,b=v.suffix,O=v.tooltip,j=this.getPrefixCls(),C=Object(an.a)(d,["prefixCls","editable","copyable","ellipsis","mark","code","delete","underline","strong","keyboard"].concat(Object(cn.a)(On.a))),x=this.canUseCSSEllipsis(),I=1===h&&x,M=h&&h>1&&x,N=l;if(h&&r&&!a&&!x){var S=d.title,A=S||"";S||"string"!=typeof l&&"number"!=typeof l||(A=String(l)),A=null==A?void 0:A.slice(String(n||"").length),N=o.createElement(o.Fragment,null,n,o.createElement("span",{title:A,"aria-hidden":"true"},"..."),b),O&&(N=o.createElement(Gt,{title:!0===O?l:O},o.createElement("span",null,N)))}else N=o.createElement(o.Fragment,null,l,b);return N=function(e,t){var n=e.mark,r=e.code,a=e.underline,i=e.delete,c=e.strong,l=e.keyboard,s=t;function u(e,t){e&&(s=o.createElement(t,{},s))}return u(c,"strong"),u(a,"u"),u(i,"del"),u(r,"code"),u(n,"mark"),u(l,"kbd"),s}(this.props,N),o.createElement(jn.a,{componentName:"Text"},(function(t){var n,r=t.edit,a=t.copy,i=t.copied,l=t.expand;return e.editStr=r,e.copyStr=a,e.copiedStr=i,e.expandStr=l,o.createElement(w.a,{onResize:e.resizeOnNextFrame,disabled:!h},o.createElement(on,Object(g.a)({className:E()((n={},Object(y.a)(n,"".concat(j,"-").concat(u),u),Object(y.a)(n,"".concat(j,"-disabled"),f),Object(y.a)(n,"".concat(j,"-ellipsis"),h),Object(y.a)(n,"".concat(j,"-ellipsis-single-line"),I),Object(y.a)(n,"".concat(j,"-ellipsis-multiple-line"),M),n),s),style:Object(g.a)(Object(g.a)({},p),{WebkitLineClamp:M?h:void 0}),component:c,ref:e.contentRef,direction:m},C),N,e.renderOperations()))}))}},{key:"render",value:function(){return this.getEditable().editing?this.renderEditInput():this.renderContent()}}],[{key:"getDerivedStateFromProps",value:function(e){var t=e.children,n=e.editable;return Object(M.a)(!n||"string"==typeof t,"Typography","When `editable` is enabled, the `children` should use string."),{}}}]),n}(o.Component);cr.contextType=I.b,cr.defaultProps={children:""};var lr=cr,sr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},ur=function(e){var t=e.ellipsis,n=sr(e,["ellipsis"]),r=o.useMemo((function(){return t&&"object"===Object(O.a)(t)?Object(an.a)(t,["expandable","rows"]):t}),[t]);return Object(M.a)("object"!==Object(O.a)(t)||!t||!("expandable"in t)&&!("rows"in t),"Typography.Text","`ellipsis` do not support `expandable` or `rows` props."),o.createElement(lr,Object(g.a)({},n,{ellipsis:r,component:"span"}))},fr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},pr=function(e,t){var n=e.ellipsis,r=e.rel,a=fr(e,["ellipsis","rel"]);Object(M.a)("object"!==Object(O.a)(n),"Typography.Link","`ellipsis` only supports boolean value.");var i=o.useRef(null);o.useImperativeHandle(t,(function(){var e;return null===(e=i.current)||void 0===e?void 0:e.contentRef.current}));var c=Object(g.a)(Object(g.a)({},a),{rel:void 0===r&&"_blank"===a.target?"noopener noreferrer":r});return delete c.navigate,o.createElement(lr,Object(g.a)({},c,{ref:i,ellipsis:!!n,component:"a"}))},dr=o.forwardRef(pr),mr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},vr=Object(Ut.b)(1,2,3,4,5),hr=function(e){var t,n=e.level,r=void 0===n?1:n,a=mr(e,["level"]);return-1!==vr.indexOf(r)?t="h".concat(r):(Object(M.a)(!1,"Typography.Title","Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version."),t="h1"),o.createElement(lr,Object(g.a)({},a,{component:t}))},br=function(e){return o.createElement(lr,Object(g.a)({},e,{component:"div"}))},gr=on;gr.Text=ur,gr.Link=dr,gr.Title=hr,gr.Paragraph=br;var yr=gr,Or=(n("74dF"),n("dfTv"),n("/3gg"),n("F3x0"),n("IYBL"),n("4t1q"),n("sEfC")),jr=n.n(Or),Cr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Er=(Object(Ut.a)("small","default","large"),null);var wr=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(e){var r;Object(U.a)(this,n),(r=t.call(this,e)).debouncifyUpdateSpinning=function(e){var t=(e||r.props).delay;t&&(r.cancelExistingSpin(),r.updateSpinning=jr()(r.originalUpdateSpinning,t))},r.updateSpinning=function(){var e=r.props.spinning;r.state.spinning!==e&&r.setState({spinning:e})},r.renderSpin=function(e){var t,n=e.getPrefixCls,a=e.direction,i=r.props,c=i.prefixCls,l=i.className,s=i.size,u=i.tip,f=i.wrapperClassName,p=i.style,d=Cr(i,["prefixCls","className","size","tip","wrapperClassName","style"]),m=r.state.spinning,v=n("spin",c),h=E()(v,(t={},Object(y.a)(t,"".concat(v,"-sm"),"small"===s),Object(y.a)(t,"".concat(v,"-lg"),"large"===s),Object(y.a)(t,"".concat(v,"-spinning"),m),Object(y.a)(t,"".concat(v,"-show-text"),!!u),Object(y.a)(t,"".concat(v,"-rtl"),"rtl"===a),t),l),b=Object(an.a)(d,["spinning","delay","indicator"]),O=o.createElement("div",Object(g.a)({},b,{style:p,className:h}),function(e,t){var n=t.indicator,r="".concat(e,"-dot");return null===n?null:Object(F.b)(n)?Object(F.a)(n,{className:E()(n.props.className,r)}):Object(F.b)(Er)?Object(F.a)(Er,{className:E()(Er.props.className,r)}):o.createElement("span",{className:E()(r,"".concat(e,"-dot-spin"))},o.createElement("i",{className:"".concat(e,"-dot-item")}),o.createElement("i",{className:"".concat(e,"-dot-item")}),o.createElement("i",{className:"".concat(e,"-dot-item")}),o.createElement("i",{className:"".concat(e,"-dot-item")}))}(v,r.props),u?o.createElement("div",{className:"".concat(v,"-text")},u):null);if(r.isNestedPattern()){var j=E()("".concat(v,"-container"),Object(y.a)({},"".concat(v,"-blur"),m));return o.createElement("div",Object(g.a)({},b,{className:E()("".concat(v,"-nested-loading"),f)}),m&&o.createElement("div",{key:"loading"},O),o.createElement("div",{className:j,key:"container"},r.props.children))}return O};var a=e.spinning,i=function(e,t){return!!e&&!!t&&!isNaN(Number(t))}(a,e.delay);return r.state={spinning:a&&!i},r.originalUpdateSpinning=r.updateSpinning,r.debouncifyUpdateSpinning(e),r}return Object(B.a)(n,[{key:"componentDidMount",value:function(){this.updateSpinning()}},{key:"componentDidUpdate",value:function(){this.debouncifyUpdateSpinning(),this.updateSpinning()}},{key:"componentWillUnmount",value:function(){this.cancelExistingSpin()}},{key:"cancelExistingSpin",value:function(){var e=this.updateSpinning;e&&e.cancel&&e.cancel()}},{key:"isNestedPattern",value:function(){return!(!this.props||void 0===this.props.children)}},{key:"render",value:function(){return o.createElement(I.a,null,this.renderSpin)}}],[{key:"setDefaultIndicator",value:function(e){Er=e}}]),n}(o.Component);wr.defaultProps={spinning:!0,size:"default",wrapperClassName:""};var xr=wr,Ir=function(e){var t,n="".concat(e.rootPrefixCls,"-item"),r=E()(n,"".concat(n,"-").concat(e.page),(t={},Object(y.a)(t,"".concat(n,"-active"),e.active),Object(y.a)(t,e.className,!!e.className),Object(y.a)(t,"".concat(n,"-disabled"),!e.page),t));return a.a.createElement("li",{title:e.showTitle?e.page:null,className:r,onClick:function(){e.onClick(e.page)},onKeyPress:function(t){e.onKeyPress(t,e.onClick,e.page)},tabIndex:"0"},e.itemRender(e.page,"page",a.a.createElement("a",{rel:"nofollow"},e.page)))},Mr=13,Nr=38,Sr=40,Ar=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(){var e;Object(U.a)(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(e=t.call.apply(t,[this].concat(o))).state={goInputText:""},e.buildOptionText=function(t){return"".concat(t," ").concat(e.props.locale.items_per_page)},e.changeSize=function(t){e.props.changeSize(Number(t))},e.handleChange=function(t){e.setState({goInputText:t.target.value})},e.handleBlur=function(t){var n=e.props,r=n.goButton,o=n.quickGo,a=n.rootPrefixCls,i=e.state.goInputText;r||""===i||(e.setState({goInputText:""}),t.relatedTarget&&(t.relatedTarget.className.indexOf("".concat(a,"-item-link"))>=0||t.relatedTarget.className.indexOf("".concat(a,"-item"))>=0)||o(e.getValidValue()))},e.go=function(t){""!==e.state.goInputText&&(t.keyCode!==Mr&&"click"!==t.type||(e.setState({goInputText:""}),e.props.quickGo(e.getValidValue())))},e}return Object(B.a)(n,[{key:"getValidValue",value:function(){var e=this.state.goInputText;return!e||isNaN(e)?void 0:Number(e)}},{key:"getPageSizeOptions",value:function(){var e=this.props,t=e.pageSize,n=e.pageSizeOptions;return n.some((function(e){return e.toString()===t.toString()}))?n:n.concat([t.toString()]).sort((function(e,t){return(isNaN(Number(e))?0:Number(e))-(isNaN(Number(t))?0:Number(t))}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.pageSize,r=t.locale,o=t.rootPrefixCls,i=t.changeSize,c=t.quickGo,l=t.goButton,s=t.selectComponentClass,u=t.buildOptionText,f=t.selectPrefixCls,p=t.disabled,d=this.state.goInputText,m="".concat(o,"-options"),v=s,h=null,b=null,g=null;if(!i&&!c)return null;var y=this.getPageSizeOptions();if(i&&v){var O=y.map((function(t,n){return a.a.createElement(v.Option,{key:n,value:t.toString()},(u||e.buildOptionText)(t))}));h=a.a.createElement(v,{disabled:p,prefixCls:f,showSearch:!1,className:"".concat(m,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(n||y[0]).toString(),onChange:this.changeSize,getPopupContainer:function(e){return e.parentNode}},O)}return c&&(l&&(g="boolean"==typeof l?a.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:p,className:"".concat(m,"-quick-jumper-button")},r.jump_to_confirm):a.a.createElement("span",{onClick:this.go,onKeyUp:this.go},l)),b=a.a.createElement("div",{className:"".concat(m,"-quick-jumper")},r.jump_to,a.a.createElement("input",{disabled:p,type:"text",value:d,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),r.page,g)),a.a.createElement("li",{className:"".concat(m)},h,b)}}]),n}(a.a.Component);Ar.defaultProps={pageSizeOptions:["10","20","50","100"]};var kr=Ar;function Pr(){}function Tr(e,t,n){var r=void 0===e?t.pageSize:e;return Math.floor((n.total-1)/r)+1}var Dr=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(e){var r;Object(U.a)(this,n),(r=t.call(this,e)).getJumpPrevPage=function(){return Math.max(1,r.state.current-(r.props.showLessItems?3:5))},r.getJumpNextPage=function(){return Math.min(Tr(void 0,r.state,r.props),r.state.current+(r.props.showLessItems?3:5))},r.getItemIcon=function(e,t){var n=r.props.prefixCls,o=e||a.a.createElement("button",{type:"button","aria-label":t,className:"".concat(n,"-item-link")});return"function"==typeof e&&(o=a.a.createElement(e,Object(K.a)({},r.props))),o},r.savePaginationNode=function(e){r.paginationNode=e},r.isValid=function(e){return"number"==typeof(t=e)&&isFinite(t)&&Math.floor(t)===t&&e!==r.state.current;var t},r.shouldDisplayQuickJumper=function(){var e=r.props,t=e.showQuickJumper,n=e.pageSize;return!(e.total<=n)&&t},r.handleKeyDown=function(e){e.keyCode!==Nr&&e.keyCode!==Sr||e.preventDefault()},r.handleKeyUp=function(e){var t=r.getValidValue(e);t!==r.state.currentInputValue&&r.setState({currentInputValue:t}),e.keyCode===Mr?r.handleChange(t):e.keyCode===Nr?r.handleChange(t-1):e.keyCode===Sr&&r.handleChange(t+1)},r.changePageSize=function(e){var t=r.state.current,n=Tr(e,r.state,r.props);t=t>n?n:t,0===n&&(t=r.state.current),"number"==typeof e&&("pageSize"in r.props||r.setState({pageSize:e}),"current"in r.props||r.setState({current:t,currentInputValue:t})),r.props.onShowSizeChange(t,e),"onChange"in r.props&&r.props.onChange&&r.props.onChange(t,e)},r.handleChange=function(e){var t=r.props.disabled,n=e;if(r.isValid(n)&&!t){var o=Tr(void 0,r.state,r.props);n>o?n=o:n<1&&(n=1),"current"in r.props||r.setState({current:n,currentInputValue:n});var a=r.state.pageSize;return r.props.onChange(n,a),n}return r.state.current},r.prev=function(){r.hasPrev()&&r.handleChange(r.state.current-1)},r.next=function(){r.hasNext()&&r.handleChange(r.state.current+1)},r.jumpPrev=function(){r.handleChange(r.getJumpPrevPage())},r.jumpNext=function(){r.handleChange(r.getJumpNextPage())},r.hasPrev=function(){return r.state.current>1},r.hasNext=function(){return r.state.current<Tr(void 0,r.state,r.props)},r.runIfEnter=function(e,t){if("Enter"===e.key||13===e.charCode){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];t.apply(void 0,r)}},r.runIfEnterPrev=function(e){r.runIfEnter(e,r.prev)},r.runIfEnterNext=function(e){r.runIfEnter(e,r.next)},r.runIfEnterJumpPrev=function(e){r.runIfEnter(e,r.jumpPrev)},r.runIfEnterJumpNext=function(e){r.runIfEnter(e,r.jumpNext)},r.handleGoTO=function(e){e.keyCode!==Mr&&"click"!==e.type||r.handleChange(r.state.currentInputValue)};var o=e.onChange!==Pr;"current"in e&&!o&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var i=e.defaultCurrent;"current"in e&&(i=e.current);var c=e.defaultPageSize;return"pageSize"in e&&(c=e.pageSize),i=Math.min(i,Tr(c,void 0,e)),r.state={current:i,currentInputValue:i,pageSize:c},r}return Object(B.a)(n,[{key:"componentDidUpdate",value:function(e,t){var n=this.props.prefixCls;if(t.current!==this.state.current&&this.paginationNode){var r=this.paginationNode.querySelector(".".concat(n,"-item-").concat(t.current));r&&document.activeElement===r&&r.blur()}}},{key:"getValidValue",value:function(e){var t=e.target.value,n=Tr(void 0,this.state,this.props),r=this.state.currentInputValue;return""===t?t:isNaN(Number(t))?r:t>=n?n:Number(t)}},{key:"getShowSizeChanger",value:function(){var e=this.props,t=e.showSizeChanger,n=e.total,r=e.totalBoundaryShowSizeChanger;return void 0!==t?t:n>r}},{key:"renderPrev",value:function(e){var t=this.props,n=t.prevIcon,r=(0,t.itemRender)(e,"prev",this.getItemIcon(n,"prev page")),a=!this.hasPrev();return Object(o.isValidElement)(r)?Object(o.cloneElement)(r,{disabled:a}):r}},{key:"renderNext",value:function(e){var t=this.props,n=t.nextIcon,r=(0,t.itemRender)(e,"next",this.getItemIcon(n,"next page")),a=!this.hasNext();return Object(o.isValidElement)(r)?Object(o.cloneElement)(r,{disabled:a}):r}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,r=t.className,i=t.style,c=t.disabled,l=t.hideOnSinglePage,s=t.total,u=t.locale,f=t.showQuickJumper,p=t.showLessItems,d=t.showTitle,m=t.showTotal,v=t.simple,h=t.itemRender,b=t.showPrevNextJumpers,O=t.jumpPrevIcon,j=t.jumpNextIcon,C=t.selectComponentClass,w=t.selectPrefixCls,x=t.pageSizeOptions,I=this.state,M=I.current,N=I.pageSize,S=I.currentInputValue;if(!0===l&&s<=N)return null;var A=Tr(void 0,this.state,this.props),k=[],P=null,T=null,D=null,R=null,z=null,L=f&&f.goButton,F=p?1:2,K=M-1>0?M-1:0,V=M+1<A?M+1:A,U=Object.keys(this.props).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(t[n]=e.props[n]),t}),{});if(v)return L&&(z="boolean"==typeof L?a.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},u.jump_to_confirm):a.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},L),z=a.a.createElement("li",{title:d?"".concat(u.jump_to).concat(M,"/").concat(A):null,className:"".concat(n,"-simple-pager")},z)),a.a.createElement("ul",Object(g.a)({className:E()(n,"".concat(n,"-simple"),Object(y.a)({},"".concat(n,"-disabled"),c),r),style:i,ref:this.savePaginationNode},U),a.a.createElement("li",{title:d?u.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:E()("".concat(n,"-prev"),Object(y.a)({},"".concat(n,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(K)),a.a.createElement("li",{title:d?"".concat(M,"/").concat(A):null,className:"".concat(n,"-simple-pager")},a.a.createElement("input",{type:"text",value:S,disabled:c,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),a.a.createElement("span",{className:"".concat(n,"-slash")},"/"),A),a.a.createElement("li",{title:d?u.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:E()("".concat(n,"-next"),Object(y.a)({},"".concat(n,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(V)),z);if(A<=3+2*F){var B={locale:u,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:d,itemRender:h};A||k.push(a.a.createElement(Ir,Object(g.a)({},B,{key:"noPager",page:A,className:"".concat(n,"-disabled")})));for(var H=1;H<=A;H+=1){var Q=M===H;k.push(a.a.createElement(Ir,Object(g.a)({},B,{key:H,page:H,active:Q})))}}else{var W=p?u.prev_3:u.prev_5,J=p?u.next_3:u.next_5;b&&(P=a.a.createElement("li",{title:d?W:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:E()("".concat(n,"-jump-prev"),Object(y.a)({},"".concat(n,"-jump-prev-custom-icon"),!!O))},h(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(O,"prev page"))),T=a.a.createElement("li",{title:d?J:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:E()("".concat(n,"-jump-next"),Object(y.a)({},"".concat(n,"-jump-next-custom-icon"),!!j))},h(this.getJumpNextPage(),"jump-next",this.getItemIcon(j,"next page")))),R=a.a.createElement(Ir,{locale:u,last:!0,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:A,page:A,active:!1,showTitle:d,itemRender:h}),D=a.a.createElement(Ir,{locale:u,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:d,itemRender:h});var G=Math.max(1,M-F),Z=Math.min(M+F,A);M-1<=F&&(Z=1+2*F),A-M<=F&&(G=A-2*F);for(var Y=G;Y<=Z;Y+=1){var q=M===Y;k.push(a.a.createElement(Ir,{locale:u,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Y,page:Y,active:q,showTitle:d,itemRender:h}))}M-1>=2*F&&3!==M&&(k[0]=Object(o.cloneElement)(k[0],{className:"".concat(n,"-item-after-jump-prev")}),k.unshift(P)),A-M>=2*F&&M!==A-2&&(k[k.length-1]=Object(o.cloneElement)(k[k.length-1],{className:"".concat(n,"-item-before-jump-next")}),k.push(T)),1!==G&&k.unshift(D),Z!==A&&k.push(R)}var X=null;m&&(X=a.a.createElement("li",{className:"".concat(n,"-total-text")},m(s,[0===s?0:(M-1)*N+1,M*N>s?s:M*N])));var _=!this.hasPrev()||!A,$=!this.hasNext()||!A;return a.a.createElement("ul",Object(g.a)({className:E()(n,r,Object(y.a)({},"".concat(n,"-disabled"),c)),style:i,unselectable:"unselectable",ref:this.savePaginationNode},U),X,a.a.createElement("li",{title:d?u.prev_page:null,onClick:this.prev,tabIndex:_?null:0,onKeyPress:this.runIfEnterPrev,className:E()("".concat(n,"-prev"),Object(y.a)({},"".concat(n,"-disabled"),_)),"aria-disabled":_},this.renderPrev(K)),k,a.a.createElement("li",{title:d?u.next_page:null,onClick:this.next,tabIndex:$?null:0,onKeyPress:this.runIfEnterNext,className:E()("".concat(n,"-next"),Object(y.a)({},"".concat(n,"-disabled"),$)),"aria-disabled":$},this.renderNext(V)),a.a.createElement(kr,{disabled:c,locale:u,rootPrefixCls:n,selectComponentClass:C,selectPrefixCls:w,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:M,pageSize:N,pageSizeOptions:x,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:L}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n={};if("current"in e&&(n.current=e.current,e.current!==t.current&&(n.currentInputValue=n.current)),"pageSize"in e&&e.pageSize!==t.pageSize){var r=t.current,o=Tr(e.pageSize,t,e);r=r>o?o:r,"current"in e||(n.current=r,n.currentInputValue=r),n.pageSize=e.pageSize}return n}}]),n}(a.a.Component);Dr.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:Pr,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:Pr,locale:{items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页"},style:{},itemRender:function(e,t,n){return n},totalBoundaryShowSizeChanger:50};var Rr=Dr,zr=n("H4fg"),Lr=n("5bA4"),Fr=n("UESt"),Kr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},Vr=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:Kr}))};Vr.displayName="DoubleLeftOutlined";var Ur=o.forwardRef(Vr),Br={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},Hr=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:Br}))};Hr.displayName="DoubleRightOutlined";var Qr=o.forwardRef(Hr);function Wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wr(Object(n),!0).forEach((function(t){Object(y.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Gr="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/);function Zr(e,t){return 0===e.indexOf(t)}function Yr(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:Jr({},n);var r={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||Zr(n,"aria-"))||t.data&&Zr(n,"data-")||t.attr&&Gr.includes(n))&&(r[n]=e[n])})),r}var qr=n("YrtM");function Xr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xr(Object(n),!0).forEach((function(t){$r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eo=o.forwardRef((function(e,t){var n=e.height,r=e.offset,a=e.children,i=e.prefixCls,c=e.onInnerResize,l={},s={display:"flex",flexDirection:"column"};return void 0!==r&&(l={height:n,position:"relative",overflow:"hidden"},s=_r(_r({},s),{},{transform:"translateY(".concat(r,"px)"),position:"absolute",left:0,right:0,top:0})),o.createElement("div",{style:l},o.createElement(w.a,{onResize:function(e){e.offsetHeight&&c&&c()}},o.createElement("div",{style:s,className:E()($r({},"".concat(i,"-holder-inner"),i)),ref:t},a)))}));eo.displayName="Filler";var to=eo;function no(e){return(no="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ro(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ao(e,t){return(ao=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function io(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=lo(e);if(t){var o=lo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return co(this,n)}}function co(e,t){return!t||"object"!==no(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lo(e){return(lo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function so(e){return"touches"in e?e.touches[0].pageY:e.pageY}var uo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ao(e,t)}(i,e);var t,n,r,a=io(i);function i(){var e;return ro(this,i),(e=a.apply(this,arguments)).moveRaf=null,e.scrollbarRef=o.createRef(),e.thumbRef=o.createRef(),e.visibleTimeout=null,e.state={dragging:!1,pageY:null,startTop:null,visible:!1},e.delayHidden=function(){clearTimeout(e.visibleTimeout),e.setState({visible:!0}),e.visibleTimeout=setTimeout((function(){e.setState({visible:!1})}),2e3)},e.onScrollbarTouchStart=function(e){e.preventDefault()},e.onContainerMouseDown=function(e){e.stopPropagation(),e.preventDefault()},e.patchEvents=function(){window.addEventListener("mousemove",e.onMouseMove),window.addEventListener("mouseup",e.onMouseUp),e.thumbRef.current.addEventListener("touchmove",e.onMouseMove),e.thumbRef.current.addEventListener("touchend",e.onMouseUp)},e.removeEvents=function(){window.removeEventListener("mousemove",e.onMouseMove),window.removeEventListener("mouseup",e.onMouseUp),e.scrollbarRef.current.removeEventListener("touchstart",e.onScrollbarTouchStart),e.thumbRef.current.removeEventListener("touchstart",e.onMouseDown),e.thumbRef.current.removeEventListener("touchmove",e.onMouseMove),e.thumbRef.current.removeEventListener("touchend",e.onMouseUp),Z.a.cancel(e.moveRaf)},e.onMouseDown=function(t){var n=e.props.onStartMove;e.setState({dragging:!0,pageY:so(t),startTop:e.getTop()}),n(),e.patchEvents(),t.stopPropagation(),t.preventDefault()},e.onMouseMove=function(t){var n=e.state,r=n.dragging,o=n.pageY,a=n.startTop,i=e.props.onScroll;if(Z.a.cancel(e.moveRaf),r){var c=a+(so(t)-o),l=e.getEnableScrollRange(),s=e.getEnableHeightRange(),u=s?c/s:0,f=Math.ceil(u*l);e.moveRaf=Object(Z.a)((function(){i(f)}))}},e.onMouseUp=function(){var t=e.props.onStopMove;e.setState({dragging:!1}),t(),e.removeEvents()},e.getSpinHeight=function(){var t=e.props,n=t.height,r=n/t.count*10;return r=Math.max(r,20),r=Math.min(r,n/2),Math.floor(r)},e.getEnableScrollRange=function(){var t=e.props;return t.scrollHeight-t.height||0},e.getEnableHeightRange=function(){return e.props.height-e.getSpinHeight()||0},e.getTop=function(){var t=e.props.scrollTop,n=e.getEnableScrollRange(),r=e.getEnableHeightRange();return 0===t||0===n?0:t/n*r},e.getVisible=function(){var t=e.state.visible,n=e.props;return!(n.height>=n.scrollHeight)&&t},e}return t=i,(n=[{key:"componentDidMount",value:function(){this.scrollbarRef.current.addEventListener("touchstart",this.onScrollbarTouchStart),this.thumbRef.current.addEventListener("touchstart",this.onMouseDown)}},{key:"componentDidUpdate",value:function(e){e.scrollTop!==this.props.scrollTop&&this.delayHidden()}},{key:"componentWillUnmount",value:function(){this.removeEvents(),clearTimeout(this.visibleTimeout)}},{key:"render",value:function(){var e,t,n,r=this.state.dragging,a=this.props.prefixCls,i=this.getSpinHeight(),c=this.getTop(),l=this.getVisible();return o.createElement("div",{ref:this.scrollbarRef,className:"".concat(a,"-scrollbar"),style:{width:8,top:0,bottom:0,right:0,position:"absolute",display:l?null:"none"},onMouseDown:this.onContainerMouseDown,onMouseMove:this.delayHidden},o.createElement("div",{ref:this.thumbRef,className:E()("".concat(a,"-scrollbar-thumb"),(e={},t="".concat(a,"-scrollbar-thumb-moving"),n=r,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e)),style:{width:"100%",height:i,top:c,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"},onMouseDown:this.onMouseDown}))}}])&&oo(t.prototype,n),r&&oo(t,r),i}(o.Component);function fo(e){var t=e.children,n=e.setRef,r=o.useCallback((function(e){n(e)}),[]);return o.cloneElement(t,{ref:r})}function po(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var mo=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.maps={},this.maps.prototype=null}var t,n,r;return t=e,(n=[{key:"set",value:function(e,t){this.maps[e]=t}},{key:"get",value:function(e){return this.maps[e]}}])&&po(t.prototype,n),r&&po(t,r),e}();function vo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(l){o=!0,a=l}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ho(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ho(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ho(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bo(e){return(bo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function go(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(l){o=!0,a=l}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return yo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Oo(e,t,n){var r=go(o.useState(e),2),a=r[0],i=r[1],c=go(o.useState(null),2),l=c[0],s=c[1];return o.useEffect((function(){var r=function(e,t,n){var r,o,a=e.length,i=t.length;if(0===a&&0===i)return null;a<i?(r=e,o=t):(r=t,o=e);var c={__EMPTY_ITEM__:!0};function l(e){return void 0!==e?n(e):c}for(var s=null,u=1!==Math.abs(a-i),f=0;f<o.length;f+=1){var p=l(r[f]);if(p!==l(o[f])){s=f,u=u||p!==l(o[f+1]);break}}return null===s?null:{index:s,multiple:u}}(a||[],e||[],t);void 0!==(null==r?void 0:r.index)&&(null==n||n(r.index),s(e[r.index])),i(e)}),[e]),[l]}function jo(e){return(jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Co="object"===("undefined"==typeof navigator?"undefined":jo(navigator))&&/Firefox/i.test(navigator.userAgent),Eo=function(e,t){var n=Object(o.useRef)(!1),r=Object(o.useRef)(null);function a(){clearTimeout(r.current),n.current=!0,r.current=setTimeout((function(){n.current=!1}),50)}var i=Object(o.useRef)({top:e,bottom:t});return i.current.top=e,i.current.bottom=t,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=e<0&&i.current.top||e>0&&i.current.bottom;return t&&o?(clearTimeout(r.current),n.current=!1):o&&!n.current||a(),!n.current&&o}};function wo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wo(Object(n),!0).forEach((function(t){Io(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Io(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(l){o=!0,a=l}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return No(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return No(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function No(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function So(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ao=[],ko={overflowY:"auto",overflowAnchor:"none"};function Po(e,t){var n=e.prefixCls,r=void 0===n?"rc-virtual-list":n,a=e.className,i=e.height,c=e.itemHeight,l=e.fullHeight,s=void 0===l||l,u=e.style,f=e.data,p=e.children,d=e.itemKey,m=e.virtual,v=e.component,h=void 0===v?"div":v,b=e.onScroll,g=So(e,["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","component","onScroll"]),y=!(!1===m||!i||!c),O=y&&f&&c*f.length>i,j=Mo(Object(o.useState)(0),2),C=j[0],w=j[1],x=Mo(Object(o.useState)(!1),2),I=x[0],M=x[1],N=E()(r,a),S=f||Ao,A=Object(o.useRef)(),k=Object(o.useRef)(),P=Object(o.useRef)(),T=o.useCallback((function(e){return"function"==typeof d?d(e):null==e?void 0:e[d]}),[d]),D={getKey:T};function R(e){w((function(t){var n=function(e){var t=e;Number.isNaN(_.current)||(t=Math.min(t,_.current));return t=Math.max(t,0)}("function"==typeof e?e(t):e);return A.current.scrollTop=n,n}))}var z=Object(o.useRef)({start:0,end:S.length}),L=Object(o.useRef)(),F=Mo(Oo(S,T),1)[0];L.current=F;var K=Mo(function(e,t,n){var r=vo(o.useState(0),2),a=r[0],i=r[1],c=Object(o.useRef)(new Map),l=Object(o.useRef)(new mo),s=Object(o.useRef)(0);function u(){s.current+=1;var e=s.current;Promise.resolve().then((function(){e===s.current&&(c.current.forEach((function(e,t){if(e&&e.offsetParent){var n=Object(q.a)(e),r=n.offsetHeight;l.current.get(t)!==r&&l.current.set(t,n.offsetHeight)}})),i((function(e){return e+1})))}))}return[function(r,o){var a=e(r),i=c.current.get(a);o?(c.current.set(a,o),u()):c.current.delete(a),!i!=!o&&(o?null==t||t(r):null==n||n(r))},u,l.current,a]}(T,null,null),4),V=K[0],U=K[1],B=K[2],H=K[3],Q=o.useMemo((function(){if(!y)return{scrollHeight:void 0,start:0,end:S.length-1,offset:void 0};var e;if(!O)return{scrollHeight:(null===(e=k.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:S.length-1,offset:void 0};for(var t,n,r,o=0,a=S.length,l=0;l<a;l+=1){var s=S[l],u=T(s),f=B.get(u),p=o+(void 0===f?c:f);p>=C&&void 0===t&&(t=l,n=o),p>C+i&&void 0===r&&(r=l),o=p}return void 0===t&&(t=0,n=0),void 0===r&&(r=S.length-1),{scrollHeight:o,start:t,end:r=Math.min(r+1,S.length),offset:n}}),[O,y,C,S,H,i]),W=Q.scrollHeight,J=Q.start,G=Q.end,Y=Q.offset;z.current.start=J,z.current.end=G;var X=W-i,_=Object(o.useRef)(X);_.current=X;var $=C<=0,ee=C>=X,te=Eo($,ee);var ne=Mo(function(e,t,n,r){var a=Object(o.useRef)(0),i=Object(o.useRef)(null),c=Object(o.useRef)(null),l=Object(o.useRef)(!1),s=Eo(t,n);return[function(t){if(e){Z.a.cancel(i.current);var n=t.deltaY;a.current+=n,c.current=n,s(n)||(Co||t.preventDefault(),i.current=Object(Z.a)((function(){var e=l.current?10:1;r(a.current*e),a.current=0})))}},function(t){e&&(l.current=t.detail===c.current)}]}(y,$,ee,(function(e){R((function(t){return t+e}))})),2),re=ne[0],oe=ne[1];!function(e,t,n){var r,a=Object(o.useRef)(!1),i=Object(o.useRef)(0),c=Object(o.useRef)(null),l=Object(o.useRef)(null),s=function(e){if(a.current){var t=Math.ceil(e.touches[0].pageY),r=i.current-t;i.current=t,n(r)&&e.preventDefault(),clearInterval(l.current),l.current=setInterval((function(){(!n(r*=14/15,!0)||Math.abs(r)<=.1)&&clearInterval(l.current)}),16)}},u=function(){a.current=!1,r()},f=function(e){r(),1!==e.touches.length||a.current||(a.current=!0,i.current=Math.ceil(e.touches[0].pageY),c.current=e.target,c.current.addEventListener("touchmove",s),c.current.addEventListener("touchend",u))};r=function(){c.current&&(c.current.removeEventListener("touchmove",s),c.current.removeEventListener("touchend",u))},o.useLayoutEffect((function(){return e&&t.current.addEventListener("touchstart",f),function(){t.current.removeEventListener("touchstart",f),r(),clearInterval(l.current)}}),[e])}(y,A,(function(e,t){return!te(e,t)&&(re({preventDefault:function(){},deltaY:e}),!0)})),o.useLayoutEffect((function(){function e(e){y&&e.preventDefault()}return A.current.addEventListener("wheel",re),A.current.addEventListener("DOMMouseScroll",oe),A.current.addEventListener("MozMousePixelScroll",e),function(){A.current.removeEventListener("wheel",re),A.current.removeEventListener("DOMMouseScroll",oe),A.current.removeEventListener("MozMousePixelScroll",e)}}),[y]);var ae=function(e,t,n,r,a,i,c,l){var s=o.useRef();return function(o){if(null!=o){if(Z.a.cancel(s.current),"number"==typeof o)c(o);else if(o&&"object"===bo(o)){var u,f=o.align;u="index"in o?o.index:t.findIndex((function(e){return a(e)===o.key}));var p=o.offset,d=void 0===p?0:p;!function o(l,p){if(!(l<0)&&e.current){var m=e.current.clientHeight,v=!1,h=p;if(m){for(var b=p||f,g=0,y=0,O=0,j=Math.min(t.length,u),C=0;C<=j;C+=1){var E=a(t[C]);y=g;var w=n.get(E);g=O=y+(void 0===w?r:w),C===u&&void 0===w&&(v=!0)}var x=null;switch(b){case"top":x=y-d;break;case"bottom":x=O-m+d;break;default:var I=e.current.scrollTop;y<I?h="top":O>I+m&&(h="bottom")}null!==x&&x!==e.current.scrollTop&&c(x)}s.current=Object(Z.a)((function(){v&&i(),o(l-1,h)}))}}(3)}}else l()}}(A,S,B,c,T,U,R,(function(){var e;null===(e=P.current)||void 0===e||e.delayHidden()}));o.useImperativeHandle(t,(function(){return{scrollTo:ae}}));var ie=function(e,t,n,r,a,i){var c=i.getKey;return e.slice(t,n+1).map((function(e,n){var i=a(e,t+n,{}),l=c(e);return o.createElement(fo,{key:l,setRef:function(t){return r(e,t)}},i)}))}(S,J,G,V,p,D),ce=null;return i&&(ce=xo(Io({},s?"height":"maxHeight",i),ko),y&&(ce.overflowY="hidden",I&&(ce.pointerEvents="none"))),o.createElement("div",Object.assign({style:xo(xo({},u),{},{position:"relative"}),className:N},g),o.createElement(h,{className:"".concat(r,"-holder"),style:ce,ref:A,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==C&&R(t),null==b||b(e)}},o.createElement(to,{prefixCls:r,height:W,offset:Y,onInnerResize:U,ref:k},ie)),y&&o.createElement(uo,{ref:P,prefixCls:r,scrollTop:C,height:i,scrollHeight:W,count:S.length,onScroll:function(e){R(e)},onStartMove:function(){M(!0)},onStopMove:function(){M(!1)}}))}var To=o.forwardRef(Po);To.displayName="List";var Do=To,Ro=function(e){var t,n=e.className,r=e.customizeIcon,a=e.customizeIconProps,i=e.onMouseDown,c=e.onClick,l=e.children;return t="function"==typeof r?r(a):r,o.createElement("span",{className:n,onMouseDown:function(e){e.preventDefault(),i&&i(e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:c,"aria-hidden":!0},void 0!==t?t:o.createElement("span",{className:E()(n.split(/\s+/).map((function(e){return"".concat(e,"-icon")})))},l))},zo=function(e,t){var n=e.prefixCls,r=e.id,a=e.flattenOptions,i=e.childrenAsData,c=e.values,l=e.searchValue,s=e.multiple,u=e.defaultActiveFirstOption,f=e.height,p=e.itemHeight,d=e.notFoundContent,m=e.open,v=e.menuItemSelectedIcon,h=e.virtual,b=e.onSelect,O=e.onToggleOpen,C=e.onActiveValue,w=e.onScroll,x=e.onMouseEnter,I="".concat(n,"-item"),M=Object(qr.a)((function(){return a}),[m,a],(function(e,t){return t[0]&&e[1]!==t[1]})),N=o.useRef(null),S=function(e){e.preventDefault()},A=function(e){N.current&&N.current.scrollTo({index:e})},k=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=M.length,r=0;r<n;r+=1){var o=(e+r*t+n)%n,a=M[o],i=a.group,c=a.data;if(!i&&!c.disabled)return o}return-1},P=o.useState((function(){return k(0)})),T=Object(j.a)(P,2),D=T[0],R=T[1],z=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];R(e);var n={source:t?"keyboard":"mouse"},r=M[e];r?C(r.data.value,e,n):C(null,-1,n)};o.useEffect((function(){z(!1!==u?k(0):-1)}),[M.length,l]),o.useEffect((function(){var e,t=setTimeout((function(){if(!s&&m&&1===c.size){var e=Array.from(c)[0],t=M.findIndex((function(t){return t.data.value===e}));z(t),A(t)}}));m&&(null===(e=N.current)||void 0===e||e.scrollTo(void 0));return function(){return clearTimeout(t)}}),[m]);var L=function(e){void 0!==e&&b(e,{selected:!c.has(e)}),s||O(!1)};if(o.useImperativeHandle(t,(function(){return{onKeyDown:function(e){var t=e.which;switch(t){case En.UP:case En.DOWN:var n=0;if(t===En.UP?n=-1:t===En.DOWN&&(n=1),0!==n){var r=k(D+n,n);A(r),z(r,!0)}break;case En.ENTER:var o=M[D];o&&!o.data.disabled?L(o.data.value):L(void 0),m&&e.preventDefault();break;case En.ESC:O(!1),m&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){A(e)}}})),0===M.length)return o.createElement("div",{role:"listbox",id:"".concat(r,"_list"),className:"".concat(I,"-empty"),onMouseDown:S},d);function F(e){var t=M[e];if(!t)return null;var n=t.data||{},a=n.value,l=n.label,s=n.children,u=Yr(n,!0),f=i?s:l;return t?o.createElement("div",Object(g.a)({"aria-label":"string"==typeof f?f:null},u,{key:e,role:"option",id:"".concat(r,"_list_").concat(e),"aria-selected":c.has(a)}),a):null}return o.createElement(o.Fragment,null,o.createElement("div",{role:"listbox",id:"".concat(r,"_list"),style:{height:0,width:0,overflow:"hidden"}},F(D-1),F(D),F(D+1)),o.createElement(Do,{itemKey:"key",ref:N,data:M,height:f,itemHeight:p,fullHeight:!1,onMouseDown:S,onScroll:w,virtual:h,onMouseEnter:x},(function(e,t){var n,r=e.group,a=e.groupOption,l=e.data,s=l.label,u=l.key;if(r)return o.createElement("div",{className:E()(I,"".concat(I,"-group"))},void 0!==s?s:u);var f=l.disabled,p=l.value,d=l.title,m=l.children,h=l.style,b=l.className,O=Object(V.a)(l,["disabled","value","title","children","style","className"]),j=c.has(p),C="".concat(I,"-option"),w=E()(I,C,b,(n={},Object(y.a)(n,"".concat(C,"-grouped"),a),Object(y.a)(n,"".concat(C,"-active"),D===t&&!f),Object(y.a)(n,"".concat(C,"-disabled"),f),Object(y.a)(n,"".concat(C,"-selected"),j),n)),x=!v||"function"==typeof v||j,M=(i?m:s)||p,N="string"==typeof M||"number"==typeof M?M.toString():void 0;return void 0!==d&&(N=d),o.createElement("div",Object(g.a)({},O,{"aria-selected":j,className:w,title:N,onMouseMove:function(){D===t||f||z(t)},onClick:function(){f||L(p)},style:h}),o.createElement("div",{className:"".concat(C,"-content")},M),o.isValidElement(v)||j,x&&o.createElement(Ro,{className:"".concat(I,"-option-state"),customizeIcon:v,customizeIconProps:{isSelected:j}},j?"✓":null))})))},Lo=o.forwardRef(zo);Lo.displayName="OptionList";var Fo=Lo,Ko=function(){return null};Ko.isSelectOption=!0;var Vo=Ko,Uo=function(){return null};Uo.isSelectOptGroup=!0;var Bo=Uo;function Ho(e){var t=e.key,n=e.props,r=n.children,o=n.value,a=Object(V.a)(n,["children","value"]);return Object(K.a)({key:t,value:void 0!==o?o:t,children:r},a)}function Qo(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(L.a)(e).map((function(e,n){if(!o.isValidElement(e)||!e.type)return null;var r=e.type.isSelectOptGroup,a=e.key,i=e.props,c=i.children,l=Object(V.a)(i,["children"]);return t||!r?Ho(e):Object(K.a)(Object(K.a)({key:"__RC_SELECT_GRP__".concat(null===a?n:a,"__"),label:a},l),{},{options:Qo(c)})})).filter((function(e){return e}))}var Wo=n("T5bk"),Jo=n("Kwbf");function Go(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}function Zo(e,t){var n,r=Object(cn.a)(t);for(n=e.length-1;n>=0&&e[n].disabled;n-=1);var o=null;return-1!==n&&(o=r[n],r.splice(n,1)),{values:r,removedValue:o}}var Yo="undefined"!=typeof window&&window.document&&window.document.documentElement,qo=0;function Xo(e,t){var n,r=e.key;return"value"in e&&(n=e.value),null!=r?r:void 0!==n?n:"rc-index-key-".concat(t)}function _o(e){var t=Object(K.a)({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Object(Jo.a)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}function $o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.prevValueOptions,o=void 0===r?[]:r,a=new Map;return t.forEach((function(e){if(!e.group){var t=e.data;a.set(t.value,t)}})),e.map((function(e){var t=a.get(e);return t||(t=Object(K.a)({},o.find((function(t){return t._INTERNAL_OPTION_VALUE_===e})))),_o(t)}))}function ea(e){return Go(e).join("")}function ta(e){var t=e.prefixCls,n=e.item,r=e.renderItem,a=e.responsive,i=e.registerSize,c=e.itemKey,l=e.className,s=e.style,u=e.children,f=e.display,p=e.order,d=a&&!f;function m(e){i(c,e)}o.useEffect((function(){return function(){m(null)}}),[]);var v=void 0!==n?r(n):u,h=o.createElement("div",{className:E()(t,l),style:Object(K.a)({opacity:d?.2:1,height:d?0:void 0,overflowY:d?"hidden":void 0,order:a?p:void 0,pointerEvents:d?"none":void 0},s)},v);return a&&(h=o.createElement(w.a,{onResize:function(e){m(e.offsetWidth)}},h)),h}function na(e){return"+ ".concat(e.length," ...")}function ra(e,t){var n=e.prefixCls,r=void 0===n?"rc-overflow":n,a=e.data,i=void 0===a?[]:a,c=e.renderItem,l=e.itemKey,s=e.itemWidth,u=void 0===s?10:s,f=e.style,p=e.className,d=e.maxCount,m=e.renderRest,v=void 0===m?na:m,h=e.suffix,b=function(){var e=Object(o.useState)({}),t=Object(j.a)(e,2)[1],n=Object(o.useRef)([]),r=Object(o.useRef)(!1),a=0,i=0;return Object(o.useEffect)((function(){return function(){r.current=!0}}),[]),function(e){var o=a;return a+=1,n.current.length<o+1&&(n.current[o]=e),[n.current[o],function(e){n.current[o]="function"==typeof e?e(n.current[o]):e,Z.a.cancel(i),i=Object(Z.a)((function(){r.current||t({})}))}]}}(),y=b(0),O=Object(j.a)(y,2),C=O[0],x=O[1],I=b(new Map),M=Object(j.a)(I,2),N=M[0],S=M[1],A=b(0),k=Object(j.a)(A,2),P=k[0],T=k[1],D=b(0),R=Object(j.a)(D,2),z=R[0],L=R[1],F=b(0),K=Object(j.a)(F,2),V=K[0],U=K[1],B=Object(o.useState)(null),H=Object(j.a)(B,2),Q=H[0],W=H[1],J=Object(o.useState)(0),G=Object(j.a)(J,2),Y=G[0],q=G[1],X=Object(o.useState)(!1),_=Object(j.a)(X,2),$=_[0],ee=_[1],te="".concat(r,"-item"),ne=Math.max(P,z),re=i.length&&"responsive"===d,oe=re||"number"==typeof d&&i.length>d,ae=Object(o.useMemo)((function(){var e=i;return re?e=i.slice(0,Math.min(i.length,C/u)):"number"==typeof d&&(e=i.slice(0,d)),e}),[i,u,C,d,re]),ie=Object(o.useMemo)((function(){return re?i.slice(Y+1):i.slice(ae.length)}),[i,ae,re,Y]),ce=Object(o.useCallback)((function(e,t){var n;return"function"==typeof l?l(e):null!==(n=l&&(null==e?void 0:e[l]))&&void 0!==n?n:t}),[l]),le=Object(o.useCallback)(c||function(e){return e},[c]);function se(e,t){q(e),t||ee(e<i.length-1)}function ue(e,t){S((function(n){var r=new Map(n);return null===t?r.delete(e):r.set(e,t),r}))}function fe(e){return N.get(ce(ae[e],e))}o.useLayoutEffect((function(){if(C&&ne&&ae){var e=V,t=ae.length,n=t-1;if(!t)return se(0),void W(null);for(var r=0;r<t;r+=1){var o=fe(r);if(void 0===o){se(r-1,!0);break}if(e+=o,r===n-1&&e+fe(n)<=C){se(n),W(null);break}if(e+ne>C){se(r-1),W(e-o-V+z);break}if(r===n){se(n),W(e-V);break}}h&&fe(0)+V>C&&W(null)}}),[C,N,z,V,ce,ae]);var pe=$&&!!ie.length,de={};null!==Q&&re&&(de={position:"absolute",left:Q,top:0});var me={prefixCls:te,responsive:re},ve=o.createElement("div",{className:E()(r,p),style:f,ref:t},ae.map((function(e,t){var n=ce(e,t);return o.createElement(ta,Object(g.a)({},me,{order:t,key:n,item:e,renderItem:le,itemKey:n,registerSize:ue,display:t<=Y}))})),oe?o.createElement(ta,Object(g.a)({},me,{order:pe?Y:Number.MAX_SAFE_INTEGER,className:"".concat(te,"-rest"),registerSize:function(e,t){L(t),T(z)},display:pe}),"function"==typeof v?v(ie):v):null,h&&o.createElement(ta,Object(g.a)({},me,{order:Y,className:"".concat(te,"-suffix"),registerSize:function(e,t){U(t)},display:!0,style:de}),h));return re&&(ve=o.createElement(w.a,{onResize:function(e,t){x(t.clientWidth)}},ve)),ve}var oa=o.forwardRef(ra);oa.displayName="Overflow";var aa=oa,ia=function(e,t){var n,r,a=e.prefixCls,i=e.id,c=e.inputElement,l=e.disabled,s=e.tabIndex,u=e.autoFocus,f=e.autoComplete,p=e.editable,d=e.accessibilityIndex,m=e.value,v=e.maxLength,h=e.onKeyDown,b=e.onMouseDown,g=e.onChange,y=e.onPaste,O=e.onCompositionStart,j=e.onCompositionEnd,C=e.open,w=e.attrs,I=c||o.createElement("input",null),M=I,N=M.ref,S=M.props,A=S.onKeyDown,k=S.onChange,P=S.onMouseDown,T=S.onCompositionStart,D=S.onCompositionEnd,R=S.style;return I=o.cloneElement(I,Object(K.a)(Object(K.a)({id:i,ref:Object(x.a)(t,N),disabled:l,tabIndex:s,autoComplete:f||"off",type:"search",autoFocus:u,className:E()("".concat(a,"-selection-search-input"),null===(n=I)||void 0===n||null===(r=n.props)||void 0===r?void 0:r.className),style:Object(K.a)(Object(K.a)({},R),{},{opacity:p?null:0}),role:"combobox","aria-expanded":C,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":"".concat(i,"_list_").concat(d)},w),{},{value:p?m:"",maxLength:v,readOnly:!p,unselectable:p?null:"on",onKeyDown:function(e){h(e),A&&A(e)},onMouseDown:function(e){b(e),P&&P(e)},onChange:function(e){g(e),k&&k(e)},onCompositionStart:function(e){O(e),T&&T(e)},onCompositionEnd:function(e){j(e),D&&D(e)},onPaste:y}))},ca=o.forwardRef(ia);ca.displayName="Input";var la=ca;function sa(e,t){Yo?o.useLayoutEffect(e,t):o.useEffect(e,t)}var ua=function(e){e.preventDefault(),e.stopPropagation()},fa=function(e){var t=e.id,n=e.prefixCls,r=e.values,a=e.open,i=e.searchValue,c=e.inputRef,l=e.placeholder,s=e.disabled,u=e.mode,f=e.showSearch,p=e.autoFocus,d=e.autoComplete,m=e.accessibilityIndex,v=e.tabIndex,h=e.removeIcon,b=e.maxTagCount,g=e.maxTagTextLength,O=e.maxTagPlaceholder,C=void 0===O?function(e){return"+ ".concat(e.length," ...")}:O,w=e.tagRender,x=e.onToggleOpen,I=e.onSelect,M=e.onInputChange,N=e.onInputPaste,S=e.onInputKeyDown,A=e.onInputMouseDown,k=e.onInputCompositionStart,P=e.onInputCompositionEnd,T=o.useRef(null),D=Object(o.useState)(0),R=Object(j.a)(D,2),z=R[0],L=R[1],F=Object(o.useState)(!1),K=Object(j.a)(F,2),V=K[0],U=K[1],B="".concat(n,"-selection"),H=a||"tags"===u?i:"",Q="tags"===u||f&&(a||V);function W(e,t,n,r){return o.createElement("span",{className:E()("".concat(B,"-item"),Object(y.a)({},"".concat(B,"-item-disabled"),t))},o.createElement("span",{className:"".concat(B,"-item-content")},e),n&&o.createElement(Ro,{className:"".concat(B,"-item-remove"),onMouseDown:ua,onClick:r,customizeIcon:h},"×"))}sa((function(){L(T.current.scrollWidth)}),[H]);var J=o.createElement("div",{className:"".concat(B,"-search"),style:{width:z},onFocus:function(){U(!0)},onBlur:function(){U(!1)}},o.createElement(la,{ref:c,open:a,prefixCls:n,id:t,inputElement:null,disabled:s,autoFocus:p,autoComplete:d,editable:Q,accessibilityIndex:m,value:H,onKeyDown:S,onMouseDown:A,onChange:M,onPaste:N,onCompositionStart:k,onCompositionEnd:P,tabIndex:v,attrs:Yr(e,!0)}),o.createElement("span",{ref:T,className:"".concat(B,"-search-mirror"),"aria-hidden":!0},H," ")),G=o.createElement(aa,{prefixCls:"".concat(B,"-overflow"),data:r,renderItem:function(e){var t=e.disabled,n=e.label,r=e.value,a=!s&&!t,i=n;if("number"==typeof g&&("string"==typeof n||"number"==typeof n)){var c=String(i);c.length>g&&(i="".concat(c.slice(0,g),"..."))}var l=function(e){e&&e.stopPropagation(),I(r,{selected:!1})};return"function"==typeof w?function(e,t,n,r,a){return o.createElement("span",{onMouseDown:function(e){ua(e),x(!0)}},w({label:t,value:e,disabled:n,closable:r,onClose:a}))}(r,i,t,a,l):W(i,t,a,l)},renderRest:function(e){return W("function"==typeof C?C(e):C,!1)},suffix:J,itemKey:"key",maxCount:b});return o.createElement(o.Fragment,null,G,!r.length&&!H&&o.createElement("span",{className:"".concat(B,"-placeholder")},l))},pa=function(e){var t=e.inputElement,n=e.prefixCls,r=e.id,a=e.inputRef,i=e.disabled,c=e.autoFocus,l=e.autoComplete,s=e.accessibilityIndex,u=e.mode,f=e.open,p=e.values,d=e.placeholder,m=e.tabIndex,v=e.showSearch,h=e.searchValue,b=e.activeValue,g=e.maxLength,y=e.onInputKeyDown,O=e.onInputMouseDown,C=e.onInputChange,E=e.onInputPaste,w=e.onInputCompositionStart,x=e.onInputCompositionEnd,I=o.useState(!1),M=Object(j.a)(I,2),N=M[0],S=M[1],A="combobox"===u,k=A||v,P=p[0],T=h||"";A&&b&&!N&&(T=b),o.useEffect((function(){A&&S(!1)}),[A,b]);var D=!("combobox"!==u&&!f)&&!!T,R=!P||"string"!=typeof P.label&&"number"!=typeof P.label?void 0:P.label.toString();return o.createElement(o.Fragment,null,o.createElement("span",{className:"".concat(n,"-selection-search")},o.createElement(la,{ref:a,prefixCls:n,id:r,open:f,inputElement:t,disabled:i,autoFocus:c,autoComplete:l,editable:k,accessibilityIndex:s,value:T,onKeyDown:y,onMouseDown:O,onChange:function(e){S(!0),C(e)},onPaste:E,onCompositionStart:w,onCompositionEnd:x,tabIndex:m,attrs:Yr(e,!0),maxLength:A?g:void 0})),!A&&P&&!D&&o.createElement("span",{className:"".concat(n,"-selection-item"),title:R},P.label),!P&&!D&&o.createElement("span",{className:"".concat(n,"-selection-placeholder")},d))};function da(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,t=o.useRef(null),n=o.useRef(null);function r(r){(r||null===t.current)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout((function(){t.current=null}),e)}return o.useEffect((function(){return function(){window.clearTimeout(n.current)}}),[]),[function(){return t.current},r]}var ma=function(e,t){var n=Object(o.useRef)(null),r=Object(o.useRef)(!1),a=e.prefixCls,i=e.multiple,c=e.open,l=e.mode,s=e.showSearch,u=e.tokenWithEnter,f=e.onSearch,p=e.onSearchSubmit,d=e.onToggleOpen,m=e.onInputKeyDown,v=e.domRef;o.useImperativeHandle(t,(function(){return{focus:function(){n.current.focus()},blur:function(){n.current.blur()}}}));var h=da(0),b=Object(j.a)(h,2),y=b[0],O=b[1],C=Object(o.useRef)(null),E=function(e){!1!==f(e,!0,r.current)&&d(!0)},w={inputRef:n,onInputKeyDown:function(e){var t=e.which;t!==En.UP&&t!==En.DOWN||e.preventDefault(),m&&m(e),t!==En.ENTER||"tags"!==l||r.current||c||p(e.target.value),[En.SHIFT,En.TAB,En.BACKSPACE,En.ESC].includes(t)||d(!0)},onInputMouseDown:function(){O(!0)},onInputChange:function(e){var t=e.target.value;if(u&&C.current&&/[\r\n]/.test(C.current)){var n=C.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,C.current)}C.current=null,E(t)},onInputPaste:function(e){var t=e.clipboardData.getData("text");C.current=t},onInputCompositionStart:function(){r.current=!0},onInputCompositionEnd:function(e){r.current=!1,"combobox"!==l&&E(e.target.value)}},x=i?o.createElement(fa,Object(g.a)({},e,w)):o.createElement(pa,Object(g.a)({},e,w));return o.createElement("div",{ref:v,className:"".concat(a,"-selector"),onClick:function(e){e.target!==n.current&&(void 0!==document.body.style.msTouchAction?setTimeout((function(){n.current.focus()})):n.current.focus())},onMouseDown:function(e){var t=y();e.target===n.current||t||e.preventDefault(),("combobox"===l||s&&t)&&c||(c&&f("",!0,!1),d())}},x)},va=o.forwardRef(ma);va.displayName="Selector";var ha=va,ba=function(e,t){var n=e.prefixCls,r=(e.disabled,e.visible),a=e.children,i=e.popupElement,c=e.containerWidth,l=e.animation,s=e.transitionName,u=e.dropdownStyle,f=e.dropdownClassName,p=e.direction,d=void 0===p?"ltr":p,m=e.dropdownMatchSelectWidth,v=void 0===m||m,h=e.dropdownRender,b=e.dropdownAlign,O=e.getPopupContainer,j=e.empty,C=e.getTriggerDOMNode,w=Object(V.a)(e,["prefixCls","disabled","visible","children","popupElement","containerWidth","animation","transitionName","dropdownStyle","dropdownClassName","direction","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode"]),x="".concat(n,"-dropdown"),I=i;h&&(I=h(i));var M=o.useMemo((function(){return function(e){var t="number"!=typeof e?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}}(v)}),[v]),N=l?"".concat(x,"-").concat(l):s,S=o.useRef(null);o.useImperativeHandle(t,(function(){return{getPopupElement:function(){return S.current}}}));var A=Object(K.a)({minWidth:c},u);return"number"==typeof v?A.width=v:v&&(A.width=c),o.createElement(St,Object(g.a)({},w,{showAction:[],hideAction:[],popupPlacement:"rtl"===d?"bottomRight":"bottomLeft",builtinPlacements:M,prefixCls:x,popupTransitionName:N,popup:o.createElement("div",{ref:S},I),popupAlign:b,popupVisible:r,getPopupContainer:O,popupClassName:E()(f,Object(y.a)({},"".concat(x,"-empty"),j)),popupStyle:A,getTriggerDOMNode:C}),a)},ga=o.forwardRef(ba);ga.displayName="SelectTrigger";var ya=ga;var Oa=["removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","tabIndex"];var ja=function(e){var t=e.mode,n=e.options,r=e.children,a=e.backfill,i=e.allowClear,c=e.placeholder,l=e.getInputElement,s=e.showSearch,u=e.onSearch,f=e.defaultOpen,p=e.autoFocus,d=e.labelInValue,m=e.value,v=e.inputValue,h=e.optionLabelProp,b="multiple"===t||"tags"===t,g=void 0!==s?s:b||"combobox"===t,y=n||Qo(r);if(Object(Jo.a)("tags"!==t||y.every((function(e){return!e.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===t||"combobox"===t){var j=y.some((function(e){return e.options?e.options.some((function(e){return"number"==typeof("value"in e?e.value:e.key)})):"number"==typeof("value"in e?e.value:e.key)}));Object(Jo.a)(!j,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(Jo.a)("combobox"!==t||!h,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(Jo.a)("combobox"===t||!a,"`backfill` only works with `combobox` mode."),Object(Jo.a)("combobox"===t||!l,"`getInputElement` only work with `combobox` mode."),Object(Jo.b)("combobox"!==t||!l||!i||!c,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!g&&"combobox"!==t&&"tags"!==t&&Object(Jo.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(Jo.b)(!f||p,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),null!=m){var C=Go(m);Object(Jo.a)(!d||C.every((function(e){return"object"===Object(O.a)(e)&&("key"in e||"value"in e)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(Jo.a)(!b||Array.isArray(m),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var E=null;Object(L.a)(r).some((function(e){if(!o.isValidElement(e)||!e.type)return!1;var t=e.type;return!t.isSelectOption&&(t.isSelectOptGroup?!Object(L.a)(e.props.children).every((function(t){return!(o.isValidElement(t)&&e.type&&!t.type.isSelectOption)||(E=t.type,!1)})):(E=t,!0))})),E&&Object(Jo.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(E.displayName||E.name||E,"`.")),Object(Jo.a)(void 0===v,"`inputValue` is deprecated, please use `searchValue` instead.")}},Ca=function(e){var t=e.prefixCls,n=e.components.optionList,r=e.convertChildrenToData,a=e.flattenOptions,i=e.getLabeledValue,c=e.filterOptions,l=e.isValueDisabled,s=e.findValueOption,u=(e.warningProps,e.fillOptionsWithMissingValue),f=e.omitDOMProps;function p(e,p){var d,m=e.prefixCls,v=void 0===m?t:m,h=e.className,b=e.id,O=e.open,C=e.defaultOpen,w=e.options,x=e.children,I=e.mode,M=e.value,N=e.defaultValue,S=e.labelInValue,A=e.showSearch,k=e.inputValue,P=e.searchValue,T=e.filterOption,D=e.filterSort,R=e.optionFilterProp,z=void 0===R?"value":R,L=e.autoClearSearchValue,F=void 0===L||L,U=e.onSearch,B=e.allowClear,H=e.clearIcon,Q=e.showArrow,W=e.inputIcon,J=e.menuItemSelectedIcon,G=e.disabled,Z=e.loading,Y=e.defaultActiveFirstOption,q=e.notFoundContent,X=void 0===q?"Not Found":q,_=e.optionLabelProp,$=e.backfill,ee=(e.tabIndex,e.getInputElement),ne=e.getPopupContainer,re=e.listHeight,oe=void 0===re?200:re,ae=e.listItemHeight,ie=void 0===ae?20:ae,ce=e.animation,le=e.transitionName,se=e.virtual,ue=e.dropdownStyle,fe=e.dropdownClassName,pe=e.dropdownMatchSelectWidth,de=e.dropdownRender,me=e.dropdownAlign,ve=e.showAction,he=void 0===ve?[]:ve,be=e.direction,ge=e.tokenSeparators,ye=e.tagRender,Oe=e.onPopupScroll,je=e.onDropdownVisibleChange,Ce=e.onFocus,Ee=e.onBlur,we=e.onKeyUp,xe=e.onKeyDown,Ie=e.onMouseDown,Me=e.onChange,Ne=e.onSelect,Se=e.onDeselect,Ae=e.onClear,ke=e.internalProps,Pe=void 0===ke?{}:ke,Te=Object(V.a)(e,["prefixCls","className","id","open","defaultOpen","options","children","mode","value","defaultValue","labelInValue","showSearch","inputValue","searchValue","filterOption","filterSort","optionFilterProp","autoClearSearchValue","onSearch","allowClear","clearIcon","showArrow","inputIcon","menuItemSelectedIcon","disabled","loading","defaultActiveFirstOption","notFoundContent","optionLabelProp","backfill","tabIndex","getInputElement","getPopupContainer","listHeight","listItemHeight","animation","transitionName","virtual","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","showAction","direction","tokenSeparators","tagRender","onPopupScroll","onDropdownVisibleChange","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown","onChange","onSelect","onDeselect","onClear","internalProps"]),De="RC_SELECT_INTERNAL_PROPS_MARK"===Pe.mark,Re=f?f(Te):Te;Oa.forEach((function(e){delete Re[e]}));var ze=Object(o.useRef)(null),Le=Object(o.useRef)(null),Fe=Object(o.useRef)(null),Ke=Object(o.useRef)(null),Ve=Object(o.useMemo)((function(){return(ge||[]).some((function(e){return["\n","\r\n"].includes(e)}))}),[ge]),Ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=o.useState(!1),n=Object(j.a)(t,2),r=n[0],a=n[1],i=o.useRef(null),c=function(){window.clearTimeout(i.current)};o.useEffect((function(){return c}),[]);var l=function(t,n){c(),i.current=window.setTimeout((function(){a(t),n&&n()}),e)};return[r,l,c]}(),Be=Object(j.a)(Ue,3),He=Be[0],Qe=Be[1],We=Be[2],Je=Object(o.useState)(),Ge=Object(j.a)(Je,2),Ze=Ge[0],Ye=Ge[1];Object(o.useEffect)((function(){var e;Ye("rc_select_".concat((Yo?(e=qo,qo+=1):e="TEST_OR_SSR",e)))}),[]);var qe=b||Ze,Xe=_;void 0===Xe&&(Xe=w?"label":"children");var _e="combobox"!==I&&S,$e="tags"===I||"multiple"===I,et=void 0!==A?A:$e||"combobox"===I,tt=Object(o.useState)(!1),nt=Object(j.a)(tt,2),rt=nt[0],ot=nt[1];Object(o.useEffect)((function(){ot(te())}),[]);var at=Object(o.useRef)(null);o.useImperativeHandle(p,(function(){var e,t,n;return{focus:null===(e=Fe.current)||void 0===e?void 0:e.focus,blur:null===(t=Fe.current)||void 0===t?void 0:t.blur,scrollTo:null===(n=Ke.current)||void 0===n?void 0:n.scrollTo}}));var it=zt(N,{value:M}),ct=Object(j.a)(it,2),lt=ct[0],st=ct[1],ut=Object(o.useMemo)((function(){return function(e,t){var n=t.labelInValue,r=t.combobox,o=new Map;if(void 0===e||""===e&&r)return[[],o];var a=Array.isArray(e)?e:[e],i=a;return n&&(i=a.map((function(e){var t=e.key,n=e.value,r=void 0!==n?n:t;return o.set(r,e),r}))),[i,o]}(lt,{labelInValue:_e,combobox:"combobox"===I})}),[lt,_e]),ft=Object(j.a)(ut,2),pt=ft[0],dt=ft[1],mt=Object(o.useMemo)((function(){return new Set(pt)}),[pt]),vt=Object(o.useState)(null),ht=Object(j.a)(vt,2),bt=ht[0],gt=ht[1],yt=Object(o.useState)(""),Ot=Object(j.a)(yt,2),jt=Ot[0],Ct=Ot[1],Et=jt;"combobox"===I&&void 0!==lt?Et=lt:void 0!==P?Et=P:k&&(Et=k);var wt=Object(o.useMemo)((function(){var e=w;return void 0===e&&(e=r(x)),"tags"===I&&u&&(e=u(e,lt,Xe,S)),e||[]}),[w,x,I,lt]),xt=Object(o.useMemo)((function(){return a(wt,e)}),[wt]),It=function(e){var t=o.useRef(null),n=o.useMemo((function(){var t=new Map;return e.forEach((function(e){var n=e.data.value;t.set(n,e)})),t}),[e]);return t.current=n,function(e){return e.map((function(e){return t.current.get(e)})).filter(Boolean)}}(xt),Mt=Object(o.useMemo)((function(){if(!Et||!et)return Object(cn.a)(wt);var e=c(Et,wt,{optionFilterProp:z,filterOption:"combobox"===I&&void 0===T?function(){return!0}:T});return"tags"===I&&e.every((function(e){return e[z]!==Et}))&&e.unshift({value:Et,label:Et,key:"__RC_SELECT_TAG_PLACEHOLDER__"}),D&&Array.isArray(e)?Object(cn.a)(e).sort(D):e}),[wt,Et,I,et,D]),Nt=Object(o.useMemo)((function(){return a(Mt,e)}),[Mt]);Object(o.useEffect)((function(){Ke.current&&Ke.current.scrollTo&&Ke.current.scrollTo(0)}),[Et]);var St,At,kt=Object(o.useMemo)((function(){var e=pt.map((function(e){var t=It([e]),n=i(e,{options:t,prevValueMap:dt,labelInValue:_e,optionLabelProp:Xe});return Object(K.a)(Object(K.a)({},n),{},{disabled:l(e,t)})}));return I||1!==e.length||null!==e[0].value||null!==e[0].label?e:[]}),[lt,wt,I]);St=kt,At=o.useRef(St),kt=o.useMemo((function(){var e=new Map;At.current.forEach((function(t){var n=t.value,r=t.label;n!==r&&e.set(n,r)}));var t=St.map((function(t){var n=e.get(t.value);return t.isCacheable&&n?Object(K.a)(Object(K.a)({},t),{},{label:n}):t}));return At.current=t,t}),[St]);var Pt=function(e,t,n){var r=It([e]),o=s([e],r)[0];if(!Pe.skipTriggerSelect){var a=_e?i(e,{options:r,prevValueMap:dt,labelInValue:_e,optionLabelProp:Xe}):e;t&&Ne?Ne(a,o):!t&&Se&&Se(a,o)}De&&(t&&Pe.onRawSelect?Pe.onRawSelect(e,o,n):!t&&Pe.onRawDeselect&&Pe.onRawDeselect(e,o,n))},Tt=Object(o.useState)([]),Dt=Object(j.a)(Tt,2),Rt=Dt[0],Lt=Dt[1],Ft=function(e){if(!De||!Pe.skipTriggerChange){var t=It(e),n=function(e,t){var n=t.optionLabelProp,r=t.labelInValue,o=t.prevValueMap,a=t.options,i=t.getLabeledValue,c=e;return r&&(c=c.map((function(e){return i(e,{options:a,prevValueMap:o,labelInValue:r,optionLabelProp:n})}))),c}(Array.from(e),{labelInValue:_e,options:t,getLabeledValue:i,prevValueMap:dt,optionLabelProp:Xe}),r=$e?n:n[0];if(Me&&(0!==pt.length||0!==n.length)){var o=s(e,t,{prevValueOptions:Rt});Lt(o.map((function(t,n){var r=Object(K.a)({},t);return Object.defineProperty(r,"_INTERNAL_OPTION_VALUE_",{get:function(){return e[n]}}),r}))),Me(r,$e?o:o[0])}st(r)}},Kt=function(e,t){var n,r=t.selected,o=t.source;G||($e?(n=new Set(pt),r?n.add(e):n.delete(e)):(n=new Set).add(e),($e||!$e&&Array.from(pt)[0]!==e)&&Ft(Array.from(n)),Pt(e,!$e||r,o),"combobox"===I?(Ct(String(e)),gt("")):$e&&!F||(Ct(""),gt("")))},Vt="combobox"===I&&ee&&ee()||null,Ut=zt(void 0,{defaultValue:C,value:O}),Bt=Object(j.a)(Ut,2),Ht=Bt[0],Qt=Bt[1],Wt=Ht,Jt=!X&&!Mt.length;(G||Jt&&Wt&&"combobox"===I)&&(Wt=!1);var Gt=!Jt&&Wt,Zt=function(e){var t=void 0!==e?e:!Wt;Ht===t||G||(Qt(t),je&&je(t))};!function(e,t,n){var r=o.useRef(null);r.current={elements:e.filter((function(e){return e})),open:t,triggerOpen:n},o.useEffect((function(){function e(e){var t=e.target;t.shadowRoot&&e.composed&&(t=e.composedPath()[0]||t),r.current.open&&r.current.elements.every((function(e){return!e.contains(t)&&e!==t}))&&r.current.triggerOpen(!1)}return window.addEventListener("mousedown",e),function(){return window.removeEventListener("mousedown",e)}}),[])}([ze.current,Le.current&&Le.current.getPopupElement()],Gt,Zt);var Yt=function(e,t,n){var r=!0,o=e;gt(null);var a=n?null:function(e,t){if(!t||!t.length)return null;var n=!1,r=function e(t,r){var o=Object(Wo.a)(r),a=o[0],i=o.slice(1);if(!a)return[t];var c=t.split(a);return n=n||c.length>1,c.reduce((function(t,n){return[].concat(Object(cn.a)(t),Object(cn.a)(e(n,i)))}),[]).filter((function(e){return e}))}(e,t);return n?r:null}(e,ge),i=a;if("combobox"===I)t&&Ft([o]);else if(a){o="","tags"!==I&&(i=a.map((function(e){var t=xt.find((function(t){return t.data[Xe]===e}));return t?t.data.value:null})).filter((function(e){return null!==e})));var c=Array.from(new Set([].concat(Object(cn.a)(pt),Object(cn.a)(i))));Ft(c),c.forEach((function(e){Pt(e,!0,"input")})),Zt(!1),r=!1}return Ct(o),U&&Et!==o&&U(o),r};Object(o.useEffect)((function(){Ht&&G&&Qt(!1)}),[G]),Object(o.useEffect)((function(){Wt||$e||"combobox"===I||Yt("",!1,!1)}),[Wt]);var qt=da(),Xt=Object(j.a)(qt,2),_t=Xt[0],$t=Xt[1],en=Object(o.useRef)(!1),tn=[];Object(o.useEffect)((function(){return function(){tn.forEach((function(e){return clearTimeout(e)})),tn.splice(0,tn.length)}}),[]);var nn=Object(o.useState)(0),rn=Object(j.a)(nn,2),on=rn[0],an=rn[1],ln=void 0!==Y?Y:"combobox"!==I,sn=Object(o.useState)(null),un=Object(j.a)(sn,2),fn=un[0],pn=un[1],dn=Object(o.useState)({}),mn=Object(j.a)(dn,2)[1];sa((function(){if(Gt){var e=Math.ceil(ze.current.offsetWidth);fn!==e&&pn(e)}}),[Gt]);var vn,hn=o.createElement(n,{ref:Ke,prefixCls:v,id:qe,open:Wt,childrenAsData:!w,options:Mt,flattenOptions:Nt,multiple:$e,values:mt,height:oe,itemHeight:ie,onSelect:function(e,t){Kt(e,Object(K.a)(Object(K.a)({},t),{},{source:"option"}))},onToggleOpen:Zt,onActiveValue:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.source,o=void 0===r?"keyboard":r;an(t),$&&"combobox"===I&&null!==e&&"keyboard"===o&>(String(e))},defaultActiveFirstOption:ln,notFoundContent:X,onScroll:Oe,searchValue:Et,menuItemSelectedIcon:J,virtual:!1!==se&&!1!==pe,onMouseEnter:function(){mn({})}});!G&&B&&(pt.length||Et)&&(vn=o.createElement(Ro,{className:"".concat(v,"-clear"),onMouseDown:function(){De&&Pe.onClear&&Pe.onClear(),Ae&&Ae(),Ft([]),Yt("",!1,!1)},customizeIcon:H},"×"));var bn,gn=void 0!==Q?Q:Z||!$e&&"combobox"!==I;gn&&(bn=o.createElement(Ro,{className:E()("".concat(v,"-arrow"),Object(y.a)({},"".concat(v,"-arrow-loading"),Z)),customizeIcon:W,customizeIconProps:{loading:Z,searchValue:Et,open:Wt,focused:He,showSearch:et}}));var yn=E()(v,h,(d={},Object(y.a)(d,"".concat(v,"-focused"),He),Object(y.a)(d,"".concat(v,"-multiple"),$e),Object(y.a)(d,"".concat(v,"-single"),!$e),Object(y.a)(d,"".concat(v,"-allow-clear"),B),Object(y.a)(d,"".concat(v,"-show-arrow"),gn),Object(y.a)(d,"".concat(v,"-disabled"),G),Object(y.a)(d,"".concat(v,"-loading"),Z),Object(y.a)(d,"".concat(v,"-open"),Wt),Object(y.a)(d,"".concat(v,"-customize-input"),Vt),Object(y.a)(d,"".concat(v,"-show-search"),et),d));return o.createElement("div",Object(g.a)({className:yn},Re,{ref:ze,onMouseDown:function(e){var t=e.target,n=Le.current&&Le.current.getPopupElement();if(n&&n.contains(t)){var r=setTimeout((function(){var e,t=tn.indexOf(r);(-1!==t&&tn.splice(t,1),We(),rt||n.contains(document.activeElement))||(null===(e=Fe.current)||void 0===e||e.focus())}));tn.push(r)}if(Ie){for(var o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];Ie.apply(void 0,[e].concat(a))}},onKeyDown:function(e){var t,n=_t(),r=e.which;if(r===En.ENTER&&("combobox"!==I&&e.preventDefault(),Wt||Zt(!0)),$t(!!Et),r===En.BACKSPACE&&!n&&$e&&!Et&&pt.length){var o=Zo(kt,pt);null!==o.removedValue&&(Ft(o.values),Pt(o.removedValue,!1,"input"))}for(var a=arguments.length,i=new Array(a>1?a-1:0),c=1;c<a;c++)i[c-1]=arguments[c];Wt&&Ke.current&&(t=Ke.current).onKeyDown.apply(t,[e].concat(i));xe&&xe.apply(void 0,[e].concat(i))},onKeyUp:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o;Wt&&Ke.current&&(o=Ke.current).onKeyUp.apply(o,[e].concat(n));we&&we.apply(void 0,[e].concat(n))},onFocus:function(){Qe(!0),G||(Ce&&!en.current&&Ce.apply(void 0,arguments),he.includes("focus")&&Zt(!0)),en.current=!0},onBlur:function(){Qe(!1,(function(){en.current=!1,Zt(!1)})),G||(Et&&("tags"===I?(Yt("",!1,!1),Ft(Array.from(new Set([].concat(Object(cn.a)(pt),[Et]))))):"multiple"===I&&Ct("")),Ee&&Ee.apply(void 0,arguments))}}),He&&!Wt&&o.createElement("span",{style:{width:0,height:0,display:"flex",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(pt.join(", "))),o.createElement(ya,{ref:Le,disabled:G,prefixCls:v,visible:Gt,popupElement:hn,containerWidth:fn,animation:ce,transitionName:le,dropdownStyle:ue,dropdownClassName:fe,direction:be,dropdownMatchSelectWidth:pe,dropdownRender:de,dropdownAlign:me,getPopupContainer:ne,empty:!wt.length,getTriggerDOMNode:function(){return at.current}},o.createElement(ha,Object(g.a)({},e,{domRef:at,prefixCls:v,inputElement:Vt,ref:Fe,id:qe,showSearch:et,mode:I,accessibilityIndex:on,multiple:$e,tagRender:ye,values:kt,open:Wt,onToggleOpen:Zt,searchValue:Et,activeValue:bt,onSearch:Yt,onSearchSubmit:function(e){if(e&&e.trim()){var t=Array.from(new Set([].concat(Object(cn.a)(pt),[e])));Ft(t),t.forEach((function(e){Pt(e,!0,"input")})),Ct("")}},onSelect:function(e,t){Kt(e,Object(K.a)(Object(K.a)({},t),{},{source:"selection"}))},tokenWithEnter:Ve}))),bn,vn)}return o.forwardRef(p)}({prefixCls:"rc-select",components:{optionList:Fo},convertChildrenToData:Qo,flattenOptions:function(e){var t=[];return function e(n,r){n.forEach((function(n){r||!("options"in n)?t.push({key:Xo(n,t.length),groupOption:r,data:n}):(t.push({key:Xo(n,t.length),group:!0,data:n}),e(n.options,!0))}))}(e,!1),t},getLabeledValue:function(e,t){var n=t.options,r=t.prevValueMap,o=t.labelInValue,a=t.optionLabelProp,i=$o([e],n)[0],c={value:e},l=o?r.get(e):void 0;return l&&"object"===Object(O.a)(l)&&"label"in l?(c.label=l.label,i&&"string"==typeof l.label&&"string"==typeof i[a]&&l.label.trim()!==i[a].trim()&&Object(Jo.a)(!1,"`label` of `value` is not same as `label` in Select options.")):i&&a in i?c.label=i[a]:(c.label=e,c.isCacheable=!0),c.key=c.value,c},filterOptions:function(e,t,n){var r,o=n.optionFilterProp,a=n.filterOption,i=[];return!1===a?Object(cn.a)(t):(r="function"==typeof a?a:function(e){return function(t,n){var r=t.toLowerCase();return"options"in n?ea(n.label).toLowerCase().includes(r):ea(n[e]).toLowerCase().includes(r)}}(o),t.forEach((function(t){if("options"in t)if(r(e,t))i.push(t);else{var n=t.options.filter((function(t){return r(e,t)}));n.length&&i.push(Object(K.a)(Object(K.a)({},t),{},{options:n}))}else r(e,_o(t))&&i.push(t)})),i)},isValueDisabled:function(e,t){return $o([e],t)[0].disabled},findValueOption:$o,warningProps:ja,fillOptionsWithMissingValue:function(e,t,n,r){var o=Go(t).slice().sort(),a=Object(cn.a)(e),i=new Set;return e.forEach((function(e){e.options?e.options.forEach((function(e){i.add(e.value)})):i.add(e.value)})),o.forEach((function(e){var t,o=r?e.value:e;i.has(o)||a.push(r?(t={},Object(y.a)(t,n,e.label),Object(y.a)(t,"value",o),t):{value:o})})),a}}),Ea=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(){var e;return Object(U.a)(this,n),(e=t.apply(this,arguments)).selectRef=o.createRef(),e.focus=function(){e.selectRef.current.focus()},e.blur=function(){e.selectRef.current.blur()},e}return Object(B.a)(n,[{key:"render",value:function(){return o.createElement(Ca,Object(g.a)({ref:this.selectRef},this.props))}}]),n}(o.Component);Ea.Option=Vo,Ea.OptGroup=Bo;var wa=Ea,xa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},Ia=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:xa}))};Ia.displayName="DownOutlined";var Ma=o.forwardRef(Ia),Na=n("ye1Q"),Sa=n("4i/N"),Aa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},ka=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:Aa}))};ka.displayName="SearchOutlined";var Pa=o.forwardRef(ka);var Ta=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Da=function(e,t){var n,r,a=e.prefixCls,i=e.bordered,c=void 0===i||i,l=e.className,s=e.getPopupContainer,u=e.dropdownClassName,f=e.listHeight,p=void 0===f?256:f,d=e.listItemHeight,m=void 0===d?24:d,v=e.size,h=e.notFoundContent,b=Ta(e,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","listHeight","listItemHeight","size","notFoundContent"]),O=o.useContext(I.b),j=O.getPopupContainer,C=O.getPrefixCls,w=O.renderEmpty,x=O.direction,M=O.virtual,N=O.dropdownMatchSelectWidth,S=o.useContext(Un.b),A=C("select",a),k=C(),P=o.useMemo((function(){var e=b.mode;if("combobox"!==e)return"SECRET_COMBOBOX_MODE_DO_NOT_USE"===e?"combobox":e}),[b.mode]),T="multiple"===P||"tags"===P;r=void 0!==h?h:"combobox"===P?null:w("Select");var D=function(e){var t=e.suffixIcon,n=e.clearIcon,r=e.menuItemSelectedIcon,a=e.removeIcon,i=e.loading,c=e.multiple,l=e.prefixCls,s=n;n||(s=o.createElement(Vn.a,null));var u=null;if(void 0!==t)u=t;else if(i)u=o.createElement(Na.a,{spin:!0});else{var f="".concat(l,"-suffix");u=function(e){var t=e.open,n=e.showSearch;return t&&n?o.createElement(Pa,{className:f}):o.createElement(Ma,{className:f})}}return{clearIcon:s,suffixIcon:u,itemIcon:void 0!==r?r:c?o.createElement(hn,null):null,removeIcon:void 0!==a?a:o.createElement(Sa.a,null)}}(Object(g.a)(Object(g.a)({},b),{multiple:T,prefixCls:A})),R=D.suffixIcon,z=D.itemIcon,L=D.removeIcon,F=D.clearIcon,K=Object(an.a)(b,["suffixIcon","itemIcon"]),V=E()(u,Object(y.a)({},"".concat(A,"-dropdown-").concat(x),"rtl"===x)),U=v||S,B=E()((n={},Object(y.a)(n,"".concat(A,"-lg"),"large"===U),Object(y.a)(n,"".concat(A,"-sm"),"small"===U),Object(y.a)(n,"".concat(A,"-rtl"),"rtl"===x),Object(y.a)(n,"".concat(A,"-borderless"),!c),n),l);return o.createElement(wa,Object(g.a)({ref:t,virtual:M,dropdownMatchSelectWidth:N},K,{transitionName:Ht(k,"slide-up",b.transitionName),listHeight:p,listItemHeight:m,mode:P,prefixCls:A,direction:x,inputIcon:R,menuItemSelectedIcon:z,removeIcon:L,clearIcon:F,notFoundContent:r,className:B,getPopupContainer:s||j,dropdownClassName:V}))},Ra=o.forwardRef(Da);Ra.SECRET_COMBOBOX_MODE_DO_NOT_USE="SECRET_COMBOBOX_MODE_DO_NOT_USE",Ra.Option=Vo,Ra.OptGroup=Bo;var za=Ra,La=function(e){return o.createElement(za,Object(g.a)({size:"small"},e))};La.Option=za.Option;var Fa=La,Ka=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Va=function(e){var t=e.prefixCls,n=e.selectPrefixCls,r=e.className,a=e.size,i=e.locale,c=Ka(e,["prefixCls","selectPrefixCls","className","size","locale"]),l=S().xs,s=o.useContext(I.b),u=s.getPrefixCls,f=s.direction,p=u("pagination",t),d=function(e){var t=Object(g.a)(Object(g.a)({},e),i),s="small"===a||!(!l||a||!c.responsive),d=u("select",n),m=E()(Object(y.a)({mini:s},"".concat(p,"-rtl"),"rtl"===f),r);return o.createElement(Rr,Object(g.a)({},c,{prefixCls:p,selectPrefixCls:d},function(){var e=o.createElement("span",{className:"".concat(p,"-item-ellipsis")},"•••"),t=o.createElement("button",{className:"".concat(p,"-item-link"),type:"button",tabIndex:-1},o.createElement(Lr.a,null)),n=o.createElement("button",{className:"".concat(p,"-item-link"),type:"button",tabIndex:-1},o.createElement(Fr.a,null)),r=o.createElement("a",{className:"".concat(p,"-item-link")},o.createElement("div",{className:"".concat(p,"-item-container")},o.createElement(Ur,{className:"".concat(p,"-item-link-icon")}),e)),a=o.createElement("a",{className:"".concat(p,"-item-link")},o.createElement("div",{className:"".concat(p,"-item-container")},o.createElement(Qr,{className:"".concat(p,"-item-link-icon")}),e));if("rtl"===f){var i=[n,t];t=i[0],n=i[1];var c=[a,r];r=c[0],a=c[1]}return{prevIcon:t,nextIcon:n,jumpPrevIcon:r,jumpNextIcon:a}}(),{className:m,selectComponentClass:s?Fa:za,locale:t}))};return o.createElement(jn.a,{componentName:"Pagination",defaultLocale:zr.a},d)},Ua=n("qrJ5"),Ba=n("/kpp"),Ha=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Qa=function(e){var t,n=e.prefixCls,r=e.children,a=e.actions,i=e.extra,c=e.className,l=e.colStyle,s=Ha(e,["prefixCls","children","actions","extra","className","colStyle"]),u=o.useContext(Ga),f=u.grid,p=u.itemLayout,d=o.useContext(I.b).getPrefixCls,m=d("list",n),v=a&&a.length>0&&o.createElement("ul",{className:"".concat(m,"-item-action"),key:"actions"},a.map((function(e,t){return o.createElement("li",{key:"".concat(m,"-item-action-").concat(t)},e,t!==a.length-1&&o.createElement("em",{className:"".concat(m,"-item-action-split")}))}))),h=f?"div":"li",b=o.createElement(h,Object(g.a)({},s,{className:E()("".concat(m,"-item"),Object(y.a)({},"".concat(m,"-item-no-flex"),!("vertical"===p?i:(o.Children.forEach(r,(function(e){"string"==typeof e&&(t=!0)})),!(t&&o.Children.count(r)>1)))),c)}),"vertical"===p&&i?[o.createElement("div",{className:"".concat(m,"-item-main"),key:"content"},r,v),o.createElement("div",{className:"".concat(m,"-item-extra"),key:"extra"},i)]:[r,v,Object(F.a)(i,{key:"extra"})]);return f?o.createElement(Ba.a,{flex:1,style:l},b):b};Qa.Meta=function(e){var t=e.prefixCls,n=e.className,r=e.avatar,a=e.title,i=e.description,c=Ha(e,["prefixCls","className","avatar","title","description"]),l=(0,o.useContext(I.b).getPrefixCls)("list",t),s=E()("".concat(l,"-item-meta"),n),u=o.createElement("div",{className:"".concat(l,"-item-meta-content")},a&&o.createElement("h4",{className:"".concat(l,"-item-meta-title")},a),i&&o.createElement("div",{className:"".concat(l,"-item-meta-description")},i));return o.createElement("div",Object(g.a)({},c,{className:s}),r&&o.createElement("div",{className:"".concat(l,"-item-meta-avatar")},r),(a||i)&&u)};var Wa=Qa,Ja=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Ga=o.createContext({});Ga.Consumer;function Za(e){var t,n=e.pagination,r=void 0!==n&&n,a=e.prefixCls,i=e.bordered,c=void 0!==i&&i,l=e.split,s=void 0===l||l,u=e.className,f=e.children,p=e.itemLayout,d=e.loadMore,m=e.grid,v=e.dataSource,h=void 0===v?[]:v,b=e.size,C=e.header,w=e.footer,x=e.loading,M=void 0!==x&&x,A=e.rowKey,k=e.renderItem,P=e.locale,T=Ja(e,["pagination","prefixCls","bordered","split","className","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]),D=r&&"object"===Object(O.a)(r)?r:{},R=o.useState(D.defaultCurrent||1),z=Object(j.a)(R,2),L=z[0],F=z[1],K=o.useState(D.defaultPageSize||10),V=Object(j.a)(K,2),U=V[0],B=V[1],H=o.useContext(I.b),Q=H.getPrefixCls,W=H.renderEmpty,J=H.direction,G={},Z=function(e){return function(t,n){F(t),B(n),r&&r[e]&&r[e](t,n)}},Y=Z("onChange"),q=Z("onShowSizeChange"),X=Q("list",a),_=M;"boolean"==typeof _&&(_={spinning:_});var $=_&&_.spinning,ee="";switch(b){case"large":ee="lg";break;case"small":ee="sm"}var te=E()(X,(t={},Object(y.a)(t,"".concat(X,"-vertical"),"vertical"===p),Object(y.a)(t,"".concat(X,"-").concat(ee),ee),Object(y.a)(t,"".concat(X,"-split"),s),Object(y.a)(t,"".concat(X,"-bordered"),c),Object(y.a)(t,"".concat(X,"-loading"),$),Object(y.a)(t,"".concat(X,"-grid"),m),Object(y.a)(t,"".concat(X,"-something-after-last-item"),!!(d||r||w)),Object(y.a)(t,"".concat(X,"-rtl"),"rtl"===J),t),u),ne=Object(g.a)(Object(g.a)(Object(g.a)({},{current:1,total:0}),{total:h.length,current:L,pageSize:U}),r||{}),re=Math.ceil(ne.total/ne.pageSize);ne.current>re&&(ne.current=re);var oe=r?o.createElement("div",{className:"".concat(X,"-pagination")},o.createElement(Va,Object(g.a)({},ne,{onChange:Y,onShowSizeChange:q}))):null,ae=Object(cn.a)(h);r&&h.length>(ne.current-1)*ne.pageSize&&(ae=Object(cn.a)(h).splice((ne.current-1)*ne.pageSize,ne.pageSize));var ie=S(),ce=o.useMemo((function(){for(var e=0;e<N.b.length;e+=1){var t=N.b[e];if(ie[t])return t}}),[ie]),le=o.useMemo((function(){if(m){var e=ce&&m[ce]?m[ce]:m.column;return e?{width:"".concat(100/e,"%"),maxWidth:"".concat(100/e,"%")}:void 0}}),[null==m?void 0:m.column,ce]),se=$&&o.createElement("div",{style:{minHeight:53}});if(ae.length>0){var ue=ae.map((function(e,t){return function(e,t){return k?((n="function"==typeof A?A(e):"string"==typeof A?e[A]:e.key)||(n="list-item-".concat(t)),G[t]=n,k(e,t)):null;var n}(e,t)})),fe=o.Children.map(ue,(function(e,t){return o.createElement("div",{key:G[t],style:le},e)}));se=m?o.createElement(Ua.a,{gutter:m.gutter},fe):o.createElement("ul",{className:"".concat(X,"-items")},ue)}else f||$||(se=function(e,t){return o.createElement("div",{className:"".concat(e,"-empty-text")},P&&P.emptyText||t("List"))}(X,W));var pe=ne.position||"bottom";return o.createElement(Ga.Provider,{value:{grid:m,itemLayout:p}},o.createElement("div",Object(g.a)({className:te},T),("top"===pe||"both"===pe)&&oe,C&&o.createElement("div",{className:"".concat(X,"-header")},C),o.createElement(xr,_,se,f),w&&o.createElement("div",{className:"".concat(X,"-footer")},w),d||("bottom"===pe||"both"===pe)&&oe))}Za.Item=Wa;var Ya=Za,qa=(n("HJMW"),n("OQrj"),function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}),Xa=function(e){var t=e.prefixCls,n=e.className,r=e.hoverable,a=void 0===r||r,i=qa(e,["prefixCls","className","hoverable"]);return o.createElement(I.a,null,(function(e){var r=(0,e.getPrefixCls)("card",t),c=E()("".concat(r,"-grid"),n,Object(y.a)({},"".concat(r,"-grid-hoverable"),a));return o.createElement("div",Object(g.a)({},i,{className:c}))}))},_a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},$a=function(e){return o.createElement(I.a,null,(function(t){var n=t.getPrefixCls,r=e.prefixCls,a=e.className,i=e.avatar,c=e.title,l=e.description,s=_a(e,["prefixCls","className","avatar","title","description"]),u=n("card",r),f=E()("".concat(u,"-meta"),a),p=i?o.createElement("div",{className:"".concat(u,"-meta-avatar")},i):null,d=c?o.createElement("div",{className:"".concat(u,"-meta-title")},c):null,m=l?o.createElement("div",{className:"".concat(u,"-meta-description")},l):null,v=d||m?o.createElement("div",{className:"".concat(u,"-meta-detail")},d,m):null;return o.createElement("div",Object(g.a)({},s,{className:f}),p,v)}))};function ei(e){var t=Object(o.useRef)(),n=Object(o.useRef)(!1);return Object(o.useEffect)((function(){return function(){n.current=!0,Z.a.cancel(t.current)}}),[]),function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];n.current||(Z.a.cancel(t.current),t.current=Object(Z.a)((function(){e.apply(void 0,o)})))}}function ti(e,t){var n,r=e.prefixCls,a=e.id,i=e.active,c=e.rtl,l=e.tab,s=l.key,u=l.tab,f=l.disabled,p=l.closeIcon,d=e.tabBarGutter,m=e.tabPosition,v=e.closable,h=e.renderWrapper,b=e.removeAriaLabel,g=e.editable,O=e.onClick,j=e.onRemove,C=e.onFocus,w="".concat(r,"-tab");o.useEffect((function(){return j}),[]);var x={};"top"===m||"bottom"===m?x[c?"marginLeft":"marginRight"]=d:x.marginBottom=d;var I=g&&!1!==v&&!f;function M(e){f||O(e)}var N=o.createElement("div",{key:s,ref:t,className:E()(w,(n={},Object(y.a)(n,"".concat(w,"-with-remove"),I),Object(y.a)(n,"".concat(w,"-active"),i),Object(y.a)(n,"".concat(w,"-disabled"),f),n)),style:x,onClick:M},o.createElement("div",{role:"tab","aria-selected":i,id:a&&"".concat(a,"-tab-").concat(s),className:"".concat(w,"-btn"),"aria-controls":a&&"".concat(a,"-panel-").concat(s),"aria-disabled":f,tabIndex:f?null:0,onClick:function(e){e.stopPropagation(),M(e)},onKeyDown:function(e){[En.SPACE,En.ENTER].includes(e.which)&&(e.preventDefault(),M(e))},onFocus:C},u),I&&o.createElement("button",{type:"button","aria-label":b||"remove",tabIndex:0,className:"".concat(w,"-remove"),onClick:function(e){var t;e.stopPropagation(),(t=e).preventDefault(),t.stopPropagation(),g.onEdit("remove",{key:s,event:t})}},p||g.removeIcon||"×"));return h&&(N=h(N)),N}var ni=o.forwardRef(ti),ri={width:0,height:0,left:0,top:0};var oi={width:0,height:0,left:0,top:0,right:0};var ai,ii=(ai=function(e,t){return(ai=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}ai(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),ci=o.createContext(null),li=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ii(t,e),t.prototype.render=function(){return o.createElement(ci.Provider,{value:this.props.store},this.props.children)},t}(o.Component),si=n("Gytx"),ui=n.n(si),fi=n("2mql"),pi=n.n(fi),di=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mi=function(){return(mi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};var vi=function(){return{}};function hi(e,t){void 0===t&&(t={});var n=!!e,r=e||vi;return function(a){var i=function(t){function i(e,n){var o=t.call(this,e,n)||this;return o.unsubscribe=null,o.handleChange=function(){if(o.unsubscribe){var e=r(o.store.getState(),o.props);o.setState({subscribed:e})}},o.store=o.context,o.state={subscribed:r(o.store.getState(),e),store:o.store,props:e},o}return di(i,t),i.getDerivedStateFromProps=function(t,n){return e&&2===e.length&&t!==n.props?{subscribed:r(n.store.getState(),t),props:t}:{props:t}},i.prototype.componentDidMount=function(){this.trySubscribe()},i.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},i.prototype.shouldComponentUpdate=function(e,t){return!ui()(this.props,e)||!ui()(this.state.subscribed,t.subscribed)},i.prototype.trySubscribe=function(){n&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},i.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},i.prototype.render=function(){var e=mi(mi(mi({},this.props),this.state.subscribed),{store:this.store});return o.createElement(a,mi({},e,{ref:this.props.miniStoreForwardedRef}))},i.displayName="Connect("+function(e){return e.displayName||e.name||"Component"}(a)+")",i.contextType=ci,i}(o.Component);if(t.forwardRef){var c=o.forwardRef((function(e,t){return o.createElement(i,mi({},e,{miniStoreForwardedRef:t}))}));return pi()(c,a)}return pi()(i,a)}}var bi=function(){return(bi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function gi(){var e=[].slice.call(arguments,0);return 1===e.length?e[0]:function(){for(var t=0;t<e.length;t++)e[t]&&e[t].apply&&e[t].apply(this,arguments)}}var yi=/iPhone/i,Oi=/iPod/i,ji=/iPad/i,Ci=/\bAndroid(?:.+)Mobile\b/i,Ei=/Android/i,wi=/\bAndroid(?:.+)SD4930UR\b/i,xi=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,Ii=/Windows Phone/i,Mi=/\bWindows(?:.+)ARM\b/i,Ni=/BlackBerry/i,Si=/BB10/i,Ai=/Opera Mini/i,ki=/\b(CriOS|Chrome)(?:.+)Mobile/i,Pi=/Mobile(?:.+)Firefox\b/i;function Ti(e,t){return e.test(t)}function Di(e){var t=e||("undefined"!=typeof navigator?navigator.userAgent:""),n=t.split("[FBAN");if(void 0!==n[1]){var r=n;t=Object(j.a)(r,1)[0]}if(void 0!==(n=t.split("Twitter"))[1]){var o=n;t=Object(j.a)(o,1)[0]}var a={apple:{phone:Ti(yi,t)&&!Ti(Ii,t),ipod:Ti(Oi,t),tablet:!Ti(yi,t)&&Ti(ji,t)&&!Ti(Ii,t),device:(Ti(yi,t)||Ti(Oi,t)||Ti(ji,t))&&!Ti(Ii,t)},amazon:{phone:Ti(wi,t),tablet:!Ti(wi,t)&&Ti(xi,t),device:Ti(wi,t)||Ti(xi,t)},android:{phone:!Ti(Ii,t)&&Ti(wi,t)||!Ti(Ii,t)&&Ti(Ci,t),tablet:!Ti(Ii,t)&&!Ti(wi,t)&&!Ti(Ci,t)&&(Ti(xi,t)||Ti(Ei,t)),device:!Ti(Ii,t)&&(Ti(wi,t)||Ti(xi,t)||Ti(Ci,t)||Ti(Ei,t))||Ti(/\bokhttp\b/i,t)},windows:{phone:Ti(Ii,t),tablet:Ti(Mi,t),device:Ti(Ii,t)||Ti(Mi,t)},other:{blackberry:Ti(Ni,t),blackberry10:Ti(Si,t),opera:Ti(Ai,t),firefox:Ti(Pi,t),chrome:Ti(ki,t),device:Ti(Ni,t)||Ti(Si,t)||Ti(Ai,t)||Ti(Pi,t)||Ti(ki,t)},any:null,phone:null,tablet:null};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var Ri=Object(K.a)(Object(K.a)({},Di()),{},{isMobile:Di});function zi(){}function Li(e,t,n){var r=t||"";return e.key||"".concat(r,"item_").concat(n)}function Fi(e){return"".concat(e,"-menu-")}function Ki(e,t){var n=-1;o.Children.forEach(e,(function(e){n+=1,e&&e.type&&e.type.isMenuItemGroup?o.Children.forEach(e.props.children,(function(e){t(e,n+=1)})):t(e,n)}))}var Vi=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],Ui=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e&&"function"==typeof e.getBoundingClientRect&&e.getBoundingClientRect().width;if(n){if(t){var r=getComputedStyle(e),o=r.marginLeft,a=r.marginRight;n+=+o.replace("px","")+ +a.replace("px","")}n=+n.toFixed(6)}return n||0},Bi=function(e,t,n){e&&"object"===Object(O.a)(e.style)&&(e.style[t]=n)},Hi={adjustX:1,adjustY:1},Qi={topLeft:{points:["bl","tl"],overflow:Hi,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Hi,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Hi,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Hi,offset:[4,0]}},Wi={topLeft:{points:["bl","tl"],overflow:Hi,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Hi,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Hi,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Hi,offset:[4,0]}},Ji=0,Gi={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Zi=function(e,t,n){var r=Fi(t),o=e.getState();e.setState({defaultActiveFirst:Object(K.a)(Object(K.a)({},o.defaultActiveFirst),{},Object(y.a)({},r,n))})},Yi=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(e){var r;Object(U.a)(this,n),(r=t.call(this,e)).onDestroy=function(e){r.props.onDestroy(e)},r.onKeyDown=function(e){var t=e.keyCode,n=r.menuInstance,o=r.props.store,a=r.getVisible();if(t===En.ENTER)return r.onTitleClick(e),Zi(o,r.props.eventKey,!0),!0;if(t===En.RIGHT)return a?n.onKeyDown(e):(r.triggerOpenChange(!0),Zi(o,r.props.eventKey,!0)),!0;if(t===En.LEFT){var i;if(!a)return;return(i=n.onKeyDown(e))||(r.triggerOpenChange(!1),i=!0),i}return!a||t!==En.UP&&t!==En.DOWN?void 0:n.onKeyDown(e)},r.onOpenChange=function(e){r.props.onOpenChange(e)},r.onPopupVisibleChange=function(e){r.triggerOpenChange(e,e?"mouseenter":"mouseleave")},r.onMouseEnter=function(e){var t=r.props,n=t.eventKey,o=t.onMouseEnter,a=t.store;Zi(a,r.props.eventKey,!1),o({key:n,domEvent:e})},r.onMouseLeave=function(e){var t=r.props,n=t.parentMenu,o=t.eventKey,a=t.onMouseLeave;n.subMenuInstance=Object(H.a)(r),a({key:o,domEvent:e})},r.onTitleMouseEnter=function(e){var t=r.props,n=t.eventKey,o=t.onItemHover,a=t.onTitleMouseEnter;o({key:n,hover:!0}),a({key:n,domEvent:e})},r.onTitleMouseLeave=function(e){var t=r.props,n=t.parentMenu,o=t.eventKey,a=t.onItemHover,i=t.onTitleMouseLeave;n.subMenuInstance=Object(H.a)(r),a({key:o,hover:!1}),i({key:o,domEvent:e})},r.onTitleClick=function(e){var t=Object(H.a)(r).props;t.onTitleClick({key:t.eventKey,domEvent:e}),"hover"!==t.triggerSubMenuAction&&(r.triggerOpenChange(!r.getVisible(),"click"),Zi(t.store,r.props.eventKey,!1))},r.onSubMenuClick=function(e){"function"==typeof r.props.onClick&&r.props.onClick(r.addKeyPath(e))},r.onSelect=function(e){r.props.onSelect(e)},r.onDeselect=function(e){r.props.onDeselect(e)},r.getPrefixCls=function(){return"".concat(r.props.rootPrefixCls,"-submenu")},r.getActiveClassName=function(){return"".concat(r.getPrefixCls(),"-active")},r.getDisabledClassName=function(){return"".concat(r.getPrefixCls(),"-disabled")},r.getSelectedClassName=function(){return"".concat(r.getPrefixCls(),"-selected")},r.getOpenClassName=function(){return"".concat(r.props.rootPrefixCls,"-submenu-open")},r.getVisible=function(){return r.state.isOpen},r.getMode=function(){return r.state.mode},r.saveMenuInstance=function(e){r.menuInstance=e},r.addKeyPath=function(e){return Object(K.a)(Object(K.a)({},e),{},{keyPath:(e.keyPath||[]).concat(r.props.eventKey)})},r.triggerOpenChange=function(e,t){var n=r.props.eventKey,o=function(){r.onOpenChange({key:n,item:Object(H.a)(r),trigger:t,open:e})};"mouseenter"===t?r.mouseenterTimeout=setTimeout((function(){o()}),0):o()},r.isChildrenSelected=function(){var e={find:!1};return function e(t,n,r){t&&!r.find&&o.Children.forEach(t,(function(t){if(t){var o=t.type;if(!o||!(o.isSubMenu||o.isMenuItem||o.isMenuItemGroup))return;-1!==n.indexOf(t.key)?r.find=!0:t.props.children&&e(t.props.children,n,r)}}))}(r.props.children,r.props.selectedKeys,e),e.find},r.isInlineMode=function(){return"inline"===r.getMode()},r.adjustWidth=function(){if(r.subMenuTitle&&r.menuInstance){var e=J.findDOMNode(r.menuInstance);e.offsetWidth>=r.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(r.subMenuTitle.offsetWidth,"px"))}},r.saveSubMenuTitle=function(e){r.subMenuTitle=e},r.getBaseProps=function(){var e=Object(H.a)(r).props,t=r.getMode();return{mode:"horizontal"===t?"vertical":t,visible:r.getVisible(),level:e.level+1,inlineIndent:e.inlineIndent,focusable:!1,onClick:r.onSubMenuClick,onSelect:r.onSelect,onDeselect:r.onDeselect,onDestroy:r.onDestroy,selectedKeys:e.selectedKeys,eventKey:"".concat(e.eventKey,"-menu-"),openKeys:e.openKeys,motion:e.motion,onOpenChange:r.onOpenChange,subMenuOpenDelay:e.subMenuOpenDelay,parentMenu:Object(H.a)(r),subMenuCloseDelay:e.subMenuCloseDelay,forceSubMenuRender:e.forceSubMenuRender,triggerSubMenuAction:e.triggerSubMenuAction,builtinPlacements:e.builtinPlacements,defaultActiveFirst:e.store.getState().defaultActiveFirst[Fi(e.eventKey)],multiple:e.multiple,prefixCls:e.rootPrefixCls,id:r.internalMenuId,manualRef:r.saveMenuInstance,itemIcon:e.itemIcon,expandIcon:e.expandIcon,direction:e.direction}},r.getMotion=function(e,t){var n=Object(H.a)(r).haveRendered,o=r.props,a=o.motion,i=o.rootPrefixCls;return Object(K.a)(Object(K.a)({},a),{},{leavedClassName:"".concat(i,"-hidden"),removeOnLeave:!1,motionAppear:n||!t||"inline"!==e})};var a=e.store,i=e.eventKey,c=a.getState().defaultActiveFirst;r.isRootMenu=!1;var l=!1;return c&&(l=c[i]),Zi(a,i,l),r.state={mode:e.mode,isOpen:e.isOpen},r}return Object(B.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,n=t.mode,r=t.parentMenu,o=t.manualRef,a=t.isOpen,i=function(){e.setState({mode:n,isOpen:a})},c=a!==this.state.isOpen,l=n!==this.state.mode;(l||c)&&(Z.a.cancel(this.updateStateRaf),l?this.updateStateRaf=Object(Z.a)(i):i()),o&&o(this),"horizontal"===n&&(null==r?void 0:r.isRootMenu)&&a&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,n=e.eventKey;t&&t(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),Z.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(e,t){var n=this.getBaseProps();return o.createElement(ac,Object(g.a)({},n,{id:this.internalMenuId,className:e,style:t}),this.props.children)}},{key:"renderChildren",value:function(){var e=this,t=this.getBaseProps(),n=t.mode,r=t.visible,a=t.forceSubMenuRender,i=t.direction,c=this.getMotion(n,r);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||r||a,!this.haveOpened)return o.createElement("div",null);var l=E()("".concat(t.prefixCls,"-sub"),Object(y.a)({},"".concat(t.prefixCls,"-rtl"),"rtl"===i));return this.isInlineMode()?o.createElement(ne.b,Object(g.a)({visible:t.visible},c),(function(t){var n=t.className,r=t.style,o=E()(l,n);return e.renderPopupMenu(o,r)})):this.renderPopupMenu(l)}},{key:"render",value:function(){var e,t,n,r=Object(K.a)({},this.props),a=this.getVisible(),i=this.getPrefixCls(),c=this.isInlineMode(),l=this.getMode(),s=E()(i,"".concat(i,"-").concat(l),(e={},Object(y.a)(e,r.className,!!r.className),Object(y.a)(e,this.getOpenClassName(),a),Object(y.a)(e,this.getActiveClassName(),r.active||a&&!c),Object(y.a)(e,this.getDisabledClassName(),r.disabled),Object(y.a)(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(r.eventKey?this.internalMenuId="".concat(r.eventKey,"$Menu"):(Ji+=1,this.internalMenuId="$__$".concat(Ji,"$Menu")));var u={},f={},p={};r.disabled||(u={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},f={onClick:this.onTitleClick},p={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var d={},m="rtl"===r.direction;c&&(m?d.paddingRight=r.inlineIndent*r.level:d.paddingLeft=r.inlineIndent*r.level);var v={};this.getVisible()&&(v={"aria-owns":this.internalMenuId});var h=null;"horizontal"!==l&&(h=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(h=o.createElement(this.props.expandIcon,Object(K.a)({},this.props))));var b=o.createElement("div",Object(g.a)({ref:this.saveSubMenuTitle,style:d,className:"".concat(i,"-title"),role:"button"},p,f,{"aria-expanded":a},v,{"aria-haspopup":"true",title:"string"==typeof r.title?r.title:void 0}),r.title,h||o.createElement("i",{className:"".concat(i,"-arrow")})),O=this.renderChildren(),j=(null===(t=r.parentMenu)||void 0===t?void 0:t.isRootMenu)?r.parentMenu.props.getPopupContainer:function(e){return e.parentNode},C=Gi[l],w=r.popupOffset?{offset:r.popupOffset}:{},x=E()((n={},Object(y.a)(n,r.popupClassName,r.popupClassName&&!c),Object(y.a)(n,"".concat(i,"-rtl"),m),n)),I=r.disabled,M=r.triggerSubMenuAction,N=r.subMenuOpenDelay,S=r.forceSubMenuRender,A=r.subMenuCloseDelay,k=r.builtinPlacements;Vi.forEach((function(e){return delete r[e]})),delete r.onClick;var P=m?Object(K.a)(Object(K.a)({},Wi),k):Object(K.a)(Object(K.a)({},Qi),k);delete r.direction;var T=this.getBaseProps(),D=c?null:this.getMotion(T.mode,T.visible);return o.createElement("li",Object(g.a)({},r,u,{className:s,role:"menuitem"}),o.createElement(St,{prefixCls:i,popupClassName:E()("".concat(i,"-popup"),x),getPopupContainer:j,builtinPlacements:P,popupPlacement:C,popupVisible:!c&&a,popupAlign:w,popup:c?null:O,action:I||c?[]:[M],mouseEnterDelay:N,mouseLeaveDelay:A,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:S,popupMotion:D},b),c?O:null)}}]),n}(o.Component);Yi.defaultProps={onMouseEnter:zi,onMouseLeave:zi,onTitleMouseEnter:zi,onTitleMouseLeave:zi,onTitleClick:zi,manualRef:zi,mode:"vertical",title:""};var qi=hi((function(e,t){var n=e.openKeys,r=e.activeKey,o=e.selectedKeys,a=t.eventKey,i=t.subMenuKey;return{isOpen:n.indexOf(a)>-1,active:r[i]===a,selectedKeys:o}}))(Yi);qi.isSubMenu=!0;var Xi=qi,_i=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(){var e;return Object(U.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.mutationObserver=null,e.originalTotalWidth=0,e.overflowedItems=[],e.menuItemSizes=[],e.cancelFrameId=null,e.state={lastVisibleIndex:void 0},e.childRef=o.createRef(),e.getMenuItemNodes=function(){var t=e.props.prefixCls,n=e.childRef.current;return n?[].slice.call(n.children).filter((function(e){return e.className.split(" ").indexOf("".concat(t,"-overflowed-submenu"))<0})):[]},e.getOverflowedSubMenuItem=function(t,n,r){var a=e.props,i=a.overflowedIndicator,c=a.level,l=a.mode,s=a.prefixCls,u=a.theme;if(1!==c||"horizontal"!==l)return null;var f=e.props.children[0].props,p=(f.children,f.title,f.style),d=Object(V.a)(f,["children","title","style"]),m=Object(K.a)({},p),v="".concat(t,"-overflowed-indicator"),h="".concat(t,"-overflowed-indicator");0===n.length&&!0!==r?m=Object(K.a)(Object(K.a)({},m),{},{display:"none"}):r&&(m=Object(K.a)(Object(K.a)({},m),{},{visibility:"hidden",position:"absolute"}),v="".concat(v,"-placeholder"),h="".concat(h,"-placeholder"));var b=u?"".concat(s,"-").concat(u):"",y={};return Vi.forEach((function(e){void 0!==d[e]&&(y[e]=d[e])})),o.createElement(Xi,Object(g.a)({title:i,className:"".concat(s,"-overflowed-submenu"),popupClassName:b},y,{key:v,eventKey:h,disabled:!1,style:m}),n)},e.setChildrenWidthAndResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=t.children;if(n&&0!==n.length){var r=t.children[n.length-1];Bi(r,"display","inline-block");var o=e.getMenuItemNodes(),a=o.filter((function(e){return e.className.split(" ").indexOf("menuitem-overflowed")>=0}));a.forEach((function(e){Bi(e,"display","inline-block")})),e.menuItemSizes=o.map((function(e){return Ui(e,!0)})),a.forEach((function(e){Bi(e,"display","none")})),e.overflowedIndicatorWidth=Ui(t.children[t.children.length-1],!0),e.originalTotalWidth=e.menuItemSizes.reduce((function(e,t){return e+t}),0),e.handleResize(),Bi(r,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=Ui(t);e.overflowedItems=[];var r,o=0;e.originalTotalWidth>n+.5&&(r=-1,e.menuItemSizes.forEach((function(t){(o+=t)+e.overflowedIndicatorWidth<=n&&(r+=1)}))),e.setState({lastVisibleIndex:r})}}},e}return Object(B.a)(n,[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=this.childRef.current;if(!t)return;this.resizeObserver=new it.a((function(t){t.forEach((function(){var t=e.cancelFrameId;cancelAnimationFrame(t),e.cancelFrameId=requestAnimationFrame(e.setChildrenWidthAndResize)}))})),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),e.setChildrenWidthAndResize()})),this.mutationObserver.observe(t,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce((function(r,a,i){var c=a;if("horizontal"===t.props.mode){var l=t.getOverflowedSubMenuItem(a.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(i>n&&(c=o.cloneElement(a,{style:{display:"none"},eventKey:"".concat(a.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),i===n+1&&(t.overflowedItems=e.slice(n+1).map((function(e){return o.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})})),l=t.getOverflowedSubMenuItem(a.props.eventKey,t.overflowedItems)));var s=[].concat(Object(cn.a)(r),[l,c]);return i===e.length-1&&s.push(t.getOverflowedSubMenuItem(a.props.eventKey,[],!0)),s}return[].concat(Object(cn.a)(r),[c])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),n=e.children,r=(e.theme,Object(V.a)(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),a=t;return o.createElement(a,Object(g.a)({ref:this.childRef},r),this.renderChildren(n))}}]),n}(o.Component);_i.defaultProps={tag:"div",className:""};var $i=_i;function ec(e,t,n){var r=e.getState();e.setState({activeKey:Object(K.a)(Object(K.a)({},r.activeKey),{},Object(y.a)({},t,n))})}function tc(e){return e.eventKey||"0-menu-"}function nc(e,t){var n,r=t,o=e.children,a=e.eventKey;if(r&&(Ki(o,(function(e,t){e&&e.props&&!e.props.disabled&&r===Li(e,a,t)&&(n=!0)})),n))return r;return r=null,e.defaultActiveFirst?(Ki(o,(function(e,t){r||!e||e.props.disabled||(r=Li(e,a,t))})),r):r}function rc(e){if(e){var t=this.instanceArray.indexOf(e);-1!==t?this.instanceArray[t]=e:this.instanceArray.push(e)}}var oc=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(e){var r;return Object(U.a)(this,n),(r=t.call(this,e)).onKeyDown=function(e,t){var n,o=e.keyCode;if(r.getFlatInstanceArray().forEach((function(t){t&&t.props.active&&t.onKeyDown&&(n=t.onKeyDown(e))})),n)return 1;var a=null;return o!==En.UP&&o!==En.DOWN||(a=r.step(o===En.UP?-1:1)),a?(e.preventDefault(),ec(r.props.store,tc(r.props),a.props.eventKey),"function"==typeof t&&t(a),1):void 0},r.onItemHover=function(e){var t=e.key,n=e.hover;ec(r.props.store,tc(r.props),n?t:null)},r.onDeselect=function(e){r.props.onDeselect(e)},r.onSelect=function(e){r.props.onSelect(e)},r.onClick=function(e){r.props.onClick(e)},r.onOpenChange=function(e){r.props.onOpenChange(e)},r.onDestroy=function(e){r.props.onDestroy(e)},r.getFlatInstanceArray=function(){return r.instanceArray},r.step=function(e){var t=r.getFlatInstanceArray(),n=r.props.store.getState().activeKey[tc(r.props)],o=t.length;if(!o)return null;e<0&&(t=t.concat().reverse());var a=-1;if(t.every((function(e,t){return!e||e.props.eventKey!==n||(a=t,!1)})),r.props.defaultActiveFirst||-1===a||(i=t.slice(a,o-1)).length&&!i.every((function(e){return!!e.props.disabled}))){var i,c=(a+1)%o,l=c;do{var s=t[l];if(s&&!s.props.disabled)return s;l=(l+1)%o}while(l!==c);return null}},r.renderCommonMenuItem=function(e,t,n){var a=r.props.store.getState(),i=Object(H.a)(r).props,c=Li(e,i.eventKey,t),l=e.props;if(!l||"string"==typeof e.type)return e;var s=c===a.activeKey,u=Object(K.a)(Object(K.a)({mode:l.mode||i.mode,level:i.level,inlineIndent:i.inlineIndent,renderMenuItem:r.renderMenuItem,rootPrefixCls:i.prefixCls,index:t,parentMenu:i.parentMenu,manualRef:l.disabled?void 0:gi(e.ref,rc.bind(Object(H.a)(r))),eventKey:c,active:!l.disabled&&s,multiple:i.multiple,onClick:function(e){(l.onClick||zi)(e),r.onClick(e)},onItemHover:r.onItemHover,motion:i.motion,subMenuOpenDelay:i.subMenuOpenDelay,subMenuCloseDelay:i.subMenuCloseDelay,forceSubMenuRender:i.forceSubMenuRender,onOpenChange:r.onOpenChange,onDeselect:r.onDeselect,onSelect:r.onSelect,builtinPlacements:i.builtinPlacements,itemIcon:l.itemIcon||r.props.itemIcon,expandIcon:l.expandIcon||r.props.expandIcon},n),{},{direction:i.direction});return("inline"===i.mode||Ri.any)&&(u.triggerSubMenuAction="click"),o.cloneElement(e,Object(K.a)(Object(K.a)({},u),{},{key:c||t}))},r.renderMenuItem=function(e,t,n){if(!e)return null;var o=r.props.store.getState(),a={openKeys:o.openKeys,selectedKeys:o.selectedKeys,triggerSubMenuAction:r.props.triggerSubMenuAction,subMenuKey:n};return r.renderCommonMenuItem(e,t,a)},e.store.setState({activeKey:Object(K.a)(Object(K.a)({},e.store.getState().activeKey),{},Object(y.a)({},e.eventKey,nc(e,e.activeKey)))}),r.instanceArray=[],r}return Object(B.a)(n,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.visible||e.visible||this.props.className!==e.className||!ui()(this.props.style,e.style)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n="activeKey"in t?t.activeKey:t.store.getState().activeKey[tc(t)],r=nc(t,n);if(r!==n)ec(t.store,tc(t),r);else if("activeKey"in e){r!==nc(e,e.activeKey)&&ec(t.store,tc(t),r)}}},{key:"render",value:function(){var e=this,t=Object(g.a)({},this.props);this.instanceArray=[];var n={className:E()(t.prefixCls,t.className,"".concat(t.prefixCls,"-").concat(t.mode)),role:t.role||"menu"};t.id&&(n.id=t.id),t.focusable&&(n.tabIndex=0,n.onKeyDown=this.onKeyDown);var r=t.prefixCls,a=t.eventKey,i=t.visible,c=t.level,l=t.mode,s=t.overflowedIndicator,u=t.theme;return Vi.forEach((function(e){return delete t[e]})),delete t.onClick,o.createElement($i,Object(g.a)({},t,{prefixCls:r,mode:l,tag:"ul",level:c,theme:u,visible:i,overflowedIndicator:s},n),Object(L.a)(t.children).map((function(t,n){return e.renderMenuItem(t,n,a||"0-menu-")})))}}]),n}(o.Component);oc.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:zi};var ac=hi()(oc);function ic(e,t,n){var r=e.prefixCls,o=e.motion,a=e.defaultMotions,i=void 0===a?{}:a,c=e.openAnimation,l=e.openTransitionName,s=t.switchingModeFromInline;if(o)return o;if("object"===Object(O.a)(c)&&c)Object(Jo.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"==typeof c)return{motionName:"".concat(r,"-open-").concat(c)};if(l)return{motionName:l};var u=i[n];return u||(s?null:i.other)}var cc=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(e){var r;Object(U.a)(this,n),(r=t.call(this,e)).onSelect=function(e){var t=Object(H.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys,o=e.key;n=t.multiple?n.concat([o]):[o],"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onSelect(Object(K.a)(Object(K.a)({},e),{},{selectedKeys:n}))}},r.onClick=function(e){var t=r.getRealMenuMode(),n=Object(H.a)(r),o=n.store,a=n.props.onOpenChange;"inline"===t||"openKeys"in r.props||(o.setState({openKeys:[]}),a([])),r.props.onClick(e)},r.onKeyDown=function(e,t){r.innerMenu.getWrappedInstance().onKeyDown(e,t)},r.onOpenChange=function(e){var t=Object(H.a)(r).props,n=r.store.getState().openKeys.concat(),o=!1,a=function(e){var t=!1;if(e.open)(t=-1===n.indexOf(e.key))&&n.push(e.key);else{var r=n.indexOf(e.key);(t=-1!==r)&&n.splice(r,1)}o=o||t};Array.isArray(e)?e.forEach(a):a(e),o&&("openKeys"in r.props||r.store.setState({openKeys:n}),t.onOpenChange(n))},r.onDeselect=function(e){var t=Object(H.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys.concat(),o=e.key,a=n.indexOf(o);-1!==a&&n.splice(a,1),"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onDeselect(Object(K.a)(Object(K.a)({},e),{},{selectedKeys:n}))}},r.onMouseEnter=function(e){r.restoreModeVerticalFromInline();var t=r.props.onMouseEnter;t&&t(e)},r.onTransitionEnd=function(e){var t="width"===e.propertyName&&e.target===e.currentTarget,n=e.target.className,o="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,a="font-size"===e.propertyName&&o.indexOf("anticon")>=0;(t||a)&&r.restoreModeVerticalFromInline()},r.setInnerMenu=function(e){r.innerMenu=e},r.isRootMenu=!0;var o,a,i,c=e.defaultSelectedKeys,l=e.defaultOpenKeys;return"selectedKeys"in e&&(c=e.selectedKeys||[]),"openKeys"in e&&(l=e.openKeys||[]),r.store=(o={selectedKeys:c,openKeys:l,activeKey:{"0-menu-":nc(e,e.activeKey)}},a=o,i=[],{setState:function(e){a=bi(bi({},a),e);for(var t=0;t<i.length;t++)i[t]()},getState:function(){return a},subscribe:function(e){return i.push(e),function(){var t=i.indexOf(e);i.splice(t,1)}}}),r.state={switchingModeFromInline:!1,prevProps:e,inlineOpenKeys:[],store:r.store},r}return Object(B.a)(n,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.siderCollapsed,r=t.inlineCollapsed,o=t.onOpenChange;(!e.inlineCollapsed&&r||!e.siderCollapsed&&n)&&o([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var e=this.props.collapsedWidth,t=this.store,n=this.prevOpenKeys;this.getInlineCollapsed()&&(0===e||"0"===e||"0px"===e)?(this.prevOpenKeys=t.getState().openKeys.concat(),this.store.setState({openKeys:[]})):n&&(this.store.setState({openKeys:n}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var e=this.props.mode,t=this.state.switchingModeFromInline,n=this.getInlineCollapsed();return t&&n?"inline":n?"vertical":e}},{key:"getInlineCollapsed",value:function(){var e=this.props,t=e.inlineCollapsed,n=e.siderCollapsed;return void 0!==n?n:t}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var e=Object(K.a)({},Object(an.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),t=this.getRealMenuMode();return e.className+=" ".concat(e.prefixCls,"-root"),"rtl"===e.direction&&(e.className+=" ".concat(e.prefixCls,"-rtl")),delete(e=Object(K.a)(Object(K.a)({},e),{},{mode:t,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:ic(this.props,this.state,t)})).openAnimation,delete e.openTransitionName,o.createElement(li,{store:this.store},o.createElement(ac,Object(g.a)({},e,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.store,o=r.getState(),a={},i={prevProps:e};return"inline"===n.mode&&"inline"!==e.mode&&(i.switchingModeFromInline=!0),"openKeys"in e?a.openKeys=e.openKeys||[]:((e.inlineCollapsed&&!n.inlineCollapsed||e.siderCollapsed&&!n.siderCollapsed)&&(i.switchingModeFromInline=!0,i.inlineOpenKeys=o.openKeys,a.openKeys=[]),(!e.inlineCollapsed&&n.inlineCollapsed||!e.siderCollapsed&&n.siderCollapsed)&&(a.openKeys=t.inlineOpenKeys,i.inlineOpenKeys=[])),Object.keys(a).length&&r.setState(a),i}}]),n}(o.Component);cc.defaultProps={selectable:!0,onClick:zi,onSelect:zi,onOpenChange:zi,onDeselect:zi,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:o.createElement("span",null,"···")};var lc=cc,sc=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(){var e;return Object(U.a)(this,n),(e=t.apply(this,arguments)).onKeyDown=function(t){if(t.keyCode===En.ENTER)return e.onClick(t),!0},e.onMouseLeave=function(t){var n=e.props,r=n.eventKey,o=n.onItemHover,a=n.onMouseLeave;o({key:r,hover:!1}),a({key:r,domEvent:t})},e.onMouseEnter=function(t){var n=e.props,r=n.eventKey,o=n.onItemHover,a=n.onMouseEnter;o({key:r,hover:!0}),a({key:r,domEvent:t})},e.onClick=function(t){var n=e.props,r=n.eventKey,o=n.multiple,a=n.onClick,i=n.onSelect,c=n.onDeselect,l=n.isSelected,s={key:r,keyPath:[r],item:Object(H.a)(e),domEvent:t};a(s),o?l?c(s):i(s):l||i(s)},e.saveNode=function(t){e.node=t},e}return Object(B.a)(n,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var e=this.props;e.onDestroy&&e.onDestroy(e.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var e,t=Object(K.a)({},this.props),n=E()(this.getPrefixCls(),t.className,(e={},Object(y.a)(e,this.getActiveClassName(),!t.disabled&&t.active),Object(y.a)(e,this.getSelectedClassName(),t.isSelected),Object(y.a)(e,this.getDisabledClassName(),t.disabled),e)),r=Object(K.a)(Object(K.a)({},t.attribute),{},{title:"string"==typeof t.title?t.title:void 0,className:n,role:t.role||"menuitem","aria-disabled":t.disabled});"option"===t.role?r=Object(K.a)(Object(K.a)({},r),{},{role:"option","aria-selected":t.isSelected}):null!==t.role&&"none"!==t.role||(r.role="none");var a={onClick:t.disabled?null:this.onClick,onMouseLeave:t.disabled?null:this.onMouseLeave,onMouseEnter:t.disabled?null:this.onMouseEnter},i=Object(K.a)({},t.style);"inline"===t.mode&&("rtl"===t.direction?i.paddingRight=t.inlineIndent*t.level:i.paddingLeft=t.inlineIndent*t.level),Vi.forEach((function(e){return delete t[e]})),delete t.direction;var c=this.props.itemIcon;return"function"==typeof this.props.itemIcon&&(c=o.createElement(this.props.itemIcon,this.props)),o.createElement("li",Object(g.a)({},Object(an.a)(t,["onClick","onMouseEnter","onMouseLeave","onSelect"]),r,a,{style:i,ref:this.saveNode}),t.children,c)}}]),n}(o.Component);sc.isMenuItem=!0,sc.defaultProps={onSelect:zi,onMouseEnter:zi,onMouseLeave:zi,manualRef:zi};var uc=hi((function(e,t){var n=e.activeKey,r=e.selectedKeys,o=t.eventKey;return{active:n[t.subMenuKey]===o,isSelected:Array.isArray(r)?-1!==r.indexOf(o):r===o}}))(sc),fc=function(e){Object(Q.a)(n,e);var t=Object(W.a)(n);function n(){var e;return Object(U.a)(this,n),(e=t.apply(this,arguments)).renderInnerMenuItem=function(t){var n=e.props;return(0,n.renderMenuItem)(t,n.index,e.props.subMenuKey)},e}return Object(B.a)(n,[{key:"render",value:function(){var e=Object(g.a)({},this.props),t=e.className,n=void 0===t?"":t,r=e.rootPrefixCls,a="".concat(r,"-item-group-title"),i="".concat(r,"-item-group-list"),c=e.title,l=e.children;return Vi.forEach((function(t){return delete e[t]})),delete e.onClick,delete e.direction,o.createElement("li",Object(g.a)({},e,{className:"".concat(n," ").concat(r,"-item-group")}),o.createElement("div",{className:a,title:"string"==typeof c?c:void 0},c),o.createElement("ul",{className:i},o.Children.map(l,this.renderInnerMenuItem)))}}]),n}(o.Component);fc.isMenuItemGroup=!0,fc.defaultProps={disabled:!0};var pc=function(e){var t=e.className,n=e.rootPrefixCls,r=e.style;return o.createElement("li",{className:"".concat(t," ").concat(n,"-item-divider"),style:r})};pc.defaultProps={disabled:!0,className:"",style:{}};var dc=lc,mc={adjustX:1,adjustY:1},vc=[0,0],hc={topLeft:{points:["bl","tl"],overflow:mc,offset:[0,-4],targetOffset:vc},topCenter:{points:["bc","tc"],overflow:mc,offset:[0,-4],targetOffset:vc},topRight:{points:["br","tr"],overflow:mc,offset:[0,-4],targetOffset:vc},bottomLeft:{points:["tl","bl"],overflow:mc,offset:[0,4],targetOffset:vc},bottomCenter:{points:["tc","bc"],overflow:mc,offset:[0,4],targetOffset:vc},bottomRight:{points:["tr","br"],overflow:mc,offset:[0,4],targetOffset:vc}};var bc=o.forwardRef((function(e,t){var n=e.arrow,r=void 0!==n&&n,a=e.prefixCls,i=void 0===a?"rc-dropdown":a,c=e.transitionName,l=e.animation,s=e.align,u=e.placement,f=void 0===u?"bottomLeft":u,p=e.placements,d=void 0===p?hc:p,m=e.getPopupContainer,v=e.showAction,h=e.hideAction,b=e.overlayClassName,g=e.overlayStyle,O=e.visible,C=e.trigger,w=void 0===C?["hover"]:C,x=Object(V.a)(e,["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger"]),I=o.useState(),M=Object(j.a)(I,2),N=M[0],S=M[1],A="visible"in e?O:N,k=o.useRef(null);o.useImperativeHandle(t,(function(){return k.current}));var P,T,D,R,z,L,F=function(){var t=e.overlay;return"function"==typeof t?t():t},K=function(t){var n=e.onOverlayClick,r=F().props;S(!1),n&&n(t),r.onClick&&r.onClick(t)},U=function(){var e=F(),t={prefixCls:"".concat(i,"-menu"),onClick:K};return"string"==typeof e.type&&delete t.prefixCls,o.createElement(o.Fragment,null,r&&o.createElement("div",{className:"".concat(i,"-arrow")}),o.cloneElement(e,t))},B=h;return B||-1===w.indexOf("contextMenu")||(B=["click"]),o.createElement(St,Object.assign({},x,{prefixCls:i,ref:k,popupClassName:E()(b,Object(y.a)({},"".concat(i,"-show-arrow"),r)),popupStyle:g,builtinPlacements:d,action:w,showAction:v,hideAction:B||[],popupPlacement:f,popupAlign:s,popupTransitionName:c,popupAnimation:l,popupVisible:A,stretch:(z=e.minOverlayWidthMatchTrigger,L=e.alignPoint,("minOverlayWidthMatchTrigger"in e?z:!L)?"minWidth":""),popup:"function"==typeof e.overlay?U:U(),onPopupVisibleChange:function(t){var n=e.onVisibleChange;S(t),"function"==typeof n&&n(t)},getPopupContainer:m}),(T=e.children,D=T.props?T.props:{},R=E()(D.className,void 0!==(P=e.openClassName)?P:"".concat(i,"-open")),N&&T?o.cloneElement(T,{className:R}):T))}));function gc(e,t){var n=e.prefixCls,r=e.editable,a=e.locale,i=e.style;return r&&!1!==r.showAdd?o.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:i,"aria-label":(null==a?void 0:a.addAriaLabel)||"Add tab",onClick:function(e){r.onEdit("add",{event:e})}},r.addIcon||"+"):null}var yc=o.forwardRef(gc);function Oc(e,t){var n=e.prefixCls,r=e.id,a=e.tabs,i=e.locale,c=e.mobile,l=e.moreIcon,s=void 0===l?"More":l,u=e.moreTransitionName,f=e.style,p=e.className,d=e.editable,m=e.tabBarGutter,v=e.rtl,h=e.onTabClick,b=Object(o.useState)(!1),g=Object(j.a)(b,2),O=g[0],C=g[1],w=Object(o.useState)(null),x=Object(j.a)(w,2),I=x[0],M=x[1],N="".concat(r,"-more-popup"),S="".concat(n,"-dropdown"),A=null!==I?"".concat(N,"-").concat(I):null,k=null==i?void 0:i.dropdownAriaLabel,P=o.createElement(dc,{onClick:function(e){var t=e.key,n=e.domEvent;h(t,n),C(!1)},id:N,tabIndex:-1,role:"listbox","aria-activedescendant":A,selectedKeys:[I],"aria-label":void 0!==k?k:"expanded dropdown"},a.map((function(e){return o.createElement(uc,{key:e.key,id:"".concat(N,"-").concat(e.key),role:"option","aria-controls":r&&"".concat(r,"-panel-").concat(e.key),disabled:e.disabled},e.tab)})));function T(e){for(var t=a.filter((function(e){return!e.disabled})),n=t.findIndex((function(e){return e.key===I}))||0,r=t.length,o=0;o<r;o+=1){var i=t[n=(n+e+r)%r];if(!i.disabled)return void M(i.key)}}Object(o.useEffect)((function(){var e=document.getElementById(A);e&&e.scrollIntoView&&e.scrollIntoView(!1)}),[I]),Object(o.useEffect)((function(){O||M(null)}),[O]);var D=Object(y.a)({},v?"marginLeft":"marginRight",m);a.length||(D.visibility="hidden",D.order=1);var R=E()(Object(y.a)({},"".concat(S,"-rtl"),v)),z=c?null:o.createElement(bc,{prefixCls:S,overlay:P,trigger:["hover"],visible:O,transitionName:u,onVisibleChange:C,overlayClassName:R,mouseEnterDelay:.1,mouseLeaveDelay:.1},o.createElement("button",{type:"button",className:"".concat(n,"-nav-more"),style:D,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":N,id:"".concat(r,"-more"),"aria-expanded":O,onKeyDown:function(e){var t=e.which;if(O)switch(t){case En.UP:T(-1),e.preventDefault();break;case En.DOWN:T(1),e.preventDefault();break;case En.ESC:C(!1);break;case En.SPACE:case En.ENTER:null!==I&&h(I,e)}else[En.DOWN,En.SPACE,En.ENTER].includes(t)&&(C(!0),e.preventDefault())}},s));return o.createElement("div",{className:E()("".concat(n,"-nav-operations"),p),style:f,ref:t},z,o.createElement(yc,{prefixCls:n,locale:i,editable:d}))}var jc=o.forwardRef(Oc),Cc=Object(o.createContext)(null),Ec=Math.pow(.995,20);function wc(e,t){var n=o.useRef(e),r=o.useState({}),a=Object(j.a)(r,2)[1];return[n.current,function(e){var r="function"==typeof e?e(n.current):e;r!==n.current&&t(r,n.current),n.current=r,a({})}]}var xc=function(e){var t,n=e.position,r=e.prefixCls,a=e.extra;if(!a)return null;var i=a;return"right"===n&&(t=i.right||!i.left&&i||null),"left"===n&&(t=i.left||null),t?o.createElement("div",{className:"".concat(r,"-extra-content")},t):null};function Ic(e,t){var n,r,a=o.useContext(Cc),i=a.prefixCls,c=a.tabs,l=e.className,s=e.style,u=e.id,f=e.animated,p=e.activeKey,d=e.rtl,m=e.extra,v=e.editable,h=e.locale,b=e.tabPosition,O=e.tabBarGutter,C=e.children,x=e.onTabClick,I=e.onTabScroll,M=Object(o.useRef)(),N=Object(o.useRef)(),S=Object(o.useRef)(),A=Object(o.useRef)(),k=(r=Object(o.useRef)(new Map),[function(e){return r.current.has(e)||r.current.set(e,o.createRef()),r.current.get(e)},function(e){r.current.delete(e)}]),P=Object(j.a)(k,2),T=P[0],D=P[1],R="top"===b||"bottom"===b,z=wc(0,(function(e,t){R&&I&&I({direction:e>t?"left":"right"})})),L=Object(j.a)(z,2),F=L[0],V=L[1],U=wc(0,(function(e,t){!R&&I&&I({direction:e>t?"top":"bottom"})})),B=Object(j.a)(U,2),H=B[0],Q=B[1],W=Object(o.useState)(0),J=Object(j.a)(W,2),G=J[0],Y=J[1],q=Object(o.useState)(0),X=Object(j.a)(q,2),_=X[0],$=X[1],ee=Object(o.useState)(0),te=Object(j.a)(ee,2),ne=te[0],re=te[1],oe=Object(o.useState)(0),ae=Object(j.a)(oe,2),ie=ae[0],ce=ae[1],le=Object(o.useState)(null),se=Object(j.a)(le,2),ue=se[0],fe=se[1],pe=Object(o.useState)(null),de=Object(j.a)(pe,2),me=de[0],ve=de[1],he=Object(o.useState)(0),be=Object(j.a)(he,2),ge=be[0],ye=be[1],Oe=Object(o.useState)(0),je=Object(j.a)(Oe,2),Ce=je[0],Ee=je[1],we=function(e){var t=Object(o.useRef)([]),n=Object(o.useState)({}),r=Object(j.a)(n,2)[1],a=Object(o.useRef)("function"==typeof e?e():e),i=ei((function(){var e=a.current;t.current.forEach((function(t){e=t(e)})),t.current=[],a.current=e,r({})}));return[a.current,function(e){t.current.push(e),i()}]}(new Map),xe=Object(j.a)(we,2),Ie=xe[0],Me=xe[1],Ne=function(e,t,n){return Object(o.useMemo)((function(){for(var n,r=new Map,o=t.get(null===(n=e[0])||void 0===n?void 0:n.key)||ri,a=o.left+o.width,i=0;i<e.length;i+=1){var c,l=e[i].key,s=t.get(l);if(!s)s=t.get(null===(c=e[i-1])||void 0===c?void 0:c.key)||ri;var u=r.get(l)||Object(K.a)({},s);u.right=a-u.left-u.width,r.set(l,u)}return r}),[e.map((function(e){return e.key})).join("_"),t,n])}(c,Ie,G),Se="".concat(i,"-nav-operations-hidden"),Ae=0,ke=0;function Pe(e){return e<Ae?Ae:e>ke?ke:e}R?d?(Ae=0,ke=Math.max(0,G-ue)):(Ae=Math.min(0,ue-G),ke=0):(Ae=Math.min(0,me-_),ke=0);var Te=Object(o.useRef)(),De=Object(o.useState)(),Re=Object(j.a)(De,2),ze=Re[0],Le=Re[1];function Fe(){Le(Date.now())}function Ke(){window.clearTimeout(Te.current)}function Ve(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,t=Ne.get(e)||{width:0,height:0,left:0,right:0,top:0};if(R){var n=F;d?t.right<F?n=t.right:t.right+t.width>F+ue&&(n=t.right+t.width-ue):t.left<-F?n=-t.left:t.left+t.width>-F+ue&&(n=-(t.left+t.width-ue)),Q(0),V(Pe(n))}else{var r=H;t.top<-H?r=-t.top:t.top+t.height>-H+me&&(r=-(t.top+t.height-me)),V(0),Q(Pe(r))}}!function(e,t){var n=Object(o.useState)(),r=Object(j.a)(n,2),a=r[0],i=r[1],c=Object(o.useState)(0),l=Object(j.a)(c,2),s=l[0],u=l[1],f=Object(o.useState)(0),p=Object(j.a)(f,2),d=p[0],m=p[1],v=Object(o.useState)(),h=Object(j.a)(v,2),b=h[0],g=h[1],y=Object(o.useRef)(),O=Object(o.useRef)(),C=Object(o.useRef)(null);C.current={onTouchStart:function(e){var t=e.touches[0],n=t.screenX,r=t.screenY;i({x:n,y:r}),window.clearInterval(y.current)},onTouchMove:function(e){if(a){e.preventDefault();var n=e.touches[0],r=n.screenX,o=n.screenY;i({x:r,y:o});var c=r-a.x,l=o-a.y;t(c,l);var f=Date.now();u(f),m(f-s),g({x:c,y:l})}},onTouchEnd:function(){if(a&&(i(null),g(null),b)){var e=b.x/d,n=b.y/d,r=Math.abs(e),o=Math.abs(n);if(Math.max(r,o)<.1)return;var c=e,l=n;y.current=window.setInterval((function(){Math.abs(c)<.01&&Math.abs(l)<.01?window.clearInterval(y.current):t(20*(c*=Ec),20*(l*=Ec))}),20)}},onWheel:function(e){var n=e.deltaX,r=e.deltaY,o=0,a=Math.abs(n),i=Math.abs(r);a===i?o="x"===O.current?n:r:a>i?(o=n,O.current="x"):(o=r,O.current="y"),t(-o,-o)&&e.preventDefault()}},o.useEffect((function(){function t(e){C.current.onTouchMove(e)}function n(e){C.current.onTouchEnd(e)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",n,{passive:!1}),e.current.addEventListener("touchstart",(function(e){C.current.onTouchStart(e)}),{passive:!1}),e.current.addEventListener("wheel",(function(e){C.current.onWheel(e)})),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",n)}}),[])}(M,(function(e,t){function n(e,t){e((function(e){return Pe(e+t)}))}if(R){if(ue>=G)return!1;n(V,e)}else{if(me>=_)return!1;n(Q,t)}return Ke(),Fe(),!0})),Object(o.useEffect)((function(){return Ke(),ze&&(Te.current=window.setTimeout((function(){Le(0)}),100)),Ke}),[ze]);var Ue=function(e,t,n,r,a){var i,c,l,s=a.tabs,u=a.tabPosition,f=a.rtl;["top","bottom"].includes(u)?(i="width",c=f?"right":"left",l=Math.abs(t.left)):(i="height",c="top",l=-t.top);var p=t[i],d=n[i],m=r[i],v=p;return d+m>p&&(v=p-m),Object(o.useMemo)((function(){if(!s.length)return[0,0];for(var t=s.length,n=t,r=0;r<t;r+=1){var o=e.get(s[r].key)||oi;if(o[c]+o[i]>l+v){n=r-1;break}}for(var a=0,u=t-1;u>=0;u-=1){if((e.get(s[u].key)||oi)[c]<l){a=u+1;break}}return[a,n]}),[e,l,v,u,s.map((function(e){return e.key})).join("_"),f])}(Ne,{width:ue,height:me,left:F,top:H},{width:ne,height:ie},{width:ge,height:Ce},Object(K.a)(Object(K.a)({},e),{},{tabs:c})),Be=Object(j.a)(Ue,2),He=Be[0],Qe=Be[1],We=c.map((function(e){var t=e.key;return o.createElement(ni,{id:u,prefixCls:i,key:t,rtl:d,tab:e,closable:e.closable,editable:v,active:t===p,tabPosition:b,tabBarGutter:O,renderWrapper:C,removeAriaLabel:null==h?void 0:h.removeAriaLabel,ref:T(t),onClick:function(e){x(t,e)},onRemove:function(){D(t)},onFocus:function(){Ve(t),Fe(),d||(M.current.scrollLeft=0),M.current.scrollTop=0}})})),Je=ei((function(){var e,t,n,r,o,a,i,l,s,u=(null===(e=M.current)||void 0===e?void 0:e.offsetWidth)||0,f=(null===(t=M.current)||void 0===t?void 0:t.offsetHeight)||0,p=(null===(n=A.current)||void 0===n?void 0:n.offsetWidth)||0,d=(null===(r=A.current)||void 0===r?void 0:r.offsetHeight)||0,m=(null===(o=S.current)||void 0===o?void 0:o.offsetWidth)||0,v=(null===(a=S.current)||void 0===a?void 0:a.offsetHeight)||0;fe(u),ve(f),ye(p),Ee(d);var h=((null===(i=N.current)||void 0===i?void 0:i.offsetWidth)||0)-p,b=((null===(l=N.current)||void 0===l?void 0:l.offsetHeight)||0)-d;Y(h),$(b);var g=null===(s=S.current)||void 0===s?void 0:s.className.includes(Se);re(h-(g?0:m)),ce(b-(g?0:v)),Me((function(){var e=new Map;return c.forEach((function(t){var n=t.key,r=T(n).current;r&&e.set(n,{width:r.offsetWidth,height:r.offsetHeight,left:r.offsetLeft,top:r.offsetTop})})),e}))})),Ge=c.slice(0,He),Ze=c.slice(Qe+1),Ye=[].concat(Object(cn.a)(Ge),Object(cn.a)(Ze)),qe=Object(o.useState)(),Xe=Object(j.a)(qe,2),_e=Xe[0],$e=Xe[1],et=Ne.get(p),tt=Object(o.useRef)();function nt(){Z.a.cancel(tt.current)}Object(o.useEffect)((function(){var e={};return et&&(R?(d?e.right=et.right:e.left=et.left,e.width=et.width):(e.top=et.top,e.height=et.height)),nt(),tt.current=Object(Z.a)((function(){$e(e)})),nt}),[et,R,d]),Object(o.useEffect)((function(){Ve()}),[p,et,Ne,R]),Object(o.useEffect)((function(){Je()}),[d,O,p,c.map((function(e){return e.key})).join("_")]);var rt,ot,at,it,ct=!!Ye.length,lt="".concat(i,"-nav-wrap");return R?d?(ot=F>0,rt=F+ue<G):(rt=F<0,ot=-F+ue<G):(at=H<0,it=-H+me<_),o.createElement("div",{ref:t,role:"tablist",className:E()("".concat(i,"-nav"),l),style:s,onKeyDown:function(){Fe()}},o.createElement(xc,{position:"left",extra:m,prefixCls:i}),o.createElement(w.a,{onResize:Je},o.createElement("div",{className:E()(lt,(n={},Object(y.a)(n,"".concat(lt,"-ping-left"),rt),Object(y.a)(n,"".concat(lt,"-ping-right"),ot),Object(y.a)(n,"".concat(lt,"-ping-top"),at),Object(y.a)(n,"".concat(lt,"-ping-bottom"),it),n)),ref:M},o.createElement(w.a,{onResize:Je},o.createElement("div",{ref:N,className:"".concat(i,"-nav-list"),style:{transform:"translate(".concat(F,"px, ").concat(H,"px)"),transition:ze?"none":void 0}},We,o.createElement(yc,{ref:A,prefixCls:i,locale:h,editable:v,style:{visibility:ct?"hidden":null}}),o.createElement("div",{className:E()("".concat(i,"-ink-bar"),Object(y.a)({},"".concat(i,"-ink-bar-animated"),f.inkBar)),style:_e}))))),o.createElement(jc,Object(g.a)({},e,{ref:S,prefixCls:i,tabs:Ye,className:!ct&&Se})),o.createElement(xc,{position:"right",extra:m,prefixCls:i}))}var Mc=o.forwardRef(Ic);function Nc(e){var t=e.id,n=e.activeKey,r=e.animated,a=e.tabPosition,i=e.rtl,c=e.destroyInactiveTabPane,l=o.useContext(Cc),s=l.prefixCls,u=l.tabs,f=r.tabPane,p=u.findIndex((function(e){return e.key===n}));return o.createElement("div",{className:E()("".concat(s,"-content-holder"))},o.createElement("div",{className:E()("".concat(s,"-content"),"".concat(s,"-content-").concat(a),Object(y.a)({},"".concat(s,"-content-animated"),f)),style:p&&f?Object(y.a)({},i?"marginRight":"marginLeft","-".concat(p,"00%")):null},u.map((function(e){return o.cloneElement(e.node,{key:e.key,prefixCls:s,tabKey:e.key,id:t,animated:f,active:e.key===n,destroyInactiveTabPane:c})}))))}function Sc(e){var t=e.prefixCls,n=e.forceRender,r=e.className,a=e.style,i=e.id,c=e.active,l=e.animated,s=e.destroyInactiveTabPane,u=e.tabKey,f=e.children,p=o.useState(n),d=Object(j.a)(p,2),m=d[0],v=d[1];o.useEffect((function(){c?v(!0):s&&v(!1)}),[c,s]);var h={};return c||(l?(h.visibility="hidden",h.height=0,h.overflowY="hidden"):h.display="none"),o.createElement("div",{id:i&&"".concat(i,"-panel-").concat(u),role:"tabpanel",tabIndex:c?0:-1,"aria-labelledby":i&&"".concat(i,"-tab-").concat(u),"aria-hidden":!c,style:Object(K.a)(Object(K.a)({},h),a),className:E()("".concat(t,"-tabpane"),c&&"".concat(t,"-tabpane-active"),r)},(c||m||n)&&f)}var Ac=0;function kc(e,t){var n,r,a=e.id,i=e.prefixCls,c=void 0===i?"rc-tabs":i,l=e.className,s=e.children,u=e.direction,f=e.activeKey,p=e.defaultActiveKey,d=e.editable,m=e.animated,v=void 0===m?{inkBar:!0,tabPane:!1}:m,h=e.tabPosition,b=void 0===h?"top":h,C=e.tabBarGutter,w=e.tabBarStyle,x=e.tabBarExtraContent,I=e.locale,M=e.moreIcon,N=e.moreTransitionName,S=e.destroyInactiveTabPane,A=e.renderTabBar,k=e.onChange,P=e.onTabClick,T=e.onTabScroll,D=Object(V.a)(e,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),R=function(e){return Object(L.a)(e).map((function(e){if(o.isValidElement(e)){var t=void 0!==e.key?String(e.key):void 0;return Object(K.a)(Object(K.a)({key:t},e.props),{},{node:e})}return null})).filter((function(e){return e}))}(s),z="rtl"===u;r=!1===v?{inkBar:!1,tabPane:!1}:!0===v?{inkBar:!0,tabPane:!0}:Object(K.a)({inkBar:!0,tabPane:!1},"object"===Object(O.a)(v)?v:{});var F=Object(o.useState)(!1),U=Object(j.a)(F,2),B=U[0],H=U[1];Object(o.useEffect)((function(){H(te())}),[]);var Q=zt((function(){var e;return null===(e=R[0])||void 0===e?void 0:e.key}),{value:f,defaultValue:p}),W=Object(j.a)(Q,2),J=W[0],G=W[1],Z=Object(o.useState)((function(){return R.findIndex((function(e){return e.key===J}))})),Y=Object(j.a)(Z,2),q=Y[0],X=Y[1];Object(o.useEffect)((function(){var e,t=R.findIndex((function(e){return e.key===J}));-1===t&&(t=Math.max(0,Math.min(q,R.length-1)),G(null===(e=R[t])||void 0===e?void 0:e.key));X(t)}),[R.map((function(e){return e.key})).join("_"),J,q]);var _=zt(null,{value:a}),$=Object(j.a)(_,2),ee=$[0],ne=$[1],re=b;B&&!["left","right"].includes(b)&&(re="top"),Object(o.useEffect)((function(){a||(ne("rc-tabs-".concat(Ac)),Ac+=1)}),[]);var oe,ae={id:ee,activeKey:J,animated:r,tabPosition:re,rtl:z,mobile:B},ie=Object(K.a)(Object(K.a)({},ae),{},{editable:d,locale:I,moreIcon:M,moreTransitionName:N,tabBarGutter:C,onTabClick:function(e,t){null==P||P(e,t),G(e),null==k||k(e)},onTabScroll:T,extra:x,style:w,panes:s});return oe=A?A(ie,Mc):o.createElement(Mc,ie),o.createElement(Cc.Provider,{value:{tabs:R,prefixCls:c}},o.createElement("div",Object(g.a)({ref:t,id:a,className:E()(c,"".concat(c,"-").concat(re),(n={},Object(y.a)(n,"".concat(c,"-mobile"),B),Object(y.a)(n,"".concat(c,"-editable"),d),Object(y.a)(n,"".concat(c,"-rtl"),z),n),l)},D),oe,o.createElement(Nc,Object(g.a)({destroyInactiveTabPane:S},ae,{animated:r}))))}var Pc=o.forwardRef(kc);Pc.TabPane=Sc;var Tc=Pc,Dc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},Rc=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:Dc}))};Rc.displayName="EllipsisOutlined";var zc=o.forwardRef(Rc),Lc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},Fc=function(e,t){return o.createElement(fn.a,Object.assign({},e,{ref:t,icon:Lc}))};Fc.displayName="PlusOutlined";var Kc=o.forwardRef(Fc),Vc=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Uc(e){var t,n,r=e.type,a=e.className,i=e.size,c=e.onEdit,l=e.hideAdd,s=e.centered,u=e.addIcon,f=Vc(e,["type","className","size","onEdit","hideAdd","centered","addIcon"]),p=f.prefixCls,d=f.moreIcon,m=void 0===d?o.createElement(zc,null):d,v=o.useContext(I.b),h=v.getPrefixCls,b=v.direction,O=h("tabs",p);"editable-card"===r&&(n={onEdit:function(e,t){var n=t.key,r=t.event;null==c||c("add"===e?r:n,e)},removeIcon:o.createElement(Sa.a,null),addIcon:u||o.createElement(Kc,null),showAdd:!0!==l});var j=h();return Object(M.a)(!("onPrevClick"in f)&&!("onNextClick"in f),"Tabs","`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead."),o.createElement(Tc,Object(g.a)({direction:b,moreTransitionName:"".concat(j,"-slide-up")},f,{className:E()((t={},Object(y.a)(t,"".concat(O,"-").concat(i),i),Object(y.a)(t,"".concat(O,"-card"),["card","editable-card"].includes(r)),Object(y.a)(t,"".concat(O,"-editable-card"),"editable-card"===r),Object(y.a)(t,"".concat(O,"-centered"),s),t),a),editable:n,moreIcon:m,prefixCls:O}))}Uc.TabPane=Sc;var Bc=Uc,Hc=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};var Qc=function(e){var t,n,r,a=o.useContext(I.b),i=a.getPrefixCls,c=a.direction,u=o.useContext(Un.b),f=e.prefixCls,p=e.className,d=e.extra,m=e.headStyle,v=void 0===m?{}:m,h=e.bodyStyle,b=void 0===h?{}:h,O=e.title,j=e.loading,C=e.bordered,w=void 0===C||C,x=e.size,M=e.type,N=e.cover,S=e.actions,A=e.tabList,k=e.children,P=e.activeTabKey,T=e.defaultActiveTabKey,D=e.tabBarExtraContent,R=e.hoverable,z=e.tabProps,L=void 0===z?{}:z,F=Hc(e,["prefixCls","className","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps"]),K=i("card",f),V=0===b.padding||"0px"===b.padding?{padding:24}:void 0,U=o.createElement("div",{className:"".concat(K,"-loading-block")}),B=o.createElement("div",{className:"".concat(K,"-loading-content"),style:V},o.createElement(l.a,{gutter:8},o.createElement(s.a,{span:22},U)),o.createElement(l.a,{gutter:8},o.createElement(s.a,{span:8},U),o.createElement(s.a,{span:15},U)),o.createElement(l.a,{gutter:8},o.createElement(s.a,{span:6},U),o.createElement(s.a,{span:18},U)),o.createElement(l.a,{gutter:8},o.createElement(s.a,{span:13},U),o.createElement(s.a,{span:9},U)),o.createElement(l.a,{gutter:8},o.createElement(s.a,{span:4},U),o.createElement(s.a,{span:3},U),o.createElement(s.a,{span:16},U))),H=void 0!==P,Q=Object(g.a)(Object(g.a)({},L),(t={},Object(y.a)(t,H?"activeKey":"defaultActiveKey",H?P:T),Object(y.a)(t,"tabBarExtraContent",D),t)),W=A&&A.length?o.createElement(Bc,Object(g.a)({size:"large"},Q,{className:"".concat(K,"-head-tabs"),onChange:function(t){var n;null===(n=e.onTabChange)||void 0===n||n.call(e,t)}}),A.map((function(e){return o.createElement(Bc.TabPane,{tab:e.tab,disabled:e.disabled,key:e.key})}))):null;(O||d||W)&&(r=o.createElement("div",{className:"".concat(K,"-head"),style:v},o.createElement("div",{className:"".concat(K,"-head-wrapper")},O&&o.createElement("div",{className:"".concat(K,"-head-title")},O),d&&o.createElement("div",{className:"".concat(K,"-extra")},d)),W));var J,G=N?o.createElement("div",{className:"".concat(K,"-cover")},N):null,Z=o.createElement("div",{className:"".concat(K,"-body"),style:b},j?B:k),Y=S&&S.length?o.createElement("ul",{className:"".concat(K,"-actions")},function(e){return e.map((function(t,n){return o.createElement("li",{style:{width:"".concat(100/e.length,"%")},key:"action-".concat(n)},o.createElement("span",null,t))}))}(S)):null,q=Object(an.a)(F,["onTabChange"]),X=x||u,_=E()(K,(n={},Object(y.a)(n,"".concat(K,"-loading"),j),Object(y.a)(n,"".concat(K,"-bordered"),w),Object(y.a)(n,"".concat(K,"-hoverable"),R),Object(y.a)(n,"".concat(K,"-contain-grid"),(o.Children.forEach(e.children,(function(e){e&&e.type&&e.type===Xa&&(J=!0)})),J)),Object(y.a)(n,"".concat(K,"-contain-tabs"),A&&A.length),Object(y.a)(n,"".concat(K,"-").concat(X),X),Object(y.a)(n,"".concat(K,"-type-").concat(M),!!M),Object(y.a)(n,"".concat(K,"-rtl"),"rtl"===c),n),p);return o.createElement("div",Object(g.a)({},q,{className:_}),r,G,Z,Y)};Qc.Grid=Xa,Qc.Meta=$a;var Wc=Qc,Jc=n("3M/l"),Gc=n.n(Jc),Zc=n("OTLn"),Yc=n.n(Zc),qc=n("uWrK"),Xc=n.n(qc),_c=n("k9j6"),$c=n.n(_c),el=n("QaN9"),tl=n.n(el),nl=n("Qq2X"),rl=n.n(nl),ol=[{title:"JavaScript",src:Gc.a},{title:"React JS",src:Yc.a},{title:"Ant Design",src:Xc.a},{title:"Node JS",src:$c.a},{title:"MongoDB",src:rl.a},{title:"Python",src:tl.a}],al=function(e){e.text,e.percent;return a.a.createElement("div",{style:{marginTop:"20px"}},a.a.createElement("div",null,a.a.createElement(Ya,{grid:{gutter:16,xs:1,sm:1,md:1,lg:2,xl:3,xxl:3},dataSource:ol,renderItem:function(e){return a.a.createElement(Ya.Item,null,a.a.createElement(cl,{item:e}))}})))},il=yr.Title;function cl(e){var t=e.item;return console.log(t),a.a.createElement(a.a.Fragment,null,a.a.createElement(Wc,null,a.a.createElement(l.a,{justify:"space-around",align:"middle"},a.a.createElement(s.a,null,a.a.createElement(en,{shape:"square",size:{xs:80,sm:80,md:80,lg:80,xl:80,xxl:100},src:t.src})),a.a.createElement(s.a,null,a.a.createElement(il,{level:3},t.title)))))}var ll=function(){return a.a.createElement("div",null,a.a.createElement("h2",null,"Mis Habilidades"),a.a.createElement(al,null))};t.default=function(){return a.a.createElement(r.a,{className:"outerPadding"},a.a.createElement(r.a,{className:"container"},a.a.createElement(i.a,null),a.a.createElement(c.b,null,a.a.createElement(a.a.Fragment,null,a.a.createElement(b,null),a.a.createElement(ll,null)))))}},E9nw:function(e,t){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}},ExA7:function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},F3x0:function(e,t,n){},GJlF:function(e,t,n){},GoyQ:function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},HJMW:function(e,t,n){},"HaE+":function(e,t,n){"use strict";function r(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(s){return void n(s)}c.done?t(l):Promise.resolve(l).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,a){var i=e.apply(t,n);function c(e){r(i,o,a,c,l,"next",e)}function l(e){r(i,o,a,c,l,"throw",e)}c(void 0)}))}}n.d(t,"a",(function(){return o}))},HdAM:function(e,t,n){},IYBL:function(e,t,n){},KfNM:function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},KpVd:function(e,t,n){"use strict";(function(e){function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function i(e,t,n){return(i=a()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&o(a,n.prototype),a}).apply(null,arguments)}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,a)}function a(){return i(e,arguments,r(this).constructor)}return a.prototype=Object.create(e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),o(a,e)})(e)}var l=/%[sdj%]/g,s=function(){};function u(e){if(!e||!e.length)return null;var t={};return e.forEach((function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)})),t}function f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=1,o=t[0],a=t.length;if("function"==typeof o)return o.apply(null,t.slice(1));if("string"==typeof o){var i=String(o).replace(l,(function(e){if("%%"===e)return"%";if(r>=a)return e;switch(e){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(n){return"[Circular]"}break;default:return e}}));return i}return o}function p(e,t){return null==e||(!("array"!==t||!Array.isArray(e)||e.length)||!(!function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}(t)||"string"!=typeof e||e))}function d(e,t,n){var r=0,o=e.length;!function a(i){if(i&&i.length)n(i);else{var c=r;r+=1,c<o?t(e[c],a):n([])}}([])}var m=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,"Async Validation Error")||this).errors=t,r.fields=n,r}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(c(Error));function v(e,t,n,r){if(t.first){var o=new Promise((function(t,o){d(function(e){var t=[];return Object.keys(e).forEach((function(n){t.push.apply(t,e[n])})),t}(e),n,(function(e){return r(e),e.length?o(new m(e,u(e))):t()}))}));return o.catch((function(e){return e})),o}var a=t.firstFields||[];!0===a&&(a=Object.keys(e));var i=Object.keys(e),c=i.length,l=0,s=[],f=new Promise((function(t,o){var f=function(e){if(s.push.apply(s,e),++l===c)return r(s),s.length?o(new m(s,u(s))):t()};i.length||(r(s),t()),i.forEach((function(t){var r=e[t];-1!==a.indexOf(t)?d(r,n,f):function(e,t,n){var r=[],o=0,a=e.length;function i(e){r.push.apply(r,e),++o===a&&n(r)}e.forEach((function(e){t(e,i)}))}(r,n,f)}))}));return f.catch((function(e){return e})),f}function h(e){return function(t){return t&&t.message?(t.field=t.field||e.fullField,t):{message:"function"==typeof t?t():t,field:t.field||e.fullField}}}function b(e,t){if(t)for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];"object"==typeof o&&"object"==typeof e[r]?e[r]=n(n({},e[r]),o):e[r]=o}return e}function g(e,t,n,r,o,a){!e.required||n.hasOwnProperty(e.field)&&!p(t,a||e.type)||r.push(f(o.messages.required,e.fullField))}var y={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},O={integer:function(e){return O.number(e)&&parseInt(e,10)===e},float:function(e){return O.number(e)&&!O.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(t){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"==typeof e},object:function(e){return"object"==typeof e&&!O.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&!!e.match(y.email)&&e.length<255},url:function(e){return"string"==typeof e&&!!e.match(y.url)},hex:function(e){return"string"==typeof e&&!!e.match(y.hex)}};var j={required:g,whitespace:function(e,t,n,r,o){(/^\s+$/.test(t)||""===t)&&r.push(f(o.messages.whitespace,e.fullField))},type:function(e,t,n,r,o){if(e.required&&void 0===t)g(e,t,n,r,o);else{var a=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(a)>-1?O[a](t)||r.push(f(o.messages.types[a],e.fullField,e.type)):a&&typeof t!==e.type&&r.push(f(o.messages.types[a],e.fullField,e.type))}},range:function(e,t,n,r,o){var a="number"==typeof e.len,i="number"==typeof e.min,c="number"==typeof e.max,l=t,s=null,u="number"==typeof t,p="string"==typeof t,d=Array.isArray(t);if(u?s="number":p?s="string":d&&(s="array"),!s)return!1;d&&(l=t.length),p&&(l=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),a?l!==e.len&&r.push(f(o.messages[s].len,e.fullField,e.len)):i&&!c&&l<e.min?r.push(f(o.messages[s].min,e.fullField,e.min)):c&&!i&&l>e.max?r.push(f(o.messages[s].max,e.fullField,e.max)):i&&c&&(l<e.min||l>e.max)&&r.push(f(o.messages[s].range,e.fullField,e.min,e.max))},enum:function(e,t,n,r,o){e.enum=Array.isArray(e.enum)?e.enum:[],-1===e.enum.indexOf(t)&&r.push(f(o.messages.enum,e.fullField,e.enum.join(", ")))},pattern:function(e,t,n,r,o){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(f(o.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"==typeof e.pattern){new RegExp(e.pattern).test(t)||r.push(f(o.messages.pattern.mismatch,e.fullField,t,e.pattern))}}};function C(e,t,n,r,o){var a=e.type,i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t,a)&&!e.required)return n();j.required(e,t,r,i,o,a),p(t,a)||j.type(e,t,r,i,o)}n(i)}var E={string:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t,"string")&&!e.required)return n();j.required(e,t,r,a,o,"string"),p(t,"string")||(j.type(e,t,r,a,o),j.range(e,t,r,a,o),j.pattern(e,t,r,a,o),!0===e.whitespace&&j.whitespace(e,t,r,a,o))}n(a)},method:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t)&&!e.required)return n();j.required(e,t,r,a,o),void 0!==t&&j.type(e,t,r,a,o)}n(a)},number:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(""===t&&(t=void 0),p(t)&&!e.required)return n();j.required(e,t,r,a,o),void 0!==t&&(j.type(e,t,r,a,o),j.range(e,t,r,a,o))}n(a)},boolean:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t)&&!e.required)return n();j.required(e,t,r,a,o),void 0!==t&&j.type(e,t,r,a,o)}n(a)},regexp:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t)&&!e.required)return n();j.required(e,t,r,a,o),p(t)||j.type(e,t,r,a,o)}n(a)},integer:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t)&&!e.required)return n();j.required(e,t,r,a,o),void 0!==t&&(j.type(e,t,r,a,o),j.range(e,t,r,a,o))}n(a)},float:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t)&&!e.required)return n();j.required(e,t,r,a,o),void 0!==t&&(j.type(e,t,r,a,o),j.range(e,t,r,a,o))}n(a)},array:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(null==t&&!e.required)return n();j.required(e,t,r,a,o,"array"),null!=t&&(j.type(e,t,r,a,o),j.range(e,t,r,a,o))}n(a)},object:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t)&&!e.required)return n();j.required(e,t,r,a,o),void 0!==t&&j.type(e,t,r,a,o)}n(a)},enum:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t)&&!e.required)return n();j.required(e,t,r,a,o),void 0!==t&&j.enum(e,t,r,a,o)}n(a)},pattern:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t,"string")&&!e.required)return n();j.required(e,t,r,a,o),p(t,"string")||j.pattern(e,t,r,a,o)}n(a)},date:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t,"date")&&!e.required)return n();var i;if(j.required(e,t,r,a,o),!p(t,"date"))i=t instanceof Date?t:new Date(t),j.type(e,i,r,a,o),i&&j.range(e,i.getTime(),r,a,o)}n(a)},url:C,hex:C,email:C,required:function(e,t,n,r,o){var a=[],i=Array.isArray(t)?"array":typeof t;j.required(e,t,r,a,o,i),n(a)},any:function(e,t,n,r,o){var a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(p(t)&&!e.required)return n();j.required(e,t,r,a,o)}n(a)}};function w(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var x=w();function I(e){this.rules=null,this._messages=x,this.define(e)}I.prototype={messages:function(e){return e&&(this._messages=b(w(),e)),this._messages},define:function(e){if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!=typeof e||Array.isArray(e))throw new Error("Rules must be an object");var t,n;for(t in this.rules={},e)e.hasOwnProperty(t)&&(n=e[t],this.rules[t]=Array.isArray(n)?n:[n])},validate:function(e,t,r){var o=this;void 0===t&&(t={}),void 0===r&&(r=function(){});var a,i,c=e,l=t,s=r;if("function"==typeof l&&(s=l,l={}),!this.rules||0===Object.keys(this.rules).length)return s&&s(),Promise.resolve();if(l.messages){var p=this.messages();p===x&&(p=w()),b(p,l.messages),l.messages=p}else l.messages=this.messages();var d={};(l.keys||Object.keys(this.rules)).forEach((function(t){a=o.rules[t],i=c[t],a.forEach((function(r){var a=r;"function"==typeof a.transform&&(c===e&&(c=n({},c)),i=c[t]=a.transform(i)),(a="function"==typeof a?{validator:a}:n({},a)).validator=o.getValidationMethod(a),a.field=t,a.fullField=a.fullField||t,a.type=o.getType(a),a.validator&&(d[t]=d[t]||[],d[t].push({rule:a,value:i,source:c,field:t}))}))}));var m={};return v(d,l,(function(e,t){var r,o=e.rule,a=!("object"!==o.type&&"array"!==o.type||"object"!=typeof o.fields&&"object"!=typeof o.defaultField);function i(e,t){return n(n({},t),{},{fullField:o.fullField+"."+e})}function c(r){void 0===r&&(r=[]);var c=r;if(Array.isArray(c)||(c=[c]),!l.suppressWarning&&c.length&&I.warning("async-validator:",c),c.length&&void 0!==o.message&&(c=[].concat(o.message)),c=c.map(h(o)),l.first&&c.length)return m[o.field]=1,t(c);if(a){if(o.required&&!e.value)return void 0!==o.message?c=[].concat(o.message).map(h(o)):l.error&&(c=[l.error(o,f(l.messages.required,o.field))]),t(c);var s={};if(o.defaultField)for(var u in e.value)e.value.hasOwnProperty(u)&&(s[u]=o.defaultField);for(var p in s=n(n({},s),e.rule.fields))if(s.hasOwnProperty(p)){var d=Array.isArray(s[p])?s[p]:[s[p]];s[p]=d.map(i.bind(null,p))}var v=new I(s);v.messages(l.messages),e.rule.options&&(e.rule.options.messages=l.messages,e.rule.options.error=l.error),v.validate(e.value,e.rule.options||l,(function(e){var n=[];c&&c.length&&n.push.apply(n,c),e&&e.length&&n.push.apply(n,e),t(n.length?n:null)}))}else t(c)}a=a&&(o.required||!o.required&&e.value),o.field=e.field,o.asyncValidator?r=o.asyncValidator(o,e.value,c,e.source,l):o.validator&&(!0===(r=o.validator(o,e.value,c,e.source,l))?c():!1===r?c(o.message||o.field+" fails"):r instanceof Array?c(r):r instanceof Error&&c(r.message)),r&&r.then&&r.then((function(){return c()}),(function(e){return c(e)}))}),(function(e){!function(e){var t,n,r,o=[],a={};for(t=0;t<e.length;t++)n=e[t],r=void 0,Array.isArray(n)?o=(r=o).concat.apply(r,n):o.push(n);o.length?a=u(o):(o=null,a=null),s(o,a)}(e)}))},getType:function(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!=typeof e.validator&&e.type&&!E.hasOwnProperty(e.type))throw new Error(f("Unknown rule type %s",e.type));return e.type||"string"},getValidationMethod:function(e){if("function"==typeof e.validator)return e.validator;var t=Object.keys(e),n=t.indexOf("message");return-1!==n&&t.splice(n,1),1===t.length&&"required"===t[0]?E.required:E[this.getType(e)]||!1}},I.register=function(e,t){if("function"!=typeof t)throw new Error("Cannot register a validator by type, validator is not a function");E[e]=t},I.warning=s,I.messages=x,I.validators=E,t.a=I}).call(this,n("8oxB"))},Kz5y:function(e,t,n){var r=n("WFqU"),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},NykK:function(e,t,n){var r=n("nmnc"),o=n("AP2z"),a=n("KfNM"),i=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},OQrj:function(e,t,n){},OTLn:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAfhklEQVR4Xu1dPXAkyVLOHHUP8ax3Z4B7WmBn7x3GaR3AgDityXNWa7znQMTNLAEesVoD+3QuzmoDDwLNKAIczlitAZhPCjAA50YGd7ez73FaF4yTrAs0PZNE9vToRqPpzqzq6r+ZmogzblVVXZWZX+VPZWUh+J+ngKdAKgXQ08ZTwFMgnQIeIF46PAUyKOAB4sXDU8ADxMuAp4AdBbwGsaOb77UhFPAA2RBG+2XaUcADxI5uvteGUMADZEMY7ZdpRwEPEDu6+V4bQgEPkA1htF+mHQU8QOzo5nttCAU8QDaE0X6ZdhTwALGjm++1IRTwANkQRvtl2lHAA8SObr7XhlDAA2RDGO2XaUcBDxA7uvleG0IBD5ANYbRfph0FPEDs6OZ7bQgFPEA2hNF+mXYU8ACxo5vvtSEU2CiA9L6JHlOLdhFgBwB2V/B4CACXBDDEKZ7Sr22dDe7h5TrLQvdbeg//b/LJAl3egxl9ln+nc7r0PwxerzNNFte29gBhAY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rxT61Bcbywhz6Jxk0o2MKw/26bRJ5mcz91xIgc8IkjvvA2Q5K9A5bcDgNwkHThGF28j/u0hT2bSNeKwTuigi7gwcBn8ms5W+tATLXJrGpAdS1Egyid4B4QggnVTnfriUvceb3gGjPliYIOKijaemaVmsPkEWC8ZlBi3CPEPjmHoctVzmxZxzqRKSLKcFp0ecYrhlqOl5ME4RdIqZHHOZedTrPV4GHSHA6RTpZd5qsvQ9iKiS+vadAGgU2SoN4MfAUMKWAB4gpxXz7jaKAB8hGsdsv1pQCHiCmFPPtN4oCHiAbxW6/WFMKeICYUsy33ygKeIBsFLv9Yk0p4AFiSjHffqMo4AGyUez2izWlgAeIKcV8+42igAfIRrHbL9aUAh4gphTz7TeKAh4gG8Vuv1hTCniAmFLMt98oCniAbBS7/WJNKeABYkox336jKOABslHs9os1pYAHiCnFfPuNooAHyEax2y/WlAIeIKYU8+03igIeIBvFbr9YUwr8PzOAaNcXJtF1AAAAAElFTkSuQmCC"},QIyF:function(e,t,n){var r=n("Kz5y");e.exports=function(){return r.Date.now()}},QaN9:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAWb0lEQVR4Xu2dD5AcdZXHv697shARFdG7uixYchJmNvyJkJ2Jm53NJZd4cKCUAjubHIgo/kU5AobsLFJnLISdTZA/KsKB/NEzkJ0NYKmIudMzx84msLPhIJLsTuDUUjd4d6h3RhKzme53NUnAmGNnuqd/PfPr7jdVVFE17/d+731efzJ/tqebIA8hIASmJUDCRggIgekJiCBydAiBKgREEDk8hIAIIseAEKiPgLyC1MdNVkWEgAgSkUFLm/UREEHq4yarIkJABInIoKXN+giIIPVxk1URISCCRGTQ0mZ9BESQ+rjJqogQEEEiMmhpsz4CIkh93GRVRAiIIBEZtLRZHwERpD5usioiBEQQj4NO9T1yvGmXZ5lkHe8xldLlFpu/tozYrtH+C36tNHHEkokgLgbe1TfYyTDOYeYlAP4CwCwCWlykaHgoA1MAdgF4kYh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OaRFKRcSl1KzF/X5eALQh1M9MFYfPQbQahVZY2RFOTQq0iRgXaVMMOai4AxI1FMhrW/an1FVhCemL/Yhv04gKOiOHjHPTP2WGx3tczZ+rTjNSEKjKwglRlyKXWpLW+1qh7OhoG/olOKT4TomHfVSqQFqZCySqmrwXyLK2oRCY7it1ZHjjbyghyQZLz90yD6ckSOe4dtUq+ZGF3jMDi0YSLIodFyKZm0GZsAOD5NPKRHxRQzlkft7x3TzVIEOYzM3u3z3jbDNO4m4OyQHvxV22LCkxZbHz8q8fS2KPb/Wj2LIEdQ4e1zWmzjmNUgrAAwMyIHyl4wbjNeH7uBTtyyNyI9O2pTBJkG09RzqbmGySuIcJkjkgENYsYDtkW3tZw2+mxAW/C1bBGkBl5+PnW2bfNyMP4awIm+TqNByQn4CYM2GSbyNHt0Y4O2DeQ2IoiLsfF4qsMmXkLAEgZawWgFaf6hnrEHhEkCJpnxmBGz/5VmR/OPfi5G/WqoCFIPtcPW8LbTj5uKHdVqEN7iMZXS5TbjpZbyvkmqcV0spZuGMJkIEsKhSkvqCIgg6lhKphASEEFCOFRpSR0BEUQdS8kUQgIiSAiHKi2pIyCCqGMpmUJIQAQJ4VClJXUERBB1LCVTCAmIICEcqrSkjoAIoo6lZAohAREkhEOVltQREEHUsZRMISQggoRwqNKSOgIiiDqWkimEBESQEA5VWlJHQARRx1IyhZDA/wHhjTBBJKIq5gAAAABJRU5ErkJggg=="},Qq2X:function(e,t,n){e.exports=n.p+"static/mongo-6b00c806480bf27d259b65b49e46450f.png"},RXDR:function(e,t,n){},T5bk:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n("DSFK"),o=n("25BE"),a=n("BsWD"),i=n("PYwp");function c(e){return Object(r.a)(e)||Object(o.a)(e)||Object(a.a)(e)||Object(i.a)()}},TO8r:function(e,t){var n=/\s/;e.exports=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}},WFqU:function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n("yLpj"))},YrtM:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("q1tI");function o(e,t,n){var o=r.useRef({});return"value"in o.current&&!n(o.current.condition,t)||(o.current.value=e(),o.current.condition=t),o.current.value}},dfTv:function(e,t,n){},jN4g:function(e,t,n){"use strict";var r=n("q1tI"),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}}]},name:"close-circle",theme:"filled"},a=n("6VBw"),i=function(e,t){return r.createElement(a.a,Object.assign({},e,{ref:t,icon:o}))};i.displayName="CloseCircleFilled";t.a=r.forwardRef(i)},jXQH:function(e,t,n){var r=n("TO8r"),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},k9j6:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAgAElEQVR4Xu19C5gdVZXuv+p0JySQwIiJ4oPHEFB56IgDiALqiA8UFZ1JvEMefarq9Hl0CAkdmBmv3mvmu168d+CcSELSdU5OVZ1OeDgEgyAq8hiD4gUNI46gSGAQUMQrkhGiSeh01Zpvn+6GTOik67HrnNNdu74vH4+s9e+1117/2bV3rb02QT3KA8oDB/QAKd8oDygPHNgDiiAqOpQHDuIBRRAVHsoDiiAqBpQHonlAzSDR/Ka0UuIBRZCUDLTqZjQPKIJE85vSSokHFEFSMtC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ASUVORK5CYII="},nmnc:function(e,t,n){var r=n("Kz5y").Symbol;e.exports=r},sEfC:function(e,t,n){var r=n("GoyQ"),o=n("QIyF"),a=n("tLB3"),i=Math.max,c=Math.min;e.exports=function(e,t,n){var l,s,u,f,p,d,m=0,v=!1,h=!1,b=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=l,r=s;return l=s=void 0,m=t,f=e.apply(r,n)}function y(e){return m=e,p=setTimeout(j,t),v?g(e):f}function O(e){var n=e-d;return void 0===d||n>=t||n<0||h&&e-m>=u}function j(){var e=o();if(O(e))return C(e);p=setTimeout(j,function(e){var n=t-(e-d);return h?c(n,u-(e-m)):n}(e))}function C(e){return p=void 0,b&&l?g(e):(l=s=void 0,f)}function E(){var e=o(),n=O(e);if(l=arguments,s=this,d=e,n){if(void 0===p)return y(d);if(h)return clearTimeout(p),p=setTimeout(j,t),g(d)}return void 0===p&&(p=setTimeout(j,t)),f}return t=a(t)||0,r(n)&&(v=!!n.leading,u=(h="maxWait"in n)?i(a(n.maxWait)||0,t):u,b="trailing"in n?!!n.trailing:b),E.cancel=function(){void 0!==p&&clearTimeout(p),m=0,l=d=s=p=void 0},E.flush=function(){return void 0===p?f:C(o())},E}},tLB3:function(e,t,n){var r=n("jXQH"),o=n("GoyQ"),a=n("/9aa"),i=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,l=/^0o[0-7]+$/i,s=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=c.test(e);return n||l.test(e)?s(e.slice(2),n?2:8):i.test(e)?NaN:+e}},uWrK:function(e,t){e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjIwMHB4IiBoZWlnaHQ9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xNjguNjkwNzc3LDY0LjcxODExNTkgQzE2NC40NzIzMzIsNjAuNTE4MDg1OCAxNTcuNjQ2ODY4LDYwLjUyNDE0MjUgMTUzLjQzNTg5NSw2NC43MzE2NTI2IEMxNDkuMjI3NDEzLDY4LjkzNjY3NCAxNDkuMjI3NDEzLDc1Ljc1NDM2MDcgMTUzLjQzNTg5NSw3OS45NTkzODIxIEwxNzEuODU0MDM1LDk4LjM2MjM3NjUgQzE3My4wMjM2Niw5OS41MzEwMzk2IDE3My4wMjM2NiwxMDEuMzA0NzI0IDE3MS44NTQwMzUsMTAyLjQ3MzM4NyBMMTUzLjY4NTYzMywxMjAuNjI2ODQ5IEMxNDkuNDc3MTUsMTI0LjgzMTg3IDE0OS40NzcxNSwxMzEuNjQ5NTU3IDE1My42ODU2MzMsMTM1Ljg1NDU3OSBaIiBpZD0iU2hhcGUiIGZpbGw9InVybCgjbGluZWFyR3JhZGllbnQtMykiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgICAgICAgICAgPGVsbGlwc2UgaWQ9IkNvbWJpbmVkLVNoYXBlIiBmaWxsPSJ1cmwoI2xpbmVhckdyYWRpZW50LTQpIiBjeD0iMTAwLjUxOTMzOSIgY3k9IjEwMC40MzY2ODEiIHJ4PSIyMy42MDAxOTI2IiByeT0iMjMuNTgwNzg2Ij48L2VsbGlwc2U+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},"wEI+":function(e,t,n){"use strict";n.d(t,"a",(function(){return Lt})),n.d(t,"b",(function(){return Vt}));var r=n("wx14"),o=n("q1tI"),a=n("Pw59"),i=n("Ff2n"),c=n("rePB"),l=n("VTBJ"),s=n("KQm4"),u=n("1OyB"),f=n("vuIU"),p=n("JX7q"),d=n("Ji7U"),m=n("LK+K"),v=n("Zm9Q"),h=n("Kwbf"),b="RC_FORM_INTERNAL_HOOKS",g=function(){Object(h.a)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},y=o.createContext({getFieldValue:g,getFieldsValue:g,getFieldError:g,getFieldsError:g,isFieldsTouched:g,isFieldTouched:g,isFieldValidating:g,isFieldsValidating:g,resetFields:g,setFields:g,setFieldsValue:g,validateFields:g,submit:g,getInternalHooks:function(){return g(),{dispatch:g,initEntityValue:g,registerField:g,useSubscribe:g,setInitialValues:g,setCallbacks:g,getFields:g,setValidateMessages:g,setPreserve:g}}});function O(e){return null==e?[]:Array.isArray(e)?e:[e]}var j=n("o0o1"),C=n.n(j),E=n("HaE+"),w=n("U8pU"),x=n("KpVd");function I(e,t){for(var n=e,r=0;r<t.length;r+=1){if(null==n)return;n=n[t[r]]}return n}var M=n("T5bk");function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e,t,n,r){if(!t.length)return n;var o,a=Object(M.a)(t),i=a[0],l=a.slice(1);return o=e||"number"!=typeof i?Array.isArray(e)?Object(s.a)(e):function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){Object(c.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e):[],r&&void 0===n&&1===l.length?delete o[i][l[0]]:o[i]=S(o[i],l,n,r),o}function A(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t.length&&r&&void 0===n&&!I(e,t.slice(0,-1))?e:S(e,t,n,r)}function k(e){return O(e)}function P(e,t){return I(e,t)}function T(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=A(e,t,n,r);return o}function D(e,t){var n={};return t.forEach((function(t){var r=P(e,t);n=T(n,t,r)})),n}function R(e,t){return e&&e.some((function(e){return K(e,t)}))}function z(e){return"object"===Object(w.a)(e)&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}function L(e,t){var n=Array.isArray(e)?Object(s.a)(e):Object(l.a)({},e);return t?(Object.keys(t).forEach((function(e){var r=n[e],o=t[e],a=z(r)&&z(o);n[e]=a?L(r,o||{}):o})),n):n}function F(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((function(e,t){return L(e,t)}),e)}function K(e,t){return!(!e||!t||e.length!==t.length)&&e.every((function(e,n){return t[n]===e}))}function V(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&e in t.target?t.target[e]:t}function U(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var o=e[t],a=t-n;return a>0?[].concat(Object(s.a)(e.slice(0,n)),[o],Object(s.a)(e.slice(n,t)),Object(s.a)(e.slice(t+1,r))):a<0?[].concat(Object(s.a)(e.slice(0,t)),Object(s.a)(e.slice(t+1,n+1)),[o],Object(s.a)(e.slice(n+1,r))):e}var B="'${name}' is not a valid ${type}",H={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:B,method:B,array:B,object:B,number:B,date:B,boolean:B,integer:B,float:B,regexp:B,email:B,url:B,hex:B},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},Q=x.a;function W(e,t,n,r){var o=Object(l.a)(Object(l.a)({},n),{},{name:t,enum:(n.enum||[]).join(", ")}),a=function(e,t){return function(){return function(e,t){return e.replace(/\$\{\w+\}/g,(function(e){var n=e.slice(2,-1);return t[n]}))}(e,Object(l.a)(Object(l.a)({},o),t))}};return function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).forEach((function(o){var i=t[o];"string"==typeof i?n[o]=a(i,r):i&&"object"===Object(w.a)(i)?(n[o]={},e(i,n[o])):n[o]=i})),n}(F({},H,e))}function J(e,t,n,r,o){return G.apply(this,arguments)}function G(){return(G=Object(E.a)(C.a.mark((function e(t,n,r,a,i){var u,f,p,d,m,v;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=Object(l.a)({},r),f=null,u&&"array"===u.type&&u.defaultField&&(f=u.defaultField,delete u.defaultField),p=new Q(Object(c.a)({},t,[u])),d=W(a.validateMessages,t,u,i),p.messages(d),m=[],e.prev=7,e.next=10,Promise.resolve(p.validate(Object(c.a)({},t,n),Object(l.a)({},a)));case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),e.t0.errors?m=e.t0.errors.map((function(e,t){var n=e.message;return o.isValidElement(n)?o.cloneElement(n,{key:"error_".concat(t)}):n})):(console.error(e.t0),m=[d.default()]);case 15:if(m.length||!f){e.next=20;break}return e.next=18,Promise.all(n.map((function(e,n){return J("".concat(t,".").concat(n),e,f,a,i)})));case 18:return v=e.sent,e.abrupt("return",v.reduce((function(e,t){return[].concat(Object(s.a)(e),Object(s.a)(t))}),[]));case 20:return e.abrupt("return",m);case 21:case"end":return e.stop()}}),e,null,[[7,12]])})))).apply(this,arguments)}function Z(e,t,n,r,o,a){var i,c=e.join("."),s=n.map((function(e){var t=e.validator;return t?Object(l.a)(Object(l.a)({},e),{},{validator:function(e,n,r){var o=!1,a=t(e,n,(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Promise.resolve().then((function(){Object(h.a)(!o,"Your validator function has already return a promise. `callback` will be ignored."),o||r.apply(void 0,t)}))}));o=a&&"function"==typeof a.then&&"function"==typeof a.catch,Object(h.a)(o,"`callback` is deprecated. Please return a promise instead."),o&&a.then((function(){r()})).catch((function(e){r(e||" ")}))}}):e}));if(!0===o)i=new Promise(function(){var e=Object(E.a)(C.a.mark((function e(n,o){var i,l;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=0;case 1:if(!(i<s.length)){e.next=11;break}return e.next=4,J(c,t,s[i],r,a);case 4:if(!(l=e.sent).length){e.next=8;break}return o(l),e.abrupt("return");case 8:i+=1,e.next=1;break;case 11:n([]);case 12:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}());else{var u=s.map((function(e){return J(c,t,e,r,a)}));i=(o?function(e){return q.apply(this,arguments)}(u):function(e){return Y.apply(this,arguments)}(u)).then((function(e){return e.length?Promise.reject(e):[]}))}return i.catch((function(e){return e})),i}function Y(){return(Y=Object(E.a)(C.a.mark((function e(t){return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(t).then((function(e){var t;return(t=[]).concat.apply(t,Object(s.a)(e))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function q(){return(q=Object(E.a)(C.a.mark((function e(t){var n;return C.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=0,e.abrupt("return",new Promise((function(e){t.forEach((function(r){r.then((function(r){r.length&&e(r),(n+=1)===t.length&&e([])}))}))})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function X(e,t,n,r,o,a){return"function"==typeof e?e(t,n,"source"in a?{source:a.source}:{}):r!==o}var _=function(e){Object(d.a)(n,e);var t=Object(m.a)(n);function n(e){var r;(Object(u.a)(this,n),(r=t.call(this,e)).state={resetCount:0},r.cancelRegisterFunc=null,r.mounted=!1,r.touched=!1,r.dirty=!1,r.validatePromise=null,r.errors=[],r.cancelRegister=function(){var e=r.props,t=e.preserve,n=e.isListField,o=e.name;r.cancelRegisterFunc&&r.cancelRegisterFunc(n,t,k(o)),r.cancelRegisterFunc=null},r.getNamePath=function(){var e=r.props,t=e.name,n=e.fieldContext.prefixName,o=void 0===n?[]:n;return void 0!==t?[].concat(Object(s.a)(o),Object(s.a)(t)):[]},r.getRules=function(){var e=r.props,t=e.rules,n=void 0===t?[]:t,o=e.fieldContext;return n.map((function(e){return"function"==typeof e?e(o):e}))},r.refresh=function(){r.mounted&&r.setState((function(e){return{resetCount:e.resetCount+1}}))},r.onStoreChange=function(e,t,n){var o=r.props,a=o.shouldUpdate,i=o.dependencies,c=void 0===i?[]:i,l=o.onReset,s=n.store,u=r.getNamePath(),f=r.getValue(e),p=r.getValue(s),d=t&&R(t,u);switch("valueUpdate"===n.type&&"external"===n.source&&f!==p&&(r.touched=!0,r.dirty=!0,r.validatePromise=null,r.errors=[]),n.type){case"reset":if(!t||d)return r.touched=!1,r.dirty=!1,r.validatePromise=null,r.errors=[],l&&l(),void r.refresh();break;case"setField":if(d){var m=n.data;return"touched"in m&&(r.touched=m.touched),"validating"in m&&!("originRCField"in m)&&(r.validatePromise=m.validating?Promise.resolve([]):null),"errors"in m&&(r.errors=m.errors||[]),r.dirty=!0,void r.reRender()}if(a&&!u.length&&X(a,e,s,f,p,n))return void r.reRender();break;case"dependenciesUpdate":if(c.map(k).some((function(e){return R(n.relatedFields,e)})))return void r.reRender();break;default:if(d||(!c.length||u.length||a)&&X(a,e,s,f,p,n))return void r.reRender()}!0===a&&r.reRender()},r.validateRules=function(e){var t=r.getNamePath(),n=r.getValue(),o=Promise.resolve().then((function(){if(!r.mounted)return[];var a=r.props,i=a.validateFirst,c=void 0!==i&&i,l=a.messageVariables,s=(e||{}).triggerName,u=r.getRules();s&&(u=u.filter((function(e){var t=e.validateTrigger;return!t||O(t).includes(s)})));var f=Z(t,n,u,e,c,l);return f.catch((function(e){return e})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];r.validatePromise===o&&(r.validatePromise=null,r.errors=e,r.reRender())})),f}));return r.validatePromise=o,r.dirty=!0,r.errors=[],r.reRender(),o},r.isFieldValidating=function(){return!!r.validatePromise},r.isFieldTouched=function(){return r.touched},r.isFieldDirty=function(){return r.dirty},r.getErrors=function(){return r.errors},r.isListField=function(){return r.props.isListField},r.isList=function(){return r.props.isList},r.isPreserve=function(){return r.props.preserve},r.getMeta=function(){return r.prevValidating=r.isFieldValidating(),{touched:r.isFieldTouched(),validating:r.prevValidating,errors:r.errors,name:r.getNamePath()}},r.getOnlyChild=function(e){if("function"==typeof e){var t=r.getMeta();return Object(l.a)(Object(l.a)({},r.getOnlyChild(e(r.getControlled(),t,r.props.fieldContext))),{},{isFunction:!0})}var n=Object(v.a)(e);return 1===n.length&&o.isValidElement(n[0])?{child:n[0],isFunction:!1}:{child:n,isFunction:!1}},r.getValue=function(e){var t=r.props.fieldContext.getFieldsValue,n=r.getNamePath();return P(e||t(!0),n)},r.getControlled=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r.props,n=t.trigger,o=t.validateTrigger,a=t.getValueFromEvent,i=t.normalize,s=t.valuePropName,u=t.getValueProps,f=t.fieldContext,p=void 0!==o?o:f.validateTrigger,d=r.getNamePath(),m=f.getInternalHooks,v=f.getFieldsValue,h=m(b),g=h.dispatch,y=r.getValue(),j=u||function(e){return Object(c.a)({},s,e)},C=e[n],E=Object(l.a)(Object(l.a)({},e),j(y));E[n]=function(){var e;r.touched=!0,r.dirty=!0;for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];e=a?a.apply(void 0,n):V.apply(void 0,[s].concat(n)),i&&(e=i(e,y,v(!0))),g({type:"updateValue",namePath:d,value:e}),C&&C.apply(void 0,n)};var w=O(p||[]);return w.forEach((function(e){var t=E[e];E[e]=function(){t&&t.apply(void 0,arguments);var n=r.props.rules;n&&n.length&&g({type:"validateField",namePath:d,triggerName:e})}})),E},e.fieldContext)&&(0,(0,e.fieldContext.getInternalHooks)(b).initEntityValue)(Object(p.a)(r));return r}return Object(f.a)(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.shouldUpdate,n=e.fieldContext;if(this.mounted=!0,n){var r=(0,n.getInternalHooks)(b).registerField;this.cancelRegisterFunc=r(this)}!0===t&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var e,t=this.state.resetCount,n=this.props.children,r=this.getOnlyChild(n),a=r.child;return r.isFunction?e=a:o.isValidElement(a)?e=o.cloneElement(a,this.getControlled(a.props)):(Object(h.a)(!a,"`children` of Field is not validate ReactElement."),e=a),o.createElement(o.Fragment,{key:t},e)}}]),n}(o.Component);_.contextType=y,_.defaultProps={trigger:"onChange",valuePropName:"value"};var $=function(e){var t=e.name,n=Object(i.a)(e,["name"]),a=o.useContext(y),c=void 0!==t?k(t):void 0,l="keep";return n.isListField||(l="_".concat((c||[]).join("_"))),o.createElement(_,Object(r.a)({key:l,name:c},n,{fieldContext:a}))},ee=function(e){var t=e.name,n=e.initialValue,r=e.children,a=e.rules,i=e.validateTrigger,c=o.useContext(y),u=o.useRef({keys:[],id:0}).current;if("function"!=typeof r)return Object(h.a)(!1,"Form.List only accepts function as children."),null;var f=k(c.prefixName)||[],p=[].concat(Object(s.a)(f),Object(s.a)(k(t)));return o.createElement(y.Provider,{value:Object(l.a)(Object(l.a)({},c),{},{prefixName:p})},o.createElement($,{name:[],shouldUpdate:function(e,t,n){return"internal"!==n.source&&e!==t},rules:a,validateTrigger:i,initialValue:n,isList:!0},(function(e,t){var n=e.value,o=void 0===n?[]:n,a=e.onChange,i=c.getFieldValue,l=function(){return i(p||[])||[]},f={add:function(e,t){var n=l();t>=0&&t<=n.length?(u.keys=[].concat(Object(s.a)(u.keys.slice(0,t)),[u.id],Object(s.a)(u.keys.slice(t))),a([].concat(Object(s.a)(n.slice(0,t)),[e],Object(s.a)(n.slice(t))))):(u.keys=[].concat(Object(s.a)(u.keys),[u.id]),a([].concat(Object(s.a)(n),[e]))),u.id+=1},remove:function(e){var t=l(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(u.keys=u.keys.filter((function(e,t){return!n.has(t)})),a(t.filter((function(e,t){return!n.has(t)}))))},move:function(e,t){if(e!==t){var n=l();e<0||e>=n.length||t<0||t>=n.length||(u.keys=U(u.keys,e,t),a(U(n,e,t)))}}},d=o||[];return Array.isArray(d)||(d=[]),r(d.map((function(e,t){var n=u.keys[t];return void 0===n&&(u.keys[t]=u.id,n=u.keys[t],u.id+=1),{name:t,key:n,isListField:!0}})),f,t)})))},te=n("ODXe");var ne="__@field_split__";function re(e){return e.map((function(e){return"".concat(Object(w.a)(e),":").concat(e)})).join(ne)}var oe=function(){function e(){Object(u.a)(this,e),this.kvs=new Map}return Object(f.a)(e,[{key:"set",value:function(e,t){this.kvs.set(re(e),t)}},{key:"get",value:function(e){return this.kvs.get(re(e))}},{key:"update",value:function(e,t){var n=t(this.get(e));n?this.set(e,n):this.delete(e)}},{key:"delete",value:function(e){this.kvs.delete(re(e))}},{key:"map",value:function(e){return Object(s.a)(this.kvs.entries()).map((function(t){var n=Object(te.a)(t,2),r=n[0],o=n[1],a=r.split(ne);return e({key:a.map((function(e){var t=e.match(/^([^:]*):(.*)$/),n=Object(te.a)(t,3),r=n[1],o=n[2];return"number"===r?Number(o):o})),value:o})}))}},{key:"toJSON",value:function(){var e={};return this.map((function(t){var n=t.key,r=t.value;return e[n.join(".")]=r,null})),e}}]),e}(),ae=function e(t){var n=this;Object(u.a)(this,e),this.formHooked=!1,this.subscribable=!0,this.store={},this.fieldEntities=[],this.initialValues={},this.callbacks={},this.validateMessages=null,this.preserve=null,this.lastValidatePromise=null,this.getForm=function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,getInternalHooks:n.getInternalHooks}},this.getInternalHooks=function(e){return e===b?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve}):(Object(h.a)(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)},this.useSubscribe=function(e){n.subscribable=e},this.setInitialValues=function(e,t){n.initialValues=e||{},t&&(n.store=F({},e,n.store))},this.getInitialValue=function(e){return P(n.initialValues,e)},this.setCallbacks=function(e){n.callbacks=e},this.setValidateMessages=function(e){n.validateMessages=e},this.setPreserve=function(e){n.preserve=e},this.timeoutId=null,this.warningUnhooked=function(){0},this.getFieldEntities=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?n.fieldEntities.filter((function(e){return e.getNamePath().length})):n.fieldEntities},this.getFieldsMap=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new oe;return n.getFieldEntities(e).forEach((function(e){var n=e.getNamePath();t.set(n,e)})),t},this.getFieldEntitiesForNamePathList=function(e){if(!e)return n.getFieldEntities(!0);var t=n.getFieldsMap(!0);return e.map((function(e){var n=k(e);return t.get(n)||{INVALIDATE_NAME_PATH:k(e)}}))},this.getFieldsValue=function(e,t){if(n.warningUnhooked(),!0===e&&!t)return n.store;var r=n.getFieldEntitiesForNamePathList(Array.isArray(e)?e:null),o=[];return r.forEach((function(n){var r,a="INVALIDATE_NAME_PATH"in n?n.INVALIDATE_NAME_PATH:n.getNamePath();if(e||!(null===(r=n.isListField)||void 0===r?void 0:r.call(n)))if(t){var i="getMeta"in n?n.getMeta():null;t(i)&&o.push(a)}else o.push(a)})),D(n.store,o.map(k))},this.getFieldValue=function(e){n.warningUnhooked();var t=k(e);return P(n.store,t)},this.getFieldsError=function(e){return n.warningUnhooked(),n.getFieldEntitiesForNamePathList(e).map((function(t,n){return t&&!("INVALIDATE_NAME_PATH"in t)?{name:t.getNamePath(),errors:t.getErrors()}:{name:k(e[n]),errors:[]}}))},this.getFieldError=function(e){n.warningUnhooked();var t=k(e);return n.getFieldsError([t])[0].errors},this.isFieldsTouched=function(){n.warningUnhooked();for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o,a=t[0],i=t[1],c=!1;0===t.length?o=null:1===t.length?Array.isArray(a)?(o=a.map(k),c=!1):(o=null,c=a):(o=a.map(k),c=i);var l=n.getFieldEntities(!0),u=function(e){return e.isFieldTouched()};if(!o)return c?l.every(u):l.some(u);var f=new oe;o.forEach((function(e){f.set(e,[])})),l.forEach((function(e){var t=e.getNamePath();o.forEach((function(n){n.every((function(e,n){return t[n]===e}))&&f.update(n,(function(t){return[].concat(Object(s.a)(t),[e])}))}))}));var p=function(e){return e.some(u)},d=f.map((function(e){return e.value}));return c?d.every(p):d.some(p)},this.isFieldTouched=function(e){return n.warningUnhooked(),n.isFieldsTouched([e])},this.isFieldsValidating=function(e){n.warningUnhooked();var t=n.getFieldEntities();if(!e)return t.some((function(e){return e.isFieldValidating()}));var r=e.map(k);return t.some((function(e){var t=e.getNamePath();return R(r,t)&&e.isFieldValidating()}))},this.isFieldValidating=function(e){return n.warningUnhooked(),n.isFieldsValidating([e])},this.resetWithFieldInitialValue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new oe,r=n.getFieldEntities(!0);r.forEach((function(e){var n=e.props.initialValue,r=e.getNamePath();if(void 0!==n){var o=t.get(r)||new Set;o.add({entity:e,value:n}),t.set(r,o)}}));var o,a=function(r){r.forEach((function(r){if(void 0!==r.props.initialValue){var o=r.getNamePath();if(void 0!==n.getInitialValue(o))Object(h.a)(!1,"Form already set 'initialValues' with path '".concat(o.join("."),"'. Field can not overwrite it."));else{var a=t.get(o);if(a&&a.size>1)Object(h.a)(!1,"Multiple Field with path '".concat(o.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(a){var i=n.getFieldValue(o);e.skipExist&&void 0!==i||(n.store=T(n.store,o,Object(s.a)(a)[0].value))}}}}))};e.entities?o=e.entities:e.namePathList?(o=[],e.namePathList.forEach((function(e){var n,r=t.get(e);r&&(n=o).push.apply(n,Object(s.a)(Object(s.a)(r).map((function(e){return e.entity}))))}))):o=r,a(o)},this.resetFields=function(e){n.warningUnhooked();var t=n.store;if(!e)return n.store=F({},n.initialValues),n.resetWithFieldInitialValue(),void n.notifyObservers(t,null,{type:"reset"});var r=e.map(k);r.forEach((function(e){var t=n.getInitialValue(e);n.store=T(n.store,e,t)})),n.resetWithFieldInitialValue({namePathList:r}),n.notifyObservers(t,r,{type:"reset"})},this.setFields=function(e){n.warningUnhooked();var t=n.store;e.forEach((function(e){var r=e.name,o=(e.errors,Object(i.a)(e,["name","errors"])),a=k(r);"value"in o&&(n.store=T(n.store,a,o.value)),n.notifyObservers(t,[a],{type:"setField",data:e})}))},this.getFields=function(){return n.getFieldEntities(!0).map((function(e){var t=e.getNamePath(),r=e.getMeta(),o=Object(l.a)(Object(l.a)({},r),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(o,"originRCField",{value:!0}),o}))},this.initEntityValue=function(e){var t=e.props.initialValue;if(void 0!==t){var r=e.getNamePath();void 0===P(n.store,r)&&(n.store=T(n.store,r,t))}},this.registerField=function(e){if(n.fieldEntities.push(e),void 0!==e.props.initialValue){var t=n.store;n.resetWithFieldInitialValue({entities:[e],skipExist:!0}),n.notifyObservers(t,[e.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(t,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];n.fieldEntities=n.fieldEntities.filter((function(t){return t!==e}));var a=void 0!==r?r:n.preserve;if(!1===a&&(!t||o.length>1)){var i=e.getNamePath(),c=t?void 0:P(n.initialValues,i);i.length&&n.getFieldValue(i)!==c&&n.fieldEntities.every((function(e){return!K(e.getNamePath(),i)}))&&(n.store=T(n.store,i,c,!0))}}},this.dispatch=function(e){switch(e.type){case"updateValue":var t=e.namePath,r=e.value;n.updateValue(t,r);break;case"validateField":var o=e.namePath,a=e.triggerName;n.validateFields([o],{triggerName:a})}},this.notifyObservers=function(e,t,r){if(n.subscribable){var o=Object(l.a)(Object(l.a)({},r),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach((function(n){(0,n.onStoreChange)(e,t,o)}))}else n.forceRootUpdate()},this.updateValue=function(e,t){var r=k(e),o=n.store;n.store=T(n.store,r,t),n.notifyObservers(o,[r],{type:"valueUpdate",source:"internal"});var a=n.getDependencyChildrenFields(r);a.length&&n.validateFields(a),n.notifyObservers(o,a,{type:"dependenciesUpdate",relatedFields:[r].concat(Object(s.a)(a))});var i=n.callbacks.onValuesChange;i&&i(D(n.store,[r]),n.getFieldsValue());n.triggerOnFieldsChange([r].concat(Object(s.a)(a)))},this.setFieldsValue=function(e){n.warningUnhooked();var t=n.store;e&&(n.store=F(n.store,e)),n.notifyObservers(t,null,{type:"valueUpdate",source:"external"})},this.getDependencyChildrenFields=function(e){var t=new Set,r=[],o=new oe;n.getFieldEntities().forEach((function(e){(e.props.dependencies||[]).forEach((function(t){var n=k(t);o.update(n,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t}))}))}));return function e(n){(o.get(n)||new Set).forEach((function(n){if(!t.has(n)){t.add(n);var o=n.getNamePath();n.isFieldDirty()&&o.length&&(r.push(o),e(o))}}))}(e),r},this.triggerOnFieldsChange=function(e,t){var r=n.callbacks.onFieldsChange;if(r){var o=n.getFields();if(t){var a=new oe;t.forEach((function(e){var t=e.name,n=e.errors;a.set(t,n)})),o.forEach((function(e){e.errors=a.get(e.name)||e.errors}))}r(o.filter((function(t){var n=t.name;return R(e,n)})),o)}},this.validateFields=function(e,t){n.warningUnhooked();var r=!!e,o=r?e.map(k):[],a=[];n.getFieldEntities(!0).forEach((function(i){if(r||o.push(i.getNamePath()),(null==t?void 0:t.recursive)&&r){var c=i.getNamePath();c.every((function(t,n){return e[n]===t||void 0===e[n]}))&&o.push(c)}if(i.props.rules&&i.props.rules.length){var s=i.getNamePath();if(!r||R(o,s)){var u=i.validateRules(Object(l.a)({validateMessages:Object(l.a)(Object(l.a)({},H),n.validateMessages)},t));a.push(u.then((function(){return{name:s,errors:[]}})).catch((function(e){return Promise.reject({name:s,errors:e})})))}}}));var i=function(e){var t=!1,n=e.length,r=[];return e.length?new Promise((function(o,a){e.forEach((function(e,i){e.catch((function(e){return t=!0,e})).then((function(e){n-=1,r[i]=e,n>0||(t&&a(r),o(r))}))}))})):Promise.resolve([])}(a);n.lastValidatePromise=i,i.catch((function(e){return e})).then((function(e){var t=e.map((function(e){return e.name}));n.notifyObservers(n.store,t,{type:"validateFinish"}),n.triggerOnFieldsChange(t,e)}));var c=i.then((function(){return n.lastValidatePromise===i?Promise.resolve(n.getFieldsValue(o)):Promise.reject([])})).catch((function(e){var t=e.filter((function(e){return e&&e.errors.length}));return Promise.reject({values:n.getFieldsValue(o),errorFields:t,outOfDate:n.lastValidatePromise!==i})}));return c.catch((function(e){return e})),c},this.submit=function(){n.warningUnhooked(),n.validateFields().then((function(e){var t=n.callbacks.onFinish;if(t)try{t(e)}catch(r){console.error(r)}})).catch((function(e){var t=n.callbacks.onFinishFailed;t&&t(e)}))},this.forceRootUpdate=t};var ie=function(e){var t=o.useRef(),n=o.useState({}),r=Object(te.a)(n,2)[1];if(!t.current)if(e)t.current=e;else{var a=new ae((function(){r({})}));t.current=a.getForm()}return[t.current]},ce=o.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),le=function(e){var t=e.validateMessages,n=e.onFormChange,r=e.onFormFinish,a=e.children,i=o.useContext(ce),s=o.useRef({});return o.createElement(ce.Provider,{value:Object(l.a)(Object(l.a)({},i),{},{validateMessages:Object(l.a)(Object(l.a)({},i.validateMessages),t),triggerFormChange:function(e,t){n&&n(e,{changedFields:t,forms:s.current}),i.triggerFormChange(e,t)},triggerFormFinish:function(e,t){r&&r(e,{values:t,forms:s.current}),i.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(s.current=Object(l.a)(Object(l.a)({},s.current),{},Object(c.a)({},e,t))),i.registerForm(e,t)},unregisterForm:function(e){var t=Object(l.a)({},s.current);delete t[e],s.current=t,i.unregisterForm(e)}})},a)},se=ce,ue=function(e,t){var n=e.name,a=e.initialValues,c=e.fields,u=e.form,f=e.preserve,p=e.children,d=e.component,m=void 0===d?"form":d,v=e.validateMessages,h=e.validateTrigger,g=void 0===h?"onChange":h,O=e.onValuesChange,j=e.onFieldsChange,C=e.onFinish,E=e.onFinishFailed,x=Object(i.a)(e,["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"]),I=o.useContext(se),M=ie(u),N=Object(te.a)(M,1)[0],S=N.getInternalHooks(b),A=S.useSubscribe,k=S.setInitialValues,P=S.setCallbacks,T=S.setValidateMessages,D=S.setPreserve;o.useImperativeHandle(t,(function(){return N})),o.useEffect((function(){return I.registerForm(n,N),function(){I.unregisterForm(n)}}),[I,N,n]),T(Object(l.a)(Object(l.a)({},I.validateMessages),v)),P({onValuesChange:O,onFieldsChange:function(e){if(I.triggerFormChange(n,e),j){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];j.apply(void 0,[e].concat(r))}},onFinish:function(e){I.triggerFormFinish(n,e),C&&C(e)},onFinishFailed:E}),D(f);var R=o.useRef(null);k(a,!R.current),R.current||(R.current=!0);var z=p,L="function"==typeof p;L&&(z=p(N.getFieldsValue(!0),N));A(!L);var F=o.useRef();o.useEffect((function(){(function(e,t){if(e===t)return!0;if(!e&&t||e&&!t)return!1;if(!e||!t||"object"!==Object(w.a)(e)||"object"!==Object(w.a)(t))return!1;var n=Object.keys(e),r=Object.keys(t),o=new Set([].concat(Object(s.a)(n),Object(s.a)(r)));return Object(s.a)(o).every((function(n){var r=e[n],o=t[n];return"function"==typeof r&&"function"==typeof o||r===o}))})(F.current||[],c||[])||N.setFields(c||[]),F.current=c}),[c,N]);var K=o.useMemo((function(){return Object(l.a)(Object(l.a)({},N),{},{validateTrigger:g})}),[N,g]),V=o.createElement(y.Provider,{value:K},z);return!1===m?V:o.createElement(m,Object(r.a)({},x,{onSubmit:function(e){e.preventDefault(),e.stopPropagation(),N.submit()},onReset:function(e){var t;e.preventDefault(),N.resetFields(),null===(t=x.onReset)||void 0===t||t.call(x,e)}}),V)},fe=o.forwardRef(ue);fe.FormProvider=le,fe.Field=$,fe.List=ee,fe.useForm=ie;var pe=n("YrtM"),de=n("uaoM"),me=n("ZvpZ"),ve=Object(r.a)({},me.a.Modal);function he(e){ve=e?Object(r.a)(Object(r.a)({},ve),e):Object(r.a)({},me.a.Modal)}var be=n("YlG9"),ge=function(e){Object(d.a)(n,e);var t=Object(m.a)(n);function n(e){var r;return Object(u.a)(this,n),r=t.call(this,e),he(e.locale&&e.locale.Modal),Object(de.a)("internalMark"===e._ANT_MARK__,"LocaleProvider","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale"),r}return Object(f.a)(n,[{key:"componentDidMount",value:function(){he(this.props.locale&&this.props.locale.Modal)}},{key:"componentDidUpdate",value:function(e){var t=this.props.locale;e.locale!==t&&he(t&&t.Modal)}},{key:"componentWillUnmount",value:function(){he()}},{key:"render",value:function(){var e=this.props,t=e.locale,n=e.children;return o.createElement(be.a.Provider,{value:Object(r.a)(Object(r.a)({},t),{exist:!0})},n)}}]),n}(o.Component);ge.defaultProps={locale:{}};var ye=n("YMnH"),Oe=n("H84U"),je=n("3Nzz"),Ce=n("TSYQ"),Ee=n.n(Ce),we=n("i8i4"),xe=n.n(we),Ie=n("8XRh"),Me=function(e){Object(d.a)(n,e);var t=Object(m.a)(n);function n(){var e;return Object(u.a)(this,n),(e=t.apply(this,arguments)).closeTimer=null,e.close=function(t){t&&t.stopPropagation(),e.clearCloseTimer();var n=e.props,r=n.onClose,o=n.noticeKey;r&&r(o)},e.startCloseTimer=function(){e.props.duration&&(e.closeTimer=window.setTimeout((function(){e.close()}),1e3*e.props.duration))},e.clearCloseTimer=function(){e.closeTimer&&(clearTimeout(e.closeTimer),e.closeTimer=null)},e}return Object(f.a)(n,[{key:"componentDidMount",value:function(){this.startCloseTimer()}},{key:"componentDidUpdate",value:function(e){this.props.duration===e.duration&&this.props.updateMark===e.updateMark||this.restartCloseTimer()}},{key:"componentWillUnmount",value:function(){this.clearCloseTimer()}},{key:"restartCloseTimer",value:function(){this.clearCloseTimer(),this.startCloseTimer()}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,a=t.className,i=t.closable,l=t.closeIcon,s=t.style,u=t.onClick,f=t.children,p=t.holder,d="".concat(n,"-notice"),m=Object.keys(this.props).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(t[n]=e.props[n]),t}),{}),v=o.createElement("div",Object(r.a)({className:Ee()(d,a,Object(c.a)({},"".concat(d,"-closable"),i)),style:s,onMouseEnter:this.clearCloseTimer,onMouseLeave:this.startCloseTimer,onClick:u},m),o.createElement("div",{className:"".concat(d,"-content")},f),i?o.createElement("a",{tabIndex:0,onClick:this.close,className:"".concat(d,"-close")},l||o.createElement("span",{className:"".concat(d,"-close-x")})):null);return p?xe.a.createPortal(v,p):v}}]),n}(o.Component);function Ne(e){var t=o.useRef({}),n=o.useState([]),a=Object(te.a)(n,2),i=a[0],c=a[1];return[function(n){var a=!0;e.add(n,(function(e,n){var i=n.key;if(e&&(!t.current[i]||a)){var l=o.createElement(Me,Object(r.a)({},n,{holder:e}));t.current[i]=l,c((function(e){var t=e.findIndex((function(e){return e.key===n.key}));if(-1===t)return[].concat(Object(s.a)(e),[l]);var r=Object(s.a)(e);return r[t]=l,r}))}a=!1}))},o.createElement(o.Fragment,null,i)]}Me.defaultProps={onClose:function(){},duration:1.5};var Se=0,Ae=Date.now();function ke(){var e=Se;return Se+=1,"rcNotification_".concat(Ae,"_").concat(e)}var Pe=function(e){Object(d.a)(n,e);var t=Object(m.a)(n);function n(){var e;return Object(u.a)(this,n),(e=t.apply(this,arguments)).state={notices:[]},e.hookRefs=new Map,e.add=function(t,n){var r=t.key||ke(),o=Object(l.a)(Object(l.a)({},t),{},{key:r}),a=e.props.maxCount;e.setState((function(e){var t=e.notices,i=t.map((function(e){return e.notice.key})).indexOf(r),c=t.concat();return-1!==i?c.splice(i,1,{notice:o,holderCallback:n}):(a&&t.length>=a&&(o.key=c[0].notice.key,o.updateMark=ke(),o.userPassKey=r,c.shift()),c.push({notice:o,holderCallback:n})),{notices:c}}))},e.remove=function(t){e.setState((function(e){return{notices:e.notices.filter((function(e){var n=e.notice,r=n.key;return(n.userPassKey||r)!==t}))}}))},e.noticePropsMap={},e}return Object(f.a)(n,[{key:"getTransitionName",value:function(){var e=this.props,t=e.prefixCls,n=e.animation,r=this.props.transitionName;return!r&&n&&(r="".concat(t,"-").concat(n)),r}},{key:"render",value:function(){var e=this,t=this.state.notices,n=this.props,a=n.prefixCls,i=n.className,c=n.closeIcon,s=n.style,u=[];return t.forEach((function(n,r){var o=n.notice,i=n.holderCallback,s=r===t.length-1?o.updateMark:void 0,f=o.key,p=o.userPassKey,d=Object(l.a)(Object(l.a)(Object(l.a)({prefixCls:a,closeIcon:c},o),o.props),{},{key:f,noticeKey:p||f,updateMark:s,onClose:function(t){var n;e.remove(t),null===(n=o.onClose)||void 0===n||n.call(o)},onClick:o.onClick,children:o.content});u.push(f),e.noticePropsMap[f]={props:d,holderCallback:i}})),o.createElement("div",{className:Ee()(a,i),style:s},o.createElement(Ie.a,{keys:u,motionName:this.getTransitionName(),onVisibleChanged:function(t,n){var r=n.key;t||delete e.noticePropsMap[r]}},(function(t){var n=t.key,i=t.className,c=t.style,s=e.noticePropsMap[n],u=s.props,f=s.holderCallback;return f?o.createElement("div",{key:n,className:Ee()(i,"".concat(a,"-hook-holder")),style:Object(l.a)({},c),ref:function(t){void 0!==n&&(t?(e.hookRefs.set(n,t),f(t,u)):e.hookRefs.delete(n))}}):o.createElement(Me,Object(r.a)({},u,{className:Ee()(i,null==u?void 0:u.className),style:Object(l.a)(Object(l.a)({},c),null==u?void 0:u.style)}))})))}}]),n}(o.Component);Pe.defaultProps={prefixCls:"rc-notification",animation:"fade",style:{top:65,left:"50%"}},Pe.newInstance=function(e,t){var n=e||{},a=n.getContainer,c=Object(i.a)(n,["getContainer"]),l=document.createElement("div");a?a().appendChild(l):document.body.appendChild(l);var s=!1;xe.a.render(o.createElement(Pe,Object(r.a)({},c,{ref:function(e){s||(s=!0,t({notice:function(t){e.add(t)},removeNotice:function(t){e.remove(t)},component:e,destroy:function(){xe.a.unmountComponentAtNode(l),l.parentNode&&l.parentNode.removeChild(l)},useNotification:function(){return Ne(e)}}))}})),l)};var Te=Pe,De=n("ye1Q"),Re={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},ze=n("6VBw"),Le=function(e,t){return o.createElement(ze.a,Object.assign({},e,{ref:t,icon:Re}))};Le.displayName="ExclamationCircleFilled";var Fe=o.forwardRef(Le),Ke=n("jN4g"),Ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"},Ue=function(e,t){return o.createElement(ze.a,Object.assign({},e,{ref:t,icon:Ve}))};Ue.displayName="CheckCircleFilled";var Be,He=o.forwardRef(Ue),Qe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},We=function(e,t){return o.createElement(ze.a,Object.assign({},e,{ref:t,icon:Qe}))};We.displayName="InfoCircleFilled";var Je,Ge,Ze,Ye=3,qe=1,Xe="",_e="move-up",$e=!1,et=!1;function tt(e,t){var n=e.prefixCls,r=Vt(),o=r.getPrefixCls,a=r.getRootPrefixCls,i=o("message",n||Xe),c=a(e.rootPrefixCls,i);if(Be)t({prefixCls:i,rootPrefixCls:c,instance:Be});else{var l={prefixCls:i,transitionName:$e?_e:"".concat(c,"-").concat(_e),style:{top:Je},getContainer:Ge,maxCount:Ze};Te.newInstance(l,(function(e){Be?t({prefixCls:i,rootPrefixCls:c,instance:Be}):(Be=e,t({prefixCls:i,rootPrefixCls:c,instance:e}))}))}}var nt={info:o.forwardRef(We),success:He,error:Ke.a,warning:Fe,loading:De.a};function rt(e,t){var n,r=void 0!==e.duration?e.duration:Ye,a=nt[e.type],i=Ee()("".concat(t,"-custom-content"),(n={},Object(c.a)(n,"".concat(t,"-").concat(e.type),e.type),Object(c.a)(n,"".concat(t,"-rtl"),!0===et),n));return{key:e.key,duration:r,style:e.style||{},className:e.className,content:o.createElement("div",{className:i},e.icon||a&&o.createElement(a,null),o.createElement("span",null,e.content)),onClose:e.onClose,onClick:e.onClick}}var ot,at,it={open:function(e){var t=e.key||qe++,n=new Promise((function(n){var o=function(){return"function"==typeof e.onClose&&e.onClose(),n(!0)};tt(e,(function(n){var a=n.prefixCls;n.instance.notice(rt(Object(r.a)(Object(r.a)({},e),{key:t,onClose:o}),a))}))})),o=function(){Be&&Be.removeNotice(t)};return o.then=function(e,t){return n.then(e,t)},o.promise=n,o},config:function(e){void 0!==e.top&&(Je=e.top,Be=null),void 0!==e.duration&&(Ye=e.duration),void 0!==e.prefixCls&&(Xe=e.prefixCls),void 0!==e.getContainer&&(Ge=e.getContainer),void 0!==e.transitionName&&(_e=e.transitionName,Be=null,$e=!0),void 0!==e.maxCount&&(Ze=e.maxCount,Be=null),void 0!==e.rtl&&(et=e.rtl)},destroy:function(e){if(Be)if(e){(0,Be.removeNotice)(e)}else{var t=Be.destroy;t(),Be=null}}};function ct(e,t){e[t]=function(n,o,a){return function(e){return"[object Object]"===Object.prototype.toString.call(e)&&!!e.content}(n)?e.open(Object(r.a)(Object(r.a)({},n),{type:t})):("function"==typeof o&&(a=o,o=void 0),e.open({content:n,duration:o,type:t,onClose:a}))}}["success","info","warning","error","loading"].forEach((function(e){return ct(it,e)})),it.warn=it.warning,it.useMessage=(ot=tt,at=rt,function(){var e,t=null,n=Ne({add:function(e,n){null==t||t.component.add(e,n)}}),a=Object(te.a)(n,2),i=a[0],c=a[1],l=o.useRef({});return l.current.open=function(n){var o=n.prefixCls,a=e("message",o),c=e(),l=n.key||qe++,s=new Promise((function(e){var o=function(){return"function"==typeof n.onClose&&n.onClose(),e(!0)};ot(Object(r.a)(Object(r.a)({},n),{prefixCls:a,rootPrefixCls:c}),(function(e){var a=e.prefixCls,c=e.instance;t=c,i(at(Object(r.a)(Object(r.a)({},n),{key:l,onClose:o}),a))}))})),u=function(){t&&t.removeNotice(l)};return u.then=function(e,t){return s.then(e,t)},u.promise=s,u},["success","info","warning","error","loading"].forEach((function(e){return ct(l.current,e)})),[l.current,o.createElement(Oe.a,{key:"holder"},(function(t){return e=t.getPrefixCls,c}))]});var lt=it,st=n("4i/N"),ut={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"},ft=function(e,t){return o.createElement(ze.a,Object.assign({},e,{ref:t,icon:ut}))};ft.displayName="CheckCircleOutlined";var pt=o.forwardRef(ft),dt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z"}},{tag:"path",attrs:{d:"M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"close-circle",theme:"outlined"},mt=function(e,t){return o.createElement(ze.a,Object.assign({},e,{ref:t,icon:dt}))};mt.displayName="CloseCircleOutlined";var vt=o.forwardRef(mt),ht={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},bt=function(e,t){return o.createElement(ze.a,Object.assign({},e,{ref:t,icon:ht}))};bt.displayName="ExclamationCircleOutlined";var gt=o.forwardRef(bt),yt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},Ot=function(e,t){return o.createElement(ze.a,Object.assign({},e,{ref:t,icon:yt}))};Ot.displayName="InfoCircleOutlined";var jt,Ct,Et={},wt=4.5,xt=24,It=24,Mt="",Nt="topRight",St=!1;function At(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xt,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:It;switch(e){case"topLeft":t={left:0,top:n,bottom:"auto"};break;case"topRight":t={right:0,top:n,bottom:"auto"};break;case"bottomLeft":t={left:0,top:"auto",bottom:r};break;default:t={right:0,top:"auto",bottom:r}}return t}function kt(e,t){var n=e.placement,r=void 0===n?Nt:n,a=e.top,i=e.bottom,l=e.getContainer,s=void 0===l?jt:l,u=e.closeIcon,f=void 0===u?Ct:u,p=e.prefixCls,d=(0,Vt().getPrefixCls)("notification",p||Mt),m="".concat(d,"-").concat(r),v=Et[m];if(v)Promise.resolve(v).then((function(e){t({prefixCls:"".concat(d,"-notice"),instance:e})}));else{var h=o.createElement("span",{className:"".concat(d,"-close-x")},f||o.createElement(st.a,{className:"".concat(d,"-close-icon")})),b=Ee()("".concat(d,"-").concat(r),Object(c.a)({},"".concat(d,"-rtl"),!0===St));Et[m]=new Promise((function(e){Te.newInstance({prefixCls:d,className:b,style:At(r,a,i),getContainer:s,closeIcon:h},(function(n){e(n),t({prefixCls:"".concat(d,"-notice"),instance:n})}))}))}}var Pt={success:pt,info:o.forwardRef(Ot),error:vt,warning:gt};function Tt(e,t){var n=e.duration,r=e.icon,a=e.type,i=e.description,l=e.message,s=e.btn,u=e.onClose,f=e.onClick,p=e.key,d=e.style,m=e.className,v=void 0===n?wt:n,h=null;r?h=o.createElement("span",{className:"".concat(t,"-icon")},e.icon):a&&(h=o.createElement(Pt[a]||null,{className:"".concat(t,"-icon ").concat(t,"-icon-").concat(a)}));var b=!i&&h?o.createElement("span",{className:"".concat(t,"-message-single-line-auto-margin")}):null;return{content:o.createElement("div",{className:h?"".concat(t,"-with-icon"):"",role:"alert"},h,o.createElement("div",{className:"".concat(t,"-message")},b,l),o.createElement("div",{className:"".concat(t,"-description")},i),s?o.createElement("span",{className:"".concat(t,"-btn")},s):null),duration:v,closable:!0,onClose:u,onClick:f,key:p,style:d||{},className:Ee()(m,Object(c.a)({},"".concat(t,"-").concat(a),!!a))}}var Dt={open:function(e){kt(e,(function(t){var n=t.prefixCls;t.instance.notice(Tt(e,n))}))},close:function(e){Object.keys(Et).forEach((function(t){return Promise.resolve(Et[t]).then((function(t){t.removeNotice(e)}))}))},config:function(e){var t=e.duration,n=e.placement,r=e.bottom,o=e.top,a=e.getContainer,i=e.closeIcon,c=e.prefixCls;void 0!==c&&(Mt=c),void 0!==t&&(wt=t),void 0!==n?Nt=n:e.rtl&&(Nt="topLeft"),void 0!==r&&(It=r),void 0!==o&&(xt=o),void 0!==a&&(jt=a),void 0!==i&&(Ct=i),void 0!==e.rtl&&(St=e.rtl)},destroy:function(){Object.keys(Et).forEach((function(e){Promise.resolve(Et[e]).then((function(e){e.destroy()})),delete Et[e]}))}};["success","info","warning","error"].forEach((function(e){Dt[e]=function(t){return Dt.open(Object(r.a)(Object(r.a)({},t),{type:e}))}})),Dt.warn=Dt.warning,Dt.useNotification=function(e,t){return function(){var n,a=null,i=Ne({add:function(e,t){null==a||a.component.add(e,t)}}),c=Object(te.a)(i,2),l=c[0],s=c[1];var u=o.useRef({});return u.current.open=function(o){var i=o.prefixCls,c=n("notification",i);e(Object(r.a)(Object(r.a)({},o),{prefixCls:c}),(function(e){var n=e.prefixCls,r=e.instance;a=r,l(t(o,n))}))},["success","info","warning","error"].forEach((function(e){u.current[e]=function(t){return u.current.open(Object(r.a)(Object(r.a)({},t),{type:e}))}})),[u.current,o.createElement(Oe.a,{key:"holder"},(function(e){return n=e.getPrefixCls,s}))]}}(kt,Tt);var Rt,zt=Dt,Lt=["getTargetContainer","getPopupContainer","rootPrefixCls","getPrefixCls","renderEmpty","csp","autoInsertSpaceInButton","locale","pageHeader"],Ft=["getTargetContainer","getPopupContainer","renderEmpty","pageHeader","input","form"];function Kt(){return Rt||"ant"}var Vt=function(){return{getPrefixCls:function(e,t){return t||(e?"".concat(Kt(),"-").concat(e):Kt())},getRootPrefixCls:function(e,t){return e||(Rt||(t&&t.includes("-")?t.replace(/^(.*)-[^-]*$/,"$1"):Kt()))}}},Ut=function(e){var t=e.children,n=e.csp,i=e.autoInsertSpaceInButton,c=e.form,l=e.locale,s=e.componentSize,u=e.direction,f=e.space,p=e.virtual,d=e.dropdownMatchSelectWidth,m=e.legacyLocale,v=e.parentContext,h=e.iconPrefixCls,b=o.useCallback((function(t,n){var r=e.prefixCls;if(n)return n;var o=r||v.getPrefixCls("");return t?"".concat(o,"-").concat(t):o}),[v.getPrefixCls]),g=Object(r.a)(Object(r.a)({},v),{csp:n,autoInsertSpaceInButton:i,locale:l||m,direction:u,space:f,virtual:p,dropdownMatchSelectWidth:d,getPrefixCls:b});Ft.forEach((function(t){var n=e[t];n&&(g[t]=n)}));var y=Object(pe.a)((function(){return g}),g,(function(e,t){var n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||n.some((function(n){return e[n]!==t[n]}))})),O=o.useMemo((function(){return{prefixCls:h,csp:n}}),[h]),j=t,C={};return l&&l.Form&&l.Form.defaultValidateMessages&&(C=l.Form.defaultValidateMessages),c&&c.validateMessages&&(C=Object(r.a)(Object(r.a)({},C),c.validateMessages)),Object.keys(C).length>0&&(j=o.createElement(le,{validateMessages:C},t)),l&&(j=o.createElement(ge,{locale:l,_ANT_MARK__:"internalMark"},j)),h&&(j=o.createElement(a.a.Provider,{value:O},j)),s&&(j=o.createElement(je.a,{size:s},j)),o.createElement(Oe.b.Provider,{value:y},j)},Bt=function(e){return o.useEffect((function(){e.direction&&(lt.config({rtl:"rtl"===e.direction}),zt.config({rtl:"rtl"===e.direction}))}),[e.direction]),o.createElement(ye.a,null,(function(t,n,a){return o.createElement(Oe.a,null,(function(t){return o.createElement(Ut,Object(r.a)({parentContext:t,legacyLocale:a},e))}))}))};Bt.ConfigContext=Oe.b,Bt.SizeContext=je.b,Bt.config=function(e){void 0!==e.prefixCls&&(Rt=e.prefixCls)}}}]);
//# sourceMappingURL=component---src-pages-index-jsx-8935528286d1b9fe679d.js.map |
# coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="delete_macros_online_request.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# 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.
# </summary>
# -----------------------------------------------------------------------------------
import json
from six.moves.urllib.parse import quote
from asposewordscloud import *
from asposewordscloud.models import *
from asposewordscloud.models.requests import *
from asposewordscloud.models.responses import *
class DeleteMacrosOnlineRequest(BaseRequestObject):
"""
Request model for delete_macros_online operation.
Initializes a new instance.
:param document The document.
:param load_encoding Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
:param password Password for opening an encrypted document.
:param dest_file_name Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
:param revision_author Initials of the author to use for revisions.If you set this parameter and then make some changes to the document programmatically, save the document and later open the document in MS Word you will see these changes as revisions.
:param revision_date_time The date and time to use for revisions.
"""
def __init__(self, document, load_encoding=None, password=None, dest_file_name=None, revision_author=None, revision_date_time=None):
self.document = document
self.load_encoding = load_encoding
self.password = password
self.dest_file_name = dest_file_name
self.revision_author = revision_author
self.revision_date_time = revision_date_time
def create_http_request(self, api_client):
# verify the required parameter 'document' is set
if self.document is None:
raise ValueError("Missing the required parameter `document` when calling `delete_macros_online`") # noqa: E501
path = '/v4.0/words/online/delete/macros'
path_params = {}
# path parameters
collection_formats = {}
if path_params:
path_params = api_client.sanitize_for_serialization(path_params)
path_params = api_client.parameters_to_tuples(path_params, collection_formats)
for k, v in path_params:
# specified safe chars, encode everything
path = path.replace(
'{%s}' % k,
quote(str(v), safe=api_client.configuration.safe_chars_for_path_param)
)
# remove optional path parameters
path = path.replace('//', '/')
query_params = []
if self.load_encoding is not None:
query_params.append(('loadEncoding', self.load_encoding)) # noqa: E501
if self.password is not None:
query_params.append(('password', self.password)) # noqa: E501
if self.dest_file_name is not None:
query_params.append(('destFileName', self.dest_file_name)) # noqa: E501
if self.revision_author is not None:
query_params.append(('revisionAuthor', self.revision_author)) # noqa: E501
if self.revision_date_time is not None:
query_params.append(('revisionDateTime', self.revision_date_time)) # noqa: E501
header_params = {}
# HTTP header `Content-Type`
header_params['Content-Type'] = api_client.select_header_content_type( # noqa: E501
['multipart/form-data']) # noqa: E501
form_params = []
if self.document is not None:
form_params.append(['document', self.document, 'file']) # noqa: E501
body_params = None
return {
"method": "PUT",
"path": path,
"query_params": query_params,
"header_params": header_params,
"form_params": form_params,
"body": body_params,
"collection_formats": collection_formats,
"response_type": 'file' # noqa: E501
}
def get_response_type(self):
return 'file' # noqa: E501
def deserialize_response(self, api_client, response):
return self.deserialize_file(response.data, response.getheaders(), api_client)
|
import React, {Component} from 'react';
import {Avatar, Chip, withStyles} from "@material-ui/core";
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
import withRoot from "../withRoot";
import {blue, blueGrey, grey, red} from "@material-ui/core/colors";
import postgres from '../assets/images/psql.svg';
import rails from '../assets/images/rails.png';
const styles = theme => ({
chip: {
margin: theme.spacing(0.5),
},
reactAvatar: {
color: blue[200],
backgroundColor: grey[900]
},
angularAvatar: {
color: grey[50],
backgroundColor: red[900]
},
pythonAvatar: {
color: blue[500],
backgroundColor: blueGrey[200]
},
railsAvatar: {
color: grey[50],
backgroundColor: red[900]
},
postgresAvatar: {
backgroundColor: blueGrey[50]
},
defaultAvatar: {
color: blueGrey[50],
backgroundColor: blueGrey[900]
}
});
class Technology extends Component {
technologyIcon = (technologyName, classes) => {
switch (technologyName.toLowerCase()) {
case 'react':
return (<Avatar className={classes.reactAvatar}>
<FontAwesomeIcon icon={['fab', 'react']}/>
</Avatar>);
case 'python':
return (<Avatar className={classes.pythonAvatar}>
<FontAwesomeIcon icon={['fab', 'python']}/>
</Avatar>);
case 'angular':
return (<Avatar className={classes.angularAvatar}>
<FontAwesomeIcon icon={['fab', 'angular']}/>
</Avatar>);
case 'postgresql':
return (<Avatar className={classes.postgresAvatar} src={postgres}/>);
case 'ruby on rails':
return (<Avatar className={classes.railsAvatar} src={rails}/>);
default:
return (<Avatar className={classes.defaultAvatar}>{technologyName.toUpperCase()[0]}</Avatar>);
}
};
render() {
const {classes} = this.props;
return (
<Chip className={classes.chip} label={this.props.label} variant="outlined"
avatar={this.technologyIcon(this.props.label, classes)}/>
)
}
}
export default withRoot(withStyles(styles)(Technology)); |
// @flow
import type { Course } from 'lib/types';
export const actionTypes = {
SET_COURSES: 'dgclr/SET_COURSES',
};
/**
* Set courses action
* @param {Array} courses
* @return {Object} action of SET_COURSES
*/
export const setCourses = (courses: Array<Course> = []) => ({
type: actionTypes.SET_COURSES,
courses,
});
|
'use strict';
/**
* DESIGN NOTES
*
* The design decisions behind the scope are heavily favored for speed and memory consumption.
*
* The typical use of scope is to watch the expressions, which most of the time return the same
* value as last time so we optimize the operation.
*
* Closures construction is expensive in terms of speed as well as memory:
* - No closures, instead use prototypical inheritance for API
* - Internal state needs to be stored on scope directly, which means that private state is
* exposed as $$____ properties
*
* Loop operations are optimized by using while(count--) { ... }
* - this means that in order to keep the same order of execution as addition we have to add
* items to the array at the beginning (unshift) instead of at the end (push)
*
* Child scopes are created and removed often
* - Using an array would be slow since inserts in middle are expensive so we use linked list
*
* There are few watches then a lot of observers. This is why you don't want the observer to be
* implemented in the same way as watch. Watch requires return of initialization function which
* are expensive to construct.
*/
/**
* @ngdoc provider
* @name $rootScopeProvider
* @description
*
* Provider for the $rootScope service.
*/
/**
* @ngdoc method
* @name $rootScopeProvider#digestTtl
* @description
*
* Sets the number of `$digest` iterations the scope should attempt to execute before giving up and
* assuming that the model is unstable.
*
* The current default is 10 iterations.
*
* In complex applications it's possible that the dependencies between `$watch`s will result in
* several digest iterations. However if an application needs more than the default 10 digest
* iterations for its model to stabilize then you should investigate what is causing the model to
* continuously change during the digest.
*
* Increasing the TTL could have performance implications, so you should not change it without
* proper justification.
*
* @param {number} limit The number of digest iterations.
*/
/**
* @ngdoc service
* @name $rootScope
* @description
*
* Every application has a single root {@link ng.$rootScope.Scope scope}.
* All other scopes are descendant scopes of the root scope. Scopes provide separation
* between the model and the view, via a mechanism for watching the model for changes.
* They also provide an event emission/broadcast and subscription facility. See the
* {@link guide/scope developer guide on scopes}.
*/
function $RootScopeProvider(){
var TTL = 10;
var $rootScopeMinErr = minErr('$rootScope');
var lastDirtyWatch = null;
this.digestTtl = function(value) {
if (arguments.length) {
TTL = value;
}
return TTL;
};
this.$get = ['$injector', '$exceptionHandler', '$parse', '$browser',
function( $injector, $exceptionHandler, $parse, $browser) {
/**
* @ngdoc type
* @name $rootScope.Scope
*
* @description
* A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the
* {@link auto.$injector $injector}. Child scopes are created using the
* {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when
* compiled HTML template is executed.)
*
* Here is a simple scope snippet to show how you can interact with the scope.
* ```html
* <file src="./test/ng/rootScopeSpec.js" tag="docs1" />
* ```
*
* # Inheritance
* A scope can inherit from a parent scope, as in this example:
* ```js
var parent = $rootScope;
var child = parent.$new();
parent.salutation = "Hello";
child.name = "World";
expect(child.salutation).toEqual('Hello');
child.salutation = "Welcome";
expect(child.salutation).toEqual('Welcome');
expect(parent.salutation).toEqual('Hello');
* ```
*
*
* @param {Object.<string, function()>=} providers Map of service factory which need to be
* provided for the current scope. Defaults to {@link ng}.
* @param {Object.<string, *>=} instanceCache Provides pre-instantiated services which should
* append/override services provided by `providers`. This is handy
* when unit-testing and having the need to override a default
* service.
* @returns {Object} Newly created scope.
*
*/
function Scope() {
this.$id = nextUid();
this.$$phase = this.$parent = this.$$watchers =
this.$$nextSibling = this.$$prevSibling =
this.$$childHead = this.$$childTail = null;
this['this'] = this.$root = this;
this.$$destroyed = false;
this.$$asyncQueue = [];
this.$$postDigestQueue = [];
this.$$listeners = {};
this.$$listenerCount = {};
this.$$isolateBindings = {};
}
/**
* @ngdoc property
* @name $rootScope.Scope#$id
* @returns {number} Unique scope ID (monotonically increasing alphanumeric sequence) useful for
* debugging.
*/
Scope.prototype = {
constructor: Scope,
/**
* @ngdoc method
* @name $rootScope.Scope#$new
* @function
*
* @description
* Creates a new child {@link ng.$rootScope.Scope scope}.
*
* The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} and
* {@link ng.$rootScope.Scope#$digest $digest()} events. The scope can be removed from the
* scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}.
*
* {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is
* desired for the scope and its child scopes to be permanently detached from the parent and
* thus stop participating in model change detection and listener notification by invoking.
*
* @param {boolean} isolate If true, then the scope does not prototypically inherit from the
* parent scope. The scope is isolated, as it can not see parent scope properties.
* When creating widgets, it is useful for the widget to not accidentally read parent
* state.
*
* @returns {Object} The newly created child scope.
*
*/
$new: function(isolate) {
var ChildScope,
child;
if (isolate) {
child = new Scope();
child.$root = this.$root;
// ensure that there is just one async queue per $rootScope and its children
child.$$asyncQueue = this.$$asyncQueue;
child.$$postDigestQueue = this.$$postDigestQueue;
} else {
// Only create a child scope class if somebody asks for one,
// but cache it to allow the VM to optimize lookups.
if (!this.$$childScopeClass) {
this.$$childScopeClass = function() {
this.$$watchers = this.$$nextSibling =
this.$$childHead = this.$$childTail = null;
this.$$listeners = {};
this.$$listenerCount = {};
this.$id = nextUid();
this.$$childScopeClass = null;
};
this.$$childScopeClass.prototype = this;
}
child = new this.$$childScopeClass();
}
child['this'] = child;
child.$parent = this;
child.$$prevSibling = this.$$childTail;
if (this.$$childHead) {
this.$$childTail.$$nextSibling = child;
this.$$childTail = child;
} else {
this.$$childHead = this.$$childTail = child;
}
return child;
},
/**
* @ngdoc method
* @name $rootScope.Scope#$watch
* @function
*
* @description
* Registers a `listener` callback to be executed whenever the `watchExpression` changes.
*
* - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest
* $digest()} and should return the value that will be watched. (Since
* {@link ng.$rootScope.Scope#$digest $digest()} reruns when it detects changes the
* `watchExpression` can execute multiple times per
* {@link ng.$rootScope.Scope#$digest $digest()} and should be idempotent.)
* - The `listener` is called only when the value from the current `watchExpression` and the
* previous call to `watchExpression` are not equal (with the exception of the initial run,
* see below). The inequality is determined according to
* {@link angular.equals} function. To save the value of the object for later comparison,
* the {@link angular.copy} function is used. It also means that watching complex options
* will have adverse memory and performance implications.
* - The watch `listener` may change the model, which may trigger other `listener`s to fire.
* This is achieved by rerunning the watchers until no changes are detected. The rerun
* iteration limit is 10 to prevent an infinite loop deadlock.
*
*
* If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called,
* you can register a `watchExpression` function with no `listener`. (Since `watchExpression`
* can execute multiple times per {@link ng.$rootScope.Scope#$digest $digest} cycle when a
* change is detected, be prepared for multiple calls to your listener.)
*
* After a watcher is registered with the scope, the `listener` fn is called asynchronously
* (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the
* watcher. In rare cases, this is undesirable because the listener is called when the result
* of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you
* can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the
* listener was called due to initialization.
*
* The example below contains an illustration of using a function as your $watch listener
*
*
* # Example
* ```js
// let's assume that scope was dependency injected as the $rootScope
var scope = $rootScope;
scope.name = 'misko';
scope.counter = 0;
expect(scope.counter).toEqual(0);
scope.$watch('name', function(newValue, oldValue) {
scope.counter = scope.counter + 1;
});
expect(scope.counter).toEqual(0);
scope.$digest();
// no variable change
expect(scope.counter).toEqual(0);
scope.name = 'adam';
scope.$digest();
expect(scope.counter).toEqual(1);
// Using a listener function
var food;
scope.foodCounter = 0;
expect(scope.foodCounter).toEqual(0);
scope.$watch(
// This is the listener function
function() { return food; },
// This is the change handler
function(newValue, oldValue) {
if ( newValue !== oldValue ) {
// Only increment the counter if the value changed
scope.foodCounter = scope.foodCounter + 1;
}
}
);
// No digest has been run so the counter will be zero
expect(scope.foodCounter).toEqual(0);
// Run the digest but since food has not changed count will still be zero
scope.$digest();
expect(scope.foodCounter).toEqual(0);
// Update food and run digest. Now the counter will increment
food = 'cheeseburger';
scope.$digest();
expect(scope.foodCounter).toEqual(1);
* ```
*
*
*
* @param {(function()|string)} watchExpression Expression that is evaluated on each
* {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers
* a call to the `listener`.
*
* - `string`: Evaluated as {@link guide/expression expression}
* - `function(scope)`: called with current `scope` as a parameter.
* @param {(function()|string)=} listener Callback called whenever the return value of
* the `watchExpression` changes.
*
* - `string`: Evaluated as {@link guide/expression expression}
* - `function(newValue, oldValue, scope)`: called with current and previous values as
* parameters.
*
* @param {boolean=} objectEquality Compare for object equality using {@link angular.equals} instead of
* comparing for reference equality.
* @returns {function()} Returns a deregistration function for this listener.
*/
$watch: function(watchExp, listener, objectEquality) {
var scope = this,
get = compileToFn(watchExp, 'watch'),
array = scope.$$watchers,
watcher = {
fn: listener,
last: initWatchVal,
get: get,
exp: watchExp,
eq: !!objectEquality
};
lastDirtyWatch = null;
// in the case user pass string, we need to compile it, do we really need this ?
if (!isFunction(listener)) {
var listenFn = compileToFn(listener || noop, 'listener');
watcher.fn = function(newVal, oldVal, scope) {listenFn(scope);};
}
if (!array) {
array = scope.$$watchers = [];
}
// we use unshift since we use a while loop in $digest for speed.
// the while loop reads in reverse order.
array.unshift(watcher);
return function deregisterWatch() {
arrayRemove(array, watcher);
lastDirtyWatch = null;
};
},
/**
* @ngdoc method
* @name $rootScope.Scope#$watchGroup
* @function
*
* @description
* A variant of {@link ng.$rootScope.Scope#$watch $watch()} where it watches an array of `watchExpressions`.
* If any one expression in the collection changes the `listener` is executed.
*
* - The items in the `watchCollection` array are observed via standard $watch operation and are examined on every
* call to $digest() to see if any items changes.
* - The `listener` is called whenever any expression in the `watchExpressions` array changes.
*
* @param {Array.<string|Function(scope)>} watchExpressions Array of expressions that will be individually
* watched using {@link ng.$rootScope.Scope#$watch $watch()}
*
* @param {function(newValues, oldValues, scope)} listener Callback called whenever the return value of any
* expression in `watchExpressions` changes
* The `newValues` array contains the current values of the `watchExpressions`, with the indexes matching
* those of `watchExpression`
* and the `oldValues` array contains the previous values of the `watchExpressions`, with the indexes matching
* those of `watchExpression`
* The `scope` refers to the current scope.
*
* @returns {function()} Returns a de-registration function for all listeners.
*/
$watchGroup: function(watchExpressions, listener) {
var oldValues = new Array(watchExpressions.length);
var newValues = new Array(watchExpressions.length);
var deregisterFns = [];
var changeCount = 0;
var self = this;
var unwatchFlags = new Array(watchExpressions.length);
var unwatchCount = watchExpressions.length;
forEach(watchExpressions, function (expr, i) {
var exprFn = $parse(expr);
deregisterFns.push(self.$watch(exprFn, function (value, oldValue) {
newValues[i] = value;
oldValues[i] = oldValue;
changeCount++;
if (unwatchFlags[i] && !exprFn.$$unwatch) unwatchCount++;
if (!unwatchFlags[i] && exprFn.$$unwatch) unwatchCount--;
unwatchFlags[i] = exprFn.$$unwatch;
}));
}, this);
deregisterFns.push(self.$watch(watchGroupFn, function () {
listener(newValues, oldValues, self);
if (unwatchCount === 0) {
watchGroupFn.$$unwatch = true;
} else {
watchGroupFn.$$unwatch = false;
}
}));
return function deregisterWatchGroup() {
forEach(deregisterFns, function (fn) {
fn();
});
};
function watchGroupFn() {return changeCount;}
},
/**
* @ngdoc method
* @name $rootScope.Scope#$watchCollection
* @function
*
* @description
* Shallow watches the properties of an object and fires whenever any of the properties change
* (for arrays, this implies watching the array items; for object maps, this implies watching
* the properties). If a change is detected, the `listener` callback is fired.
*
* - The `obj` collection is observed via standard $watch operation and is examined on every
* call to $digest() to see if any items have been added, removed, or moved.
* - The `listener` is called whenever anything within the `obj` has changed. Examples include
* adding, removing, and moving items belonging to an object or array.
*
*
* # Example
* ```js
$scope.names = ['igor', 'matias', 'misko', 'james'];
$scope.dataCount = 4;
$scope.$watchCollection('names', function(newNames, oldNames) {
$scope.dataCount = newNames.length;
});
expect($scope.dataCount).toEqual(4);
$scope.$digest();
//still at 4 ... no changes
expect($scope.dataCount).toEqual(4);
$scope.names.pop();
$scope.$digest();
//now there's been a change
expect($scope.dataCount).toEqual(3);
* ```
*
*
* @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The
* expression value should evaluate to an object or an array which is observed on each
* {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the
* collection will trigger a call to the `listener`.
*
* @param {function(newCollection, oldCollection, scope)} listener a callback function called
* when a change is detected.
* - The `newCollection` object is the newly modified data obtained from the `obj` expression
* - The `oldCollection` object is a copy of the former collection data.
* Due to performance considerations, the`oldCollection` value is computed only if the
* `listener` function declares two or more arguments.
* - The `scope` argument refers to the current scope.
*
* @returns {function()} Returns a de-registration function for this listener. When the
* de-registration function is executed, the internal watch operation is terminated.
*/
$watchCollection: function(obj, listener) {
var self = this;
// the current value, updated on each dirty-check run
var newValue;
// a shallow copy of the newValue from the last dirty-check run,
// updated to match newValue during dirty-check run
var oldValue;
// a shallow copy of the newValue from when the last change happened
var veryOldValue;
// only track veryOldValue if the listener is asking for it
var trackVeryOldValue = (listener.length > 1);
var changeDetected = 0;
var objGetter = $parse(obj);
var internalArray = [];
var internalObject = {};
var initRun = true;
var oldLength = 0;
function $watchCollectionWatch() {
newValue = objGetter(self);
var newLength, key;
if (!isObject(newValue)) { // if primitive
if (oldValue !== newValue) {
oldValue = newValue;
changeDetected++;
}
} else if (isArrayLike(newValue)) {
if (oldValue !== internalArray) {
// we are transitioning from something which was not an array into array.
oldValue = internalArray;
oldLength = oldValue.length = 0;
changeDetected++;
}
newLength = newValue.length;
if (oldLength !== newLength) {
// if lengths do not match we need to trigger change notification
changeDetected++;
oldValue.length = oldLength = newLength;
}
// copy the items to oldValue and look for changes.
for (var i = 0; i < newLength; i++) {
var bothNaN = (oldValue[i] !== oldValue[i]) &&
(newValue[i] !== newValue[i]);
if (!bothNaN && (oldValue[i] !== newValue[i])) {
changeDetected++;
oldValue[i] = newValue[i];
}
}
} else {
if (oldValue !== internalObject) {
// we are transitioning from something which was not an object into object.
oldValue = internalObject = {};
oldLength = 0;
changeDetected++;
}
// copy the items to oldValue and look for changes.
newLength = 0;
for (key in newValue) {
if (newValue.hasOwnProperty(key)) {
newLength++;
if (oldValue.hasOwnProperty(key)) {
if (oldValue[key] !== newValue[key]) {
changeDetected++;
oldValue[key] = newValue[key];
}
} else {
oldLength++;
oldValue[key] = newValue[key];
changeDetected++;
}
}
}
if (oldLength > newLength) {
// we used to have more keys, need to find them and destroy them.
changeDetected++;
for(key in oldValue) {
if (oldValue.hasOwnProperty(key) && !newValue.hasOwnProperty(key)) {
oldLength--;
delete oldValue[key];
}
}
}
}
$watchCollectionWatch.$$unwatch = objGetter.$$unwatch;
return changeDetected;
}
function $watchCollectionAction() {
if (initRun) {
initRun = false;
listener(newValue, newValue, self);
} else {
listener(newValue, veryOldValue, self);
}
// make a copy for the next time a collection is changed
if (trackVeryOldValue) {
if (!isObject(newValue)) {
//primitive
veryOldValue = newValue;
} else if (isArrayLike(newValue)) {
veryOldValue = new Array(newValue.length);
for (var i = 0; i < newValue.length; i++) {
veryOldValue[i] = newValue[i];
}
} else { // if object
veryOldValue = {};
for (var key in newValue) {
if (hasOwnProperty.call(newValue, key)) {
veryOldValue[key] = newValue[key];
}
}
}
}
}
return this.$watch($watchCollectionWatch, $watchCollectionAction);
},
/**
* @ngdoc method
* @name $rootScope.Scope#$digest
* @function
*
* @description
* Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and
* its children. Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change
* the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers}
* until no more listeners are firing. This means that it is possible to get into an infinite
* loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of
* iterations exceeds 10.
*
* Usually, you don't call `$digest()` directly in
* {@link ng.directive:ngController controllers} or in
* {@link ng.$compileProvider#directive directives}.
* Instead, you should call {@link ng.$rootScope.Scope#$apply $apply()} (typically from within
* a {@link ng.$compileProvider#directive directive}), which will force a `$digest()`.
*
* If you want to be notified whenever `$digest()` is called,
* you can register a `watchExpression` function with
* {@link ng.$rootScope.Scope#$watch $watch()} with no `listener`.
*
* In unit tests, you may need to call `$digest()` to simulate the scope life cycle.
*
* # Example
* ```js
var scope = ...;
scope.name = 'misko';
scope.counter = 0;
expect(scope.counter).toEqual(0);
scope.$watch('name', function(newValue, oldValue) {
scope.counter = scope.counter + 1;
});
expect(scope.counter).toEqual(0);
scope.$digest();
// no variable change
expect(scope.counter).toEqual(0);
scope.name = 'adam';
scope.$digest();
expect(scope.counter).toEqual(1);
* ```
*
*/
$digest: function() {
var watch, value, last,
watchers,
asyncQueue = this.$$asyncQueue,
postDigestQueue = this.$$postDigestQueue,
length,
dirty, ttl = TTL,
next, current, target = this,
watchLog = [],
stableWatchesCandidates = [],
logIdx, logMsg, asyncTask;
beginPhase('$digest');
lastDirtyWatch = null;
do { // "while dirty" loop
dirty = false;
current = target;
while(asyncQueue.length) {
try {
asyncTask = asyncQueue.shift();
asyncTask.scope.$eval(asyncTask.expression);
} catch (e) {
clearPhase();
$exceptionHandler(e);
}
lastDirtyWatch = null;
}
traverseScopesLoop:
do { // "traverse the scopes" loop
if ((watchers = current.$$watchers)) {
// process our watches
length = watchers.length;
while (length--) {
try {
watch = watchers[length];
// Most common watches are on primitives, in which case we can short
// circuit it with === operator, only when === fails do we use .equals
if (watch) {
if ((value = watch.get(current)) !== (last = watch.last) &&
!(watch.eq
? equals(value, last)
: (typeof value == 'number' && typeof last == 'number'
&& isNaN(value) && isNaN(last)))) {
dirty = true;
lastDirtyWatch = watch;
watch.last = watch.eq ? copy(value) : value;
watch.fn(value, ((last === initWatchVal) ? value : last), current);
if (ttl < 5) {
logIdx = 4 - ttl;
if (!watchLog[logIdx]) watchLog[logIdx] = [];
logMsg = (isFunction(watch.exp))
? 'fn: ' + (watch.exp.name || watch.exp.toString())
: watch.exp;
logMsg += '; newVal: ' + toJson(value) + '; oldVal: ' + toJson(last);
watchLog[logIdx].push(logMsg);
}
if (watch.get.$$unwatch) stableWatchesCandidates.push({watch: watch, array: watchers});
} else if (watch === lastDirtyWatch) {
// If the most recently dirty watcher is now clean, short circuit since the remaining watchers
// have already been tested.
dirty = false;
break traverseScopesLoop;
}
}
} catch (e) {
clearPhase();
$exceptionHandler(e);
}
}
}
// Insanity Warning: scope depth-first traversal
// yes, this code is a bit crazy, but it works and we have tests to prove it!
// this piece should be kept in sync with the traversal in $broadcast
if (!(next = (current.$$childHead ||
(current !== target && current.$$nextSibling)))) {
while(current !== target && !(next = current.$$nextSibling)) {
current = current.$parent;
}
}
} while ((current = next));
// `break traverseScopesLoop;` takes us to here
if((dirty || asyncQueue.length) && !(ttl--)) {
clearPhase();
throw $rootScopeMinErr('infdig',
'{0} $digest() iterations reached. Aborting!\n' +
'Watchers fired in the last 5 iterations: {1}',
TTL, toJson(watchLog));
}
} while (dirty || asyncQueue.length);
clearPhase();
while(postDigestQueue.length) {
try {
postDigestQueue.shift()();
} catch (e) {
$exceptionHandler(e);
}
}
for (length = stableWatchesCandidates.length - 1; length >= 0; --length) {
var candidate = stableWatchesCandidates[length];
if (candidate.watch.get.$$unwatch) {
arrayRemove(candidate.array, candidate.watch);
}
}
},
/**
* @ngdoc event
* @name $rootScope.Scope#$destroy
* @eventType broadcast on scope being destroyed
*
* @description
* Broadcasted when a scope and its children are being destroyed.
*
* Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to
* clean up DOM bindings before an element is removed from the DOM.
*/
/**
* @ngdoc method
* @name $rootScope.Scope#$destroy
* @function
*
* @description
* Removes the current scope (and all of its children) from the parent scope. Removal implies
* that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer
* propagate to the current scope and its children. Removal also implies that the current
* scope is eligible for garbage collection.
*
* The `$destroy()` is usually used by directives such as
* {@link ng.directive:ngRepeat ngRepeat} for managing the
* unrolling of the loop.
*
* Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope.
* Application code can register a `$destroy` event handler that will give it a chance to
* perform any necessary cleanup.
*
* Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to
* clean up DOM bindings before an element is removed from the DOM.
*/
$destroy: function() {
// we can't destroy the root scope or a scope that has been already destroyed
if (this.$$destroyed) return;
var parent = this.$parent;
this.$broadcast('$destroy');
this.$$destroyed = true;
if (this === $rootScope) return;
forEach(this.$$listenerCount, bind(null, decrementListenerCount, this));
// sever all the references to parent scopes (after this cleanup, the current scope should
// not be retained by any of our references and should be eligible for garbage collection)
if (parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;
if (parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;
if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;
if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;
// All of the code below is bogus code that works around V8's memory leak via optimized code
// and inline caches.
//
// see:
// - https://code.google.com/p/v8/issues/detail?id=2073#c26
// - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909
// - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451
this.$parent = this.$$nextSibling = this.$$prevSibling = this.$$childHead =
this.$$childTail = this.$root = null;
// don't reset these to null in case some async task tries to register a listener/watch/task
this.$$listeners = {};
this.$$watchers = this.$$asyncQueue = this.$$postDigestQueue = [];
// prevent NPEs since these methods have references to properties we nulled out
this.$destroy = this.$digest = this.$apply = noop;
this.$on = this.$watch = this.$watchGroup = function() { return noop; };
},
/**
* @ngdoc method
* @name $rootScope.Scope#$eval
* @function
*
* @description
* Executes the `expression` on the current scope and returns the result. Any exceptions in
* the expression are propagated (uncaught). This is useful when evaluating Angular
* expressions.
*
* # Example
* ```js
var scope = ng.$rootScope.Scope();
scope.a = 1;
scope.b = 2;
expect(scope.$eval('a+b')).toEqual(3);
expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);
* ```
*
* @param {(string|function())=} expression An angular expression to be executed.
*
* - `string`: execute using the rules as defined in {@link guide/expression expression}.
* - `function(scope)`: execute the function with the current `scope` parameter.
*
* @param {(object)=} locals Local variables object, useful for overriding values in scope.
* @returns {*} The result of evaluating the expression.
*/
$eval: function(expr, locals) {
return $parse(expr)(this, locals);
},
/**
* @ngdoc method
* @name $rootScope.Scope#$evalAsync
* @function
*
* @description
* Executes the expression on the current scope at a later point in time.
*
* The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only
* that:
*
* - it will execute after the function that scheduled the evaluation (preferably before DOM
* rendering).
* - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after
* `expression` execution.
*
* Any exceptions from the execution of the expression are forwarded to the
* {@link ng.$exceptionHandler $exceptionHandler} service.
*
* __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle
* will be scheduled. However, it is encouraged to always call code that changes the model
* from within an `$apply` call. That includes code evaluated via `$evalAsync`.
*
* @param {(string|function())=} expression An angular expression to be executed.
*
* - `string`: execute using the rules as defined in {@link guide/expression expression}.
* - `function(scope)`: execute the function with the current `scope` parameter.
*
*/
$evalAsync: function(expr) {
// if we are outside of an $digest loop and this is the first time we are scheduling async
// task also schedule async auto-flush
if (!$rootScope.$$phase && !$rootScope.$$asyncQueue.length) {
$browser.defer(function() {
if ($rootScope.$$asyncQueue.length) {
$rootScope.$digest();
}
});
}
this.$$asyncQueue.push({scope: this, expression: expr});
},
$$postDigest : function(fn) {
this.$$postDigestQueue.push(fn);
},
/**
* @ngdoc method
* @name $rootScope.Scope#$apply
* @function
*
* @description
* `$apply()` is used to execute an expression in angular from outside of the angular
* framework. (For example from browser DOM events, setTimeout, XHR or third party libraries).
* Because we are calling into the angular framework we need to perform proper scope life
* cycle of {@link ng.$exceptionHandler exception handling},
* {@link ng.$rootScope.Scope#$digest executing watches}.
*
* ## Life cycle
*
* # Pseudo-Code of `$apply()`
* ```js
function $apply(expr) {
try {
return $eval(expr);
} catch (e) {
$exceptionHandler(e);
} finally {
$root.$digest();
}
}
* ```
*
*
* Scope's `$apply()` method transitions through the following stages:
*
* 1. The {@link guide/expression expression} is executed using the
* {@link ng.$rootScope.Scope#$eval $eval()} method.
* 2. Any exceptions from the execution of the expression are forwarded to the
* {@link ng.$exceptionHandler $exceptionHandler} service.
* 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the
* expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method.
*
*
* @param {(string|function())=} exp An angular expression to be executed.
*
* - `string`: execute using the rules as defined in {@link guide/expression expression}.
* - `function(scope)`: execute the function with current `scope` parameter.
*
* @returns {*} The result of evaluating the expression.
*/
$apply: function(expr) {
try {
beginPhase('$apply');
return this.$eval(expr);
} catch (e) {
$exceptionHandler(e);
} finally {
clearPhase();
try {
$rootScope.$digest();
} catch (e) {
$exceptionHandler(e);
throw e;
}
}
},
/**
* @ngdoc method
* @name $rootScope.Scope#$on
* @function
*
* @description
* Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for
* discussion of event life cycle.
*
* The event listener function format is: `function(event, args...)`. The `event` object
* passed into the listener has the following attributes:
*
* - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or
* `$broadcast`-ed.
* - `currentScope` - `{Scope}`: the scope that is currently handling the event. Once the
* event propagates through the scope hierarchy, this property is set to null.
* - `name` - `{string}`: name of the event.
* - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel
* further event propagation (available only for events that were `$emit`-ed).
* - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag
* to true.
* - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.
*
* @param {string} name Event name to listen on.
* @param {function(event, ...args)} listener Function to call when the event is emitted.
* @returns {function()} Returns a deregistration function for this listener.
*/
$on: function(name, listener) {
var namedListeners = this.$$listeners[name];
if (!namedListeners) {
this.$$listeners[name] = namedListeners = [];
}
namedListeners.push(listener);
var current = this;
do {
if (!current.$$listenerCount[name]) {
current.$$listenerCount[name] = 0;
}
current.$$listenerCount[name]++;
} while ((current = current.$parent));
var self = this;
return function() {
namedListeners[indexOf(namedListeners, listener)] = null;
decrementListenerCount(self, 1, name);
};
},
/**
* @ngdoc method
* @name $rootScope.Scope#$emit
* @function
*
* @description
* Dispatches an event `name` upwards through the scope hierarchy notifying the
* registered {@link ng.$rootScope.Scope#$on} listeners.
*
* The event life cycle starts at the scope on which `$emit` was called. All
* {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get
* notified. Afterwards, the event traverses upwards toward the root scope and calls all
* registered listeners along the way. The event will stop propagating if one of the listeners
* cancels it.
*
* Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed
* onto the {@link ng.$exceptionHandler $exceptionHandler} service.
*
* @param {string} name Event name to emit.
* @param {...*} args Optional one or more arguments which will be passed onto the event listeners.
* @return {Object} Event object (see {@link ng.$rootScope.Scope#$on}).
*/
$emit: function(name, args) {
var empty = [],
namedListeners,
scope = this,
stopPropagation = false,
event = {
name: name,
targetScope: scope,
stopPropagation: function() {stopPropagation = true;},
preventDefault: function() {
event.defaultPrevented = true;
},
defaultPrevented: false
},
listenerArgs = concat([event], arguments, 1),
i, length;
do {
namedListeners = scope.$$listeners[name] || empty;
event.currentScope = scope;
for (i=0, length=namedListeners.length; i<length; i++) {
// if listeners were deregistered, defragment the array
if (!namedListeners[i]) {
namedListeners.splice(i, 1);
i--;
length--;
continue;
}
try {
//allow all listeners attached to the current scope to run
namedListeners[i].apply(null, listenerArgs);
} catch (e) {
$exceptionHandler(e);
}
}
//if any listener on the current scope stops propagation, prevent bubbling
if (stopPropagation) {
event.currentScope = null;
return event;
}
//traverse upwards
scope = scope.$parent;
} while (scope);
event.currentScope = null;
return event;
},
/**
* @ngdoc method
* @name $rootScope.Scope#$broadcast
* @function
*
* @description
* Dispatches an event `name` downwards to all child scopes (and their children) notifying the
* registered {@link ng.$rootScope.Scope#$on} listeners.
*
* The event life cycle starts at the scope on which `$broadcast` was called. All
* {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get
* notified. Afterwards, the event propagates to all direct and indirect scopes of the current
* scope and calls all registered listeners along the way. The event cannot be canceled.
*
* Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed
* onto the {@link ng.$exceptionHandler $exceptionHandler} service.
*
* @param {string} name Event name to broadcast.
* @param {...*} args Optional one or more arguments which will be passed onto the event listeners.
* @return {Object} Event object, see {@link ng.$rootScope.Scope#$on}
*/
$broadcast: function(name, args) {
var target = this,
current = target,
next = target,
event = {
name: name,
targetScope: target,
preventDefault: function() {
event.defaultPrevented = true;
},
defaultPrevented: false
},
listenerArgs = concat([event], arguments, 1),
listeners, i, length;
//down while you can, then up and next sibling or up and next sibling until back at root
while ((current = next)) {
event.currentScope = current;
listeners = current.$$listeners[name] || [];
for (i=0, length = listeners.length; i<length; i++) {
// if listeners were deregistered, defragment the array
if (!listeners[i]) {
listeners.splice(i, 1);
i--;
length--;
continue;
}
try {
listeners[i].apply(null, listenerArgs);
} catch(e) {
$exceptionHandler(e);
}
}
// Insanity Warning: scope depth-first traversal
// yes, this code is a bit crazy, but it works and we have tests to prove it!
// this piece should be kept in sync with the traversal in $digest
// (though it differs due to having the extra check for $$listenerCount)
if (!(next = ((current.$$listenerCount[name] && current.$$childHead) ||
(current !== target && current.$$nextSibling)))) {
while(current !== target && !(next = current.$$nextSibling)) {
current = current.$parent;
}
}
}
event.currentScope = null;
return event;
}
};
var $rootScope = new Scope();
return $rootScope;
function beginPhase(phase) {
if ($rootScope.$$phase) {
throw $rootScopeMinErr('inprog', '{0} already in progress', $rootScope.$$phase);
}
$rootScope.$$phase = phase;
}
function clearPhase() {
$rootScope.$$phase = null;
}
function compileToFn(exp, name) {
var fn = $parse(exp);
assertArgFn(fn, name);
return fn;
}
function decrementListenerCount(current, count, name) {
do {
current.$$listenerCount[name] -= count;
if (current.$$listenerCount[name] === 0) {
delete current.$$listenerCount[name];
}
} while ((current = current.$parent));
}
/**
* function used as an initial value for watchers.
* because it's unique we can easily tell it apart from other values
*/
function initWatchVal() {}
}];
}
|
export default (num, nth) => (nth > 0 ? +[...`${num}`].reverse()[nth - 1] || 0 : -1);
|
import Animation from './Animation.js';
import './App.css';
function App() {
return (
<div className="App">
<header className="App-header">
<Animation asset="https://cdn.rive.app/animations/off_road_car_blog_0_6.riv" />
<p>
Edit the <code>src/Animation.js</code> Rive React component.
</p>
<a
className="App-link"
href="https://beta.rive.app"
target="_blank"
rel="noopener noreferrer"
>
Learn Rive
</a>
</header>
</div>
);
}
export default App;
|
import { Icons } from './assets';
document.querySelectorAll('icon').forEach(toSvg);
/**
* Convert element to svg image
* @example
* ```html
* <!-- USAGE -->
*
* <icon id="logo" width="150" height="150"></icon>
*
* <!-- RESULT -->
*
* <svg id="logo" width="150" height="150" ...>...</svg>
* ```
*/
function toSvg(el) {
const { attributes } = el;
el.innerHTML = Icons[el.getAttribute('id')];
Object.keys(attributes).forEach(attrKey => {
const { name, value } = attributes[attrKey];
el.firstChild.setAttribute(name, value);
});
el.firstChild.classList.add('icon');
el.outerHTML = el.innerHTML;
} |
from utils import CanadianScraper, CanadianPerson as Person
import csv
from io import StringIO
COUNCIL_PAGE = 'https://www.assembly.ab.ca/txt/mla_home/contacts.csv'
MEMBER_INDEX_URL = (
'https://www.assembly.ab.ca/members/members-of-the-legislative-assembly'
)
PARTIES = {
'AL': 'Alberta Liberal Party',
'AP': 'Alberta Party',
'IC': 'Independent Conservative',
'IND': 'Independent',
'FCP': 'Freedom Conservative Party',
'ND': 'Alberta New Democratic Party',
'NDP': 'Alberta New Democratic Party',
'PC': 'Progressive Conservative Association of Alberta',
'UC': 'United Conservative',
'UCP': 'United Conservative Party',
'W': 'Wildrose Alliance Party',
}
def get_party(abbr):
"""Return full party name from abbreviation"""
return PARTIES[abbr]
OFFICE_FIELDS = (
'Address Type',
'Address Line1',
'Address Line2',
'City',
'Province',
'Country',
'Postal Code',
'Phone Number',
'Fax Number',
)
ADDRESS_FIELDS = (
'Address Line1',
'Address Line2',
'City',
'Province',
'Country',
)
class AlbertaPersonScraper(CanadianScraper):
def scrape(self):
index = self.lxmlize(MEMBER_INDEX_URL)
csv_text = self.get(COUNCIL_PAGE).text
csv_text = '\n'.join(csv_text.split('\n')[3:]) # discard first 3 rows
reader = csv.reader(StringIO(csv_text))
# make unique field names for the two sets of address fields
field_names = next(reader)
for name in OFFICE_FIELDS:
assert(field_names.count(name) == 2)
field_names[field_names.index(name)] = '{} 1'.format(name)
field_names[field_names.index(name)] = '{} 2'.format(name)
rows = [dict(zip(field_names, row)) for row in reader]
assert len(rows), 'No members found'
for mla in rows:
name = '{} {} {}'.format(
mla['MLA First Name'],
mla['MLA Middle Names'],
mla['MLA Last Name'],
)
if name.strip() == '':
continue
party = get_party(mla['Caucus'])
name_without_status = name.split(',')[0]
row_xpath = '//td[normalize-space()="{}"]/..'.format(
mla['Constituency Name'],
)
detail_url, = index.xpath('{}//a/@href'.format(row_xpath))
photo_url, = index.xpath('{}//img/@src'.format(row_xpath))
p = Person(
primary_org='legislature',
name=name_without_status,
district=mla['Constituency Name'],
role='MLA',
party=party,
image=photo_url,
)
p.add_source(COUNCIL_PAGE)
p.add_source(detail_url)
if mla['Email']:
p.add_contact('email', mla['Email'])
elif mla.get('MLA Email'):
p.add_contact('email', mla['MLA Email'])
assert(mla['Address Type 1'] == 'Legislature Office')
assert(mla['Address Type 2'] == 'Constituency Office')
for suffix, note in ((1, 'legislature'), (2, 'constituency')):
for key, contact_type in (('Phone', 'voice'), ('Fax', 'fax')):
value = mla['{} Number {}'.format(key, suffix)]
if value and value != 'Pending':
p.add_contact(contact_type, value, note)
address = ', '.join(
filter(
bool, [
mla[
'{} {}'.format(field, suffix)
] for field in ADDRESS_FIELDS
]
)
)
if address:
p.add_contact('address', address, note)
yield p
|
import React from 'react';
const VideoDetail = ({video}) => {
if(!video){
return <div>Loading...</div>
}
const videoId = video.id.videoId;
const url = `https://www.youtube.com/embed/${videoId}`;
return (
<div className="video-detail col-md-8">
<div className="embed-responsive embed-responsive-16by9">
<iframe className="embed-responsive-item" src={url}></iframe>
</div>
<div className="details">
<div>{video.snippet.title}</div>
<div>{video.snippet.description}</div>
</div>
</div>
)
}
export default VideoDetail;
|
import * as Sentry from '@sentry/react-native';
import {version, revAppId, revSentryDsn} from '../package.json';
function shouldEnableSentry() {
return !__DEV__ && revSentryDsn;
}
if (shouldEnableSentry()) {
Sentry.init({
dsn: revSentryDsn,
release: `${revAppId}@${version}`,
dist: version,
});
}
function captureException(ex, {section, extra, clear} = {}) {
if (shouldEnableSentry()) {
Sentry.captureException(ex, (scope) => {
if (clear) {
scope.clear();
}
if (section) {
scope.setTag('section', section);
}
if (extra) {
for (const key in extra) {
scope.setExtra(key, extra[key]);
}
}
return scope;
});
}
}
export {captureException};
|